Plugin Directory

Changeset 3321999


Ignore:
Timestamp:
07/03/2025 08:20:31 PM (9 months ago)
Author:
darnado
Message:

Updated to version 1.2.0. This version adds an option in the plugin admin bar to apply a flex-column layout to the wp-site-blocks container.

Location:
caledros-basic-blocks
Files:
656 added
31 edited

Legend:

Unmodified
Added
Removed
  • caledros-basic-blocks/trunk/README.txt

    r3314100 r3321999  
    55Requires at least: 6.7
    66Tested up to: 6.8
    7 Stable tag: 1.1.1
     7Stable tag: 1.2.0
    88Requires PHP: 8.0
    99License: GPLv2 or later
     
    3333Perfect for developers, designers, and content creators who want more control and better performance without the overhead of large block libraries.
    3434
    35 ## Contact information
    36 
    37 You can contact me at: **info@caledrosforge.com**
     35## More Projects & Information
    3836
    3937For more information about my projects, you can visit my website: [caledrosforge.com](https://caledrosforge.com/)
     
    203201* Deleted empty folder located inside core → resources → src
    204202
     203= 1.2.0 =
     204
     205* Added an option in the plugin admin bar to apply a flex-column layout to the wp-site-blocks container.
     206* Fixed typos in some of the settings descriptions for the plugin blocks.
     207
    205208== Upgrade Notice ==
    206209
     
    217220Added fallback colors for the default Gutenberg list block. It now uses the same colors as paragraph text in both dark and light modes.
    218221
     222= 1.2.0 =
     223This update adds an option in the plugin admin bar to apply a flex-column layout to the wp-site-blocks container.
     224
    219225== Installation ==
    220226
  • caledros-basic-blocks/trunk/build/blocks/button/index.asset.php

    r3313530 r3321999  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'c14d895e881040aaa492');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '1f9abe8ea90613f24c20');
  • caledros-basic-blocks/trunk/build/blocks/button/index.js

    r3313530 r3321999  
    1 (()=>{"use strict";var e,t={145:()=>{const e=window.wp.blocks,t=window.wp.i18n,o=JSON.parse('{"UU":"caledros-basic-blocks/button"}'),l=window.ReactJSXRuntime,a={icon:(0,l.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,l.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,l.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,l.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,l.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,l.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,l.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,l.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,l.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,l.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,l.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,l.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},n=window.wp.blockEditor,r=window.wp.components,s=window.wp.element,i=window.wp.data;function b({attributes:e,setAttributes:o}){const{buttonLightColor:a}=e,[b,c]=(0,s.useState)("#00000000"===a),[u,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=u.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{c((e=>!e)),o({buttonLightColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonLightColor:e}),enableAlpha:!0,clearable:!1})]})}function c({attributes:e,setAttributes:o}){const{buttonDarkColor:a}=e,[b,c]=(0,s.useState)("#00000000"===a),[u,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=u.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{c((e=>!e)),o({buttonDarkColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonDarkColor:e}),enableAlpha:!0,clearable:!1})]})}function u({attributes:e,setAttributes:o}){const{buttonHoverLightColor:a}=e,[b,c]=(0,s.useState)("#00000000"===a),[u,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=u.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Hover color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{c((e=>!e)),o({buttonHoverLightColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonHoverLightColor:e}),enableAlpha:!0,clearable:!1})]})}function d({attributes:e,setAttributes:o}){const{buttonHoverDarkColor:a}=e,[b,c]=(0,s.useState)("#00000000"===a),[u,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=u.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Hover color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{c((e=>!e)),o({buttonHoverDarkColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonHoverDarkColor:e}),enableAlpha:!0,clearable:!1})]})}function g({attributes:e,setAttributes:o}){const{buttonTextLightColor:a}=e,[b,c]=(0,s.useState)("#00000000"===a),[u,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=u.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Text color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{c((e=>!e)),o({buttonTextLightColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonTextLightColor:e}),enableAlpha:!0,clearable:!1})]})}function p({attributes:e,setAttributes:o}){const{buttonTextDarkColor:a}=e,[b,c]=(0,s.useState)("#00000000"===a),[u,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=u.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Text color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{c((e=>!e)),o({buttonTextDarkColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonTextDarkColor:e}),enableAlpha:!0,clearable:!1})]})}function x({attributes:e,setAttributes:o,registeredFonts:a,getAvailableFontStyles:n,getAvailableFontWeights:s,doesFontExist:i}){const{buttonFontFamily:b,buttonFontWeight:c,buttonFontStyle:u}=e,d=a?.theme?.map((e=>({label:e.name,value:e.slug})))||[],g=a?.custom?.map((e=>({label:e?.name,value:e?.slug})))||[],p=[{label:"Default",value:""},...0!==d.length?d:[],...g&&0!==g?.length?g:[]];return(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Select the font family.","caledros-basic-blocks"),value:b,options:p,onChange:e=>{const t=i(e)?n(e):[],l=t.includes(u)?u:t[0],a=i(e)?s(e,l):[],r=a.includes(c)?c:a[0];o({buttonFontFamily:e,...i(e)&&l!==u&&{buttonFontStyle:l},...i(e)&&r!==c&&{buttonFontWeight:r}})}})}function h({attributes:e,setAttributes:o,getAvailableFontWeights:a}){const{buttonFontFamily:n,buttonFontWeight:s,buttonFontStyle:i}=e,b=a(n,i)?.map((e=>({label:`${e}`,value:e})));return(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Select the font weight.","caledros-basic-blocks"),value:s,options:b||[{label:"100",value:100},{label:"200",value:200},{label:"300",value:300},{label:"400",value:400},{label:"500",value:500},{label:"600",value:600},{label:"700",value:700},{label:"800",value:800},{label:"900",value:900}],onChange:e=>{o({buttonFontWeight:parseInt(e)})}})}function _({attributes:e,setAttributes:o,getAvailableFontStyles:a,getAvailableFontWeights:n,doesFontExist:s}){const{buttonFontFamily:i,buttonFontStyle:b,buttonFontWeight:c}=e,u=a(i)?.map((e=>({label:`${e[0].toUpperCase()}${e.slice(1)}`,value:`${e}`})));return(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Select the font style.","caledros-basic-blocks"),value:b,options:0===u.length?[{label:"Normal",value:"normal"},{label:"Italic",value:"italic"}]:u,onChange:e=>{const t=s(i)?n(i,e):[],l=t.includes(c)?c:t[0];o({buttonFontStyle:e,...s(i)&&c!==l&&{buttonFontWeight:l}})}})}function m({attributes:e,setAttributes:o}){const[a]=(0,n.useSettings)("typography.fontFamilies"),{theme:s=[],custom:i=[]}=a||{},b=[...s,...i],c=e=>b.some((t=>t?.slug===e)),u=e=>{const t=b.find((t=>t?.slug===e)),o=t?.fontFace?.map((e=>e?.fontStyle))||[];return[...new Set(o)]},d=(e,t)=>{const o=b.find((t=>t?.slug===e)),l=o?.fontFace?.filter((e=>e?.fontStyle===t)),a=l?.map((e=>{if(e?.fontWeight?.includes(" ")){const[t,o]=e?.fontWeight.split(" ").map((e=>parseInt(e))),l=[];for(let e=t;e<=o;e+=100)l.push(e);return l}return parseInt(e?.fontWeight)})).flat().sort(((e,t)=>e-t));return a};return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Typography","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(x,{attributes:e,setAttributes:o,registeredFonts:a,getAvailableFontStyles:u,getAvailableFontWeights:d,doesFontExist:c}),(0,l.jsx)(_,{attributes:e,setAttributes:o,getAvailableFontStyles:u,getAvailableFontWeights:d,doesFontExist:c}),(0,l.jsx)(h,{attributes:e,setAttributes:o,getAvailableFontWeights:d})]})}function v({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,b=a.darkColor.split(" "),c=b[0]||"#000",u=b[1]||"#000",d=b[2]||"#000",g=b[3]||"#000",[p,x]=(0,s.useState)(!!a.darkColor.includes(" ")),[h,_]=(0,n.useSettings)("color.palette","color.defaultPalette"),m=h.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,i.select)("core/editor")?.getEditorSettings(),$=v?.__experimentalFeatures?.color?.palette,f=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),C=f($,"default"),j=f($,"theme"),S=f($,"custom"),k=[..._?[C]:[],j,...S.colors?[S]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:p,onChange:()=>{const e=!p;x(e),o(e?{buttonBorder:{...a,darkColor:"#000 #000 #000 #000"}}:{buttonBorder:{...a,darkColor:"#000"}})}}),!p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose the border color","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:a.darkColor,onChange:e=>o({buttonBorder:{...a,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:c,onChange:e=>{o({buttonBorder:{...a,darkColor:`${e||"#00000000"} ${u} ${d} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:u,onChange:e=>{o({buttonBorder:{...a,darkColor:`${c} ${e||"#00000000"} ${d} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:d,onChange:e=>{o({buttonBorder:{...a,darkColor:`${c} ${u} ${e||"#00000000"} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:g,onChange:e=>{o({buttonBorder:{...a,darkColor:`${c} ${u} ${d} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function $({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,b=a.lightColor.split(" "),c=b[0]||"#000",u=b[1]||"#000",d=b[2]||"#000",g=b[3]||"#000",[p,x]=(0,s.useState)(!!a.lightColor.includes(" ")),[h,_]=(0,n.useSettings)("color.palette","color.defaultPalette"),m=h.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,i.select)("core/editor")?.getEditorSettings(),$=v?.__experimentalFeatures?.color?.palette,f=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),C=f($,"default"),j=f($,"theme"),S=f($,"custom"),k=[..._?[C]:[],j,...S.colors?[S]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:p,onChange:()=>{const e=!p;x(e),o(e?{buttonBorder:{...a,lightColor:"#000 #000 #000 #000"}}:{buttonBorder:{...a,lightColor:"#000"}})}}),!p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose the border color","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:a.lightColor,onChange:e=>o({buttonBorder:{...a,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:c,onChange:e=>{o({buttonBorder:{...a,lightColor:`${e||"#00000000"} ${u} ${d} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:u,onChange:e=>{o({buttonBorder:{...a,lightColor:`${c} ${e||"#00000000"} ${d} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:d,onChange:e=>{o({buttonBorder:{...a,lightColor:`${c} ${u} ${e||"#00000000"} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:g,onChange:e=>{o({buttonBorder:{...a,lightColor:`${c} ${u} ${d} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function f({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,n=a.radius.split(" "),i=parseInt(n[0])||0,b=parseInt(n[1])||0,c=parseInt(n[2])||0,u=parseInt(n[3])||0,d=a.radius.split(" "),g=d[0]?d[0].replace(/\d+/g,""):"px",p=d[1]?d[1].replace(/\d+/g,""):"px",x=d[2]?d[2].replace(/\d+/g,""):"px",h=d[3]?d[3].replace(/\d+/g,""):"px",[_,m]=(0,s.useState)(!!a.radius.includes(" ")),v=(e,t)=>"%"===e&&t>100?100:t;return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border radius","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border radiuses for each corner",checked:_,onChange:()=>{const e=!_;m(e),o(e?{buttonBorder:{...a,radius:"10px 10px 10px 10px"}}:{buttonBorder:{...a,radius:"10px"}})}}),!_&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the border radius (${g}) for the container.`,"caledros-basic-blocks"),value:parseInt(a.radius),max:"%"===g?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${e}${g}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${v(e,parseInt(a.radius))}${e}`}})}})]}),_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the top-left border radius (${g}).`,"caledros-basic-blocks"),value:i,max:"%"===g?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${e}${g} ${b}${p} ${c}${x} ${u}${h}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${v(e,i)}${e} ${b}${p} ${c}${x} ${u}${h}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the top-right border radius (${p}).`,"caledros-basic-blocks"),value:b,max:"%"===p?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${e}${p} ${c}${x} ${u}${h}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${v(e,b)}${e} ${c}${x} ${u}${h}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the bottom-right border radius (${x}).`,"caledros-basic-blocks"),value:c,max:"%"===x?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${b}${p} ${e}${x} ${u}${h}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:x,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${b}${p} ${v(e,c)}${e} ${u}${h}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the bottom-left border radius (${h}).`,"caledros-basic-blocks"),value:u,max:"%"===h?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${b}${p} ${c}${x} ${e}${h}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:h,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${b}${p} ${c}${x} ${v(e,u)}${e}`}})}})]})]})]})}function C({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,n=a.style.split(" "),i=n[0]||"solid",b=n[1]||"none",c=n[2]||"none",u=n[3]||"none",[d,g]=(0,s.useState)(!!a.style.includes(" "));return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border style","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border styles for each side",checked:d,onChange:()=>{const e=!d;g(e),o(e?{buttonBorder:{...a,style:"solid none none none"}}:{buttonBorder:{...a,style:"solid"}})}}),!d&&(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the border style.","caledros-basic-blocks"),value:a.style,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:e}})}}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the style for the top border.","caledros-basic-blocks"),value:i,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:`${e} ${b} ${c} ${u}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the style for the right border.","caledros-basic-blocks"),value:b,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:`${i} ${e} ${c} ${u}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the style for the bottom border.","caledros-basic-blocks"),value:c,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:`${i} ${b} ${e} ${u}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the style for the left border.","caledros-basic-blocks"),value:u,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:`${i} ${b} ${c} ${e}`}})}})]})]})}function j({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,n=a.width.split(" "),i=parseInt(n[0])||0,b=parseInt(n[1])||0,c=parseInt(n[2])||0,u=parseInt(n[3])||0,[d,g]=(0,s.useState)(!!a.width.includes(" "));return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border width","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border widths for each side",checked:d,onChange:()=>{const e=!d;g(e),o(e?{buttonBorder:{...a,width:"1px 1px 1px 1px"}}:{buttonBorder:{...a,width:"1px"}})}}),!d&&(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the border width (px) for the container.","caledros-basic-blocks"),value:parseInt(a.width),max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${e}px`}})}}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the top border width (px) for the container.","caledros-basic-blocks"),value:i,max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${e}px ${b}px ${c}px ${u}px`}})}}),(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the right border width (px) for the container.","caledros-basic-blocks"),value:b,max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${i}px ${e}px ${c}px ${u}px`}})}}),(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the bottom border width (px) for the container.","caledros-basic-blocks"),value:c,max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${i}px ${b}px ${e}px ${u}px`}})}}),(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the left border width (px) for the container.","caledros-basic-blocks"),value:u,max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${i}px ${b}px ${c}px ${e}px`}})}})]})]})}function S({attributes:e,setAttributes:o}){const{buttonText:a}=e;return(0,l.jsx)(r.PanelBody,{title:(0,t.__)("Button text","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Type the text for the button.","caledros-basic-blocks"),value:a,onChange:e=>{o({buttonText:e})}})})}function k({attributes:e,setAttributes:o}){const{buttonLink:a}=e;return(0,l.jsx)(r.PanelBody,{title:(0,t.__)("Button link","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Paste the link for the button.","caledros-basic-blocks"),value:a,onChange:e=>{o({buttonLink:e})}})})}function B({attributes:e,setAttributes:o}){const{buttonMargin:a}=e,n=parseInt(a.top)||0,s=parseInt(a.left)||0,i=parseInt(a.bottom)||0,b=parseInt(a.right)||0,c=a.top.replace(/\d+/g,""),u=a.left.replace(/\d+/g,""),d=a.bottom.replace(/\d+/g,""),g=a.right.replace(/\d+/g,""),p=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Enable different margins","caledros-basic-blocks"),checked:a.differentMarginsEnabled,onChange:e=>{o({buttonMargin:{...a,differentMarginsEnabled:e}})}}),!a.differentMarginsEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the margin (${c}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,top:`${"auto"===c?"":e}${c}`}})},disabled:"auto"===c}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,top:`${p(e,n)}${e}`}})}})]}),a.differentMarginsEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the top margin (${c}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,top:`${"auto"===c?"":e}${c}`}})},disabled:"auto"===c}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,top:`${p(e,n)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the right margin (${g}) for the container.`,"caledros-basic-blocks"),value:b,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,right:`${"auto"===g?"":e}${g}`}})},disabled:"auto"===g}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,right:`${p(e,b)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the bottom margin (${d}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,bottom:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,bottom:`${p(e,i)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the left margin (${u}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,left:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,left:`${p(e,s)}${e}`}})}})]})]})]})}function w({attributes:e,setAttributes:o}){const{buttonPadding:a}=e,n=parseInt(a.top)||0,s=parseInt(a.left)||0,i=parseInt(a.bottom)||0,b=parseInt(a.right)||0,c=a.top.replace(/\d+/g,""),u=a.left.replace(/\d+/g,""),d=a.bottom.replace(/\d+/g,""),g=a.right.replace(/\d+/g,""),p=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Padding","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Use global padding","caledros-basic-blocks"),help:(0,t.__)("This option applies predefined padding to the right and left sides of the block, ensuring consistency across the entire site. To adjust this padding, navigate to the Layout section in the Full Site Editor.","caledros-basic-blocks"),checked:a.useGlobalPadding,onChange:e=>{o({buttonPadding:{...a,useGlobalPadding:e}})}}),!a.useGlobalPadding&&(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Enable different paddings","caledros-basic-blocks"),checked:a.differentPaddingsEnabled,onChange:e=>{o({buttonPadding:{...a,differentPaddingsEnabled:e}})}}),!a.differentPaddingsEnabled&&!a.useGlobalPadding&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the padding (${c}) for the container`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,top:`${e}${c}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,top:`${p(e,n)}${e}`}})}})]}),a.differentPaddingsEnabled&&!a.useGlobalPadding&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the top padding (${c}) for the container`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,top:`${e}${c}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,top:`${p(e,n)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the right padding (${g}) for the container`,"caledros-basic-blocks"),value:b,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,right:`${e}${g}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,right:`${p(e,b)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the bottom padding (${d}) for the container`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,bottom:`${e}${d}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,bottom:`${p(e,i)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the left padding (${u}) for the container`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,left:`${e}${u}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,left:`${p(e,s)}${e}`}})}})]})]})]})}function N({attributes:e,setAttributes:o}){const{buttonLetterSpacing:a}=e,[n,i]=(0,s.useState)("normal"===a),b=a.replace(/[\d.]+/g,"")||"px",c=["px","em","rem"].includes(b)?b:"px",u=e=>"px"===e?parseInt(a)||0:parseFloat(a)||0,d=(e,t)=>"px"!==e&&t>10?10:t;return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Letter spacing","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Use normal letter spacing","caledros-basic-blocks"),checked:n,onChange:()=>{const e=n?"0":"normal";i((e=>!e)),o({buttonLetterSpacing:`${e}${"normal"===e?"":c}`})}}),!n&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the custom letter spacing (${c}).`,"caledros-basic-blocks"),value:parseFloat(a)||0,max:"px"===c?50:10,min:0,step:"px"===c?1:.01,onChange:e=>{o({buttonLetterSpacing:`${d(c,e)}${c}`})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"}],onChange:e=>{o({buttonLetterSpacing:`${d(e,u(e))}${e}`})}})]})]})}function y({attributes:e,setAttributes:o}){const{buttonFontSize:a}=e,[b,c]=(0,n.useSettings)("typography.fontSizes","typography.defaultFontSizes"),u=b?.map((e=>({label:`${e.name} (${e.size})`,value:`var(--wp--preset--font-size--${e.slug})`}))),d=(0,i.select)("core/editor")?.getEditorSettings()?.__experimentalFeatures?.typography?.fontSizes,g=(e,t)=>e?.[t]?.map((e=>({label:`${e.name} (${e.size})`,value:`var(--wp--preset--font-size--${e.slug})`}))),p=g(d,"default"),x=g(d,"theme"),h=g(d,"custom"),_=[...c?[p]:[],x,...h&&0!==h?.length?[h]:[]].flat(),m=()=>d?[...p?.map((e=>e.value))||[],...x?.map((e=>e.value))||[],...h?.map((e=>e.value))||[]]:b?.map((e=>e.value)),v=a.replace(/[\d.]+/g,"")||"px",$=["px","em","rem","vw","vh"].includes(v)?v:"px",f=e=>"px"===e?parseInt(a)||0:parseFloat(a)||0,C=(e,t)=>["vw","vh"].includes(e)&&t>100?100:t,[j,S]=(0,s.useState)(!m().includes(a));return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Font size","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use custom font size",checked:j,onChange:()=>S((e=>!e))}),!j&&(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Select the font size.","caledros-basic-blocks"),value:m().includes(a)?a:"",options:[{disabled:!0,label:"Select an option",value:""},...d?_:u],onChange:e=>{o({buttonFontSize:e})}}),j&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the custom font size (${$}).`,"caledros-basic-blocks"),value:m().includes(a)?0:parseFloat(a),max:"vw"===$||"vh"===$?100:200,min:0,step:"px"===$?1:.01,onChange:e=>{o({buttonFontSize:`${C($,e)}${$}`})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:$,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"vh",value:"vh"}],onChange:e=>{o({buttonFontSize:`${C(e,f(e))}${e}`})}})]})]})}(0,e.registerBlockType)(o.UU,{icon:a.icon,edit:function({attributes:e,setAttributes:t}){const{buttonText:o,buttonLightColor:a,buttonDarkColor:s,buttonHoverLightColor:i,buttonHoverDarkColor:x,buttonTextLightColor:h,buttonTextDarkColor:_,buttonFontFamily:P,buttonFontWeight:M,buttonFontStyle:F,buttonFontSize:D,buttonLetterSpacing:H,buttonBorder:z,buttonMargin:A,buttonPadding:T}=e,O=(0,n.useBlockProps)({className:"cbb-button",style:{"--cbb-button-light-color":a,"--cbb-button-dark-color":s,"--cbb-button-hover-light-color":i,"--cbb-button-hover-dark-color":x,"--cbb-button-text-light-color":h,"--cbb-button-text-dark-color":_,...""!==P&&{fontFamily:`var(--wp--preset--font-family--${P})`},fontWeight:M,fontStyle:F,fontSize:D,..."normal"!==H&&{letterSpacing:H},..."0px"!==z.width&&"none"!==z.style&&("#00000000"!==z.lightColor||"#00000000"!==z.darkColor)&&{borderStyle:z.style},..."0px"!==z.width&&"none"!==z.style&&("#00000000"!==z.lightColor||"#00000000"!==z.darkColor)&&{borderWidth:z.width},..."0px"!==z.width&&"none"!==z.style&&"#00000000"!==z.lightColor&&{"--cbb-button-light-border-color":z.lightColor},..."0px"!==z.width&&"none"!==z.style&&"#00000000"!==z.darkColor&&{"--cbb-button-dark-border-color":z.darkColor},..."0px"!==z.radius&&"0%"!==z.radius&&{borderRadius:z.radius},margin:A.differentMarginsEnabled?`${A.top} ${A.right} ${A.bottom} ${A.left}`:`${A.top}`,padding:T.differentPaddingsEnabled?`${T.top} ${T.right} ${T.bottom} ${T.left}`:`${T.top}`}});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.InspectorControls,{children:(0,l.jsx)(r.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"content",title:"Content"},{name:"style",title:"Style"},{name:"additional",title:"Additional"}],children:o=>"content"===o.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(S,{attributes:e,setAttributes:t}),(0,l.jsx)(k,{attributes:e,setAttributes:t}),(0,l.jsx)(m,{attributes:e,setAttributes:t}),(0,l.jsx)(y,{attributes:e,setAttributes:t}),(0,l.jsx)(N,{attributes:e,setAttributes:t})]}):"style"===o.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(b,{attributes:e,setAttributes:t}),(0,l.jsx)(c,{attributes:e,setAttributes:t}),(0,l.jsx)(u,{attributes:e,setAttributes:t}),(0,l.jsx)(d,{attributes:e,setAttributes:t}),(0,l.jsx)(g,{attributes:e,setAttributes:t}),(0,l.jsx)(p,{attributes:e,setAttributes:t})]}):"additional"===o.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(C,{attributes:e,setAttributes:t}),(0,l.jsx)(j,{attributes:e,setAttributes:t}),(0,l.jsx)($,{attributes:e,setAttributes:t}),(0,l.jsx)(v,{attributes:e,setAttributes:t}),(0,l.jsx)(f,{attributes:e,setAttributes:t}),(0,l.jsx)(B,{attributes:e,setAttributes:t}),(0,l.jsx)(w,{attributes:e,setAttributes:t})]}):null})}),(0,l.jsx)("a",{...O,children:o})]})},save:function({attributes:e}){const{buttonText:t,buttonLink:o,buttonLightColor:a,buttonDarkColor:r,buttonHoverLightColor:s,buttonHoverDarkColor:i,buttonTextLightColor:b,buttonTextDarkColor:c,buttonFontFamily:u,buttonFontWeight:d,buttonFontStyle:g,buttonFontSize:p,buttonLetterSpacing:x,buttonBorder:h,buttonMargin:_,buttonPadding:m}=e,v=n.useBlockProps.save({className:"cbb-button",style:{"--cbb-button-light-color":a,"--cbb-button-dark-color":r,"--cbb-button-hover-light-color":s,"--cbb-button-hover-dark-color":i,"--cbb-button-text-light-color":b,"--cbb-button-text-dark-color":c,...""!==u&&{fontFamily:`var(--wp--preset--font-family--${u})`},fontWeight:d,fontStyle:g,fontSize:p,..."0px"!==h.width&&"none"!==h.style&&("#00000000"!==h.lightColor||"#00000000"!==h.darkColor)&&{borderStyle:h.style},..."0px"!==h.width&&"none"!==h.style&&("#00000000"!==h.lightColor||"#00000000"!==h.darkColor)&&{borderWidth:h.width},..."0px"!==h.width&&"none"!==h.style&&"#00000000"!==h.lightColor&&{"--cbb-button-light-border-color":h.lightColor},..."0px"!==h.width&&"none"!==h.style&&"#00000000"!==h.darkColor&&{"--cbb-button-dark-border-color":h.darkColor},..."0px"!==h.radius&&"0%"!==h.radius&&{borderRadius:h.radius},..."normal"!==x&&{letterSpacing:x},margin:_.differentMarginsEnabled?`${_.top} ${_.right} ${_.bottom} ${_.left}`:`${_.top}`,padding:m.differentPaddingsEnabled?`${m.top} ${m.right} ${m.bottom} ${m.left}`:`${m.top}`}});return(0,l.jsx)("a",{...v,href:o,children:t})}})}},o={};function l(e){var a=o[e];if(void 0!==a)return a.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,o,a,n)=>{if(!o){var r=1/0;for(c=0;c<e.length;c++){for(var[o,a,n]=e[c],s=!0,i=0;i<o.length;i++)(!1&n||r>=n)&&Object.keys(l.O).every((e=>l.O[e](o[i])))?o.splice(i--,1):(s=!1,n<r&&(r=n));if(s){e.splice(c--,1);var b=a();void 0!==b&&(t=b)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[o,a,n]},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={985:0,941:0};l.O.j=t=>0===e[t];var t=(t,o)=>{var a,n,[r,s,i]=o,b=0;if(r.some((t=>0!==e[t]))){for(a in s)l.o(s,a)&&(l.m[a]=s[a]);if(i)var c=i(l)}for(t&&t(o);b<r.length;b++)n=r[b],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(c)},o=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var a=l.O(void 0,[941],(()=>l(145)));a=l.O(a)})();
     1(()=>{"use strict";var e,t={145:()=>{const e=window.wp.blocks,t=window.wp.i18n,o=JSON.parse('{"UU":"caledros-basic-blocks/button"}'),l=window.ReactJSXRuntime,a={icon:(0,l.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,l.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,l.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,l.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,l.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,l.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,l.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,l.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,l.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,l.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,l.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,l.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},n=window.wp.blockEditor,r=window.wp.components,s=window.wp.element,i=window.wp.data;function b({attributes:e,setAttributes:o}){const{buttonLightColor:a}=e,[b,u]=(0,s.useState)("#00000000"===a),[c,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=c.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{u((e=>!e)),o({buttonLightColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonLightColor:e}),enableAlpha:!0,clearable:!1})]})}function u({attributes:e,setAttributes:o}){const{buttonDarkColor:a}=e,[b,u]=(0,s.useState)("#00000000"===a),[c,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=c.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{u((e=>!e)),o({buttonDarkColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonDarkColor:e}),enableAlpha:!0,clearable:!1})]})}function c({attributes:e,setAttributes:o}){const{buttonHoverLightColor:a}=e,[b,u]=(0,s.useState)("#00000000"===a),[c,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=c.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Hover color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{u((e=>!e)),o({buttonHoverLightColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonHoverLightColor:e}),enableAlpha:!0,clearable:!1})]})}function d({attributes:e,setAttributes:o}){const{buttonHoverDarkColor:a}=e,[b,u]=(0,s.useState)("#00000000"===a),[c,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=c.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Hover color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:b,onChange:()=>{u((e=>!e)),o({buttonHoverDarkColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonHoverDarkColor:e}),enableAlpha:!0,clearable:!1})]})}function g({attributes:e,setAttributes:o}){const{buttonTextLightColor:a}=e,[b,u]=(0,s.useState)("#00000000"===a),[c,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=c.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Text color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent color",checked:b,onChange:()=>{u((e=>!e)),o({buttonTextLightColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonTextLightColor:e}),enableAlpha:!0,clearable:!1})]})}function p({attributes:e,setAttributes:o}){const{buttonTextDarkColor:a}=e,[b,u]=(0,s.useState)("#00000000"===a),[c,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),g=c.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,i.select)("core/editor")?.getEditorSettings(),x=p?.__experimentalFeatures?.color?.palette,h=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=h(x,"default"),m=h(x,"theme"),v=h(x,"custom"),$=[...d?[_]:[],m,...v.colors?[v]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Text color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent color",checked:b,onChange:()=>{u((e=>!e)),o({buttonTextDarkColor:"#00000000"})}}),!b&&(0,l.jsx)(r.ColorPalette,{colors:x?$:g,value:a,onChange:e=>o({buttonTextDarkColor:e}),enableAlpha:!0,clearable:!1})]})}function x({attributes:e,setAttributes:o,registeredFonts:a,getAvailableFontStyles:n,getAvailableFontWeights:s,doesFontExist:i}){const{buttonFontFamily:b,buttonFontWeight:u,buttonFontStyle:c}=e,d=a?.theme?.map((e=>({label:e.name,value:e.slug})))||[],g=a?.custom?.map((e=>({label:e?.name,value:e?.slug})))||[],p=[{label:"Default",value:""},...0!==d.length?d:[],...g&&0!==g?.length?g:[]];return(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Select the font family.","caledros-basic-blocks"),value:b,options:p,onChange:e=>{const t=i(e)?n(e):[],l=t.includes(c)?c:t[0],a=i(e)?s(e,l):[],r=a.includes(u)?u:a[0];o({buttonFontFamily:e,...i(e)&&l!==c&&{buttonFontStyle:l},...i(e)&&r!==u&&{buttonFontWeight:r}})}})}function h({attributes:e,setAttributes:o,getAvailableFontWeights:a}){const{buttonFontFamily:n,buttonFontWeight:s,buttonFontStyle:i}=e,b=a(n,i)?.map((e=>({label:`${e}`,value:e})));return(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Select the font weight.","caledros-basic-blocks"),value:s,options:b||[{label:"100",value:100},{label:"200",value:200},{label:"300",value:300},{label:"400",value:400},{label:"500",value:500},{label:"600",value:600},{label:"700",value:700},{label:"800",value:800},{label:"900",value:900}],onChange:e=>{o({buttonFontWeight:parseInt(e)})}})}function _({attributes:e,setAttributes:o,getAvailableFontStyles:a,getAvailableFontWeights:n,doesFontExist:s}){const{buttonFontFamily:i,buttonFontStyle:b,buttonFontWeight:u}=e,c=a(i)?.map((e=>({label:`${e[0].toUpperCase()}${e.slice(1)}`,value:`${e}`})));return(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Select the font style.","caledros-basic-blocks"),value:b,options:0===c.length?[{label:"Normal",value:"normal"},{label:"Italic",value:"italic"}]:c,onChange:e=>{const t=s(i)?n(i,e):[],l=t.includes(u)?u:t[0];o({buttonFontStyle:e,...s(i)&&u!==l&&{buttonFontWeight:l}})}})}function m({attributes:e,setAttributes:o}){const[a]=(0,n.useSettings)("typography.fontFamilies"),{theme:s=[],custom:i=[]}=a||{},b=[...s,...i],u=e=>b.some((t=>t?.slug===e)),c=e=>{const t=b.find((t=>t?.slug===e)),o=t?.fontFace?.map((e=>e?.fontStyle))||[];return[...new Set(o)]},d=(e,t)=>{const o=b.find((t=>t?.slug===e)),l=o?.fontFace?.filter((e=>e?.fontStyle===t)),a=l?.map((e=>{if(e?.fontWeight?.includes(" ")){const[t,o]=e?.fontWeight.split(" ").map((e=>parseInt(e))),l=[];for(let e=t;e<=o;e+=100)l.push(e);return l}return parseInt(e?.fontWeight)})).flat().sort(((e,t)=>e-t));return a};return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Typography","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(x,{attributes:e,setAttributes:o,registeredFonts:a,getAvailableFontStyles:c,getAvailableFontWeights:d,doesFontExist:u}),(0,l.jsx)(_,{attributes:e,setAttributes:o,getAvailableFontStyles:c,getAvailableFontWeights:d,doesFontExist:u}),(0,l.jsx)(h,{attributes:e,setAttributes:o,getAvailableFontWeights:d})]})}function v({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,b=a.darkColor.split(" "),u=b[0]||"#000",c=b[1]||"#000",d=b[2]||"#000",g=b[3]||"#000",[p,x]=(0,s.useState)(!!a.darkColor.includes(" ")),[h,_]=(0,n.useSettings)("color.palette","color.defaultPalette"),m=h.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,i.select)("core/editor")?.getEditorSettings(),$=v?.__experimentalFeatures?.color?.palette,f=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),C=f($,"default"),j=f($,"theme"),S=f($,"custom"),k=[..._?[C]:[],j,...S.colors?[S]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:p,onChange:()=>{const e=!p;x(e),o(e?{buttonBorder:{...a,darkColor:"#000 #000 #000 #000"}}:{buttonBorder:{...a,darkColor:"#000"}})}}),!p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose the border color","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:a.darkColor,onChange:e=>o({buttonBorder:{...a,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:u,onChange:e=>{o({buttonBorder:{...a,darkColor:`${e||"#00000000"} ${c} ${d} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:c,onChange:e=>{o({buttonBorder:{...a,darkColor:`${u} ${e||"#00000000"} ${d} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:d,onChange:e=>{o({buttonBorder:{...a,darkColor:`${u} ${c} ${e||"#00000000"} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:g,onChange:e=>{o({buttonBorder:{...a,darkColor:`${u} ${c} ${d} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function $({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,b=a.lightColor.split(" "),u=b[0]||"#000",c=b[1]||"#000",d=b[2]||"#000",g=b[3]||"#000",[p,x]=(0,s.useState)(!!a.lightColor.includes(" ")),[h,_]=(0,n.useSettings)("color.palette","color.defaultPalette"),m=h.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,i.select)("core/editor")?.getEditorSettings(),$=v?.__experimentalFeatures?.color?.palette,f=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),C=f($,"default"),j=f($,"theme"),S=f($,"custom"),k=[..._?[C]:[],j,...S.colors?[S]:[]];return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:p,onChange:()=>{const e=!p;x(e),o(e?{buttonBorder:{...a,lightColor:"#000 #000 #000 #000"}}:{buttonBorder:{...a,lightColor:"#000"}})}}),!p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose the border color","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:a.lightColor,onChange:e=>o({buttonBorder:{...a,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:u,onChange:e=>{o({buttonBorder:{...a,lightColor:`${e||"#00000000"} ${c} ${d} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:c,onChange:e=>{o({buttonBorder:{...a,lightColor:`${u} ${e||"#00000000"} ${d} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:d,onChange:e=>{o({buttonBorder:{...a,lightColor:`${u} ${c} ${e||"#00000000"} ${g}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,t.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,l.jsx)(r.ColorPalette,{colors:$?k:m,value:g,onChange:e=>{o({buttonBorder:{...a,lightColor:`${u} ${c} ${d} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function f({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,n=a.radius.split(" "),i=parseInt(n[0])||0,b=parseInt(n[1])||0,u=parseInt(n[2])||0,c=parseInt(n[3])||0,d=a.radius.split(" "),g=d[0]?d[0].replace(/\d+/g,""):"px",p=d[1]?d[1].replace(/\d+/g,""):"px",x=d[2]?d[2].replace(/\d+/g,""):"px",h=d[3]?d[3].replace(/\d+/g,""):"px",[_,m]=(0,s.useState)(!!a.radius.includes(" ")),v=(e,t)=>"%"===e&&t>100?100:t;return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border radius","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border radiuses for each corner",checked:_,onChange:()=>{const e=!_;m(e),o(e?{buttonBorder:{...a,radius:"10px 10px 10px 10px"}}:{buttonBorder:{...a,radius:"10px"}})}}),!_&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the border radius (${g}) for the button.`,"caledros-basic-blocks"),value:parseInt(a.radius),max:"%"===g?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${e}${g}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${v(e,parseInt(a.radius))}${e}`}})}})]}),_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the top-left border radius (${g}).`,"caledros-basic-blocks"),value:i,max:"%"===g?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${e}${g} ${b}${p} ${u}${x} ${c}${h}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${v(e,i)}${e} ${b}${p} ${u}${x} ${c}${h}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the top-right border radius (${p}).`,"caledros-basic-blocks"),value:b,max:"%"===p?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${e}${p} ${u}${x} ${c}${h}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${v(e,b)}${e} ${u}${x} ${c}${h}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the bottom-right border radius (${x}).`,"caledros-basic-blocks"),value:u,max:"%"===x?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${b}${p} ${e}${x} ${c}${h}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:x,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${b}${p} ${v(e,u)}${e} ${c}${h}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)(`Please select the bottom-left border radius (${h}).`,"caledros-basic-blocks"),value:c,max:"%"===h?100:150,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${b}${p} ${u}${x} ${e}${h}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:h,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{o({buttonBorder:{...a,radius:`${i}${g} ${b}${p} ${u}${x} ${v(e,c)}${e}`}})}})]})]})]})}function C({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,n=a.style.split(" "),i=n[0]||"solid",b=n[1]||"none",u=n[2]||"none",c=n[3]||"none",[d,g]=(0,s.useState)(!!a.style.includes(" "));return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border style","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border styles for each side",checked:d,onChange:()=>{const e=!d;g(e),o(e?{buttonBorder:{...a,style:"solid none none none"}}:{buttonBorder:{...a,style:"solid"}})}}),!d&&(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the border style.","caledros-basic-blocks"),value:a.style,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:e}})}}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the style for the top border.","caledros-basic-blocks"),value:i,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:`${e} ${b} ${u} ${c}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the style for the right border.","caledros-basic-blocks"),value:b,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:`${i} ${e} ${u} ${c}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the style for the bottom border.","caledros-basic-blocks"),value:u,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:`${i} ${b} ${e} ${c}`}})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Choose the style for the left border.","caledros-basic-blocks"),value:c,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{o({buttonBorder:{...a,style:`${i} ${b} ${u} ${e}`}})}})]})]})}function j({attributes:e,setAttributes:o}){const{buttonBorder:a}=e,n=a.width.split(" "),i=parseInt(n[0])||0,b=parseInt(n[1])||0,u=parseInt(n[2])||0,c=parseInt(n[3])||0,[d,g]=(0,s.useState)(!!a.width.includes(" "));return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Border width","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border widths for each side",checked:d,onChange:()=>{const e=!d;g(e),o(e?{buttonBorder:{...a,width:"1px 1px 1px 1px"}}:{buttonBorder:{...a,width:"1px"}})}}),!d&&(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the border width (px) for the button.","caledros-basic-blocks"),value:parseInt(a.width),max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${e}px`}})}}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the top border width (px) for the button.","caledros-basic-blocks"),value:i,max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${e}px ${b}px ${u}px ${c}px`}})}}),(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the right border width (px) for the button.","caledros-basic-blocks"),value:b,max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${i}px ${e}px ${u}px ${c}px`}})}}),(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the bottom border width (px) for the button.","caledros-basic-blocks"),value:u,max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${i}px ${b}px ${e}px ${c}px`}})}}),(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Please select the left border width (px) for the button.","caledros-basic-blocks"),value:c,max:50,min:0,step:1,onChange:e=>{o({buttonBorder:{...a,width:`${i}px ${b}px ${u}px ${e}px`}})}})]})]})}function S({attributes:e,setAttributes:o}){const{buttonText:a}=e;return(0,l.jsx)(r.PanelBody,{title:(0,t.__)("Button text","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Type the text for the button.","caledros-basic-blocks"),value:a,onChange:e=>{o({buttonText:e})}})})}function k({attributes:e,setAttributes:o}){const{buttonLink:a}=e;return(0,l.jsx)(r.PanelBody,{title:(0,t.__)("Button link","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(r.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,t.__)("Paste the link for the button.","caledros-basic-blocks"),value:a,onChange:e=>{o({buttonLink:e})}})})}function B({attributes:e,setAttributes:o}){const{buttonMargin:a}=e,n=parseInt(a.top)||0,s=parseInt(a.left)||0,i=parseInt(a.bottom)||0,b=parseInt(a.right)||0,u=a.top.replace(/\d+/g,""),c=a.left.replace(/\d+/g,""),d=a.bottom.replace(/\d+/g,""),g=a.right.replace(/\d+/g,""),p=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Enable different margins","caledros-basic-blocks"),checked:a.differentMarginsEnabled,onChange:e=>{o({buttonMargin:{...a,differentMarginsEnabled:e}})}}),!a.differentMarginsEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the margin (${u}) for the button.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,top:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,top:`${p(e,n)}${e}`}})}})]}),a.differentMarginsEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the top margin (${u}) for the button.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,top:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,top:`${p(e,n)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the right margin (${g}) for the button.`,"caledros-basic-blocks"),value:b,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,right:`${"auto"===g?"":e}${g}`}})},disabled:"auto"===g}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,right:`${p(e,b)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the bottom margin (${d}) for the button.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,bottom:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,bottom:`${p(e,i)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the left margin (${c}) for the button.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{o({buttonMargin:{...a,left:`${"auto"===c?"":e}${c}`}})},disabled:"auto"===c}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({buttonMargin:{...a,left:`${p(e,s)}${e}`}})}})]})]})]})}function w({attributes:e,setAttributes:o}){const{buttonPadding:a}=e,n=parseInt(a.top)||0,s=parseInt(a.left)||0,i=parseInt(a.bottom)||0,b=parseInt(a.right)||0,u=a.top.replace(/\d+/g,""),c=a.left.replace(/\d+/g,""),d=a.bottom.replace(/\d+/g,""),g=a.right.replace(/\d+/g,""),p=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Padding","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Use global padding","caledros-basic-blocks"),help:(0,t.__)("This option applies predefined padding to the right and left sides of the block, ensuring consistency across the entire site. To adjust this padding, navigate to the Layout section in the Full Site Editor.","caledros-basic-blocks"),checked:a.useGlobalPadding,onChange:e=>{o({buttonPadding:{...a,useGlobalPadding:e}})}}),!a.useGlobalPadding&&(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Enable different paddings","caledros-basic-blocks"),checked:a.differentPaddingsEnabled,onChange:e=>{o({buttonPadding:{...a,differentPaddingsEnabled:e}})}}),!a.differentPaddingsEnabled&&!a.useGlobalPadding&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the padding (${u}) for the button`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,top:`${e}${u}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,top:`${p(e,n)}${e}`}})}})]}),a.differentPaddingsEnabled&&!a.useGlobalPadding&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the top padding (${u}) for the button`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,top:`${e}${u}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,top:`${p(e,n)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the right padding (${g}) for the button`,"caledros-basic-blocks"),value:b,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,right:`${e}${g}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,right:`${p(e,b)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the bottom padding (${d}) for the button`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,bottom:`${e}${d}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,bottom:`${p(e,i)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the left padding (${c}) for the button`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{o({buttonPadding:{...a,left:`${e}${c}`}})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{o({buttonPadding:{...a,left:`${p(e,s)}${e}`}})}})]})]})]})}function N({attributes:e,setAttributes:o}){const{buttonLetterSpacing:a}=e,[n,i]=(0,s.useState)("normal"===a),b=a.replace(/[\d.]+/g,"")||"px",u=["px","em","rem"].includes(b)?b:"px",c=e=>"px"===e?parseInt(a)||0:parseFloat(a)||0,d=(e,t)=>"px"!==e&&t>10?10:t;return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Letter spacing","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,t.__)("Use normal letter spacing","caledros-basic-blocks"),checked:n,onChange:()=>{const e=n?"0":"normal";i((e=>!e)),o({buttonLetterSpacing:`${e}${"normal"===e?"":u}`})}}),!n&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the custom letter spacing (${u}).`,"caledros-basic-blocks"),value:parseFloat(a)||0,max:"px"===u?50:10,min:0,step:"px"===u?1:.01,onChange:e=>{o({buttonLetterSpacing:`${d(u,e)}${u}`})}}),(0,l.jsx)(r.SelectControl,{__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"}],onChange:e=>{o({buttonLetterSpacing:`${d(e,c(e))}${e}`})}})]})]})}function y({attributes:e,setAttributes:o}){const{buttonFontSize:a}=e,[b,u]=(0,n.useSettings)("typography.fontSizes","typography.defaultFontSizes"),c=b?.map((e=>({label:`${e.name} (${e.size})`,value:`var(--wp--preset--font-size--${e.slug})`}))),d=(0,i.select)("core/editor")?.getEditorSettings()?.__experimentalFeatures?.typography?.fontSizes,g=(e,t)=>e?.[t]?.map((e=>({label:`${e.name} (${e.size})`,value:`var(--wp--preset--font-size--${e.slug})`}))),p=g(d,"default"),x=g(d,"theme"),h=g(d,"custom"),_=[...u?[p]:[],x,...h&&0!==h?.length?[h]:[]].flat(),m=()=>d?[...p?.map((e=>e.value))||[],...x?.map((e=>e.value))||[],...h?.map((e=>e.value))||[]]:b?.map((e=>e.value)),v=a.replace(/[\d.]+/g,"")||"px",$=["px","em","rem","vw","vh"].includes(v)?v:"px",f=e=>"px"===e?parseInt(a)||0:parseFloat(a)||0,C=(e,t)=>["vw","vh"].includes(e)&&t>100?100:t,[j,S]=(0,s.useState)(!m().includes(a));return(0,l.jsxs)(r.PanelBody,{title:(0,t.__)("Font size","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use custom font size",checked:j,onChange:()=>S((e=>!e))}),!j&&(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)("Select the font size.","caledros-basic-blocks"),value:m().includes(a)?a:"",options:[{disabled:!0,label:"Select an option",value:""},...d?_:c],onChange:e=>{o({buttonFontSize:e})}}),j&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,t.__)(`Please select the custom font size (${$}).`,"caledros-basic-blocks"),value:m().includes(a)?0:parseFloat(a),max:"vw"===$||"vh"===$?100:200,min:0,step:"px"===$?1:.01,onChange:e=>{o({buttonFontSize:`${C($,e)}${$}`})}}),(0,l.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:$,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"vh",value:"vh"}],onChange:e=>{o({buttonFontSize:`${C(e,f(e))}${e}`})}})]})]})}(0,e.registerBlockType)(o.UU,{icon:a.icon,edit:function({attributes:e,setAttributes:t}){const{buttonText:o,buttonLightColor:a,buttonDarkColor:s,buttonHoverLightColor:i,buttonHoverDarkColor:x,buttonTextLightColor:h,buttonTextDarkColor:_,buttonFontFamily:P,buttonFontWeight:M,buttonFontStyle:F,buttonFontSize:D,buttonLetterSpacing:H,buttonBorder:z,buttonMargin:A,buttonPadding:T}=e,O=(0,n.useBlockProps)({className:"cbb-button",style:{"--cbb-button-light-color":a,"--cbb-button-dark-color":s,"--cbb-button-hover-light-color":i,"--cbb-button-hover-dark-color":x,"--cbb-button-text-light-color":h,"--cbb-button-text-dark-color":_,...""!==P&&{fontFamily:`var(--wp--preset--font-family--${P})`},fontWeight:M,fontStyle:F,fontSize:D,..."normal"!==H&&{letterSpacing:H},..."0px"!==z.width&&"none"!==z.style&&("#00000000"!==z.lightColor||"#00000000"!==z.darkColor)&&{borderStyle:z.style},..."0px"!==z.width&&"none"!==z.style&&("#00000000"!==z.lightColor||"#00000000"!==z.darkColor)&&{borderWidth:z.width},..."0px"!==z.width&&"none"!==z.style&&"#00000000"!==z.lightColor&&{"--cbb-button-light-border-color":z.lightColor},..."0px"!==z.width&&"none"!==z.style&&"#00000000"!==z.darkColor&&{"--cbb-button-dark-border-color":z.darkColor},..."0px"!==z.radius&&"0%"!==z.radius&&{borderRadius:z.radius},margin:A.differentMarginsEnabled?`${A.top} ${A.right} ${A.bottom} ${A.left}`:`${A.top}`,padding:T.differentPaddingsEnabled?`${T.top} ${T.right} ${T.bottom} ${T.left}`:`${T.top}`}});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.InspectorControls,{children:(0,l.jsx)(r.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"content",title:"Content"},{name:"style",title:"Style"},{name:"additional",title:"Additional"}],children:o=>"content"===o.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(S,{attributes:e,setAttributes:t}),(0,l.jsx)(k,{attributes:e,setAttributes:t}),(0,l.jsx)(m,{attributes:e,setAttributes:t}),(0,l.jsx)(y,{attributes:e,setAttributes:t}),(0,l.jsx)(N,{attributes:e,setAttributes:t})]}):"style"===o.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(b,{attributes:e,setAttributes:t}),(0,l.jsx)(u,{attributes:e,setAttributes:t}),(0,l.jsx)(c,{attributes:e,setAttributes:t}),(0,l.jsx)(d,{attributes:e,setAttributes:t}),(0,l.jsx)(g,{attributes:e,setAttributes:t}),(0,l.jsx)(p,{attributes:e,setAttributes:t})]}):"additional"===o.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(C,{attributes:e,setAttributes:t}),(0,l.jsx)(j,{attributes:e,setAttributes:t}),(0,l.jsx)($,{attributes:e,setAttributes:t}),(0,l.jsx)(v,{attributes:e,setAttributes:t}),(0,l.jsx)(f,{attributes:e,setAttributes:t}),(0,l.jsx)(B,{attributes:e,setAttributes:t}),(0,l.jsx)(w,{attributes:e,setAttributes:t})]}):null})}),(0,l.jsx)("a",{...O,children:o})]})},save:function({attributes:e}){const{buttonText:t,buttonLink:o,buttonLightColor:a,buttonDarkColor:r,buttonHoverLightColor:s,buttonHoverDarkColor:i,buttonTextLightColor:b,buttonTextDarkColor:u,buttonFontFamily:c,buttonFontWeight:d,buttonFontStyle:g,buttonFontSize:p,buttonLetterSpacing:x,buttonBorder:h,buttonMargin:_,buttonPadding:m}=e,v=n.useBlockProps.save({className:"cbb-button",style:{"--cbb-button-light-color":a,"--cbb-button-dark-color":r,"--cbb-button-hover-light-color":s,"--cbb-button-hover-dark-color":i,"--cbb-button-text-light-color":b,"--cbb-button-text-dark-color":u,...""!==c&&{fontFamily:`var(--wp--preset--font-family--${c})`},fontWeight:d,fontStyle:g,fontSize:p,..."0px"!==h.width&&"none"!==h.style&&("#00000000"!==h.lightColor||"#00000000"!==h.darkColor)&&{borderStyle:h.style},..."0px"!==h.width&&"none"!==h.style&&("#00000000"!==h.lightColor||"#00000000"!==h.darkColor)&&{borderWidth:h.width},..."0px"!==h.width&&"none"!==h.style&&"#00000000"!==h.lightColor&&{"--cbb-button-light-border-color":h.lightColor},..."0px"!==h.width&&"none"!==h.style&&"#00000000"!==h.darkColor&&{"--cbb-button-dark-border-color":h.darkColor},..."0px"!==h.radius&&"0%"!==h.radius&&{borderRadius:h.radius},..."normal"!==x&&{letterSpacing:x},margin:_.differentMarginsEnabled?`${_.top} ${_.right} ${_.bottom} ${_.left}`:`${_.top}`,padding:m.differentPaddingsEnabled?`${m.top} ${m.right} ${m.bottom} ${m.left}`:`${m.top}`}});return(0,l.jsx)("a",{...v,href:o,children:t})}})}},o={};function l(e){var a=o[e];if(void 0!==a)return a.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,o,a,n)=>{if(!o){var r=1/0;for(u=0;u<e.length;u++){for(var[o,a,n]=e[u],s=!0,i=0;i<o.length;i++)(!1&n||r>=n)&&Object.keys(l.O).every((e=>l.O[e](o[i])))?o.splice(i--,1):(s=!1,n<r&&(r=n));if(s){e.splice(u--,1);var b=a();void 0!==b&&(t=b)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[o,a,n]},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={985:0,941:0};l.O.j=t=>0===e[t];var t=(t,o)=>{var a,n,[r,s,i]=o,b=0;if(r.some((t=>0!==e[t]))){for(a in s)l.o(s,a)&&(l.m[a]=s[a]);if(i)var u=i(l)}for(t&&t(o);b<r.length;b++)n=r[b],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(u)},o=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var a=l.O(void 0,[941],(()=>l(145)));a=l.O(a)})();
  • caledros-basic-blocks/trunk/build/blocks/desktop-menu-container/index.asset.php

    r3313530 r3321999  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '56c31cf590763437f218');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b1481eabdc1b41068c58');
  • caledros-basic-blocks/trunk/build/blocks/desktop-menu-container/index.js

    r3313530 r3321999  
    1 (()=>{"use strict";var e,t={7:()=>{const e=window.wp.blocks,t=JSON.parse('{"UU":"caledros-basic-blocks/desktop-menu-container"}'),a=window.wp.i18n,o=window.ReactJSXRuntime,l={icon:(0,o.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,o.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,o.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,o.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,o.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,o.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,o.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,o.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,o.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,o.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,o.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,o.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},n=window.wp.blockEditor,r=window.wp.components,s=window.wp.element;function i({attributes:e,setAttributes:t}){const{containerWidth:l}=e,i=l.replace(/\d+/g,"")||"px",c=["px","%","em","rem","vw"].includes(i)?i:"px",d=parseInt(l)||0,[b,u]=(0,s.useState)("100%"!==l&&"var(--wp--style--global--content-size)"!==l&&"var(--wp--style--global--wide-size)"!==l),g=(0,n.useSettings)("layout.contentSize","layout.wideSize")||[],[h="620px",x="1280px"]=g,p=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Maximum width","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use custom width",checked:b,onChange:()=>u((e=>!e))}),!b&&(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the max width for the container.","caledros-basic-blocks"),value:"100%"===l||"var(--wp--style--global--content-size)"===l||"var(--wp--style--global--wide-size)"===l?l:"",options:[{disabled:!0,label:"Select an option",value:""},{label:"Full width",value:"100%"},{label:`Content size (${h})`,value:"var(--wp--style--global--content-size)"},{label:`Wide size (${x})`,value:"var(--wp--style--global--wide-size)"}],onChange:e=>{t({containerWidth:e})}}),b&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the custom width (${c}) for the container.`,"caledros-basic-blocks"),value:"var(--wp--style--global--content-size)"===l||"var(--wp--style--global--wide-size)"===l?0:parseInt(l),max:"%"===c||"vw"===c?100:3e3,min:0,step:1,onChange:e=>{t({containerWidth:`${e}${c}`})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerWidth:`${p(e,d)}${e}`})}})]})]})}function c({attributes:e,setAttributes:t}){const{containerHeight:l}=e,n=l.replace(/\d+/g,"")||"px",s=e=>"px"===e?parseInt(l)||0:parseFloat(l)||0,i=(e,t)=>"vh"===e&&t>100?100:t;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the height (${n}) for the container. To ensure a consistent design, all direct child elements must have its minimum height set to zero.`,"caledros-basic-blocks"),value:s(n),max:"vh"===n?100:3e3,min:0,step:1,onChange:e=>t({containerHeight:`${e}${n}`})}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"}],onChange:e=>{t({containerHeight:`${i(e,s(e))}${e}`})}})]})})}function d({attributes:e,setAttributes:t}){const{containerBackgroundImage:l,containerBgImageFocalPoint:s}=e,i=()=>{t({containerBackgroundImage:{id:"",alt:"",url:""}})};return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Background image","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(n.MediaUploadCheck,{children:(0,o.jsx)(n.MediaUpload,{allowedTypes:["image"],value:l.id,render:({open:e})=>(0,o.jsxs)(o.Fragment,{children:[l.url&&(0,o.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,onChange:e=>{t({containerBgImageFocalPoint:e})},url:l.url,value:s}),(0,o.jsxs)("div",{style:{display:"flex",gap:"10px"},children:[(0,o.jsx)(r.Button,{variant:"primary",onClick:e,children:"Select image"}),(0,o.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Remove image"})]})]}),onSelect:e=>{t({containerBackgroundImage:{id:e.id,alt:e.alt,url:e.url}})}})})})}function b({attributes:e,setAttributes:t}){const{containerLightBackgroundGradient:l}=e,[n,i]=(0,s.useState)(""!==l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background gradient (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable background gradient","caledros-basic-blocks"),checked:n,onChange:()=>{i((e=>!e)),t({containerLightBackgroundGradient:""})}}),n&&(0,o.jsx)(r.CustomGradientPicker,{onChange:e=>{t({containerLightBackgroundGradient:e})},value:""===l?"linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))":l})]})}function u({attributes:e,setAttributes:t}){const{containerDarkBackgroundGradient:l}=e,[n,i]=(0,s.useState)(""!==l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background gradient (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable background gradient (dark mode)","caledros-basic-blocks"),checked:n,onChange:()=>{i((e=>!e)),t({containerDarkBackgroundGradient:""})}}),n&&(0,o.jsx)(r.CustomGradientPicker,{onChange:e=>{t({containerDarkBackgroundGradient:e})},value:""===l?"linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))":l})]})}const g=window.wp.data;function h({attributes:e,setAttributes:t}){const{containerDarkBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=p(x,"default"),m=p(x,"theme"),v=p(x,"custom"),f=[...b?[_]:[],m,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use transparent background.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({containerDarkBackgroundColor:"#00000000"})}}),!i&&(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({containerDarkBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})}function x({attributes:e,setAttributes:t}){const{containerLightBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=p(x,"default"),m=p(x,"theme"),v=p(x,"custom"),f=[...b?[_]:[],m,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:i,onChange:()=>{c((e=>!e)),t({containerLightBackgroundColor:"#00000000"})}}),!i&&(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({containerLightBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})}function p({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.style.split(" "),i=n[0]||"solid",c=n[1]||"none",d=n[2]||"none",b=n[3]||"none",[u,g]=(0,s.useState)(!!l.style.includes(" "));return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border style","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border styles for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{containerBorder:{...l,style:"solid none none none"}}:{containerBorder:{...l,style:"solid"}})}}),!u&&(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the border style.","caledros-basic-blocks"),value:l.style,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:e}})}}),u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the top border.","caledros-basic-blocks"),value:i,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${e} ${c} ${d} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the right border.","caledros-basic-blocks"),value:c,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${e} ${d} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the bottom border.","caledros-basic-blocks"),value:d,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${c} ${e} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the left border.","caledros-basic-blocks"),value:b,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${c} ${d} ${e}`}})}})]})]})}function _({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.width.split(" "),i=parseInt(n[0])||0,c=parseInt(n[1])||0,d=parseInt(n[2])||0,b=parseInt(n[3])||0,[u,g]=(0,s.useState)(!!l.width.includes(" "));return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border width","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border widths for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{containerBorder:{...l,width:"1px 1px 1px 1px"}}:{containerBorder:{...l,width:"1px"}})}}),!u&&(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the border width (px) for the container.","caledros-basic-blocks"),value:parseInt(l.width),max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${e}px`}})}}),u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the top border width (px) for the container.","caledros-basic-blocks"),value:i,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${e}px ${c}px ${d}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the right border width (px) for the container.","caledros-basic-blocks"),value:c,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${e}px ${d}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the bottom border width (px) for the container.","caledros-basic-blocks"),value:d,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${c}px ${e}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the left border width (px) for the container.","caledros-basic-blocks"),value:b,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${c}px ${d}px ${e}px`}})}})]})]})}function m({attributes:e,setAttributes:t}){const{containerBorder:l}=e,i=l.lightColor.split(" "),c=i[0]||"#000",d=i[1]||"#000",b=i[2]||"#000",u=i[3]||"#000",[h,x]=(0,s.useState)(!!l.lightColor.includes(" ")),[p,_]=(0,n.useSettings)("color.palette","color.defaultPalette"),m=p.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,g.select)("core/editor")?.getEditorSettings(),f=v?.__experimentalFeatures?.color?.palette,k=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),C=k(f,"default"),$=k(f,"theme"),j=k(f,"custom"),B=[..._?[C]:[],$,...j.colors?[j]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:h,onChange:()=>{const e=!h;x(e),t(e?{containerBorder:{...l,lightColor:"#000 #000 #000 #000"}}:{containerBorder:{...l,lightColor:"#000"}})}}),!h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:l.lightColor,onChange:e=>t({containerBorder:{...l,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:c,onChange:e=>{t({containerBorder:{...l,lightColor:`${e||"#00000000"} ${d} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:d,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:b,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${d} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:u,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${d} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function v({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.radius.split(" "),i=parseInt(n[0])||0,c=parseInt(n[1])||0,d=parseInt(n[2])||0,b=parseInt(n[3])||0,u=l.radius.split(" "),g=u[0]?u[0].replace(/\d+/g,""):"px",h=u[1]?u[1].replace(/\d+/g,""):"px",x=u[2]?u[2].replace(/\d+/g,""):"px",p=u[3]?u[3].replace(/\d+/g,""):"px",[_,m]=(0,s.useState)(!!l.radius.includes(" ")),v=(e,t)=>"%"===e&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border radius","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border radiuses for each corner",checked:_,onChange:()=>{const e=!_;m(e),t(e?{containerBorder:{...l,radius:"10px 10px 10px 10px"}}:{containerBorder:{...l,radius:"10px"}})}}),!_&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the border radius (${g}) for the container.`,"caledros-basic-blocks"),value:parseInt(l.radius),max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${e}${g}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${v(e,parseInt(l.radius))}${e}`}})}})]}),_&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-left border radius (${g}).`,"caledros-basic-blocks"),value:i,max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${e}${g} ${c}${h} ${d}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${v(e,i)}${e} ${c}${h} ${d}${x} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-right border radius (${h}).`,"caledros-basic-blocks"),value:c,max:"%"===h?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${e}${h} ${d}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:h,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${v(e,c)}${e} ${d}${x} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-right border radius (${x}).`,"caledros-basic-blocks"),value:d,max:"%"===x?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${e}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${v(e,d)}${e} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-left border radius (${p}).`,"caledros-basic-blocks"),value:b,max:"%"===p?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${d}${x} ${e}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${d}${x} ${v(e,b)}${e}`}})}})]})]})]})}function f({attributes:e,setAttributes:t}){const{containerBoxShadow:l}=e,[s,i]=(0,n.useSettings)("color.palette","color.defaultPalette"),c=s.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),d=(0,g.select)("core/editor")?.getEditorSettings(),b=d?.__experimentalFeatures?.color?.palette,u=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),h=u(b,"default"),x=u(b,"theme"),p=u(b,"custom"),_=[...i?[h]:[],x,...p.colors?[p]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Box shadow","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable box shadow","caledros-basic-blocks"),checked:l.enabled,onChange:e=>{t({containerBoxShadow:{...l,enabled:e}})}}),l.enabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the box shadow.","caledros-basic-blocks"),value:""===l.style?"outline":"inset",options:[{label:"Outline",value:"outline"},{label:"Inset",value:"inset"}],onChange:e=>{t({containerBoxShadow:{...l,style:`${"outline"===e?"":e}`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the horizontal offset (px).","caledros-basic-blocks"),value:parseInt(l.hOffset),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,hOffset:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the vertical offset (px).","caledros-basic-blocks"),value:parseInt(l.vOffset),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,vOffset:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the blur (px).","caledros-basic-blocks"),value:parseInt(l.blur),max:100,min:0,step:1,onChange:e=>t({containerBoxShadow:{...l,blur:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the spread (px).","caledros-basic-blocks"),value:parseInt(l.spread),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,spread:`${e}px`}})}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow (light mode)","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:b?_:c,value:l.lightColor,onChange:e=>t({containerBoxShadow:{...l,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow (dark mode)","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:b?_:c,value:l.darkColor,onChange:e=>t({containerBoxShadow:{...l,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]})]})}function k({attributes:e,setAttributes:t}){const{containerMargin:l}=e,n=parseInt(l.top)||0,s=parseInt(l.left)||0,i=parseInt(l.bottom)||0,c=parseInt(l.right)||0,d=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),u=l.bottom.replace(/\d+/g,""),g=l.right.replace(/\d+/g,""),h=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different margins","caledros-basic-blocks"),checked:l.differentMarginsEnabled,onChange:e=>{t({containerMargin:{...l,differentMarginsEnabled:e}})}}),!l.differentMarginsEnabled&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the margin (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,top:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,top:`${h(e,n)}${e}`}})}})]}),l.differentMarginsEnabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top margin (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,top:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,top:`${h(e,n)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right margin (${g}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,right:`${"auto"===g?"":e}${g}`}})},disabled:"auto"===g}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,right:`${h(e,c)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom margin (${u}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,bottom:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,bottom:`${h(e,i)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left margin (${b}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,left:`${"auto"===b?"":e}${b}`}})},disabled:"auto"===b}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,left:`${h(e,s)}${e}`}})}})]})]})]})}function C({attributes:e,setAttributes:t}){const{containerPadding:l}=e,n=parseInt(l.top)||0,s=parseInt(l.left)||0,i=parseInt(l.bottom)||0,c=parseInt(l.right)||0,d=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),u=l.bottom.replace(/\d+/g,""),g=l.right.replace(/\d+/g,""),h=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Padding","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use global padding","caledros-basic-blocks"),help:(0,a.__)("This option applies predefined padding to the right and left sides of the block, ensuring consistency across the entire site. To adjust this padding, navigate to the Layout section in the Full Site Editor.","caledros-basic-blocks"),checked:l.useGlobalPadding,onChange:e=>{t({containerPadding:{...l,useGlobalPadding:e}})}}),!l.useGlobalPadding&&(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different paddings","caledros-basic-blocks"),checked:l.differentPaddingsEnabled,onChange:e=>{t({containerPadding:{...l,differentPaddingsEnabled:e}})}}),!l.differentPaddingsEnabled&&!l.useGlobalPadding&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the padding (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,top:`${e}${d}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,top:`${h(e,n)}${e}`}})}})]}),l.differentPaddingsEnabled&&!l.useGlobalPadding&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top padding (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,top:`${e}${d}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,top:`${h(e,n)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right padding (${g}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,right:`${e}${g}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,right:`${h(e,c)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom padding (${u}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,bottom:`${e}${u}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,bottom:`${h(e,i)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left padding (${b}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,left:`${e}${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,left:`${h(e,s)}${e}`}})}})]})]})]})}function $({attributes:e,setAttributes:t}){const{containerJustifyContent:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Justify content","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the justify content property.","caledros-basic-blocks"),value:l,options:[{label:"Flex start (default)",value:"flex-start"},{label:"Flex end",value:"flex-end"},{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Space evenly",value:"space-evenly"}],onChange:e=>{t({containerJustifyContent:e})}})})}function j({attributes:e,setAttributes:t}){const{containerAlignItems:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Align items","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the align items property.","caledros-basic-blocks"),value:l,options:[{label:"Flex start",value:"flex-start"},{label:"Flex end",value:"flex-end"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"},{label:"Baseline",value:"baseline"},{label:"Normal (default)",value:"normal"}],onChange:e=>{t({containerAlignItems:e})}})})}function B({attributes:e,setAttributes:t}){const{containerColumnGap:l}=e,[n,i]=(0,s.useState)("normal"===l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Column gap","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use normal column gap (default value)","caledros-basic-blocks"),checked:n,onChange:()=>{const e=n?"0":"normal";i((e=>!e)),t({containerColumnGap:e})}}),!n&&(0,o.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,a.__)("Please select the column gap (px) for the flex container.","caledros-basic-blocks"),value:isNaN(parseInt(l))?0:parseInt(l),max:200,min:0,step:1,onChange:e=>t({containerColumnGap:`${e}px`})})]})}function w({attributes:e,setAttributes:t}){const{containerOverflow:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overflow","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the overflow property.","caledros-basic-blocks"),value:l,options:[{label:"Visible (default)",value:"visible"},{label:"Hidden",value:"hidden"},{label:"Scroll",value:"scroll"},{label:"Auto",value:"auto"}],onChange:e=>{t({containerOverflow:e})}})})}function y({attributes:e,setAttributes:t}){const{stickyNavigationEnabled:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Sticky navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable sticky navigation","caledros-basic-blocks"),help:(0,a.__)("A sticky navigation bar will stick to the top of the screen while scrolling. The effect is only visible in the frontend, not in the editor.","caledros-basic-blocks"),checked:l,onChange:e=>t({stickyNavigationEnabled:e})})})}function S({attributes:e,setAttributes:t}){const{stickyNavHeight:l}=e,n=l.replace(/[\d.]+/g,"")||"px",s=e=>"px"===e?parseInt(l)||0:parseFloat(l)||0,i=(e,t)=>"vh"===e&&t>100?100:t;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the height (${n}) for the sticky navigation bar. This feature is only visible in the frontend.`,"caledros-basic-blocks"),value:s(n),max:"vh"===n?100:3e3,min:0,step:"px"===n?1:.01,onChange:e=>t({stickyNavHeight:`${e}${n}`})}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"}],onChange:e=>{t({stickyNavHeight:`${i(e,s(e))}${e}`})}})]})})}function N({attributes:e,setAttributes:t}){const{stickyNavLightBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=p(x,"default"),m=p(x,"theme"),v=p(x,"custom"),f=[...b?[_]:[],m,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",help:(0,a.__)("Enable this option to set a transparent background for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({stickyNavLightBackgroundColor:"#00000000"})}}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a custom background color for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({stickyNavLightBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})]})}function P({attributes:e,setAttributes:t}){const{stickyNavDarkBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=p(x,"default"),m=p(x,"theme"),v=p(x,"custom"),f=[...b?[_]:[],m,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",help:(0,a.__)("Enable this option to set a transparent background for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({stickyNavDarkBackgroundColor:"#00000000"})}}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a custom background color for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({stickyNavDarkBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})]})}function M({attributes:e,setAttributes:t}){const{containerBorder:l}=e,i=l.darkColor.split(" "),c=i[0]||"#000",d=i[1]||"#000",b=i[2]||"#000",u=i[3]||"#000",[h,x]=(0,s.useState)(!!l.darkColor.includes(" ")),[p,_]=(0,n.useSettings)("color.palette","color.defaultPalette"),m=p.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,g.select)("core/editor")?.getEditorSettings(),f=v?.__experimentalFeatures?.color?.palette,k=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),C=k(f,"default"),$=k(f,"theme"),j=k(f,"custom"),B=[..._?[C]:[],$,...j.colors?[j]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:h,onChange:()=>{const e=!h;x(e),t(e?{containerBorder:{...l,darkColor:"#000 #000 #000 #000"}}:{containerBorder:{...l,darkColor:"#000"}})}}),!h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:l.darkColor,onChange:e=>t({containerBorder:{...l,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:c,onChange:e=>{t({containerBorder:{...l,darkColor:`${e||"#00000000"} ${d} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:d,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:b,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${d} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:u,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${d} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function H({attributes:e,setAttributes:t}){const{centerStickyNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Center navigation bar","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Center navigation bar","caledros-basic-blocks"),help:(0,a.__)("Center the sticky navigation bar when the maximum width has a fixed value, or when it's less than 100%. For this option to work, the container's left and right margins must be set to 'auto'.","caledros-basic-blocks"),checked:l,onChange:e=>t({centerStickyNav:e})})})}function D({attributes:e,setAttributes:t}){const{overlayStickyNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overlay navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable overlay sticky navigation","caledros-basic-blocks"),help:(0,a.__)("This option transforms the sticky navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling.","caledros-basic-blocks"),checked:l,onChange:e=>t({overlayStickyNav:e})})})}function z({attributes:e,setAttributes:t}){const{overlayNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overlay navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable overlay navigation","caledros-basic-blocks"),help:(0,a.__)("This option transforms the navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling.","caledros-basic-blocks"),checked:l,onChange:e=>t({overlayNav:e})})})}(0,e.registerBlockType)(t.UU,{icon:l.icon,edit:function({attributes:e,setAttributes:t}){const{containerWidth:a,containerHeight:l,containerColumnGap:s,containerLightBackgroundColor:g,containerBackgroundImage:A,containerBgImageFocalPoint:O,containerLightBackgroundGradient:I,containerDarkBackgroundGradient:F,containerBorder:R,containerBoxShadow:T,containerMargin:E,containerPadding:G,containerJustifyContent:U,containerAlignItems:L,containerOverflow:W,containerDarkBackgroundColor:J}=e,V=(e,t,a)=>e||t?{[`--cbb-dm-${a}-bg-gradient`]:[t,e&&`url(${e})`].filter((e=>e)).join(", ")}:{},X=["cbb-desktop-menu-container",T.enabled&&"cbb-desktop-menu-container--has-box-shadow","0px"!==R.width&&"none"!==R.style&&("#00000000"!==R.lightColor||"#00000000"!==R.darkColor)&&"cbb-desktop-menu-container--has-border",(""!==I||""!==F||A.url)&&"cbb-desktop-menu-container--has-bg-gradient"].filter((e=>e)).join(" "),q=(0,n.useBlockProps)({className:`${X}`,style:{maxWidth:`${a}`,width:"100%",margin:E.differentMarginsEnabled?`${E.top} ${E.right} ${E.bottom} ${E.left}`:`${E.top}`,...G.useGlobalPadding?{"--cbb-dm-fc-padding":"0px var(--wp--style--root--padding-right, 0px) 0px var(--wp--style--root--padding-left, 0px)"}:{"--cbb-dm-fc-padding":G.differentPaddingsEnabled?`${G.top} ${G.right} ${G.bottom} ${G.left}`:`${G.top}`},"--cbb-dm-light-bg-color":g,"--cbb-dm-dark-bg-color":J,"--cbb-dm-just-content":U,"--cbb-dm-align-items":L,"--cbb-dm-height":l,"--cbb-dm-column-gap":s,...V(A.url,F,"dark"),...V(A.url,I,"light"),"--cbb-dm-bg-position":`${100*O.x}% ${100*O.y}%`,"--cbb-dm-br-style":"0px"===R.width||"none"===R.style||"#00000000"===R.lightColor&&"#00000000"===R.darkColor?"none":R.style,"--cbb-dm-br-width":"0px"===R.width||"none"===R.style||"#00000000"===R.lightColor&&"#00000000"===R.darkColor?"0px":R.width,"--cbb-dm-light-border-color":"0px"!==R.width&&"none"!==R.style&&"#00000000"!==R.lightColor?R.lightColor:"#00000000","--cbb-dm-dark-border-color":"0px"!==R.width&&"none"!==R.style&&"#00000000"!==R.darkColor?R.darkColor:"#00000000","--cbb-dm-br-radius":R.radius,"--cbb-dm-light-box-shadow":`${T.style} ${T.hOffset} ${T.vOffset} ${T.blur} ${T.spread} ${T.lightColor}`,"--cbb-dm-dark-box-shadow":`${T.style} ${T.hOffset} ${T.vOffset} ${T.blur} ${T.spread} ${T.darkColor}`,"--cbb-dm-overflow":W}});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsx)(r.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"layout",title:"Layout"},{name:"style",title:"Style"},{name:"sticky-navbar",title:"Sticky"}],children:a=>"layout"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i,{attributes:e,setAttributes:t}),(0,o.jsx)(c,{attributes:e,setAttributes:t}),(0,o.jsx)(B,{attributes:e,setAttributes:t}),(0,o.jsx)(k,{attributes:e,setAttributes:t}),(0,o.jsx)(C,{attributes:e,setAttributes:t}),(0,o.jsx)($,{attributes:e,setAttributes:t}),(0,o.jsx)(j,{attributes:e,setAttributes:t}),(0,o.jsx)(w,{attributes:e,setAttributes:t}),(0,o.jsx)(z,{attributes:e,setAttributes:t})]}):"style"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{attributes:e,setAttributes:t}),(0,o.jsx)(h,{attributes:e,setAttributes:t}),(0,o.jsx)(d,{attributes:e,setAttributes:t}),(0,o.jsx)(b,{attributes:e,setAttributes:t}),(0,o.jsx)(u,{attributes:e,setAttributes:t}),(0,o.jsx)(p,{attributes:e,setAttributes:t}),(0,o.jsx)(_,{attributes:e,setAttributes:t}),(0,o.jsx)(m,{attributes:e,setAttributes:t}),(0,o.jsx)(M,{attributes:e,setAttributes:t}),(0,o.jsx)(v,{attributes:e,setAttributes:t}),(0,o.jsx)(f,{attributes:e,setAttributes:t})]}):"sticky-navbar"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y,{attributes:e,setAttributes:t}),(0,o.jsx)(S,{attributes:e,setAttributes:t}),(0,o.jsx)(N,{attributes:e,setAttributes:t}),(0,o.jsx)(P,{attributes:e,setAttributes:t}),(0,o.jsx)(H,{attributes:e,setAttributes:t}),(0,o.jsx)(D,{attributes:e,setAttributes:t})]}):null})}),(0,o.jsx)("div",{...q,children:(0,o.jsx)(n.InnerBlocks,{})})]})},save:function({attributes:e}){const{containerWidth:t,containerHeight:a,containerColumnGap:l,containerLightBackgroundColor:r,containerDarkBackgroundColor:s,containerBackgroundImage:i,containerBgImageFocalPoint:c,containerLightBackgroundGradient:d,containerBorder:b,containerBoxShadow:u,containerMargin:g,containerPadding:h,containerJustifyContent:x,containerAlignItems:p,containerOverflow:_,stickyNavigationEnabled:m,stickyNavHeight:v,stickyNavLightBackgroundColor:f,stickyNavDarkBackgroundColor:k,containerDarkBackgroundGradient:C,centerStickyNav:$,overlayStickyNav:j,overlayNav:B}=e,w=(e,t,a)=>e||t?{[`--cbb-dm-${a}-bg-gradient`]:[t,e&&`url(${e})`].filter((e=>e)).join(", ")}:{},y=["cbb-desktop-menu-container",h.useGlobalPadding&&"has-global-padding",m&&"cbb-desktop-menu-container--sticky",u.enabled&&"cbb-desktop-menu-container--has-box-shadow",("#00000000"!==r||"#00000000"!==s)&&"cbb-desktop-menu-container--has-bg-color","0px"!==b.width&&"none"!==b.style&&("#00000000"!==b.lightColor||"#00000000"!==b.darkColor)&&"cbb-desktop-menu-container--has-border",(""!==d||""!==C)&&"cbb-desktop-menu-container--has-bg-gradient"].filter((e=>e)).join(" "),S=n.useBlockProps.save({className:`${y}`,style:{maxWidth:t,width:"100%",margin:g.differentMarginsEnabled?`${g.top} ${g.right} ${g.bottom} ${g.left}`:`${g.top}`,...!h.useGlobalPadding&&{padding:h.differentPaddingsEnabled?`${h.top} ${h.right} ${h.bottom} ${h.left}`:`${h.top}`},..."#00000000"!==r&&{"--cbb-dm-light-bg-color":r},..."#00000000"!==s&&{"--cbb-dm-dark-bg-color":s},..."flex-start"!==x&&{justifyContent:x},..."normal"!==p&&{alignItems:p},...0!==a&&{"--cbb-dm-height":a},..."normal"!==l&&{columnGap:l},...""!==d||""!==C?{...w(i.url,C,"dark"),...w(i.url,d,"light")}:{...i.url&&{backgroundImage:`url(${i.url})`}},...""!==i.url&&{backgroundPosition:`${100*c.x}% ${100*c.y}%`},..."0px"!==b.width&&"none"!==b.style&&("#00000000"!==b.lightColor||"#00000000"!==b.darkColor)&&{borderStyle:b.style},..."0px"!==b.width&&"none"!==b.style&&("#00000000"!==b.lightColor||"#00000000"!==b.darkColor)&&{borderWidth:b.width},..."0px"!==b.width&&"none"!==b.style&&"#00000000"!==b.lightColor&&{"--cbb-dm-light-border-color":b.lightColor},..."0px"!==b.width&&"none"!==b.style&&"#00000000"!==b.darkColor&&{"--cbb-dm-dark-border-color":b.darkColor},..."0px"!==b.radius&&"0%"!==b.radius&&{borderRadius:b.radius},...u.enabled&&{"--cbb-dm-light-box-shadow":`${u.style} ${u.hOffset} ${u.vOffset} ${u.blur} ${u.spread} ${u.lightColor}`},...u.enabled&&{"--cbb-dm-dark-box-shadow":`${u.style} ${u.hOffset} ${u.vOffset} ${u.blur} ${u.spread} ${u.darkColor}`},..."visible"!==_&&{overflow:_},...m&&0!==v&&{"--cbb-dm-sticky-height":v},...m&&{"--cbb-dm-sticky-light-bg-color":f},...m&&{"--cbb-dm-sticky-dark-bg-color":k},...$&&{left:0,right:0},...B?{"--cbb-dm-position":"absolute",left:0,right:0}:{"--cbb-dm-position":"relative"}}});return m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"cbb-desktop-menu-container__watcher"}),(0,o.jsx)("div",{...S,children:(0,o.jsx)(n.InnerBlocks.Content,{})}),(0,o.jsx)("div",{className:"cbb-desktop-menu-container__spacer-bottom",style:{"--cbb-spacer-bottom":`${j?"0px":a}`}})]}):(0,o.jsx)("div",{...S,children:(0,o.jsx)(n.InnerBlocks.Content,{})})}})}},a={};function o(e){var l=a[e];if(void 0!==l)return l.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,a,l,n)=>{if(!a){var r=1/0;for(d=0;d<e.length;d++){for(var[a,l,n]=e[d],s=!0,i=0;i<a.length;i++)(!1&n||r>=n)&&Object.keys(o.O).every((e=>o.O[e](a[i])))?a.splice(i--,1):(s=!1,n<r&&(r=n));if(s){e.splice(d--,1);var c=l();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,l,n]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={459:0,811:0};o.O.j=t=>0===e[t];var t=(t,a)=>{var l,n,[r,s,i]=a,c=0;if(r.some((t=>0!==e[t]))){for(l in s)o.o(s,l)&&(o.m[l]=s[l]);if(i)var d=i(o)}for(t&&t(a);c<r.length;c++)n=r[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},a=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var l=o.O(void 0,[811],(()=>o(7)));l=o.O(l)})();
     1(()=>{"use strict";var e,t={7:()=>{const e=window.wp.blocks,t=JSON.parse('{"UU":"caledros-basic-blocks/desktop-menu-container"}'),a=window.wp.i18n,o=window.ReactJSXRuntime,l={icon:(0,o.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,o.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,o.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,o.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,o.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,o.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,o.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,o.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,o.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,o.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,o.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,o.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},n=window.wp.blockEditor,r=window.wp.components,s=window.wp.element;function i({attributes:e,setAttributes:t}){const{containerWidth:l}=e,i=l.replace(/\d+/g,"")||"px",c=["px","%","em","rem","vw"].includes(i)?i:"px",d=parseInt(l)||0,[b,u]=(0,s.useState)("100%"!==l&&"var(--wp--style--global--content-size)"!==l&&"var(--wp--style--global--wide-size)"!==l),g=(0,n.useSettings)("layout.contentSize","layout.wideSize")||[],[h="620px",x="1280px"]=g,p=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Maximum width","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use custom width",checked:b,onChange:()=>u((e=>!e))}),!b&&(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the max width for the container.","caledros-basic-blocks"),value:"100%"===l||"var(--wp--style--global--content-size)"===l||"var(--wp--style--global--wide-size)"===l?l:"",options:[{disabled:!0,label:"Select an option",value:""},{label:"Full width",value:"100%"},{label:`Content size (${h})`,value:"var(--wp--style--global--content-size)"},{label:`Wide size (${x})`,value:"var(--wp--style--global--wide-size)"}],onChange:e=>{t({containerWidth:e})}}),b&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the custom width (${c}) for the container.`,"caledros-basic-blocks"),value:"var(--wp--style--global--content-size)"===l||"var(--wp--style--global--wide-size)"===l?0:parseInt(l),max:"%"===c||"vw"===c?100:3e3,min:0,step:1,onChange:e=>{t({containerWidth:`${e}${c}`})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerWidth:`${p(e,d)}${e}`})}})]})]})}function c({attributes:e,setAttributes:t}){const{containerHeight:l}=e,n=l.replace(/\d+/g,"")||"px",s=e=>"px"===e?parseInt(l)||0:parseFloat(l)||0,i=(e,t)=>"vh"===e&&t>100?100:t;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the height (${n}) for the container. To ensure a consistent design, all direct child elements must have its minimum height set to zero.`,"caledros-basic-blocks"),value:s(n),max:"vh"===n?100:3e3,min:0,step:1,onChange:e=>t({containerHeight:`${e}${n}`})}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"}],onChange:e=>{t({containerHeight:`${i(e,s(e))}${e}`})}})]})})}function d({attributes:e,setAttributes:t}){const{containerBackgroundImage:l,containerBgImageFocalPoint:s}=e,i=()=>{t({containerBackgroundImage:{id:"",alt:"",url:""}})};return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Background image","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(n.MediaUploadCheck,{children:(0,o.jsx)(n.MediaUpload,{allowedTypes:["image"],value:l.id,render:({open:e})=>(0,o.jsxs)(o.Fragment,{children:[l.url&&(0,o.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,onChange:e=>{t({containerBgImageFocalPoint:e})},url:l.url,value:s}),(0,o.jsxs)("div",{style:{display:"flex",gap:"10px"},children:[(0,o.jsx)(r.Button,{variant:"primary",onClick:e,children:"Select image"}),(0,o.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Remove image"})]})]}),onSelect:e=>{t({containerBackgroundImage:{id:e.id,alt:e.alt,url:e.url}})}})})})}function b({attributes:e,setAttributes:t}){const{containerLightBackgroundGradient:l}=e,[n,i]=(0,s.useState)(""!==l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background gradient (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable background gradient","caledros-basic-blocks"),checked:n,onChange:()=>{i((e=>!e)),t({containerLightBackgroundGradient:""})}}),n&&(0,o.jsx)(r.CustomGradientPicker,{onChange:e=>{t({containerLightBackgroundGradient:e})},value:""===l?"linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))":l})]})}function u({attributes:e,setAttributes:t}){const{containerDarkBackgroundGradient:l}=e,[n,i]=(0,s.useState)(""!==l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background gradient (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable background gradient (dark mode)","caledros-basic-blocks"),checked:n,onChange:()=>{i((e=>!e)),t({containerDarkBackgroundGradient:""})}}),n&&(0,o.jsx)(r.CustomGradientPicker,{onChange:e=>{t({containerDarkBackgroundGradient:e})},value:""===l?"linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))":l})]})}const g=window.wp.data;function h({attributes:e,setAttributes:t}){const{containerDarkBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=p(x,"default"),m=p(x,"theme"),v=p(x,"custom"),f=[...b?[_]:[],m,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use transparent background.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({containerDarkBackgroundColor:"#00000000"})}}),!i&&(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({containerDarkBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})}function x({attributes:e,setAttributes:t}){const{containerLightBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=p(x,"default"),m=p(x,"theme"),v=p(x,"custom"),f=[...b?[_]:[],m,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:i,onChange:()=>{c((e=>!e)),t({containerLightBackgroundColor:"#00000000"})}}),!i&&(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({containerLightBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})}function p({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.style.split(" "),i=n[0]||"solid",c=n[1]||"none",d=n[2]||"none",b=n[3]||"none",[u,g]=(0,s.useState)(!!l.style.includes(" "));return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border style","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border styles for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{containerBorder:{...l,style:"solid none none none"}}:{containerBorder:{...l,style:"solid"}})}}),!u&&(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the border style.","caledros-basic-blocks"),value:l.style,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:e}})}}),u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the top border.","caledros-basic-blocks"),value:i,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${e} ${c} ${d} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the right border.","caledros-basic-blocks"),value:c,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${e} ${d} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the bottom border.","caledros-basic-blocks"),value:d,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${c} ${e} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the left border.","caledros-basic-blocks"),value:b,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${c} ${d} ${e}`}})}})]})]})}function _({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.width.split(" "),i=parseInt(n[0])||0,c=parseInt(n[1])||0,d=parseInt(n[2])||0,b=parseInt(n[3])||0,[u,g]=(0,s.useState)(!!l.width.includes(" "));return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border width","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border widths for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{containerBorder:{...l,width:"1px 1px 1px 1px"}}:{containerBorder:{...l,width:"1px"}})}}),!u&&(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the border width (px) for the container.","caledros-basic-blocks"),value:parseInt(l.width),max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${e}px`}})}}),u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the top border width (px) for the container.","caledros-basic-blocks"),value:i,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${e}px ${c}px ${d}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the right border width (px) for the container.","caledros-basic-blocks"),value:c,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${e}px ${d}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the bottom border width (px) for the container.","caledros-basic-blocks"),value:d,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${c}px ${e}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the left border width (px) for the container.","caledros-basic-blocks"),value:b,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${c}px ${d}px ${e}px`}})}})]})]})}function m({attributes:e,setAttributes:t}){const{containerBorder:l}=e,i=l.lightColor.split(" "),c=i[0]||"#000",d=i[1]||"#000",b=i[2]||"#000",u=i[3]||"#000",[h,x]=(0,s.useState)(!!l.lightColor.includes(" ")),[p,_]=(0,n.useSettings)("color.palette","color.defaultPalette"),m=p.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,g.select)("core/editor")?.getEditorSettings(),f=v?.__experimentalFeatures?.color?.palette,k=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),C=k(f,"default"),$=k(f,"theme"),j=k(f,"custom"),B=[..._?[C]:[],$,...j.colors?[j]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:h,onChange:()=>{const e=!h;x(e),t(e?{containerBorder:{...l,lightColor:"#000 #000 #000 #000"}}:{containerBorder:{...l,lightColor:"#000"}})}}),!h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:l.lightColor,onChange:e=>t({containerBorder:{...l,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:c,onChange:e=>{t({containerBorder:{...l,lightColor:`${e||"#00000000"} ${d} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:d,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:b,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${d} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:u,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${d} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function v({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.radius.split(" "),i=parseInt(n[0])||0,c=parseInt(n[1])||0,d=parseInt(n[2])||0,b=parseInt(n[3])||0,u=l.radius.split(" "),g=u[0]?u[0].replace(/\d+/g,""):"px",h=u[1]?u[1].replace(/\d+/g,""):"px",x=u[2]?u[2].replace(/\d+/g,""):"px",p=u[3]?u[3].replace(/\d+/g,""):"px",[_,m]=(0,s.useState)(!!l.radius.includes(" ")),v=(e,t)=>"%"===e&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border radius","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border radiuses for each corner",checked:_,onChange:()=>{const e=!_;m(e),t(e?{containerBorder:{...l,radius:"10px 10px 10px 10px"}}:{containerBorder:{...l,radius:"10px"}})}}),!_&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the border radius (${g}) for the container.`,"caledros-basic-blocks"),value:parseInt(l.radius),max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${e}${g}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${v(e,parseInt(l.radius))}${e}`}})}})]}),_&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-left border radius (${g}).`,"caledros-basic-blocks"),value:i,max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${e}${g} ${c}${h} ${d}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${v(e,i)}${e} ${c}${h} ${d}${x} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-right border radius (${h}).`,"caledros-basic-blocks"),value:c,max:"%"===h?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${e}${h} ${d}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:h,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${v(e,c)}${e} ${d}${x} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-right border radius (${x}).`,"caledros-basic-blocks"),value:d,max:"%"===x?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${e}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${v(e,d)}${e} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-left border radius (${p}).`,"caledros-basic-blocks"),value:b,max:"%"===p?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${d}${x} ${e}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${d}${x} ${v(e,b)}${e}`}})}})]})]})]})}function f({attributes:e,setAttributes:t}){const{containerBoxShadow:l}=e,[s,i]=(0,n.useSettings)("color.palette","color.defaultPalette"),c=s.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),d=(0,g.select)("core/editor")?.getEditorSettings(),b=d?.__experimentalFeatures?.color?.palette,u=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),h=u(b,"default"),x=u(b,"theme"),p=u(b,"custom"),_=[...i?[h]:[],x,...p.colors?[p]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Box shadow","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable box shadow","caledros-basic-blocks"),checked:l.enabled,onChange:e=>{t({containerBoxShadow:{...l,enabled:e}})}}),l.enabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the box shadow.","caledros-basic-blocks"),value:""===l.style?"outline":"inset",options:[{label:"Outline",value:"outline"},{label:"Inset",value:"inset"}],onChange:e=>{t({containerBoxShadow:{...l,style:`${"outline"===e?"":e}`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the horizontal offset (px).","caledros-basic-blocks"),value:parseInt(l.hOffset),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,hOffset:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the vertical offset (px).","caledros-basic-blocks"),value:parseInt(l.vOffset),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,vOffset:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the blur (px).","caledros-basic-blocks"),value:parseInt(l.blur),max:100,min:0,step:1,onChange:e=>t({containerBoxShadow:{...l,blur:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the spread (px).","caledros-basic-blocks"),value:parseInt(l.spread),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,spread:`${e}px`}})}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow (light mode)","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:b?_:c,value:l.lightColor,onChange:e=>t({containerBoxShadow:{...l,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow (dark mode)","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:b?_:c,value:l.darkColor,onChange:e=>t({containerBoxShadow:{...l,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]})]})}function k({attributes:e,setAttributes:t}){const{containerMargin:l}=e,n=parseInt(l.top)||0,s=parseInt(l.left)||0,i=parseInt(l.bottom)||0,c=parseInt(l.right)||0,d=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),u=l.bottom.replace(/\d+/g,""),g=l.right.replace(/\d+/g,""),h=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different margins","caledros-basic-blocks"),checked:l.differentMarginsEnabled,onChange:e=>{t({containerMargin:{...l,differentMarginsEnabled:e}})}}),!l.differentMarginsEnabled&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the margin (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,top:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,top:`${h(e,n)}${e}`}})}})]}),l.differentMarginsEnabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top margin (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,top:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,top:`${h(e,n)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right margin (${g}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,right:`${"auto"===g?"":e}${g}`}})},disabled:"auto"===g}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,right:`${h(e,c)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom margin (${u}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,bottom:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,bottom:`${h(e,i)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left margin (${b}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,left:`${"auto"===b?"":e}${b}`}})},disabled:"auto"===b}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,left:`${h(e,s)}${e}`}})}})]})]})]})}function C({attributes:e,setAttributes:t}){const{containerPadding:l}=e,n=parseInt(l.top)||0,s=parseInt(l.left)||0,i=parseInt(l.bottom)||0,c=parseInt(l.right)||0,d=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),u=l.bottom.replace(/\d+/g,""),g=l.right.replace(/\d+/g,""),h=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Padding","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use global padding","caledros-basic-blocks"),help:(0,a.__)("This option applies predefined padding to the right and left sides of the block, ensuring consistency across the entire site. To adjust this padding, navigate to the Layout section in the Full Site Editor.","caledros-basic-blocks"),checked:l.useGlobalPadding,onChange:e=>{t({containerPadding:{...l,useGlobalPadding:e}})}}),!l.useGlobalPadding&&(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different paddings","caledros-basic-blocks"),checked:l.differentPaddingsEnabled,onChange:e=>{t({containerPadding:{...l,differentPaddingsEnabled:e}})}}),!l.differentPaddingsEnabled&&!l.useGlobalPadding&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the padding (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,top:`${e}${d}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,top:`${h(e,n)}${e}`}})}})]}),l.differentPaddingsEnabled&&!l.useGlobalPadding&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top padding (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,top:`${e}${d}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,top:`${h(e,n)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right padding (${g}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,right:`${e}${g}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,right:`${h(e,c)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom padding (${u}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,bottom:`${e}${u}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,bottom:`${h(e,i)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left padding (${b}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,left:`${e}${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,left:`${h(e,s)}${e}`}})}})]})]})]})}function $({attributes:e,setAttributes:t}){const{containerJustifyContent:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Justify content","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the justify content property.","caledros-basic-blocks"),value:l,options:[{label:"Flex start (default)",value:"flex-start"},{label:"Flex end",value:"flex-end"},{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Space evenly",value:"space-evenly"}],onChange:e=>{t({containerJustifyContent:e})}})})}function j({attributes:e,setAttributes:t}){const{containerAlignItems:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Align items","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the align items property.","caledros-basic-blocks"),value:l,options:[{label:"Flex start",value:"flex-start"},{label:"Flex end",value:"flex-end"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"},{label:"Baseline",value:"baseline"},{label:"Normal (default)",value:"normal"}],onChange:e=>{t({containerAlignItems:e})}})})}function B({attributes:e,setAttributes:t}){const{containerColumnGap:l}=e,[n,i]=(0,s.useState)("normal"===l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Column gap","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use normal column gap (default value)","caledros-basic-blocks"),checked:n,onChange:()=>{const e=n?"0":"normal";i((e=>!e)),t({containerColumnGap:e})}}),!n&&(0,o.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:(0,a.__)("Please select the column gap (px) for the flex container.","caledros-basic-blocks"),value:isNaN(parseInt(l))?0:parseInt(l),max:200,min:0,step:1,onChange:e=>t({containerColumnGap:`${e}px`})})]})}function w({attributes:e,setAttributes:t}){const{containerOverflow:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overflow","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the overflow property.","caledros-basic-blocks"),value:l,options:[{label:"Visible (default)",value:"visible"},{label:"Hidden",value:"hidden"},{label:"Scroll",value:"scroll"},{label:"Auto",value:"auto"}],onChange:e=>{t({containerOverflow:e})}})})}function y({attributes:e,setAttributes:t}){const{stickyNavigationEnabled:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Sticky navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable sticky navigation","caledros-basic-blocks"),help:(0,a.__)("A sticky navigation bar will stick to the top of the screen while scrolling. The effect is only visible in the frontend, not in the editor.","caledros-basic-blocks"),checked:l,onChange:e=>t({stickyNavigationEnabled:e})})})}function S({attributes:e,setAttributes:t}){const{stickyNavHeight:l}=e,n=l.replace(/[\d.]+/g,"")||"px",s=e=>"px"===e?parseInt(l)||0:parseFloat(l)||0,i=(e,t)=>"vh"===e&&t>100?100:t;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the height (${n}) for the sticky navigation bar. This feature is only visible in the frontend.`,"caledros-basic-blocks"),value:s(n),max:"vh"===n?100:3e3,min:0,step:"px"===n?1:.01,onChange:e=>t({stickyNavHeight:`${e}${n}`})}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"}],onChange:e=>{t({stickyNavHeight:`${i(e,s(e))}${e}`})}})]})})}function N({attributes:e,setAttributes:t}){const{stickyNavLightBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=p(x,"default"),m=p(x,"theme"),v=p(x,"custom"),f=[...b?[_]:[],m,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",help:(0,a.__)("Enable this option to set a transparent background for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({stickyNavLightBackgroundColor:"#00000000"})}}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a custom background color for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({stickyNavLightBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})]})}function P({attributes:e,setAttributes:t}){const{stickyNavDarkBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),_=p(x,"default"),m=p(x,"theme"),v=p(x,"custom"),f=[...b?[_]:[],m,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",help:(0,a.__)("Enable this option to set a transparent background for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({stickyNavDarkBackgroundColor:"#00000000"})}}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a custom background color for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({stickyNavDarkBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})]})}function M({attributes:e,setAttributes:t}){const{containerBorder:l}=e,i=l.darkColor.split(" "),c=i[0]||"#000",d=i[1]||"#000",b=i[2]||"#000",u=i[3]||"#000",[h,x]=(0,s.useState)(!!l.darkColor.includes(" ")),[p,_]=(0,n.useSettings)("color.palette","color.defaultPalette"),m=p.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,g.select)("core/editor")?.getEditorSettings(),f=v?.__experimentalFeatures?.color?.palette,k=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),C=k(f,"default"),$=k(f,"theme"),j=k(f,"custom"),B=[..._?[C]:[],$,...j.colors?[j]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:h,onChange:()=>{const e=!h;x(e),t(e?{containerBorder:{...l,darkColor:"#000 #000 #000 #000"}}:{containerBorder:{...l,darkColor:"#000"}})}}),!h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:l.darkColor,onChange:e=>t({containerBorder:{...l,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:c,onChange:e=>{t({containerBorder:{...l,darkColor:`${e||"#00000000"} ${d} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:d,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:b,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${d} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:m,value:u,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${d} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function H({attributes:e,setAttributes:t}){const{centerStickyNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Center navigation bar","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Center navigation bar","caledros-basic-blocks"),help:(0,a.__)("Center the sticky navigation bar when the maximum width has a fixed value, or when it's less than 100%. For this option to work, the container's left and right margins must be set to 'auto'.","caledros-basic-blocks"),checked:l,onChange:e=>t({centerStickyNav:e})})})}function D({attributes:e,setAttributes:t}){const{overlayStickyNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overlay navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable overlay sticky navigation","caledros-basic-blocks"),help:(0,a.__)("This option transforms the sticky navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling.","caledros-basic-blocks"),checked:l,onChange:e=>t({overlayStickyNav:e})})})}function z({attributes:e,setAttributes:t}){const{overlayNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overlay navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable overlay navigation","caledros-basic-blocks"),help:(0,a.__)("This option transforms the navigation bar into an overlay, allowing it to overlap the website's content.","caledros-basic-blocks"),checked:l,onChange:e=>t({overlayNav:e})})})}(0,e.registerBlockType)(t.UU,{icon:l.icon,edit:function({attributes:e,setAttributes:t}){const{containerWidth:a,containerHeight:l,containerColumnGap:s,containerLightBackgroundColor:g,containerBackgroundImage:A,containerBgImageFocalPoint:O,containerLightBackgroundGradient:I,containerDarkBackgroundGradient:F,containerBorder:R,containerBoxShadow:T,containerMargin:E,containerPadding:G,containerJustifyContent:U,containerAlignItems:L,containerOverflow:W,containerDarkBackgroundColor:J}=e,V=(e,t,a)=>e||t?{[`--cbb-dm-${a}-bg-gradient`]:[t,e&&`url(${e})`].filter((e=>e)).join(", ")}:{},X=["cbb-desktop-menu-container",T.enabled&&"cbb-desktop-menu-container--has-box-shadow","0px"!==R.width&&"none"!==R.style&&("#00000000"!==R.lightColor||"#00000000"!==R.darkColor)&&"cbb-desktop-menu-container--has-border",(""!==I||""!==F||A.url)&&"cbb-desktop-menu-container--has-bg-gradient"].filter((e=>e)).join(" "),q=(0,n.useBlockProps)({className:`${X}`,style:{maxWidth:`${a}`,width:"100%",margin:E.differentMarginsEnabled?`${E.top} ${E.right} ${E.bottom} ${E.left}`:`${E.top}`,...G.useGlobalPadding?{"--cbb-dm-fc-padding":"0px var(--wp--style--root--padding-right, 0px) 0px var(--wp--style--root--padding-left, 0px)"}:{"--cbb-dm-fc-padding":G.differentPaddingsEnabled?`${G.top} ${G.right} ${G.bottom} ${G.left}`:`${G.top}`},"--cbb-dm-light-bg-color":g,"--cbb-dm-dark-bg-color":J,"--cbb-dm-just-content":U,"--cbb-dm-align-items":L,"--cbb-dm-height":l,"--cbb-dm-column-gap":s,...V(A.url,F,"dark"),...V(A.url,I,"light"),"--cbb-dm-bg-position":`${100*O.x}% ${100*O.y}%`,"--cbb-dm-br-style":"0px"===R.width||"none"===R.style||"#00000000"===R.lightColor&&"#00000000"===R.darkColor?"none":R.style,"--cbb-dm-br-width":"0px"===R.width||"none"===R.style||"#00000000"===R.lightColor&&"#00000000"===R.darkColor?"0px":R.width,"--cbb-dm-light-border-color":"0px"!==R.width&&"none"!==R.style&&"#00000000"!==R.lightColor?R.lightColor:"#00000000","--cbb-dm-dark-border-color":"0px"!==R.width&&"none"!==R.style&&"#00000000"!==R.darkColor?R.darkColor:"#00000000","--cbb-dm-br-radius":R.radius,"--cbb-dm-light-box-shadow":`${T.style} ${T.hOffset} ${T.vOffset} ${T.blur} ${T.spread} ${T.lightColor}`,"--cbb-dm-dark-box-shadow":`${T.style} ${T.hOffset} ${T.vOffset} ${T.blur} ${T.spread} ${T.darkColor}`,"--cbb-dm-overflow":W}});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsx)(r.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"layout",title:"Layout"},{name:"style",title:"Style"},{name:"sticky-navbar",title:"Sticky"}],children:a=>"layout"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i,{attributes:e,setAttributes:t}),(0,o.jsx)(c,{attributes:e,setAttributes:t}),(0,o.jsx)(B,{attributes:e,setAttributes:t}),(0,o.jsx)(k,{attributes:e,setAttributes:t}),(0,o.jsx)(C,{attributes:e,setAttributes:t}),(0,o.jsx)($,{attributes:e,setAttributes:t}),(0,o.jsx)(j,{attributes:e,setAttributes:t}),(0,o.jsx)(w,{attributes:e,setAttributes:t}),(0,o.jsx)(z,{attributes:e,setAttributes:t})]}):"style"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{attributes:e,setAttributes:t}),(0,o.jsx)(h,{attributes:e,setAttributes:t}),(0,o.jsx)(d,{attributes:e,setAttributes:t}),(0,o.jsx)(b,{attributes:e,setAttributes:t}),(0,o.jsx)(u,{attributes:e,setAttributes:t}),(0,o.jsx)(p,{attributes:e,setAttributes:t}),(0,o.jsx)(_,{attributes:e,setAttributes:t}),(0,o.jsx)(m,{attributes:e,setAttributes:t}),(0,o.jsx)(M,{attributes:e,setAttributes:t}),(0,o.jsx)(v,{attributes:e,setAttributes:t}),(0,o.jsx)(f,{attributes:e,setAttributes:t})]}):"sticky-navbar"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y,{attributes:e,setAttributes:t}),(0,o.jsx)(S,{attributes:e,setAttributes:t}),(0,o.jsx)(N,{attributes:e,setAttributes:t}),(0,o.jsx)(P,{attributes:e,setAttributes:t}),(0,o.jsx)(H,{attributes:e,setAttributes:t}),(0,o.jsx)(D,{attributes:e,setAttributes:t})]}):null})}),(0,o.jsx)("div",{...q,children:(0,o.jsx)(n.InnerBlocks,{})})]})},save:function({attributes:e}){const{containerWidth:t,containerHeight:a,containerColumnGap:l,containerLightBackgroundColor:r,containerDarkBackgroundColor:s,containerBackgroundImage:i,containerBgImageFocalPoint:c,containerLightBackgroundGradient:d,containerBorder:b,containerBoxShadow:u,containerMargin:g,containerPadding:h,containerJustifyContent:x,containerAlignItems:p,containerOverflow:_,stickyNavigationEnabled:m,stickyNavHeight:v,stickyNavLightBackgroundColor:f,stickyNavDarkBackgroundColor:k,containerDarkBackgroundGradient:C,centerStickyNav:$,overlayStickyNav:j,overlayNav:B}=e,w=(e,t,a)=>e||t?{[`--cbb-dm-${a}-bg-gradient`]:[t,e&&`url(${e})`].filter((e=>e)).join(", ")}:{},y=["cbb-desktop-menu-container",h.useGlobalPadding&&"has-global-padding",m&&"cbb-desktop-menu-container--sticky",u.enabled&&"cbb-desktop-menu-container--has-box-shadow",("#00000000"!==r||"#00000000"!==s)&&"cbb-desktop-menu-container--has-bg-color","0px"!==b.width&&"none"!==b.style&&("#00000000"!==b.lightColor||"#00000000"!==b.darkColor)&&"cbb-desktop-menu-container--has-border",(""!==d||""!==C)&&"cbb-desktop-menu-container--has-bg-gradient"].filter((e=>e)).join(" "),S=n.useBlockProps.save({className:`${y}`,style:{maxWidth:t,width:"100%",margin:g.differentMarginsEnabled?`${g.top} ${g.right} ${g.bottom} ${g.left}`:`${g.top}`,...!h.useGlobalPadding&&{padding:h.differentPaddingsEnabled?`${h.top} ${h.right} ${h.bottom} ${h.left}`:`${h.top}`},..."#00000000"!==r&&{"--cbb-dm-light-bg-color":r},..."#00000000"!==s&&{"--cbb-dm-dark-bg-color":s},..."flex-start"!==x&&{justifyContent:x},..."normal"!==p&&{alignItems:p},...0!==a&&{"--cbb-dm-height":a},..."normal"!==l&&{columnGap:l},...""!==d||""!==C?{...w(i.url,C,"dark"),...w(i.url,d,"light")}:{...i.url&&{backgroundImage:`url(${i.url})`}},...""!==i.url&&{backgroundPosition:`${100*c.x}% ${100*c.y}%`},..."0px"!==b.width&&"none"!==b.style&&("#00000000"!==b.lightColor||"#00000000"!==b.darkColor)&&{borderStyle:b.style},..."0px"!==b.width&&"none"!==b.style&&("#00000000"!==b.lightColor||"#00000000"!==b.darkColor)&&{borderWidth:b.width},..."0px"!==b.width&&"none"!==b.style&&"#00000000"!==b.lightColor&&{"--cbb-dm-light-border-color":b.lightColor},..."0px"!==b.width&&"none"!==b.style&&"#00000000"!==b.darkColor&&{"--cbb-dm-dark-border-color":b.darkColor},..."0px"!==b.radius&&"0%"!==b.radius&&{borderRadius:b.radius},...u.enabled&&{"--cbb-dm-light-box-shadow":`${u.style} ${u.hOffset} ${u.vOffset} ${u.blur} ${u.spread} ${u.lightColor}`},...u.enabled&&{"--cbb-dm-dark-box-shadow":`${u.style} ${u.hOffset} ${u.vOffset} ${u.blur} ${u.spread} ${u.darkColor}`},..."visible"!==_&&{overflow:_},...m&&0!==v&&{"--cbb-dm-sticky-height":v},...m&&{"--cbb-dm-sticky-light-bg-color":f},...m&&{"--cbb-dm-sticky-dark-bg-color":k},...$&&{left:0,right:0},...B?{"--cbb-dm-position":"absolute",left:0,right:0}:{"--cbb-dm-position":"relative"}}});return m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"cbb-desktop-menu-container__watcher"}),(0,o.jsx)("div",{...S,children:(0,o.jsx)(n.InnerBlocks.Content,{})}),(0,o.jsx)("div",{className:"cbb-desktop-menu-container__spacer-bottom",style:{"--cbb-spacer-bottom":`${j?"0px":a}`}})]}):(0,o.jsx)("div",{...S,children:(0,o.jsx)(n.InnerBlocks.Content,{})})}})}},a={};function o(e){var l=a[e];if(void 0!==l)return l.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,a,l,n)=>{if(!a){var r=1/0;for(d=0;d<e.length;d++){for(var[a,l,n]=e[d],s=!0,i=0;i<a.length;i++)(!1&n||r>=n)&&Object.keys(o.O).every((e=>o.O[e](a[i])))?a.splice(i--,1):(s=!1,n<r&&(r=n));if(s){e.splice(d--,1);var c=l();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,l,n]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={459:0,811:0};o.O.j=t=>0===e[t];var t=(t,a)=>{var l,n,[r,s,i]=a,c=0;if(r.some((t=>0!==e[t]))){for(l in s)o.o(s,l)&&(o.m[l]=s[l]);if(i)var d=i(o)}for(t&&t(a);c<r.length;c++)n=r[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},a=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var l=o.O(void 0,[811],(()=>o(7)));l=o.O(l)})();
  • caledros-basic-blocks/trunk/build/blocks/image-gallery/index.asset.php

    r3313530 r3321999  
    1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'e567fc4c2af98d64a2c2');
     1<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '8d3293fc24506bdf5c59');
  • caledros-basic-blocks/trunk/build/blocks/image-gallery/index.js

    r3313530 r3321999  
    1 (()=>{"use strict";var e,t={44:(e,t,s)=>{const i=window.wp.blocks,a=JSON.parse('{"UU":"caledros-basic-blocks/image-gallery"}'),r=window.wp.i18n,n=window.wp.blockEditor,l=window.wp.components,o=window.React;function d(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function c(e,t){void 0===e&&(e={}),void 0===t&&(t={});const s=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>s.indexOf(e)<0)).forEach((s=>{void 0===e[s]?e[s]=t[s]:d(t[s])&&d(e[s])&&Object.keys(t[s]).length>0&&c(e[s],t[s])}))}const p={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function u(){const e="undefined"!=typeof document?document:{};return c(e,p),e}const m={document:p,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function f(){const e="undefined"!=typeof window?window:{};return c(e,m),e}function h(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function g(){return Date.now()}function v(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function b(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let i=1;i<arguments.length;i+=1){const a=i<0||arguments.length<=i?void 0:arguments[i];if(null!=a&&(s=a,!("undefined"!=typeof window&&void 0!==window.HTMLElement?s instanceof HTMLElement:s&&(1===s.nodeType||11===s.nodeType)))){const s=Object.keys(Object(a)).filter((e=>t.indexOf(e)<0));for(let t=0,i=s.length;t<i;t+=1){const i=s[t],r=Object.getOwnPropertyDescriptor(a,i);void 0!==r&&r.enumerable&&(v(e[i])&&v(a[i])?a[i].__swiper__?e[i]=a[i]:b(e[i],a[i]):!v(e[i])&&v(a[i])?(e[i]={},a[i].__swiper__?e[i]=a[i]:b(e[i],a[i])):e[i]=a[i])}}}var s;return e}function w(e,t,s){e.style.setProperty(t,s)}function y(e){let{swiper:t,targetPosition:s,side:i}=e;const a=f(),r=-t.translate;let n,l=null;const o=t.params.speed;t.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(t.cssModeFrameID);const d=s>r?"next":"prev",c=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,p=()=>{n=(new Date).getTime(),null===l&&(l=n);const e=Math.max(Math.min((n-l)/o,1),0),d=.5-Math.cos(e*Math.PI)/2;let u=r+d*(s-r);if(c(u,s)&&(u=s),t.wrapperEl.scrollTo({[i]:u}),c(u,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[i]:u})})),void a.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=a.requestAnimationFrame(p)};p()}function x(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function S(e,t){void 0===t&&(t="");const s=f(),i=[...e.children];return s.HTMLSlotElement&&e instanceof HTMLSlotElement&&i.push(...e.assignedElements()),t?i.filter((e=>e.matches(t))):i}function E(e){try{return void console.warn(e)}catch(e){}}function T(e,t){void 0===t&&(t=[]);const s=document.createElement(e);return s.classList.add(...Array.isArray(t)?t:function(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}(t)),s}function C(e,t){return f().getComputedStyle(e,null).getPropertyValue(t)}function M(e){let t,s=e;if(s){for(t=0;null!==(s=s.previousSibling);)1===s.nodeType&&(t+=1);return t}}function P(e,t){const s=[];let i=e.parentElement;for(;i;)t?i.matches(t)&&s.push(i):s.push(i),i=i.parentElement;return s}function _(e,t,s){const i=f();return s?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function k(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}let L,O,A;function I(){return L||(L=function(){const e=f(),t=u();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),L}function z(e){return void 0===e&&(e={}),O||(O=function(e){let{userAgent:t}=void 0===e?{}:e;const s=I(),i=f(),a=i.navigator.platform,r=t||i.navigator.userAgent,n={ios:!1,android:!1},l=i.screen.width,o=i.screen.height,d=r.match(/(Android);?[\s\/]+([\d.]+)?/);let c=r.match(/(iPad).*OS\s([\d_]+)/);const p=r.match(/(iPod)(.*OS\s([\d_]+))?/),u=!c&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===a;let h="MacIntel"===a;return!c&&h&&s.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${l}x${o}`)>=0&&(c=r.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),h=!1),d&&!m&&(n.os="android",n.android=!0),(c||u||p)&&(n.os="ios",n.ios=!0),n}(e)),O}function j(){return A||(A=function(){const e=f(),t=z();let s=!1;function i(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,i]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));s=e<16||16===e&&i<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=i();return{isSafari:s||r,needPerspectiveFix:s,need3dFix:r||a&&t.ios,isWebView:a}}()),A}var $={on(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const a=s?"unshift":"push";return e.split(" ").forEach((e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)})),i},once(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function a(){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];t.apply(i,r)}return a.__emitterProxy=t,i.on(e,a,s)},onAny(e,t){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof e)return s;const i=t?"unshift":"push";return s.eventsAnyListeners.indexOf(e)<0&&s.eventsAnyListeners[i](e),s},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf(e);return s>=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach(((i,a)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&s.eventsListeners[e].splice(a,1)}))})),s):s},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,s,i;for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];return"string"==typeof r[0]||Array.isArray(r[0])?(t=r[0],s=r.slice(1,r.length),i=e):(t=r[0].events,s=r[0].data,i=r[0].context||e),s.unshift(i),(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(i,[t,...s])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(i,s)}))})),e}};const N=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)},B=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)},D=(e,t)=>{if(!e||e.destroyed||!e.params)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){let t=s.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(s.shadowRoot?t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{s.shadowRoot&&(t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},G=(e,t)=>{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&&s.removeAttribute("loading")},F=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t<0)return;t=Math.min(t,s);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=a,r=[s-t];return r.push(...Array.from({length:t}).map(((e,t)=>s+i+t))),void e.slides.forEach(((t,s)=>{r.includes(t.column)&&G(e,s)}))}const r=a+i-1;if(e.params.rewind||e.params.loop)for(let i=a-t;i<=r+t;i+=1){const t=(i%s+s)%s;(t<a||t>r)&&G(e,t)}else for(let i=Math.max(a-t,0);i<=Math.min(r+t,s-1);i+=1)i!==a&&(i>r||i<a)&&G(e,i)};var H={updateSize:function(){const e=this;let t,s;const i=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i.clientWidth,s=void 0!==e.params.height&&null!==e.params.height?e.params.height:i.clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(C(i,"padding-left")||0,10)-parseInt(C(i,"padding-right")||0,10),s=s-parseInt(C(i,"padding-top")||0,10)-parseInt(C(i,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(s)&&(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t,s){return parseFloat(t.getPropertyValue(e.getDirectionLabel(s))||0)}const s=e.params,{wrapperEl:i,slidesEl:a,size:r,rtlTranslate:n,wrongRTL:l}=e,o=e.virtual&&s.virtual.enabled,d=o?e.virtual.slides.length:e.slides.length,c=S(a,`.${e.params.slideClass}, swiper-slide`),p=o?e.virtual.slides.length:c.length;let u=[];const m=[],f=[];let h=s.slidesOffsetBefore;"function"==typeof h&&(h=s.slidesOffsetBefore.call(e));let g=s.slidesOffsetAfter;"function"==typeof g&&(g=s.slidesOffsetAfter.call(e));const v=e.snapGrid.length,b=e.slidesGrid.length;let y=s.spaceBetween,x=-h,E=0,T=0;if(void 0===r)return;"string"==typeof y&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*r:"string"==typeof y&&(y=parseFloat(y)),e.virtualSize=-y,c.forEach((e=>{n?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),s.centeredSlides&&s.cssMode&&(w(i,"--swiper-centered-offset-before",""),w(i,"--swiper-centered-offset-after",""));const M=s.grid&&s.grid.rows>1&&e.grid;let P;M?e.grid.initSlides(c):e.grid&&e.grid.unsetSlides();const k="auto"===s.slidesPerView&&s.breakpoints&&Object.keys(s.breakpoints).filter((e=>void 0!==s.breakpoints[e].slidesPerView)).length>0;for(let i=0;i<p;i+=1){let a;if(P=0,c[i]&&(a=c[i]),M&&e.grid.updateSlide(i,a,c),!c[i]||"none"!==C(a,"display")){if("auto"===s.slidesPerView){k&&(c[i].style[e.getDirectionLabel("width")]="");const r=getComputedStyle(a),n=a.style.transform,l=a.style.webkitTransform;if(n&&(a.style.transform="none"),l&&(a.style.webkitTransform="none"),s.roundLengths)P=e.isHorizontal()?_(a,"width",!0):_(a,"height",!0);else{const e=t(r,"width"),s=t(r,"padding-left"),i=t(r,"padding-right"),n=t(r,"margin-left"),l=t(r,"margin-right"),o=r.getPropertyValue("box-sizing");if(o&&"border-box"===o)P=e+n+l;else{const{clientWidth:t,offsetWidth:r}=a;P=e+s+i+n+l+(r-t)}}n&&(a.style.transform=n),l&&(a.style.webkitTransform=l),s.roundLengths&&(P=Math.floor(P))}else P=(r-(s.slidesPerView-1)*y)/s.slidesPerView,s.roundLengths&&(P=Math.floor(P)),c[i]&&(c[i].style[e.getDirectionLabel("width")]=`${P}px`);c[i]&&(c[i].swiperSlideSize=P),f.push(P),s.centeredSlides?(x=x+P/2+E/2+y,0===E&&0!==i&&(x=x-r/2-y),0===i&&(x=x-r/2-y),Math.abs(x)<.001&&(x=0),s.roundLengths&&(x=Math.floor(x)),T%s.slidesPerGroup==0&&u.push(x),m.push(x)):(s.roundLengths&&(x=Math.floor(x)),(T-Math.min(e.params.slidesPerGroupSkip,T))%e.params.slidesPerGroup==0&&u.push(x),m.push(x),x=x+P+y),e.virtualSize+=P+y,E=P,T+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+g,n&&l&&("slide"===s.effect||"coverflow"===s.effect)&&(i.style.width=`${e.virtualSize+y}px`),s.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),M&&e.grid.updateWrapperSize(P,u),!s.centeredSlides){const t=[];for(let i=0;i<u.length;i+=1){let a=u[i];s.roundLengths&&(a=Math.floor(a)),u[i]<=e.virtualSize-r&&t.push(a)}u=t,Math.floor(e.virtualSize-r)-Math.floor(u[u.length-1])>1&&u.push(e.virtualSize-r)}if(o&&s.loop){const t=f[0]+y;if(s.slidesPerGroup>1){const i=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/s.slidesPerGroup),a=t*s.slidesPerGroup;for(let e=0;e<i;e+=1)u.push(u[u.length-1]+a)}for(let i=0;i<e.virtual.slidesBefore+e.virtual.slidesAfter;i+=1)1===s.slidesPerGroup&&u.push(u[u.length-1]+t),m.push(m[m.length-1]+t),e.virtualSize+=t}if(0===u.length&&(u=[0]),0!==y){const t=e.isHorizontal()&&n?"marginLeft":e.getDirectionLabel("marginRight");c.filter(((e,t)=>!(s.cssMode&&!s.loop)||t!==c.length-1)).forEach((e=>{e.style[t]=`${y}px`}))}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;f.forEach((t=>{e+=t+(y||0)})),e-=y;const t=e>r?e-r:0;u=u.map((e=>e<=0?-h:e>t?t+g:e))}if(s.centerInsufficientSlides){let e=0;f.forEach((t=>{e+=t+(y||0)})),e-=y;const t=(s.slidesOffsetBefore||0)+(s.slidesOffsetAfter||0);if(e+t<r){const s=(r-e-t)/2;u.forEach(((e,t)=>{u[t]=e-s})),m.forEach(((e,t)=>{m[t]=e+s}))}}if(Object.assign(e,{slides:c,snapGrid:u,slidesGrid:m,slidesSizesGrid:f}),s.centeredSlides&&s.cssMode&&!s.centeredSlidesBounds){w(i,"--swiper-centered-offset-before",-u[0]+"px"),w(i,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+s))}if(p!==d&&e.emit("slidesLengthChange"),u.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==b&&e.emit("slidesGridLengthChange"),s.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(o||s.cssMode||"slide"!==s.effect&&"fade"!==s.effect)){const t=`${s.containerModifierClass}backface-hidden`,i=e.el.classList.contains(t);p<=s.maxBackfaceHiddenSlides?i||e.el.classList.add(t):i&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,s=[],i=t.virtual&&t.params.virtual.enabled;let a,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const n=e=>i?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{s.push(e)}));else for(a=0;a<Math.ceil(t.params.slidesPerView);a+=1){const e=t.activeIndex+a;if(e>t.slides.length&&!i)break;s.push(n(e))}else s.push(n(t.activeIndex));for(a=0;a<s.length;a+=1)if(void 0!==s[a]){const e=s[a].offsetHeight;r=e>r?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-s-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,s=t.params,{slides:i,rtlTranslate:a,snapGrid:r}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let n=-e;a&&(n=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let l=s.spaceBetween;"string"==typeof l&&l.indexOf("%")>=0?l=parseFloat(l.replace("%",""))/100*t.size:"string"==typeof l&&(l=parseFloat(l));for(let e=0;e<i.length;e+=1){const o=i[e];let d=o.swiperSlideOffset;s.cssMode&&s.centeredSlides&&(d-=i[0].swiperSlideOffset);const c=(n+(s.centeredSlides?t.minTranslate():0)-d)/(o.swiperSlideSize+l),p=(n-r[0]+(s.centeredSlides?t.minTranslate():0)-d)/(o.swiperSlideSize+l),u=-(n-d),m=u+t.slidesSizesGrid[e],f=u>=0&&u<=t.size-t.slidesSizesGrid[e],h=u>=0&&u<t.size-1||m>1&&m<=t.size||u<=0&&m>=t.size;h&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(e)),N(o,h,s.slideVisibleClass),N(o,f,s.slideFullyVisibleClass),o.progress=a?-c:c,o.originalProgress=a?-p:p}},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:r,isEnd:n,progressLoop:l}=t;const o=r,d=n;if(0===i)a=0,r=!0,n=!0;else{a=(e-t.minTranslate())/i;const s=Math.abs(e-t.minTranslate())<1,l=Math.abs(e-t.maxTranslate())<1;r=s||a<=0,n=l||a>=1,s&&(a=0),l&&(a=1)}if(s.loop){const s=t.getSlideIndexByData(0),i=t.getSlideIndexByData(t.slides.length-1),a=t.slidesGrid[s],r=t.slidesGrid[i],n=t.slidesGrid[t.slidesGrid.length-1],o=Math.abs(e);l=o>=a?(o-a)/n:(o+n-r)/n,l>1&&(l-=1)}Object.assign(t,{progress:a,progressLoop:l,isBeginning:r,isEnd:n}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!d&&t.emit("reachEnd toEdge"),(o&&!r||d&&!n)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,slidesEl:i,activeIndex:a}=e,r=e.virtual&&s.virtual.enabled,n=e.grid&&s.grid&&s.grid.rows>1,l=e=>S(i,`.${s.slideClass}${e}, swiper-slide${e}`)[0];let o,d,c;if(r)if(s.loop){let t=a-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),o=l(`[data-swiper-slide-index="${t}"]`)}else o=l(`[data-swiper-slide-index="${a}"]`);else n?(o=t.find((e=>e.column===a)),c=t.find((e=>e.column===a+1)),d=t.find((e=>e.column===a-1))):o=t[a];o&&(n||(c=function(e,t){const s=[];for(;e.nextElementSibling;){const i=e.nextElementSibling;t?i.matches(t)&&s.push(i):s.push(i),e=i}return s}(o,`.${s.slideClass}, swiper-slide`)[0],s.loop&&!c&&(c=t[0]),d=function(e,t){const s=[];for(;e.previousElementSibling;){const i=e.previousElementSibling;t?i.matches(t)&&s.push(i):s.push(i),e=i}return s}(o,`.${s.slideClass}, swiper-slide`)[0],s.loop&&0===!d&&(d=t[t.length-1]))),t.forEach((e=>{B(e,e===o,s.slideActiveClass),B(e,e===c,s.slideNextClass),B(e,e===d,s.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{snapGrid:i,params:a,activeIndex:r,realIndex:n,snapIndex:l}=t;let o,d=e;const c=e=>{let s=e-t.virtual.slidesBefore;return s<0&&(s=t.virtual.slides.length+s),s>=t.virtual.slides.length&&(s-=t.virtual.slides.length),s};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:s}=e,i=e.rtlTranslate?e.translate:-e.translate;let a;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?i>=t[e]&&i<t[e+1]-(t[e+1]-t[e])/2?a=e:i>=t[e]&&i<t[e+1]&&(a=e+1):i>=t[e]&&(a=e);return s.normalizeSlideIndex&&(a<0||void 0===a)&&(a=0),a}(t)),i.indexOf(s)>=0)o=i.indexOf(s);else{const e=Math.min(a.slidesPerGroupSkip,d);o=e+Math.floor((d-e)/a.slidesPerGroup)}if(o>=i.length&&(o=i.length-1),d===r&&!t.params.loop)return void(o!==l&&(t.snapIndex=o,t.emit("snapIndexChange")));if(d===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=c(d));const p=t.grid&&a.grid&&a.grid.rows>1;let u;if(t.virtual&&a.virtual.enabled&&a.loop)u=c(d);else if(p){const e=t.slides.find((e=>e.column===d));let s=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(s)&&(s=Math.max(t.slides.indexOf(e),0)),u=Math.floor(s/a.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");u=e?parseInt(e,10):d}else u=d;Object.assign(t,{previousSnapIndex:l,snapIndex:o,previousRealIndex:n,realIndex:u,previousIndex:r,activeIndex:d}),t.initialized&&F(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(n!==u&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const s=this,i=s.params;let a=e.closest(`.${i.slideClass}, swiper-slide`);!a&&s.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!a&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(a=e)}));let r,n=!1;if(a)for(let e=0;e<s.slides.length;e+=1)if(s.slides[e]===a){n=!0,r=e;break}if(!a||!n)return s.clickedSlide=void 0,void(s.clickedIndex=void 0);s.clickedSlide=a,s.virtual&&s.params.virtual.enabled?s.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):s.clickedIndex=r,i.slideToClickedSlide&&void 0!==s.clickedIndex&&s.clickedIndex!==s.activeIndex&&s.slideToClickedSlide()}};function V(e){let{swiper:t,runCallbacks:s,direction:i,step:a}=e;const{activeIndex:r,previousIndex:n}=t;let l=i;if(l||(l=r>n?"next":r<n?"prev":"reset"),t.emit(`transition${a}`),s&&r!==n){if("reset"===l)return void t.emit(`slideResetTransition${a}`);t.emit(`slideChangeTransition${a}`),"next"===l?t.emit(`slideNextTransition${a}`):t.emit(`slidePrevTransition${a}`)}}var R={slideTo:function(e,t,s,i,a){void 0===e&&(e=0),void 0===s&&(s=!0),"string"==typeof e&&(e=parseInt(e,10));const r=this;let n=e;n<0&&(n=0);const{params:l,snapGrid:o,slidesGrid:d,previousIndex:c,activeIndex:p,rtlTranslate:u,wrapperEl:m,enabled:f}=r;if(!f&&!i&&!a||r.destroyed||r.animating&&l.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);const h=Math.min(r.params.slidesPerGroupSkip,n);let g=h+Math.floor((n-h)/r.params.slidesPerGroup);g>=o.length&&(g=o.length-1);const v=-o[g];if(l.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),s=Math.floor(100*d[e]),i=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=s&&t<i-(i-s)/2?n=e:t>=s&&t<i&&(n=e+1):t>=s&&(n=e)}if(r.initialized&&n!==p){if(!r.allowSlideNext&&(u?v>r.translate&&v>r.minTranslate():v<r.translate&&v<r.minTranslate()))return!1;if(!r.allowSlidePrev&&v>r.translate&&v>r.maxTranslate()&&(p||0)!==n)return!1}let b;n!==(c||0)&&s&&r.emit("beforeSlideChangeStart"),r.updateProgress(v),b=n>p?"next":n<p?"prev":"reset";const w=r.virtual&&r.params.virtual.enabled;if((!w||!a)&&(u&&-v===r.translate||!u&&v===r.translate))return r.updateActiveIndex(n),l.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==l.effect&&r.setTranslate(v),"reset"!==b&&(r.transitionStart(s,b),r.transitionEnd(s,b)),!1;if(l.cssMode){const e=r.isHorizontal(),s=u?v:-v;if(0===t)w&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),w&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{m[e?"scrollLeft":"scrollTop"]=s}))):m[e?"scrollLeft":"scrollTop"]=s,w&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}));else{if(!r.support.smoothScroll)return y({swiper:r,targetPosition:s,side:e?"left":"top"}),!0;m.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}const x=j().isSafari;return w&&!a&&x&&r.isElement&&r.virtual.update(!1,!1,n),r.setTransition(t),r.setTranslate(v),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(s,b),0===t?r.transitionEnd(s,b):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(s,b))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,i){void 0===e&&(e=0),void 0===s&&(s=!0),"string"==typeof e&&(e=parseInt(e,10));const a=this;if(a.destroyed)return;void 0===t&&(t=a.params.speed);const r=a.grid&&a.params.grid&&a.params.grid.rows>1;let n=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)n+=a.virtual.slidesBefore;else{let e;if(r){const t=n*a.params.grid.rows;e=a.slides.find((e=>1*e.getAttribute("data-swiper-slide-index")===t)).column}else e=a.getSlideIndexByData(n);const t=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:s}=a.params;let l=a.params.slidesPerView;"auto"===l?l=a.slidesPerViewDynamic():(l=Math.ceil(parseFloat(a.params.slidesPerView,10)),s&&l%2==0&&(l+=1));let o=t-e<l;if(s&&(o=o||e<Math.ceil(l/2)),i&&s&&"auto"!==a.params.slidesPerView&&!r&&(o=!1),o){const i=s?e<a.activeIndex?"prev":"next":e-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:i,slideTo:!0,activeSlideIndex:"next"===i?e+1:e-t+1,slideRealIndex:"next"===i?a.realIndex:void 0})}if(r){const e=n*a.params.grid.rows;n=a.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)).column}else n=a.getSlideIndexByData(n)}return requestAnimationFrame((()=>{a.slideTo(n,t,s,i)})),a},slideNext:function(e,t,s){void 0===t&&(t=!0);const i=this,{enabled:a,params:r,animating:n}=i;if(!a||i.destroyed)return i;void 0===e&&(e=i.params.speed);let l=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(l=Math.max(i.slidesPerViewDynamic("current",!0),1));const o=i.activeIndex<r.slidesPerGroupSkip?1:l,d=i.virtual&&r.virtual.enabled;if(r.loop){if(n&&!d&&r.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&r.cssMode)return requestAnimationFrame((()=>{i.slideTo(i.activeIndex+o,e,t,s)})),!0}return r.rewind&&i.isEnd?i.slideTo(0,e,t,s):i.slideTo(i.activeIndex+o,e,t,s)},slidePrev:function(e,t,s){void 0===t&&(t=!0);const i=this,{params:a,snapGrid:r,slidesGrid:n,rtlTranslate:l,enabled:o,animating:d}=i;if(!o||i.destroyed)return i;void 0===e&&(e=i.params.speed);const c=i.virtual&&a.virtual.enabled;if(a.loop){if(d&&!c&&a.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function p(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const u=p(l?i.translate:-i.translate),m=r.map((e=>p(e))),f=a.freeMode&&a.freeMode.enabled;let h=r[m.indexOf(u)-1];if(void 0===h&&(a.cssMode||f)){let e;r.forEach(((t,s)=>{u>=t&&(e=s)})),void 0!==e&&(h=f?r[e]:r[e>0?e-1:e])}let g=0;if(void 0!==h&&(g=n.indexOf(h),g<0&&(g=i.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(g=g-i.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&i.isBeginning){const a=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(a,e,t,s)}return a.loop&&0===i.activeIndex&&a.cssMode?(requestAnimationFrame((()=>{i.slideTo(g,e,t,s)})),!0):i.slideTo(g,e,t,s)},slideReset:function(e,t,s){void 0===t&&(t=!0);const i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,s)},slideToClosest:function(e,t,s,i){void 0===t&&(t=!0),void 0===i&&(i=.5);const a=this;if(a.destroyed)return;void 0===e&&(e=a.params.speed);let r=a.activeIndex;const n=Math.min(a.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/a.params.slidesPerGroup),o=a.rtlTranslate?a.translate:-a.translate;if(o>=a.snapGrid[l]){const e=a.snapGrid[l];o-e>(a.snapGrid[l+1]-e)*i&&(r+=a.params.slidesPerGroup)}else{const e=a.snapGrid[l-1];o-e<=(a.snapGrid[l]-e)*i&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,s)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:s}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,r=e.clickedIndex;const n=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;a=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?r<e.loopedSlides-i/2||r>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),r=e.getSlideIndex(S(s,`${n}[data-swiper-slide-index="${a}"]`)[0]),h((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-i?(e.loopFix(),r=e.getSlideIndex(S(s,`${n}[data-swiper-slide-index="${a}"]`)[0]),h((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}},q={loopCreate:function(e,t){const s=this,{params:i,slidesEl:a}=s;if(!i.loop||s.virtual&&s.params.virtual.enabled)return;const r=()=>{S(a,`.${i.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},n=s.grid&&i.grid&&i.grid.rows>1,l=i.slidesPerGroup*(n?i.grid.rows:1),o=s.slides.length%l!=0,d=n&&s.slides.length%i.grid.rows!=0,c=e=>{for(let t=0;t<e;t+=1){const e=s.isElement?T("swiper-slide",[i.slideBlankClass]):T("div",[i.slideClass,i.slideBlankClass]);s.slidesEl.append(e)}};o?(i.loopAddBlankSlides?(c(l-s.slides.length%l),s.recalcSlides(),s.updateSlides()):E("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),r()):d?(i.loopAddBlankSlides?(c(i.grid.rows-s.slides.length%i.grid.rows),s.recalcSlides(),s.updateSlides()):E("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),r()):r(),s.loopFix({slideRealIndex:e,direction:i.centeredSlides?void 0:"next",initial:t})},loopFix:function(e){let{slideRealIndex:t,slideTo:s=!0,direction:i,setTranslate:a,activeSlideIndex:r,initial:n,byController:l,byMousewheel:o}=void 0===e?{}:e;const d=this;if(!d.params.loop)return;d.emit("beforeLoopFix");const{slides:c,allowSlidePrev:p,allowSlideNext:u,slidesEl:m,params:f}=d,{centeredSlides:h,initialSlide:g}=f;if(d.allowSlidePrev=!0,d.allowSlideNext=!0,d.virtual&&f.virtual.enabled)return s&&(f.centeredSlides||0!==d.snapIndex?f.centeredSlides&&d.snapIndex<f.slidesPerView?d.slideTo(d.virtual.slides.length+d.snapIndex,0,!1,!0):d.snapIndex===d.snapGrid.length-1&&d.slideTo(d.virtual.slidesBefore,0,!1,!0):d.slideTo(d.virtual.slides.length,0,!1,!0)),d.allowSlidePrev=p,d.allowSlideNext=u,void d.emit("loopFix");let v=f.slidesPerView;"auto"===v?v=d.slidesPerViewDynamic():(v=Math.ceil(parseFloat(f.slidesPerView,10)),h&&v%2==0&&(v+=1));const b=f.slidesPerGroupAuto?v:f.slidesPerGroup;let w=b;w%b!=0&&(w+=b-w%b),w+=f.loopAdditionalSlides,d.loopedSlides=w;const y=d.grid&&f.grid&&f.grid.rows>1;c.length<v+w||"cards"===d.params.effect&&c.length<v+2*w?E("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):y&&"row"===f.grid.fill&&E("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const x=[],S=[],T=y?Math.ceil(c.length/f.grid.rows):c.length,C=n&&T-g<v&&!h;let M=C?g:d.activeIndex;void 0===r?r=d.getSlideIndex(c.find((e=>e.classList.contains(f.slideActiveClass)))):M=r;const P="next"===i||!i,_="prev"===i||!i;let k=0,L=0;const O=(y?c[r].column:r)+(h&&void 0===a?-v/2+.5:0);if(O<w){k=Math.max(w-O,b);for(let e=0;e<w-O;e+=1){const t=e-Math.floor(e/T)*T;if(y){const e=T-t-1;for(let t=c.length-1;t>=0;t-=1)c[t].column===e&&x.push(t)}else x.push(T-t-1)}}else if(O+v>T-w){L=Math.max(O-(T-2*w),b),C&&(L=Math.max(L,v-T+g+1));for(let e=0;e<L;e+=1){const t=e-Math.floor(e/T)*T;y?c.forEach(((e,s)=>{e.column===t&&S.push(s)})):S.push(t)}}if(d.__preventObserver__=!0,requestAnimationFrame((()=>{d.__preventObserver__=!1})),"cards"===d.params.effect&&c.length<v+2*w&&(S.includes(r)&&S.splice(S.indexOf(r),1),x.includes(r)&&x.splice(x.indexOf(r),1)),_&&x.forEach((e=>{c[e].swiperLoopMoveDOM=!0,m.prepend(c[e]),c[e].swiperLoopMoveDOM=!1})),P&&S.forEach((e=>{c[e].swiperLoopMoveDOM=!0,m.append(c[e]),c[e].swiperLoopMoveDOM=!1})),d.recalcSlides(),"auto"===f.slidesPerView?d.updateSlides():y&&(x.length>0&&_||S.length>0&&P)&&d.slides.forEach(((e,t)=>{d.grid.updateSlide(t,e,d.slides)})),f.watchSlidesProgress&&d.updateSlidesOffset(),s)if(x.length>0&&_){if(void 0===t){const e=d.slidesGrid[M],t=d.slidesGrid[M+k]-e;o?d.setTranslate(d.translate-t):(d.slideTo(M+Math.ceil(k),0,!1,!0),a&&(d.touchEventsData.startTranslate=d.touchEventsData.startTranslate-t,d.touchEventsData.currentTranslate=d.touchEventsData.currentTranslate-t))}else if(a){const e=y?x.length/f.grid.rows:x.length;d.slideTo(d.activeIndex+e,0,!1,!0),d.touchEventsData.currentTranslate=d.translate}}else if(S.length>0&&P)if(void 0===t){const e=d.slidesGrid[M],t=d.slidesGrid[M-L]-e;o?d.setTranslate(d.translate-t):(d.slideTo(M-L,0,!1,!0),a&&(d.touchEventsData.startTranslate=d.touchEventsData.startTranslate-t,d.touchEventsData.currentTranslate=d.touchEventsData.currentTranslate-t))}else{const e=y?S.length/f.grid.rows:S.length;d.slideTo(d.activeIndex-e,0,!1,!0)}if(d.allowSlidePrev=p,d.allowSlideNext=u,d.controller&&d.controller.control&&!l){const e={slideRealIndex:t,direction:i,setTranslate:a,activeSlideIndex:r,byController:!0};Array.isArray(d.controller.control)?d.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&s})})):d.controller.control instanceof d.constructor&&d.controller.control.params.loop&&d.controller.control.loopFix({...e,slideTo:d.controller.control.params.slidesPerView===f.slidesPerView&&s})}d.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||!s||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const i=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),i.forEach((e=>{s.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function W(e,t,s){const i=f(),{params:a}=e,r=a.edgeSwipeDetection,n=a.edgeSwipeThreshold;return!r||!(s<=n||s>=i.innerWidth-n)||"prevent"===r&&(t.preventDefault(),!0)}function X(e){const t=this,s=u();let i=e;i.originalEvent&&(i=i.originalEvent);const a=t.touchEventsData;if("pointerdown"===i.type){if(null!==a.pointerId&&a.pointerId!==i.pointerId)return;a.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(a.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void W(t,i,i.targetTouches[0].pageX);const{params:r,touches:n,enabled:l}=t;if(!l)return;if(!r.simulateTouch&&"mouse"===i.pointerType)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let o=i.target;if("wrapper"===r.touchEventsTarget&&!function(e,t){const s=f();let i=t.contains(e);return!i&&s.HTMLSlotElement&&t instanceof HTMLSlotElement&&(i=[...t.assignedElements()].includes(e),i||(i=function(e,t){const s=[t];for(;s.length>0;){const t=s.shift();if(e===t)return!0;s.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t))),i}(o,t.wrapperEl))return;if("which"in i&&3===i.which)return;if("button"in i&&i.button>0)return;if(a.isTouched&&a.isMoved)return;const d=!!r.noSwipingClass&&""!==r.noSwipingClass,c=i.composedPath?i.composedPath():i.path;d&&i.target&&i.target.shadowRoot&&c&&(o=c[0]);const p=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,m=!(!i.target||!i.target.shadowRoot);if(r.noSwiping&&(m?function(e,t){return void 0===t&&(t=this),function t(s){if(!s||s===u()||s===f())return null;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest(e);return i||s.getRootNode?i||t(s.getRootNode().host):null}(t)}(p,o):o.closest(p)))return void(t.allowClick=!0);if(r.swipeHandler&&!o.closest(r.swipeHandler))return;n.currentX=i.pageX,n.currentY=i.pageY;const h=n.currentX,v=n.currentY;if(!W(t,i,h))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),n.startX=h,n.startY=v,a.touchStartTime=g(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);let b=!0;o.matches(a.focusableElements)&&(b=!1,"SELECT"===o.nodeName&&(a.isTouched=!1)),s.activeElement&&s.activeElement.matches(a.focusableElements)&&s.activeElement!==o&&("mouse"===i.pointerType||"mouse"!==i.pointerType&&!o.matches(a.focusableElements))&&s.activeElement.blur();const w=b&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!w||o.isContentEditable||i.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}function Y(e){const t=u(),s=this,i=s.touchEventsData,{params:a,touches:r,rtlTranslate:n,enabled:l}=s;if(!l)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let o,d=e;if(d.originalEvent&&(d=d.originalEvent),"pointermove"===d.type){if(null!==i.touchId)return;if(d.pointerId!==i.pointerId)return}if("touchmove"===d.type){if(o=[...d.changedTouches].find((e=>e.identifier===i.touchId)),!o||o.identifier!==i.touchId)return}else o=d;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&s.emit("touchMoveOpposite",d));const c=o.pageX,p=o.pageY;if(d.preventedByNestedSwiper)return r.startX=c,void(r.startY=p);if(!s.allowTouchMove)return d.target.matches(i.focusableElements)||(s.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:c,startY:p,currentX:c,currentY:p}),i.touchStartTime=g()));if(a.touchReleaseOnEdges&&!a.loop)if(s.isVertical()){if(p<r.startY&&s.translate<=s.maxTranslate()||p>r.startY&&s.translate>=s.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else{if(n&&(c>r.startX&&-s.translate<=s.maxTranslate()||c<r.startX&&-s.translate>=s.minTranslate()))return;if(!n&&(c<r.startX&&s.translate<=s.maxTranslate()||c>r.startX&&s.translate>=s.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==d.target&&"mouse"!==d.pointerType&&t.activeElement.blur(),t.activeElement&&d.target===t.activeElement&&d.target.matches(i.focusableElements))return i.isMoved=!0,void(s.allowClick=!1);i.allowTouchCallbacks&&s.emit("touchMove",d),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=c,r.currentY=p;const m=r.currentX-r.startX,f=r.currentY-r.startY;if(s.params.threshold&&Math.sqrt(m**2+f**2)<s.params.threshold)return;if(void 0===i.isScrolling){let e;s.isHorizontal()&&r.currentY===r.startY||s.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:m*m+f*f>=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(m))/Math.PI,i.isScrolling=s.isHorizontal()?e>a.touchAngle:90-e>a.touchAngle)}if(i.isScrolling&&s.emit("touchMoveOpposite",d),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===d.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;s.allowClick=!1,!a.cssMode&&d.cancelable&&d.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&d.stopPropagation();let h=s.isHorizontal()?m:f,v=s.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(h=Math.abs(h)*(n?1:-1),v=Math.abs(v)*(n?1:-1)),r.diff=h,h*=a.touchRatio,n&&(h=-h,v=-v);const b=s.touchesDirection;s.swipeDirection=h>0?"prev":"next",s.touchesDirection=v>0?"prev":"next";const w=s.params.loop&&!a.cssMode,y="next"===s.touchesDirection&&s.allowSlideNext||"prev"===s.touchesDirection&&s.allowSlidePrev;if(!i.isMoved){if(w&&y&&s.loopFix({direction:s.swipeDirection}),i.startTranslate=s.getTranslate(),s.setTransition(0),s.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});s.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!a.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",d)}if((new Date).getTime(),!1!==a._loopSwapReset&&i.isMoved&&i.allowThresholdMove&&b!==s.touchesDirection&&w&&y&&Math.abs(h)>=1)return Object.assign(r,{startX:c,startY:p,currentX:c,currentY:p,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);s.emit("sliderMove",d),i.isMoved=!0,i.currentTranslate=h+i.startTranslate;let x=!0,S=a.resistanceRatio;if(a.touchReleaseOnEdges&&(S=0),h>0?(w&&y&&i.allowThresholdMove&&i.currentTranslate>(a.centeredSlides?s.minTranslate()-s.slidesSizesGrid[s.activeIndex+1]-("auto"!==a.slidesPerView&&s.slides.length-a.slidesPerView>=2?s.slidesSizesGrid[s.activeIndex+1]+s.params.spaceBetween:0)-s.params.spaceBetween:s.minTranslate())&&s.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>s.minTranslate()&&(x=!1,a.resistance&&(i.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+i.startTranslate+h)**S))):h<0&&(w&&y&&i.allowThresholdMove&&i.currentTranslate<(a.centeredSlides?s.maxTranslate()+s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween+("auto"!==a.slidesPerView&&s.slides.length-a.slidesPerView>=2?s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween:0):s.maxTranslate())&&s.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:s.slides.length-("auto"===a.slidesPerView?s.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),i.currentTranslate<s.maxTranslate()&&(x=!1,a.resistance&&(i.currentTranslate=s.maxTranslate()+1-(s.maxTranslate()-i.startTranslate-h)**S))),x&&(d.preventedByNestedSwiper=!0),!s.allowSlideNext&&"next"===s.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!s.allowSlidePrev&&"prev"===s.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),s.allowSlidePrev||s.allowSlideNext||(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(h)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=s.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&s.freeMode||a.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(i.currentTranslate),s.setTranslate(i.currentTranslate))}function U(e){const t=this,s=t.touchEventsData;let i,a=e;if(a.originalEvent&&(a=a.originalEvent),"touchend"===a.type||"touchcancel"===a.type){if(i=[...a.changedTouches].find((e=>e.identifier===s.touchId)),!i||i.identifier!==s.touchId)return}else{if(null!==s.touchId)return;if(a.pointerId!==s.pointerId)return;i=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)&&(!["pointercancel","contextmenu"].includes(a.type)||!t.browser.isSafari&&!t.browser.isWebView))return;s.pointerId=null,s.touchId=null;const{params:r,touches:n,rtlTranslate:l,slidesGrid:o,enabled:d}=t;if(!d)return;if(!r.simulateTouch&&"mouse"===a.pointerType)return;if(s.allowTouchCallbacks&&t.emit("touchEnd",a),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&r.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);r.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=g(),p=c-s.touchStartTime;if(t.allowClick){const e=a.path||a.composedPath&&a.composedPath();t.updateClickedSlide(e&&e[0]||a.target,e),t.emit("tap click",a),p<300&&c-s.lastClickTime<300&&t.emit("doubleTap doubleClick",a)}if(s.lastClickTime=g(),h((()=>{t.destroyed||(t.allowClick=!0)})),!s.isTouched||!s.isMoved||!t.swipeDirection||0===n.diff&&!s.loopSwapReset||s.currentTranslate===s.startTranslate&&!s.loopSwapReset)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let u;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,u=r.followFinger?l?t.translate:-t.translate:-s.currentTranslate,r.cssMode)return;if(r.freeMode&&r.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:u});const m=u>=-t.maxTranslate()&&!t.params.loop;let f=0,v=t.slidesSizesGrid[0];for(let e=0;e<o.length;e+=e<r.slidesPerGroupSkip?1:r.slidesPerGroup){const t=e<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==o[e+t]?(m||u>=o[e]&&u<o[e+t])&&(f=e,v=o[e+t]-o[e]):(m||u>=o[e])&&(f=e,v=o[o.length-1]-o[o.length-2])}let b=null,w=null;r.rewind&&(t.isBeginning?w=r.virtual&&r.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const y=(u-o[f])/v,x=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(p>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(y>=r.longSwipesRatio?t.slideTo(r.rewind&&t.isEnd?b:f+x):t.slideTo(f)),"prev"===t.swipeDirection&&(y>1-r.longSwipesRatio?t.slideTo(f+x):null!==w&&y<0&&Math.abs(y)>r.longSwipesRatio?t.slideTo(w):t.slideTo(f))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||a.target!==t.navigation.nextEl&&a.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(null!==b?b:f+x),"prev"===t.swipeDirection&&t.slideTo(null!==w?w:f)):a.target===t.navigation.nextEl?t.slideTo(f+x):t.slideTo(f)}}function K(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:a,snapGrid:r}=e,n=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const l=n&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||l?e.params.loop&&!n?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function J(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Z(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:i}=e;if(!i)return;let a;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();a=0===r?0:(e.translate-e.minTranslate())/r,a!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Q(e){const t=this;D(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function ee(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const te=(e,t)=>{const s=u(),{params:i,el:a,wrapperEl:r,device:n}=e,l=!!i.nested,o="on"===t?"addEventListener":"removeEventListener",d=t;a&&"string"!=typeof a&&(s[o]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:l}),a[o]("touchstart",e.onTouchStart,{passive:!1}),a[o]("pointerdown",e.onTouchStart,{passive:!1}),s[o]("touchmove",e.onTouchMove,{passive:!1,capture:l}),s[o]("pointermove",e.onTouchMove,{passive:!1,capture:l}),s[o]("touchend",e.onTouchEnd,{passive:!0}),s[o]("pointerup",e.onTouchEnd,{passive:!0}),s[o]("pointercancel",e.onTouchEnd,{passive:!0}),s[o]("touchcancel",e.onTouchEnd,{passive:!0}),s[o]("pointerout",e.onTouchEnd,{passive:!0}),s[o]("pointerleave",e.onTouchEnd,{passive:!0}),s[o]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&a[o]("click",e.onClick,!0),i.cssMode&&r[o]("scroll",e.onScroll),i.updateOnWindowResize?e[d](n.ios||n.android?"resize orientationchange observerUpdate":"resize observerUpdate",K,!0):e[d]("observerUpdate",K,!0),a[o]("load",e.onLoad,{capture:!0}))},se=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var ie={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function ae(e,t){return function(s){void 0===s&&(s={});const i=Object.keys(s)[0],a=s[i];"object"==typeof a&&null!==a?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in a?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),b(t,s)):b(t,s)):b(t,s)}}const re={eventsEmitter:$,update:H,translate:{getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:s,translate:i,wrapperEl:a}=this;if(t.virtualTranslate)return s?-i:i;if(t.cssMode)return i;let r=function(e,t){void 0===t&&(t="x");const s=f();let i,a,r;const n=function(e){const t=f();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(a=n.transform||n.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map((e=>e.replace(",","."))).join(", ")),r=new s.WebKitCSSMatrix("none"===a?"":a)):(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=r.toString().split(",")),"x"===t&&(a=s.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(a=s.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),a||0}(a,e);return r+=this.cssOverflowAdjustment(),s&&(r=-r),r||0},setTranslate:function(e,t){const s=this,{rtlTranslate:i,params:a,wrapperEl:r,progress:n}=s;let l,o=0,d=0;s.isHorizontal()?o=i?-e:e:d=e,a.roundLengths&&(o=Math.floor(o),d=Math.floor(d)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?o:d,a.cssMode?r[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-o:-d:a.virtualTranslate||(s.isHorizontal()?o-=s.cssOverflowAdjustment():d-=s.cssOverflowAdjustment(),r.style.transform=`translate3d(${o}px, ${d}px, 0px)`);const c=s.maxTranslate()-s.minTranslate();l=0===c?0:(e-s.minTranslate())/c,l!==n&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,s,i,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),void 0===i&&(i=!0);const r=this,{params:n,wrapperEl:l}=r;if(r.animating&&n.preventInteractionOnTransition)return!1;const o=r.minTranslate(),d=r.maxTranslate();let c;if(c=i&&e>o?o:i&&e<d?d:e,r.updateProgress(c),n.cssMode){const e=r.isHorizontal();if(0===t)l[e?"scrollLeft":"scrollTop"]=-c;else{if(!r.support.smoothScroll)return y({swiper:r,targetPosition:-c,side:e?"left":"top"}),!0;l.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(c),s&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(c),s&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,s&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){const s=this;s.params.cssMode||(s.wrapperEl.style.transitionDuration=`${e}ms`,s.wrapperEl.style.transitionDelay=0===e?"0ms":""),s.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const s=this,{params:i}=s;i.cssMode||(i.autoHeight&&s.updateAutoHeight(),V({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const s=this,{params:i}=s;s.animating=!1,i.cssMode||(s.setTransition(0),V({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:R,loop:q,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),s.style.cursor="move",s.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=X.bind(e),e.onTouchMove=Y.bind(e),e.onTouchEnd=U.bind(e),e.onDocumentTouchStart=ee.bind(e),t.cssMode&&(e.onScroll=Z.bind(e)),e.onClick=J.bind(e),e.onLoad=Q.bind(e),te(e,"on")},detachEvents:function(){te(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:i,el:a}=e,r=i.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const n=u(),l="window"!==i.breakpointsBase&&i.breakpointsBase?"container":i.breakpointsBase,o=["window","container"].includes(i.breakpointsBase)||!i.breakpointsBase?e.el:n.querySelector(i.breakpointsBase),d=e.getBreakpoint(r,l,o);if(!d||e.currentBreakpoint===d)return;const c=(d in r?r[d]:void 0)||e.originalParams,p=se(e,i),m=se(e,c),f=e.params.grabCursor,h=c.grabCursor,g=i.enabled;p&&!m?(a.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!p&&m&&(a.classList.add(`${i.containerModifierClass}grid`),(c.grid.fill&&"column"===c.grid.fill||!c.grid.fill&&"column"===i.grid.fill)&&a.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),f&&!h?e.unsetGrabCursor():!f&&h&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===c[t])return;const s=i[t]&&i[t].enabled,a=c[t]&&c[t].enabled;s&&!a&&e[t].disable(),!s&&a&&e[t].enable()}));const v=c.direction&&c.direction!==i.direction,w=i.loop&&(c.slidesPerView!==i.slidesPerView||v),y=i.loop;v&&s&&e.changeDirection(),b(e.params,c);const x=e.params.enabled,S=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),g&&!x?e.disable():!g&&x&&e.enable(),e.currentBreakpoint=d,e.emit("_beforeBreakpoint",c),s&&(w?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&S?(e.loopCreate(t),e.updateSlides()):y&&!S&&e.loopDestroy()),e.emit("breakpoint",c)},getBreakpoint:function(e,t,s){if(void 0===t&&(t="window"),!e||"container"===t&&!s)return;let i=!1;const a=f(),r="window"===t?a.innerHeight:s.clientHeight,n=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));n.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<n.length;e+=1){const{point:r,value:l}=n[e];"window"===t?a.matchMedia(`(min-width: ${l}px)`).matches&&(i=r):l<=s.clientWidth&&(i=r)}return i||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:i}=s;if(i){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:s,rtl:i,el:a,device:r}=e,n=function(e,t){const s=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((i=>{e[i]&&s.push(t+i)})):"string"==typeof e&&s.push(t+e)})),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:i},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...n),a.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}}},ne={};class le{constructor(){let e,t;for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?t=i[0]:[e,t]=i,t||(t={}),t=b({},t),e&&!t.el&&(t.el=e);const r=u();if(t.el&&"string"==typeof t.el&&r.querySelectorAll(t.el).length>1){const e=[];return r.querySelectorAll(t.el).forEach((s=>{const i=b({},t,{el:s});e.push(new le(i))})),e}const n=this;n.__swiper__=!0,n.support=I(),n.device=z({userAgent:t.userAgent}),n.browser=j(),n.eventsListeners={},n.eventsAnyListeners=[],n.modules=[...n.__modules__],t.modules&&Array.isArray(t.modules)&&n.modules.push(...t.modules);const l={};n.modules.forEach((e=>{e({params:t,swiper:n,extendParams:ae(t,l),on:n.on.bind(n),once:n.once.bind(n),off:n.off.bind(n),emit:n.emit.bind(n)})}));const o=b({},ie,l);return n.params=b({},o,ne,t),n.originalParams=b({},n.params),n.passedParams=b({},t),n.params&&n.params.on&&Object.keys(n.params.on).forEach((e=>{n.on(e,n.params.on[e])})),n.params&&n.params.onAny&&n.onAny(n.params.onAny),Object.assign(n,{enabled:n.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===n.params.direction,isVertical:()=>"vertical"===n.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:n.params.allowSlideNext,allowSlidePrev:n.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:n.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:n.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),n.emit("_swiper"),n.params.init&&n.init(),n}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:s}=this,i=M(S(t,`.${s.slideClass}, swiper-slide`)[0]);return M(e)-i}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)))}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=S(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const i=s.minTranslate(),a=(s.maxTranslate()-i)*e+i;s.translateTo(a,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((s=>{const i=e.getSlideClasses(s);t.push({slideEl:s,classNames:i}),e.emit("_slideClass",s,i)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:s,slides:i,slidesGrid:a,slidesSizesGrid:r,size:n,activeIndex:l}=this;let o=1;if("number"==typeof s.slidesPerView)return s.slidesPerView;if(s.centeredSlides){let e,t=i[l]?Math.ceil(i[l].swiperSlideSize):0;for(let s=l+1;s<i.length;s+=1)i[s]&&!e&&(t+=Math.ceil(i[s].swiperSlideSize),o+=1,t>n&&(e=!0));for(let s=l-1;s>=0;s-=1)i[s]&&!e&&(t+=i[s].swiperSlideSize,o+=1,t>n&&(e=!0))}else if("current"===e)for(let e=l+1;e<i.length;e+=1)(t?a[e]+r[e]-a[l]<n:a[e]-a[l]<n)&&(o+=1);else for(let e=l-1;e>=0;e-=1)a[l]-a[e]<n&&(o+=1);return o}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let a;if(s.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&D(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),s.freeMode&&s.freeMode.enabled&&!s.cssMode)i(),s.autoHeight&&e.updateAutoHeight();else{if(("auto"===s.slidesPerView||s.slidesPerView>1)&&e.isEnd&&!s.centeredSlides){const t=e.virtual&&s.virtual.enabled?e.virtual.slides:e.slides;a=e.slideTo(t.length-1,0,!1,!0)}else a=e.slideTo(e.activeIndex,0,!1,!0);a||i()}s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const s=this,i=s.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(s.el.classList.remove(`${s.params.containerModifierClass}${i}`),s.el.classList.add(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),s.emit("changeDirection"),t&&s.update()),s}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let s=e||t.params.el;if("string"==typeof s&&(s=document.querySelector(s)),!s)return!1;s.swiper=t,s.parentNode&&s.parentNode.host&&s.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=s&&s.shadowRoot&&s.shadowRoot.querySelector?s.shadowRoot.querySelector(i()):S(s,i())[0];return!a&&t.params.createElements&&(a=T("div",t.params.wrapperClass),s.append(a),S(s,`.${t.params.slideClass}`).forEach((e=>{a.append(e)}))),Object.assign(t,{el:s,wrapperEl:a,slidesEl:t.isElement&&!s.parentNode.host.slideSlots?s.parentNode.host:a,hostEl:t.isElement?s.parentNode.host:s,mounted:!0,rtl:"rtl"===s.dir.toLowerCase()||"rtl"===C(s,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===s.dir.toLowerCase()||"rtl"===C(s,"direction")),wrongRTL:"-webkit-box"===C(a,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach((e=>{e.complete?D(t,e):e.addEventListener("load",(e=>{D(t,e.target)}))})),F(t),t.initialized=!0,F(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const s=this,{params:i,el:a,wrapperEl:r,slides:n}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),i.loop&&s.loopDestroy(),t&&(s.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),n&&n.length&&n.forEach((e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((e=>{s.off(e)})),!1!==e&&(s.el&&"string"!=typeof s.el&&(s.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(s)),s.destroyed=!0),null}static extendDefaults(e){b(ne,e)}static get extendedDefaults(){return ne}static get defaults(){return ie}static installModule(e){le.prototype.__modules__||(le.prototype.__modules__=[]);const t=le.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>le.installModule(e))),le):(le.installModule(e),le)}}Object.keys(re).forEach((e=>{Object.keys(re[e]).forEach((t=>{le.prototype[t]=re[e][t]}))})),le.use([function(e){let{swiper:t,on:s,emit:i}=e;const a=f();let r=null,n=null;const l=()=>{t&&!t.destroyed&&t.initialized&&(i("beforeResize"),i("resize"))},o=()=>{t&&!t.destroyed&&t.initialized&&i("orientationchange")};s("init",(()=>{t.params.resizeObserver&&void 0!==a.ResizeObserver?t&&!t.destroyed&&t.initialized&&(r=new ResizeObserver((e=>{n=a.requestAnimationFrame((()=>{const{width:s,height:i}=t;let a=s,r=i;e.forEach((e=>{let{contentBoxSize:s,contentRect:i,target:n}=e;n&&n!==t.el||(a=i?i.width:(s[0]||s).inlineSize,r=i?i.height:(s[0]||s).blockSize)})),a===s&&r===i||l()}))})),r.observe(t.el)):(a.addEventListener("resize",l),a.addEventListener("orientationchange",o))})),s("destroy",(()=>{n&&a.cancelAnimationFrame(n),r&&r.unobserve&&t.el&&(r.unobserve(t.el),r=null),a.removeEventListener("resize",l),a.removeEventListener("orientationchange",o)}))},function(e){let{swiper:t,extendParams:s,on:i,emit:a}=e;const r=[],n=f(),l=function(e,s){void 0===s&&(s={});const i=new(n.MutationObserver||n.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void a("observerUpdate",e[0]);const s=function(){a("observerUpdate",e[0])};n.requestAnimationFrame?n.requestAnimationFrame(s):n.setTimeout(s,0)}));i.observe(e,{attributes:void 0===s.attributes||s.attributes,childList:t.isElement||(void 0===s.childList||s).childList,characterData:void 0===s.characterData||s.characterData}),r.push(i)};s({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=P(t.hostEl);for(let t=0;t<e.length;t+=1)l(e[t])}l(t.hostEl,{childList:t.params.observeSlideChildren}),l(t.wrapperEl,{attributes:!1})}})),i("destroy",(()=>{r.forEach((e=>{e.disconnect()})),r.splice(0,r.length)}))}]);const oe=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function de(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function ce(e,t){const s=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>s.indexOf(e)<0)).forEach((s=>{void 0===e[s]?e[s]=t[s]:de(t[s])&&de(e[s])&&Object.keys(t[s]).length>0?t[s].__swiper__?e[s]=t[s]:ce(e[s],t[s]):e[s]=t[s]}))}function pe(e){return void 0===e&&(e={}),e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function ue(e){return void 0===e&&(e={}),e.pagination&&void 0===e.pagination.el}function me(e){return void 0===e&&(e={}),e.scrollbar&&void 0===e.scrollbar.el}function fe(e){void 0===e&&(e="");const t=e.split(" ").map((e=>e.trim())).filter((e=>!!e)),s=[];return t.forEach((e=>{s.indexOf(e)<0&&s.push(e)})),s.join(" ")}function he(e){return void 0===e&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},ge.apply(this,arguments)}function ve(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function be(e){const t=[];return o.Children.toArray(e).forEach((e=>{ve(e)?t.push(e):e.props&&e.props.children&&be(e.props.children).forEach((e=>t.push(e)))})),t}function we(e){const t=[],s={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return o.Children.toArray(e).forEach((e=>{if(ve(e))t.push(e);else if(e.props&&e.props.slot&&s[e.props.slot])s[e.props.slot].push(e);else if(e.props&&e.props.children){const i=be(e.props.children);i.length>0?i.forEach((e=>t.push(e))):s["container-end"].push(e)}else s["container-end"].push(e)})),{slides:t,slots:s}}function ye(e,t){return"undefined"==typeof window?(0,o.useEffect)(e,t):(0,o.useLayoutEffect)(e,t)}const xe=(0,o.createContext)(null),Se=(0,o.createContext)(null),Ee=(0,o.forwardRef)((function(e,t){let{className:s,tag:i="div",wrapperTag:a="div",children:r,onSwiper:n,...l}=void 0===e?{}:e,d=!1;const[c,p]=(0,o.useState)("swiper"),[u,m]=(0,o.useState)(null),[f,h]=(0,o.useState)(!1),g=(0,o.useRef)(!1),v=(0,o.useRef)(null),b=(0,o.useRef)(null),w=(0,o.useRef)(null),y=(0,o.useRef)(null),x=(0,o.useRef)(null),S=(0,o.useRef)(null),E=(0,o.useRef)(null),T=(0,o.useRef)(null),{params:C,passedParams:M,rest:P,events:_}=function(e,t){void 0===e&&(e={}),void 0===t&&(t=!0);const s={on:{}},i={},a={};ce(s,ie),s._emitClasses=!0,s.init=!1;const r={},n=oe.map((e=>e.replace(/_/,""))),l=Object.assign({},e);return Object.keys(l).forEach((l=>{void 0!==e[l]&&(n.indexOf(l)>=0?de(e[l])?(s[l]={},a[l]={},ce(s[l],e[l]),ce(a[l],e[l])):(s[l]=e[l],a[l]=e[l]):0===l.search(/on[A-Z]/)&&"function"==typeof e[l]?t?i[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:s.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:r[l]=e[l])})),["navigation","pagination","scrollbar"].forEach((e=>{!0===s[e]&&(s[e]={}),!1===s[e]&&delete s[e]})),{params:s,passedParams:a,rest:r,events:i}}(l),{slides:k,slots:L}=we(r),O=()=>{h(!f)};Object.assign(C.on,{_containerClasses(e,t){p(t)}});const A=()=>{Object.assign(C.on,_),d=!0;const e={...C};if(delete e.wrapperClass,b.current=new le(e),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=k;const e={cache:!1,slides:k,renderExternal:m,renderExternalUpdate:!1};ce(b.current.params.virtual,e),ce(b.current.originalParams.virtual,e)}};return v.current||A(),b.current&&b.current.on("_beforeBreakpoint",O),(0,o.useEffect)((()=>()=>{b.current&&b.current.off("_beforeBreakpoint",O)})),(0,o.useEffect)((()=>{!g.current&&b.current&&(b.current.emitSlidesClasses(),g.current=!0)})),ye((()=>{if(t&&(t.current=v.current),v.current)return b.current.destroyed&&A(),function(e,t){let{el:s,nextEl:i,prevEl:a,paginationEl:r,scrollbarEl:n,swiper:l}=e;pe(t)&&i&&a&&(l.params.navigation.nextEl=i,l.originalParams.navigation.nextEl=i,l.params.navigation.prevEl=a,l.originalParams.navigation.prevEl=a),ue(t)&&r&&(l.params.pagination.el=r,l.originalParams.pagination.el=r),me(t)&&n&&(l.params.scrollbar.el=n,l.originalParams.scrollbar.el=n),l.init(s)}({el:v.current,nextEl:x.current,prevEl:S.current,paginationEl:E.current,scrollbarEl:T.current,swiper:b.current},C),n&&!b.current.destroyed&&n(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}}),[]),ye((()=>{!d&&_&&b.current&&Object.keys(_).forEach((e=>{b.current.on(e,_[e])}));const e=function(e,t,s,i,a){const r=[];if(!t)return r;const n=e=>{r.indexOf(e)<0&&r.push(e)};if(s&&i){const e=i.map(a),t=s.map(a);e.join("")!==t.join("")&&n("children"),i.length!==s.length&&n("children")}return oe.filter((e=>"_"===e[0])).map((e=>e.replace(/_/,""))).forEach((s=>{if(s in e&&s in t)if(de(e[s])&&de(t[s])){const i=Object.keys(e[s]),a=Object.keys(t[s]);i.length!==a.length?n(s):(i.forEach((i=>{e[s][i]!==t[s][i]&&n(s)})),a.forEach((i=>{e[s][i]!==t[s][i]&&n(s)})))}else e[s]!==t[s]&&n(s)})),r}(M,w.current,k,y.current,(e=>e.key));return w.current=M,y.current=k,e.length&&b.current&&!b.current.destroyed&&function(e){let{swiper:t,slides:s,passedParams:i,changedParams:a,nextEl:r,prevEl:n,scrollbarEl:l,paginationEl:o}=e;const d=a.filter((e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e)),{params:c,pagination:p,navigation:u,scrollbar:m,virtual:f,thumbs:h}=t;let g,v,b,w,y,x,S,E;a.includes("thumbs")&&i.thumbs&&i.thumbs.swiper&&!i.thumbs.swiper.destroyed&&c.thumbs&&(!c.thumbs.swiper||c.thumbs.swiper.destroyed)&&(g=!0),a.includes("controller")&&i.controller&&i.controller.control&&c.controller&&!c.controller.control&&(v=!0),a.includes("pagination")&&i.pagination&&(i.pagination.el||o)&&(c.pagination||!1===c.pagination)&&p&&!p.el&&(b=!0),a.includes("scrollbar")&&i.scrollbar&&(i.scrollbar.el||l)&&(c.scrollbar||!1===c.scrollbar)&&m&&!m.el&&(w=!0),a.includes("navigation")&&i.navigation&&(i.navigation.prevEl||n)&&(i.navigation.nextEl||r)&&(c.navigation||!1===c.navigation)&&u&&!u.prevEl&&!u.nextEl&&(y=!0);const T=e=>{t[e]&&(t[e].destroy(),"navigation"===e?(t.isElement&&(t[e].prevEl.remove(),t[e].nextEl.remove()),c[e].prevEl=void 0,c[e].nextEl=void 0,t[e].prevEl=void 0,t[e].nextEl=void 0):(t.isElement&&t[e].el.remove(),c[e].el=void 0,t[e].el=void 0))};a.includes("loop")&&t.isElement&&(c.loop&&!i.loop?x=!0:!c.loop&&i.loop?S=!0:E=!0),d.forEach((e=>{if(de(c[e])&&de(i[e]))Object.assign(c[e],i[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in i[e])||i[e].enabled||T(e);else{const t=i[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?c[e]=i[e]:!1===t&&T(e)}})),d.includes("controller")&&!v&&t.controller&&t.controller.control&&c.controller&&c.controller.control&&(t.controller.control=c.controller.control),a.includes("children")&&s&&f&&c.virtual.enabled?(f.slides=s,f.update(!0)):a.includes("virtual")&&f&&c.virtual.enabled&&(s&&(f.slides=s),f.update(!0)),a.includes("children")&&s&&c.loop&&(E=!0),g&&h.init()&&h.update(!0),v&&(t.controller.control=c.controller.control),b&&(!t.isElement||o&&"string"!=typeof o||(o=document.createElement("div"),o.classList.add("swiper-pagination"),o.part.add("pagination"),t.el.appendChild(o)),o&&(c.pagination.el=o),p.init(),p.render(),p.update()),w&&(!t.isElement||l&&"string"!=typeof l||(l=document.createElement("div"),l.classList.add("swiper-scrollbar"),l.part.add("scrollbar"),t.el.appendChild(l)),l&&(c.scrollbar.el=l),m.init(),m.updateSize(),m.setTranslate()),y&&(t.isElement&&(r&&"string"!=typeof r||(r=document.createElement("div"),r.classList.add("swiper-button-next"),r.innerHTML=t.hostEl.constructor.nextButtonSvg,r.part.add("button-next"),t.el.appendChild(r)),n&&"string"!=typeof n||(n=document.createElement("div"),n.classList.add("swiper-button-prev"),n.innerHTML=t.hostEl.constructor.prevButtonSvg,n.part.add("button-prev"),t.el.appendChild(n))),r&&(c.navigation.nextEl=r),n&&(c.navigation.prevEl=n),u.init(),u.update()),a.includes("allowSlideNext")&&(t.allowSlideNext=i.allowSlideNext),a.includes("allowSlidePrev")&&(t.allowSlidePrev=i.allowSlidePrev),a.includes("direction")&&t.changeDirection(i.direction,!1),(x||E)&&t.loopDestroy(),(S||E)&&t.loopCreate(),t.update()}({swiper:b.current,slides:k,passedParams:M,changedParams:e,nextEl:x.current,prevEl:S.current,scrollbarEl:T.current,paginationEl:E.current}),()=>{_&&b.current&&Object.keys(_).forEach((e=>{b.current.off(e,_[e])}))}})),ye((()=>{var e;!(e=b.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())}),[u]),o.createElement(i,ge({ref:v,className:fe(`${c}${s?` ${s}`:""}`)},P),o.createElement(Se.Provider,{value:b.current},L["container-start"],o.createElement(a,{className:he(C.wrapperClass)},L["wrapper-start"],C.virtual?function(e,t,s){if(!s)return null;const i=e=>{let s=e;return e<0?s=t.length+e:s>=t.length&&(s-=t.length),s},a=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${s.offset}px`}:{top:`${s.offset}px`},{from:r,to:n}=s,l=e.params.loop?-t.length:0,d=e.params.loop?2*t.length:t.length,c=[];for(let e=l;e<d;e+=1)e>=r&&e<=n&&c.push(t[i(e)]);return c.map(((t,s)=>o.cloneElement(t,{swiper:e,style:a,key:t.props.virtualIndex||t.key||`slide-${s}`})))}(b.current,k,u):k.map(((e,t)=>o.cloneElement(e,{swiper:b.current,swiperSlideIndex:t}))),L["wrapper-end"]),pe(C)&&o.createElement(o.Fragment,null,o.createElement("div",{ref:S,className:"swiper-button-prev"}),o.createElement("div",{ref:x,className:"swiper-button-next"})),me(C)&&o.createElement("div",{ref:T,className:"swiper-scrollbar"}),ue(C)&&o.createElement("div",{ref:E,className:"swiper-pagination"}),L["container-end"]))}));Ee.displayName="Swiper";const Te=(0,o.forwardRef)((function(e,t){let{tag:s="div",children:i,className:a="",swiper:r,zoom:n,lazy:l,virtualIndex:d,swiperSlideIndex:c,...p}=void 0===e?{}:e;const u=(0,o.useRef)(null),[m,f]=(0,o.useState)("swiper-slide"),[h,g]=(0,o.useState)(!1);function v(e,t,s){t===u.current&&f(s)}ye((()=>{if(void 0!==c&&(u.current.swiperSlideIndex=c),t&&(t.current=u.current),u.current&&r){if(!r.destroyed)return r.on("_slideClass",v),()=>{r&&r.off("_slideClass",v)};"swiper-slide"!==m&&f("swiper-slide")}})),ye((()=>{r&&u.current&&!r.destroyed&&f(r.getSlideClasses(u.current))}),[r]);const b={isActive:m.indexOf("swiper-slide-active")>=0,isVisible:m.indexOf("swiper-slide-visible")>=0,isPrev:m.indexOf("swiper-slide-prev")>=0,isNext:m.indexOf("swiper-slide-next")>=0},w=()=>"function"==typeof i?i(b):i;return o.createElement(s,ge({ref:u,className:fe(`${m}${a?` ${a}`:""}`),"data-swiper-slide-index":d,onLoad:()=>{g(!0)}},p),n&&o.createElement(xe.Provider,{value:b},o.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof n?n:void 0},w(),l&&!h&&o.createElement("div",{className:"swiper-lazy-preloader"}))),!n&&o.createElement(xe.Provider,{value:b},w(),l&&!h&&o.createElement("div",{className:"swiper-lazy-preloader"})))}));function Ce(e,t,s,i){return e.params.createElements&&Object.keys(i).forEach((a=>{if(!s[a]&&!0===s.auto){let r=S(e.el,`.${i[a]}`)[0];r||(r=T("div",i[a]),r.className=i[a],e.el.append(r)),s[a]=r,t[a]=r}})),s}function Me(e){let{swiper:t,extendParams:s,on:i,emit:a}=e;function r(e){let s;return e&&"string"==typeof e&&t.isElement&&(s=t.el.querySelector(e)||t.hostEl.querySelector(e),s)?s:(e&&("string"==typeof e&&(s=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&s&&s.length>1&&1===t.el.querySelectorAll(e).length?s=t.el.querySelector(e):s&&1===s.length&&(s=s[0])),e&&!s?e:s)}function n(e,s){const i=t.params.navigation;(e=k(e)).forEach((e=>{e&&(e.classList[s?"add":"remove"](...i.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=s),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](i.lockClass))}))}function l(){const{nextEl:e,prevEl:s}=t.navigation;if(t.params.loop)return n(s,!1),void n(e,!1);n(s,t.isBeginning&&!t.params.rewind),n(e,t.isEnd&&!t.params.rewind)}function o(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),a("navigationPrev"))}function d(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),a("navigationNext"))}function c(){const e=t.params.navigation;if(t.params.navigation=Ce(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let s=r(e.nextEl),i=r(e.prevEl);Object.assign(t.navigation,{nextEl:s,prevEl:i}),s=k(s),i=k(i);const a=(s,i)=>{s&&s.addEventListener("click","next"===i?d:o),!t.enabled&&s&&s.classList.add(...e.lockClass.split(" "))};s.forEach((e=>a(e,"next"))),i.forEach((e=>a(e,"prev")))}function p(){let{nextEl:e,prevEl:s}=t.navigation;e=k(e),s=k(s);const i=(e,s)=>{e.removeEventListener("click","next"===s?d:o),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>i(e,"next"))),s.forEach((e=>i(e,"prev")))}s({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},i("init",(()=>{!1===t.params.navigation.enabled?u():(c(),l())})),i("toEdge fromEdge lock unlock",(()=>{l()})),i("destroy",(()=>{p()})),i("enable disable",(()=>{let{nextEl:e,prevEl:s}=t.navigation;e=k(e),s=k(s),t.enabled?l():[...e,...s].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),i("click",((e,s)=>{let{nextEl:i,prevEl:r}=t.navigation;i=k(i),r=k(r);const n=s.target;let l=r.includes(n)||i.includes(n);if(t.isElement&&!l){const e=s.path||s.composedPath&&s.composedPath();e&&(l=e.find((e=>i.includes(e)||r.includes(e))))}if(t.params.navigation.hideOnClick&&!l){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===n||t.pagination.el.contains(n)))return;let e;i.length?e=i[0].classList.contains(t.params.navigation.hiddenClass):r.length&&(e=r[0].classList.contains(t.params.navigation.hiddenClass)),a(!0===e?"navigationShow":"navigationHide"),[...i,...r].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const u=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),p()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),c(),l()},disable:u,update:l,init:c,destroy:p})}function Pe(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function _e(e){let{swiper:t,extendParams:s,on:i,emit:a}=e;const r="swiper-pagination";let n;s({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,bullets:[]};let l=0;function o(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function d(e,s){const{bulletActiveClass:i}=t.params.pagination;e&&(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${i}-${s}`),(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&e.classList.add(`${i}-${s}-${s}`))}function c(e){const s=e.target.closest(Pe(t.params.pagination.bulletClass));if(!s)return;e.preventDefault();const i=M(s)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===i)return;const e=(a=t.realIndex,r=i,(r%=n=t.slides.length)==1+(a%=n)?"next":r===a-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(i)}else t.slideTo(i);var a,r,n}function p(){const e=t.rtl,s=t.params.pagination;if(o())return;let i,r,c=t.pagination.el;c=k(c);const p=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,u=t.params.loop?Math.ceil(p/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(r=t.previousRealIndex||0,i=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(i=t.snapIndex,r=t.previousSnapIndex):(r=t.previousIndex||0,i=t.activeIndex||0),"bullets"===s.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const a=t.pagination.bullets;let o,p,u;if(s.dynamicBullets&&(n=_(a[0],t.isHorizontal()?"width":"height",!0),c.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=n*(s.dynamicMainBullets+4)+"px"})),s.dynamicMainBullets>1&&void 0!==r&&(l+=i-(r||0),l>s.dynamicMainBullets-1?l=s.dynamicMainBullets-1:l<0&&(l=0)),o=Math.max(i-l,0),p=o+(Math.min(a.length,s.dynamicMainBullets)-1),u=(p+o)/2),a.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${s.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),c.length>1)a.forEach((e=>{const a=M(e);a===i?e.classList.add(...s.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),s.dynamicBullets&&(a>=o&&a<=p&&e.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),a===o&&d(e,"prev"),a===p&&d(e,"next"))}));else{const e=a[i];if(e&&e.classList.add(...s.bulletActiveClass.split(" ")),t.isElement&&a.forEach(((e,t)=>{e.setAttribute("part",t===i?"bullet-active":"bullet")})),s.dynamicBullets){const e=a[o],t=a[p];for(let e=o;e<=p;e+=1)a[e]&&a[e].classList.add(...`${s.bulletActiveClass}-main`.split(" "));d(e,"prev"),d(t,"next")}}if(s.dynamicBullets){const i=Math.min(a.length,s.dynamicMainBullets+4),r=(n*i-n)/2-u*n,l=e?"right":"left";a.forEach((e=>{e.style[t.isHorizontal()?l:"top"]=`${r}px`}))}}c.forEach(((e,r)=>{if("fraction"===s.type&&(e.querySelectorAll(Pe(s.currentClass)).forEach((e=>{e.textContent=s.formatFractionCurrent(i+1)})),e.querySelectorAll(Pe(s.totalClass)).forEach((e=>{e.textContent=s.formatFractionTotal(u)}))),"progressbar"===s.type){let a;a=s.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(i+1)/u;let n=1,l=1;"horizontal"===a?n=r:l=r,e.querySelectorAll(Pe(s.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${n}) scaleY(${l})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===s.type&&s.renderCustom?(e.innerHTML=s.renderCustom(t,i+1,u),0===r&&a("paginationRender",e)):(0===r&&a("paginationRender",e),a("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](s.lockClass)}))}function u(){const e=t.params.pagination;if(o())return;const s=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let i=t.pagination.el;i=k(i);let r="";if("bullets"===e.type){let i=t.params.loop?Math.ceil(s/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&i>s&&(i=s);for(let s=0;s<i;s+=1)e.renderBullet?r+=e.renderBullet.call(t,s,e.bulletClass):r+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],i.forEach((s=>{"custom"!==e.type&&(s.innerHTML=r||""),"bullets"===e.type&&t.pagination.bullets.push(...s.querySelectorAll(Pe(e.bulletClass)))})),"custom"!==e.type&&a("paginationRender",i[0])}function m(){t.params.pagination=Ce(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let s;"string"==typeof e.el&&t.isElement&&(s=t.el.querySelector(e.el)),s||"string"!=typeof e.el||(s=[...document.querySelectorAll(e.el)]),s||(s=e.el),s&&0!==s.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(s)&&s.length>1&&(s=[...t.el.querySelectorAll(e.el)],s.length>1&&(s=s.find((e=>P(e,".swiper")[0]===t.el)))),Array.isArray(s)&&1===s.length&&(s=s[0]),Object.assign(t.pagination,{el:s}),s=k(s),s.forEach((s=>{"bullets"===e.type&&e.clickable&&s.classList.add(...(e.clickableClass||"").split(" ")),s.classList.add(e.modifierClass+e.type),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(s.classList.add(`${e.modifierClass}${e.type}-dynamic`),l=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&s.classList.add(e.progressbarOppositeClass),e.clickable&&s.addEventListener("click",c),t.enabled||s.classList.add(e.lockClass)})))}function f(){const e=t.params.pagination;if(o())return;let s=t.pagination.el;s&&(s=k(s),s.forEach((s=>{s.classList.remove(e.hiddenClass),s.classList.remove(e.modifierClass+e.type),s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(s.classList.remove(...(e.clickableClass||"").split(" ")),s.removeEventListener("click",c))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}i("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:s}=t.pagination;s=k(s),s.forEach((s=>{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),i("init",(()=>{!1===t.params.pagination.enabled?h():(m(),u(),p())})),i("activeIndexChange",(()=>{void 0===t.snapIndex&&p()})),i("snapIndexChange",(()=>{p()})),i("snapGridLengthChange",(()=>{u(),p()})),i("destroy",(()=>{f()})),i("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=k(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),i("lock unlock",(()=>{p()})),i("click",((e,s)=>{const i=s.target,r=k(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&r&&r.length>0&&!i.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&i===t.navigation.nextEl||t.navigation.prevEl&&i===t.navigation.prevEl))return;const e=r[0].classList.contains(t.params.pagination.hiddenClass);a(!0===e?"paginationShow":"paginationHide"),r.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const h=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=k(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),f()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=k(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),m(),u(),p()},disable:h,render:u,update:p,init:m,destroy:f})}function ke(e){let t,s,{swiper:i,extendParams:a,on:r,emit:n,params:l}=e;i.autoplay={running:!1,paused:!1,timeLeft:0},a({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let o,d,c,p,m,f,h,g,v=l&&l.autoplay?l.autoplay.delay:3e3,b=l&&l.autoplay?l.autoplay.delay:3e3,w=(new Date).getTime();function y(e){i&&!i.destroyed&&i.wrapperEl&&e.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",y),g||e.detail&&e.detail.bySwiperTouchMove||M())}const x=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?d=!0:d&&(b=o,d=!1);const e=i.autoplay.paused?o:w+b-(new Date).getTime();i.autoplay.timeLeft=e,n("autoplayTimeLeft",e,e/v),s=requestAnimationFrame((()=>{x()}))},S=e=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(s),x();let a=void 0===e?i.params.autoplay.delay:e;v=i.params.autoplay.delay,b=i.params.autoplay.delay;const r=(()=>{let e;if(e=i.virtual&&i.params.virtual.enabled?i.slides.find((e=>e.classList.contains("swiper-slide-active"))):i.slides[i.activeIndex],e)return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(r)&&r>0&&void 0===e&&(a=r,v=r,b=r),o=a;const l=i.params.speed,d=()=>{i&&!i.destroyed&&(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev(l,!0,!0),n("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,l,!0,!0),n("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext(l,!0,!0),n("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,l,!0,!0),n("autoplay")),i.params.cssMode&&(w=(new Date).getTime(),requestAnimationFrame((()=>{S()}))))};return a>0?(clearTimeout(t),t=setTimeout((()=>{d()}),a)):requestAnimationFrame((()=>{d()})),a},E=()=>{w=(new Date).getTime(),i.autoplay.running=!0,S(),n("autoplayStart")},T=()=>{i.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(s),n("autoplayStop")},C=(e,s)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(t),e||(h=!0);const a=()=>{n("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",y):M()};if(i.autoplay.paused=!0,s)return f&&(o=i.params.autoplay.delay),f=!1,void a();const r=o||i.params.autoplay.delay;o=r-((new Date).getTime()-w),i.isEnd&&o<0&&!i.params.loop||(o<0&&(o=0),a())},M=()=>{i.isEnd&&o<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(w=(new Date).getTime(),h?(h=!1,S(o)):S(),i.autoplay.paused=!1,n("autoplayResume"))},P=()=>{if(i.destroyed||!i.autoplay.running)return;const e=u();"hidden"===e.visibilityState&&(h=!0,C(!0)),"visible"===e.visibilityState&&M()},_=e=>{"mouse"===e.pointerType&&(h=!0,g=!0,i.animating||i.autoplay.paused||C(!0))},k=e=>{"mouse"===e.pointerType&&(g=!1,i.autoplay.paused&&M())};r("init",(()=>{i.params.autoplay.enabled&&(i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",_),i.el.addEventListener("pointerleave",k)),u().addEventListener("visibilitychange",P),E())})),r("destroy",(()=>{i.el&&"string"!=typeof i.el&&(i.el.removeEventListener("pointerenter",_),i.el.removeEventListener("pointerleave",k)),u().removeEventListener("visibilitychange",P),i.autoplay.running&&T()})),r("_freeModeStaticRelease",(()=>{(p||h)&&M()})),r("_freeModeNoMomentumRelease",(()=>{i.params.autoplay.disableOnInteraction?T():C(!0,!0)})),r("beforeTransitionStart",((e,t,s)=>{!i.destroyed&&i.autoplay.running&&(s||!i.params.autoplay.disableOnInteraction?C(!0,!0):T())})),r("sliderFirstMove",(()=>{!i.destroyed&&i.autoplay.running&&(i.params.autoplay.disableOnInteraction?T():(c=!0,p=!1,h=!1,m=setTimeout((()=>{h=!0,p=!0,C(!0)}),200)))})),r("touchEnd",(()=>{if(!i.destroyed&&i.autoplay.running&&c){if(clearTimeout(m),clearTimeout(t),i.params.autoplay.disableOnInteraction)return p=!1,void(c=!1);p&&i.params.cssMode&&M(),p=!1,c=!1}})),r("slideChange",(()=>{!i.destroyed&&i.autoplay.running&&(f=!0)})),Object.assign(i.autoplay,{start:E,stop:T,pause:C,resume:M})}function Le(e){const{effect:t,swiper:s,on:i,setTranslate:a,setTransition:r,overwriteParams:n,perspective:l,recreateShadows:o,getEffectParams:d}=e;let c;i("beforeInit",(()=>{if(s.params.effect!==t)return;s.classNames.push(`${s.params.containerModifierClass}${t}`),l&&l()&&s.classNames.push(`${s.params.containerModifierClass}3d`);const e=n?n():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)})),i("setTranslate",(()=>{s.params.effect===t&&a()})),i("setTransition",((e,i)=>{s.params.effect===t&&r(i)})),i("transitionEnd",(()=>{if(s.params.effect===t&&o){if(!d||!d().slideShadows)return;s.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),o()}})),i("virtualUpdate",(()=>{s.params.effect===t&&(s.slides.length||(c=!0),requestAnimationFrame((()=>{c&&s.slides&&s.slides.length&&(a(),c=!1)})))}))}function Oe(e,t){const s=x(t);return s!==t&&(s.style.backfaceVisibility="hidden",s.style["-webkit-backface-visibility"]="hidden"),s}function Ae(e){let{swiper:t,extendParams:s,on:i}=e;s({fadeEffect:{crossFade:!1}}),Le({effect:"fade",swiper:t,on:i,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let s=0;s<e.length;s+=1){const e=t.slides[s];let i=-e.swiperSlideOffset;t.params.virtualTranslate||(i-=t.translate);let a=0;t.isHorizontal()||(a=i,i=0);const r=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),n=Oe(0,e);n.style.opacity=r,n.style.transform=`translate3d(${i}px, ${a}px, 0px)`}},setTransition:e=>{const s=t.slides.map((e=>x(e)));s.forEach((t=>{t.style.transitionDuration=`${e}ms`})),function(e){let{swiper:t,duration:s,transformElements:i,allSlides:a}=e;const{activeIndex:r}=t;if(t.params.virtualTranslate&&0!==s){let e,s=!1;e=a?i:i.filter((e=>{const s=e.classList.contains("swiper-slide-transform")?(e=>e.parentElement?e.parentElement:t.slides.find((t=>t.shadowRoot&&t.shadowRoot===e.parentNode)))(e):e;return t.getSlideIndex(s)===r})),e.forEach((e=>{!function(e,t){t&&e.addEventListener("transitionend",(function s(i){i.target===e&&(t.call(e,i),e.removeEventListener("transitionend",s))}))}(e,(()=>{if(s)return;if(!t||t.destroyed)return;s=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}({swiper:t,duration:e,transformElements:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function Ie(e,t,s){const i=`swiper-slide-shadow${s?`-${s}`:""}${e?` swiper-slide-shadow-${e}`:""}`,a=x(t);let r=a.querySelector(`.${i.split(" ").join(".")}`);return r||(r=T("div",i.split(" ")),a.append(r)),r}function ze(e){let{swiper:t,extendParams:s,on:i}=e;s({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Le({effect:"coverflow",swiper:t,on:i,setTranslate:()=>{const{width:e,height:s,slides:i,slidesSizesGrid:a}=t,r=t.params.coverflowEffect,n=t.isHorizontal(),l=t.translate,o=n?e/2-l:s/2-l,d=n?r.rotate:-r.rotate,c=r.depth,p=function(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}(t);for(let e=0,t=i.length;e<t;e+=1){const t=i[e],s=a[e],l=(o-t.swiperSlideOffset-s/2)/s,u="function"==typeof r.modifier?r.modifier(l):l*r.modifier;let m=n?d*u:0,f=n?0:d*u,h=-c*Math.abs(u),g=r.stretch;"string"==typeof g&&-1!==g.indexOf("%")&&(g=parseFloat(r.stretch)/100*s);let v=n?0:g*u,b=n?g*u:0,w=1-(1-r.scale)*Math.abs(u);Math.abs(b)<.001&&(b=0),Math.abs(v)<.001&&(v=0),Math.abs(h)<.001&&(h=0),Math.abs(m)<.001&&(m=0),Math.abs(f)<.001&&(f=0),Math.abs(w)<.001&&(w=0);const y=`translate3d(${b}px,${v}px,${h}px)  rotateX(${p(f)}deg) rotateY(${p(m)}deg) scale(${w})`;if(Oe(0,t).style.transform=y,t.style.zIndex=1-Math.abs(Math.round(u)),r.slideShadows){let e=n?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),s=n?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=Ie("coverflow",t,n?"left":"top")),s||(s=Ie("coverflow",t,n?"right":"bottom")),e&&(e.style.opacity=u>0?u:0),s&&(s.style.opacity=-u>0?-u:0)}}},setTransition:e=>{t.slides.map((e=>x(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}Te.displayName="SwiperSlide";const je=window.ReactJSXRuntime;function $e({attributes:e,setAttributes:t}){const{enableLoop:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Loop","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s,label:(0,r.__)("Enable loop","caledros-basic-blocks"),help:(0,r.__)("Enable the continuous loop mode.","caledros-basic-blocks"),onChange:e=>{t({enableLoop:e})}})})}function Ne({attributes:e,setAttributes:t}){const{identifier:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Unique Identifier","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Type the identifier for the slider. The identifier must be unique. If no unique identifier is provided, the slider won't work.","caledros-basic-blocks"),value:s,onChange:e=>{t({identifier:e})}})})}function Be({attributes:e,setAttributes:t}){const{enablePagination:s,paginationType:i}=e;return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Pagination","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s,label:(0,r.__)("Enable pagination","caledros-basic-blocks"),onChange:e=>{t({enablePagination:e})}}),s&&(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Choose the type of pagination","caledros-basic-blocks"),value:i,options:[{label:"Progress Bar",value:"progressbar"},{label:"Bullets",value:"bullets"},{label:"Fraction",value:"fraction"}],onChange:e=>{t({paginationType:e})}})]})}function De({attributes:e,setAttributes:t}){const{autoplay:s}=e;return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Autoplay","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s.enableAutoplay,label:(0,r.__)("Enable autoplay","caledros-basic-blocks"),onChange:e=>{t({autoplay:{...s,enableAutoplay:e}})}}),s.enableAutoplay&&(0,je.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Select the delay between transitions (milliseconds).","caledros-basic-blocks"),value:s.delay,max:2e4,min:100,step:100,onChange:e=>{t({autoplay:{...s,delay:e}})}})]})}const Ge=window.wp.element,Fe=window.wp.data;function He({attributes:e,setAttributes:t}){const{lightColor:s}=e,[i,a]=(0,Ge.useState)("#00000000"===s),[o,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),c=o.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,Fe.select)("core/editor")?.getEditorSettings(),u=p?.__experimentalFeatures?.color?.palette,m=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),f=m(u,"default"),h=m(u,"theme"),g=m(u,"custom"),v=[...d?[f]:[],h,...g.colors?[g]:[]];return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Navigation & Pagination Color (Light Mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:i,onChange:()=>{a((e=>!e)),t({lightColor:"#00000000"})}}),!i&&(0,je.jsx)(l.ColorPalette,{colors:u?v:c,value:s,onChange:e=>t({lightColor:e}),enableAlpha:!0,clearable:!1})]})}function Ve({attributes:e,setAttributes:t}){const{darkColor:s}=e,[i,a]=(0,Ge.useState)("#00000000"===s),[o,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),c=o.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,Fe.select)("core/editor")?.getEditorSettings(),u=p?.__experimentalFeatures?.color?.palette,m=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),f=m(u,"default"),h=m(u,"theme"),g=m(u,"custom"),v=[...d?[f]:[],h,...g.colors?[g]:[]];return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Navigation & Pagination Color (Dark Mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:i,onChange:()=>{a((e=>!e)),t({darkColor:"#00000000"})}}),!i&&(0,je.jsx)(l.ColorPalette,{colors:u?v:c,value:s,onChange:e=>t({darkColor:e}),enableAlpha:!0,clearable:!1})]})}function Re({attributes:e,setAttributes:t}){const{enableNavigationArrows:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Navigation Arrows","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s,label:(0,r.__)("Enable navigation arrows","caledros-basic-blocks"),help:(0,r.__)("Choose whether or not the navigation arrows are visible.","caledros-basic-blocks"),onChange:e=>{t({enableNavigationArrows:e})}})})}function qe({attributes:e,setAttributes:t}){const{images:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Image Settings","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(n.MediaUploadCheck,{children:(0,je.jsx)(n.MediaUpload,{onSelect:e=>{t({images:e.map((e=>({id:e.id,url:e.url,alt:e.alt})))})},allowedTypes:["image"],multiple:!0,gallery:!0,value:s.map((e=>e.id)),render:({open:e})=>(0,je.jsx)(l.Button,{onClick:e,variant:"secondary",children:0===s.length?(0,r.__)("Add Images","caledros-basic-blocks"):(0,r.__)("Edit Gallery","caledros-basic-blocks")})})})})}function We({attributes:e,setAttributes:t}){const{width:s}=e,i=s.replace(/\d+/g,"")||"px",a=["px","%","em","rem","vw"].includes(i)?i:"px",o=parseInt(s)||0,[d,c]=(0,Ge.useState)("100%"!==s&&"var(--wp--style--global--content-size)"!==s&&"var(--wp--style--global--wide-size)"!==s),p=(0,n.useSettings)("layout.contentSize","layout.wideSize")||[],[u="620px",m="1280px"]=p,f=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Maximum width","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use custom width",checked:d,onChange:()=>c((e=>!e))}),!d&&(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Choose the maximum width for the container.","caledros-basic-blocks"),value:"100%"===s||"var(--wp--style--global--content-size)"===s||"var(--wp--style--global--wide-size)"===s?s:"",options:[{disabled:!0,label:"Select an option",value:""},{label:"Full width",value:"100%"},{label:`Content size (${u})`,value:"var(--wp--style--global--content-size)"},{label:`Wide size (${m})`,value:"var(--wp--style--global--wide-size)"}],onChange:e=>{t({width:e})}}),d&&(0,je.jsxs)("div",{className:"cbb-editor__grid",children:[(0,je.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)(`Please select the custom maximum width (${a}) for the container.`,"caledros-basic-blocks"),value:"var(--wp--style--global--content-size)"===s||"var(--wp--style--global--wide-size)"===s?0:parseInt(s),max:"%"===a||"vw"===a?100:3e3,min:0,step:1,onChange:e=>{t({width:`${e}${a}`})}}),(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:a,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({width:`${f(e,o)}${e}`})}})]})]})}function Xe({attributes:e,setAttributes:t}){const{minHeight:s}=e,i=s.replace(/\d+/g,"")||"px",a=parseInt(s)||0,n=(e,t)=>"auto"===e?"":"vh"===e&&t>100?100:t;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Minimum height","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsxs)("div",{className:"cbb-editor__grid",children:[(0,je.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)(`Please select the minimum height (${i}) for the container.`,"caledros-basic-blocks"),initialPosition:0,max:"vh"===i?100:3e3,min:0,step:1,value:"auto"===i?0:a,onChange:e=>t({minHeight:`${"auto"!==i?e:""}${i}`}),disabled:"auto"===i}),(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:i,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"},{label:"auto",value:"auto"}],onChange:e=>{t({minHeight:`${n(e,a)}${e}`})}})]})})}function Ye({attributes:e,setAttributes:t}){const{galleryEffect:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Effect","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Choose the effect for the gallery.","caledros-basic-blocks"),value:s,options:[{label:"None",value:"none"},{label:"Fade",value:"fade"},{label:"Coverflow",value:"coverflow"}],onChange:e=>{t({galleryEffect:e})}})})}function Ue({attributes:e,setAttributes:t}){const{showDemoData:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Demo data options","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show demo data","caledros-basic-blocks"),help:(0,r.__)("Display demo images.","caledros-basic-blocks"),checked:s,onChange:e=>{t({showDemoData:e})}})})}const Ke=s.p+"images/bird.a6a2c4c9.webp",Je=s.p+"images/flower.0f364da1.webp",Ze=s.p+"images/pier.d4435397.webp",Qe={icon:(0,je.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,je.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,je.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,je.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,je.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,je.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,je.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,je.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,je.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,je.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,je.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,je.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,je.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})};(0,i.registerBlockType)(a.UU,{icon:Qe.icon,edit:function({attributes:e,setAttributes:t}){const{images:s,enableLoop:i,identifier:a,enablePagination:o,paginationType:d,autoplay:c,lightColor:p,darkColor:u,enableNavigationArrows:m,width:f,minHeight:h,galleryEffect:g,showDemoData:v}=e,b=(0,n.useBlockProps)({className:"cbb-image-gallery",style:{"--cbb-slider-light-color":p,"--cbb-slider-dark-color":u,width:f,height:h}}),w=()=>o&&"bullets"===d?{clickable:!0,type:"bullets"}:o&&"fraction"===d?{type:"fraction"}:o&&"progressbar"===d?{type:"progressbar"}:!!o&&void 0,y=()=>!!c.enableAutoplay&&{delay:c.delay,disableOnInteraction:!1,pauseOnMouseEnter:!0};return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(n.InspectorControls,{children:(0,je.jsx)(l.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"content",title:"Content"},{name:"style",title:"Style"},{name:"additional",title:"Additional"}],children:s=>"content"===s.name?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Ne,{attributes:e,setAttributes:t}),!v&&(0,je.jsx)(qe,{attributes:e,setAttributes:t})]}):"style"===s.name?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(He,{attributes:e,setAttributes:t}),(0,je.jsx)(Ve,{attributes:e,setAttributes:t}),(0,je.jsx)(We,{attributes:e,setAttributes:t}),(0,je.jsx)(Xe,{attributes:e,setAttributes:t})]}):"additional"===s.name?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)($e,{attributes:e,setAttributes:t}),(0,je.jsx)(Re,{attributes:e,setAttributes:t}),(0,je.jsx)(Be,{attributes:e,setAttributes:t}),(0,je.jsx)(De,{attributes:e,setAttributes:t}),(0,je.jsx)(Ye,{attributes:e,setAttributes:t}),(0,je.jsx)(Ue,{attributes:e,setAttributes:t})]}):null})}),(0,je.jsxs)("div",{...b,children:[!v&&(0,je.jsx)(je.Fragment,{children:0==s.length?(0,je.jsx)(l.Placeholder,{label:(0,r.__)("Image Gallery","caledros-basic-blocks"),instructions:(0,r.__)("Add images to the gallery.","caledros-basic-blocks"),icon:"format-gallery",className:"wp-block-my-block-placeholder"}):(0,je.jsx)(je.Fragment,{children:(0,je.jsx)(Ee,{navigation:m,allowTouchMove:!1,modules:[Me,_e,ke,Ae,ze],className:`cbb-image-gallery-${a}`,loop:i,pagination:w(),autoplay:y(),..."fade"===g&&{effect:"fade",fadeEffect:{crossFade:!0}},..."coverflow"===g&&{effect:"coverflow",grabCursor:!0,centeredSlides:!0,slidesPerView:1.5,coverflowEffect:{rotate:50,stretch:0,depth:50,modifier:1,slideShadows:!0},breakpoints:{810:{slidesPerView:1.5},0:{slidesPerView:1}}},children:s.map(((e,t)=>(0,je.jsx)(Te,{children:(0,je.jsx)("img",{src:e.url,alt:e.alt,style:{width:f,height:h}},e.id)},t)))},`${d}-${i}-${c.enableAutoplay}-${c.delay}-${m}-${g}`)})}),v&&(0,je.jsx)(je.Fragment,{children:(0,je.jsxs)(Ee,{navigation:m,allowTouchMove:!1,modules:[Me,_e,ke,Ae,ze],className:`cbb-image-gallery-${a}`,loop:i,pagination:w(),autoplay:y(),..."fade"===g&&{effect:"fade",fadeEffect:{crossFade:!0}},..."coverflow"===g&&{effect:"coverflow",grabCursor:!0,centeredSlides:!0,slidesPerView:1.5,coverflowEffect:{rotate:50,stretch:0,depth:50,modifier:1,slideShadows:!0},breakpoints:{810:{slidesPerView:1.5},0:{slidesPerView:1}}},children:[(0,je.jsx)(Te,{children:(0,je.jsx)("img",{src:Ke,alt:"bird",style:{width:f,height:h}},0)},0),(0,je.jsx)(Te,{children:(0,je.jsx)("img",{src:Ze,alt:"pier",style:{width:f,height:h}},1)},1),(0,je.jsx)(Te,{children:(0,je.jsx)("img",{src:Je,alt:"flower",style:{width:f,height:h}},2)},2)]},`${d}-${i}-${c.enableAutoplay}-${c.delay}-${m}-${g}`)})]})]})}})}},s={};function i(e){var a=s[e];if(void 0!==a)return a.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.m=t,e=[],i.O=(t,s,a,r)=>{if(!s){var n=1/0;for(c=0;c<e.length;c++){for(var[s,a,r]=e[c],l=!0,o=0;o<s.length;o++)(!1&r||n>=r)&&Object.keys(i.O).every((e=>i.O[e](s[o])))?s.splice(o--,1):(l=!1,r<n&&(n=r));if(l){e.splice(c--,1);var d=a();void 0!==d&&(t=d)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[s,a,r]},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var s=t.getElementsByTagName("script");if(s.length)for(var a=s.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=s[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../../"})(),(()=>{var e={951:0,119:0};i.O.j=t=>0===e[t];var t=(t,s)=>{var a,r,[n,l,o]=s,d=0;if(n.some((t=>0!==e[t]))){for(a in l)i.o(l,a)&&(i.m[a]=l[a]);if(o)var c=o(i)}for(t&&t(s);d<n.length;d++)r=n[d],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return i.O(c)},s=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var a=i.O(void 0,[119],(()=>i(44)));a=i.O(a)})();
     1(()=>{"use strict";var e,t={44:(e,t,s)=>{const i=window.wp.blocks,a=JSON.parse('{"UU":"caledros-basic-blocks/image-gallery"}'),r=window.wp.i18n,n=window.wp.blockEditor,l=window.wp.components,o=window.React;function d(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function c(e,t){void 0===e&&(e={}),void 0===t&&(t={});const s=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>s.indexOf(e)<0)).forEach((s=>{void 0===e[s]?e[s]=t[s]:d(t[s])&&d(e[s])&&Object.keys(t[s]).length>0&&c(e[s],t[s])}))}const p={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function u(){const e="undefined"!=typeof document?document:{};return c(e,p),e}const m={document:p,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function f(){const e="undefined"!=typeof window?window:{};return c(e,m),e}function h(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function g(){return Date.now()}function v(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function b(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let i=1;i<arguments.length;i+=1){const a=i<0||arguments.length<=i?void 0:arguments[i];if(null!=a&&(s=a,!("undefined"!=typeof window&&void 0!==window.HTMLElement?s instanceof HTMLElement:s&&(1===s.nodeType||11===s.nodeType)))){const s=Object.keys(Object(a)).filter((e=>t.indexOf(e)<0));for(let t=0,i=s.length;t<i;t+=1){const i=s[t],r=Object.getOwnPropertyDescriptor(a,i);void 0!==r&&r.enumerable&&(v(e[i])&&v(a[i])?a[i].__swiper__?e[i]=a[i]:b(e[i],a[i]):!v(e[i])&&v(a[i])?(e[i]={},a[i].__swiper__?e[i]=a[i]:b(e[i],a[i])):e[i]=a[i])}}}var s;return e}function w(e,t,s){e.style.setProperty(t,s)}function y(e){let{swiper:t,targetPosition:s,side:i}=e;const a=f(),r=-t.translate;let n,l=null;const o=t.params.speed;t.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(t.cssModeFrameID);const d=s>r?"next":"prev",c=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,p=()=>{n=(new Date).getTime(),null===l&&(l=n);const e=Math.max(Math.min((n-l)/o,1),0),d=.5-Math.cos(e*Math.PI)/2;let u=r+d*(s-r);if(c(u,s)&&(u=s),t.wrapperEl.scrollTo({[i]:u}),c(u,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[i]:u})})),void a.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=a.requestAnimationFrame(p)};p()}function x(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function S(e,t){void 0===t&&(t="");const s=f(),i=[...e.children];return s.HTMLSlotElement&&e instanceof HTMLSlotElement&&i.push(...e.assignedElements()),t?i.filter((e=>e.matches(t))):i}function E(e){try{return void console.warn(e)}catch(e){}}function T(e,t){void 0===t&&(t=[]);const s=document.createElement(e);return s.classList.add(...Array.isArray(t)?t:function(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}(t)),s}function C(e,t){return f().getComputedStyle(e,null).getPropertyValue(t)}function M(e){let t,s=e;if(s){for(t=0;null!==(s=s.previousSibling);)1===s.nodeType&&(t+=1);return t}}function P(e,t){const s=[];let i=e.parentElement;for(;i;)t?i.matches(t)&&s.push(i):s.push(i),i=i.parentElement;return s}function _(e,t,s){const i=f();return s?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(i.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function k(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}let L,O,A;function I(){return L||(L=function(){const e=f(),t=u();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),L}function z(e){return void 0===e&&(e={}),O||(O=function(e){let{userAgent:t}=void 0===e?{}:e;const s=I(),i=f(),a=i.navigator.platform,r=t||i.navigator.userAgent,n={ios:!1,android:!1},l=i.screen.width,o=i.screen.height,d=r.match(/(Android);?[\s\/]+([\d.]+)?/);let c=r.match(/(iPad).*OS\s([\d_]+)/);const p=r.match(/(iPod)(.*OS\s([\d_]+))?/),u=!c&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===a;let h="MacIntel"===a;return!c&&h&&s.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${l}x${o}`)>=0&&(c=r.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),h=!1),d&&!m&&(n.os="android",n.android=!0),(c||u||p)&&(n.os="ios",n.ios=!0),n}(e)),O}function j(){return A||(A=function(){const e=f(),t=z();let s=!1;function i(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(i()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,i]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));s=e<16||16===e&&i<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=i();return{isSafari:s||r,needPerspectiveFix:s,need3dFix:r||a&&t.ios,isWebView:a}}()),A}var $={on(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const a=s?"unshift":"push";return e.split(" ").forEach((e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)})),i},once(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;function a(){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];t.apply(i,r)}return a.__emitterProxy=t,i.on(e,a,s)},onAny(e,t){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof e)return s;const i=t?"unshift":"push";return s.eventsAnyListeners.indexOf(e)<0&&s.eventsAnyListeners[i](e),s},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf(e);return s>=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach(((i,a)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&s.eventsListeners[e].splice(a,1)}))})),s):s},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,s,i;for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];return"string"==typeof r[0]||Array.isArray(r[0])?(t=r[0],s=r.slice(1,r.length),i=e):(t=r[0].events,s=r[0].data,i=r[0].context||e),s.unshift(i),(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(i,[t,...s])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(i,s)}))})),e}};const N=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)},B=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)},D=(e,t)=>{if(!e||e.destroyed||!e.params)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){let t=s.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(s.shadowRoot?t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{s.shadowRoot&&(t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},G=(e,t)=>{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&&s.removeAttribute("loading")},F=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t<0)return;t=Math.min(t,s);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=a,r=[s-t];return r.push(...Array.from({length:t}).map(((e,t)=>s+i+t))),void e.slides.forEach(((t,s)=>{r.includes(t.column)&&G(e,s)}))}const r=a+i-1;if(e.params.rewind||e.params.loop)for(let i=a-t;i<=r+t;i+=1){const t=(i%s+s)%s;(t<a||t>r)&&G(e,t)}else for(let i=Math.max(a-t,0);i<=Math.min(r+t,s-1);i+=1)i!==a&&(i>r||i<a)&&G(e,i)};var H={updateSize:function(){const e=this;let t,s;const i=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i.clientWidth,s=void 0!==e.params.height&&null!==e.params.height?e.params.height:i.clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(C(i,"padding-left")||0,10)-parseInt(C(i,"padding-right")||0,10),s=s-parseInt(C(i,"padding-top")||0,10)-parseInt(C(i,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(s)&&(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t,s){return parseFloat(t.getPropertyValue(e.getDirectionLabel(s))||0)}const s=e.params,{wrapperEl:i,slidesEl:a,size:r,rtlTranslate:n,wrongRTL:l}=e,o=e.virtual&&s.virtual.enabled,d=o?e.virtual.slides.length:e.slides.length,c=S(a,`.${e.params.slideClass}, swiper-slide`),p=o?e.virtual.slides.length:c.length;let u=[];const m=[],f=[];let h=s.slidesOffsetBefore;"function"==typeof h&&(h=s.slidesOffsetBefore.call(e));let g=s.slidesOffsetAfter;"function"==typeof g&&(g=s.slidesOffsetAfter.call(e));const v=e.snapGrid.length,b=e.slidesGrid.length;let y=s.spaceBetween,x=-h,E=0,T=0;if(void 0===r)return;"string"==typeof y&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*r:"string"==typeof y&&(y=parseFloat(y)),e.virtualSize=-y,c.forEach((e=>{n?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),s.centeredSlides&&s.cssMode&&(w(i,"--swiper-centered-offset-before",""),w(i,"--swiper-centered-offset-after",""));const M=s.grid&&s.grid.rows>1&&e.grid;let P;M?e.grid.initSlides(c):e.grid&&e.grid.unsetSlides();const k="auto"===s.slidesPerView&&s.breakpoints&&Object.keys(s.breakpoints).filter((e=>void 0!==s.breakpoints[e].slidesPerView)).length>0;for(let i=0;i<p;i+=1){let a;if(P=0,c[i]&&(a=c[i]),M&&e.grid.updateSlide(i,a,c),!c[i]||"none"!==C(a,"display")){if("auto"===s.slidesPerView){k&&(c[i].style[e.getDirectionLabel("width")]="");const r=getComputedStyle(a),n=a.style.transform,l=a.style.webkitTransform;if(n&&(a.style.transform="none"),l&&(a.style.webkitTransform="none"),s.roundLengths)P=e.isHorizontal()?_(a,"width",!0):_(a,"height",!0);else{const e=t(r,"width"),s=t(r,"padding-left"),i=t(r,"padding-right"),n=t(r,"margin-left"),l=t(r,"margin-right"),o=r.getPropertyValue("box-sizing");if(o&&"border-box"===o)P=e+n+l;else{const{clientWidth:t,offsetWidth:r}=a;P=e+s+i+n+l+(r-t)}}n&&(a.style.transform=n),l&&(a.style.webkitTransform=l),s.roundLengths&&(P=Math.floor(P))}else P=(r-(s.slidesPerView-1)*y)/s.slidesPerView,s.roundLengths&&(P=Math.floor(P)),c[i]&&(c[i].style[e.getDirectionLabel("width")]=`${P}px`);c[i]&&(c[i].swiperSlideSize=P),f.push(P),s.centeredSlides?(x=x+P/2+E/2+y,0===E&&0!==i&&(x=x-r/2-y),0===i&&(x=x-r/2-y),Math.abs(x)<.001&&(x=0),s.roundLengths&&(x=Math.floor(x)),T%s.slidesPerGroup==0&&u.push(x),m.push(x)):(s.roundLengths&&(x=Math.floor(x)),(T-Math.min(e.params.slidesPerGroupSkip,T))%e.params.slidesPerGroup==0&&u.push(x),m.push(x),x=x+P+y),e.virtualSize+=P+y,E=P,T+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+g,n&&l&&("slide"===s.effect||"coverflow"===s.effect)&&(i.style.width=`${e.virtualSize+y}px`),s.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),M&&e.grid.updateWrapperSize(P,u),!s.centeredSlides){const t=[];for(let i=0;i<u.length;i+=1){let a=u[i];s.roundLengths&&(a=Math.floor(a)),u[i]<=e.virtualSize-r&&t.push(a)}u=t,Math.floor(e.virtualSize-r)-Math.floor(u[u.length-1])>1&&u.push(e.virtualSize-r)}if(o&&s.loop){const t=f[0]+y;if(s.slidesPerGroup>1){const i=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/s.slidesPerGroup),a=t*s.slidesPerGroup;for(let e=0;e<i;e+=1)u.push(u[u.length-1]+a)}for(let i=0;i<e.virtual.slidesBefore+e.virtual.slidesAfter;i+=1)1===s.slidesPerGroup&&u.push(u[u.length-1]+t),m.push(m[m.length-1]+t),e.virtualSize+=t}if(0===u.length&&(u=[0]),0!==y){const t=e.isHorizontal()&&n?"marginLeft":e.getDirectionLabel("marginRight");c.filter(((e,t)=>!(s.cssMode&&!s.loop)||t!==c.length-1)).forEach((e=>{e.style[t]=`${y}px`}))}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;f.forEach((t=>{e+=t+(y||0)})),e-=y;const t=e>r?e-r:0;u=u.map((e=>e<=0?-h:e>t?t+g:e))}if(s.centerInsufficientSlides){let e=0;f.forEach((t=>{e+=t+(y||0)})),e-=y;const t=(s.slidesOffsetBefore||0)+(s.slidesOffsetAfter||0);if(e+t<r){const s=(r-e-t)/2;u.forEach(((e,t)=>{u[t]=e-s})),m.forEach(((e,t)=>{m[t]=e+s}))}}if(Object.assign(e,{slides:c,snapGrid:u,slidesGrid:m,slidesSizesGrid:f}),s.centeredSlides&&s.cssMode&&!s.centeredSlidesBounds){w(i,"--swiper-centered-offset-before",-u[0]+"px"),w(i,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+s))}if(p!==d&&e.emit("slidesLengthChange"),u.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),m.length!==b&&e.emit("slidesGridLengthChange"),s.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(o||s.cssMode||"slide"!==s.effect&&"fade"!==s.effect)){const t=`${s.containerModifierClass}backface-hidden`,i=e.el.classList.contains(t);p<=s.maxBackfaceHiddenSlides?i||e.el.classList.add(t):i&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,s=[],i=t.virtual&&t.params.virtual.enabled;let a,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const n=e=>i?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{s.push(e)}));else for(a=0;a<Math.ceil(t.params.slidesPerView);a+=1){const e=t.activeIndex+a;if(e>t.slides.length&&!i)break;s.push(n(e))}else s.push(n(t.activeIndex));for(a=0;a<s.length;a+=1)if(void 0!==s[a]){const e=s[a].offsetHeight;r=e>r?e:r}(r||0===r)&&(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-s-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,s=t.params,{slides:i,rtlTranslate:a,snapGrid:r}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let n=-e;a&&(n=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let l=s.spaceBetween;"string"==typeof l&&l.indexOf("%")>=0?l=parseFloat(l.replace("%",""))/100*t.size:"string"==typeof l&&(l=parseFloat(l));for(let e=0;e<i.length;e+=1){const o=i[e];let d=o.swiperSlideOffset;s.cssMode&&s.centeredSlides&&(d-=i[0].swiperSlideOffset);const c=(n+(s.centeredSlides?t.minTranslate():0)-d)/(o.swiperSlideSize+l),p=(n-r[0]+(s.centeredSlides?t.minTranslate():0)-d)/(o.swiperSlideSize+l),u=-(n-d),m=u+t.slidesSizesGrid[e],f=u>=0&&u<=t.size-t.slidesSizesGrid[e],h=u>=0&&u<t.size-1||m>1&&m<=t.size||u<=0&&m>=t.size;h&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(e)),N(o,h,s.slideVisibleClass),N(o,f,s.slideFullyVisibleClass),o.progress=a?-c:c,o.originalProgress=a?-p:p}},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:r,isEnd:n,progressLoop:l}=t;const o=r,d=n;if(0===i)a=0,r=!0,n=!0;else{a=(e-t.minTranslate())/i;const s=Math.abs(e-t.minTranslate())<1,l=Math.abs(e-t.maxTranslate())<1;r=s||a<=0,n=l||a>=1,s&&(a=0),l&&(a=1)}if(s.loop){const s=t.getSlideIndexByData(0),i=t.getSlideIndexByData(t.slides.length-1),a=t.slidesGrid[s],r=t.slidesGrid[i],n=t.slidesGrid[t.slidesGrid.length-1],o=Math.abs(e);l=o>=a?(o-a)/n:(o+n-r)/n,l>1&&(l-=1)}Object.assign(t,{progress:a,progressLoop:l,isBeginning:r,isEnd:n}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!d&&t.emit("reachEnd toEdge"),(o&&!r||d&&!n)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,slidesEl:i,activeIndex:a}=e,r=e.virtual&&s.virtual.enabled,n=e.grid&&s.grid&&s.grid.rows>1,l=e=>S(i,`.${s.slideClass}${e}, swiper-slide${e}`)[0];let o,d,c;if(r)if(s.loop){let t=a-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),o=l(`[data-swiper-slide-index="${t}"]`)}else o=l(`[data-swiper-slide-index="${a}"]`);else n?(o=t.find((e=>e.column===a)),c=t.find((e=>e.column===a+1)),d=t.find((e=>e.column===a-1))):o=t[a];o&&(n||(c=function(e,t){const s=[];for(;e.nextElementSibling;){const i=e.nextElementSibling;t?i.matches(t)&&s.push(i):s.push(i),e=i}return s}(o,`.${s.slideClass}, swiper-slide`)[0],s.loop&&!c&&(c=t[0]),d=function(e,t){const s=[];for(;e.previousElementSibling;){const i=e.previousElementSibling;t?i.matches(t)&&s.push(i):s.push(i),e=i}return s}(o,`.${s.slideClass}, swiper-slide`)[0],s.loop&&0===!d&&(d=t[t.length-1]))),t.forEach((e=>{B(e,e===o,s.slideActiveClass),B(e,e===c,s.slideNextClass),B(e,e===d,s.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{snapGrid:i,params:a,activeIndex:r,realIndex:n,snapIndex:l}=t;let o,d=e;const c=e=>{let s=e-t.virtual.slidesBefore;return s<0&&(s=t.virtual.slides.length+s),s>=t.virtual.slides.length&&(s-=t.virtual.slides.length),s};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:s}=e,i=e.rtlTranslate?e.translate:-e.translate;let a;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?i>=t[e]&&i<t[e+1]-(t[e+1]-t[e])/2?a=e:i>=t[e]&&i<t[e+1]&&(a=e+1):i>=t[e]&&(a=e);return s.normalizeSlideIndex&&(a<0||void 0===a)&&(a=0),a}(t)),i.indexOf(s)>=0)o=i.indexOf(s);else{const e=Math.min(a.slidesPerGroupSkip,d);o=e+Math.floor((d-e)/a.slidesPerGroup)}if(o>=i.length&&(o=i.length-1),d===r&&!t.params.loop)return void(o!==l&&(t.snapIndex=o,t.emit("snapIndexChange")));if(d===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=c(d));const p=t.grid&&a.grid&&a.grid.rows>1;let u;if(t.virtual&&a.virtual.enabled&&a.loop)u=c(d);else if(p){const e=t.slides.find((e=>e.column===d));let s=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(s)&&(s=Math.max(t.slides.indexOf(e),0)),u=Math.floor(s/a.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");u=e?parseInt(e,10):d}else u=d;Object.assign(t,{previousSnapIndex:l,snapIndex:o,previousRealIndex:n,realIndex:u,previousIndex:r,activeIndex:d}),t.initialized&&F(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(n!==u&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const s=this,i=s.params;let a=e.closest(`.${i.slideClass}, swiper-slide`);!a&&s.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!a&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(a=e)}));let r,n=!1;if(a)for(let e=0;e<s.slides.length;e+=1)if(s.slides[e]===a){n=!0,r=e;break}if(!a||!n)return s.clickedSlide=void 0,void(s.clickedIndex=void 0);s.clickedSlide=a,s.virtual&&s.params.virtual.enabled?s.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):s.clickedIndex=r,i.slideToClickedSlide&&void 0!==s.clickedIndex&&s.clickedIndex!==s.activeIndex&&s.slideToClickedSlide()}};function V(e){let{swiper:t,runCallbacks:s,direction:i,step:a}=e;const{activeIndex:r,previousIndex:n}=t;let l=i;if(l||(l=r>n?"next":r<n?"prev":"reset"),t.emit(`transition${a}`),s&&r!==n){if("reset"===l)return void t.emit(`slideResetTransition${a}`);t.emit(`slideChangeTransition${a}`),"next"===l?t.emit(`slideNextTransition${a}`):t.emit(`slidePrevTransition${a}`)}}var R={slideTo:function(e,t,s,i,a){void 0===e&&(e=0),void 0===s&&(s=!0),"string"==typeof e&&(e=parseInt(e,10));const r=this;let n=e;n<0&&(n=0);const{params:l,snapGrid:o,slidesGrid:d,previousIndex:c,activeIndex:p,rtlTranslate:u,wrapperEl:m,enabled:f}=r;if(!f&&!i&&!a||r.destroyed||r.animating&&l.preventInteractionOnTransition)return!1;void 0===t&&(t=r.params.speed);const h=Math.min(r.params.slidesPerGroupSkip,n);let g=h+Math.floor((n-h)/r.params.slidesPerGroup);g>=o.length&&(g=o.length-1);const v=-o[g];if(l.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),s=Math.floor(100*d[e]),i=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=s&&t<i-(i-s)/2?n=e:t>=s&&t<i&&(n=e+1):t>=s&&(n=e)}if(r.initialized&&n!==p){if(!r.allowSlideNext&&(u?v>r.translate&&v>r.minTranslate():v<r.translate&&v<r.minTranslate()))return!1;if(!r.allowSlidePrev&&v>r.translate&&v>r.maxTranslate()&&(p||0)!==n)return!1}let b;n!==(c||0)&&s&&r.emit("beforeSlideChangeStart"),r.updateProgress(v),b=n>p?"next":n<p?"prev":"reset";const w=r.virtual&&r.params.virtual.enabled;if((!w||!a)&&(u&&-v===r.translate||!u&&v===r.translate))return r.updateActiveIndex(n),l.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==l.effect&&r.setTranslate(v),"reset"!==b&&(r.transitionStart(s,b),r.transitionEnd(s,b)),!1;if(l.cssMode){const e=r.isHorizontal(),s=u?v:-v;if(0===t)w&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),w&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{m[e?"scrollLeft":"scrollTop"]=s}))):m[e?"scrollLeft":"scrollTop"]=s,w&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}));else{if(!r.support.smoothScroll)return y({swiper:r,targetPosition:s,side:e?"left":"top"}),!0;m.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}const x=j().isSafari;return w&&!a&&x&&r.isElement&&r.virtual.update(!1,!1,n),r.setTransition(t),r.setTranslate(v),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,i),r.transitionStart(s,b),0===t?r.transitionEnd(s,b):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(s,b))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,i){void 0===e&&(e=0),void 0===s&&(s=!0),"string"==typeof e&&(e=parseInt(e,10));const a=this;if(a.destroyed)return;void 0===t&&(t=a.params.speed);const r=a.grid&&a.params.grid&&a.params.grid.rows>1;let n=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)n+=a.virtual.slidesBefore;else{let e;if(r){const t=n*a.params.grid.rows;e=a.slides.find((e=>1*e.getAttribute("data-swiper-slide-index")===t)).column}else e=a.getSlideIndexByData(n);const t=r?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:s}=a.params;let l=a.params.slidesPerView;"auto"===l?l=a.slidesPerViewDynamic():(l=Math.ceil(parseFloat(a.params.slidesPerView,10)),s&&l%2==0&&(l+=1));let o=t-e<l;if(s&&(o=o||e<Math.ceil(l/2)),i&&s&&"auto"!==a.params.slidesPerView&&!r&&(o=!1),o){const i=s?e<a.activeIndex?"prev":"next":e-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:i,slideTo:!0,activeSlideIndex:"next"===i?e+1:e-t+1,slideRealIndex:"next"===i?a.realIndex:void 0})}if(r){const e=n*a.params.grid.rows;n=a.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)).column}else n=a.getSlideIndexByData(n)}return requestAnimationFrame((()=>{a.slideTo(n,t,s,i)})),a},slideNext:function(e,t,s){void 0===t&&(t=!0);const i=this,{enabled:a,params:r,animating:n}=i;if(!a||i.destroyed)return i;void 0===e&&(e=i.params.speed);let l=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(l=Math.max(i.slidesPerViewDynamic("current",!0),1));const o=i.activeIndex<r.slidesPerGroupSkip?1:l,d=i.virtual&&r.virtual.enabled;if(r.loop){if(n&&!d&&r.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&r.cssMode)return requestAnimationFrame((()=>{i.slideTo(i.activeIndex+o,e,t,s)})),!0}return r.rewind&&i.isEnd?i.slideTo(0,e,t,s):i.slideTo(i.activeIndex+o,e,t,s)},slidePrev:function(e,t,s){void 0===t&&(t=!0);const i=this,{params:a,snapGrid:r,slidesGrid:n,rtlTranslate:l,enabled:o,animating:d}=i;if(!o||i.destroyed)return i;void 0===e&&(e=i.params.speed);const c=i.virtual&&a.virtual.enabled;if(a.loop){if(d&&!c&&a.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function p(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const u=p(l?i.translate:-i.translate),m=r.map((e=>p(e))),f=a.freeMode&&a.freeMode.enabled;let h=r[m.indexOf(u)-1];if(void 0===h&&(a.cssMode||f)){let e;r.forEach(((t,s)=>{u>=t&&(e=s)})),void 0!==e&&(h=f?r[e]:r[e>0?e-1:e])}let g=0;if(void 0!==h&&(g=n.indexOf(h),g<0&&(g=i.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(g=g-i.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&i.isBeginning){const a=i.params.virtual&&i.params.virtual.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(a,e,t,s)}return a.loop&&0===i.activeIndex&&a.cssMode?(requestAnimationFrame((()=>{i.slideTo(g,e,t,s)})),!0):i.slideTo(g,e,t,s)},slideReset:function(e,t,s){void 0===t&&(t=!0);const i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,s)},slideToClosest:function(e,t,s,i){void 0===t&&(t=!0),void 0===i&&(i=.5);const a=this;if(a.destroyed)return;void 0===e&&(e=a.params.speed);let r=a.activeIndex;const n=Math.min(a.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/a.params.slidesPerGroup),o=a.rtlTranslate?a.translate:-a.translate;if(o>=a.snapGrid[l]){const e=a.snapGrid[l];o-e>(a.snapGrid[l+1]-e)*i&&(r+=a.params.slidesPerGroup)}else{const e=a.snapGrid[l-1];o-e<=(a.snapGrid[l]-e)*i&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,s)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:s}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,r=e.clickedIndex;const n=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;a=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?r<e.loopedSlides-i/2||r>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),r=e.getSlideIndex(S(s,`${n}[data-swiper-slide-index="${a}"]`)[0]),h((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-i?(e.loopFix(),r=e.getSlideIndex(S(s,`${n}[data-swiper-slide-index="${a}"]`)[0]),h((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}},q={loopCreate:function(e,t){const s=this,{params:i,slidesEl:a}=s;if(!i.loop||s.virtual&&s.params.virtual.enabled)return;const r=()=>{S(a,`.${i.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},n=s.grid&&i.grid&&i.grid.rows>1,l=i.slidesPerGroup*(n?i.grid.rows:1),o=s.slides.length%l!=0,d=n&&s.slides.length%i.grid.rows!=0,c=e=>{for(let t=0;t<e;t+=1){const e=s.isElement?T("swiper-slide",[i.slideBlankClass]):T("div",[i.slideClass,i.slideBlankClass]);s.slidesEl.append(e)}};o?(i.loopAddBlankSlides?(c(l-s.slides.length%l),s.recalcSlides(),s.updateSlides()):E("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),r()):d?(i.loopAddBlankSlides?(c(i.grid.rows-s.slides.length%i.grid.rows),s.recalcSlides(),s.updateSlides()):E("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),r()):r(),s.loopFix({slideRealIndex:e,direction:i.centeredSlides?void 0:"next",initial:t})},loopFix:function(e){let{slideRealIndex:t,slideTo:s=!0,direction:i,setTranslate:a,activeSlideIndex:r,initial:n,byController:l,byMousewheel:o}=void 0===e?{}:e;const d=this;if(!d.params.loop)return;d.emit("beforeLoopFix");const{slides:c,allowSlidePrev:p,allowSlideNext:u,slidesEl:m,params:f}=d,{centeredSlides:h,initialSlide:g}=f;if(d.allowSlidePrev=!0,d.allowSlideNext=!0,d.virtual&&f.virtual.enabled)return s&&(f.centeredSlides||0!==d.snapIndex?f.centeredSlides&&d.snapIndex<f.slidesPerView?d.slideTo(d.virtual.slides.length+d.snapIndex,0,!1,!0):d.snapIndex===d.snapGrid.length-1&&d.slideTo(d.virtual.slidesBefore,0,!1,!0):d.slideTo(d.virtual.slides.length,0,!1,!0)),d.allowSlidePrev=p,d.allowSlideNext=u,void d.emit("loopFix");let v=f.slidesPerView;"auto"===v?v=d.slidesPerViewDynamic():(v=Math.ceil(parseFloat(f.slidesPerView,10)),h&&v%2==0&&(v+=1));const b=f.slidesPerGroupAuto?v:f.slidesPerGroup;let w=b;w%b!=0&&(w+=b-w%b),w+=f.loopAdditionalSlides,d.loopedSlides=w;const y=d.grid&&f.grid&&f.grid.rows>1;c.length<v+w||"cards"===d.params.effect&&c.length<v+2*w?E("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):y&&"row"===f.grid.fill&&E("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const x=[],S=[],T=y?Math.ceil(c.length/f.grid.rows):c.length,C=n&&T-g<v&&!h;let M=C?g:d.activeIndex;void 0===r?r=d.getSlideIndex(c.find((e=>e.classList.contains(f.slideActiveClass)))):M=r;const P="next"===i||!i,_="prev"===i||!i;let k=0,L=0;const O=(y?c[r].column:r)+(h&&void 0===a?-v/2+.5:0);if(O<w){k=Math.max(w-O,b);for(let e=0;e<w-O;e+=1){const t=e-Math.floor(e/T)*T;if(y){const e=T-t-1;for(let t=c.length-1;t>=0;t-=1)c[t].column===e&&x.push(t)}else x.push(T-t-1)}}else if(O+v>T-w){L=Math.max(O-(T-2*w),b),C&&(L=Math.max(L,v-T+g+1));for(let e=0;e<L;e+=1){const t=e-Math.floor(e/T)*T;y?c.forEach(((e,s)=>{e.column===t&&S.push(s)})):S.push(t)}}if(d.__preventObserver__=!0,requestAnimationFrame((()=>{d.__preventObserver__=!1})),"cards"===d.params.effect&&c.length<v+2*w&&(S.includes(r)&&S.splice(S.indexOf(r),1),x.includes(r)&&x.splice(x.indexOf(r),1)),_&&x.forEach((e=>{c[e].swiperLoopMoveDOM=!0,m.prepend(c[e]),c[e].swiperLoopMoveDOM=!1})),P&&S.forEach((e=>{c[e].swiperLoopMoveDOM=!0,m.append(c[e]),c[e].swiperLoopMoveDOM=!1})),d.recalcSlides(),"auto"===f.slidesPerView?d.updateSlides():y&&(x.length>0&&_||S.length>0&&P)&&d.slides.forEach(((e,t)=>{d.grid.updateSlide(t,e,d.slides)})),f.watchSlidesProgress&&d.updateSlidesOffset(),s)if(x.length>0&&_){if(void 0===t){const e=d.slidesGrid[M],t=d.slidesGrid[M+k]-e;o?d.setTranslate(d.translate-t):(d.slideTo(M+Math.ceil(k),0,!1,!0),a&&(d.touchEventsData.startTranslate=d.touchEventsData.startTranslate-t,d.touchEventsData.currentTranslate=d.touchEventsData.currentTranslate-t))}else if(a){const e=y?x.length/f.grid.rows:x.length;d.slideTo(d.activeIndex+e,0,!1,!0),d.touchEventsData.currentTranslate=d.translate}}else if(S.length>0&&P)if(void 0===t){const e=d.slidesGrid[M],t=d.slidesGrid[M-L]-e;o?d.setTranslate(d.translate-t):(d.slideTo(M-L,0,!1,!0),a&&(d.touchEventsData.startTranslate=d.touchEventsData.startTranslate-t,d.touchEventsData.currentTranslate=d.touchEventsData.currentTranslate-t))}else{const e=y?S.length/f.grid.rows:S.length;d.slideTo(d.activeIndex-e,0,!1,!0)}if(d.allowSlidePrev=p,d.allowSlideNext=u,d.controller&&d.controller.control&&!l){const e={slideRealIndex:t,direction:i,setTranslate:a,activeSlideIndex:r,byController:!0};Array.isArray(d.controller.control)?d.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&s})})):d.controller.control instanceof d.constructor&&d.controller.control.params.loop&&d.controller.control.loopFix({...e,slideTo:d.controller.control.params.slidesPerView===f.slidesPerView&&s})}d.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||!s||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const i=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;i[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),i.forEach((e=>{s.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function W(e,t,s){const i=f(),{params:a}=e,r=a.edgeSwipeDetection,n=a.edgeSwipeThreshold;return!r||!(s<=n||s>=i.innerWidth-n)||"prevent"===r&&(t.preventDefault(),!0)}function X(e){const t=this,s=u();let i=e;i.originalEvent&&(i=i.originalEvent);const a=t.touchEventsData;if("pointerdown"===i.type){if(null!==a.pointerId&&a.pointerId!==i.pointerId)return;a.pointerId=i.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(a.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void W(t,i,i.targetTouches[0].pageX);const{params:r,touches:n,enabled:l}=t;if(!l)return;if(!r.simulateTouch&&"mouse"===i.pointerType)return;if(t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let o=i.target;if("wrapper"===r.touchEventsTarget&&!function(e,t){const s=f();let i=t.contains(e);return!i&&s.HTMLSlotElement&&t instanceof HTMLSlotElement&&(i=[...t.assignedElements()].includes(e),i||(i=function(e,t){const s=[t];for(;s.length>0;){const t=s.shift();if(e===t)return!0;s.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t))),i}(o,t.wrapperEl))return;if("which"in i&&3===i.which)return;if("button"in i&&i.button>0)return;if(a.isTouched&&a.isMoved)return;const d=!!r.noSwipingClass&&""!==r.noSwipingClass,c=i.composedPath?i.composedPath():i.path;d&&i.target&&i.target.shadowRoot&&c&&(o=c[0]);const p=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,m=!(!i.target||!i.target.shadowRoot);if(r.noSwiping&&(m?function(e,t){return void 0===t&&(t=this),function t(s){if(!s||s===u()||s===f())return null;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest(e);return i||s.getRootNode?i||t(s.getRootNode().host):null}(t)}(p,o):o.closest(p)))return void(t.allowClick=!0);if(r.swipeHandler&&!o.closest(r.swipeHandler))return;n.currentX=i.pageX,n.currentY=i.pageY;const h=n.currentX,v=n.currentY;if(!W(t,i,h))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),n.startX=h,n.startY=v,a.touchStartTime=g(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1);let b=!0;o.matches(a.focusableElements)&&(b=!1,"SELECT"===o.nodeName&&(a.isTouched=!1)),s.activeElement&&s.activeElement.matches(a.focusableElements)&&s.activeElement!==o&&("mouse"===i.pointerType||"mouse"!==i.pointerType&&!o.matches(a.focusableElements))&&s.activeElement.blur();const w=b&&t.allowTouchMove&&r.touchStartPreventDefault;!r.touchStartForcePreventDefault&&!w||o.isContentEditable||i.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",i)}function Y(e){const t=u(),s=this,i=s.touchEventsData,{params:a,touches:r,rtlTranslate:n,enabled:l}=s;if(!l)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;let o,d=e;if(d.originalEvent&&(d=d.originalEvent),"pointermove"===d.type){if(null!==i.touchId)return;if(d.pointerId!==i.pointerId)return}if("touchmove"===d.type){if(o=[...d.changedTouches].find((e=>e.identifier===i.touchId)),!o||o.identifier!==i.touchId)return}else o=d;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&s.emit("touchMoveOpposite",d));const c=o.pageX,p=o.pageY;if(d.preventedByNestedSwiper)return r.startX=c,void(r.startY=p);if(!s.allowTouchMove)return d.target.matches(i.focusableElements)||(s.allowClick=!1),void(i.isTouched&&(Object.assign(r,{startX:c,startY:p,currentX:c,currentY:p}),i.touchStartTime=g()));if(a.touchReleaseOnEdges&&!a.loop)if(s.isVertical()){if(p<r.startY&&s.translate<=s.maxTranslate()||p>r.startY&&s.translate>=s.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else{if(n&&(c>r.startX&&-s.translate<=s.maxTranslate()||c<r.startX&&-s.translate>=s.minTranslate()))return;if(!n&&(c<r.startX&&s.translate<=s.maxTranslate()||c>r.startX&&s.translate>=s.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(i.focusableElements)&&t.activeElement!==d.target&&"mouse"!==d.pointerType&&t.activeElement.blur(),t.activeElement&&d.target===t.activeElement&&d.target.matches(i.focusableElements))return i.isMoved=!0,void(s.allowClick=!1);i.allowTouchCallbacks&&s.emit("touchMove",d),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=c,r.currentY=p;const m=r.currentX-r.startX,f=r.currentY-r.startY;if(s.params.threshold&&Math.sqrt(m**2+f**2)<s.params.threshold)return;if(void 0===i.isScrolling){let e;s.isHorizontal()&&r.currentY===r.startY||s.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:m*m+f*f>=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(m))/Math.PI,i.isScrolling=s.isHorizontal()?e>a.touchAngle:90-e>a.touchAngle)}if(i.isScrolling&&s.emit("touchMoveOpposite",d),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===d.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;s.allowClick=!1,!a.cssMode&&d.cancelable&&d.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&d.stopPropagation();let h=s.isHorizontal()?m:f,v=s.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;a.oneWayMovement&&(h=Math.abs(h)*(n?1:-1),v=Math.abs(v)*(n?1:-1)),r.diff=h,h*=a.touchRatio,n&&(h=-h,v=-v);const b=s.touchesDirection;s.swipeDirection=h>0?"prev":"next",s.touchesDirection=v>0?"prev":"next";const w=s.params.loop&&!a.cssMode,y="next"===s.touchesDirection&&s.allowSlideNext||"prev"===s.touchesDirection&&s.allowSlidePrev;if(!i.isMoved){if(w&&y&&s.loopFix({direction:s.swipeDirection}),i.startTranslate=s.getTranslate(),s.setTransition(0),s.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});s.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!a.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",d)}if((new Date).getTime(),!1!==a._loopSwapReset&&i.isMoved&&i.allowThresholdMove&&b!==s.touchesDirection&&w&&y&&Math.abs(h)>=1)return Object.assign(r,{startX:c,startY:p,currentX:c,currentY:p,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);s.emit("sliderMove",d),i.isMoved=!0,i.currentTranslate=h+i.startTranslate;let x=!0,S=a.resistanceRatio;if(a.touchReleaseOnEdges&&(S=0),h>0?(w&&y&&i.allowThresholdMove&&i.currentTranslate>(a.centeredSlides?s.minTranslate()-s.slidesSizesGrid[s.activeIndex+1]-("auto"!==a.slidesPerView&&s.slides.length-a.slidesPerView>=2?s.slidesSizesGrid[s.activeIndex+1]+s.params.spaceBetween:0)-s.params.spaceBetween:s.minTranslate())&&s.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>s.minTranslate()&&(x=!1,a.resistance&&(i.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+i.startTranslate+h)**S))):h<0&&(w&&y&&i.allowThresholdMove&&i.currentTranslate<(a.centeredSlides?s.maxTranslate()+s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween+("auto"!==a.slidesPerView&&s.slides.length-a.slidesPerView>=2?s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween:0):s.maxTranslate())&&s.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:s.slides.length-("auto"===a.slidesPerView?s.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),i.currentTranslate<s.maxTranslate()&&(x=!1,a.resistance&&(i.currentTranslate=s.maxTranslate()+1-(s.maxTranslate()-i.startTranslate-h)**S))),x&&(d.preventedByNestedSwiper=!0),!s.allowSlideNext&&"next"===s.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!s.allowSlidePrev&&"prev"===s.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),s.allowSlidePrev||s.allowSlideNext||(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(h)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=s.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode&&a.freeMode.enabled&&s.freeMode||a.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(i.currentTranslate),s.setTranslate(i.currentTranslate))}function U(e){const t=this,s=t.touchEventsData;let i,a=e;if(a.originalEvent&&(a=a.originalEvent),"touchend"===a.type||"touchcancel"===a.type){if(i=[...a.changedTouches].find((e=>e.identifier===s.touchId)),!i||i.identifier!==s.touchId)return}else{if(null!==s.touchId)return;if(a.pointerId!==s.pointerId)return;i=a}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(a.type)&&(!["pointercancel","contextmenu"].includes(a.type)||!t.browser.isSafari&&!t.browser.isWebView))return;s.pointerId=null,s.touchId=null;const{params:r,touches:n,rtlTranslate:l,slidesGrid:o,enabled:d}=t;if(!d)return;if(!r.simulateTouch&&"mouse"===a.pointerType)return;if(s.allowTouchCallbacks&&t.emit("touchEnd",a),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&r.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);r.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=g(),p=c-s.touchStartTime;if(t.allowClick){const e=a.path||a.composedPath&&a.composedPath();t.updateClickedSlide(e&&e[0]||a.target,e),t.emit("tap click",a),p<300&&c-s.lastClickTime<300&&t.emit("doubleTap doubleClick",a)}if(s.lastClickTime=g(),h((()=>{t.destroyed||(t.allowClick=!0)})),!s.isTouched||!s.isMoved||!t.swipeDirection||0===n.diff&&!s.loopSwapReset||s.currentTranslate===s.startTranslate&&!s.loopSwapReset)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let u;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,u=r.followFinger?l?t.translate:-t.translate:-s.currentTranslate,r.cssMode)return;if(r.freeMode&&r.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:u});const m=u>=-t.maxTranslate()&&!t.params.loop;let f=0,v=t.slidesSizesGrid[0];for(let e=0;e<o.length;e+=e<r.slidesPerGroupSkip?1:r.slidesPerGroup){const t=e<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;void 0!==o[e+t]?(m||u>=o[e]&&u<o[e+t])&&(f=e,v=o[e+t]-o[e]):(m||u>=o[e])&&(f=e,v=o[o.length-1]-o[o.length-2])}let b=null,w=null;r.rewind&&(t.isBeginning?w=r.virtual&&r.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const y=(u-o[f])/v,x=f<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(p>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(y>=r.longSwipesRatio?t.slideTo(r.rewind&&t.isEnd?b:f+x):t.slideTo(f)),"prev"===t.swipeDirection&&(y>1-r.longSwipesRatio?t.slideTo(f+x):null!==w&&y<0&&Math.abs(y)>r.longSwipesRatio?t.slideTo(w):t.slideTo(f))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||a.target!==t.navigation.nextEl&&a.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(null!==b?b:f+x),"prev"===t.swipeDirection&&t.slideTo(null!==w?w:f)):a.target===t.navigation.nextEl?t.slideTo(f+x):t.slideTo(f)}}function K(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:a,snapGrid:r}=e,n=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const l=n&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||l?e.params.loop&&!n?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function J(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Z(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:i}=e;if(!i)return;let a;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();a=0===r?0:(e.translate-e.minTranslate())/r,a!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Q(e){const t=this;D(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function ee(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const te=(e,t)=>{const s=u(),{params:i,el:a,wrapperEl:r,device:n}=e,l=!!i.nested,o="on"===t?"addEventListener":"removeEventListener",d=t;a&&"string"!=typeof a&&(s[o]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:l}),a[o]("touchstart",e.onTouchStart,{passive:!1}),a[o]("pointerdown",e.onTouchStart,{passive:!1}),s[o]("touchmove",e.onTouchMove,{passive:!1,capture:l}),s[o]("pointermove",e.onTouchMove,{passive:!1,capture:l}),s[o]("touchend",e.onTouchEnd,{passive:!0}),s[o]("pointerup",e.onTouchEnd,{passive:!0}),s[o]("pointercancel",e.onTouchEnd,{passive:!0}),s[o]("touchcancel",e.onTouchEnd,{passive:!0}),s[o]("pointerout",e.onTouchEnd,{passive:!0}),s[o]("pointerleave",e.onTouchEnd,{passive:!0}),s[o]("contextmenu",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&&a[o]("click",e.onClick,!0),i.cssMode&&r[o]("scroll",e.onScroll),i.updateOnWindowResize?e[d](n.ios||n.android?"resize orientationchange observerUpdate":"resize observerUpdate",K,!0):e[d]("observerUpdate",K,!0),a[o]("load",e.onLoad,{capture:!0}))},se=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var ie={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function ae(e,t){return function(s){void 0===s&&(s={});const i=Object.keys(s)[0],a=s[i];"object"==typeof a&&null!==a?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in a?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),b(t,s)):b(t,s)):b(t,s)}}const re={eventsEmitter:$,update:H,translate:{getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:s,translate:i,wrapperEl:a}=this;if(t.virtualTranslate)return s?-i:i;if(t.cssMode)return i;let r=function(e,t){void 0===t&&(t="x");const s=f();let i,a,r;const n=function(e){const t=f();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(a=n.transform||n.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map((e=>e.replace(",","."))).join(", ")),r=new s.WebKitCSSMatrix("none"===a?"":a)):(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=r.toString().split(",")),"x"===t&&(a=s.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(a=s.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),a||0}(a,e);return r+=this.cssOverflowAdjustment(),s&&(r=-r),r||0},setTranslate:function(e,t){const s=this,{rtlTranslate:i,params:a,wrapperEl:r,progress:n}=s;let l,o=0,d=0;s.isHorizontal()?o=i?-e:e:d=e,a.roundLengths&&(o=Math.floor(o),d=Math.floor(d)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?o:d,a.cssMode?r[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-o:-d:a.virtualTranslate||(s.isHorizontal()?o-=s.cssOverflowAdjustment():d-=s.cssOverflowAdjustment(),r.style.transform=`translate3d(${o}px, ${d}px, 0px)`);const c=s.maxTranslate()-s.minTranslate();l=0===c?0:(e-s.minTranslate())/c,l!==n&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,s,i,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),void 0===i&&(i=!0);const r=this,{params:n,wrapperEl:l}=r;if(r.animating&&n.preventInteractionOnTransition)return!1;const o=r.minTranslate(),d=r.maxTranslate();let c;if(c=i&&e>o?o:i&&e<d?d:e,r.updateProgress(c),n.cssMode){const e=r.isHorizontal();if(0===t)l[e?"scrollLeft":"scrollTop"]=-c;else{if(!r.support.smoothScroll)return y({swiper:r,targetPosition:-c,side:e?"left":"top"}),!0;l.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(c),s&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(c),s&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,s&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){const s=this;s.params.cssMode||(s.wrapperEl.style.transitionDuration=`${e}ms`,s.wrapperEl.style.transitionDelay=0===e?"0ms":""),s.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const s=this,{params:i}=s;i.cssMode||(i.autoHeight&&s.updateAutoHeight(),V({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const s=this,{params:i}=s;s.animating=!1,i.cssMode||(s.setTransition(0),V({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:R,loop:q,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),s.style.cursor="move",s.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=X.bind(e),e.onTouchMove=Y.bind(e),e.onTouchEnd=U.bind(e),e.onDocumentTouchStart=ee.bind(e),t.cssMode&&(e.onScroll=Z.bind(e)),e.onClick=J.bind(e),e.onLoad=Q.bind(e),te(e,"on")},detachEvents:function(){te(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:i,el:a}=e,r=i.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const n=u(),l="window"!==i.breakpointsBase&&i.breakpointsBase?"container":i.breakpointsBase,o=["window","container"].includes(i.breakpointsBase)||!i.breakpointsBase?e.el:n.querySelector(i.breakpointsBase),d=e.getBreakpoint(r,l,o);if(!d||e.currentBreakpoint===d)return;const c=(d in r?r[d]:void 0)||e.originalParams,p=se(e,i),m=se(e,c),f=e.params.grabCursor,h=c.grabCursor,g=i.enabled;p&&!m?(a.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!p&&m&&(a.classList.add(`${i.containerModifierClass}grid`),(c.grid.fill&&"column"===c.grid.fill||!c.grid.fill&&"column"===i.grid.fill)&&a.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),f&&!h?e.unsetGrabCursor():!f&&h&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===c[t])return;const s=i[t]&&i[t].enabled,a=c[t]&&c[t].enabled;s&&!a&&e[t].disable(),!s&&a&&e[t].enable()}));const v=c.direction&&c.direction!==i.direction,w=i.loop&&(c.slidesPerView!==i.slidesPerView||v),y=i.loop;v&&s&&e.changeDirection(),b(e.params,c);const x=e.params.enabled,S=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),g&&!x?e.disable():!g&&x&&e.enable(),e.currentBreakpoint=d,e.emit("_beforeBreakpoint",c),s&&(w?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&S?(e.loopCreate(t),e.updateSlides()):y&&!S&&e.loopDestroy()),e.emit("breakpoint",c)},getBreakpoint:function(e,t,s){if(void 0===t&&(t="window"),!e||"container"===t&&!s)return;let i=!1;const a=f(),r="window"===t?a.innerHeight:s.clientHeight,n=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));n.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<n.length;e+=1){const{point:r,value:l}=n[e];"window"===t?a.matchMedia(`(min-width: ${l}px)`).matches&&(i=r):l<=s.clientWidth&&(i=r)}return i||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:i}=s;if(i){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:s,rtl:i,el:a,device:r}=e,n=function(e,t){const s=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((i=>{e[i]&&s.push(t+i)})):"string"==typeof e&&s.push(t+e)})),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:i},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...n),a.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}}},ne={};class le{constructor(){let e,t;for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?t=i[0]:[e,t]=i,t||(t={}),t=b({},t),e&&!t.el&&(t.el=e);const r=u();if(t.el&&"string"==typeof t.el&&r.querySelectorAll(t.el).length>1){const e=[];return r.querySelectorAll(t.el).forEach((s=>{const i=b({},t,{el:s});e.push(new le(i))})),e}const n=this;n.__swiper__=!0,n.support=I(),n.device=z({userAgent:t.userAgent}),n.browser=j(),n.eventsListeners={},n.eventsAnyListeners=[],n.modules=[...n.__modules__],t.modules&&Array.isArray(t.modules)&&n.modules.push(...t.modules);const l={};n.modules.forEach((e=>{e({params:t,swiper:n,extendParams:ae(t,l),on:n.on.bind(n),once:n.once.bind(n),off:n.off.bind(n),emit:n.emit.bind(n)})}));const o=b({},ie,l);return n.params=b({},o,ne,t),n.originalParams=b({},n.params),n.passedParams=b({},t),n.params&&n.params.on&&Object.keys(n.params.on).forEach((e=>{n.on(e,n.params.on[e])})),n.params&&n.params.onAny&&n.onAny(n.params.onAny),Object.assign(n,{enabled:n.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===n.params.direction,isVertical:()=>"vertical"===n.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:n.params.allowSlideNext,allowSlidePrev:n.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:n.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:n.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),n.emit("_swiper"),n.params.init&&n.init(),n}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:s}=this,i=M(S(t,`.${s.slideClass}, swiper-slide`)[0]);return M(e)-i}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)))}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=S(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const i=s.minTranslate(),a=(s.maxTranslate()-i)*e+i;s.translateTo(a,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((s=>{const i=e.getSlideClasses(s);t.push({slideEl:s,classNames:i}),e.emit("_slideClass",s,i)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:s,slides:i,slidesGrid:a,slidesSizesGrid:r,size:n,activeIndex:l}=this;let o=1;if("number"==typeof s.slidesPerView)return s.slidesPerView;if(s.centeredSlides){let e,t=i[l]?Math.ceil(i[l].swiperSlideSize):0;for(let s=l+1;s<i.length;s+=1)i[s]&&!e&&(t+=Math.ceil(i[s].swiperSlideSize),o+=1,t>n&&(e=!0));for(let s=l-1;s>=0;s-=1)i[s]&&!e&&(t+=i[s].swiperSlideSize,o+=1,t>n&&(e=!0))}else if("current"===e)for(let e=l+1;e<i.length;e+=1)(t?a[e]+r[e]-a[l]<n:a[e]-a[l]<n)&&(o+=1);else for(let e=l-1;e>=0;e-=1)a[l]-a[e]<n&&(o+=1);return o}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let a;if(s.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&D(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),s.freeMode&&s.freeMode.enabled&&!s.cssMode)i(),s.autoHeight&&e.updateAutoHeight();else{if(("auto"===s.slidesPerView||s.slidesPerView>1)&&e.isEnd&&!s.centeredSlides){const t=e.virtual&&s.virtual.enabled?e.virtual.slides:e.slides;a=e.slideTo(t.length-1,0,!1,!0)}else a=e.slideTo(e.activeIndex,0,!1,!0);a||i()}s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const s=this,i=s.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(s.el.classList.remove(`${s.params.containerModifierClass}${i}`),s.el.classList.add(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),s.emit("changeDirection"),t&&s.update()),s}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let s=e||t.params.el;if("string"==typeof s&&(s=document.querySelector(s)),!s)return!1;s.swiper=t,s.parentNode&&s.parentNode.host&&s.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=s&&s.shadowRoot&&s.shadowRoot.querySelector?s.shadowRoot.querySelector(i()):S(s,i())[0];return!a&&t.params.createElements&&(a=T("div",t.params.wrapperClass),s.append(a),S(s,`.${t.params.slideClass}`).forEach((e=>{a.append(e)}))),Object.assign(t,{el:s,wrapperEl:a,slidesEl:t.isElement&&!s.parentNode.host.slideSlots?s.parentNode.host:a,hostEl:t.isElement?s.parentNode.host:s,mounted:!0,rtl:"rtl"===s.dir.toLowerCase()||"rtl"===C(s,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===s.dir.toLowerCase()||"rtl"===C(s,"direction")),wrongRTL:"-webkit-box"===C(a,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const s=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&s.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),s.forEach((e=>{e.complete?D(t,e):e.addEventListener("load",(e=>{D(t,e.target)}))})),F(t),t.initialized=!0,F(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const s=this,{params:i,el:a,wrapperEl:r,slides:n}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),i.loop&&s.loopDestroy(),t&&(s.removeClasses(),a&&"string"!=typeof a&&a.removeAttribute("style"),r&&r.removeAttribute("style"),n&&n.length&&n.forEach((e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((e=>{s.off(e)})),!1!==e&&(s.el&&"string"!=typeof s.el&&(s.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(s)),s.destroyed=!0),null}static extendDefaults(e){b(ne,e)}static get extendedDefaults(){return ne}static get defaults(){return ie}static installModule(e){le.prototype.__modules__||(le.prototype.__modules__=[]);const t=le.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>le.installModule(e))),le):(le.installModule(e),le)}}Object.keys(re).forEach((e=>{Object.keys(re[e]).forEach((t=>{le.prototype[t]=re[e][t]}))})),le.use([function(e){let{swiper:t,on:s,emit:i}=e;const a=f();let r=null,n=null;const l=()=>{t&&!t.destroyed&&t.initialized&&(i("beforeResize"),i("resize"))},o=()=>{t&&!t.destroyed&&t.initialized&&i("orientationchange")};s("init",(()=>{t.params.resizeObserver&&void 0!==a.ResizeObserver?t&&!t.destroyed&&t.initialized&&(r=new ResizeObserver((e=>{n=a.requestAnimationFrame((()=>{const{width:s,height:i}=t;let a=s,r=i;e.forEach((e=>{let{contentBoxSize:s,contentRect:i,target:n}=e;n&&n!==t.el||(a=i?i.width:(s[0]||s).inlineSize,r=i?i.height:(s[0]||s).blockSize)})),a===s&&r===i||l()}))})),r.observe(t.el)):(a.addEventListener("resize",l),a.addEventListener("orientationchange",o))})),s("destroy",(()=>{n&&a.cancelAnimationFrame(n),r&&r.unobserve&&t.el&&(r.unobserve(t.el),r=null),a.removeEventListener("resize",l),a.removeEventListener("orientationchange",o)}))},function(e){let{swiper:t,extendParams:s,on:i,emit:a}=e;const r=[],n=f(),l=function(e,s){void 0===s&&(s={});const i=new(n.MutationObserver||n.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void a("observerUpdate",e[0]);const s=function(){a("observerUpdate",e[0])};n.requestAnimationFrame?n.requestAnimationFrame(s):n.setTimeout(s,0)}));i.observe(e,{attributes:void 0===s.attributes||s.attributes,childList:t.isElement||(void 0===s.childList||s).childList,characterData:void 0===s.characterData||s.characterData}),r.push(i)};s({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=P(t.hostEl);for(let t=0;t<e.length;t+=1)l(e[t])}l(t.hostEl,{childList:t.params.observeSlideChildren}),l(t.wrapperEl,{attributes:!1})}})),i("destroy",(()=>{r.forEach((e=>{e.disconnect()})),r.splice(0,r.length)}))}]);const oe=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function de(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function ce(e,t){const s=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>s.indexOf(e)<0)).forEach((s=>{void 0===e[s]?e[s]=t[s]:de(t[s])&&de(e[s])&&Object.keys(t[s]).length>0?t[s].__swiper__?e[s]=t[s]:ce(e[s],t[s]):e[s]=t[s]}))}function pe(e){return void 0===e&&(e={}),e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function ue(e){return void 0===e&&(e={}),e.pagination&&void 0===e.pagination.el}function me(e){return void 0===e&&(e={}),e.scrollbar&&void 0===e.scrollbar.el}function fe(e){void 0===e&&(e="");const t=e.split(" ").map((e=>e.trim())).filter((e=>!!e)),s=[];return t.forEach((e=>{s.indexOf(e)<0&&s.push(e)})),s.join(" ")}function he(e){return void 0===e&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},ge.apply(this,arguments)}function ve(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function be(e){const t=[];return o.Children.toArray(e).forEach((e=>{ve(e)?t.push(e):e.props&&e.props.children&&be(e.props.children).forEach((e=>t.push(e)))})),t}function we(e){const t=[],s={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return o.Children.toArray(e).forEach((e=>{if(ve(e))t.push(e);else if(e.props&&e.props.slot&&s[e.props.slot])s[e.props.slot].push(e);else if(e.props&&e.props.children){const i=be(e.props.children);i.length>0?i.forEach((e=>t.push(e))):s["container-end"].push(e)}else s["container-end"].push(e)})),{slides:t,slots:s}}function ye(e,t){return"undefined"==typeof window?(0,o.useEffect)(e,t):(0,o.useLayoutEffect)(e,t)}const xe=(0,o.createContext)(null),Se=(0,o.createContext)(null),Ee=(0,o.forwardRef)((function(e,t){let{className:s,tag:i="div",wrapperTag:a="div",children:r,onSwiper:n,...l}=void 0===e?{}:e,d=!1;const[c,p]=(0,o.useState)("swiper"),[u,m]=(0,o.useState)(null),[f,h]=(0,o.useState)(!1),g=(0,o.useRef)(!1),v=(0,o.useRef)(null),b=(0,o.useRef)(null),w=(0,o.useRef)(null),y=(0,o.useRef)(null),x=(0,o.useRef)(null),S=(0,o.useRef)(null),E=(0,o.useRef)(null),T=(0,o.useRef)(null),{params:C,passedParams:M,rest:P,events:_}=function(e,t){void 0===e&&(e={}),void 0===t&&(t=!0);const s={on:{}},i={},a={};ce(s,ie),s._emitClasses=!0,s.init=!1;const r={},n=oe.map((e=>e.replace(/_/,""))),l=Object.assign({},e);return Object.keys(l).forEach((l=>{void 0!==e[l]&&(n.indexOf(l)>=0?de(e[l])?(s[l]={},a[l]={},ce(s[l],e[l]),ce(a[l],e[l])):(s[l]=e[l],a[l]=e[l]):0===l.search(/on[A-Z]/)&&"function"==typeof e[l]?t?i[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:s.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:r[l]=e[l])})),["navigation","pagination","scrollbar"].forEach((e=>{!0===s[e]&&(s[e]={}),!1===s[e]&&delete s[e]})),{params:s,passedParams:a,rest:r,events:i}}(l),{slides:k,slots:L}=we(r),O=()=>{h(!f)};Object.assign(C.on,{_containerClasses(e,t){p(t)}});const A=()=>{Object.assign(C.on,_),d=!0;const e={...C};if(delete e.wrapperClass,b.current=new le(e),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=k;const e={cache:!1,slides:k,renderExternal:m,renderExternalUpdate:!1};ce(b.current.params.virtual,e),ce(b.current.originalParams.virtual,e)}};return v.current||A(),b.current&&b.current.on("_beforeBreakpoint",O),(0,o.useEffect)((()=>()=>{b.current&&b.current.off("_beforeBreakpoint",O)})),(0,o.useEffect)((()=>{!g.current&&b.current&&(b.current.emitSlidesClasses(),g.current=!0)})),ye((()=>{if(t&&(t.current=v.current),v.current)return b.current.destroyed&&A(),function(e,t){let{el:s,nextEl:i,prevEl:a,paginationEl:r,scrollbarEl:n,swiper:l}=e;pe(t)&&i&&a&&(l.params.navigation.nextEl=i,l.originalParams.navigation.nextEl=i,l.params.navigation.prevEl=a,l.originalParams.navigation.prevEl=a),ue(t)&&r&&(l.params.pagination.el=r,l.originalParams.pagination.el=r),me(t)&&n&&(l.params.scrollbar.el=n,l.originalParams.scrollbar.el=n),l.init(s)}({el:v.current,nextEl:x.current,prevEl:S.current,paginationEl:E.current,scrollbarEl:T.current,swiper:b.current},C),n&&!b.current.destroyed&&n(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}}),[]),ye((()=>{!d&&_&&b.current&&Object.keys(_).forEach((e=>{b.current.on(e,_[e])}));const e=function(e,t,s,i,a){const r=[];if(!t)return r;const n=e=>{r.indexOf(e)<0&&r.push(e)};if(s&&i){const e=i.map(a),t=s.map(a);e.join("")!==t.join("")&&n("children"),i.length!==s.length&&n("children")}return oe.filter((e=>"_"===e[0])).map((e=>e.replace(/_/,""))).forEach((s=>{if(s in e&&s in t)if(de(e[s])&&de(t[s])){const i=Object.keys(e[s]),a=Object.keys(t[s]);i.length!==a.length?n(s):(i.forEach((i=>{e[s][i]!==t[s][i]&&n(s)})),a.forEach((i=>{e[s][i]!==t[s][i]&&n(s)})))}else e[s]!==t[s]&&n(s)})),r}(M,w.current,k,y.current,(e=>e.key));return w.current=M,y.current=k,e.length&&b.current&&!b.current.destroyed&&function(e){let{swiper:t,slides:s,passedParams:i,changedParams:a,nextEl:r,prevEl:n,scrollbarEl:l,paginationEl:o}=e;const d=a.filter((e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e)),{params:c,pagination:p,navigation:u,scrollbar:m,virtual:f,thumbs:h}=t;let g,v,b,w,y,x,S,E;a.includes("thumbs")&&i.thumbs&&i.thumbs.swiper&&!i.thumbs.swiper.destroyed&&c.thumbs&&(!c.thumbs.swiper||c.thumbs.swiper.destroyed)&&(g=!0),a.includes("controller")&&i.controller&&i.controller.control&&c.controller&&!c.controller.control&&(v=!0),a.includes("pagination")&&i.pagination&&(i.pagination.el||o)&&(c.pagination||!1===c.pagination)&&p&&!p.el&&(b=!0),a.includes("scrollbar")&&i.scrollbar&&(i.scrollbar.el||l)&&(c.scrollbar||!1===c.scrollbar)&&m&&!m.el&&(w=!0),a.includes("navigation")&&i.navigation&&(i.navigation.prevEl||n)&&(i.navigation.nextEl||r)&&(c.navigation||!1===c.navigation)&&u&&!u.prevEl&&!u.nextEl&&(y=!0);const T=e=>{t[e]&&(t[e].destroy(),"navigation"===e?(t.isElement&&(t[e].prevEl.remove(),t[e].nextEl.remove()),c[e].prevEl=void 0,c[e].nextEl=void 0,t[e].prevEl=void 0,t[e].nextEl=void 0):(t.isElement&&t[e].el.remove(),c[e].el=void 0,t[e].el=void 0))};a.includes("loop")&&t.isElement&&(c.loop&&!i.loop?x=!0:!c.loop&&i.loop?S=!0:E=!0),d.forEach((e=>{if(de(c[e])&&de(i[e]))Object.assign(c[e],i[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in i[e])||i[e].enabled||T(e);else{const t=i[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?c[e]=i[e]:!1===t&&T(e)}})),d.includes("controller")&&!v&&t.controller&&t.controller.control&&c.controller&&c.controller.control&&(t.controller.control=c.controller.control),a.includes("children")&&s&&f&&c.virtual.enabled?(f.slides=s,f.update(!0)):a.includes("virtual")&&f&&c.virtual.enabled&&(s&&(f.slides=s),f.update(!0)),a.includes("children")&&s&&c.loop&&(E=!0),g&&h.init()&&h.update(!0),v&&(t.controller.control=c.controller.control),b&&(!t.isElement||o&&"string"!=typeof o||(o=document.createElement("div"),o.classList.add("swiper-pagination"),o.part.add("pagination"),t.el.appendChild(o)),o&&(c.pagination.el=o),p.init(),p.render(),p.update()),w&&(!t.isElement||l&&"string"!=typeof l||(l=document.createElement("div"),l.classList.add("swiper-scrollbar"),l.part.add("scrollbar"),t.el.appendChild(l)),l&&(c.scrollbar.el=l),m.init(),m.updateSize(),m.setTranslate()),y&&(t.isElement&&(r&&"string"!=typeof r||(r=document.createElement("div"),r.classList.add("swiper-button-next"),r.innerHTML=t.hostEl.constructor.nextButtonSvg,r.part.add("button-next"),t.el.appendChild(r)),n&&"string"!=typeof n||(n=document.createElement("div"),n.classList.add("swiper-button-prev"),n.innerHTML=t.hostEl.constructor.prevButtonSvg,n.part.add("button-prev"),t.el.appendChild(n))),r&&(c.navigation.nextEl=r),n&&(c.navigation.prevEl=n),u.init(),u.update()),a.includes("allowSlideNext")&&(t.allowSlideNext=i.allowSlideNext),a.includes("allowSlidePrev")&&(t.allowSlidePrev=i.allowSlidePrev),a.includes("direction")&&t.changeDirection(i.direction,!1),(x||E)&&t.loopDestroy(),(S||E)&&t.loopCreate(),t.update()}({swiper:b.current,slides:k,passedParams:M,changedParams:e,nextEl:x.current,prevEl:S.current,scrollbarEl:T.current,paginationEl:E.current}),()=>{_&&b.current&&Object.keys(_).forEach((e=>{b.current.off(e,_[e])}))}})),ye((()=>{var e;!(e=b.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())}),[u]),o.createElement(i,ge({ref:v,className:fe(`${c}${s?` ${s}`:""}`)},P),o.createElement(Se.Provider,{value:b.current},L["container-start"],o.createElement(a,{className:he(C.wrapperClass)},L["wrapper-start"],C.virtual?function(e,t,s){if(!s)return null;const i=e=>{let s=e;return e<0?s=t.length+e:s>=t.length&&(s-=t.length),s},a=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${s.offset}px`}:{top:`${s.offset}px`},{from:r,to:n}=s,l=e.params.loop?-t.length:0,d=e.params.loop?2*t.length:t.length,c=[];for(let e=l;e<d;e+=1)e>=r&&e<=n&&c.push(t[i(e)]);return c.map(((t,s)=>o.cloneElement(t,{swiper:e,style:a,key:t.props.virtualIndex||t.key||`slide-${s}`})))}(b.current,k,u):k.map(((e,t)=>o.cloneElement(e,{swiper:b.current,swiperSlideIndex:t}))),L["wrapper-end"]),pe(C)&&o.createElement(o.Fragment,null,o.createElement("div",{ref:S,className:"swiper-button-prev"}),o.createElement("div",{ref:x,className:"swiper-button-next"})),me(C)&&o.createElement("div",{ref:T,className:"swiper-scrollbar"}),ue(C)&&o.createElement("div",{ref:E,className:"swiper-pagination"}),L["container-end"]))}));Ee.displayName="Swiper";const Te=(0,o.forwardRef)((function(e,t){let{tag:s="div",children:i,className:a="",swiper:r,zoom:n,lazy:l,virtualIndex:d,swiperSlideIndex:c,...p}=void 0===e?{}:e;const u=(0,o.useRef)(null),[m,f]=(0,o.useState)("swiper-slide"),[h,g]=(0,o.useState)(!1);function v(e,t,s){t===u.current&&f(s)}ye((()=>{if(void 0!==c&&(u.current.swiperSlideIndex=c),t&&(t.current=u.current),u.current&&r){if(!r.destroyed)return r.on("_slideClass",v),()=>{r&&r.off("_slideClass",v)};"swiper-slide"!==m&&f("swiper-slide")}})),ye((()=>{r&&u.current&&!r.destroyed&&f(r.getSlideClasses(u.current))}),[r]);const b={isActive:m.indexOf("swiper-slide-active")>=0,isVisible:m.indexOf("swiper-slide-visible")>=0,isPrev:m.indexOf("swiper-slide-prev")>=0,isNext:m.indexOf("swiper-slide-next")>=0},w=()=>"function"==typeof i?i(b):i;return o.createElement(s,ge({ref:u,className:fe(`${m}${a?` ${a}`:""}`),"data-swiper-slide-index":d,onLoad:()=>{g(!0)}},p),n&&o.createElement(xe.Provider,{value:b},o.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof n?n:void 0},w(),l&&!h&&o.createElement("div",{className:"swiper-lazy-preloader"}))),!n&&o.createElement(xe.Provider,{value:b},w(),l&&!h&&o.createElement("div",{className:"swiper-lazy-preloader"})))}));function Ce(e,t,s,i){return e.params.createElements&&Object.keys(i).forEach((a=>{if(!s[a]&&!0===s.auto){let r=S(e.el,`.${i[a]}`)[0];r||(r=T("div",i[a]),r.className=i[a],e.el.append(r)),s[a]=r,t[a]=r}})),s}function Me(e){let{swiper:t,extendParams:s,on:i,emit:a}=e;function r(e){let s;return e&&"string"==typeof e&&t.isElement&&(s=t.el.querySelector(e)||t.hostEl.querySelector(e),s)?s:(e&&("string"==typeof e&&(s=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&s&&s.length>1&&1===t.el.querySelectorAll(e).length?s=t.el.querySelector(e):s&&1===s.length&&(s=s[0])),e&&!s?e:s)}function n(e,s){const i=t.params.navigation;(e=k(e)).forEach((e=>{e&&(e.classList[s?"add":"remove"](...i.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=s),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](i.lockClass))}))}function l(){const{nextEl:e,prevEl:s}=t.navigation;if(t.params.loop)return n(s,!1),void n(e,!1);n(s,t.isBeginning&&!t.params.rewind),n(e,t.isEnd&&!t.params.rewind)}function o(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),a("navigationPrev"))}function d(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),a("navigationNext"))}function c(){const e=t.params.navigation;if(t.params.navigation=Ce(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let s=r(e.nextEl),i=r(e.prevEl);Object.assign(t.navigation,{nextEl:s,prevEl:i}),s=k(s),i=k(i);const a=(s,i)=>{s&&s.addEventListener("click","next"===i?d:o),!t.enabled&&s&&s.classList.add(...e.lockClass.split(" "))};s.forEach((e=>a(e,"next"))),i.forEach((e=>a(e,"prev")))}function p(){let{nextEl:e,prevEl:s}=t.navigation;e=k(e),s=k(s);const i=(e,s)=>{e.removeEventListener("click","next"===s?d:o),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>i(e,"next"))),s.forEach((e=>i(e,"prev")))}s({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},i("init",(()=>{!1===t.params.navigation.enabled?u():(c(),l())})),i("toEdge fromEdge lock unlock",(()=>{l()})),i("destroy",(()=>{p()})),i("enable disable",(()=>{let{nextEl:e,prevEl:s}=t.navigation;e=k(e),s=k(s),t.enabled?l():[...e,...s].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),i("click",((e,s)=>{let{nextEl:i,prevEl:r}=t.navigation;i=k(i),r=k(r);const n=s.target;let l=r.includes(n)||i.includes(n);if(t.isElement&&!l){const e=s.path||s.composedPath&&s.composedPath();e&&(l=e.find((e=>i.includes(e)||r.includes(e))))}if(t.params.navigation.hideOnClick&&!l){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===n||t.pagination.el.contains(n)))return;let e;i.length?e=i[0].classList.contains(t.params.navigation.hiddenClass):r.length&&(e=r[0].classList.contains(t.params.navigation.hiddenClass)),a(!0===e?"navigationShow":"navigationHide"),[...i,...r].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const u=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),p()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),c(),l()},disable:u,update:l,init:c,destroy:p})}function Pe(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function _e(e){let{swiper:t,extendParams:s,on:i,emit:a}=e;const r="swiper-pagination";let n;s({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,bullets:[]};let l=0;function o(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function d(e,s){const{bulletActiveClass:i}=t.params.pagination;e&&(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${i}-${s}`),(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&&e.classList.add(`${i}-${s}-${s}`))}function c(e){const s=e.target.closest(Pe(t.params.pagination.bulletClass));if(!s)return;e.preventDefault();const i=M(s)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===i)return;const e=(a=t.realIndex,r=i,(r%=n=t.slides.length)==1+(a%=n)?"next":r===a-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(i)}else t.slideTo(i);var a,r,n}function p(){const e=t.rtl,s=t.params.pagination;if(o())return;let i,r,c=t.pagination.el;c=k(c);const p=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,u=t.params.loop?Math.ceil(p/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(r=t.previousRealIndex||0,i=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(i=t.snapIndex,r=t.previousSnapIndex):(r=t.previousIndex||0,i=t.activeIndex||0),"bullets"===s.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const a=t.pagination.bullets;let o,p,u;if(s.dynamicBullets&&(n=_(a[0],t.isHorizontal()?"width":"height",!0),c.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=n*(s.dynamicMainBullets+4)+"px"})),s.dynamicMainBullets>1&&void 0!==r&&(l+=i-(r||0),l>s.dynamicMainBullets-1?l=s.dynamicMainBullets-1:l<0&&(l=0)),o=Math.max(i-l,0),p=o+(Math.min(a.length,s.dynamicMainBullets)-1),u=(p+o)/2),a.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${s.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),c.length>1)a.forEach((e=>{const a=M(e);a===i?e.classList.add(...s.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),s.dynamicBullets&&(a>=o&&a<=p&&e.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),a===o&&d(e,"prev"),a===p&&d(e,"next"))}));else{const e=a[i];if(e&&e.classList.add(...s.bulletActiveClass.split(" ")),t.isElement&&a.forEach(((e,t)=>{e.setAttribute("part",t===i?"bullet-active":"bullet")})),s.dynamicBullets){const e=a[o],t=a[p];for(let e=o;e<=p;e+=1)a[e]&&a[e].classList.add(...`${s.bulletActiveClass}-main`.split(" "));d(e,"prev"),d(t,"next")}}if(s.dynamicBullets){const i=Math.min(a.length,s.dynamicMainBullets+4),r=(n*i-n)/2-u*n,l=e?"right":"left";a.forEach((e=>{e.style[t.isHorizontal()?l:"top"]=`${r}px`}))}}c.forEach(((e,r)=>{if("fraction"===s.type&&(e.querySelectorAll(Pe(s.currentClass)).forEach((e=>{e.textContent=s.formatFractionCurrent(i+1)})),e.querySelectorAll(Pe(s.totalClass)).forEach((e=>{e.textContent=s.formatFractionTotal(u)}))),"progressbar"===s.type){let a;a=s.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(i+1)/u;let n=1,l=1;"horizontal"===a?n=r:l=r,e.querySelectorAll(Pe(s.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${n}) scaleY(${l})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===s.type&&s.renderCustom?(e.innerHTML=s.renderCustom(t,i+1,u),0===r&&a("paginationRender",e)):(0===r&&a("paginationRender",e),a("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](s.lockClass)}))}function u(){const e=t.params.pagination;if(o())return;const s=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let i=t.pagination.el;i=k(i);let r="";if("bullets"===e.type){let i=t.params.loop?Math.ceil(s/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&i>s&&(i=s);for(let s=0;s<i;s+=1)e.renderBullet?r+=e.renderBullet.call(t,s,e.bulletClass):r+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],i.forEach((s=>{"custom"!==e.type&&(s.innerHTML=r||""),"bullets"===e.type&&t.pagination.bullets.push(...s.querySelectorAll(Pe(e.bulletClass)))})),"custom"!==e.type&&a("paginationRender",i[0])}function m(){t.params.pagination=Ce(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let s;"string"==typeof e.el&&t.isElement&&(s=t.el.querySelector(e.el)),s||"string"!=typeof e.el||(s=[...document.querySelectorAll(e.el)]),s||(s=e.el),s&&0!==s.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(s)&&s.length>1&&(s=[...t.el.querySelectorAll(e.el)],s.length>1&&(s=s.find((e=>P(e,".swiper")[0]===t.el)))),Array.isArray(s)&&1===s.length&&(s=s[0]),Object.assign(t.pagination,{el:s}),s=k(s),s.forEach((s=>{"bullets"===e.type&&e.clickable&&s.classList.add(...(e.clickableClass||"").split(" ")),s.classList.add(e.modifierClass+e.type),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(s.classList.add(`${e.modifierClass}${e.type}-dynamic`),l=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&s.classList.add(e.progressbarOppositeClass),e.clickable&&s.addEventListener("click",c),t.enabled||s.classList.add(e.lockClass)})))}function f(){const e=t.params.pagination;if(o())return;let s=t.pagination.el;s&&(s=k(s),s.forEach((s=>{s.classList.remove(e.hiddenClass),s.classList.remove(e.modifierClass+e.type),s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(s.classList.remove(...(e.clickableClass||"").split(" ")),s.removeEventListener("click",c))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}i("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:s}=t.pagination;s=k(s),s.forEach((s=>{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),i("init",(()=>{!1===t.params.pagination.enabled?h():(m(),u(),p())})),i("activeIndexChange",(()=>{void 0===t.snapIndex&&p()})),i("snapIndexChange",(()=>{p()})),i("snapGridLengthChange",(()=>{u(),p()})),i("destroy",(()=>{f()})),i("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=k(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),i("lock unlock",(()=>{p()})),i("click",((e,s)=>{const i=s.target,r=k(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&r&&r.length>0&&!i.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&i===t.navigation.nextEl||t.navigation.prevEl&&i===t.navigation.prevEl))return;const e=r[0].classList.contains(t.params.pagination.hiddenClass);a(!0===e?"paginationShow":"paginationHide"),r.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const h=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=k(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),f()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=k(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),m(),u(),p()},disable:h,render:u,update:p,init:m,destroy:f})}function ke(e){let t,s,{swiper:i,extendParams:a,on:r,emit:n,params:l}=e;i.autoplay={running:!1,paused:!1,timeLeft:0},a({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let o,d,c,p,m,f,h,g,v=l&&l.autoplay?l.autoplay.delay:3e3,b=l&&l.autoplay?l.autoplay.delay:3e3,w=(new Date).getTime();function y(e){i&&!i.destroyed&&i.wrapperEl&&e.target===i.wrapperEl&&(i.wrapperEl.removeEventListener("transitionend",y),g||e.detail&&e.detail.bySwiperTouchMove||M())}const x=()=>{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?d=!0:d&&(b=o,d=!1);const e=i.autoplay.paused?o:w+b-(new Date).getTime();i.autoplay.timeLeft=e,n("autoplayTimeLeft",e,e/v),s=requestAnimationFrame((()=>{x()}))},S=e=>{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(s),x();let a=void 0===e?i.params.autoplay.delay:e;v=i.params.autoplay.delay,b=i.params.autoplay.delay;const r=(()=>{let e;if(e=i.virtual&&i.params.virtual.enabled?i.slides.find((e=>e.classList.contains("swiper-slide-active"))):i.slides[i.activeIndex],e)return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(r)&&r>0&&void 0===e&&(a=r,v=r,b=r),o=a;const l=i.params.speed,d=()=>{i&&!i.destroyed&&(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev(l,!0,!0),n("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,l,!0,!0),n("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext(l,!0,!0),n("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,l,!0,!0),n("autoplay")),i.params.cssMode&&(w=(new Date).getTime(),requestAnimationFrame((()=>{S()}))))};return a>0?(clearTimeout(t),t=setTimeout((()=>{d()}),a)):requestAnimationFrame((()=>{d()})),a},E=()=>{w=(new Date).getTime(),i.autoplay.running=!0,S(),n("autoplayStart")},T=()=>{i.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(s),n("autoplayStop")},C=(e,s)=>{if(i.destroyed||!i.autoplay.running)return;clearTimeout(t),e||(h=!0);const a=()=>{n("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",y):M()};if(i.autoplay.paused=!0,s)return f&&(o=i.params.autoplay.delay),f=!1,void a();const r=o||i.params.autoplay.delay;o=r-((new Date).getTime()-w),i.isEnd&&o<0&&!i.params.loop||(o<0&&(o=0),a())},M=()=>{i.isEnd&&o<0&&!i.params.loop||i.destroyed||!i.autoplay.running||(w=(new Date).getTime(),h?(h=!1,S(o)):S(),i.autoplay.paused=!1,n("autoplayResume"))},P=()=>{if(i.destroyed||!i.autoplay.running)return;const e=u();"hidden"===e.visibilityState&&(h=!0,C(!0)),"visible"===e.visibilityState&&M()},_=e=>{"mouse"===e.pointerType&&(h=!0,g=!0,i.animating||i.autoplay.paused||C(!0))},k=e=>{"mouse"===e.pointerType&&(g=!1,i.autoplay.paused&&M())};r("init",(()=>{i.params.autoplay.enabled&&(i.params.autoplay.pauseOnMouseEnter&&(i.el.addEventListener("pointerenter",_),i.el.addEventListener("pointerleave",k)),u().addEventListener("visibilitychange",P),E())})),r("destroy",(()=>{i.el&&"string"!=typeof i.el&&(i.el.removeEventListener("pointerenter",_),i.el.removeEventListener("pointerleave",k)),u().removeEventListener("visibilitychange",P),i.autoplay.running&&T()})),r("_freeModeStaticRelease",(()=>{(p||h)&&M()})),r("_freeModeNoMomentumRelease",(()=>{i.params.autoplay.disableOnInteraction?T():C(!0,!0)})),r("beforeTransitionStart",((e,t,s)=>{!i.destroyed&&i.autoplay.running&&(s||!i.params.autoplay.disableOnInteraction?C(!0,!0):T())})),r("sliderFirstMove",(()=>{!i.destroyed&&i.autoplay.running&&(i.params.autoplay.disableOnInteraction?T():(c=!0,p=!1,h=!1,m=setTimeout((()=>{h=!0,p=!0,C(!0)}),200)))})),r("touchEnd",(()=>{if(!i.destroyed&&i.autoplay.running&&c){if(clearTimeout(m),clearTimeout(t),i.params.autoplay.disableOnInteraction)return p=!1,void(c=!1);p&&i.params.cssMode&&M(),p=!1,c=!1}})),r("slideChange",(()=>{!i.destroyed&&i.autoplay.running&&(f=!0)})),Object.assign(i.autoplay,{start:E,stop:T,pause:C,resume:M})}function Le(e){const{effect:t,swiper:s,on:i,setTranslate:a,setTransition:r,overwriteParams:n,perspective:l,recreateShadows:o,getEffectParams:d}=e;let c;i("beforeInit",(()=>{if(s.params.effect!==t)return;s.classNames.push(`${s.params.containerModifierClass}${t}`),l&&l()&&s.classNames.push(`${s.params.containerModifierClass}3d`);const e=n?n():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)})),i("setTranslate",(()=>{s.params.effect===t&&a()})),i("setTransition",((e,i)=>{s.params.effect===t&&r(i)})),i("transitionEnd",(()=>{if(s.params.effect===t&&o){if(!d||!d().slideShadows)return;s.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),o()}})),i("virtualUpdate",(()=>{s.params.effect===t&&(s.slides.length||(c=!0),requestAnimationFrame((()=>{c&&s.slides&&s.slides.length&&(a(),c=!1)})))}))}function Oe(e,t){const s=x(t);return s!==t&&(s.style.backfaceVisibility="hidden",s.style["-webkit-backface-visibility"]="hidden"),s}function Ae(e){let{swiper:t,extendParams:s,on:i}=e;s({fadeEffect:{crossFade:!1}}),Le({effect:"fade",swiper:t,on:i,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let s=0;s<e.length;s+=1){const e=t.slides[s];let i=-e.swiperSlideOffset;t.params.virtualTranslate||(i-=t.translate);let a=0;t.isHorizontal()||(a=i,i=0);const r=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),n=Oe(0,e);n.style.opacity=r,n.style.transform=`translate3d(${i}px, ${a}px, 0px)`}},setTransition:e=>{const s=t.slides.map((e=>x(e)));s.forEach((t=>{t.style.transitionDuration=`${e}ms`})),function(e){let{swiper:t,duration:s,transformElements:i,allSlides:a}=e;const{activeIndex:r}=t;if(t.params.virtualTranslate&&0!==s){let e,s=!1;e=a?i:i.filter((e=>{const s=e.classList.contains("swiper-slide-transform")?(e=>e.parentElement?e.parentElement:t.slides.find((t=>t.shadowRoot&&t.shadowRoot===e.parentNode)))(e):e;return t.getSlideIndex(s)===r})),e.forEach((e=>{!function(e,t){t&&e.addEventListener("transitionend",(function s(i){i.target===e&&(t.call(e,i),e.removeEventListener("transitionend",s))}))}(e,(()=>{if(s)return;if(!t||t.destroyed)return;s=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}({swiper:t,duration:e,transformElements:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function Ie(e,t,s){const i=`swiper-slide-shadow${s?`-${s}`:""}${e?` swiper-slide-shadow-${e}`:""}`,a=x(t);let r=a.querySelector(`.${i.split(" ").join(".")}`);return r||(r=T("div",i.split(" ")),a.append(r)),r}function ze(e){let{swiper:t,extendParams:s,on:i}=e;s({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Le({effect:"coverflow",swiper:t,on:i,setTranslate:()=>{const{width:e,height:s,slides:i,slidesSizesGrid:a}=t,r=t.params.coverflowEffect,n=t.isHorizontal(),l=t.translate,o=n?e/2-l:s/2-l,d=n?r.rotate:-r.rotate,c=r.depth,p=function(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}(t);for(let e=0,t=i.length;e<t;e+=1){const t=i[e],s=a[e],l=(o-t.swiperSlideOffset-s/2)/s,u="function"==typeof r.modifier?r.modifier(l):l*r.modifier;let m=n?d*u:0,f=n?0:d*u,h=-c*Math.abs(u),g=r.stretch;"string"==typeof g&&-1!==g.indexOf("%")&&(g=parseFloat(r.stretch)/100*s);let v=n?0:g*u,b=n?g*u:0,w=1-(1-r.scale)*Math.abs(u);Math.abs(b)<.001&&(b=0),Math.abs(v)<.001&&(v=0),Math.abs(h)<.001&&(h=0),Math.abs(m)<.001&&(m=0),Math.abs(f)<.001&&(f=0),Math.abs(w)<.001&&(w=0);const y=`translate3d(${b}px,${v}px,${h}px)  rotateX(${p(f)}deg) rotateY(${p(m)}deg) scale(${w})`;if(Oe(0,t).style.transform=y,t.style.zIndex=1-Math.abs(Math.round(u)),r.slideShadows){let e=n?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),s=n?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=Ie("coverflow",t,n?"left":"top")),s||(s=Ie("coverflow",t,n?"right":"bottom")),e&&(e.style.opacity=u>0?u:0),s&&(s.style.opacity=-u>0?-u:0)}}},setTransition:e=>{t.slides.map((e=>x(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}Te.displayName="SwiperSlide";const je=window.ReactJSXRuntime;function $e({attributes:e,setAttributes:t}){const{enableLoop:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Loop","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s,label:(0,r.__)("Enable loop","caledros-basic-blocks"),help:(0,r.__)("Enable the continuous loop mode.","caledros-basic-blocks"),onChange:e=>{t({enableLoop:e})}})})}function Ne({attributes:e,setAttributes:t}){const{identifier:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Unique Identifier","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Type the identifier for the slider. The identifier must be unique. If no unique identifier is provided, the slider won't work.","caledros-basic-blocks"),value:s,onChange:e=>{t({identifier:e})}})})}function Be({attributes:e,setAttributes:t}){const{enablePagination:s,paginationType:i}=e;return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Pagination","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s,label:(0,r.__)("Enable pagination","caledros-basic-blocks"),onChange:e=>{t({enablePagination:e})}}),s&&(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Choose the type of pagination","caledros-basic-blocks"),value:i,options:[{label:"Progress Bar",value:"progressbar"},{label:"Bullets",value:"bullets"},{label:"Fraction",value:"fraction"}],onChange:e=>{t({paginationType:e})}})]})}function De({attributes:e,setAttributes:t}){const{autoplay:s}=e;return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Autoplay","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s.enableAutoplay,label:(0,r.__)("Enable autoplay","caledros-basic-blocks"),onChange:e=>{t({autoplay:{...s,enableAutoplay:e}})}}),s.enableAutoplay&&(0,je.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Select the delay between transitions (milliseconds).","caledros-basic-blocks"),value:s.delay,max:2e4,min:100,step:100,onChange:e=>{t({autoplay:{...s,delay:e}})}})]})}const Ge=window.wp.element,Fe=window.wp.data;function He({attributes:e,setAttributes:t}){const{lightColor:s}=e,[i,a]=(0,Ge.useState)("#00000000"===s),[o,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),c=o.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,Fe.select)("core/editor")?.getEditorSettings(),u=p?.__experimentalFeatures?.color?.palette,m=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),f=m(u,"default"),h=m(u,"theme"),g=m(u,"custom"),v=[...d?[f]:[],h,...g.colors?[g]:[]];return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Navigation & Pagination Color (Light Mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:i,onChange:()=>{a((e=>!e)),t({lightColor:"#00000000"})}}),!i&&(0,je.jsx)(l.ColorPalette,{colors:u?v:c,value:s,onChange:e=>t({lightColor:e}),enableAlpha:!0,clearable:!1})]})}function Ve({attributes:e,setAttributes:t}){const{darkColor:s}=e,[i,a]=(0,Ge.useState)("#00000000"===s),[o,d]=(0,n.useSettings)("color.palette","color.defaultPalette"),c=o.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),p=(0,Fe.select)("core/editor")?.getEditorSettings(),u=p?.__experimentalFeatures?.color?.palette,m=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),f=m(u,"default"),h=m(u,"theme"),g=m(u,"custom"),v=[...d?[f]:[],h,...g.colors?[g]:[]];return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Navigation & Pagination Color (Dark Mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:i,onChange:()=>{a((e=>!e)),t({darkColor:"#00000000"})}}),!i&&(0,je.jsx)(l.ColorPalette,{colors:u?v:c,value:s,onChange:e=>t({darkColor:e}),enableAlpha:!0,clearable:!1})]})}function Re({attributes:e,setAttributes:t}){const{enableNavigationArrows:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Navigation Arrows","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s,label:(0,r.__)("Enable navigation arrows","caledros-basic-blocks"),help:(0,r.__)("Choose whether or not the navigation arrows are visible.","caledros-basic-blocks"),onChange:e=>{t({enableNavigationArrows:e})}})})}function qe({attributes:e,setAttributes:t}){const{images:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Image Settings","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(n.MediaUploadCheck,{children:(0,je.jsx)(n.MediaUpload,{onSelect:e=>{t({images:e.map((e=>({id:e.id,url:e.url,alt:e.alt})))})},allowedTypes:["image"],multiple:!0,gallery:!0,value:s.map((e=>e.id)),render:({open:e})=>(0,je.jsx)(l.Button,{onClick:e,variant:"secondary",children:0===s.length?(0,r.__)("Add Images","caledros-basic-blocks"):(0,r.__)("Edit Gallery","caledros-basic-blocks")})})})})}function We({attributes:e,setAttributes:t}){const{width:s}=e,i=s.replace(/\d+/g,"")||"px",a=["px","%","em","rem","vw"].includes(i)?i:"px",o=parseInt(s)||0,[d,c]=(0,Ge.useState)("100%"!==s&&"var(--wp--style--global--content-size)"!==s&&"var(--wp--style--global--wide-size)"!==s),p=(0,n.useSettings)("layout.contentSize","layout.wideSize")||[],[u="620px",m="1280px"]=p,f=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,je.jsxs)(l.PanelBody,{title:(0,r.__)("Maximum width","caledros-basic-blocks"),initialOpen:!1,children:[(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use custom width",checked:d,onChange:()=>c((e=>!e))}),!d&&(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Choose the maximum width for the gallery.","caledros-basic-blocks"),value:"100%"===s||"var(--wp--style--global--content-size)"===s||"var(--wp--style--global--wide-size)"===s?s:"",options:[{disabled:!0,label:"Select an option",value:""},{label:"Full width",value:"100%"},{label:`Content size (${u})`,value:"var(--wp--style--global--content-size)"},{label:`Wide size (${m})`,value:"var(--wp--style--global--wide-size)"}],onChange:e=>{t({width:e})}}),d&&(0,je.jsxs)("div",{className:"cbb-editor__grid",children:[(0,je.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)(`Please select the custom maximum width (${a}) for the gallery.`,"caledros-basic-blocks"),value:"var(--wp--style--global--content-size)"===s||"var(--wp--style--global--wide-size)"===s?0:parseInt(s),max:"%"===a||"vw"===a?100:3e3,min:0,step:1,onChange:e=>{t({width:`${e}${a}`})}}),(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:a,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({width:`${f(e,o)}${e}`})}})]})]})}function Xe({attributes:e,setAttributes:t}){const{minHeight:s}=e,i=s.replace(/\d+/g,"")||"px",a=parseInt(s)||0,n=(e,t)=>"auto"===e?"":"vh"===e&&t>100?100:t;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Minimum height","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsxs)("div",{className:"cbb-editor__grid",children:[(0,je.jsx)(l.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)(`Please select the minimum height (${i}) for the gallery.`,"caledros-basic-blocks"),initialPosition:0,max:"vh"===i?100:3e3,min:0,step:1,value:"auto"===i?0:a,onChange:e=>t({minHeight:`${"auto"!==i?e:""}${i}`}),disabled:"auto"===i}),(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:i,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"},{label:"auto",value:"auto"}],onChange:e=>{t({minHeight:`${n(e,a)}${e}`})}})]})})}function Ye({attributes:e,setAttributes:t}){const{galleryEffect:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Effect","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,r.__)("Choose the effect for the gallery.","caledros-basic-blocks"),value:s,options:[{label:"None",value:"none"},{label:"Fade",value:"fade"},{label:"Coverflow",value:"coverflow"}],onChange:e=>{t({galleryEffect:e})}})})}function Ue({attributes:e,setAttributes:t}){const{showDemoData:s}=e;return(0,je.jsx)(l.PanelBody,{title:(0,r.__)("Demo data options","caledros-basic-blocks"),initialOpen:!1,children:(0,je.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show demo data","caledros-basic-blocks"),help:(0,r.__)("Display demo images.","caledros-basic-blocks"),checked:s,onChange:e=>{t({showDemoData:e})}})})}const Ke=s.p+"images/bird.a6a2c4c9.webp",Je=s.p+"images/flower.0f364da1.webp",Ze=s.p+"images/pier.d4435397.webp",Qe={icon:(0,je.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,je.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,je.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,je.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,je.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,je.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,je.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,je.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,je.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,je.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,je.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,je.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,je.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})};(0,i.registerBlockType)(a.UU,{icon:Qe.icon,edit:function({attributes:e,setAttributes:t}){const{images:s,enableLoop:i,identifier:a,enablePagination:o,paginationType:d,autoplay:c,lightColor:p,darkColor:u,enableNavigationArrows:m,width:f,minHeight:h,galleryEffect:g,showDemoData:v}=e,b=(0,n.useBlockProps)({className:"cbb-image-gallery",style:{"--cbb-slider-light-color":p,"--cbb-slider-dark-color":u,width:f,height:h}}),w=()=>o&&"bullets"===d?{clickable:!0,type:"bullets"}:o&&"fraction"===d?{type:"fraction"}:o&&"progressbar"===d?{type:"progressbar"}:!!o&&void 0,y=()=>!!c.enableAutoplay&&{delay:c.delay,disableOnInteraction:!1,pauseOnMouseEnter:!0};return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(n.InspectorControls,{children:(0,je.jsx)(l.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"content",title:"Content"},{name:"style",title:"Style"},{name:"additional",title:"Additional"}],children:s=>"content"===s.name?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Ne,{attributes:e,setAttributes:t}),!v&&(0,je.jsx)(qe,{attributes:e,setAttributes:t})]}):"style"===s.name?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(He,{attributes:e,setAttributes:t}),(0,je.jsx)(Ve,{attributes:e,setAttributes:t}),(0,je.jsx)(We,{attributes:e,setAttributes:t}),(0,je.jsx)(Xe,{attributes:e,setAttributes:t})]}):"additional"===s.name?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)($e,{attributes:e,setAttributes:t}),(0,je.jsx)(Re,{attributes:e,setAttributes:t}),(0,je.jsx)(Be,{attributes:e,setAttributes:t}),(0,je.jsx)(De,{attributes:e,setAttributes:t}),(0,je.jsx)(Ye,{attributes:e,setAttributes:t}),(0,je.jsx)(Ue,{attributes:e,setAttributes:t})]}):null})}),(0,je.jsxs)("div",{...b,children:[!v&&(0,je.jsx)(je.Fragment,{children:0==s.length?(0,je.jsx)(l.Placeholder,{label:(0,r.__)("Image Gallery","caledros-basic-blocks"),instructions:(0,r.__)("Add images to the gallery.","caledros-basic-blocks"),icon:"format-gallery",className:"wp-block-my-block-placeholder"}):(0,je.jsx)(je.Fragment,{children:(0,je.jsx)(Ee,{navigation:m,allowTouchMove:!1,modules:[Me,_e,ke,Ae,ze],className:`cbb-image-gallery-${a}`,loop:i,pagination:w(),autoplay:y(),..."fade"===g&&{effect:"fade",fadeEffect:{crossFade:!0}},..."coverflow"===g&&{effect:"coverflow",grabCursor:!0,centeredSlides:!0,slidesPerView:1.5,coverflowEffect:{rotate:50,stretch:0,depth:50,modifier:1,slideShadows:!0},breakpoints:{810:{slidesPerView:1.5},0:{slidesPerView:1}}},children:s.map(((e,t)=>(0,je.jsx)(Te,{children:(0,je.jsx)("img",{src:e.url,alt:e.alt,style:{width:f,height:h}},e.id)},t)))},`${d}-${i}-${c.enableAutoplay}-${c.delay}-${m}-${g}`)})}),v&&(0,je.jsx)(je.Fragment,{children:(0,je.jsxs)(Ee,{navigation:m,allowTouchMove:!1,modules:[Me,_e,ke,Ae,ze],className:`cbb-image-gallery-${a}`,loop:i,pagination:w(),autoplay:y(),..."fade"===g&&{effect:"fade",fadeEffect:{crossFade:!0}},..."coverflow"===g&&{effect:"coverflow",grabCursor:!0,centeredSlides:!0,slidesPerView:1.5,coverflowEffect:{rotate:50,stretch:0,depth:50,modifier:1,slideShadows:!0},breakpoints:{810:{slidesPerView:1.5},0:{slidesPerView:1}}},children:[(0,je.jsx)(Te,{children:(0,je.jsx)("img",{src:Ke,alt:"bird",style:{width:f,height:h}},0)},0),(0,je.jsx)(Te,{children:(0,je.jsx)("img",{src:Ze,alt:"pier",style:{width:f,height:h}},1)},1),(0,je.jsx)(Te,{children:(0,je.jsx)("img",{src:Je,alt:"flower",style:{width:f,height:h}},2)},2)]},`${d}-${i}-${c.enableAutoplay}-${c.delay}-${m}-${g}`)})]})]})}})}},s={};function i(e){var a=s[e];if(void 0!==a)return a.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.m=t,e=[],i.O=(t,s,a,r)=>{if(!s){var n=1/0;for(c=0;c<e.length;c++){for(var[s,a,r]=e[c],l=!0,o=0;o<s.length;o++)(!1&r||n>=r)&&Object.keys(i.O).every((e=>i.O[e](s[o])))?s.splice(o--,1):(l=!1,r<n&&(n=r));if(l){e.splice(c--,1);var d=a();void 0!==d&&(t=d)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[s,a,r]},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var s=t.getElementsByTagName("script");if(s.length)for(var a=s.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=s[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../../"})(),(()=>{var e={951:0,119:0};i.O.j=t=>0===e[t];var t=(t,s)=>{var a,r,[n,l,o]=s,d=0;if(n.some((t=>0!==e[t]))){for(a in l)i.o(l,a)&&(i.m[a]=l[a]);if(o)var c=o(i)}for(t&&t(s);d<n.length;d++)r=n[d],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return i.O(c)},s=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var a=i.O(void 0,[119],(()=>i(44)));a=i.O(a)})();
  • caledros-basic-blocks/trunk/build/blocks/mobile-menu-container/index.asset.php

    r3313530 r3321999  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '459698cadab7f55d0fd9');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '3d992c9cb6e8034b6962');
  • caledros-basic-blocks/trunk/build/blocks/mobile-menu-container/index.js

    r3313530 r3321999  
    1 (()=>{"use strict";var e,t={698:()=>{const e=window.wp.blocks,t=JSON.parse('{"UU":"caledros-basic-blocks/mobile-menu-container"}'),a=window.wp.i18n,o=window.ReactJSXRuntime,l={icon:(0,o.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,o.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,o.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,o.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,o.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,o.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,o.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,o.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,o.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,o.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,o.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,o.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},n=window.wp.blockEditor,r=window.wp.components,s=window.wp.element;function i({attributes:e,setAttributes:t}){const{containerWidth:l}=e,i=l.replace(/\d+/g,"")||"px",c=["px","%","em","rem","vw"].includes(i)?i:"px",d=parseInt(l)||0,[b,u]=(0,s.useState)("100%"!==l&&"var(--wp--style--global--content-size)"!==l&&"var(--wp--style--global--wide-size)"!==l),g=(0,n.useSettings)("layout.contentSize","layout.wideSize")||[],[h="620px",x="1280px"]=g,p=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Maximum width","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use custom width",checked:b,onChange:()=>u((e=>!e))}),!b&&(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the max width for the container.","caledros-basic-blocks"),value:"100%"===l||"var(--wp--style--global--content-size)"===l||"var(--wp--style--global--wide-size)"===l?l:"",options:[{disabled:!0,label:"Select an option",value:""},{label:"Full width",value:"100%"},{label:`Content size (${h})`,value:"var(--wp--style--global--content-size)"},{label:`Wide size (${x})`,value:"var(--wp--style--global--wide-size)"}],onChange:e=>{t({containerWidth:e})}}),b&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the custom width (${c}) for the container.`,"caledros-basic-blocks"),value:"var(--wp--style--global--content-size)"===l||"var(--wp--style--global--wide-size)"===l?0:parseInt(l),max:"%"===c||"vw"===c?100:3e3,min:0,step:1,onChange:e=>{t({containerWidth:`${e}${c}`})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerWidth:`${p(e,d)}${e}`})}})]})]})}function c({attributes:e,setAttributes:t}){const{containerHeight:l}=e,n=l.replace(/\d+/g,"")||"px",s=e=>"px"===e?parseInt(l)||0:parseFloat(l)||0,i=(e,t)=>"vh"===e&&t>100?100:t;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the height (${n}) for the container. To ensure a consistent design, all direct child elements must have its minimum height set to zero.`,"caledros-basic-blocks"),value:s(n),max:"vh"===n?100:3e3,min:0,step:1,onChange:e=>t({containerHeight:`${e}${n}`})}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"}],onChange:e=>{t({containerHeight:`${i(e,s(e))}${e}`})}})]})})}function d({attributes:e,setAttributes:t}){const{containerBackgroundImage:l,containerBgImageFocalPoint:s}=e,i=()=>{t({containerBackgroundImage:{id:"",alt:"",url:""}})};return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Background image","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(n.MediaUploadCheck,{children:(0,o.jsx)(n.MediaUpload,{allowedTypes:["image"],value:l.id,render:({open:e})=>(0,o.jsxs)(o.Fragment,{children:[l.url&&(0,o.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,onChange:e=>{t({containerBgImageFocalPoint:e})},url:l.url,value:s}),(0,o.jsxs)("div",{style:{display:"flex",gap:"10px"},children:[(0,o.jsx)(r.Button,{variant:"primary",onClick:e,children:"Select image"}),(0,o.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Remove image"})]})]}),onSelect:e=>{t({containerBackgroundImage:{id:e.id,alt:e.alt,url:e.url}})}})})})}function b({attributes:e,setAttributes:t}){const{containerLightBackgroundGradient:l}=e,[n,i]=(0,s.useState)(""!==l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background gradient (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable background gradient","caledros-basic-blocks"),checked:n,onChange:()=>{i((e=>!e)),t({containerLightBackgroundGradient:""})}}),n&&(0,o.jsx)(r.CustomGradientPicker,{onChange:e=>{t({containerLightBackgroundGradient:e})},value:""===l?"linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))":l})]})}function u({attributes:e,setAttributes:t}){const{containerDarkBackgroundGradient:l}=e,[n,i]=(0,s.useState)(""!==l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background gradient (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable background gradient (dark mode)","caledros-basic-blocks"),checked:n,onChange:()=>{i((e=>!e)),t({containerDarkBackgroundGradient:""})}}),n&&(0,o.jsx)(r.CustomGradientPicker,{onChange:e=>{t({containerDarkBackgroundGradient:e})},value:""===l?"linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))":l})]})}const g=window.wp.data;function h({attributes:e,setAttributes:t}){const{containerDarkBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),m=p(x,"default"),_=p(x,"theme"),v=p(x,"custom"),f=[...b?[m]:[],_,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use transparent background.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({containerDarkBackgroundColor:"#00000000"})}}),!i&&(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({containerDarkBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})}function x({attributes:e,setAttributes:t}){const{containerLightBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),m=p(x,"default"),_=p(x,"theme"),v=p(x,"custom"),f=[...b?[m]:[],_,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:i,onChange:()=>{c((e=>!e)),t({containerLightBackgroundColor:"#00000000"})}}),!i&&(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({containerLightBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})}function p({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.style.split(" "),i=n[0]||"solid",c=n[1]||"none",d=n[2]||"none",b=n[3]||"none",[u,g]=(0,s.useState)(!!l.style.includes(" "));return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border style","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border styles for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{containerBorder:{...l,style:"solid none none none"}}:{containerBorder:{...l,style:"solid"}})}}),!u&&(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the border style.","caledros-basic-blocks"),value:l.style,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:e}})}}),u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the top border.","caledros-basic-blocks"),value:i,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${e} ${c} ${d} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the right border.","caledros-basic-blocks"),value:c,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${e} ${d} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the bottom border.","caledros-basic-blocks"),value:d,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${c} ${e} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the left border.","caledros-basic-blocks"),value:b,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${c} ${d} ${e}`}})}})]})]})}function m({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.width.split(" "),i=parseInt(n[0])||0,c=parseInt(n[1])||0,d=parseInt(n[2])||0,b=parseInt(n[3])||0,[u,g]=(0,s.useState)(!!l.width.includes(" "));return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border width","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border widths for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{containerBorder:{...l,width:"1px 1px 1px 1px"}}:{containerBorder:{...l,width:"1px"}})}}),!u&&(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the border width (px) for the container.","caledros-basic-blocks"),value:parseInt(l.width),max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${e}px`}})}}),u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the top border width (px) for the container.","caledros-basic-blocks"),value:i,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${e}px ${c}px ${d}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the right border width (px) for the container.","caledros-basic-blocks"),value:c,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${e}px ${d}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the bottom border width (px) for the container.","caledros-basic-blocks"),value:d,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${c}px ${e}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the left border width (px) for the container.","caledros-basic-blocks"),value:b,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${c}px ${d}px ${e}px`}})}})]})]})}function _({attributes:e,setAttributes:t}){const{containerBorder:l}=e,i=l.lightColor.split(" "),c=i[0]||"#000",d=i[1]||"#000",b=i[2]||"#000",u=i[3]||"#000",[h,x]=(0,s.useState)(!!l.lightColor.includes(" ")),[p,m]=(0,n.useSettings)("color.palette","color.defaultPalette"),_=p.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,g.select)("core/editor")?.getEditorSettings(),f=v?.__experimentalFeatures?.color?.palette,C=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),k=C(f,"default"),$=C(f,"theme"),j=C(f,"custom"),B=[...m?[k]:[],$,...j.colors?[j]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:h,onChange:()=>{const e=!h;x(e),t(e?{containerBorder:{...l,lightColor:"#000 #000 #000 #000"}}:{containerBorder:{...l,lightColor:"#000"}})}}),!h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:l.lightColor,onChange:e=>t({containerBorder:{...l,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:c,onChange:e=>{t({containerBorder:{...l,lightColor:`${e||"#00000000"} ${d} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:d,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:b,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${d} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:u,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${d} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function v({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.radius.split(" "),i=parseInt(n[0])||0,c=parseInt(n[1])||0,d=parseInt(n[2])||0,b=parseInt(n[3])||0,u=l.radius.split(" "),g=u[0]?u[0].replace(/\d+/g,""):"px",h=u[1]?u[1].replace(/\d+/g,""):"px",x=u[2]?u[2].replace(/\d+/g,""):"px",p=u[3]?u[3].replace(/\d+/g,""):"px",[m,_]=(0,s.useState)(!!l.radius.includes(" ")),v=(e,t)=>"%"===e&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border radius","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border radiuses for each corner",checked:m,onChange:()=>{const e=!m;_(e),t(e?{containerBorder:{...l,radius:"10px 10px 10px 10px"}}:{containerBorder:{...l,radius:"10px"}})}}),!m&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the border radius (${g}) for the container.`,"caledros-basic-blocks"),value:parseInt(l.radius),max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${e}${g}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${v(e,parseInt(l.radius))}${e}`}})}})]}),m&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-left border radius (${g}).`,"caledros-basic-blocks"),value:i,max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${e}${g} ${c}${h} ${d}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${v(e,i)}${e} ${c}${h} ${d}${x} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-right border radius (${h}).`,"caledros-basic-blocks"),value:c,max:"%"===h?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${e}${h} ${d}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:h,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${v(e,c)}${e} ${d}${x} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-right border radius (${x}).`,"caledros-basic-blocks"),value:d,max:"%"===x?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${e}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${v(e,d)}${e} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-left border radius (${p}).`,"caledros-basic-blocks"),value:b,max:"%"===p?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${d}${x} ${e}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${d}${x} ${v(e,b)}${e}`}})}})]})]})]})}function f({attributes:e,setAttributes:t}){const{containerBoxShadow:l}=e,[s,i]=(0,n.useSettings)("color.palette","color.defaultPalette"),c=s.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),d=(0,g.select)("core/editor")?.getEditorSettings(),b=d?.__experimentalFeatures?.color?.palette,u=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),h=u(b,"default"),x=u(b,"theme"),p=u(b,"custom"),m=[...i?[h]:[],x,...p.colors?[p]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Box shadow","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable box shadow","caledros-basic-blocks"),checked:l.enabled,onChange:e=>{t({containerBoxShadow:{...l,enabled:e}})}}),l.enabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the box shadow.","caledros-basic-blocks"),value:""===l.style?"outline":"inset",options:[{label:"Outline",value:"outline"},{label:"Inset",value:"inset"}],onChange:e=>{t({containerBoxShadow:{...l,style:`${"outline"===e?"":e}`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the horizontal offset (px).","caledros-basic-blocks"),value:parseInt(l.hOffset),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,hOffset:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the vertical offset (px).","caledros-basic-blocks"),value:parseInt(l.vOffset),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,vOffset:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the blur (px).","caledros-basic-blocks"),value:parseInt(l.blur),max:100,min:0,step:1,onChange:e=>t({containerBoxShadow:{...l,blur:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the spread (px).","caledros-basic-blocks"),value:parseInt(l.spread),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,spread:`${e}px`}})}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow (light mode)","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:b?m:c,value:l.lightColor,onChange:e=>t({containerBoxShadow:{...l,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow (dark mode)","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:b?m:c,value:l.darkColor,onChange:e=>t({containerBoxShadow:{...l,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]})]})}function C({attributes:e,setAttributes:t}){const{containerMargin:l}=e,n=parseInt(l.top)||0,s=parseInt(l.left)||0,i=parseInt(l.bottom)||0,c=parseInt(l.right)||0,d=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),u=l.bottom.replace(/\d+/g,""),g=l.right.replace(/\d+/g,""),h=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different margins","caledros-basic-blocks"),checked:l.differentMarginsEnabled,onChange:e=>{t({containerMargin:{...l,differentMarginsEnabled:e}})}}),!l.differentMarginsEnabled&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the margin (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,top:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,top:`${h(e,n)}${e}`}})}})]}),l.differentMarginsEnabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top margin (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,top:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,top:`${h(e,n)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right margin (${g}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,right:`${"auto"===g?"":e}${g}`}})},disabled:"auto"===g}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,right:`${h(e,c)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom margin (${u}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,bottom:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,bottom:`${h(e,i)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left margin (${b}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,left:`${"auto"===b?"":e}${b}`}})},disabled:"auto"===b}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,left:`${h(e,s)}${e}`}})}})]})]})]})}function k({attributes:e,setAttributes:t}){const{containerPadding:l}=e,n=parseInt(l.top)||0,s=parseInt(l.left)||0,i=parseInt(l.bottom)||0,c=parseInt(l.right)||0,d=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),u=l.bottom.replace(/\d+/g,""),g=l.right.replace(/\d+/g,""),h=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Padding","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use global padding","caledros-basic-blocks"),help:(0,a.__)("This option applies predefined padding to the right and left sides of the block, ensuring consistency across the entire site. To adjust this padding, navigate to the Layout section in the Full Site Editor.","caledros-basic-blocks"),checked:l.useGlobalPadding,onChange:e=>{t({containerPadding:{...l,useGlobalPadding:e}})}}),!l.useGlobalPadding&&(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different paddings","caledros-basic-blocks"),checked:l.differentPaddingsEnabled,onChange:e=>{t({containerPadding:{...l,differentPaddingsEnabled:e}})}}),!l.differentPaddingsEnabled&&!l.useGlobalPadding&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the padding (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,top:`${e}${d}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,top:`${h(e,n)}${e}`}})}})]}),l.differentPaddingsEnabled&&!l.useGlobalPadding&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top padding (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,top:`${e}${d}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,top:`${h(e,n)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right padding (${g}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,right:`${e}${g}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,right:`${h(e,c)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom padding (${u}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,bottom:`${e}${u}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,bottom:`${h(e,i)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left padding (${b}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,left:`${e}${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,left:`${h(e,s)}${e}`}})}})]})]})]})}function $({attributes:e,setAttributes:t}){const{containerJustifyContent:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Justify content","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the justify content property.","caledros-basic-blocks"),value:l,options:[{label:"Flex start (default)",value:"flex-start"},{label:"Flex end",value:"flex-end"},{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Space evenly",value:"space-evenly"}],onChange:e=>{t({containerJustifyContent:e})}})})}function j({attributes:e,setAttributes:t}){const{containerAlignItems:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Align items","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the align items property.","caledros-basic-blocks"),value:l,options:[{label:"Flex start",value:"flex-start"},{label:"Flex end",value:"flex-end"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"},{label:"Baseline",value:"baseline"},{label:"Normal (default)",value:"normal"}],onChange:e=>{t({containerAlignItems:e})}})})}function B({attributes:e,setAttributes:t}){const{containerColumnGap:l}=e,[n,i]=(0,s.useState)("normal"===l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Column gap","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use normal column gap (default value)","caledros-basic-blocks"),checked:n,onChange:()=>{const e=n?"0":"normal";i((e=>!e)),t({containerColumnGap:e})}}),!n&&(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the column gap (px) for the flex container.","caledros-basic-blocks"),value:isNaN(parseInt(l))?0:parseInt(l),max:200,min:0,step:1,onChange:e=>t({containerColumnGap:`${e}px`})})]})}function w({attributes:e,setAttributes:t}){const{containerOverflow:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overflow","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the overflow property.","caledros-basic-blocks"),value:l,options:[{label:"Visible (default)",value:"visible"},{label:"Hidden",value:"hidden"},{label:"Scroll",value:"scroll"},{label:"Auto",value:"auto"}],onChange:e=>{t({containerOverflow:e})}})})}function y({attributes:e,setAttributes:t}){const{stickyNavigationEnabled:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Sticky navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable sticky navigation","caledros-basic-blocks"),help:(0,a.__)("A sticky navigation bar will stick to the top of the screen while scrolling. The effect is only visible in the frontend, not in the editor.","caledros-basic-blocks"),checked:l,onChange:e=>t({stickyNavigationEnabled:e})})})}function S({attributes:e,setAttributes:t}){const{stickyNavHeight:l}=e,n=l.replace(/[\d.]+/g,"")||"px",s=e=>"px"===e?parseInt(l)||0:parseFloat(l)||0,i=(e,t)=>"vh"===e&&t>100?100:t;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the height (${n}) for the sticky navigation bar. This feature is only visible in the frontend.`,"caledros-basic-blocks"),value:s(n),max:"vh"===n?100:3e3,min:0,step:"px"===n?1:.01,onChange:e=>t({stickyNavHeight:`${e}${n}`})}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"}],onChange:e=>{t({stickyNavHeight:`${i(e,s(e))}${e}`})}})]})})}function N({attributes:e,setAttributes:t}){const{stickyNavLightBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),m=p(x,"default"),_=p(x,"theme"),v=p(x,"custom"),f=[...b?[m]:[],_,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",help:(0,a.__)("Enable this option to set a transparent background for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({stickyNavLightBackgroundColor:"#00000000"})}}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a custom background color for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({stickyNavLightBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})]})}function P({attributes:e,setAttributes:t}){const{stickyNavDarkBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),m=p(x,"default"),_=p(x,"theme"),v=p(x,"custom"),f=[...b?[m]:[],_,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",help:(0,a.__)("Enable this option to set a transparent background for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({stickyNavDarkBackgroundColor:"#00000000"})}}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a custom background color for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({stickyNavDarkBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})]})}function M({attributes:e,setAttributes:t}){const{containerBorder:l}=e,i=l.darkColor.split(" "),c=i[0]||"#000",d=i[1]||"#000",b=i[2]||"#000",u=i[3]||"#000",[h,x]=(0,s.useState)(!!l.darkColor.includes(" ")),[p,m]=(0,n.useSettings)("color.palette","color.defaultPalette"),_=p.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,g.select)("core/editor")?.getEditorSettings(),f=v?.__experimentalFeatures?.color?.palette,C=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),k=C(f,"default"),$=C(f,"theme"),j=C(f,"custom"),B=[...m?[k]:[],$,...j.colors?[j]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:h,onChange:()=>{const e=!h;x(e),t(e?{containerBorder:{...l,darkColor:"#000 #000 #000 #000"}}:{containerBorder:{...l,darkColor:"#000"}})}}),!h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:l.darkColor,onChange:e=>t({containerBorder:{...l,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:c,onChange:e=>{t({containerBorder:{...l,darkColor:`${e||"#00000000"} ${d} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:d,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:b,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${d} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:u,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${d} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function H({attributes:e,setAttributes:t}){const{centerStickyNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Center navigation bar","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Center navigation bar","caledros-basic-blocks"),help:(0,a.__)("Center the sticky navigation bar when the maximum width has a fixed value, or when it's less than 100%. For this option to work, the container's left and right margins must be set to 'auto'.","caledros-basic-blocks"),checked:l,onChange:e=>t({centerStickyNav:e})})})}function D({attributes:e,setAttributes:t}){const{overlayStickyNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overlay navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable overlay sticky navigation","caledros-basic-blocks"),help:(0,a.__)("This option transforms the sticky navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling.","caledros-basic-blocks"),checked:l,onChange:e=>t({overlayStickyNav:e})})})}function z({attributes:e,setAttributes:t}){const{overlayNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overlay navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable overlay navigation","caledros-basic-blocks"),help:(0,a.__)("This option transforms the navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling.","caledros-basic-blocks"),checked:l,onChange:e=>t({overlayNav:e})})})}(0,e.registerBlockType)(t.UU,{icon:l.icon,edit:function({attributes:e,setAttributes:t}){const{containerWidth:a,containerHeight:l,containerColumnGap:s,containerLightBackgroundColor:g,containerBackgroundImage:A,containerBgImageFocalPoint:O,containerLightBackgroundGradient:I,containerBorder:F,containerBoxShadow:R,containerMargin:T,containerPadding:E,containerJustifyContent:G,containerAlignItems:U,containerOverflow:L,containerDarkBackgroundColor:W,containerDarkBackgroundGradient:J}=e,V=(e,t,a)=>e||t?{[`--cbb-mm-${a}-bg-gradient`]:[t,e&&`url(${e})`].filter((e=>e)).join(", ")}:{},X=["cbb-mobile-menu-container",R.enabled&&"cbb-mobile-menu-container--has-box-shadow","0px"!==F.width&&"none"!==F.style&&("#00000000"!==F.lightColor||"#00000000"!==F.darkColor)&&"cbb-mobile-menu-container--has-border",(""!==I||""!==J)&&"cbb-mobile-menu-container--has-bg-gradient"].filter((e=>e)).join(" "),q=(0,n.useBlockProps)({className:`${X}`,style:{maxWidth:`${a}`,width:"100%",margin:T.differentMarginsEnabled?`${T.top} ${T.right} ${T.bottom} ${T.left}`:`${T.top}`,...E.useGlobalPadding?{"--cbb-mm-fc-padding":"0px var(--wp--style--root--padding-right, 0px) 0px var(--wp--style--root--padding-left, 0px)"}:{"--cbb-mm-fc-padding":E.differentPaddingsEnabled?`${E.top} ${E.right} ${E.bottom} ${E.left}`:`${E.top}`},"--cbb-mm-light-bg-color":g,"--cbb-mm-dark-bg-color":W,"--cbb-mm-just-content":G,"--cbb-mm-align-items":U,"--cbb-mm-height":l,"--cbb-mm-column-gap":s,...V(A.url,J,"dark"),...V(A.url,I,"light"),"--cbb-mm-bg-position":`${100*O.x}% ${100*O.y}%`,"--cbb-mm-br-style":"0px"===F.width||"none"===F.style||"#00000000"===F.lightColor&&"#00000000"===F.darkColor?"none":F.style,"--cbb-mm-br-width":"0px"===F.width||"none"===F.style||"#00000000"===F.lightColor&&"#00000000"===F.darkColor?"0px":F.width,"--cbb-mm-light-border-color":"0px"!==F.width&&"none"!==F.style&&"#00000000"!==F.lightColor?F.lightColor:"#00000000","--cbb-mm-dark-border-color":"0px"!==F.width&&"none"!==F.style&&"#00000000"!==F.darkColor?F.darkColor:"#00000000","--cbb-mm-br-radius":F.radius,"--cbb-mm-light-box-shadow":`${R.style} ${R.hOffset} ${R.vOffset} ${R.blur} ${R.spread} ${R.lightColor}`,"--cbb-mm-dark-box-shadow":`${R.style} ${R.hOffset} ${R.vOffset} ${R.blur} ${R.spread} ${R.darkColor}`,"--cbb-mm-overflow":L}});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsx)(r.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"layout",title:"Layout"},{name:"style",title:"Style"},{name:"sticky-navbar",title:"Sticky"}],children:a=>"layout"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i,{attributes:e,setAttributes:t}),(0,o.jsx)(c,{attributes:e,setAttributes:t}),(0,o.jsx)(B,{attributes:e,setAttributes:t}),(0,o.jsx)(C,{attributes:e,setAttributes:t}),(0,o.jsx)(k,{attributes:e,setAttributes:t}),(0,o.jsx)($,{attributes:e,setAttributes:t}),(0,o.jsx)(j,{attributes:e,setAttributes:t}),(0,o.jsx)(w,{attributes:e,setAttributes:t}),(0,o.jsx)(z,{attributes:e,setAttributes:t})]}):"style"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{attributes:e,setAttributes:t}),(0,o.jsx)(h,{attributes:e,setAttributes:t}),(0,o.jsx)(d,{attributes:e,setAttributes:t}),(0,o.jsx)(b,{attributes:e,setAttributes:t}),(0,o.jsx)(u,{attributes:e,setAttributes:t}),(0,o.jsx)(p,{attributes:e,setAttributes:t}),(0,o.jsx)(m,{attributes:e,setAttributes:t}),(0,o.jsx)(_,{attributes:e,setAttributes:t}),(0,o.jsx)(M,{attributes:e,setAttributes:t}),(0,o.jsx)(v,{attributes:e,setAttributes:t}),(0,o.jsx)(f,{attributes:e,setAttributes:t})]}):"sticky-navbar"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y,{attributes:e,setAttributes:t}),(0,o.jsx)(S,{attributes:e,setAttributes:t}),(0,o.jsx)(N,{attributes:e,setAttributes:t}),(0,o.jsx)(P,{attributes:e,setAttributes:t}),(0,o.jsx)(H,{attributes:e,setAttributes:t}),(0,o.jsx)(D,{attributes:e,setAttributes:t})]}):null})}),(0,o.jsx)("div",{...q,children:(0,o.jsx)(n.InnerBlocks,{})})]})},save:function({attributes:e}){const{containerWidth:t,containerHeight:a,containerColumnGap:l,containerLightBackgroundColor:r,containerBackgroundImage:s,containerBgImageFocalPoint:i,containerLightBackgroundGradient:c,containerBorder:d,containerBoxShadow:b,containerMargin:u,containerPadding:g,containerJustifyContent:h,containerAlignItems:x,containerOverflow:p,stickyNavigationEnabled:m,stickyNavHeight:_,stickyNavLightBackgroundColor:v,stickyNavDarkBackgroundColor:f,containerDarkBackgroundColor:C,containerDarkBackgroundGradient:k,centerStickyNav:$,overlayStickyNav:j,overlayNav:B}=e,w=(e,t,a)=>e||t?{[`--cbb-mm-${a}-bg-gradient`]:[t,e&&`url(${e})`].filter((e=>e)).join(", ")}:{},y=["cbb-mobile-menu-container",g.useGlobalPadding&&"has-global-padding",m&&"cbb-mobile-menu-container--sticky",b.enabled&&"cbb-mobile-menu-container--has-box-shadow",("#00000000"!==r||"#00000000"!==C)&&"cbb-mobile-menu-container--has-bg-color","0px"!==d.width&&"none"!==d.style&&("#00000000"!==d.lightColor||"#00000000"!==d.darkColor)&&"cbb-mobile-menu-container--has-border",(""!==c||""!==k)&&"cbb-mobile-menu-container--has-bg-gradient"].filter((e=>e)).join(" "),S=n.useBlockProps.save({className:`${y}`,style:{maxWidth:t,width:"100%",margin:u.differentMarginsEnabled?`${u.top} ${u.right} ${u.bottom} ${u.left}`:`${u.top}`,...!g.useGlobalPadding&&{padding:g.differentPaddingsEnabled?`${g.top} ${g.right} ${g.bottom} ${g.left}`:`${g.top}`},..."#00000000"!==r&&{"--cbb-mm-light-bg-color":r},..."#00000000"!==C&&{"--cbb-mm-dark-bg-color":C},..."flex-start"!==h&&{justifyContent:h},..."normal"!==x&&{alignItems:x},...0!==a&&{"--cbb-mm-height":a},..."normal"!==l&&{columnGap:l},...""!==c||""!==k?{...w(s.url,k,"dark"),...w(s.url,c,"light")}:{...s.url&&{backgroundImage:`url(${s.url})`}},...""!==s.url&&{backgroundPosition:`${100*i.x}% ${100*i.y}%`},..."0px"!==d.width&&"none"!==d.style&&("#00000000"!==d.lightColor||"#00000000"!==d.darkColor)&&{borderStyle:d.style},..."0px"!==d.width&&"none"!==d.style&&("#00000000"!==d.lightColor||"#00000000"!==d.darkColor)&&{borderWidth:d.width},..."0px"!==d.width&&"none"!==d.style&&"#00000000"!==d.lightColor&&{"--cbb-mm-light-border-color":d.lightColor},..."0px"!==d.width&&"none"!==d.style&&"#00000000"!==d.darkColor&&{"--cbb-mm-dark-border-color":d.darkColor},..."0px"!==d.radius&&"0%"!==d.radius&&{borderRadius:d.radius},...b.enabled&&{"--cbb-mm-light-box-shadow":`${b.style} ${b.hOffset} ${b.vOffset} ${b.blur} ${b.spread} ${b.lightColor}`},...b.enabled&&{"--cbb-mm-dark-box-shadow":`${b.style} ${b.hOffset} ${b.vOffset} ${b.blur} ${b.spread} ${b.darkColor}`},..."visible"!==p&&{overflow:p},...m&&0!==_&&{"--cbb-mm-sticky-height":_},...m&&{"--cbb-mm-sticky-light-bg-color":v},...m&&{"--cbb-mm-sticky-dark-bg-color":f},...$&&{left:0,right:0},...B?{"--cbb-dm-position":"absolute",left:0,right:0}:{"--cbb-dm-position":"relative"}}});return m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"cbb-mobile-menu-container__watcher"}),(0,o.jsx)("div",{...S,children:(0,o.jsx)(n.InnerBlocks.Content,{})}),(0,o.jsx)("div",{className:"cbb-mobile-menu-container__spacer-bottom",style:{"--cbb-spacer-bottom":`${j?"0px":a}`}})]}):(0,o.jsx)("div",{...S,children:(0,o.jsx)(n.InnerBlocks.Content,{})})}})}},a={};function o(e){var l=a[e];if(void 0!==l)return l.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,a,l,n)=>{if(!a){var r=1/0;for(d=0;d<e.length;d++){for(var[a,l,n]=e[d],s=!0,i=0;i<a.length;i++)(!1&n||r>=n)&&Object.keys(o.O).every((e=>o.O[e](a[i])))?a.splice(i--,1):(s=!1,n<r&&(r=n));if(s){e.splice(d--,1);var c=l();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,l,n]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={333:0,305:0};o.O.j=t=>0===e[t];var t=(t,a)=>{var l,n,[r,s,i]=a,c=0;if(r.some((t=>0!==e[t]))){for(l in s)o.o(s,l)&&(o.m[l]=s[l]);if(i)var d=i(o)}for(t&&t(a);c<r.length;c++)n=r[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},a=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var l=o.O(void 0,[305],(()=>o(698)));l=o.O(l)})();
     1(()=>{"use strict";var e,t={698:()=>{const e=window.wp.blocks,t=JSON.parse('{"UU":"caledros-basic-blocks/mobile-menu-container"}'),a=window.wp.i18n,o=window.ReactJSXRuntime,l={icon:(0,o.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,o.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,o.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,o.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,o.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,o.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,o.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,o.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,o.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,o.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,o.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,o.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},n=window.wp.blockEditor,r=window.wp.components,s=window.wp.element;function i({attributes:e,setAttributes:t}){const{containerWidth:l}=e,i=l.replace(/\d+/g,"")||"px",c=["px","%","em","rem","vw"].includes(i)?i:"px",d=parseInt(l)||0,[b,u]=(0,s.useState)("100%"!==l&&"var(--wp--style--global--content-size)"!==l&&"var(--wp--style--global--wide-size)"!==l),g=(0,n.useSettings)("layout.contentSize","layout.wideSize")||[],[h="620px",x="1280px"]=g,p=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Maximum width","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use custom width",checked:b,onChange:()=>u((e=>!e))}),!b&&(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the max width for the container.","caledros-basic-blocks"),value:"100%"===l||"var(--wp--style--global--content-size)"===l||"var(--wp--style--global--wide-size)"===l?l:"",options:[{disabled:!0,label:"Select an option",value:""},{label:"Full width",value:"100%"},{label:`Content size (${h})`,value:"var(--wp--style--global--content-size)"},{label:`Wide size (${x})`,value:"var(--wp--style--global--wide-size)"}],onChange:e=>{t({containerWidth:e})}}),b&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the custom width (${c}) for the container.`,"caledros-basic-blocks"),value:"var(--wp--style--global--content-size)"===l||"var(--wp--style--global--wide-size)"===l?0:parseInt(l),max:"%"===c||"vw"===c?100:3e3,min:0,step:1,onChange:e=>{t({containerWidth:`${e}${c}`})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerWidth:`${p(e,d)}${e}`})}})]})]})}function c({attributes:e,setAttributes:t}){const{containerHeight:l}=e,n=l.replace(/\d+/g,"")||"px",s=e=>"px"===e?parseInt(l)||0:parseFloat(l)||0,i=(e,t)=>"vh"===e&&t>100?100:t;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the height (${n}) for the container. To ensure a consistent design, all direct child elements must have its minimum height set to zero.`,"caledros-basic-blocks"),value:s(n),max:"vh"===n?100:3e3,min:0,step:1,onChange:e=>t({containerHeight:`${e}${n}`})}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"}],onChange:e=>{t({containerHeight:`${i(e,s(e))}${e}`})}})]})})}function d({attributes:e,setAttributes:t}){const{containerBackgroundImage:l,containerBgImageFocalPoint:s}=e,i=()=>{t({containerBackgroundImage:{id:"",alt:"",url:""}})};return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Background image","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(n.MediaUploadCheck,{children:(0,o.jsx)(n.MediaUpload,{allowedTypes:["image"],value:l.id,render:({open:e})=>(0,o.jsxs)(o.Fragment,{children:[l.url&&(0,o.jsx)(r.FocalPointPicker,{__nextHasNoMarginBottom:!0,onChange:e=>{t({containerBgImageFocalPoint:e})},url:l.url,value:s}),(0,o.jsxs)("div",{style:{display:"flex",gap:"10px"},children:[(0,o.jsx)(r.Button,{variant:"primary",onClick:e,children:"Select image"}),(0,o.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Remove image"})]})]}),onSelect:e=>{t({containerBackgroundImage:{id:e.id,alt:e.alt,url:e.url}})}})})})}function b({attributes:e,setAttributes:t}){const{containerLightBackgroundGradient:l}=e,[n,i]=(0,s.useState)(""!==l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background gradient (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable background gradient","caledros-basic-blocks"),checked:n,onChange:()=>{i((e=>!e)),t({containerLightBackgroundGradient:""})}}),n&&(0,o.jsx)(r.CustomGradientPicker,{onChange:e=>{t({containerLightBackgroundGradient:e})},value:""===l?"linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))":l})]})}function u({attributes:e,setAttributes:t}){const{containerDarkBackgroundGradient:l}=e,[n,i]=(0,s.useState)(""!==l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background gradient (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable background gradient (dark mode)","caledros-basic-blocks"),checked:n,onChange:()=>{i((e=>!e)),t({containerDarkBackgroundGradient:""})}}),n&&(0,o.jsx)(r.CustomGradientPicker,{onChange:e=>{t({containerDarkBackgroundGradient:e})},value:""===l?"linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))":l})]})}const g=window.wp.data;function h({attributes:e,setAttributes:t}){const{containerDarkBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),m=p(x,"default"),_=p(x,"theme"),v=p(x,"custom"),f=[...b?[m]:[],_,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use transparent background.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({containerDarkBackgroundColor:"#00000000"})}}),!i&&(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({containerDarkBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})}function x({attributes:e,setAttributes:t}){const{containerLightBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),m=p(x,"default"),_=p(x,"theme"),v=p(x,"custom"),f=[...b?[m]:[],_,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",checked:i,onChange:()=>{c((e=>!e)),t({containerLightBackgroundColor:"#00000000"})}}),!i&&(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({containerLightBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})}function p({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.style.split(" "),i=n[0]||"solid",c=n[1]||"none",d=n[2]||"none",b=n[3]||"none",[u,g]=(0,s.useState)(!!l.style.includes(" "));return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border style","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border styles for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{containerBorder:{...l,style:"solid none none none"}}:{containerBorder:{...l,style:"solid"}})}}),!u&&(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the border style.","caledros-basic-blocks"),value:l.style,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:e}})}}),u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the top border.","caledros-basic-blocks"),value:i,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${e} ${c} ${d} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the right border.","caledros-basic-blocks"),value:c,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${e} ${d} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the bottom border.","caledros-basic-blocks"),value:d,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${c} ${e} ${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the left border.","caledros-basic-blocks"),value:b,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({containerBorder:{...l,style:`${i} ${c} ${d} ${e}`}})}})]})]})}function m({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.width.split(" "),i=parseInt(n[0])||0,c=parseInt(n[1])||0,d=parseInt(n[2])||0,b=parseInt(n[3])||0,[u,g]=(0,s.useState)(!!l.width.includes(" "));return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border width","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border widths for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{containerBorder:{...l,width:"1px 1px 1px 1px"}}:{containerBorder:{...l,width:"1px"}})}}),!u&&(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the border width (px) for the container.","caledros-basic-blocks"),value:parseInt(l.width),max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${e}px`}})}}),u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the top border width (px) for the container.","caledros-basic-blocks"),value:i,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${e}px ${c}px ${d}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the right border width (px) for the container.","caledros-basic-blocks"),value:c,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${e}px ${d}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the bottom border width (px) for the container.","caledros-basic-blocks"),value:d,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${c}px ${e}px ${b}px`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the left border width (px) for the container.","caledros-basic-blocks"),value:b,max:50,min:0,step:1,onChange:e=>{t({containerBorder:{...l,width:`${i}px ${c}px ${d}px ${e}px`}})}})]})]})}function _({attributes:e,setAttributes:t}){const{containerBorder:l}=e,i=l.lightColor.split(" "),c=i[0]||"#000",d=i[1]||"#000",b=i[2]||"#000",u=i[3]||"#000",[h,x]=(0,s.useState)(!!l.lightColor.includes(" ")),[p,m]=(0,n.useSettings)("color.palette","color.defaultPalette"),_=p.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,g.select)("core/editor")?.getEditorSettings(),f=v?.__experimentalFeatures?.color?.palette,C=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),k=C(f,"default"),$=C(f,"theme"),j=C(f,"custom"),B=[...m?[k]:[],$,...j.colors?[j]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:h,onChange:()=>{const e=!h;x(e),t(e?{containerBorder:{...l,lightColor:"#000 #000 #000 #000"}}:{containerBorder:{...l,lightColor:"#000"}})}}),!h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:l.lightColor,onChange:e=>t({containerBorder:{...l,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:c,onChange:e=>{t({containerBorder:{...l,lightColor:`${e||"#00000000"} ${d} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:d,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:b,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${d} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:u,onChange:e=>{t({containerBorder:{...l,lightColor:`${c} ${d} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function v({attributes:e,setAttributes:t}){const{containerBorder:l}=e,n=l.radius.split(" "),i=parseInt(n[0])||0,c=parseInt(n[1])||0,d=parseInt(n[2])||0,b=parseInt(n[3])||0,u=l.radius.split(" "),g=u[0]?u[0].replace(/\d+/g,""):"px",h=u[1]?u[1].replace(/\d+/g,""):"px",x=u[2]?u[2].replace(/\d+/g,""):"px",p=u[3]?u[3].replace(/\d+/g,""):"px",[m,_]=(0,s.useState)(!!l.radius.includes(" ")),v=(e,t)=>"%"===e&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border radius","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border radiuses for each corner",checked:m,onChange:()=>{const e=!m;_(e),t(e?{containerBorder:{...l,radius:"10px 10px 10px 10px"}}:{containerBorder:{...l,radius:"10px"}})}}),!m&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the border radius (${g}) for the container.`,"caledros-basic-blocks"),value:parseInt(l.radius),max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${e}${g}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${v(e,parseInt(l.radius))}${e}`}})}})]}),m&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-left border radius (${g}).`,"caledros-basic-blocks"),value:i,max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${e}${g} ${c}${h} ${d}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${v(e,i)}${e} ${c}${h} ${d}${x} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-right border radius (${h}).`,"caledros-basic-blocks"),value:c,max:"%"===h?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${e}${h} ${d}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:h,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${v(e,c)}${e} ${d}${x} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-right border radius (${x}).`,"caledros-basic-blocks"),value:d,max:"%"===x?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${e}${x} ${b}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${v(e,d)}${e} ${b}${p}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-left border radius (${p}).`,"caledros-basic-blocks"),value:b,max:"%"===p?100:150,min:0,step:1,onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${d}${x} ${e}${p}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({containerBorder:{...l,radius:`${i}${g} ${c}${h} ${d}${x} ${v(e,b)}${e}`}})}})]})]})]})}function f({attributes:e,setAttributes:t}){const{containerBoxShadow:l}=e,[s,i]=(0,n.useSettings)("color.palette","color.defaultPalette"),c=s.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),d=(0,g.select)("core/editor")?.getEditorSettings(),b=d?.__experimentalFeatures?.color?.palette,u=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),h=u(b,"default"),x=u(b,"theme"),p=u(b,"custom"),m=[...i?[h]:[],x,...p.colors?[p]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Box shadow","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable box shadow","caledros-basic-blocks"),checked:l.enabled,onChange:e=>{t({containerBoxShadow:{...l,enabled:e}})}}),l.enabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the box shadow.","caledros-basic-blocks"),value:""===l.style?"outline":"inset",options:[{label:"Outline",value:"outline"},{label:"Inset",value:"inset"}],onChange:e=>{t({containerBoxShadow:{...l,style:`${"outline"===e?"":e}`}})}}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the horizontal offset (px).","caledros-basic-blocks"),value:parseInt(l.hOffset),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,hOffset:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the vertical offset (px).","caledros-basic-blocks"),value:parseInt(l.vOffset),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,vOffset:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the blur (px).","caledros-basic-blocks"),value:parseInt(l.blur),max:100,min:0,step:1,onChange:e=>t({containerBoxShadow:{...l,blur:`${e}px`}})}),(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the spread (px).","caledros-basic-blocks"),value:parseInt(l.spread),max:100,min:-100,step:1,onChange:e=>t({containerBoxShadow:{...l,spread:`${e}px`}})}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow (light mode)","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:b?m:c,value:l.lightColor,onChange:e=>t({containerBoxShadow:{...l,lightColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow (dark mode)","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:b?m:c,value:l.darkColor,onChange:e=>t({containerBoxShadow:{...l,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]})]})}function C({attributes:e,setAttributes:t}){const{containerMargin:l}=e,n=parseInt(l.top)||0,s=parseInt(l.left)||0,i=parseInt(l.bottom)||0,c=parseInt(l.right)||0,d=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),u=l.bottom.replace(/\d+/g,""),g=l.right.replace(/\d+/g,""),h=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different margins","caledros-basic-blocks"),checked:l.differentMarginsEnabled,onChange:e=>{t({containerMargin:{...l,differentMarginsEnabled:e}})}}),!l.differentMarginsEnabled&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the margin (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,top:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,top:`${h(e,n)}${e}`}})}})]}),l.differentMarginsEnabled&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top margin (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,top:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,top:`${h(e,n)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right margin (${g}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,right:`${"auto"===g?"":e}${g}`}})},disabled:"auto"===g}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,right:`${h(e,c)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom margin (${u}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,bottom:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,bottom:`${h(e,i)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left margin (${b}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({containerMargin:{...l,left:`${"auto"===b?"":e}${b}`}})},disabled:"auto"===b}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({containerMargin:{...l,left:`${h(e,s)}${e}`}})}})]})]})]})}function k({attributes:e,setAttributes:t}){const{containerPadding:l}=e,n=parseInt(l.top)||0,s=parseInt(l.left)||0,i=parseInt(l.bottom)||0,c=parseInt(l.right)||0,d=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),u=l.bottom.replace(/\d+/g,""),g=l.right.replace(/\d+/g,""),h=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Padding","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use global padding","caledros-basic-blocks"),help:(0,a.__)("This option applies predefined padding to the right and left sides of the block, ensuring consistency across the entire site. To adjust this padding, navigate to the Layout section in the Full Site Editor.","caledros-basic-blocks"),checked:l.useGlobalPadding,onChange:e=>{t({containerPadding:{...l,useGlobalPadding:e}})}}),!l.useGlobalPadding&&(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different paddings","caledros-basic-blocks"),checked:l.differentPaddingsEnabled,onChange:e=>{t({containerPadding:{...l,differentPaddingsEnabled:e}})}}),!l.differentPaddingsEnabled&&!l.useGlobalPadding&&(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the padding (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,top:`${e}${d}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,top:`${h(e,n)}${e}`}})}})]}),l.differentPaddingsEnabled&&!l.useGlobalPadding&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top padding (${d}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,top:`${e}${d}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,top:`${h(e,n)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right padding (${g}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,right:`${e}${g}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,right:`${h(e,c)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom padding (${u}) for the container.`,"caledros-basic-blocks"),value:i,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,bottom:`${e}${u}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,bottom:`${h(e,i)}${e}`}})}})]}),(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left padding (${b}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({containerPadding:{...l,left:`${e}${b}`}})}}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({containerPadding:{...l,left:`${h(e,s)}${e}`}})}})]})]})]})}function $({attributes:e,setAttributes:t}){const{containerJustifyContent:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Justify content","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the justify content property.","caledros-basic-blocks"),value:l,options:[{label:"Flex start (default)",value:"flex-start"},{label:"Flex end",value:"flex-end"},{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Space evenly",value:"space-evenly"}],onChange:e=>{t({containerJustifyContent:e})}})})}function j({attributes:e,setAttributes:t}){const{containerAlignItems:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Align items","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the align items property.","caledros-basic-blocks"),value:l,options:[{label:"Flex start",value:"flex-start"},{label:"Flex end",value:"flex-end"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"},{label:"Baseline",value:"baseline"},{label:"Normal (default)",value:"normal"}],onChange:e=>{t({containerAlignItems:e})}})})}function B({attributes:e,setAttributes:t}){const{containerColumnGap:l}=e,[n,i]=(0,s.useState)("normal"===l);return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Column gap","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Use normal column gap (default value)","caledros-basic-blocks"),checked:n,onChange:()=>{const e=n?"0":"normal";i((e=>!e)),t({containerColumnGap:e})}}),!n&&(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the column gap (px) for the flex container.","caledros-basic-blocks"),value:isNaN(parseInt(l))?0:parseInt(l),max:200,min:0,step:1,onChange:e=>t({containerColumnGap:`${e}px`})})]})}function w({attributes:e,setAttributes:t}){const{containerOverflow:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overflow","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Select the value for the overflow property.","caledros-basic-blocks"),value:l,options:[{label:"Visible (default)",value:"visible"},{label:"Hidden",value:"hidden"},{label:"Scroll",value:"scroll"},{label:"Auto",value:"auto"}],onChange:e=>{t({containerOverflow:e})}})})}function y({attributes:e,setAttributes:t}){const{stickyNavigationEnabled:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Sticky navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable sticky navigation","caledros-basic-blocks"),help:(0,a.__)("A sticky navigation bar will stick to the top of the screen while scrolling. The effect is only visible in the frontend, not in the editor.","caledros-basic-blocks"),checked:l,onChange:e=>t({stickyNavigationEnabled:e})})})}function S({attributes:e,setAttributes:t}){const{stickyNavHeight:l}=e,n=l.replace(/[\d.]+/g,"")||"px",s=e=>"px"===e?parseInt(l)||0:parseFloat(l)||0,i=(e,t)=>"vh"===e&&t>100?100:t;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsxs)("div",{className:"cbb-editor__grid",children:[(0,o.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the height (${n}) for the sticky navigation bar. This feature is only visible in the frontend.`,"caledros-basic-blocks"),value:s(n),max:"vh"===n?100:3e3,min:0,step:"px"===n?1:.01,onChange:e=>t({stickyNavHeight:`${e}${n}`})}),(0,o.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:n,options:[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vh",value:"vh"}],onChange:e=>{t({stickyNavHeight:`${i(e,s(e))}${e}`})}})]})})}function N({attributes:e,setAttributes:t}){const{stickyNavLightBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),m=p(x,"default"),_=p(x,"theme"),v=p(x,"custom"),f=[...b?[m]:[],_,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",help:(0,a.__)("Enable this option to set a transparent background for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({stickyNavLightBackgroundColor:"#00000000"})}}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a custom background color for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({stickyNavLightBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})]})}function P({attributes:e,setAttributes:t}){const{stickyNavDarkBackgroundColor:l}=e,[i,c]=(0,s.useState)("#00000000"===l),[d,b]=(0,n.useSettings)("color.palette","color.defaultPalette"),u=d.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),h=(0,g.select)("core/editor")?.getEditorSettings(),x=h?.__experimentalFeatures?.color?.palette,p=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),m=p(x,"default"),_=p(x,"theme"),v=p(x,"custom"),f=[...b?[m]:[],_,...v.colors?[v]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Background color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use transparent background",help:(0,a.__)("Enable this option to set a transparent background for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks"),checked:i,onChange:()=>{c((e=>!e)),t({stickyNavDarkBackgroundColor:"#00000000"})}}),!i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a custom background color for the sticky navigation bar. This feature is only visible in the frontend.","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:x?f:u,value:l,onChange:e=>t({stickyNavDarkBackgroundColor:e}),enableAlpha:!0,clearable:!1})]})]})}function M({attributes:e,setAttributes:t}){const{containerBorder:l}=e,i=l.darkColor.split(" "),c=i[0]||"#000",d=i[1]||"#000",b=i[2]||"#000",u=i[3]||"#000",[h,x]=(0,s.useState)(!!l.darkColor.includes(" ")),[p,m]=(0,n.useSettings)("color.palette","color.defaultPalette"),_=p.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),v=(0,g.select)("core/editor")?.getEditorSettings(),f=v?.__experimentalFeatures?.color?.palette,C=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),k=C(f,"default"),$=C(f,"theme"),j=C(f,"custom"),B=[...m?[k]:[],$,...j.colors?[j]:[]];return(0,o.jsxs)(r.PanelBody,{title:(0,a.__)("Border color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:[(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:h,onChange:()=>{const e=!h;x(e),t(e?{containerBorder:{...l,darkColor:"#000 #000 #000 #000"}}:{containerBorder:{...l,darkColor:"#000"}})}}),!h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:l.darkColor,onChange:e=>t({containerBorder:{...l,darkColor:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:c,onChange:e=>{t({containerBorder:{...l,darkColor:`${e||"#00000000"} ${d} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:d,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:b,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${d} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,o.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,o.jsx)(r.ColorPalette,{colors:f?B:_,value:u,onChange:e=>{t({containerBorder:{...l,darkColor:`${c} ${d} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function H({attributes:e,setAttributes:t}){const{centerStickyNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Center navigation bar","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Center navigation bar","caledros-basic-blocks"),help:(0,a.__)("Center the sticky navigation bar when the maximum width has a fixed value, or when it's less than 100%. For this option to work, the container's left and right margins must be set to 'auto'.","caledros-basic-blocks"),checked:l,onChange:e=>t({centerStickyNav:e})})})}function D({attributes:e,setAttributes:t}){const{overlayStickyNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overlay navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable overlay sticky navigation","caledros-basic-blocks"),help:(0,a.__)("This option transforms the sticky navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling.","caledros-basic-blocks"),checked:l,onChange:e=>t({overlayStickyNav:e})})})}function z({attributes:e,setAttributes:t}){const{overlayNav:l}=e;return(0,o.jsx)(r.PanelBody,{title:(0,a.__)("Overlay navigation","caledros-basic-blocks"),initialOpen:!1,children:(0,o.jsx)(r.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable overlay navigation","caledros-basic-blocks"),help:(0,a.__)("This option transforms the navigation bar into an overlay, allowing it to overlap the website's content.","caledros-basic-blocks"),checked:l,onChange:e=>t({overlayNav:e})})})}(0,e.registerBlockType)(t.UU,{icon:l.icon,edit:function({attributes:e,setAttributes:t}){const{containerWidth:a,containerHeight:l,containerColumnGap:s,containerLightBackgroundColor:g,containerBackgroundImage:A,containerBgImageFocalPoint:O,containerLightBackgroundGradient:I,containerBorder:F,containerBoxShadow:R,containerMargin:T,containerPadding:E,containerJustifyContent:G,containerAlignItems:U,containerOverflow:L,containerDarkBackgroundColor:W,containerDarkBackgroundGradient:J}=e,V=(e,t,a)=>e||t?{[`--cbb-mm-${a}-bg-gradient`]:[t,e&&`url(${e})`].filter((e=>e)).join(", ")}:{},X=["cbb-mobile-menu-container",R.enabled&&"cbb-mobile-menu-container--has-box-shadow","0px"!==F.width&&"none"!==F.style&&("#00000000"!==F.lightColor||"#00000000"!==F.darkColor)&&"cbb-mobile-menu-container--has-border",(""!==I||""!==J)&&"cbb-mobile-menu-container--has-bg-gradient"].filter((e=>e)).join(" "),q=(0,n.useBlockProps)({className:`${X}`,style:{maxWidth:`${a}`,width:"100%",margin:T.differentMarginsEnabled?`${T.top} ${T.right} ${T.bottom} ${T.left}`:`${T.top}`,...E.useGlobalPadding?{"--cbb-mm-fc-padding":"0px var(--wp--style--root--padding-right, 0px) 0px var(--wp--style--root--padding-left, 0px)"}:{"--cbb-mm-fc-padding":E.differentPaddingsEnabled?`${E.top} ${E.right} ${E.bottom} ${E.left}`:`${E.top}`},"--cbb-mm-light-bg-color":g,"--cbb-mm-dark-bg-color":W,"--cbb-mm-just-content":G,"--cbb-mm-align-items":U,"--cbb-mm-height":l,"--cbb-mm-column-gap":s,...V(A.url,J,"dark"),...V(A.url,I,"light"),"--cbb-mm-bg-position":`${100*O.x}% ${100*O.y}%`,"--cbb-mm-br-style":"0px"===F.width||"none"===F.style||"#00000000"===F.lightColor&&"#00000000"===F.darkColor?"none":F.style,"--cbb-mm-br-width":"0px"===F.width||"none"===F.style||"#00000000"===F.lightColor&&"#00000000"===F.darkColor?"0px":F.width,"--cbb-mm-light-border-color":"0px"!==F.width&&"none"!==F.style&&"#00000000"!==F.lightColor?F.lightColor:"#00000000","--cbb-mm-dark-border-color":"0px"!==F.width&&"none"!==F.style&&"#00000000"!==F.darkColor?F.darkColor:"#00000000","--cbb-mm-br-radius":F.radius,"--cbb-mm-light-box-shadow":`${R.style} ${R.hOffset} ${R.vOffset} ${R.blur} ${R.spread} ${R.lightColor}`,"--cbb-mm-dark-box-shadow":`${R.style} ${R.hOffset} ${R.vOffset} ${R.blur} ${R.spread} ${R.darkColor}`,"--cbb-mm-overflow":L}});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsx)(r.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"layout",title:"Layout"},{name:"style",title:"Style"},{name:"sticky-navbar",title:"Sticky"}],children:a=>"layout"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i,{attributes:e,setAttributes:t}),(0,o.jsx)(c,{attributes:e,setAttributes:t}),(0,o.jsx)(B,{attributes:e,setAttributes:t}),(0,o.jsx)(C,{attributes:e,setAttributes:t}),(0,o.jsx)(k,{attributes:e,setAttributes:t}),(0,o.jsx)($,{attributes:e,setAttributes:t}),(0,o.jsx)(j,{attributes:e,setAttributes:t}),(0,o.jsx)(w,{attributes:e,setAttributes:t}),(0,o.jsx)(z,{attributes:e,setAttributes:t})]}):"style"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{attributes:e,setAttributes:t}),(0,o.jsx)(h,{attributes:e,setAttributes:t}),(0,o.jsx)(d,{attributes:e,setAttributes:t}),(0,o.jsx)(b,{attributes:e,setAttributes:t}),(0,o.jsx)(u,{attributes:e,setAttributes:t}),(0,o.jsx)(p,{attributes:e,setAttributes:t}),(0,o.jsx)(m,{attributes:e,setAttributes:t}),(0,o.jsx)(_,{attributes:e,setAttributes:t}),(0,o.jsx)(M,{attributes:e,setAttributes:t}),(0,o.jsx)(v,{attributes:e,setAttributes:t}),(0,o.jsx)(f,{attributes:e,setAttributes:t})]}):"sticky-navbar"===a.name?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y,{attributes:e,setAttributes:t}),(0,o.jsx)(S,{attributes:e,setAttributes:t}),(0,o.jsx)(N,{attributes:e,setAttributes:t}),(0,o.jsx)(P,{attributes:e,setAttributes:t}),(0,o.jsx)(H,{attributes:e,setAttributes:t}),(0,o.jsx)(D,{attributes:e,setAttributes:t})]}):null})}),(0,o.jsx)("div",{...q,children:(0,o.jsx)(n.InnerBlocks,{})})]})},save:function({attributes:e}){const{containerWidth:t,containerHeight:a,containerColumnGap:l,containerLightBackgroundColor:r,containerBackgroundImage:s,containerBgImageFocalPoint:i,containerLightBackgroundGradient:c,containerBorder:d,containerBoxShadow:b,containerMargin:u,containerPadding:g,containerJustifyContent:h,containerAlignItems:x,containerOverflow:p,stickyNavigationEnabled:m,stickyNavHeight:_,stickyNavLightBackgroundColor:v,stickyNavDarkBackgroundColor:f,containerDarkBackgroundColor:C,containerDarkBackgroundGradient:k,centerStickyNav:$,overlayStickyNav:j,overlayNav:B}=e,w=(e,t,a)=>e||t?{[`--cbb-mm-${a}-bg-gradient`]:[t,e&&`url(${e})`].filter((e=>e)).join(", ")}:{},y=["cbb-mobile-menu-container",g.useGlobalPadding&&"has-global-padding",m&&"cbb-mobile-menu-container--sticky",b.enabled&&"cbb-mobile-menu-container--has-box-shadow",("#00000000"!==r||"#00000000"!==C)&&"cbb-mobile-menu-container--has-bg-color","0px"!==d.width&&"none"!==d.style&&("#00000000"!==d.lightColor||"#00000000"!==d.darkColor)&&"cbb-mobile-menu-container--has-border",(""!==c||""!==k)&&"cbb-mobile-menu-container--has-bg-gradient"].filter((e=>e)).join(" "),S=n.useBlockProps.save({className:`${y}`,style:{maxWidth:t,width:"100%",margin:u.differentMarginsEnabled?`${u.top} ${u.right} ${u.bottom} ${u.left}`:`${u.top}`,...!g.useGlobalPadding&&{padding:g.differentPaddingsEnabled?`${g.top} ${g.right} ${g.bottom} ${g.left}`:`${g.top}`},..."#00000000"!==r&&{"--cbb-mm-light-bg-color":r},..."#00000000"!==C&&{"--cbb-mm-dark-bg-color":C},..."flex-start"!==h&&{justifyContent:h},..."normal"!==x&&{alignItems:x},...0!==a&&{"--cbb-mm-height":a},..."normal"!==l&&{columnGap:l},...""!==c||""!==k?{...w(s.url,k,"dark"),...w(s.url,c,"light")}:{...s.url&&{backgroundImage:`url(${s.url})`}},...""!==s.url&&{backgroundPosition:`${100*i.x}% ${100*i.y}%`},..."0px"!==d.width&&"none"!==d.style&&("#00000000"!==d.lightColor||"#00000000"!==d.darkColor)&&{borderStyle:d.style},..."0px"!==d.width&&"none"!==d.style&&("#00000000"!==d.lightColor||"#00000000"!==d.darkColor)&&{borderWidth:d.width},..."0px"!==d.width&&"none"!==d.style&&"#00000000"!==d.lightColor&&{"--cbb-mm-light-border-color":d.lightColor},..."0px"!==d.width&&"none"!==d.style&&"#00000000"!==d.darkColor&&{"--cbb-mm-dark-border-color":d.darkColor},..."0px"!==d.radius&&"0%"!==d.radius&&{borderRadius:d.radius},...b.enabled&&{"--cbb-mm-light-box-shadow":`${b.style} ${b.hOffset} ${b.vOffset} ${b.blur} ${b.spread} ${b.lightColor}`},...b.enabled&&{"--cbb-mm-dark-box-shadow":`${b.style} ${b.hOffset} ${b.vOffset} ${b.blur} ${b.spread} ${b.darkColor}`},..."visible"!==p&&{overflow:p},...m&&0!==_&&{"--cbb-mm-sticky-height":_},...m&&{"--cbb-mm-sticky-light-bg-color":v},...m&&{"--cbb-mm-sticky-dark-bg-color":f},...$&&{left:0,right:0},...B?{"--cbb-dm-position":"absolute",left:0,right:0}:{"--cbb-dm-position":"relative"}}});return m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"cbb-mobile-menu-container__watcher"}),(0,o.jsx)("div",{...S,children:(0,o.jsx)(n.InnerBlocks.Content,{})}),(0,o.jsx)("div",{className:"cbb-mobile-menu-container__spacer-bottom",style:{"--cbb-spacer-bottom":`${j?"0px":a}`}})]}):(0,o.jsx)("div",{...S,children:(0,o.jsx)(n.InnerBlocks.Content,{})})}})}},a={};function o(e){var l=a[e];if(void 0!==l)return l.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,a,l,n)=>{if(!a){var r=1/0;for(d=0;d<e.length;d++){for(var[a,l,n]=e[d],s=!0,i=0;i<a.length;i++)(!1&n||r>=n)&&Object.keys(o.O).every((e=>o.O[e](a[i])))?a.splice(i--,1):(s=!1,n<r&&(r=n));if(s){e.splice(d--,1);var c=l();void 0!==c&&(t=c)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,l,n]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={333:0,305:0};o.O.j=t=>0===e[t];var t=(t,a)=>{var l,n,[r,s,i]=a,c=0;if(r.some((t=>0!==e[t]))){for(l in s)o.o(s,l)&&(o.m[l]=s[l]);if(i)var d=i(o)}for(t&&t(a);c<r.length;c++)n=r[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},a=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var l=o.O(void 0,[305],(()=>o(698)));l=o.O(l)})();
  • caledros-basic-blocks/trunk/build/blocks/responsive-image/index.asset.php

    r3313530 r3321999  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-i18n'), 'version' => 'a01ea1a5e42ab7d9622e');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-i18n'), 'version' => 'cb4af15672949939c390');
  • caledros-basic-blocks/trunk/build/blocks/responsive-image/index.js

    r3313530 r3321999  
    1 (()=>{"use strict";var e,t={228:()=>{const e=window.wp.blocks,t=JSON.parse('{"UU":"caledros-basic-blocks/responsive-image"}'),a=window.wp.i18n,l=window.ReactJSXRuntime,o={icon:(0,l.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,l.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,l.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,l.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,l.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,l.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,l.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,l.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,l.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,l.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,l.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,l.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},s=window.wp.blockEditor,i=window.wp.components,n=window.wp.element,r=window.wp.escapeHtml;function d({attributes:e,setAttributes:t}){const{imgWidth:o,sourceImage:s}=e,n=o.content.replace(/\d+/g,"")||"px",r=["px","%","em","rem","vw"].includes(n)?n:"px",d=parseInt(o.content)||0,c=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Max width","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)(`Use actual width (${s.width}px)`,"caledros-basic-blocks"),checked:o.defaultWidthEnabled,onChange:e=>{t({imgWidth:{content:`${s.width}px`,defaultWidthEnabled:e}})}}),!o.defaultWidthEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Choose the width (${r}) for the image.`,"caledros-basic-blocks"),value:parseInt(o.content),max:"%"===r||"vw"===r?100:2e3,min:0,step:1,onChange:e=>t({imgWidth:{...o,content:`${e}${r}`}})}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:r,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgWidth:{...o,content:`${c(e,d)}${e}`}})}})]})]})}function c({attributes:e,setAttributes:t}){const{imgHeight:o,sourceImage:s}=e,n=o.content.replace(/\d+/g,"")||"px",r=["px","%","em","rem","vw","auto"].includes(n)?n:"px",d=parseInt(o.content)||0,c=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)(`Use actual height (${s.height}px)`,"caledros-basic-blocks"),checked:o.defaultHeightEnabled,onChange:e=>{t({imgHeight:{content:`${s.height}px`,defaultHeightEnabled:e}})}}),!o.defaultHeightEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Choose the height (${r}) for the image.`,"caledros-basic-blocks"),value:parseInt(o.content),max:"%"===r||"vw"===r?100:2e3,min:0,step:1,onChange:e=>t({imgHeight:{...o,content:`${e}${r}`}}),disabled:"auto"===o.content}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:r,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>t({imgHeight:{...o,content:`${c(e,d)}${e}`}})})]})]})}function b({attributes:e,setAttributes:t}){const{imgObjectFit:o}=e;return(0,l.jsx)(i.PanelBody,{title:(0,a.__)("Object fit","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the object fit property for the image.","caledros-basic-blocks"),value:o,options:[{label:"Contain",value:"contain"},{label:"Cover",value:"cover"}],onChange:e=>t({imgObjectFit:e})})})}function u({attributes:e,setAttributes:t}){const{imgMargin:o}=e,s=parseInt(o.top)||0,n=parseInt(o.left)||0,r=parseInt(o.bottom)||0,d=parseInt(o.right)||0,c=o.top.replace(/\d+/g,""),b=o.left.replace(/\d+/g,""),u=o.bottom.replace(/\d+/g,""),g=o.right.replace(/\d+/g,""),h=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different margins","caledros-basic-blocks"),checked:o.differentMarginsEnabled,onChange:e=>{t({imgMargin:{...o,differentMarginsEnabled:e}})}}),!o.differentMarginsEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the margin (${c}) for the image.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,top:`${"auto"===c?"":e}${c}`}})},disabled:"auto"===c}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,top:`${h(e,s)}${e}`}})}})]}),o.differentMarginsEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top margin (${c}) for the image.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,top:`${"auto"===c?"":e}${c}`}})},disabled:"auto"===c}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,top:`${h(e,s)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right margin (${g}) for the image.`,"caledros-basic-blocks"),value:d,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,right:`${"auto"===g?"":e}${g}`}})},disabled:"auto"===g}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,right:`${h(e,d)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom margin (${u}) for the image.`,"caledros-basic-blocks"),value:r,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,bottom:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,bottom:`${h(e,r)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left margin (${b}) for the image.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,left:`${"auto"===b?"":e}${b}`}})},disabled:"auto"===b}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,left:`${h(e,n)}${e}`}})}})]})]})]})}function g({attributes:e,setAttributes:t}){const{imgPadding:o}=e,s=parseInt(o.top)||0,n=parseInt(o.left)||0,r=parseInt(o.bottom)||0,d=parseInt(o.right)||0,c=o.top.replace(/\d+/g,""),b=o.left.replace(/\d+/g,""),u=o.bottom.replace(/\d+/g,""),g=o.right.replace(/\d+/g,""),h=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Padding","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different paddings","caledros-basic-blocks"),checked:o.differentPaddingsEnabled,onChange:e=>{t({imgPadding:{...o,differentPaddingsEnabled:e}})}}),!o.differentPaddingsEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the padding (${c}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,top:`${e}${c}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,top:`${h(e,s)}${e}`}})}})]}),o.differentPaddingsEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top padding (${c}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,top:`${e}${c}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,top:`${h(e,s)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right padding (${g}) for the container.`,"caledros-basic-blocks"),value:d,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,right:`${e}${g}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,right:`${h(e,d)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom padding (${u}) for the container.`,"caledros-basic-blocks"),value:r,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,bottom:`${e}${u}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,bottom:`${h(e,r)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left padding (${b}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,left:`${e}${b}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,left:`${h(e,n)}${e}`}})}})]})]})]})}const h=window.wp.blob;function x({attributes:e,setAttributes:t,setShowSpinner:o}){const{sourceImage:n}=e;return(0,l.jsx)(i.ToolbarGroup,{children:(0,l.jsx)(s.MediaReplaceFlow,{name:(0,a.__)("Replace image","caledros-basic-blocks"),mediaId:n.id,mediaURL:n.url,allowedTypes:["image"],accept:"image/*",onError:e=>console.error(e),onSelect:e=>{return a=e,void((0,h.isBlobURL)(a.url)?o(!0):(o(!1),t({sourceImage:{id:a.id,alt:a.alt,url:a.url,height:a.media_details?.height||a.height,width:a.media_details?.width||a.width,srcSet:`${l=a.media_details?.sizes||a.sizes,Object.keys(l).filter((e=>"thumbnail"!==e)).map((e=>{const{url:t,width:a,source_url:o}=l[e];return`${t||o} ${a}w`})).join(", ")}`,sizes:`(max-width:${a.media_details?.width||a.width}px) 100vw, ${a.media_details?.width||a.width}px`}}),(0,h.revokeBlobURL)(a.url)));var a,l}})})}function p({attributes:e,setAttributes:t,showSpinner:a,setShowSpinner:o}){const{sourceImage:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(s.MediaPlaceholder,{allowedTypes:["image"],accept:"image/*",icon:"camera",onSelect:e=>{var a;(0,h.isBlobURL)(e.url)?o(!0):(o(!1),t({sourceImage:{id:e.id,alt:e.alt,url:e.url,height:e.media_details?.height||e.height,width:e.media_details?.width||e.width,srcSet:`${a=e.media_details?.sizes||e.sizes,Object.keys(a).filter((e=>"thumbnail"!==e)).map((e=>{const{url:t,width:l,source_url:o}=a[e];return`${t||o} ${l}w`})).join(", ")}`,sizes:`(max-width:${e.media_details?.width||e.width}px) 100vw, ${e.media_details?.width||e.width}px`}}),(0,h.revokeBlobURL)(e.url))},onError:e=>console.error(e),disableMediaButtons:i.url||a})})}function m({attributes:e,setAttributes:t}){const{imgLazyLoad:o}=e;return(0,l.jsx)(i.PanelBody,{title:(0,a.__)("Lazy loading","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable lazy loading","caledros-basic-blocks"),checked:o,onChange:e=>{t({imgLazyLoad:e})}})})}function _({attributes:e,setAttributes:t}){const{imgCaption:o}=e;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Caption","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,checked:o.enabled,label:(0,a.__)("Enable image caption","caledros-basic-blocks"),onChange:e=>{t({imgCaption:{...o,enabled:e}})}}),o.enabled&&(0,l.jsx)(i.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{t({imgCaption:{...o,content:e}})},value:o.content,help:(0,a.__)("Write the image caption.","caledros-basic-blocks")})]})}function v({attributes:e,setAttributes:t}){const{sourceImage:o}=e;return(0,l.jsx)(i.PanelBody,{title:(0,a.__)("Alt text","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(i.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{t({sourceImage:{...o,alt:e}})},value:o.alt,help:(0,a.__)("Write the alt text for the image.","caledros-basic-blocks")})})}function $({attributes:e,setAttributes:t}){const{imgBorder:o}=e,s=o.style.split(" "),r=s[0]||"solid",d=s[1]||"none",c=s[2]||"none",b=s[3]||"none",[u,g]=(0,n.useState)(!!o.style.includes(" "));return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Border style","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border styles for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{imgBorder:{...o,style:"solid none none none"}}:{imgBorder:{...o,style:"solid"}})}}),!u&&(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the border style.","caledros-basic-blocks"),value:o.style,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:e}})}}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the top border.","caledros-basic-blocks"),value:r,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:`${e} ${d} ${c} ${b}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the right border.","caledros-basic-blocks"),value:d,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:`${r} ${e} ${c} ${b}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the bottom border.","caledros-basic-blocks"),value:c,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:`${r} ${d} ${e} ${b}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the left border.","caledros-basic-blocks"),value:b,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:`${r} ${d} ${c} ${e}`}})}})]})]})}function f({attributes:e,setAttributes:t}){const{imgBorder:o}=e,s=o.width.split(" "),r=parseInt(s[0])||0,d=parseInt(s[1])||0,c=parseInt(s[2])||0,b=parseInt(s[3])||0,[u,g]=(0,n.useState)(!!o.width.includes(" "));return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Border width","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border widths for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{imgBorder:{...o,width:"1px 1px 1px 1px"}}:{imgBorder:{...o,width:"1px"}})}}),!u&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the border width (px) for the image.","caledros-basic-blocks"),value:parseInt(o.width),max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${e}px`}})}}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the top border width (px) for the image.","caledros-basic-blocks"),value:r,max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${e}px ${d}px ${c}px ${b}px`}})}}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the right border width (px) for the image.","caledros-basic-blocks"),value:d,max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${r}px ${e}px ${c}px ${b}px`}})}}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the bottom border width (px) for the image.","caledros-basic-blocks"),value:c,max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${r}px ${d}px ${e}px ${b}px`}})}}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the left border width (px) for the image.","caledros-basic-blocks"),value:b,max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${r}px ${d}px ${c}px ${e}px`}})}})]})]})}const C=window.wp.data;function w({attributes:e,setAttributes:t}){const{imgBorder:o}=e,r=o.color.split(" "),d=r[0]||"#000",c=r[1]||"#000",b=r[2]||"#000",u=r[3]||"#000",[g,h]=(0,n.useState)(!!o.color.includes(" ")),[x,p]=(0,s.useSettings)("color.palette","color.defaultPalette"),m=x.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),_=(0,C.select)("core/editor")?.getEditorSettings(),v=_?.__experimentalFeatures?.color?.palette,$=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),f=$(v,"default"),w=$(v,"theme"),j=$(v,"custom"),B=[...p?[f]:[],w,...j.colors?[j]:[]];return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Border color","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:g,onChange:()=>{const e=!g;h(e),t(e?{imgBorder:{...o,color:"#000 #000 #000 #000"}}:{imgBorder:{...o,color:"#000"}})}}),!g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:o.color,onChange:e=>t({imgBorder:{...o,color:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:d,onChange:e=>{t({imgBorder:{...o,color:`${e||"#00000000"} ${c} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:c,onChange:e=>{t({imgBorder:{...o,color:`${d} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:b,onChange:e=>{t({imgBorder:{...o,color:`${d} ${c} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:u,onChange:e=>{t({imgBorder:{...o,color:`${d} ${c} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function j({attributes:e,setAttributes:t}){const{imgBorder:o}=e,s=o.radius.split(" "),r=parseInt(s[0])||0,d=parseInt(s[1])||0,c=parseInt(s[2])||0,b=parseInt(s[3])||0,u=o.radius.split(" "),g=u[0]?u[0].replace(/\d+/g,""):"px",h=u[1]?u[1].replace(/\d+/g,""):"px",x=u[2]?u[2].replace(/\d+/g,""):"px",p=u[3]?u[3].replace(/\d+/g,""):"px",[m,_]=(0,n.useState)(!!o.radius.includes(" ")),v=(e,t)=>"%"===e&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Border radius","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border radiuses for each corner",checked:m,onChange:()=>{const e=!m;_(e),t(e?{imgBorder:{...o,radius:"10px 10px 10px 10px"}}:{imgBorder:{...o,radius:"10px"}})}}),!m&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the border radius (${g}) for the image.`,"caledros-basic-blocks"),value:parseInt(o.radius),max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${e}${g}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${v(e,parseInt(o.radius))}${e}`}})}})]}),m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-left border radius (${g}).`,"caledros-basic-blocks"),value:r,max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${e}${g} ${d}${h} ${c}${x} ${b}${p}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${v(e,r)}${e} ${d}${h} ${c}${x} ${b}${p}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-right border radius (${h}).`,"caledros-basic-blocks"),value:d,max:"%"===h?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${e}${h} ${c}${x} ${b}${p}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:h,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${v(e,d)}${e} ${c}${x} ${b}${p}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-right border radius (${x}).`,"caledros-basic-blocks"),value:c,max:"%"===x?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${d}${h} ${e}${x} ${b}${p}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${d}${h} ${v(e,c)}${e} ${b}${p}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-left border radius (${p}).`,"caledros-basic-blocks"),value:b,max:"%"===p?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${d}${h} ${c}${x} ${e}${p}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${d}${h} ${c}${x} ${v(e,b)}${e}`}})}})]})]})]})}function B({attributes:e,setAttributes:t}){const{imgBoxShadow:o}=e,[n,r]=(0,s.useSettings)("color.palette","color.defaultPalette"),d=n.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),c=(0,C.select)("core/editor")?.getEditorSettings(),b=c?.__experimentalFeatures?.color?.palette,u=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),g=u(b,"default"),h=u(b,"theme"),x=u(b,"custom"),p=[...r?[g]:[],h,...x.colors?[x]:[]];return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Box shadow","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable box shadow","caledros-basic-blocks"),checked:o.enabled,onChange:e=>{t({imgBoxShadow:{...o,enabled:e}})}}),o.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the box shadow.","caledros-basic-blocks"),value:""===o.style?"outline":"inset",options:[{label:"Outline",value:"outline"},{label:"Inset",value:"inset"}],onChange:e=>{t({imgBoxShadow:{...o,style:`${"outline"===e?"":e}`}})}}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the horizontal offset (px).","caledros-basic-blocks"),value:parseInt(o.hOffset),max:100,min:-100,step:1,onChange:e=>t({imgBoxShadow:{...o,hOffset:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the vertical offset (px).","caledros-basic-blocks"),value:parseInt(o.vOffset),max:100,min:-100,step:1,onChange:e=>t({imgBoxShadow:{...o,vOffset:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the blur (px).","caledros-basic-blocks"),value:parseInt(o.blur),max:100,min:0,step:1,onChange:e=>t({imgBoxShadow:{...o,blur:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the spread (px).","caledros-basic-blocks"),value:parseInt(o.spread),max:100,min:-100,step:1,onChange:e=>t({imgBoxShadow:{...o,spread:`${e}px`}})}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:b?p:d,value:o.color,onChange:e=>t({imgBoxShadow:{...o,color:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]})]})}function S({attributes:e,setAttributes:t}){const{imgFilter:o}=e,n=parseInt(o.content)||0,r=e=>{switch(!0){case"blur"===e:return"px";case"hue-rotate"===e:return"deg";case["brightness","contrast","grayscale","invert","opacity","saturate","sepia"].includes(e):return"%";default:return""}},d=(e,t)=>{switch(!0){case["blur","grayscale","invert","opacity","saturate","sepia"].includes(e)&&t>100:return 100;case["brightness","contrast"].includes(e)&&t>200:return 200;default:return t}},[c,b]=(0,s.useSettings)("color.palette","color.defaultPalette"),u=c.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),g=(0,C.select)("core/editor")?.getEditorSettings(),h=g?.__experimentalFeatures?.color?.palette,x=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),p=x(h,"default"),m=x(h,"theme"),_=x(h,"custom"),v=[...b?[p]:[],m,..._.colors?[_]:[]];return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Filter","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the filter type.","caledros-basic-blocks"),value:o.type,options:[{label:"None",value:"none"},{label:"Blur",value:"blur"},{label:"Brightness",value:"brightness"},{label:"Contrast",value:"contrast"},{label:"Drop shadow",value:"drop-shadow"},{label:"Grayscale",value:"grayscale"},{label:"Hue rotate",value:"hue-rotate"},{label:"Invert",value:"invert"},{label:"Opacity",value:"opacity"},{label:"Saturate",value:"saturate"},{label:"Sepia",value:"sepia"}],onChange:e=>{t({imgFilter:{...o,type:e,content:`${d(e,n)}${r(e)}`}})}}),"blur"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the blur value (px).","caledros-basic-blocks"),value:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}px`}})}),"brightness"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the brightness value (%).","caledros-basic-blocks"),value:n,max:200,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e}%`}})}),"contrast"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the contrast value (%).","caledros-basic-blocks"),value:n,max:200,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e}%`}})}),"drop-shadow"===o.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the horizontal offset (px).","caledros-basic-blocks"),value:parseInt(o.hOffset),max:100,min:-100,step:1,onChange:e=>t({imgFilter:{...o,hOffset:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the vertical offset (px).","caledros-basic-blocks"),value:parseInt(o.vOffset),max:100,min:-100,step:1,onChange:e=>t({imgFilter:{...o,vOffset:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the blur (px).","caledros-basic-blocks"),value:parseInt(o.blur),max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,blur:`${e}px`}})}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the drop shadow","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:h?v:u,value:o.color,onChange:e=>t({imgFilter:{...o,color:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),"grayscale"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the grayscale value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})}),"hue-rotate"===o.type&&(0,l.jsx)(i.AnglePickerControl,{onChange:e=>t({imgFilter:{...o,content:`${e}deg`}}),value:n,label:(0,a.__)("Hue-rotate value (deg)","caledros-basic-blocks")}),"invert"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the invert value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})}),"opacity"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the opacity value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})}),"saturate"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the saturation value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})}),"sepia"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the sepia filter value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})})]})}function y({attributes:e,setAttributes:t}){const{imgLink:o}=e;return(0,l.jsx)(i.PanelBody,{title:(0,a.__)("Image link","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(i.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{t({imgLink:e})},value:o,help:(0,a.__)("Paste the link for the image","caledros-basic-blocks")})})}(0,e.registerBlockType)(t.UU,{icon:o.icon,edit:function({attributes:e,setAttributes:t}){const{sourceImage:a,imgWidth:o,imgHeight:h,imgObjectFit:C,imgMargin:k,imgPadding:N,imgLazyLoad:M,imgCaption:z,imgBorder:H,imgBoxShadow:D,imgFilter:P}=e,[O,R]=(0,n.useState)(!1),I=(0,s.useBlockProps)({className:"cbb-resp-img"+("inset"===(D.enabled&&D.style)?" inset-shadow":""),style:{margin:k.differentMarginsEnabled?`${k.top} ${k.right} ${k.bottom} ${k.left}`:`${k.top}`,padding:N.differentPaddingsEnabled?`${N.top} ${N.right} ${N.bottom} ${N.left}`:`${N.top}`,maxWidth:o.defaultWidthEnabled?`${a.width}px`:o.content,height:h.defaultHeightEnabled?`${a.height}px`:h.content,...D.enabled&&"inset"===D.style&&{"--inset-box-shadow":`${D.style} ${D.hOffset} ${D.vOffset} ${D.blur} ${D.spread} ${D.color}`},...D.enabled&&"inset"===D.style&&"0px"!==H.radius&&"0%"!==H.radius&&{"--inset-border-radius":H.radius}}});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.InspectorControls,{children:(0,l.jsx)(i.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"layout",title:"Layout"},{name:"style",title:"Style"},{name:"additional",title:"Additional"}],children:a=>"layout"===a.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d,{attributes:e,setAttributes:t}),(0,l.jsx)(c,{attributes:e,setAttributes:t}),(0,l.jsx)(u,{attributes:e,setAttributes:t}),(0,l.jsx)(g,{attributes:e,setAttributes:t})]}):"style"===a.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)($,{attributes:e,setAttributes:t}),(0,l.jsx)(f,{attributes:e,setAttributes:t}),(0,l.jsx)(w,{attributes:e,setAttributes:t}),(0,l.jsx)(j,{attributes:e,setAttributes:t}),(0,l.jsx)(B,{attributes:e,setAttributes:t}),(0,l.jsx)(S,{attributes:e,setAttributes:t})]}):"additional"===a.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_,{attributes:e,setAttributes:t}),(0,l.jsx)(v,{attributes:e,setAttributes:t}),(0,l.jsx)(y,{attributes:e,setAttributes:t}),(0,l.jsx)(b,{attributes:e,setAttributes:t}),(0,l.jsx)(m,{attributes:e,setAttributes:t})]}):null})}),a.url&&(0,l.jsx)(s.BlockControls,{children:(0,l.jsx)(x,{attributes:e,setAttributes:t,setShowSpinner:R})}),(0,l.jsxs)("figure",{...I,children:[(0,l.jsx)(p,{attributes:e,setAttributes:t,showSpinner:O,setShowSpinner:R}),O&&(0,l.jsx)(i.Spinner,{style:{height:"60px",width:"60px",position:"absolute",right:"50%",transform:"translateX(50%)",top:"50px",zIndex:"99"}}),a.url&&(0,l.jsx)("img",{src:a.url,alt:(0,r.escapeHTML)(a.alt),width:a.width,height:a.height,...M&&{loading:"lazy"},...M&&{className:"lazy-image"},style:{objectFit:`${C}`,width:"100%",height:"100%",aspectRatio:`${a.width}/${a.height}`,..."0px"!==H.width&&"none"!==H.style&&"#00000000"!==H.color&&{borderStyle:H.style},..."0px"!==H.width&&"none"!==H.style&&"#00000000"!==H.color&&{borderWidth:H.width},..."0px"!==H.width&&"none"!==H.style&&"#00000000"!==H.color&&{borderColor:H.color},..."0px"!==H.radius&&"0%"!==H.radius&&{borderRadius:H.radius},...D.enabled&&"inset"!==D.style&&{boxShadow:`${D.style} ${D.hOffset} ${D.vOffset} ${D.blur} ${D.spread} ${D.color}`},...!["none","drop-shadow"].includes(P.type)&&{filter:`${P.type}(${P.content})`},..."drop-shadow"===P.type&&{filter:`${P.type}(${P.hOffset} ${P.vOffset} ${P.blur} ${P.color})`}},srcSet:a.srcSet,sizes:a.sizes}),z.enabled&&(0,l.jsx)("figcaption",{children:z.content})]})]})},save:function({attributes:e}){const{sourceImage:t,imgWidth:a,imgHeight:o,imgObjectFit:i,imgMargin:n,imgPadding:d,imgLazyLoad:c,imgCaption:b,imgBorder:u,imgBoxShadow:g,imgFilter:h,imgLink:x}=e,p=(e,t,a)=>{const{top:l,right:o,bottom:s,left:i}=t;return a||0!==parseInt(l)?a?{[e]:`${l} ${o} ${s} ${i}`}:{[e]:`${l}`}:{}},m=s.useBlockProps.save({className:"cbb-resp-img"+("inset"===(g.enabled&&g.style)?" inset-shadow":""),style:{...p("margin",n,n.differentMarginsEnabled),...p("padding",d,d.differentPaddingsEnabled),maxWidth:a.defaultWidthEnabled?`${t.width}px`:a.content,height:o.defaultHeightEnabled?`${t.height}px`:o.content,...g.enabled&&"inset"===g.style&&{"--inset-box-shadow":`${g.style} ${g.hOffset} ${g.vOffset} ${g.blur} ${g.spread} ${g.color}`},...g.enabled&&"inset"===g.style&&"0px"!==u.radius&&"0%"!==u.radius&&{"--inset-border-radius":u.radius}}});return(0,l.jsxs)(l.Fragment,{children:[x&&(0,l.jsxs)("figure",{...m,children:[(0,l.jsx)("a",{className:"cbb-resp-img__link",href:x,children:(0,l.jsx)("img",{src:t.url,alt:(0,r.escapeHTML)(t.alt),width:t.width,height:t.height,...c&&{loading:"lazy"},...c&&{className:"lazy-image"},style:{objectFit:`${i}`,width:"100%",height:"100%",aspectRatio:`${t.width}/${t.height}`,..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderStyle:u.style},..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderWidth:u.width},..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderColor:u.color},..."0px"!==u.radius&&"0%"!==u.radius&&{borderRadius:u.radius},...g.enabled&&"inset"!==g.style&&{boxShadow:`${g.style} ${g.hOffset} ${g.vOffset} ${g.blur} ${g.spread} ${g.color}`},...!["none","drop-shadow"].includes(h.type)&&{filter:`${h.type}(${h.content})`},..."drop-shadow"===h.type&&{filter:`${h.type}(${h.hOffset} ${h.vOffset} ${h.blur} ${h.color})`}},srcSet:t.srcSet,sizes:t.sizes})}),b.enabled&&(0,l.jsx)("figcaption",{children:b.content})]}),!x&&(0,l.jsxs)("figure",{...m,children:[(0,l.jsx)("img",{src:t.url,alt:(0,r.escapeHTML)(t.alt),width:t.width,height:t.height,...c&&{loading:"lazy"},...c&&{className:"lazy-image"},style:{objectFit:`${i}`,width:"100%",height:"100%",aspectRatio:`${t.width}/${t.height}`,..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderStyle:u.style},..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderWidth:u.width},..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderColor:u.color},..."0px"!==u.radius&&"0%"!==u.radius&&{borderRadius:u.radius},...g.enabled&&"inset"!==g.style&&{boxShadow:`${g.style} ${g.hOffset} ${g.vOffset} ${g.blur} ${g.spread} ${g.color}`},...!["none","drop-shadow"].includes(h.type)&&{filter:`${h.type}(${h.content})`},..."drop-shadow"===h.type&&{filter:`${h.type}(${h.hOffset} ${h.vOffset} ${h.blur} ${h.color})`}},srcSet:t.srcSet,sizes:t.sizes}),b.enabled&&(0,l.jsx)("figcaption",{children:b.content})]})]})}})}},a={};function l(e){var o=a[e];if(void 0!==o)return o.exports;var s=a[e]={exports:{}};return t[e](s,s.exports,l),s.exports}l.m=t,e=[],l.O=(t,a,o,s)=>{if(!a){var i=1/0;for(c=0;c<e.length;c++){for(var[a,o,s]=e[c],n=!0,r=0;r<a.length;r++)(!1&s||i>=s)&&Object.keys(l.O).every((e=>l.O[e](a[r])))?a.splice(r--,1):(n=!1,s<i&&(i=s));if(n){e.splice(c--,1);var d=o();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]=[a,o,s]},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={447:0,879:0};l.O.j=t=>0===e[t];var t=(t,a)=>{var o,s,[i,n,r]=a,d=0;if(i.some((t=>0!==e[t]))){for(o in n)l.o(n,o)&&(l.m[o]=n[o]);if(r)var c=r(l)}for(t&&t(a);d<i.length;d++)s=i[d],l.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return l.O(c)},a=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var o=l.O(void 0,[879],(()=>l(228)));o=l.O(o)})();
     1(()=>{"use strict";var e,t={228:()=>{const e=window.wp.blocks,t=JSON.parse('{"UU":"caledros-basic-blocks/responsive-image"}'),a=window.wp.i18n,l=window.ReactJSXRuntime,o={icon:(0,l.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,l.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,l.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,l.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,l.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,l.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,l.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,l.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,l.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,l.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,l.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,l.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},s=window.wp.blockEditor,i=window.wp.components,n=window.wp.element,r=window.wp.escapeHtml;function d({attributes:e,setAttributes:t}){const{imgWidth:o,sourceImage:s}=e,n=o.content.replace(/\d+/g,"")||"px",r=["px","%","em","rem","vw"].includes(n)?n:"px",d=parseInt(o.content)||0,c=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Max width","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)(`Use actual width (${s.width}px)`,"caledros-basic-blocks"),checked:o.defaultWidthEnabled,onChange:e=>{t({imgWidth:{content:`${s.width}px`,defaultWidthEnabled:e}})}}),!o.defaultWidthEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Choose the width (${r}) for the image.`,"caledros-basic-blocks"),value:parseInt(o.content),max:"%"===r||"vw"===r?100:2e3,min:0,step:1,onChange:e=>t({imgWidth:{...o,content:`${e}${r}`}})}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:r,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgWidth:{...o,content:`${c(e,d)}${e}`}})}})]})]})}function c({attributes:e,setAttributes:t}){const{imgHeight:o,sourceImage:s}=e,n=o.content.replace(/\d+/g,"")||"px",r=["px","%","em","rem","vw","auto"].includes(n)?n:"px",d=parseInt(o.content)||0,c=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Height","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)(`Use actual height (${s.height}px)`,"caledros-basic-blocks"),checked:o.defaultHeightEnabled,onChange:e=>{t({imgHeight:{content:`${s.height}px`,defaultHeightEnabled:e}})}}),!o.defaultHeightEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Choose the height (${r}) for the image.`,"caledros-basic-blocks"),value:parseInt(o.content),max:"%"===r||"vw"===r?100:2e3,min:0,step:1,onChange:e=>t({imgHeight:{...o,content:`${e}${r}`}}),disabled:"auto"===o.content}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:r,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>t({imgHeight:{...o,content:`${c(e,d)}${e}`}})})]})]})}function b({attributes:e,setAttributes:t}){const{imgObjectFit:o}=e;return(0,l.jsx)(i.PanelBody,{title:(0,a.__)("Object fit","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the object fit property for the image.","caledros-basic-blocks"),value:o,options:[{label:"Contain",value:"contain"},{label:"Cover",value:"cover"}],onChange:e=>t({imgObjectFit:e})})})}function u({attributes:e,setAttributes:t}){const{imgMargin:o}=e,s=parseInt(o.top)||0,n=parseInt(o.left)||0,r=parseInt(o.bottom)||0,d=parseInt(o.right)||0,c=o.top.replace(/\d+/g,""),b=o.left.replace(/\d+/g,""),u=o.bottom.replace(/\d+/g,""),g=o.right.replace(/\d+/g,""),h=(e,t)=>"auto"===e?"":["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different margins","caledros-basic-blocks"),checked:o.differentMarginsEnabled,onChange:e=>{t({imgMargin:{...o,differentMarginsEnabled:e}})}}),!o.differentMarginsEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the margin (${c}) for the image.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,top:`${"auto"===c?"":e}${c}`}})},disabled:"auto"===c}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,top:`${h(e,s)}${e}`}})}})]}),o.differentMarginsEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top margin (${c}) for the image.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,top:`${"auto"===c?"":e}${c}`}})},disabled:"auto"===c}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,top:`${h(e,s)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right margin (${g}) for the image.`,"caledros-basic-blocks"),value:d,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,right:`${"auto"===g?"":e}${g}`}})},disabled:"auto"===g}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,right:`${h(e,d)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom margin (${u}) for the image.`,"caledros-basic-blocks"),value:r,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,bottom:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,bottom:`${h(e,r)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left margin (${b}) for the image.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({imgMargin:{...o,left:`${"auto"===b?"":e}${b}`}})},disabled:"auto"===b}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{t({imgMargin:{...o,left:`${h(e,n)}${e}`}})}})]})]})]})}function g({attributes:e,setAttributes:t}){const{imgPadding:o}=e,s=parseInt(o.top)||0,n=parseInt(o.left)||0,r=parseInt(o.bottom)||0,d=parseInt(o.right)||0,c=o.top.replace(/\d+/g,""),b=o.left.replace(/\d+/g,""),u=o.bottom.replace(/\d+/g,""),g=o.right.replace(/\d+/g,""),h=(e,t)=>["%","vw"].includes(e)&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Padding","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different paddings","caledros-basic-blocks"),checked:o.differentPaddingsEnabled,onChange:e=>{t({imgPadding:{...o,differentPaddingsEnabled:e}})}}),!o.differentPaddingsEnabled&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the padding (${c}).`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,top:`${e}${c}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,top:`${h(e,s)}${e}`}})}})]}),o.differentPaddingsEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top padding (${c}).`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(c)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,top:`${e}${c}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:c,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,top:`${h(e,s)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right padding (${g}).`,"caledros-basic-blocks"),value:d,max:["%","vw"].includes(g)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,right:`${e}${g}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,right:`${h(e,d)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom padding (${u}).`,"caledros-basic-blocks"),value:r,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,bottom:`${e}${u}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,bottom:`${h(e,r)}${e}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left padding (${b}).`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{t({imgPadding:{...o,left:`${e}${b}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"}],onChange:e=>{t({imgPadding:{...o,left:`${h(e,n)}${e}`}})}})]})]})]})}const h=window.wp.blob;function x({attributes:e,setAttributes:t,setShowSpinner:o}){const{sourceImage:n}=e;return(0,l.jsx)(i.ToolbarGroup,{children:(0,l.jsx)(s.MediaReplaceFlow,{name:(0,a.__)("Replace image","caledros-basic-blocks"),mediaId:n.id,mediaURL:n.url,allowedTypes:["image"],accept:"image/*",onError:e=>console.error(e),onSelect:e=>{return a=e,void((0,h.isBlobURL)(a.url)?o(!0):(o(!1),t({sourceImage:{id:a.id,alt:a.alt,url:a.url,height:a.media_details?.height||a.height,width:a.media_details?.width||a.width,srcSet:`${l=a.media_details?.sizes||a.sizes,Object.keys(l).filter((e=>"thumbnail"!==e)).map((e=>{const{url:t,width:a,source_url:o}=l[e];return`${t||o} ${a}w`})).join(", ")}`,sizes:`(max-width:${a.media_details?.width||a.width}px) 100vw, ${a.media_details?.width||a.width}px`}}),(0,h.revokeBlobURL)(a.url)));var a,l}})})}function p({attributes:e,setAttributes:t,showSpinner:a,setShowSpinner:o}){const{sourceImage:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(s.MediaPlaceholder,{allowedTypes:["image"],accept:"image/*",icon:"camera",onSelect:e=>{var a;(0,h.isBlobURL)(e.url)?o(!0):(o(!1),t({sourceImage:{id:e.id,alt:e.alt,url:e.url,height:e.media_details?.height||e.height,width:e.media_details?.width||e.width,srcSet:`${a=e.media_details?.sizes||e.sizes,Object.keys(a).filter((e=>"thumbnail"!==e)).map((e=>{const{url:t,width:l,source_url:o}=a[e];return`${t||o} ${l}w`})).join(", ")}`,sizes:`(max-width:${e.media_details?.width||e.width}px) 100vw, ${e.media_details?.width||e.width}px`}}),(0,h.revokeBlobURL)(e.url))},onError:e=>console.error(e),disableMediaButtons:i.url||a})})}function m({attributes:e,setAttributes:t}){const{imgLazyLoad:o}=e;return(0,l.jsx)(i.PanelBody,{title:(0,a.__)("Lazy loading","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable lazy loading","caledros-basic-blocks"),checked:o,onChange:e=>{t({imgLazyLoad:e})}})})}function _({attributes:e,setAttributes:t}){const{imgCaption:o}=e;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Caption","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,checked:o.enabled,label:(0,a.__)("Enable image caption","caledros-basic-blocks"),onChange:e=>{t({imgCaption:{...o,enabled:e}})}}),o.enabled&&(0,l.jsx)(i.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{t({imgCaption:{...o,content:e}})},value:o.content,help:(0,a.__)("Write the image caption.","caledros-basic-blocks")})]})}function v({attributes:e,setAttributes:t}){const{sourceImage:o}=e;return(0,l.jsx)(i.PanelBody,{title:(0,a.__)("Alt text","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(i.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{t({sourceImage:{...o,alt:e}})},value:o.alt,help:(0,a.__)("Write the alt text for the image.","caledros-basic-blocks")})})}function $({attributes:e,setAttributes:t}){const{imgBorder:o}=e,s=o.style.split(" "),r=s[0]||"solid",d=s[1]||"none",c=s[2]||"none",b=s[3]||"none",[u,g]=(0,n.useState)(!!o.style.includes(" "));return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Border style","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border styles for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{imgBorder:{...o,style:"solid none none none"}}:{imgBorder:{...o,style:"solid"}})}}),!u&&(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the border style.","caledros-basic-blocks"),value:o.style,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:e}})}}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the top border.","caledros-basic-blocks"),value:r,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:`${e} ${d} ${c} ${b}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the right border.","caledros-basic-blocks"),value:d,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:`${r} ${e} ${c} ${b}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the bottom border.","caledros-basic-blocks"),value:c,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:`${r} ${d} ${e} ${b}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the left border.","caledros-basic-blocks"),value:b,options:[{disabled:!0,label:"Select an option",value:""},{label:"None",value:"none"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"}],onChange:e=>{t({imgBorder:{...o,style:`${r} ${d} ${c} ${e}`}})}})]})]})}function f({attributes:e,setAttributes:t}){const{imgBorder:o}=e,s=o.width.split(" "),r=parseInt(s[0])||0,d=parseInt(s[1])||0,c=parseInt(s[2])||0,b=parseInt(s[3])||0,[u,g]=(0,n.useState)(!!o.width.includes(" "));return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Border width","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border widths for each side",checked:u,onChange:()=>{const e=!u;g(e),t(e?{imgBorder:{...o,width:"1px 1px 1px 1px"}}:{imgBorder:{...o,width:"1px"}})}}),!u&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the border width (px) for the image.","caledros-basic-blocks"),value:parseInt(o.width),max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${e}px`}})}}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the top border width (px) for the image.","caledros-basic-blocks"),value:r,max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${e}px ${d}px ${c}px ${b}px`}})}}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the right border width (px) for the image.","caledros-basic-blocks"),value:d,max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${r}px ${e}px ${c}px ${b}px`}})}}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the bottom border width (px) for the image.","caledros-basic-blocks"),value:c,max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${r}px ${d}px ${e}px ${b}px`}})}}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the left border width (px) for the image.","caledros-basic-blocks"),value:b,max:50,min:0,step:1,onChange:e=>{t({imgBorder:{...o,width:`${r}px ${d}px ${c}px ${e}px`}})}})]})]})}const C=window.wp.data;function w({attributes:e,setAttributes:t}){const{imgBorder:o}=e,r=o.color.split(" "),d=r[0]||"#000",c=r[1]||"#000",b=r[2]||"#000",u=r[3]||"#000",[g,h]=(0,n.useState)(!!o.color.includes(" ")),[x,p]=(0,s.useSettings)("color.palette","color.defaultPalette"),m=x.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),_=(0,C.select)("core/editor")?.getEditorSettings(),v=_?.__experimentalFeatures?.color?.palette,$=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),f=$(v,"default"),w=$(v,"theme"),j=$(v,"custom"),B=[...p?[f]:[],w,...j.colors?[j]:[]];return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Border color","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border colors for each side",checked:g,onChange:()=>{const e=!g;h(e),t(e?{imgBorder:{...o,color:"#000 #000 #000 #000"}}:{imgBorder:{...o,color:"#000"}})}}),!g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose the border color","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:o.color,onChange:e=>t({imgBorder:{...o,color:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the top border","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:d,onChange:e=>{t({imgBorder:{...o,color:`${e||"#00000000"} ${c} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the right border","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:c,onChange:e=>{t({imgBorder:{...o,color:`${d} ${e||"#00000000"} ${b} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the bottom border","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:b,onChange:e=>{t({imgBorder:{...o,color:`${d} ${c} ${e||"#00000000"} ${u}`}})},enableAlpha:!0,clearable:!0}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the left border","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:v?B:m,value:u,onChange:e=>{t({imgBorder:{...o,color:`${d} ${c} ${b} ${e||"#00000000"}`}})},enableAlpha:!0,clearable:!0})]})]})}function j({attributes:e,setAttributes:t}){const{imgBorder:o}=e,s=o.radius.split(" "),r=parseInt(s[0])||0,d=parseInt(s[1])||0,c=parseInt(s[2])||0,b=parseInt(s[3])||0,u=o.radius.split(" "),g=u[0]?u[0].replace(/\d+/g,""):"px",h=u[1]?u[1].replace(/\d+/g,""):"px",x=u[2]?u[2].replace(/\d+/g,""):"px",p=u[3]?u[3].replace(/\d+/g,""):"px",[m,_]=(0,n.useState)(!!o.radius.includes(" ")),v=(e,t)=>"%"===e&&t>100?100:t;return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Border radius","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:"Use different border radiuses for each corner",checked:m,onChange:()=>{const e=!m;_(e),t(e?{imgBorder:{...o,radius:"10px 10px 10px 10px"}}:{imgBorder:{...o,radius:"10px"}})}}),!m&&(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the border radius (${g}) for the image.`,"caledros-basic-blocks"),value:parseInt(o.radius),max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${e}${g}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${v(e,parseInt(o.radius))}${e}`}})}})]}),m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-left border radius (${g}).`,"caledros-basic-blocks"),value:r,max:"%"===g?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${e}${g} ${d}${h} ${c}${x} ${b}${p}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:g,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${v(e,r)}${e} ${d}${h} ${c}${x} ${b}${p}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top-right border radius (${h}).`,"caledros-basic-blocks"),value:d,max:"%"===h?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${e}${h} ${c}${x} ${b}${p}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:h,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${v(e,d)}${e} ${c}${x} ${b}${p}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-right border radius (${x}).`,"caledros-basic-blocks"),value:c,max:"%"===x?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${d}${h} ${e}${x} ${b}${p}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:x,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${d}${h} ${v(e,c)}${e} ${b}${p}`}})}})]}),(0,l.jsxs)("div",{className:"cbb-editor__grid",children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom-left border radius (${p}).`,"caledros-basic-blocks"),value:b,max:"%"===p?100:150,min:0,step:1,onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${d}${h} ${c}${x} ${e}${p}`}})}}),(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"}],onChange:e=>{t({imgBorder:{...o,radius:`${r}${g} ${d}${h} ${c}${x} ${v(e,b)}${e}`}})}})]})]})]})}function B({attributes:e,setAttributes:t}){const{imgBoxShadow:o}=e,[n,r]=(0,s.useSettings)("color.palette","color.defaultPalette"),d=n.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),c=(0,C.select)("core/editor")?.getEditorSettings(),b=c?.__experimentalFeatures?.color?.palette,u=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),g=u(b,"default"),h=u(b,"theme"),x=u(b,"custom"),p=[...r?[g]:[],h,...x.colors?[x]:[]];return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Box shadow","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable box shadow","caledros-basic-blocks"),checked:o.enabled,onChange:e=>{t({imgBoxShadow:{...o,enabled:e}})}}),o.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the style for the box shadow.","caledros-basic-blocks"),value:""===o.style?"outline":"inset",options:[{label:"Outline",value:"outline"},{label:"Inset",value:"inset"}],onChange:e=>{t({imgBoxShadow:{...o,style:`${"outline"===e?"":e}`}})}}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the horizontal offset (px).","caledros-basic-blocks"),value:parseInt(o.hOffset),max:100,min:-100,step:1,onChange:e=>t({imgBoxShadow:{...o,hOffset:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the vertical offset (px).","caledros-basic-blocks"),value:parseInt(o.vOffset),max:100,min:-100,step:1,onChange:e=>t({imgBoxShadow:{...o,vOffset:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the blur (px).","caledros-basic-blocks"),value:parseInt(o.blur),max:100,min:0,step:1,onChange:e=>t({imgBoxShadow:{...o,blur:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the spread (px).","caledros-basic-blocks"),value:parseInt(o.spread),max:100,min:-100,step:1,onChange:e=>t({imgBoxShadow:{...o,spread:`${e}px`}})}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the box shadow","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:b?p:d,value:o.color,onChange:e=>t({imgBoxShadow:{...o,color:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]})]})}function S({attributes:e,setAttributes:t}){const{imgFilter:o}=e,n=parseInt(o.content)||0,r=e=>{switch(!0){case"blur"===e:return"px";case"hue-rotate"===e:return"deg";case["brightness","contrast","grayscale","invert","opacity","saturate","sepia"].includes(e):return"%";default:return""}},d=(e,t)=>{switch(!0){case["blur","grayscale","invert","opacity","saturate","sepia"].includes(e)&&t>100:return 100;case["brightness","contrast"].includes(e)&&t>200:return 200;default:return t}},[c,b]=(0,s.useSettings)("color.palette","color.defaultPalette"),u=c.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),g=(0,C.select)("core/editor")?.getEditorSettings(),h=g?.__experimentalFeatures?.color?.palette,x=(e,t)=>({colors:e?.[t]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${t}`}),p=x(h,"default"),m=x(h,"theme"),_=x(h,"custom"),v=[...b?[p]:[],m,..._.colors?[_]:[]];return(0,l.jsxs)(i.PanelBody,{title:(0,a.__)("Filter","caledros-basic-blocks"),initialOpen:!1,children:[(0,l.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the filter type.","caledros-basic-blocks"),value:o.type,options:[{label:"None",value:"none"},{label:"Blur",value:"blur"},{label:"Brightness",value:"brightness"},{label:"Contrast",value:"contrast"},{label:"Drop shadow",value:"drop-shadow"},{label:"Grayscale",value:"grayscale"},{label:"Hue rotate",value:"hue-rotate"},{label:"Invert",value:"invert"},{label:"Opacity",value:"opacity"},{label:"Saturate",value:"saturate"},{label:"Sepia",value:"sepia"}],onChange:e=>{t({imgFilter:{...o,type:e,content:`${d(e,n)}${r(e)}`}})}}),"blur"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the blur value (px).","caledros-basic-blocks"),value:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}px`}})}),"brightness"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the brightness value (%).","caledros-basic-blocks"),value:n,max:200,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e}%`}})}),"contrast"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the contrast value (%).","caledros-basic-blocks"),value:n,max:200,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e}%`}})}),"drop-shadow"===o.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the horizontal offset (px).","caledros-basic-blocks"),value:parseInt(o.hOffset),max:100,min:-100,step:1,onChange:e=>t({imgFilter:{...o,hOffset:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the vertical offset (px).","caledros-basic-blocks"),value:parseInt(o.vOffset),max:100,min:-100,step:1,onChange:e=>t({imgFilter:{...o,vOffset:`${e}px`}})}),(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Please select the blur (px).","caledros-basic-blocks"),value:parseInt(o.blur),max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,blur:`${e}px`}})}),(0,l.jsx)("label",{className:"cbb-editor-label",children:(0,a.__)("Choose a color for the drop shadow","caledros-basic-blocks")}),(0,l.jsx)(i.ColorPalette,{colors:h?v:u,value:o.color,onChange:e=>t({imgFilter:{...o,color:e||"#00000000"}}),enableAlpha:!0,clearable:!0})]}),"grayscale"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the grayscale value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})}),"hue-rotate"===o.type&&(0,l.jsx)(i.AnglePickerControl,{onChange:e=>t({imgFilter:{...o,content:`${e}deg`}}),value:n,label:(0,a.__)("Hue-rotate value (deg)","caledros-basic-blocks")}),"invert"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the invert value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})}),"opacity"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the opacity value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})}),"saturate"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the saturation value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})}),"sepia"===o.type&&(0,l.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Choose the sepia filter value (%).","caledros-basic-blocks"),value:n>100?100:n,max:100,min:0,step:1,onChange:e=>t({imgFilter:{...o,content:`${e>100?100:e}%`}})})]})}function y({attributes:e,setAttributes:t}){const{imgLink:o}=e;return(0,l.jsx)(i.PanelBody,{title:(0,a.__)("Image link","caledros-basic-blocks"),initialOpen:!1,children:(0,l.jsx)(i.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>{t({imgLink:e})},value:o,help:(0,a.__)("Paste the link for the image","caledros-basic-blocks")})})}(0,e.registerBlockType)(t.UU,{icon:o.icon,edit:function({attributes:e,setAttributes:t}){const{sourceImage:a,imgWidth:o,imgHeight:h,imgObjectFit:C,imgMargin:k,imgPadding:N,imgLazyLoad:M,imgCaption:z,imgBorder:H,imgBoxShadow:D,imgFilter:P}=e,[O,R]=(0,n.useState)(!1),I=(0,s.useBlockProps)({className:"cbb-resp-img"+("inset"===(D.enabled&&D.style)?" inset-shadow":""),style:{margin:k.differentMarginsEnabled?`${k.top} ${k.right} ${k.bottom} ${k.left}`:`${k.top}`,padding:N.differentPaddingsEnabled?`${N.top} ${N.right} ${N.bottom} ${N.left}`:`${N.top}`,maxWidth:o.defaultWidthEnabled?`${a.width}px`:o.content,height:h.defaultHeightEnabled?`${a.height}px`:h.content,...D.enabled&&"inset"===D.style&&{"--inset-box-shadow":`${D.style} ${D.hOffset} ${D.vOffset} ${D.blur} ${D.spread} ${D.color}`},...D.enabled&&"inset"===D.style&&"0px"!==H.radius&&"0%"!==H.radius&&{"--inset-border-radius":H.radius}}});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.InspectorControls,{children:(0,l.jsx)(i.TabPanel,{activeClass:"cbb-active-tab",tabs:[{name:"layout",title:"Layout"},{name:"style",title:"Style"},{name:"additional",title:"Additional"}],children:a=>"layout"===a.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d,{attributes:e,setAttributes:t}),(0,l.jsx)(c,{attributes:e,setAttributes:t}),(0,l.jsx)(u,{attributes:e,setAttributes:t}),(0,l.jsx)(g,{attributes:e,setAttributes:t})]}):"style"===a.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)($,{attributes:e,setAttributes:t}),(0,l.jsx)(f,{attributes:e,setAttributes:t}),(0,l.jsx)(w,{attributes:e,setAttributes:t}),(0,l.jsx)(j,{attributes:e,setAttributes:t}),(0,l.jsx)(B,{attributes:e,setAttributes:t}),(0,l.jsx)(S,{attributes:e,setAttributes:t})]}):"additional"===a.name?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_,{attributes:e,setAttributes:t}),(0,l.jsx)(v,{attributes:e,setAttributes:t}),(0,l.jsx)(y,{attributes:e,setAttributes:t}),(0,l.jsx)(b,{attributes:e,setAttributes:t}),(0,l.jsx)(m,{attributes:e,setAttributes:t})]}):null})}),a.url&&(0,l.jsx)(s.BlockControls,{children:(0,l.jsx)(x,{attributes:e,setAttributes:t,setShowSpinner:R})}),(0,l.jsxs)("figure",{...I,children:[(0,l.jsx)(p,{attributes:e,setAttributes:t,showSpinner:O,setShowSpinner:R}),O&&(0,l.jsx)(i.Spinner,{style:{height:"60px",width:"60px",position:"absolute",right:"50%",transform:"translateX(50%)",top:"50px",zIndex:"99"}}),a.url&&(0,l.jsx)("img",{src:a.url,alt:(0,r.escapeHTML)(a.alt),width:a.width,height:a.height,...M&&{loading:"lazy"},...M&&{className:"lazy-image"},style:{objectFit:`${C}`,width:"100%",height:"100%",aspectRatio:`${a.width}/${a.height}`,..."0px"!==H.width&&"none"!==H.style&&"#00000000"!==H.color&&{borderStyle:H.style},..."0px"!==H.width&&"none"!==H.style&&"#00000000"!==H.color&&{borderWidth:H.width},..."0px"!==H.width&&"none"!==H.style&&"#00000000"!==H.color&&{borderColor:H.color},..."0px"!==H.radius&&"0%"!==H.radius&&{borderRadius:H.radius},...D.enabled&&"inset"!==D.style&&{boxShadow:`${D.style} ${D.hOffset} ${D.vOffset} ${D.blur} ${D.spread} ${D.color}`},...!["none","drop-shadow"].includes(P.type)&&{filter:`${P.type}(${P.content})`},..."drop-shadow"===P.type&&{filter:`${P.type}(${P.hOffset} ${P.vOffset} ${P.blur} ${P.color})`}},srcSet:a.srcSet,sizes:a.sizes}),z.enabled&&(0,l.jsx)("figcaption",{children:z.content})]})]})},save:function({attributes:e}){const{sourceImage:t,imgWidth:a,imgHeight:o,imgObjectFit:i,imgMargin:n,imgPadding:d,imgLazyLoad:c,imgCaption:b,imgBorder:u,imgBoxShadow:g,imgFilter:h,imgLink:x}=e,p=(e,t,a)=>{const{top:l,right:o,bottom:s,left:i}=t;return a||0!==parseInt(l)?a?{[e]:`${l} ${o} ${s} ${i}`}:{[e]:`${l}`}:{}},m=s.useBlockProps.save({className:"cbb-resp-img"+("inset"===(g.enabled&&g.style)?" inset-shadow":""),style:{...p("margin",n,n.differentMarginsEnabled),...p("padding",d,d.differentPaddingsEnabled),maxWidth:a.defaultWidthEnabled?`${t.width}px`:a.content,height:o.defaultHeightEnabled?`${t.height}px`:o.content,...g.enabled&&"inset"===g.style&&{"--inset-box-shadow":`${g.style} ${g.hOffset} ${g.vOffset} ${g.blur} ${g.spread} ${g.color}`},...g.enabled&&"inset"===g.style&&"0px"!==u.radius&&"0%"!==u.radius&&{"--inset-border-radius":u.radius}}});return(0,l.jsxs)(l.Fragment,{children:[x&&(0,l.jsxs)("figure",{...m,children:[(0,l.jsx)("a",{className:"cbb-resp-img__link",href:x,children:(0,l.jsx)("img",{src:t.url,alt:(0,r.escapeHTML)(t.alt),width:t.width,height:t.height,...c&&{loading:"lazy"},...c&&{className:"lazy-image"},style:{objectFit:`${i}`,width:"100%",height:"100%",aspectRatio:`${t.width}/${t.height}`,..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderStyle:u.style},..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderWidth:u.width},..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderColor:u.color},..."0px"!==u.radius&&"0%"!==u.radius&&{borderRadius:u.radius},...g.enabled&&"inset"!==g.style&&{boxShadow:`${g.style} ${g.hOffset} ${g.vOffset} ${g.blur} ${g.spread} ${g.color}`},...!["none","drop-shadow"].includes(h.type)&&{filter:`${h.type}(${h.content})`},..."drop-shadow"===h.type&&{filter:`${h.type}(${h.hOffset} ${h.vOffset} ${h.blur} ${h.color})`}},srcSet:t.srcSet,sizes:t.sizes})}),b.enabled&&(0,l.jsx)("figcaption",{children:b.content})]}),!x&&(0,l.jsxs)("figure",{...m,children:[(0,l.jsx)("img",{src:t.url,alt:(0,r.escapeHTML)(t.alt),width:t.width,height:t.height,...c&&{loading:"lazy"},...c&&{className:"lazy-image"},style:{objectFit:`${i}`,width:"100%",height:"100%",aspectRatio:`${t.width}/${t.height}`,..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderStyle:u.style},..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderWidth:u.width},..."0px"!==u.width&&"none"!==u.style&&"#00000000"!==u.color&&{borderColor:u.color},..."0px"!==u.radius&&"0%"!==u.radius&&{borderRadius:u.radius},...g.enabled&&"inset"!==g.style&&{boxShadow:`${g.style} ${g.hOffset} ${g.vOffset} ${g.blur} ${g.spread} ${g.color}`},...!["none","drop-shadow"].includes(h.type)&&{filter:`${h.type}(${h.content})`},..."drop-shadow"===h.type&&{filter:`${h.type}(${h.hOffset} ${h.vOffset} ${h.blur} ${h.color})`}},srcSet:t.srcSet,sizes:t.sizes}),b.enabled&&(0,l.jsx)("figcaption",{children:b.content})]})]})}})}},a={};function l(e){var o=a[e];if(void 0!==o)return o.exports;var s=a[e]={exports:{}};return t[e](s,s.exports,l),s.exports}l.m=t,e=[],l.O=(t,a,o,s)=>{if(!a){var i=1/0;for(c=0;c<e.length;c++){for(var[a,o,s]=e[c],n=!0,r=0;r<a.length;r++)(!1&s||i>=s)&&Object.keys(l.O).every((e=>l.O[e](a[r])))?a.splice(r--,1):(n=!1,s<i&&(i=s));if(n){e.splice(c--,1);var d=o();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]=[a,o,s]},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={447:0,879:0};l.O.j=t=>0===e[t];var t=(t,a)=>{var o,s,[i,n,r]=a,d=0;if(i.some((t=>0!==e[t]))){for(o in n)l.o(n,o)&&(l.m[o]=n[o]);if(r)var c=r(l)}for(t&&t(a);d<i.length;d++)s=i[d],l.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return l.O(c)},a=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var o=l.O(void 0,[879],(()=>l(228)));o=l.O(o)})();
  • caledros-basic-blocks/trunk/build/blocks/social-icons-group/index.asset.php

    r3313530 r3321999  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'fe357991b59afffa3e28');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '65a6976b03d75fe05cfc');
  • caledros-basic-blocks/trunk/build/blocks/social-icons-group/index.js

    r3313530 r3321999  
    1 (()=>{"use strict";var e,o={389:()=>{const e=window.wp.blocks,o=JSON.parse('{"UU":"caledros-basic-blocks/social-icons-group"}'),a=window.wp.i18n,t=window.ReactJSXRuntime,l={icon:(0,t.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,t.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,t.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,t.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,t.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,t.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,t.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,t.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,t.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,t.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,t.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,t.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},s=window.wp.blockEditor,i=window.wp.components,n=window.wp.data;function r({attributes:e,setAttributes:o}){const{socialIconsColor:l}=e,[r,c]=(0,s.useSettings)("color.palette","color.defaultPalette"),u=r.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),b=(0,n.select)("core/editor")?.getEditorSettings(),p=b?.__experimentalFeatures?.color?.palette,d=(e,o)=>({colors:e?.[o]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${o}`}),g=d(p,"default"),x=d(p,"theme"),m=d(p,"custom"),h=[...c?[g]:[],x,...m.colors?[m]:[]];return(0,t.jsx)(i.PanelBody,{title:(0,a.__)("Social icons color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:(0,t.jsx)(i.ColorPalette,{colors:p?h:u,value:l,onChange:e=>o({socialIconsColor:e}),enableAlpha:!0,clearable:!1})})}function c({attributes:e,setAttributes:o}){const{socialIconsDarkColor:l}=e,[r,c]=(0,s.useSettings)("color.palette","color.defaultPalette"),u=r.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),b=(0,n.select)("core/editor")?.getEditorSettings(),p=b?.__experimentalFeatures?.color?.palette,d=(e,o)=>({colors:e?.[o]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${o}`}),g=d(p,"default"),x=d(p,"theme"),m=d(p,"custom"),h=[...c?[g]:[],x,...m.colors?[m]:[]];return(0,t.jsx)(i.PanelBody,{title:(0,a.__)("Social icons color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:(0,t.jsx)(i.ColorPalette,{colors:p?h:u,value:l,onChange:e=>o({socialIconsDarkColor:e}),enableAlpha:!0,clearable:!1})})}function u({attributes:e,setAttributes:o}){const{socialIconsSize:l}=e;return(0,t.jsx)(i.PanelBody,{title:(0,a.__)("Social icons size","caledros-basic-blocks"),initialOpen:!1,children:(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Adjust the size (px) of the social media icons","caledros-basic-blocks"),initialPosition:l,value:l,max:100,min:0,step:1,onChange:e=>o({socialIconsSize:e})})})}function b({attributes:e,setAttributes:o}){const{groupMargin:l}=e,s=parseInt(l.top)||0,n=parseInt(l.left)||0,r=parseInt(l.bottom)||0,c=parseInt(l.right)||0,u=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),p=l.bottom.replace(/\d+/g,""),d=l.right.replace(/\d+/g,""),g=(e,o)=>"auto"===e?"":["%","vw"].includes(e)&&o>100?100:o;return(0,t.jsxs)(i.PanelBody,{title:(0,a.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,t.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different margins","caledros-basic-blocks"),checked:l.differentMarginsEnabled,onChange:e=>{o({groupMargin:{...l,differentMarginsEnabled:e}})}}),!l.differentMarginsEnabled&&(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the margin (${u}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,top:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,top:`${g(e,s)}${e}`}})}})]}),l.differentMarginsEnabled&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top margin (${u}) for the container.`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,top:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,top:`${g(e,s)}${e}`}})}})]}),(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right margin (${d}) for the container.`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,right:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,right:`${g(e,c)}${e}`}})}})]}),(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom margin (${p}) for the container.`,"caledros-basic-blocks"),value:r,max:["%","vw"].includes(p)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,bottom:`${"auto"===p?"":e}${p}`}})},disabled:"auto"===p}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,bottom:`${g(e,r)}${e}`}})}})]}),(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left margin (${b}) for the container.`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,left:`${"auto"===b?"":e}${b}`}})},disabled:"auto"===b}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,left:`${g(e,n)}${e}`}})}})]})]})]})}function p({attributes:e,setAttributes:o}){const{iconsGap:l}=e;return(0,t.jsx)(i.PanelBody,{title:(0,a.__)("Space between icons","caledros-basic-blocks"),initialOpen:!1,children:(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Adjust the spacing (px) between the icons ","caledros-basic-blocks"),initialPosition:l,value:l,max:100,min:0,step:1,onChange:e=>o({iconsGap:e})})})}(0,e.registerBlockType)(o.UU,{icon:l.icon,edit:function({attributes:e,setAttributes:o}){const{iconsGap:a,groupMargin:l,socialIconsSize:i,socialIconsColor:n,socialIconsDarkColor:d}=e,g=(0,s.useBlockProps)({className:"cbb-social-icons-group",style:{margin:l.differentMarginsEnabled?`${l.top} ${l.right} ${l.bottom} ${l.left}`:`${l.top}`,"--cbb-icon-group-gap":`${a}px`,"--cbb-social-icon-size":`${i}px`,"--cbb-social-icon-color":`${n}`,"--cbb-social-icon-dark-color":`${d}`}});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.InspectorControls,{children:[(0,t.jsx)(r,{attributes:e,setAttributes:o}),(0,t.jsx)(c,{attributes:e,setAttributes:o}),(0,t.jsx)(u,{attributes:e,setAttributes:o}),(0,t.jsx)(p,{attributes:e,setAttributes:o}),(0,t.jsx)(b,{attributes:e,setAttributes:o})]}),(0,t.jsx)("div",{...g,children:(0,t.jsx)(s.InnerBlocks,{template:[["caledros-basic-blocks/social-icon"],["caledros-basic-blocks/social-icon"],["caledros-basic-blocks/social-icon"]],allowedBlocks:["caledros-basic-blocks/social-icon"]})})]})},save:function({attributes:e}){const{iconsGap:o,groupMargin:a,socialIconsSize:l,socialIconsColor:i,socialIconsDarkColor:n}=e,r=s.useBlockProps.save({className:"cbb-social-icons-group",style:{margin:a.differentMarginsEnabled?`${a.top} ${a.right} ${a.bottom} ${a.left}`:`${a.top}`,gap:`${o}px`,"--cbb-social-icon-size":`${l}px`,"--cbb-social-icon-color":`${i}`,"--cbb-social-icon-dark-color":`${n}`}});return(0,t.jsx)("div",{...r,children:(0,t.jsx)(s.InnerBlocks.Content,{})})}})}},a={};function t(e){var l=a[e];if(void 0!==l)return l.exports;var s=a[e]={exports:{}};return o[e](s,s.exports,t),s.exports}t.m=o,e=[],t.O=(o,a,l,s)=>{if(!a){var i=1/0;for(u=0;u<e.length;u++){for(var[a,l,s]=e[u],n=!0,r=0;r<a.length;r++)(!1&s||i>=s)&&Object.keys(t.O).every((e=>t.O[e](a[r])))?a.splice(r--,1):(n=!1,s<i&&(i=s));if(n){e.splice(u--,1);var c=l();void 0!==c&&(o=c)}}return o}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[a,l,s]},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={411:0,379:0};t.O.j=o=>0===e[o];var o=(o,a)=>{var l,s,[i,n,r]=a,c=0;if(i.some((o=>0!==e[o]))){for(l in n)t.o(n,l)&&(t.m[l]=n[l]);if(r)var u=r(t)}for(o&&o(a);c<i.length;c++)s=i[c],t.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return t.O(u)},a=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];a.forEach(o.bind(null,0)),a.push=o.bind(null,a.push.bind(a))})();var l=t.O(void 0,[379],(()=>t(389)));l=t.O(l)})();
     1(()=>{"use strict";var e,o={389:()=>{const e=window.wp.blocks,o=JSON.parse('{"UU":"caledros-basic-blocks/social-icons-group"}'),a=window.wp.i18n,t=window.ReactJSXRuntime,l={icon:(0,t.jsx)("svg",{width:"24",height:"24",version:"1.1",viewBox:"0 0 6.35 6.35",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("g",{transform:"translate(-96.573 -101.07)",children:(0,t.jsxs)("g",{transform:"matrix(.087396 0 0 .087396 90.571 91.268)",children:[(0,t.jsx)("path",{d:"m141.33 148.5a36.329 36.329 0 0 1-36.329 36.329 36.329 36.329 0 0 1-36.329-36.329 36.329 36.329 0 0 1 36.329-36.329 36.329 36.329 0 0 1 36.329 36.329z",fill:"#e0ebe0","stroke-width":"0"}),(0,t.jsx)("path",{d:"m138.18 148.5a33.177 33.177 0 0 1-33.177 33.177 33.177 33.177 0 0 1-33.177-33.177 33.177 33.177 0 0 1 33.177-33.177 33.177 33.177 0 0 1 33.177 33.177z",fill:"#252533","stroke-width":"0"}),(0,t.jsx)("path",{d:"m135.4 148.5a30.397 30.397 0 0 1-30.397 30.397 30.397 30.397 0 0 1-30.397-30.397 30.397 30.397 0 0 1 30.397-30.397 30.397 30.397 0 0 1 30.397 30.397z",fill:"#e0ebe0","stroke-width":"0"}),(0,t.jsxs)("g",{transform:"matrix(.90041 0 0 .90041 31.823 90.353)",fill:"#252533","stroke-width":"1.1106",children:[(0,t.jsx)("path",{d:"m93.777 55.9v9.3361c7.8313 1.1492 16.709-9.4028 15.094-9.3963z"}),(0,t.jsx)("path",{d:"m97.104 59.499c2.0783-0.03527 3.9177 0.15195 8.6289-2.233-5.125 1.0559-5.7944 0.56153-8.6392 0.57438-0.78106 0.0035-0.68526 1.6378 0.01037 1.6586z","stroke-width":"0"}),(0,t.jsx)("path",{d:"m53.478 56.801h38.884v9.3252s-3.9882 1.7008-3.4603 4.8679c0.52784 3.1671 3.1084 6.862 10.088 6.9206v7.1928h-7.2969s-4.3545-4.1057-10.865-3.8568-10.078 3.691-10.078 3.691h-7.4648v-7.3819s10.451 0.62207 9.9531-7.1331c-0.49766-7.7551-19.699-9.2481-19.699-9.2481z"})]}),(0,t.jsx)("path",{d:"m106.41 126.27a0.78523 0.78523 0 0 0-0.94136 0.59044l-2.4602 10.727a0.78523 0.78523 0 0 0 0.58951 0.94136 0.78523 0.78523 0 0 0 0.94044-0.59044l2.4611-10.727a0.78523 0.78523 0 0 0-0.58951-0.94136z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,t.jsx)("path",{d:"m100.45 127.77-5.9517 3.9678a0.78531 0.78531 0 0 0 0 1.3062l5.9517 3.9678a0.78523 0.78523 0 0 0 1.089-0.21724 0.78523 0.78523 0 0 0-0.21816-1.089l-4.9723-3.3152 4.9723-3.3143a0.78523 0.78523 0 0 0 0.21816-1.089 0.78523 0.78523 0 0 0-1.089-0.21724z",color:"#000000",fill:"#fc571b","stroke-width":"0"}),(0,t.jsx)("path",{d:"m109.55 127.77a0.78523 0.78523 0 0 0-1.089 0.21724 0.78523 0.78523 0 0 0 0.21816 1.089l4.9714 3.3143-4.9714 3.3152a0.78523 0.78523 0 0 0-0.21816 1.089 0.78523 0.78523 0 0 0 1.089 0.21724l5.9517-3.9678a0.78531 0.78531 0 0 0 0-1.3062z",color:"#000000",fill:"#fc571b","stroke-width":"0"})]})})})},s=window.wp.blockEditor,i=window.wp.components,n=window.wp.data;function r({attributes:e,setAttributes:o}){const{socialIconsColor:l}=e,[r,c]=(0,s.useSettings)("color.palette","color.defaultPalette"),u=r.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),b=(0,n.select)("core/editor")?.getEditorSettings(),p=b?.__experimentalFeatures?.color?.palette,d=(e,o)=>({colors:e?.[o]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${o}`}),g=d(p,"default"),x=d(p,"theme"),m=d(p,"custom"),h=[...c?[g]:[],x,...m.colors?[m]:[]];return(0,t.jsx)(i.PanelBody,{title:(0,a.__)("Social icons color (light mode)","caledros-basic-blocks"),initialOpen:!1,children:(0,t.jsx)(i.ColorPalette,{colors:p?h:u,value:l,onChange:e=>o({socialIconsColor:e}),enableAlpha:!0,clearable:!1})})}function c({attributes:e,setAttributes:o}){const{socialIconsDarkColor:l}=e,[r,c]=(0,s.useSettings)("color.palette","color.defaultPalette"),u=r.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),b=(0,n.select)("core/editor")?.getEditorSettings(),p=b?.__experimentalFeatures?.color?.palette,d=(e,o)=>({colors:e?.[o]?.map((e=>({color:`var(--wp--preset--color--${e.slug})`,name:e.name}))),name:`${o}`}),g=d(p,"default"),x=d(p,"theme"),m=d(p,"custom"),h=[...c?[g]:[],x,...m.colors?[m]:[]];return(0,t.jsx)(i.PanelBody,{title:(0,a.__)("Social icons color (dark mode)","caledros-basic-blocks"),initialOpen:!1,children:(0,t.jsx)(i.ColorPalette,{colors:p?h:u,value:l,onChange:e=>o({socialIconsDarkColor:e}),enableAlpha:!0,clearable:!1})})}function u({attributes:e,setAttributes:o}){const{socialIconsSize:l}=e;return(0,t.jsx)(i.PanelBody,{title:(0,a.__)("Social icons size","caledros-basic-blocks"),initialOpen:!1,children:(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Adjust the size (px) of the social media icons","caledros-basic-blocks"),initialPosition:l,value:l,max:100,min:0,step:1,onChange:e=>o({socialIconsSize:e})})})}function b({attributes:e,setAttributes:o}){const{groupMargin:l}=e,s=parseInt(l.top)||0,n=parseInt(l.left)||0,r=parseInt(l.bottom)||0,c=parseInt(l.right)||0,u=l.top.replace(/\d+/g,""),b=l.left.replace(/\d+/g,""),p=l.bottom.replace(/\d+/g,""),d=l.right.replace(/\d+/g,""),g=(e,o)=>"auto"===e?"":["%","vw"].includes(e)&&o>100?100:o;return(0,t.jsxs)(i.PanelBody,{title:(0,a.__)("Margin","caledros-basic-blocks"),initialOpen:!1,children:[(0,t.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Enable different margins","caledros-basic-blocks"),checked:l.differentMarginsEnabled,onChange:e=>{o({groupMargin:{...l,differentMarginsEnabled:e}})}}),!l.differentMarginsEnabled&&(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the margin (${u}).`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,top:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,top:`${g(e,s)}${e}`}})}})]}),l.differentMarginsEnabled&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the top margin (${u}).`,"caledros-basic-blocks"),value:s,max:["%","vw"].includes(u)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,top:`${"auto"===u?"":e}${u}`}})},disabled:"auto"===u}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:u,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,top:`${g(e,s)}${e}`}})}})]}),(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the right margin (${d}).`,"caledros-basic-blocks"),value:c,max:["%","vw"].includes(d)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,right:`${"auto"===d?"":e}${d}`}})},disabled:"auto"===d}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:d,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,right:`${g(e,c)}${e}`}})}})]}),(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the bottom margin (${p}).`,"caledros-basic-blocks"),value:r,max:["%","vw"].includes(p)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,bottom:`${"auto"===p?"":e}${p}`}})},disabled:"auto"===p}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:p,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,bottom:`${g(e,r)}${e}`}})}})]}),(0,t.jsxs)("div",{className:"cbb-editor__grid",children:[(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)(`Please select the left margin (${b}).`,"caledros-basic-blocks"),value:n,max:["%","vw"].includes(b)?100:500,min:0,step:1,onChange:e=>{o({groupMargin:{...l,left:`${"auto"===b?"":e}${b}`}})},disabled:"auto"===b}),(0,t.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:b,options:[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"auto",value:"auto"}],onChange:e=>{o({groupMargin:{...l,left:`${g(e,n)}${e}`}})}})]})]})]})}function p({attributes:e,setAttributes:o}){const{iconsGap:l}=e;return(0,t.jsx)(i.PanelBody,{title:(0,a.__)("Space between icons","caledros-basic-blocks"),initialOpen:!1,children:(0,t.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,help:(0,a.__)("Adjust the spacing (px) between the icons ","caledros-basic-blocks"),initialPosition:l,value:l,max:100,min:0,step:1,onChange:e=>o({iconsGap:e})})})}(0,e.registerBlockType)(o.UU,{icon:l.icon,edit:function({attributes:e,setAttributes:o}){const{iconsGap:a,groupMargin:l,socialIconsSize:i,socialIconsColor:n,socialIconsDarkColor:d}=e,g=(0,s.useBlockProps)({className:"cbb-social-icons-group",style:{margin:l.differentMarginsEnabled?`${l.top} ${l.right} ${l.bottom} ${l.left}`:`${l.top}`,"--cbb-icon-group-gap":`${a}px`,"--cbb-social-icon-size":`${i}px`,"--cbb-social-icon-color":`${n}`,"--cbb-social-icon-dark-color":`${d}`}});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(s.InspectorControls,{children:[(0,t.jsx)(r,{attributes:e,setAttributes:o}),(0,t.jsx)(c,{attributes:e,setAttributes:o}),(0,t.jsx)(u,{attributes:e,setAttributes:o}),(0,t.jsx)(p,{attributes:e,setAttributes:o}),(0,t.jsx)(b,{attributes:e,setAttributes:o})]}),(0,t.jsx)("div",{...g,children:(0,t.jsx)(s.InnerBlocks,{template:[["caledros-basic-blocks/social-icon"],["caledros-basic-blocks/social-icon"],["caledros-basic-blocks/social-icon"]],allowedBlocks:["caledros-basic-blocks/social-icon"]})})]})},save:function({attributes:e}){const{iconsGap:o,groupMargin:a,socialIconsSize:l,socialIconsColor:i,socialIconsDarkColor:n}=e,r=s.useBlockProps.save({className:"cbb-social-icons-group",style:{margin:a.differentMarginsEnabled?`${a.top} ${a.right} ${a.bottom} ${a.left}`:`${a.top}`,gap:`${o}px`,"--cbb-social-icon-size":`${l}px`,"--cbb-social-icon-color":`${i}`,"--cbb-social-icon-dark-color":`${n}`}});return(0,t.jsx)("div",{...r,children:(0,t.jsx)(s.InnerBlocks.Content,{})})}})}},a={};function t(e){var l=a[e];if(void 0!==l)return l.exports;var s=a[e]={exports:{}};return o[e](s,s.exports,t),s.exports}t.m=o,e=[],t.O=(o,a,l,s)=>{if(!a){var i=1/0;for(u=0;u<e.length;u++){for(var[a,l,s]=e[u],n=!0,r=0;r<a.length;r++)(!1&s||i>=s)&&Object.keys(t.O).every((e=>t.O[e](a[r])))?a.splice(r--,1):(n=!1,s<i&&(i=s));if(n){e.splice(u--,1);var c=l();void 0!==c&&(o=c)}}return o}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[a,l,s]},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={411:0,379:0};t.O.j=o=>0===e[o];var o=(o,a)=>{var l,s,[i,n,r]=a,c=0;if(i.some((o=>0!==e[o]))){for(l in n)t.o(n,l)&&(t.m[l]=n[l]);if(r)var u=r(t)}for(o&&o(a);c<i.length;c++)s=i[c],t.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return t.O(u)},a=globalThis.webpackChunkcaledros_basic_blocks=globalThis.webpackChunkcaledros_basic_blocks||[];a.forEach(o.bind(null,0)),a.push=o.bind(null,a.push.bind(a))})();var l=t.O(void 0,[379],(()=>t(389)));l=t.O(l)})();
  • caledros-basic-blocks/trunk/caledros-basic.php

    r3314036 r3321999  
    44 * Plugin URI: https://caledrosforge.com/
    55 * Description: Add easy-to-use Gutenberg blocks to your WordPress site.
    6  * Version: 1.1.1
     6 * Version: 1.2.0
    77 * Requires at least: 6.7
    88 * Requires PHP: 8.0
     
    8080function caledros_basic_blocks_activate_plugin() {   
    8181    update_option('caledros_basic_blocks_enable_preload', 1);
     82    update_option('caledros_basic_blocks_add_column_layout_to_wp_site_blocks', 0);
    8283}
    8384register_activation_hook(__FILE__, 'caledros_basic_blocks_activate_plugin');
  • caledros-basic-blocks/trunk/core/admin-page/admin-page.php

    r3312194 r3321999  
    2424 */
    2525
    26 // Register setting with sanitization callback
     26// Register settings
    2727function caledros_basic_blocks_register_settings() {
    28     $args = array(
     28    // Preloader
     29    $preload_args = array(
    2930        'type' => "integer",
    3031        'sanitize_callback' => 'caledros_basic_blocks_sanitize_enable_preload',
     
    3536        'caledros_basic_blocks_settings_group',
    3637        'caledros_basic_blocks_enable_preload',
    37         $args
     38        $preload_args
     39    );
     40
     41    // Custom CSS for wp site blocks
     42    $column_layout_args = array(
     43        'type' => "integer",
     44        'sanitize_callback' => 'caledros_basic_blocks_sanitize_add_column_layout_to_wp_site_blocks',
     45        'show_in_rest' => false,
     46        'default' => 1,
     47    );
     48    register_setting(
     49        'caledros_basic_blocks_settings_group',
     50        'caledros_basic_blocks_add_column_layout_to_wp_site_blocks',
     51        $column_layout_args
    3852    );
    3953}
    4054add_action('admin_init', 'caledros_basic_blocks_register_settings');
    4155
    42 // Sanitization callback function
     56// Sanitization callback functions
     57// Preload sanitization callback function
    4358function caledros_basic_blocks_sanitize_enable_preload($input) {
     59    // Checkbox: save '1' if checked, otherwise '0'
     60    return ($input === '1') ? 1 : 0;
     61}
     62
     63// Load optional CSS sanitization callback function
     64function caledros_basic_blocks_sanitize_add_column_layout_to_wp_site_blocks($input) {
    4465    // Checkbox: save '1' if checked, otherwise '0'
    4566    return ($input === '1') ? 1 : 0;
     
    7192                <div><input type="checkbox" name="caledros_basic_blocks_enable_preload" value="1" <?php checked(1, get_option('caledros_basic_blocks_enable_preload'), true); ?> /></div>
    7293            </div>
     94            <div style="display:flex; flex-direction:row; column-gap:10px; margin-bottom:10px;">               
     95                <div>Add flex-column layout to the "wp-site-blocks" container</div>
     96                <div><input type="checkbox" name="caledros_basic_blocks_add_column_layout_to_wp_site_blocks" value="1" <?php checked(1, get_option('caledros_basic_blocks_add_column_layout_to_wp_site_blocks'), true); ?> /></div>
     97            </div>
    7398            <?php submit_button('Save Changes', 'primary', 'submit', false); ?>
    7499        </form>
  • caledros-basic-blocks/trunk/core/loaders/css-styles-loader.php

    r3312194 r3321999  
    5858}
    5959add_filter('style_loader_tag', 'caledros_basic_blocks_preload_all_stylesheets', 10, 4);
     60
     61// Load custom CSS for wp site blocks
     62function caledros_basic_blocks_load_custom_css_wp_site_blocks(){
     63    if ( !is_admin() && get_option('caledros_basic_blocks_add_column_layout_to_wp_site_blocks', 1)){
     64        $custom_css_wp_site_blocks = ".wp-site-blocks{display:flex; flex-direction:column;}";
     65        wp_add_inline_style('caledros-general-css', $custom_css_wp_site_blocks );
     66    }
     67}
     68add_action( 'wp_enqueue_scripts', 'caledros_basic_blocks_load_custom_css_wp_site_blocks' );
  • caledros-basic-blocks/trunk/languages/caledros-basic-blocks.pot

    r3314036 r3321999  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Caledros Basic Blocks 1.1.1\n"
     5"Project-Id-Version: Caledros Basic Blocks 1.2.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/caledros-basic-blocks\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-06-18T16:44:13+00:00\n"
     12"POT-Creation-Date: 2025-07-03T19:38:59+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    429429
    430430#: build/blocks/button/index.js:1
    431 #: build/blocks/desktop-menu-container/index.js:1
    432 #: build/blocks/flex-container/index.js:1
    433 #: build/blocks/grid-container/index.js:1
    434 #: build/blocks/mobile-menu-container/index.js:1
    435431#: src/blocks/button/settings/border-width-settings.js:68
    436 #: src/blocks/desktop-menu-container/settings/border-width-settings.js:68
    437 #: src/blocks/flex-container/settings/border-width-settings.js:68
    438 #: src/blocks/grid-container/settings/border-width-settings.js:68
    439 #: src/blocks/mobile-menu-container/settings/border-width-settings.js:68
    440 msgid "Please select the border width (px) for the container."
    441 msgstr ""
    442 
    443 #: build/blocks/button/index.js:1
    444 #: build/blocks/desktop-menu-container/index.js:1
    445 #: build/blocks/flex-container/index.js:1
    446 #: build/blocks/grid-container/index.js:1
    447 #: build/blocks/mobile-menu-container/index.js:1
     432msgid "Please select the border width (px) for the button."
     433msgstr ""
     434
     435#: build/blocks/button/index.js:1
    448436#: src/blocks/button/settings/border-width-settings.js:89
    449 #: src/blocks/desktop-menu-container/settings/border-width-settings.js:89
    450 #: src/blocks/flex-container/settings/border-width-settings.js:89
    451 #: src/blocks/grid-container/settings/border-width-settings.js:89
    452 #: src/blocks/mobile-menu-container/settings/border-width-settings.js:89
    453 msgid "Please select the top border width (px) for the container."
    454 msgstr ""
    455 
    456 #: build/blocks/button/index.js:1
    457 #: build/blocks/desktop-menu-container/index.js:1
    458 #: build/blocks/flex-container/index.js:1
    459 #: build/blocks/grid-container/index.js:1
    460 #: build/blocks/mobile-menu-container/index.js:1
     437msgid "Please select the top border width (px) for the button."
     438msgstr ""
     439
     440#: build/blocks/button/index.js:1
    461441#: src/blocks/button/settings/border-width-settings.js:109
    462 #: src/blocks/desktop-menu-container/settings/border-width-settings.js:109
    463 #: src/blocks/flex-container/settings/border-width-settings.js:109
    464 #: src/blocks/grid-container/settings/border-width-settings.js:109
    465 #: src/blocks/mobile-menu-container/settings/border-width-settings.js:109
    466 msgid "Please select the right border width (px) for the container."
    467 msgstr ""
    468 
    469 #: build/blocks/button/index.js:1
    470 #: build/blocks/desktop-menu-container/index.js:1
    471 #: build/blocks/flex-container/index.js:1
    472 #: build/blocks/grid-container/index.js:1
    473 #: build/blocks/mobile-menu-container/index.js:1
     442msgid "Please select the right border width (px) for the button."
     443msgstr ""
     444
     445#: build/blocks/button/index.js:1
    474446#: src/blocks/button/settings/border-width-settings.js:129
    475 #: src/blocks/desktop-menu-container/settings/border-width-settings.js:129
    476 #: src/blocks/flex-container/settings/border-width-settings.js:129
    477 #: src/blocks/grid-container/settings/border-width-settings.js:129
    478 #: src/blocks/mobile-menu-container/settings/border-width-settings.js:129
    479 msgid "Please select the bottom border width (px) for the container."
    480 msgstr ""
    481 
    482 #: build/blocks/button/index.js:1
    483 #: build/blocks/desktop-menu-container/index.js:1
    484 #: build/blocks/flex-container/index.js:1
    485 #: build/blocks/grid-container/index.js:1
    486 #: build/blocks/mobile-menu-container/index.js:1
     447msgid "Please select the bottom border width (px) for the button."
     448msgstr ""
     449
     450#: build/blocks/button/index.js:1
    487451#: src/blocks/button/settings/border-width-settings.js:149
    488 #: src/blocks/desktop-menu-container/settings/border-width-settings.js:149
    489 #: src/blocks/flex-container/settings/border-width-settings.js:149
    490 #: src/blocks/grid-container/settings/border-width-settings.js:149
    491 #: src/blocks/mobile-menu-container/settings/border-width-settings.js:149
    492 msgid "Please select the left border width (px) for the container."
     452msgid "Please select the left border width (px) for the button."
    493453msgstr ""
    494454
     
    868828#: build/blocks/grid-container/index.js:1
    869829#: build/blocks/mobile-menu-container/index.js:1
     830#: src/blocks/desktop-menu-container/settings/border-width-settings.js:68
     831#: src/blocks/flex-container/settings/border-width-settings.js:68
     832#: src/blocks/grid-container/settings/border-width-settings.js:68
     833#: src/blocks/mobile-menu-container/settings/border-width-settings.js:68
     834msgid "Please select the border width (px) for the container."
     835msgstr ""
     836
     837#: build/blocks/desktop-menu-container/index.js:1
     838#: build/blocks/flex-container/index.js:1
     839#: build/blocks/grid-container/index.js:1
     840#: build/blocks/mobile-menu-container/index.js:1
     841#: src/blocks/desktop-menu-container/settings/border-width-settings.js:89
     842#: src/blocks/flex-container/settings/border-width-settings.js:89
     843#: src/blocks/grid-container/settings/border-width-settings.js:89
     844#: src/blocks/mobile-menu-container/settings/border-width-settings.js:89
     845msgid "Please select the top border width (px) for the container."
     846msgstr ""
     847
     848#: build/blocks/desktop-menu-container/index.js:1
     849#: build/blocks/flex-container/index.js:1
     850#: build/blocks/grid-container/index.js:1
     851#: build/blocks/mobile-menu-container/index.js:1
     852#: src/blocks/desktop-menu-container/settings/border-width-settings.js:109
     853#: src/blocks/flex-container/settings/border-width-settings.js:109
     854#: src/blocks/grid-container/settings/border-width-settings.js:109
     855#: src/blocks/mobile-menu-container/settings/border-width-settings.js:109
     856msgid "Please select the right border width (px) for the container."
     857msgstr ""
     858
     859#: build/blocks/desktop-menu-container/index.js:1
     860#: build/blocks/flex-container/index.js:1
     861#: build/blocks/grid-container/index.js:1
     862#: build/blocks/mobile-menu-container/index.js:1
     863#: src/blocks/desktop-menu-container/settings/border-width-settings.js:129
     864#: src/blocks/flex-container/settings/border-width-settings.js:129
     865#: src/blocks/grid-container/settings/border-width-settings.js:129
     866#: src/blocks/mobile-menu-container/settings/border-width-settings.js:129
     867msgid "Please select the bottom border width (px) for the container."
     868msgstr ""
     869
     870#: build/blocks/desktop-menu-container/index.js:1
     871#: build/blocks/flex-container/index.js:1
     872#: build/blocks/grid-container/index.js:1
     873#: build/blocks/mobile-menu-container/index.js:1
     874#: src/blocks/desktop-menu-container/settings/border-width-settings.js:149
     875#: src/blocks/flex-container/settings/border-width-settings.js:149
     876#: src/blocks/grid-container/settings/border-width-settings.js:149
     877#: src/blocks/mobile-menu-container/settings/border-width-settings.js:149
     878msgid "Please select the left border width (px) for the container."
     879msgstr ""
     880
     881#: build/blocks/desktop-menu-container/index.js:1
     882#: build/blocks/flex-container/index.js:1
     883#: build/blocks/grid-container/index.js:1
     884#: build/blocks/mobile-menu-container/index.js:1
    870885#: build/blocks/responsive-image/index.js:1
    871886#: src/blocks/desktop-menu-container/settings/box-shadow-settings.js:78
     
    11541169#: src/blocks/desktop-menu-container/settings/overlay-nav-settings.js:35
    11551170#: src/blocks/mobile-menu-container/settings/overlay-nav-settings.js:35
    1156 msgid "This option transforms the navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling."
    1157 msgstr ""
    1158 
    1159 #: build/blocks/flex-container/index.js:1
    1160 #: build/blocks/image-gallery/index.js:1
     1171msgid "This option transforms the navigation bar into an overlay, allowing it to overlap the website's content."
     1172msgstr ""
     1173
     1174#: build/blocks/flex-container/index.js:1
    11611175#: build/blocks/slider/index.js:1
    11621176#: src/blocks/flex-container/settings/width-settings.js:82
    1163 #: src/blocks/image-gallery/settings/width-settings.js:82
    11641177#: src/blocks/slider/settings/width-settings.js:82
    11651178msgid "Choose the maximum width for the container."
     
    14991512#: src/blocks/image-gallery/settings/images-settings.js:55
    15001513msgid "Edit Gallery"
     1514msgstr ""
     1515
     1516#: build/blocks/image-gallery/index.js:1
     1517#: src/blocks/image-gallery/settings/width-settings.js:82
     1518msgid "Choose the maximum width for the gallery."
    15011519msgstr ""
    15021520
  • caledros-basic-blocks/trunk/package-lock.json

    r3314036 r3321999  
    11{
    22  "name": "caledros-basic-blocks",
    3   "version": "1.1.1",
     3  "version": "1.2.0",
    44  "lockfileVersion": 3,
    55  "requires": true,
     
    77    "": {
    88      "name": "caledros-basic-blocks",
    9       "version": "1.1.1",
     9      "version": "1.2.0",
    1010      "license": "GPL-2.0-or-later",
    1111      "dependencies": {
  • caledros-basic-blocks/trunk/package.json

    r3314036 r3321999  
    11{
    22  "name": "caledros-basic-blocks",
    3   "version": "1.1.1",
     3  "version": "1.2.0",
    44  "main": "index.js",
    55  "scripts": {
  • caledros-basic-blocks/trunk/src/blocks/button/settings/border-radius-settings.js

    r3313530 r3321999  
    9292            __next40pxDefaultSize
    9393            help={__(
    94               `Please select the border radius (${topLeftUnit}) for the container.`,
     94              `Please select the border radius (${topLeftUnit}) for the button.`,
    9595              "caledros-basic-blocks"
    9696            )}
  • caledros-basic-blocks/trunk/src/blocks/button/settings/border-width-settings.js

    r3313530 r3321999  
    6767          __nextHasNoMarginBottom
    6868          help={__(
    69             "Please select the border width (px) for the container.",
     69            "Please select the border width (px) for the button.",
    7070            "caledros-basic-blocks"
    7171          )}
     
    8888            __nextHasNoMarginBottom
    8989            help={__(
    90               "Please select the top border width (px) for the container.",
     90              "Please select the top border width (px) for the button.",
    9191              "caledros-basic-blocks"
    9292            )}
     
    108108            __nextHasNoMarginBottom
    109109            help={__(
    110               "Please select the right border width (px) for the container.",
     110              "Please select the right border width (px) for the button.",
    111111              "caledros-basic-blocks"
    112112            )}
     
    128128            __nextHasNoMarginBottom
    129129            help={__(
    130               "Please select the bottom border width (px) for the container.",
     130              "Please select the bottom border width (px) for the button.",
    131131              "caledros-basic-blocks"
    132132            )}
     
    148148            __nextHasNoMarginBottom
    149149            help={__(
    150               "Please select the left border width (px) for the container.",
     150              "Please select the left border width (px) for the button.",
    151151              "caledros-basic-blocks"
    152152            )}
  • caledros-basic-blocks/trunk/src/blocks/button/settings/button-text-dark-color-settings.js

    r3312194 r3321999  
    8383      <ToggleControl
    8484        __nextHasNoMarginBottom
    85         label="Use transparent background"
     85        label="Use transparent color"
    8686        checked={useTransparentBackground}
    8787        onChange={() => {
  • caledros-basic-blocks/trunk/src/blocks/button/settings/button-text-light-color-settings.js

    r3312194 r3321999  
    8383      <ToggleControl
    8484        __nextHasNoMarginBottom
    85         label="Use transparent background"
     85        label="Use transparent color"
    8686        checked={useTransparentBackground}
    8787        onChange={() => {
  • caledros-basic-blocks/trunk/src/blocks/button/settings/margin-settings.js

    r3313530 r3321999  
    7777            __nextHasNoMarginBottom
    7878            help={__(
    79               `Please select the margin (${topUnit}) for the container.`,
     79              `Please select the margin (${topUnit}) for the button.`,
    8080              "caledros-basic-blocks"
    8181            )}
     
    142142              __nextHasNoMarginBottom
    143143              help={__(
    144                 `Please select the top margin (${topUnit}) for the container.`,
     144                `Please select the top margin (${topUnit}) for the button.`,
    145145                "caledros-basic-blocks"
    146146              )}
     
    204204              __nextHasNoMarginBottom
    205205              help={__(
    206                 `Please select the right margin (${rightUnit}) for the container.`,
     206                `Please select the right margin (${rightUnit}) for the button.`,
    207207                "caledros-basic-blocks"
    208208              )}
     
    268268              __nextHasNoMarginBottom
    269269              help={__(
    270                 `Please select the bottom margin (${bottomUnit}) for the container.`,
     270                `Please select the bottom margin (${bottomUnit}) for the button.`,
    271271                "caledros-basic-blocks"
    272272              )}
     
    335335              __nextHasNoMarginBottom
    336336              help={__(
    337                 `Please select the left margin (${leftUnit}) for the container.`,
     337                `Please select the left margin (${leftUnit}) for the button.`,
    338338                "caledros-basic-blocks"
    339339              )}
  • caledros-basic-blocks/trunk/src/blocks/button/settings/padding-settings.js

    r3313530 r3321999  
    9595              __nextHasNoMarginBottom
    9696              help={__(
    97                 `Please select the padding (${topUnit}) for the container`,
     97                `Please select the padding (${topUnit}) for the button`,
    9898                "caledros-basic-blocks"
    9999              )}
     
    156156                __nextHasNoMarginBottom
    157157                help={__(
    158                   `Please select the top padding (${topUnit}) for the container`,
     158                  `Please select the top padding (${topUnit}) for the button`,
    159159                  "caledros-basic-blocks"
    160160                )}
     
    213213                __nextHasNoMarginBottom
    214214                help={__(
    215                   `Please select the right padding (${rightUnit}) for the container`,
     215                  `Please select the right padding (${rightUnit}) for the button`,
    216216                  "caledros-basic-blocks"
    217217                )}
     
    273273                __nextHasNoMarginBottom
    274274                help={__(
    275                   `Please select the bottom padding (${bottomUnit}) for the container`,
     275                  `Please select the bottom padding (${bottomUnit}) for the button`,
    276276                  "caledros-basic-blocks"
    277277                )}
     
    333333                __nextHasNoMarginBottom
    334334                help={__(
    335                   `Please select the left padding (${leftUnit}) for the container`,
     335                  `Please select the left padding (${leftUnit}) for the button`,
    336336                  "caledros-basic-blocks"
    337337                )}
  • caledros-basic-blocks/trunk/src/blocks/desktop-menu-container/settings/overlay-nav-settings.js

    r3312194 r3321999  
    3434        label={__("Enable overlay navigation", "caledros-basic-blocks")}
    3535        help={__(
    36           "This option transforms the navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling.",
     36          "This option transforms the navigation bar into an overlay, allowing it to overlap the website's content.",
    3737          "caledros-basic-blocks"
    3838        )}
  • caledros-basic-blocks/trunk/src/blocks/image-gallery/settings/min-height-settings.js

    r3313530 r3321999  
    5252          __nextHasNoMarginBottom
    5353          help={__(
    54             `Please select the minimum height (${minHeightUnit}) for the container.`,
     54            `Please select the minimum height (${minHeightUnit}) for the gallery.`,
    5555            "caledros-basic-blocks"
    5656          )}
  • caledros-basic-blocks/trunk/src/blocks/image-gallery/settings/width-settings.js

    r3313530 r3321999  
    8181          __nextHasNoMarginBottom
    8282          help={__(
    83             "Choose the maximum width for the container.",
     83            "Choose the maximum width for the gallery.",
    8484            "caledros-basic-blocks"
    8585          )}
     
    121121            __nextHasNoMarginBottom
    122122            help={__(
    123               `Please select the custom maximum width (${widthUnit}) for the container.`,
     123              `Please select the custom maximum width (${widthUnit}) for the gallery.`,
    124124              "caledros-basic-blocks"
    125125            )}
  • caledros-basic-blocks/trunk/src/blocks/mobile-menu-container/settings/overlay-nav-settings.js

    r3312194 r3321999  
    3434        label={__("Enable overlay navigation", "caledros-basic-blocks")}
    3535        help={__(
    36           "This option transforms the navigation bar into an overlay, allowing it to overlap the website's content until the user begins scrolling.",
     36          "This option transforms the navigation bar into an overlay, allowing it to overlap the website's content.",
    3737          "caledros-basic-blocks"
    3838        )}
  • caledros-basic-blocks/trunk/src/blocks/responsive-image/settings/padding-settings.js

    r3313530 r3321999  
    7373            __nextHasNoMarginBottom
    7474            help={__(
    75               `Please select the padding (${topUnit}) for the container.`,
     75              `Please select the padding (${topUnit}).`,
    7676              "caledros-basic-blocks"
    7777            )}
     
    133133              __nextHasNoMarginBottom
    134134              help={__(
    135                 `Please select the top padding (${topUnit}) for the container.`,
     135                `Please select the top padding (${topUnit}).`,
    136136                "caledros-basic-blocks"
    137137              )}
     
    190190              __nextHasNoMarginBottom
    191191              help={__(
    192                 `Please select the right padding (${rightUnit}) for the container.`,
     192                `Please select the right padding (${rightUnit}).`,
    193193                "caledros-basic-blocks"
    194194              )}
     
    250250              __nextHasNoMarginBottom
    251251              help={__(
    252                 `Please select the bottom padding (${bottomUnit}) for the container.`,
     252                `Please select the bottom padding (${bottomUnit}).`,
    253253                "caledros-basic-blocks"
    254254              )}
     
    310310              __nextHasNoMarginBottom
    311311              help={__(
    312                 `Please select the left padding (${leftUnit}) for the container.`,
     312                `Please select the left padding (${leftUnit}).`,
    313313                "caledros-basic-blocks"
    314314              )}
  • caledros-basic-blocks/trunk/src/blocks/social-icons-group/settings/margin-settings.js

    r3313530 r3321999  
    7777            __nextHasNoMarginBottom
    7878            help={__(
    79               `Please select the margin (${topUnit}) for the container.`,
     79              `Please select the margin (${topUnit}).`,
    8080              "caledros-basic-blocks"
    8181            )}
     
    142142              __nextHasNoMarginBottom
    143143              help={__(
    144                 `Please select the top margin (${topUnit}) for the container.`,
     144                `Please select the top margin (${topUnit}).`,
    145145                "caledros-basic-blocks"
    146146              )}
     
    204204              __nextHasNoMarginBottom
    205205              help={__(
    206                 `Please select the right margin (${rightUnit}) for the container.`,
     206                `Please select the right margin (${rightUnit}).`,
    207207                "caledros-basic-blocks"
    208208              )}
     
    268268              __nextHasNoMarginBottom
    269269              help={__(
    270                 `Please select the bottom margin (${bottomUnit}) for the container.`,
     270                `Please select the bottom margin (${bottomUnit}).`,
    271271                "caledros-basic-blocks"
    272272              )}
     
    335335              __nextHasNoMarginBottom
    336336              help={__(
    337                 `Please select the left margin (${leftUnit}) for the container.`,
     337                `Please select the left margin (${leftUnit}).`,
    338338                "caledros-basic-blocks"
    339339              )}
Note: See TracChangeset for help on using the changeset viewer.