(()=>{var e,t={427:e=>{"use strict";e.exports=window.wp.components},573:e=>{"use strict";e.exports=window.wp.primitives},588:()=>{"undefined"!=typeof wp&&wp.hooks&&wp.hooks.addFilter("blocks.registerBlockType","caliph/image-filter-attributes",((e,t)=>["core/image","core/cover","core/gallery"].includes(t)?{...e,attributes:{...e.attributes,caliphFilterBlur:{type:"number",default:0},caliphFilterBrightness:{type:"number",default:1},caliphFilterContrast:{type:"number",default:1},caliphFilterHueRotate:{type:"number",default:0},caliphFilterSaturate:{type:"number",default:1},caliphFilterSepia:{type:"number",default:0},caliphFilterInvert:{type:"number",default:0},caliphFilterOpacity:{type:"number",default:1},caliphFilterGrayscale:{type:"number",default:0}}}:e))},652:(e,t,o)=>{"use strict";var l=o(997),i=o(723),a=o(715),n=o(427),r=o(573),s=o(790);const c=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),p=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});(0,l.registerBlockType)("caliph/responsive-nav-menu",{deprecated:[{attributes:{menuTitle:{type:"string",default:"MENU"},menuItems:{type:"array",default:[]},titleColor:{type:"string",default:"var(--wp--preset--color--accent-4)"},linkColor:{type:"string",default:"var(--wp--preset--color--accent-4)"}},save:()=>null}],edit:({attributes:e,setAttributes:t})=>{const{menuTitle:o,menuItems:l,titleColor:r,linkColor:d,backgroundColor:h,menuDirection:g,menuDirectionTablet:u,menuDirectionMobile:x,menuWidth:m,menuWidthTablet:b,menuWidthMobile:v,menuHeight:f,menuHeightTablet:y,menuHeightMobile:_,itemSpacing:C,itemSpacingTablet:j,itemSpacingMobile:S,enableAccordion:w,showToggleIcon:k,toggleIconPosition:B,containerBackgroundColor:I,containerBorderColor:T,containerBorderWidth:N,containerBorderRadius:P,titleFontFamily:F,titleFontSize:z,titleFontWeight:R,titleLineHeight:$,titleLetterSpacing:H,menuItemFontFamily:M,menuItemFontSize:E,menuItemFontWeight:L,menuItemLineHeight:W,menuItemLetterSpacing:O}=e;if(!l||0===l.length||4===l.length&&l.some((e=>["products","company","pricing","contact"].includes(e.id)))){const e=Date.now(),o=()=>Math.random().toString(36).substr(2,9),l=[{label:"Products",url:"#",id:`products-${e}-${o()}`},{label:"Company",url:"#",id:`company-${e}-${o()}`},{label:"Pricing",url:"#",id:`pricing-${e}-${o()}`},{label:"Contact",url:"#",id:`contact-${e}-${o()}`}];t({menuItems:l})}const A=(0,a.useBlockProps)({className:"caliph-responsive-nav-menu"}),D=()=>{const e={label:(0,i.__)("New Item","caliph"),url:"#",id:`item-${Date.now()}-${Math.random().toString(36).substr(2,9)}`};t({menuItems:[...l,e]})},U=(e,o,i)=>{const a=[...l];a[e][o]=i,t({menuItems:a})};return(0,s.jsxs)("div",{...A,children:[(0,s.jsx)(a.BlockControls,{children:(0,s.jsx)(n.ToolbarGroup,{children:(0,s.jsx)(n.ToolbarButton,{icon:c,label:(0,i.__)("Add Menu Item","caliph"),onClick:D})})}),(0,s.jsxs)(a.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Menu Settings","caliph"),children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Menu Title","caliph"),value:o,onChange:e=>t({menuTitle:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Enable Accordion","caliph"),checked:w,onChange:e=>t({enableAccordion:e}),help:(0,i.__)("Enable accordion behavior on smaller screens","caliph")}),w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("Show Toggle Icon","caliph"),checked:k,onChange:e=>t({showToggleIcon:e})}),k&&(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Toggle Icon Position","caliph"),value:B,options:[{label:(0,i.__)("Right","caliph"),value:"right"},{label:(0,i.__)("Left","caliph"),value:"left"}],onChange:e=>t({toggleIconPosition:e})})]})]}),(0,s.jsx)(n.PanelBody,{title:(0,i.__)("Responsive Layout","caliph"),initialOpen:!1,children:(0,s.jsx)(n.TabPanel,{className:"responsive-tabs",activeClass:"active-tab",tabs:[{name:"desktop",title:(0,i.__)("Desktop","caliph"),className:"tab-desktop"},{name:"tablet",title:(0,i.__)("Tablet","caliph"),className:"tab-tablet"},{name:"mobile",title:(0,i.__)("Mobile","caliph"),className:"tab-mobile"}],children:e=>(0,s.jsxs)("div",{className:`responsive-controls responsive-controls-${e.name}`,children:["desktop"===e.name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Menu Direction","caliph"),value:g,options:[{label:(0,i.__)("Vertical","caliph"),value:"vertical"},{label:(0,i.__)("Horizontal","caliph"),value:"horizontal"}],onChange:e=>t({menuDirection:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Width","caliph"),value:m,onChange:e=>t({menuWidth:e}),units:[{value:"px",label:"px"},{value:"%",label:"%"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Height","caliph"),value:f,onChange:e=>t({menuHeight:e}),units:[{value:"px",label:"px"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Item Spacing","caliph"),value:C,onChange:e=>t({itemSpacing:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]})]}),"tablet"===e.name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Menu Direction","caliph"),value:u,options:[{label:(0,i.__)("Vertical","caliph"),value:"vertical"},{label:(0,i.__)("Horizontal","caliph"),value:"horizontal"}],onChange:e=>t({menuDirectionTablet:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Width","caliph"),value:b,onChange:e=>t({menuWidthTablet:e}),units:[{value:"px",label:"px"},{value:"%",label:"%"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Height","caliph"),value:y,onChange:e=>t({menuHeightTablet:e}),units:[{value:"px",label:"px"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Item Spacing","caliph"),value:j,onChange:e=>t({itemSpacingTablet:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]})]}),"mobile"===e.name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Menu Direction","caliph"),value:x,options:[{label:(0,i.__)("Vertical","caliph"),value:"vertical"},{label:(0,i.__)("Horizontal","caliph"),value:"horizontal"}],onChange:e=>t({menuDirectionMobile:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Width","caliph"),value:v,onChange:e=>t({menuWidthMobile:e}),units:[{value:"px",label:"px"},{value:"%",label:"%"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Menu Height","caliph"),value:_,onChange:e=>t({menuHeightMobile:e}),units:[{value:"px",label:"px"},{value:"auto",label:"auto"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Item Spacing","caliph"),value:S,onChange:e=>t({itemSpacingMobile:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]})]})]})})}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Colors","caliph"),initialOpen:!1,children:[(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Title Color","caliph")}),(0,s.jsx)(a.ColorPalette,{colors:(0,a.useSetting)("color.palette"),value:r,onChange:e=>t({titleColor:e||"var(--wp--preset--color--primary)"}),enableAlpha:!0,clearable:!0})]}),(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Link Color","caliph")}),(0,s.jsx)(a.ColorPalette,{colors:(0,a.useSetting)("color.palette"),value:d,onChange:e=>t({linkColor:e||"var(--wp--preset--color--primary)"}),enableAlpha:!0,clearable:!0})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Container Styling","caliph"),initialOpen:!1,children:[(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Background Color","caliph")}),(0,s.jsx)(a.ColorPalette,{colors:(0,a.useSetting)("color.palette"),value:I,onChange:e=>t({containerBackgroundColor:e||""}),enableAlpha:!0,clearable:!0})]}),(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,i.__)("Border Color","caliph")}),(0,s.jsx)(a.ColorPalette,{colors:(0,a.useSetting)("color.palette"),value:T,onChange:e=>t({containerBorderColor:e||"var(--wp--preset--color--contrast)"}),enableAlpha:!0,clearable:!0})]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Border Width","caliph"),value:N,onChange:e=>t({containerBorderWidth:e}),units:[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Border Radius","caliph"),value:P,onChange:e=>t({containerBorderRadius:e}),units:[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Typography","caliph"),initialOpen:!1,children:[(0,s.jsx)("h4",{children:(0,i.__)("Title Typography","caliph")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Family","caliph"),value:e.titleFontFamily,options:[{label:(0,i.__)("Default","caliph"),value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Helvetica",value:"Helvetica, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times New Roman",value:"Times New Roman, serif"},{label:"Courier New",value:"Courier New, monospace"},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Trebuchet MS",value:"Trebuchet MS, sans-serif"},{label:"Impact",value:"Impact, sans-serif"}],onChange:e=>t({titleFontFamily:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Font Size","caliph"),value:e.titleFontSize,onChange:e=>t({titleFontSize:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"},{value:"%",label:"%"}]}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Weight","caliph"),value:e.titleFontWeight,options:[{label:"100 - Thin",value:"100"},{label:"200 - Extra Light",value:"200"},{label:"300 - Light",value:"300"},{label:"400 - Normal",value:"400"},{label:"500 - Medium",value:"500"},{label:"600 - Semi Bold",value:"600"},{label:"700 - Bold",value:"700"},{label:"800 - Extra Bold",value:"800"},{label:"900 - Black",value:"900"}],onChange:e=>t({titleFontWeight:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Line Height","caliph"),value:e.titleLineHeight,onChange:e=>t({titleLineHeight:e}),units:[{value:"",label:"unitless"},{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"},{value:"%",label:"%"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Letter Spacing","caliph"),value:e.titleLetterSpacing,onChange:e=>t({titleLetterSpacing:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]}),(0,s.jsx)("hr",{style:{margin:"20px 0"}}),(0,s.jsx)("h4",{children:(0,i.__)("Menu Items Typography","caliph")}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Family","caliph"),value:e.menuItemFontFamily,options:[{label:(0,i.__)("Default","caliph"),value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Helvetica",value:"Helvetica, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times New Roman",value:"Times New Roman, serif"},{label:"Courier New",value:"Courier New, monospace"},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Trebuchet MS",value:"Trebuchet MS, sans-serif"},{label:"Impact",value:"Impact, sans-serif"}],onChange:e=>t({menuItemFontFamily:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Font Size","caliph"),value:e.menuItemFontSize,onChange:e=>t({menuItemFontSize:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"},{value:"%",label:"%"}]}),(0,s.jsx)(n.SelectControl,{label:(0,i.__)("Font Weight","caliph"),value:e.menuItemFontWeight,options:[{label:"100 - Thin",value:"100"},{label:"200 - Extra Light",value:"200"},{label:"300 - Light",value:"300"},{label:"400 - Normal",value:"400"},{label:"500 - Medium",value:"500"},{label:"600 - Semi Bold",value:"600"},{label:"700 - Bold",value:"700"},{label:"800 - Extra Bold",value:"800"},{label:"900 - Black",value:"900"}],onChange:e=>t({menuItemFontWeight:e})}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Line Height","caliph"),value:e.menuItemLineHeight,onChange:e=>t({menuItemLineHeight:e}),units:[{value:"",label:"unitless"},{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"},{value:"%",label:"%"}]}),(0,s.jsx)(n.__experimentalUnitControl,{label:(0,i.__)("Letter Spacing","caliph"),value:e.menuItemLetterSpacing,onChange:e=>t({menuItemLetterSpacing:e}),units:[{value:"px",label:"px"},{value:"rem",label:"rem"},{value:"em",label:"em"}]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,i.__)("Menu Items","caliph"),initialOpen:!1,children:[l.map(((e,o)=>(0,s.jsxs)("div",{style:{marginBottom:"16px",padding:"12px",border:"1px solid #ddd",borderRadius:"4px"},children:[(0,s.jsx)(n.TextControl,{label:(0,i.__)("Label","caliph"),value:e.label,onChange:e=>U(o,"label",e)}),(0,s.jsx)(n.TextControl,{label:(0,i.__)("URL","caliph"),value:e.url,onChange:e=>U(o,"url",e)}),(0,s.jsx)(n.Button,{icon:p,label:(0,i.__)("Remove Item","caliph"),onClick:()=>(e=>{const o=l.filter(((t,o)=>o!==e));t({menuItems:o})})(o),isDestructive:!0,variant:"secondary",size:"small"})]},e.id))),(0,s.jsx)(n.Button,{icon:c,onClick:D,variant:"primary",children:(0,i.__)("Add Menu Item","caliph")})]})]}),(0,s.jsx)("div",{className:"responsive-nav-menu-preview","data-menu-direction":g,"data-enable-accordion":w,"data-toggle-position":B,children:(0,s.jsxs)("div",{className:"responsive-nav-menu",style:{width:m,height:f,backgroundColor:I||void 0,borderColor:T||void 0,borderWidth:N||"0px",borderRadius:P||"0px",borderStyle:T&&"0px"!==N?"solid":"none"},children:[(0,s.jsxs)("h3",{className:"menu-title",style:{color:r,fontFamily:F||void 0,fontSize:z,fontWeight:R,lineHeight:$,letterSpacing:H},children:[o,k&&w&&(0,s.jsx)("span",{className:`menu-toggle toggle-${B}`,"aria-hidden":"true",children:"+"})]}),(0,s.jsx)("nav",{className:`menu-items direction-${g}`,style:{gap:C,flexDirection:"horizontal"===g?"row":"column"},children:l.map(((e,t)=>(0,s.jsx)("a",{href:e.url,className:"menu-item",style:{color:d,fontFamily:M||void 0,fontSize:E,fontWeight:L,lineHeight:W,letterSpacing:O},onClick:e=>e.preventDefault(),children:e.label},e.id)))})]})})]})},save:({attributes:e,clientId:t})=>{const{menuTitle:o,menuItems:l,titleColor:i,linkColor:n,menuDirection:r,menuDirectionTablet:c,menuDirectionMobile:p,menuWidth:d,menuWidthTablet:h,menuWidthMobile:g,menuHeight:u,menuHeightTablet:x,menuHeightMobile:m,itemSpacing:b,itemSpacingTablet:v,itemSpacingMobile:f,enableAccordion:y,showToggleIcon:_,toggleIconPosition:C,containerBackgroundColor:j,containerBorderColor:S,containerBorderWidth:w,containerBorderRadius:k,titleFontFamily:B,titleFontSize:I,titleFontWeight:T,titleLineHeight:N,titleLetterSpacing:P,menuItemFontFamily:F,menuItemFontSize:z,menuItemFontWeight:R,menuItemLineHeight:$,menuItemLetterSpacing:H}=e,M=a.useBlockProps.save({className:"caliph-responsive-nav-menu","data-desktop-direction":r,"data-tablet-direction":c,"data-mobile-direction":p,"data-enable-accordion":y,"data-toggle-position":C}),E={"--menu-width":d,"--menu-width-tablet":h,"--menu-width-mobile":g,"--menu-height":u,"--menu-height-tablet":x,"--menu-height-mobile":m,"--item-spacing":b,"--item-spacing-tablet":v,"--item-spacing-mobile":f,backgroundColor:j||void 0,borderColor:S||void 0,borderWidth:w||"0px",borderRadius:k||"0px",borderStyle:S&&"0px"!==w?"solid":"none"};return(0,s.jsx)("div",{...M,style:E,children:(0,s.jsxs)("div",{className:"responsive-nav-menu",children:[(0,s.jsxs)("h3",{className:"menu-title",style:{color:i,fontFamily:B||void 0,fontSize:I,fontWeight:T,lineHeight:N,letterSpacing:P},role:"button",tabIndex:"0","aria-expanded":"false","aria-controls":`menu-items-${t}`,children:[o,_&&y&&(0,s.jsx)("span",{className:`menu-toggle toggle-${C}`,"aria-hidden":"true",children:"+"})]}),(0,s.jsx)("nav",{className:`menu-items direction-${r}`,id:`menu-items-${t}`,role:"region","aria-labelledby":"menu-title",style:{gap:b,flexDirection:"horizontal"===r?"row":"column"},children:l.map((e=>(0,s.jsx)("a",{href:e.url,className:"menu-item",style:{color:n,fontFamily:F||void 0,fontSize:z,fontWeight:R,lineHeight:$,letterSpacing:H},children:e.label},e.id)))})]})})}})},715:e=>{"use strict";e.exports=window.wp.blockEditor},723:e=>{"use strict";e.exports=window.wp.i18n},773:(e,t,o)=>{"use strict";const l=window.wp.hooks;(0,l.addFilter)("blocks.registerBlockType","awp/cover-custom-attribute",(function(e,t){return void 0!==e.attributes&&(e.attributes=Object.assign(e.attributes,{hideOnMobile:{type:"boolean"},hideOnTablet:{type:"boolean"},hideOnDesktop:{type:"boolean"}})),e}));const i=window.wp.compose;var a=o(715),n=o(427),r=o(790);const s=()=>(0,r.jsxs)("svg",{width:"16",height:"16",id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500",children:[(0,r.jsx)("defs",{children:(0,r.jsx)("style",{children:"\n .cls-1 {\n fill: #0056e4;\n stroke-width: 0px;\n }\n "})}),(0,r.jsx)("path",{class:"cls-1",d:"m482.99,251.81c-.48,63.63-26.47,121.18-68.23,162.95-42.17,42.16-100.42,68.24-164.76,68.24H45.41c-5.67,0-9.32-6.02-6.69-11.04l66.26-126.93,50.64,66.22c5.21,6.81,13.54,10.5,22.1,9.76,8.55-.73,16.13-5.79,20.1-13.39l69.33-132.94,62.12,31.26c3.32,1.67,7-1.51,5.83-5.03l-42.58-128.82c-.72-2.19-3.08-3.37-5.27-2.65l-128.83,42.58c-3.53,1.17-3.88,6.01-.57,7.68l64.42,32.41-50.74,97.31-50.63-66.2c-5.21-6.83-13.55-10.5-22.09-9.77-8.56.74-16.14,5.79-20.11,13.39l-47.47,90.95c-3.65,7-14.24,4.4-14.24-3.49V30.6c0-7.51,6.09-13.6,13.6-13.6h217.32c129.15,0,236.06,105.67,235.07,234.81Z"})]}),c=(0,i.createHigherOrderComponent)((e=>t=>{const{attributes:o,setAttributes:l,isSelected:i}=t,{hideOnMobile:c,hideOnTablet:p,hideOnDesktop:d}=o;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e,{...t}),i&&(0,r.jsx)(a.InspectorControls,{children:(0,r.jsxs)(n.PanelBody,{title:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,r.jsx)(s,{}),(0,r.jsx)("span",{children:"Responsive Settings"})]}),initialOpen:!1,className:"caliph-responsive-panel",children:[(0,r.jsx)(n.ToggleControl,{label:wp.i18n.__("Hide on mobile","awp"),checked:!!c,onChange:()=>l({hideOnMobile:!c})}),(0,r.jsx)(n.ToggleControl,{label:wp.i18n.__("Hide on tablet","awp"),checked:!!p,onChange:()=>l({hideOnTablet:!p})}),(0,r.jsx)(n.ToggleControl,{label:wp.i18n.__("Hide on desktop","awp"),checked:!!d,onChange:()=>l({hideOnDesktop:!d})})]})})]})}),"withResponsiveControls");(0,l.addFilter)("editor.BlockEdit","awp/cover-custom-controls",c),(0,l.addFilter)("blocks.getSaveContent.extraProps","awp/cover-apply-class",(function(e,t,o){const{hideOnMobile:l,hideOnTablet:i,hideOnDesktop:a}=o;return void 0!==l&&l&&(e.className=e.className+" hide-on-mobile"),void 0!==i&&i&&(e.className=e.className+" hide-on-tablet"),void 0!==a&&a&&(e.className=e.className+" hide-on-desktop"),e})),(0,l.addFilter)("blocks.registerBlockType","caliph/hover-effect-attributes",((e,t)=>("core/cover"!==t&&"core/image"!==t||(e.attributes={...e.attributes,caliphHoverEffect:{type:"string",default:"none"},caliphHoverIntensity:{type:"number",default:.5},caliphHoverScale:{type:"number",default:1.05},caliphHoverDuration:{type:"number",default:.3}}),e)),20);var p=o(723);const d=()=>(0,r.jsxs)("svg",{width:"16",height:"16",id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500",children:[(0,r.jsx)("defs",{children:(0,r.jsx)("style",{children:"\n .cls-1 {\n fill: #0056e4;\n stroke-width: 0px;\n }\n "})}),(0,r.jsx)("path",{class:"cls-1",d:"m482.99,251.81c-.48,63.63-26.47,121.18-68.23,162.95-42.17,42.16-100.42,68.24-164.76,68.24H45.41c-5.67,0-9.32-6.02-6.69-11.04l66.26-126.93,50.64,66.22c5.21,6.81,13.54,10.5,22.1,9.76,8.55-.73,16.13-5.79,20.1-13.39l69.33-132.94,62.12,31.26c3.32,1.67,7-1.51,5.83-5.03l-42.58-128.82c-.72-2.19-3.08-3.37-5.27-2.65l-128.83,42.58c-3.53,1.17-3.88,6.01-.57,7.68l64.42,32.41-50.74,97.31-50.63-66.2c-5.21-6.83-13.55-10.5-22.09-9.77-8.56.74-16.14,5.79-20.11,13.39l-47.47,90.95c-3.65,7-14.24,4.4-14.24-3.49V30.6c0-7.51,6.09-13.6,13.6-13.6h217.32c129.15,0,236.06,105.67,235.07,234.81Z"})]}),h=(0,i.createHigherOrderComponent)((e=>t=>{const{attributes:o,setAttributes:l,isSelected:i}=t,{caliphHoverEffect:s="none",caliphHoverIntensity:c=.5,caliphHoverScale:p=1.05,caliphHoverDuration:h=.3}=o;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e,{...t}),i&&("core/cover"===t.name||"core/image"===t.name)&&(0,r.jsx)(a.InspectorControls,{children:(0,r.jsxs)(n.PanelBody,{title:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,r.jsx)(d,{}),(0,r.jsx)("span",{children:"Hover Effects"})]}),initialOpen:!0,className:"caliph-hover-panel",children:[(0,r.jsx)(n.SelectControl,{label:"Effect Type",value:s,options:[{label:"None",value:"none"},{label:"Zoom",value:"zoom"},{label:"Fade",value:"fade"},{label:"Grayscale",value:"grayscale"},{label:"Blur",value:"blur"},{label:"Glow",value:"glow"}],onChange:e=>l({caliphHoverEffect:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),"none"!==s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.RangeControl,{label:"Effect Strength",value:c,onChange:e=>l({caliphHoverIntensity:e}),min:.1,max:1,step:.1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,r.jsx)(n.RangeControl,{label:"Duration (seconds)",value:h,onChange:e=>l({caliphHoverDuration:e}),min:.1,max:1,step:.1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),"core/cover"===t.name&&(0,r.jsx)(n.RangeControl,{label:"Zoom Scale",value:p,onChange:e=>l({caliphHoverScale:e}),min:1,max:1.5,step:.05,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})})]})}),"withHoverControls");wp.hooks.addFilter("editor.BlockEdit","caliph/hover-effect-controls",h);var g=o(942),u=o.n(g);const x=(0,i.createHigherOrderComponent)((e=>t=>{const{attributes:o}=t,{caliphHoverEffect:l,caliphHoverIntensity:i=.5,caliphHoverScale:a=1.05,caliphHoverDuration:n=.3}=o,s={...t.wrapperProps,className:u()(t?.wrapperProps?.className,{[`caliph-hover-${l}`]:l&&"none"!==l,"caliph-hover-enabled":!0}),style:{...t.wrapperProps?.style||{},"--caliph-intensity":i,"--caliph-duration":`${n}s`,"--caliph-scale":a}};return(0,r.jsx)(e,{...t,wrapperProps:s})}),"applyHoverClasses");(0,l.addFilter)("editor.BlockListBlock","caliph/hover-effect-classes",x),o(588);const m=(0,r.jsxs)("svg",{width:"16",height:"16",id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500",children:[(0,r.jsx)("defs",{children:(0,r.jsx)("style",{children:"\n .cls-1 {\n fill: #0056e4;\n stroke-width: 0px;\n }\n "})}),(0,r.jsx)("path",{class:"cls-1",d:"m482.99,251.81c-.48,63.63-26.47,121.18-68.23,162.95-42.17,42.16-100.42,68.24-164.76,68.24H45.41c-5.67,0-9.32-6.02-6.69-11.04l66.26-126.93,50.64,66.22c5.21,6.81,13.54,10.5,22.1,9.76,8.55-.73,16.13-5.79,20.1-13.39l69.33-132.94,62.12,31.26c3.32,1.67,7-1.51,5.83-5.03l-42.58-128.82c-.72-2.19-3.08-3.37-5.27-2.65l-128.83,42.58c-3.53,1.17-3.88,6.01-.57,7.68l64.42,32.41-50.74,97.31-50.63-66.2c-5.21-6.83-13.55-10.5-22.09-9.77-8.56.74-16.14,5.79-20.11,13.39l-47.47,90.95c-3.65,7-14.24,4.4-14.24-3.49V30.6c0-7.51,6.09-13.6,13.6-13.6h217.32c129.15,0,236.06,105.67,235.07,234.81Z"})]}),b=(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 512.00 512.00",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[(0,r.jsx)("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),(0,r.jsx)("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#CCCCCC",strokeWidth:"3.072"}),(0,r.jsxs)("g",{id:"SVGRepo_iconCarrier",children:[(0,r.jsx)("g",{id:"Layer_1"}),(0,r.jsx)("g",{id:"Layer_2",children:(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{d:"M274.91,47.78c-97.6,0-179.71,67.5-202.15,158.26L58.79,181.4c-4.36-7.69-14.12-10.39-21.81-6.03 c-7.69,4.36-10.39,14.12-6.03,21.81l37.66,66.44c0,0,0,0.01,0.01,0.01l0.15,0.26c0.19,0.34,0.39,0.66,0.6,0.98 c0.01,0.01,0.02,0.03,0.03,0.04c0.04,0.07,0.09,0.13,0.14,0.19c0.23,0.33,0.46,0.64,0.71,0.95c0.04,0.05,0.07,0.1,0.11,0.15 c0,0,0,0.01,0.01,0.01c0.02,0.02,0.04,0.04,0.06,0.07c0.36,0.44,0.75,0.85,1.15,1.24c0.04,0.04,0.07,0.07,0.11,0.1 c0.25,0.23,0.5,0.46,0.76,0.67c0.05,0.04,0.1,0.08,0.15,0.12c0.35,0.28,0.71,0.55,1.08,0.81c0.03,0.02,0.06,0.04,0.09,0.06 c0.17,0.11,0.35,0.22,0.52,0.33c0.09,0.06,0.18,0.11,0.28,0.17c0.12,0.07,0.25,0.14,0.38,0.21c0.11,0.06,0.22,0.12,0.33,0.17 c0.2,0.1,0.39,0.2,0.59,0.3c0.11,0.05,0.22,0.1,0.33,0.15c0,0,0.01,0,0.01,0.01c0.12,0.05,0.24,0.11,0.36,0.16 c0.33,0.14,0.66,0.26,1,0.37c0.04,0.02,0.09,0.03,0.13,0.04c0.02,0.01,0.03,0.01,0.05,0.02c0.15,0.05,0.31,0.09,0.47,0.14 c0.29,0.09,0.59,0.16,0.89,0.23c0.08,0.02,0.15,0.04,0.23,0.06c0.07,0.02,0.14,0.03,0.22,0.05c0.44,0.09,0.89,0.15,1.33,0.2 c0.04,0,0.07,0.01,0.11,0.02c0.08,0.01,0.15,0.01,0.23,0.02c0.49,0.05,0.98,0.08,1.48,0.08c0.42,0,0.84-0.02,1.26-0.06 c0.07-0.01,0.14-0.01,0.21-0.02c0.01,0,0.03,0,0.04,0c0.06-0.01,0.12-0.01,0.19-0.02c0.28-0.03,0.55-0.07,0.83-0.11 c0.08-0.01,0.16-0.02,0.24-0.04c0.13-0.02,0.25-0.04,0.38-0.07c0.06-0.01,0.12-0.03,0.19-0.04c0.4-0.09,0.81-0.19,1.21-0.31 c0.1-0.03,0.2-0.06,0.3-0.09c0.11-0.03,0.21-0.07,0.32-0.11c0.14-0.05,0.28-0.1,0.42-0.15c0.17-0.06,0.33-0.12,0.5-0.19 c0.1-0.04,0.2-0.09,0.3-0.13c0.13-0.06,0.26-0.12,0.39-0.18c0.19-0.09,0.37-0.19,0.56-0.28c0.13-0.07,0.25-0.13,0.38-0.2 c0.28-0.15,0.55-0.33,0.82-0.5c0.15-0.09,0.3-0.18,0.45-0.28c0.06-0.04,0.11-0.08,0.17-0.12c0.17-0.12,0.34-0.25,0.5-0.38 c0.06-0.04,0.12-0.09,0.18-0.13c0.11-0.09,0.23-0.17,0.34-0.26c0,0,0.01-0.01,0.01-0.01l59.04-48.93 c6.8-5.64,7.75-15.72,2.11-22.53c-5.64-6.8-15.73-7.75-22.53-2.11l-28.84,23.9c17.18-79.28,87.87-138.87,172.22-138.87 c97.17,0,176.22,79.05,176.22,176.22s-79.05,176.22-176.22,176.22c-8.84,0-16,7.16-16,16s7.16,16,16,16 c114.81,0,208.22-93.41,208.22-208.22S389.72,47.78,274.91,47.78z"}),(0,r.jsx)("path",{d:"M274.91,147.61c-8.84,0-16,7.16-16,16V256c0,8.84,7.16,16,16,16h75.87c8.84,0,16-7.16,16-16s-7.16-16-16-16 h-59.87v-76.39C290.91,154.77,283.74,147.61,274.91,147.61z"})]})})]})]}),v=(0,i.createHigherOrderComponent)((e=>t=>{const{attributes:o,setAttributes:l,isSelected:i}=t,{caliphFilterBlur:s=0,caliphFilterBrightness:c=1,caliphFilterContrast:d=1,caliphFilterHueRotate:h=0,caliphFilterSaturate:g=1,caliphFilterSepia:u=0,caliphFilterInvert:x=0,caliphFilterOpacity:v=1,caliphFilterGrayscale:f=0}=o,y=(e,t)=>{l({[e]:t})},_=(e,o)=>{l({[e]:o}),setTimeout((()=>{const l=new CustomEvent("caliphFilterReset",{detail:{clientId:t.clientId,filterType:e,value:o}});document.dispatchEvent(l)}),10)},C=(e,t)=>e.toString(),j=(e,t,o)=>{let l;switch(o){case"blur":case"hue-rotate":default:l=parseFloat(t)||0;break;case"percentage":l=parseFloat(t)/100||0}y(e,l)},S=0!==s||1!==c||1!==d||0!==h||1!==g||0!==u||0!==x||1!==v||0!==f;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e,{...t}),i&&["core/image","core/cover","core/gallery"].includes(t.name)&&(0,r.jsx)(a.InspectorControls,{children:(0,r.jsx)(n.PanelBody,{title:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"13px",fontWeight:"500"},children:[m,(0,r.jsx)("span",{children:(0,p.__)("Image Filters","caliph")}),S&&(0,r.jsx)("span",{style:{backgroundColor:"#007cba",color:"white",borderRadius:"10px",padding:"2px 6px",fontSize:"10px",fontWeight:"600"},children:"Active"})]}),initialOpen:S,className:"caliph-filter-panel",children:(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"16px",padding:"8px 0"},children:[S&&(0,r.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",padding:"4px 0",marginBottom:"12px"},children:(0,r.jsxs)("button",{type:"button",onClick:()=>{l({caliphFilterBlur:0,caliphFilterBrightness:1,caliphFilterContrast:1,caliphFilterHueRotate:0,caliphFilterSaturate:1,caliphFilterSepia:0,caliphFilterInvert:0,caliphFilterOpacity:1,caliphFilterGrayscale:0}),setTimeout((()=>{const e=new CustomEvent("caliphFiltersReset",{detail:{clientId:t.clientId}});document.dispatchEvent(e)}),10)},style:{background:"none",border:"1px solid #dcdcde",borderRadius:"3px",padding:"4px 8px",fontSize:"11px",fontWeight:"400",color:"#646970",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px",transition:"all 0.2s ease",minHeight:"24px"},onMouseEnter:e=>{e.target.style.background="#f0f0f1",e.target.style.borderColor="#8c8f94",e.target.style.color="#50575e"},onMouseLeave:e=>{e.target.style.background="none",e.target.style.borderColor="#dcdcde",e.target.style.color="#646970"},"aria-label":(0,p.__)("Reset all filters","caliph"),title:(0,p.__)("Reset all filters","caliph"),children:[b,(0,p.__)("Reset All","caliph")]})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"blur"}),0!==s&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterBlur",0),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset blur filter","caliph"),title:(0,p.__)("Reset blur filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(s)})]}),value:s,onChange:e=>y("caliphFilterBlur",e),min:0,max:20,step:.1,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(s),onChange:e=>j("caliphFilterBlur",e.target.value,"blur")}})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"brightness"}),1!==c&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterBrightness",1),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset brightness filter","caliph"),title:(0,p.__)("Reset brightness filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(c)})]}),value:c,onChange:e=>y("caliphFilterBrightness",e),min:0,max:3,step:.1,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(c),onChange:e=>j("caliphFilterBrightness",e.target.value,"default")}})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"contrast"}),1!==d&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterContrast",1),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset contrast filter","caliph"),title:(0,p.__)("Reset contrast filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(d)})]}),value:d,onChange:e=>y("caliphFilterContrast",e),min:0,max:3,step:.1,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(d),onChange:e=>j("caliphFilterContrast",e.target.value,"default")}})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"grayscale"}),0!==f&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterGrayscale",0),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset grayscale filter","caliph"),title:(0,p.__)("Reset grayscale filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(f)})]}),value:f,onChange:e=>y("caliphFilterGrayscale",e),min:0,max:1,step:.01,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(f),onChange:e=>j("caliphFilterGrayscale",e.target.value,"percentage")}})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"hue-rotate"}),0!==h&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterHueRotate",0),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset hue-rotate filter","caliph"),title:(0,p.__)("Reset hue-rotate filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(h)})]}),value:h,onChange:e=>y("caliphFilterHueRotate",e),min:0,max:360,step:1,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(h),onChange:e=>j("caliphFilterHueRotate",e.target.value,"hue-rotate")}})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"invert"}),0!==x&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterInvert",0),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset invert filter","caliph"),title:(0,p.__)("Reset invert filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(x)})]}),value:x,onChange:e=>y("caliphFilterInvert",e),min:0,max:1,step:.01,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(x),onChange:e=>j("caliphFilterInvert",e.target.value,"percentage")}})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"opacity"}),1!==v&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterOpacity",1),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset opacity filter","caliph"),title:(0,p.__)("Reset opacity filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(v)})]}),value:v,onChange:e=>y("caliphFilterOpacity",e),min:0,max:1,step:.01,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(v),onChange:e=>j("caliphFilterOpacity",e.target.value,"default")}})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"saturate"}),1!==g&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterSaturate",1),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset saturate filter","caliph"),title:(0,p.__)("Reset saturate filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(g)})]}),value:g,onChange:e=>y("caliphFilterSaturate",e),min:0,max:3,step:.1,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(g),onChange:e=>j("caliphFilterSaturate",e.target.value,"default")}})}),(0,r.jsx)("div",{className:"caliph-filter-control",children:(0,r.jsx)(n.RangeControl,{label:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",fontWeight:"500",textTransform:"lowercase"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,r.jsx)("span",{children:"sepia"}),0!==u&&(0,r.jsx)("button",{type:"button",style:{background:"none",border:"none",color:"#666",cursor:"pointer",padding:"2px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s, background-color 0.2s",minWidth:"16px",minHeight:"16px"},onClick:()=>_("caliphFilterSepia",0),onMouseEnter:e=>{e.target.style.color="#007cba",e.target.style.backgroundColor="#f0f0f1"},onMouseLeave:e=>{e.target.style.color="#666",e.target.style.backgroundColor="transparent"},"aria-label":(0,p.__)("Reset sepia filter","caliph"),title:(0,p.__)("Reset sepia filter","caliph"),children:b})]}),(0,r.jsx)("span",{style:{color:"#666",fontFamily:"monospace",fontSize:"11px"},children:C(u)})]}),value:u,onChange:e=>y("caliphFilterSepia",e),min:0,max:1,step:.01,withInputField:!0,className:"caliph-range-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,inputProps:{value:C(u),onChange:e=>j("caliphFilterSepia",e.target.value,"percentage")}})})]})})})]})}),"withImageFilterControls");"undefined"!=typeof wp&&wp.hooks&&wp.hooks.addFilter("editor.BlockEdit","caliph/image-filter-controls",v);const f=(0,i.createHigherOrderComponent)((e=>t=>{const{attributes:o,name:l,clientId:i}=t;if("core/image"!==l)return(0,r.jsx)(e,{...t});const{caliphFilterBlur:a=0,caliphFilterBrightness:n=1,caliphFilterContrast:s=1,caliphFilterHueRotate:c=0,caliphFilterSaturate:p=1,caliphFilterSepia:d=0,caliphFilterInvert:h=0,caliphFilterOpacity:g=1,caliphFilterGrayscale:u=0}=o,x=[];a&&a>0&&x.push(`blur(${a}px)`),n&&1!==n&&x.push(`brightness(${n})`),s&&1!==s&&x.push(`contrast(${s})`),u&&u>0&&x.push(`grayscale(${u})`),c&&c>0&&x.push(`hue-rotate(${c}deg)`),h&&h>0&&x.push(`invert(${h})`),p&&1!==p&&x.push(`saturate(${p})`),d&&d>0&&x.push(`sepia(${d})`);const m=x.join(" "),b={...t.wrapperProps,style:{...t.wrapperProps?.style||{},filter:m||void 0,opacity:g||void 0}};return(0,r.jsx)(e,{...t,wrapperProps:b})}),"withEditorImageFilters");"undefined"!=typeof wp&&wp.hooks&&(0,l.addFilter)("blocks.getSaveContent.extraProps","caliph/frontend-image-filter",((e,t,o)=>{const{caliphFilterBlur:l=0,caliphFilterBrightness:i=1,caliphFilterContrast:a=1,caliphFilterHueRotate:n=0,caliphFilterSaturate:r=1,caliphFilterSepia:s=0,caliphFilterInvert:c=0,caliphFilterOpacity:p=1,caliphFilterGrayscale:d=0}=o;if(!(l&&l>0||i&&1!==i||a&&1!==a||n&&n>0||r&&1!==r||s&&s>0||c&&c>0||p&&p<1||d&&d>0))return e;const h=["caliph-has-filter"];l&&l>0&&h.push("caliph-filter-blur"),i&&1!==i&&h.push("caliph-filter-brightness"),a&&1!==a&&h.push("caliph-filter-contrast"),n&&n>0&&h.push("caliph-filter-hue-rotate"),r&&1!==r&&h.push("caliph-filter-saturate"),s&&s>0&&h.push("caliph-filter-sepia"),c&&c>0&&h.push("caliph-filter-invert"),p&&p<1&&h.push("caliph-filter-opacity"),d&&d>0&&h.push("caliph-filter-grayscale");const g=[e.className,h.join(" ")].filter(Boolean).join(" ");return{...e,className:g,"data-caliph-filter":JSON.stringify({blur:l||0,brightness:i||1,contrast:a||1,hueRotate:n||0,saturate:r||1,sepia:s||0,invert:c||0,opacity:p||1,grayscale:d||0})}})),(0,l.addFilter)("editor.BlockListBlock","caliph/editor-image-filters",f);const y=window.wp.plugins,_=window.wp.editSite,C=window.wp.data,j=()=>(0,r.jsxs)("svg",{width:"16",height:"16",id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500",children:[(0,r.jsx)("defs",{children:(0,r.jsx)("style",{children:"\n .cls-1 {\n fill: #0056e4;\n stroke-width: 0px;\n }\n "})}),(0,r.jsx)("path",{class:"cls-1",d:"m482.99,251.81c-.48,63.63-26.47,121.18-68.23,162.95-42.17,42.16-100.42,68.24-164.76,68.24H45.41c-5.67,0-9.32-6.02-6.69-11.04l66.26-126.93,50.64,66.22c5.21,6.81,13.54,10.5,22.1,9.76,8.55-.73,16.13-5.79,20.1-13.39l69.33-132.94,62.12,31.26c3.32,1.67,7-1.51,5.83-5.03l-42.58-128.82c-.72-2.19-3.08-3.37-5.27-2.65l-128.83,42.58c-3.53,1.17-3.88,6.01-.57,7.68l64.42,32.41-50.74,97.31-50.63-66.2c-5.21-6.83-13.55-10.5-22.09-9.77-8.56.74-16.14,5.79-20.11,13.39l-47.47,90.95c-3.65,7-14.24,4.4-14.24-3.49V30.6c0-7.51,6.09-13.6,13.6-13.6h217.32c129.15,0,236.06,105.67,235.07,234.81Z"})]});(0,y.registerPlugin)("caliph-theme-settings",{icon:(0,r.jsx)(j,{}),render:()=>{const e=(0,C.useSelect)((e=>e("core").getEntityRecord("root","site")?.caliph_scroll_top||!1)),t=(0,C.useSelect)((e=>!1!==e("core").getEntityRecord("root","site")?.caliph_hover_effects)),{editEntityRecord:o,saveEditedEntityRecord:l}=(0,C.useDispatch)("core");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_.PluginSidebarMoreMenuItem,{target:"caliph-theme-settings",icon:(0,r.jsx)(j,{}),children:(0,p.__)("Caliph Settings","caliph")}),(0,r.jsx)(_.PluginSidebar,{name:"caliph-theme-settings",title:(0,p.__)("Caliph Settings","caliph"),icon:(0,r.jsx)(j,{}),children:(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Feature Options","caliph"),initialOpen:!0,children:[(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Enable Scroll to Top Button","caliph"),help:(0,p.__)("Show a button to scroll back to the top of the page","caliph"),checked:e,onChange:async e=>{await o("root","site",void 0,{caliph_scroll_top:e}),await l("root","site",void 0)}}),(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Enable Hover Effects","caliph"),help:(0,p.__)("Enable smooth hover animations and effects for interactive elements like cards and buttons","caliph"),checked:t,onChange:async e=>{await o("root","site",void 0,{caliph_hover_effects:e}),await l("root","site",void 0),document.documentElement.style.setProperty("--caliph-hover-effects-enabled",e?"1":"0")}})]})})]})}});var S=o(997);const w=window.wp.element;var k=o(573);const B=(0,r.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(k.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),I=(0,r.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(k.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})}),T={geometric:{label:(0,p.__)("Geometric","caliph"),symbols:["●","○","◆","◇","■","□","▲","△","▼","▽","◀","▶","◁","▷","★","☆","✦","✧","✩","✪","✫","✬","✭","✮","✯","✰","✱","✲","✳","✴","✵","✶","✷","✸","✹","✺","✻","✼","✽","✾"]},arrows:{label:(0,p.__)("Arrows","caliph"),symbols:["→","←","↑","↓","↔","↕","↖","↗","↘","↙","⇒","⇐","⇑","⇓","⇔","⇕","⇖","⇗","⇘","⇙","➤","➥","➦","➧","➨","➩","➪","➫","➬","➭","➮","➯","➰","➱","➲","➳","➴","➵","➶","➷"]},decorative:{label:(0,p.__)("Decorative","caliph"),symbols:["❀","❁","❂","❃","❄","❅","❆","❇","❈","❉","❊","❋","❌","❍","❎","❏","❐","❑","❒","❓","❔","❕","❖","❗","❘","❙","❚","❛","❜","❝","❞","❟","❠","❡","❢","❣","❤","❥","❦","❧"]},symbols:{label:(0,p.__)("Symbols","caliph"),symbols:["♠","♣","♥","♦","♤","♧","♡","♢","♩","♪","♫","♬","♭","♮","♯","♰","♱","♲","♳","♴","♵","♶","♷","♸","♹","♺","♻","♼","♽","♾","♿","⚀","⚁","⚂","⚃","⚄","⚅","⚆","⚇","⚈"]},punctuation:{label:(0,p.__)("Punctuation","caliph"),symbols:["•","‣","⁃","◦","‰","‱","′","″","‴","‵","‶","‷","‸","‹","›","‼","‽","‾","‿","⁀","⁁","⁂","⁃","⁄","⁅","⁆","⁇","⁈","⁉","⁊","⁋","⁌","⁍","⁎","⁏","⁐","⁑","⁒","⁓","⁔"]},mathematical:{label:(0,p.__)("Mathematical","caliph"),symbols:["±","×","÷","∞","∝","∟","∠","∡","∢","∣","∤","∥","∦","∧","∨","∩","∪","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁"]},currency:{label:(0,p.__)("Currency","caliph"),symbols:["$","¢","£","¤","¥","₦","€","₹","₽","₩","₪","₫","₨","₱","₡","₵","₸","₴","₶","₷","₺","₻","₼","₽","₾","₿","$","¢","£","¬"," ̄","¦","¥","₩","￧","│","←","↑","→","↓"]},weather:{label:(0,p.__)("Weather","caliph"),symbols:["☀","☁","☂","☃","☄","★","☆","☇","☈","☉","☊","☋","☌","☍","☎","☏","☐","☑","☒","☓","☔","☕","☖","☗","☘","☙","☚","☛","☜","☝","☞","☟","☠","☡","☢","☣","☤","☥","☦","☧"]},zodiac:{label:(0,p.__)("Zodiac","caliph"),symbols:["♈","♉","♊","♋","♌","♍","♎","♏","♐","♑","♒","♓","⛎","♔","♕","♖","♗","♘","♙","♚","♛","♜","♝","♞","♟","♠","♡","♢","♣","♤","♥","♦","♧","♨","♩","♪","♫","♬","♭","♮"]},misc:{label:(0,p.__)("Miscellaneous","caliph"),symbols:["©","®","™","℠","℡","™","℣","ℤ","℥","Ω","℧","ℨ","℩","K","Å","ℬ","ℭ","℮","ℯ","ℰ","ℱ","Ⅎ","ℳ","ℴ","ℵ","ℶ","ℷ","ℸ","ℹ","℺","℻","ℼ","ℽ","ℾ","ℿ","⅀","⅁","⅂","⅃","⅄"]}},N=["✦","●","★","→","•","◆","▶","❤","✓","×","♦","◇","▲","►","♠","♣","♥","♪","☆","✨"],P="caliph_marquee_recent_symbols",F=()=>{try{const e=localStorage.getItem(P);return e?JSON.parse(e):[]}catch(e){return[]}},z=({value:e,onChange:t,size:o="1em",onSizeChange:l,style:i="normal",onStyleChange:a,color:s="",onColorChange:c,weight:d="normal",onWeightChange:h,label:g=(0,p.__)("Select Symbol","caliph")})=>{const[u,x]=(0,w.useState)(!1),[m,b]=(0,w.useState)(""),[v,f]=(0,w.useState)("popular"),[y,_]=(0,w.useState)([]),[C,j]=(0,w.useState)([]);(0,w.useEffect)((()=>{_(F());try{const e=localStorage.getItem("caliph_marquee_favorite_symbols");e&&j(JSON.parse(e))}catch(e){}}),[]);const S=e=>{t(e),(e=>{try{let t=F();t=t.filter((t=>t!==e)),t.unshift(e),t=t.slice(0,20),localStorage.setItem(P,JSON.stringify(t))}catch(e){}})(e),_(F()),x(!1)},k=(t,o=!1)=>t&&0!==t.length?(0,r.jsx)("div",{className:"caliph-symbol-grid",children:t.map(((t,l)=>(0,r.jsx)(n.Tooltip,{text:t,children:(0,r.jsxs)("div",{className:"caliph-symbol-item",children:[(0,r.jsx)(n.Button,{className:"caliph-symbol-button "+(e===t?"is-selected":""),onClick:()=>S(t),style:{fontSize:"1.2em",fontWeight:d,fontStyle:i,color:s||"inherit"},children:t}),o&&(0,r.jsx)(n.Button,{className:"caliph-symbol-favorite",icon:C.includes(t)?B:I,onClick:()=>(e=>{const t=C.includes(e)?C.filter((t=>t!==e)):[...C,e];j(t);try{localStorage.setItem("caliph_marquee_favorite_symbols",JSON.stringify(t))}catch(e){}})(t),size:"small"})]})},`${t}-${l}`)))}):(0,r.jsx)("div",{className:"caliph-symbol-grid-empty",children:(0,r.jsx)("p",{children:(0,p.__)("No symbols found.","caliph")})}),z=m?(e=>{if(!e||e.length<1)return[];const t=[],o=e.toLowerCase();return Object.entries(T).forEach((([l,i])=>{i.symbols.forEach((a=>{(a.includes(e)||l.toLowerCase().includes(o)||i.label.toLowerCase().includes(o))&&t.push({symbol:a,category:i.label,categoryKey:l})}))})),t})(m):[],R=[{name:"popular",title:(0,p.__)("Popular","caliph"),content:k(N,!0)},{name:"recent",title:(0,p.__)("Recent","caliph"),content:k(y,!0)},{name:"favorites",title:(0,p.__)("Favorites","caliph"),content:k(C,!0)},...Object.entries(T).map((([e,t])=>({name:e,title:t.label,content:k(t.symbols,!0)})))];return(0,r.jsxs)("div",{className:"caliph-symbol-selector",children:[(0,r.jsxs)(n.Flex,{align:"center",gap:3,children:[(0,r.jsx)(n.FlexItem,{children:(0,r.jsx)(n.Button,{variant:"secondary",onClick:()=>x(!0),className:"caliph-symbol-current",style:{fontSize:o,fontWeight:d,fontStyle:i,color:s||"inherit",minWidth:"40px",height:"40px"},children:e||"✦"})}),(0,r.jsx)(n.FlexBlock,{children:(0,r.jsxs)(n.__experimentalVStack,{spacing:2,children:[(0,r.jsx)("label",{className:"caliph-symbol-label",children:g}),(0,r.jsxs)(n.__experimentalHStack,{children:[(0,r.jsx)(n.Button,{variant:"tertiary",size:"small",onClick:()=>x(!0),children:(0,p.__)("Browse Symbols","caliph")}),(0,r.jsx)(n.Button,{variant:"tertiary",size:"small",onClick:()=>t(""),disabled:!e,children:(0,p.__)("Clear","caliph")})]})]})})]}),(0,r.jsxs)(n.__experimentalVStack,{spacing:3,className:"caliph-symbol-customization",children:[(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Size","caliph"),value:parseFloat(o),onChange:e=>l(`${e}em`),min:.5,max:3,step:.1,initialPosition:1}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Style","caliph"),value:i,onChange:a,options:[{label:(0,p.__)("Normal","caliph"),value:"normal"},{label:(0,p.__)("Italic","caliph"),value:"italic"},{label:(0,p.__)("Oblique","caliph"),value:"oblique"}]}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Weight","caliph"),value:d,onChange:h,options:[{label:(0,p.__)("Light","caliph"),value:"300"},{label:(0,p.__)("Normal","caliph"),value:"normal"},{label:(0,p.__)("Medium","caliph"),value:"500"},{label:(0,p.__)("Semi Bold","caliph"),value:"600"},{label:(0,p.__)("Bold","caliph"),value:"bold"},{label:(0,p.__)("Extra Bold","caliph"),value:"800"}]}),(0,r.jsxs)("div",{className:"caliph-symbol-color",children:[(0,r.jsx)("label",{children:(0,p.__)("Color","caliph")}),(0,r.jsx)(n.ColorPicker,{color:s,onChange:c,enableAlpha:!0}),s&&(0,r.jsx)(n.Button,{variant:"tertiary",size:"small",onClick:()=>c(""),children:(0,p.__)("Reset Color","caliph")})]})]}),u&&(0,r.jsx)(n.Modal,{title:(0,p.__)("Select Symbol","caliph"),onRequestClose:()=>x(!1),className:"caliph-symbol-modal",size:"large",children:(0,r.jsxs)(n.__experimentalVStack,{spacing:4,children:[(0,r.jsx)(n.SearchControl,{value:m,onChange:b,placeholder:(0,p.__)("Search symbols...","caliph")}),m&&(0,r.jsxs)("div",{className:"caliph-symbol-search-results",children:[(0,r.jsx)("h3",{children:(0,p.__)("Search Results","caliph")}),k(z.map((e=>e.symbol)),!0)]}),!m&&(0,r.jsx)(n.TabPanel,{className:"caliph-symbol-tabs",activeClass:"is-active",tabs:R,initialTabName:v,onSelect:e=>f(e),children:e=>(0,r.jsx)("div",{className:"caliph-symbol-tab-content",children:e.content})}),(0,r.jsxs)("div",{className:"caliph-symbol-custom",children:[(0,r.jsx)("h3",{children:(0,p.__)("Custom Symbol","caliph")}),(0,r.jsxs)(n.Flex,{align:"center",gap:2,children:[(0,r.jsx)(n.FlexBlock,{children:(0,r.jsx)("input",{type:"text",placeholder:(0,p.__)("Enter custom symbol...","caliph"),className:"caliph-symbol-custom-input",onKeyPress:e=>{"Enter"===e.key&&e.target.value.trim()&&S(e.target.value.trim())}})}),(0,r.jsx)(n.FlexItem,{children:(0,r.jsx)(n.Button,{variant:"secondary",onClick:e=>{const t=e.target.closest(".caliph-symbol-custom").querySelector("input");t.value.trim()&&S(t.value.trim())},children:(0,p.__)("Use","caliph")})})]})]})]})})]})},R=({attributes:e,setAttributes:t})=>{const{content:o,textSegments:l=[],segmentSeparator:i="✦",separatorSize:s="1em",separatorStyle:c="normal",separatorColor:d="",separatorWeight:h="normal",segmentGap:g="40px",useSegmentMode:u=!1,displayMode:x,logoImages:m,imageHeight:b,imageSpacing:v,speed:f,direction:y,backgroundColor:_,textColor:C,pauseOnHover:j,fontSize:S,fontWeight:k,padding:B}=e,[I,T]=(0,w.useState)(o||""),[N,P]=(0,w.useState)(!1),[F,R]=(0,w.useState)([]),[$,H]=(0,w.useState)(null),[M,E]=(0,w.useState)(""),L=()=>{if(!M.trim())return;const e={id:Math.max(0,...l.map((e=>e.id)))+1,text:M.trim(),enabled:!0};t({textSegments:[...l,e]}),E("")},W=(e,o)=>{const i=l.map((t=>t.id===e?{...t,text:o}:t));t({textSegments:i}),H(null)},O=[{name:(0,p.__)("Small","caliph"),slug:"small",size:"14px"},{name:(0,p.__)("Normal","caliph"),slug:"normal",size:"16px"},{name:(0,p.__)("Medium","caliph"),slug:"medium",size:"20px"},{name:(0,p.__)("Large","caliph"),slug:"large",size:"24px"},{name:(0,p.__)("Extra Large","caliph"),slug:"extra-large",size:"32px"}],A=[{label:(0,p.__)("Normal","caliph"),value:"normal"},{label:(0,p.__)("Bold","caliph"),value:"bold"},{label:(0,p.__)("Light","caliph"),value:"300"},{label:(0,p.__)("Medium","caliph"),value:"500"},{label:(0,p.__)("Semi Bold","caliph"),value:"600"},{label:(0,p.__)("Extra Bold","caliph"),value:"800"}];return(0,r.jsxs)(a.InspectorControls,{children:[(0,r.jsx)(n.PanelBody,{title:(0,p.__)("Display Mode","caliph"),className:"caliph-display-panel",initialOpen:!0,children:(0,r.jsxs)("div",{style:{background:"#f8fafc",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",margin:"0 0 16px 0"},children:[(0,r.jsx)("h4",{style:{margin:"0 0 12px 0",color:"#334155",fontSize:"13px",fontWeight:"500"},children:"Content Type"}),(0,r.jsxs)(n.ButtonGroup,{children:[(0,r.jsx)(n.Button,{isPrimary:"text"===x,isSecondary:"text"!==x,onClick:()=>t({displayMode:"text"}),style:{background:"text"===x?"#1e293b":"transparent",color:"text"===x?"#ffffff":"#64748b",border:"1px solid #e2e8f0",borderRadius:"4px"},children:(0,p.__)("Text","caliph")}),(0,r.jsx)(n.Button,{isPrimary:"images"===x,isSecondary:"images"!==x,onClick:()=>t({displayMode:"images"}),style:{background:"images"===x?"#1e293b":"transparent",color:"images"===x?"#ffffff":"#64748b",border:"1px solid #e2e8f0",borderRadius:"4px"},children:(0,p.__)("Images","caliph")})]})]})}),"text"===x&&(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Text Content Mode","caliph"),className:"caliph-text-mode-panel",initialOpen:!0,children:[(0,r.jsxs)("div",{style:{background:"#f8fafc",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",margin:"0 0 16px 0"},children:[(0,r.jsx)("h4",{style:{margin:"0 0 8px 0",color:"#334155",fontSize:"13px",fontWeight:"500"},children:"Text Segments Configuration"}),(0,r.jsx)("p",{style:{margin:"0",color:"#64748b",fontSize:"12px"},children:(0,p.__)("Create and manage text segments for your marquee display","caliph")})]}),(0,r.jsxs)("div",{style:{background:"#ffffff",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",margin:"0 0 16px 0"},children:[(0,r.jsx)("h4",{style:{margin:"0 0 12px 0",color:"#334155",fontSize:"13px",fontWeight:"500"},children:"Segment Settings"}),(0,r.jsx)("div",{style:{marginBottom:"16px"},children:(0,r.jsx)(z,{value:i,onChange:e=>t({segmentSeparator:e}),size:s,onSizeChange:e=>t({separatorSize:e}),style:c,onStyleChange:e=>t({separatorStyle:e}),color:d,onColorChange:e=>t({separatorColor:e}),weight:h,onWeightChange:e=>t({separatorWeight:e}),label:(0,p.__)("Separator Symbol","caliph")})}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{style:{display:"block",marginBottom:"8px",fontSize:"12px",fontWeight:"500",color:"#64748b"},children:(0,p.__)("Gap Between Segments","caliph")}),(0,r.jsx)("input",{type:"text",value:g,onChange:e=>t({segmentGap:e.target.value}),style:{width:"100%",padding:"8px 12px",border:"1px solid #e2e8f0",borderRadius:"4px",fontSize:"14px"},placeholder:"40px"})]}),0===l.length&&(0,r.jsxs)("div",{style:{background:"#f0fdf4",border:"1px solid #22c55e",borderRadius:"6px",padding:"12px",marginBottom:"16px",textAlign:"center"},children:[(0,r.jsx)("h5",{style:{margin:"0 0 8px 0",fontSize:"12px",fontWeight:"600",color:"#15803d"},children:(0,p.__)("Quick Start","caliph")}),(0,r.jsx)("p",{style:{margin:"0 0 8px 0",fontSize:"11px",color:"#16a34a"},children:(0,p.__)("Load sample healthcare marquee text","caliph")}),(0,r.jsx)(n.Button,{isPrimary:!0,onClick:()=>{t({textSegments:[{id:1,text:"BOOK FOR ONLINE APPOINTMENT",enabled:!0},{id:2,text:"PROFESSIONAL HEALTHCARE SERVICES",enabled:!0},{id:3,text:"24/7 EMERGENCY SUPPORT",enabled:!0},{id:4,text:"EXPERT MEDICAL CONSULTATIONS",enabled:!0},{id:5,text:"MODERN FACILITIES & EQUIPMENT",enabled:!0},{id:6,text:"TRUSTED BY THOUSANDS OF PATIENTS",enabled:!0}],useSegmentMode:!0,segmentSeparator:"✦",segmentGap:"40px"})},style:{background:"#22c55e",border:"none",borderRadius:"4px",padding:"6px 12px",fontSize:"11px"},children:(0,p.__)("Load Sample Text","caliph")})]}),(0,r.jsxs)("div",{style:{background:"#f0f9ff",border:"1px solid #0ea5e9",borderRadius:"6px",padding:"12px",marginBottom:"16px"},children:[(0,r.jsx)("h5",{style:{margin:"0 0 8px 0",fontSize:"12px",fontWeight:"600",color:"#0369a1"},children:(0,p.__)("Add New Segment","caliph")}),(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,r.jsx)("input",{type:"text",value:M,onChange:e=>E(e.target.value),placeholder:(0,p.__)("Enter segment text...","caliph"),style:{flex:1,padding:"8px 12px",border:"1px solid #0ea5e9",borderRadius:"4px",fontSize:"13px"},onKeyPress:e=>{"Enter"===e.key&&L()}}),(0,r.jsx)(n.Button,{isPrimary:!0,onClick:L,disabled:!M.trim(),style:{background:"#0369a1",border:"none",borderRadius:"4px",padding:"8px 16px",fontSize:"12px"},children:(0,p.__)("Add Text","caliph")})]})]}),l.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"12px"},children:[(0,r.jsxs)("h5",{style:{margin:"0",fontSize:"12px",fontWeight:"600",color:"#334155"},children:[(0,p.__)("Text Segments","caliph")," (",l.length,")"]}),(0,r.jsx)(n.Button,{isDestructive:!0,isSmall:!0,onClick:()=>t({textSegments:[]}),style:{background:"#dc2626",border:"none",borderRadius:"4px",padding:"4px 8px",fontSize:"11px",color:"#ffffff"},children:(0,p.__)("Clear All","caliph")})]}),(0,r.jsx)("div",{style:{maxHeight:"300px",overflowY:"auto"},children:l.map(((e,o)=>(0,r.jsx)("div",{style:{background:e.enabled?"#ffffff":"#f8fafc",border:"1px solid "+(e.enabled?"#e2e8f0":"#cbd5e1"),borderRadius:"6px",padding:"12px",marginBottom:"8px",opacity:e.enabled?1:.6},children:$===e.id?(0,r.jsxs)("div",{children:[(0,r.jsx)("input",{type:"text",defaultValue:e.text,autoFocus:!0,style:{width:"100%",padding:"6px 8px",border:"1px solid #0ea5e9",borderRadius:"4px",fontSize:"13px",marginBottom:"8px"},onKeyPress:t=>{"Enter"===t.key&&W(e.id,t.target.value)},onBlur:t=>{W(e.id,t.target.value)}}),(0,r.jsxs)("div",{style:{display:"flex",gap:"6px"},children:[(0,r.jsx)(n.Button,{isSmall:!0,isPrimary:!0,onClick:t=>{const o=t.target.closest("div").previousElementSibling;W(e.id,o.value)},children:(0,p.__)("Save","caliph")}),(0,r.jsx)(n.Button,{isSmall:!0,onClick:()=>H(null),children:(0,p.__)("Cancel","caliph")})]})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[(0,r.jsxs)("span",{style:{fontSize:"11px",color:"#64748b",fontWeight:"500"},children:["#",o+1]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"4px"},children:[(0,r.jsx)(n.Button,{isSmall:!0,onClick:()=>(e=>{const o=l.map((t=>t.id===e?{...t,enabled:!t.enabled}:t));t({textSegments:o})})(e.id),style:{background:e.enabled?"#10b981":"#6b7280",color:"#ffffff",border:"none",borderRadius:"3px",padding:"2px 6px",fontSize:"10px"},children:e.enabled?(0,p.__)("ON","caliph"):(0,p.__)("OFF","caliph")}),(0,r.jsx)(n.Button,{isSmall:!0,onClick:()=>H(e.id),style:{background:"#0ea5e9",color:"#ffffff",border:"none",borderRadius:"3px",padding:"2px 6px",fontSize:"10px"},children:"✏️"}),(0,r.jsx)(n.Button,{isSmall:!0,isDestructive:!0,onClick:()=>(e=>{const o=l.filter((t=>t.id!==e));t({textSegments:o})})(e.id),style:{background:"#dc2626",color:"#ffffff",border:"none",borderRadius:"3px",padding:"2px 6px",fontSize:"10px"},children:"🗑️"})]})]}),(0,r.jsx)("div",{style:{fontSize:"13px",color:e.enabled?"#1f2937":"#6b7280",fontWeight:"500",wordBreak:"break-word"},children:e.text})]})},e.id)))})]})]})]}),"images"===x&&(0,r.jsx)(n.PanelBody,{title:(0,p.__)("Logo Images","caliph"),className:"caliph-images-panel",initialOpen:!0,children:(0,r.jsxs)("div",{style:{background:"#ffffff",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",margin:"0 0 16px 0"},children:[(0,r.jsx)("h4",{style:{margin:"0 0 12px 0",color:"#334155",fontSize:"13px",fontWeight:"500"},children:"Image Management"}),F.length>0&&(0,r.jsxs)(n.Notice,{status:"error",isDismissible:!1,style:{margin:"0 0 12px 0",background:"#fef2f2",border:"1px solid #fecaca",borderRadius:"4px"},children:[(0,r.jsx)("strong",{style:{color:"#dc2626"},children:(0,p.__)("Upload Errors:","caliph")}),(0,r.jsx)("ul",{style:{margin:"4px 0 0 0",paddingLeft:"16px"},children:F.map(((e,t)=>(0,r.jsx)("li",{style:{fontSize:"12px",color:"#991b1b"},children:e},t)))})]}),(0,r.jsx)("div",{style:{display:"flex",justifyContent:"flex-start",marginBottom:"12px"},children:(0,r.jsx)(a.MediaUploadCheck,{children:(0,r.jsx)(a.MediaUpload,{onSelect:e=>{const o=[],l=[];e.forEach(((e,t)=>{const i=(e=>["image/jpeg","image/jpg","image/png","image/gif","image/svg+xml","image/webp"].includes(e.mime)?e.filesizeInBytes&&e.filesizeInBytes>2097152?{valid:!1,message:(0,p.__)("Image size should be less than 2MB","caliph")}:{valid:!0}:{valid:!1,message:(0,p.__)("Please upload a valid image file (JPEG, PNG, GIF, SVG, WebP)","caliph")})(e);i.valid?o.push({id:e.id,url:e.url,alt:e.alt||`Logo ${t+1}`,width:e.width,height:e.height}):l.push(`${e.filename}: ${i.message}`)})),t({logoImages:[...m,...o]}),l.length>0?(R(l),setTimeout((()=>R([])),5e3)):R([])},multiple:!0,gallery:!0,allowedTypes:["image"],render:({open:e})=>(0,r.jsxs)(n.Button,{isPrimary:!0,onClick:e,style:{background:"#1e293b",border:"none",borderRadius:"4px",padding:"10px 20px",fontSize:"13px",fontWeight:"500",color:"#ffffff",cursor:"pointer",transition:"all 0.2s ease",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:["📁 ",(0,p.__)("Add Logo Images","caliph")]})})})}),m.length>0&&(0,r.jsxs)("div",{style:{marginTop:"12px"},children:[(0,r.jsxs)("p",{style:{margin:"0 0 8px 0",color:"#64748b",fontSize:"12px"},children:[(0,p.__)("Uploaded Images:","caliph")," ",m.length]}),(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(70px, 1fr))",gap:"12px",alignItems:"start"},children:m.map(((e,o)=>(0,r.jsxs)("div",{style:{position:"relative",backgroundColor:"#fff",borderRadius:"6px",padding:"6px",border:"1px solid #e2e8f0",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)",transition:"all 0.2s ease"},children:[(0,r.jsx)("img",{src:e.url,alt:e.alt,style:{width:"100%",height:"45px",objectFit:"contain",borderRadius:"4px",display:"block"}}),(0,r.jsx)(n.Button,{isDestructive:!0,isSmall:!0,onClick:()=>(e=>{const o=m.filter((t=>t.id!==e));t({logoImages:o})})(e.id),style:{position:"absolute",top:"2px",right:"2px",width:"18px",height:"18px",minWidth:"18px",padding:"0",borderRadius:"50%",fontSize:"10px",background:"#dc2626",border:"1px solid #ffffff",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.1)",display:"flex",alignItems:"center",justifyContent:"center"},children:"×"})]},e.id)))})]}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Image Height (px)","caliph"),value:parseInt(b),onChange:e=>t({imageHeight:`${e}px`}),min:20,max:100,step:5,help:(0,p.__)("Adjust the height of logo images in the marquee","caliph")}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Image Spacing (px)","caliph"),value:parseInt(v),onChange:e=>t({imageSpacing:`${e}px`}),min:10,max:100,step:5,help:(0,p.__)("Set the spacing between logo images","caliph")})]})}),(0,r.jsx)(n.PanelBody,{title:(0,p.__)("Animation Settings","caliph"),initialOpen:!1,className:"caliph-animation-panel",children:(0,r.jsxs)("div",{style:{background:"#ffffff",border:"1px solid #e2e8f0",borderRadius:"6px",padding:"16px",marginBottom:"16px"},children:[(0,r.jsx)("h4",{style:{margin:"0 0 12px 0",fontSize:"13px",fontWeight:"500",color:"#334155"},children:(0,p.__)("Motion Controls","caliph")}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Animation Speed","caliph"),value:f,onChange:e=>t({speed:e}),min:10,max:200,step:5,help:(0,p.__)("Lower values create slower, more readable animations","caliph")}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Direction","caliph"),value:y,options:[{label:(0,p.__)("Left to Right","caliph"),value:"left"},{label:(0,p.__)("Right to Left","caliph"),value:"right"}],onChange:e=>t({direction:e})}),(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Pause on Hover","caliph"),checked:j,onChange:e=>t({pauseOnHover:e}),help:(0,p.__)("Pause animation when users hover over the marquee for better readability","caliph")})]})}),(0,r.jsx)(n.PanelBody,{title:(0,p.__)("🎨 Typography","caliph"),initialOpen:!1,className:"caliph-typography-panel",children:(0,r.jsxs)("div",{style:{background:"linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%)",border:"1px solid #c084fc",borderRadius:"12px",padding:"20px",marginBottom:"16px"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px",gap:"8px"},children:[(0,r.jsx)("span",{style:{fontSize:"16px"},children:"✍️"}),(0,r.jsx)("h4",{style:{margin:"0",fontSize:"14px",fontWeight:"600",color:"#7c2d12"},children:(0,p.__)("Text Styling","caliph")})]}),(0,r.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,r.jsxs)("label",{style:{display:"block",marginBottom:"8px",fontSize:"13px",fontWeight:"600",color:"#7c2d12"},children:["📏 ",(0,p.__)("Font Size","caliph")]}),(0,r.jsx)(n.FontSizePicker,{fontSizes:O,value:S,fallbackFontSize:16,onChange:e=>t({fontSize:e})})]}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("💪 Font Weight","caliph"),value:k,options:A,onChange:e=>t({fontWeight:e}),help:(0,p.__)("🎯 Choose the visual weight of your text for optimal readability","caliph")})]})}),(0,r.jsx)(n.PanelBody,{title:(0,p.__)("🌈 Color Settings","caliph"),initialOpen:!1,className:"caliph-color-panel",children:(0,r.jsxs)("div",{style:{background:"linear-gradient(135deg, #fef3c7 0%, #fde68a 100%)",border:"1px solid #f59e0b",borderRadius:"12px",padding:"20px",marginBottom:"16px"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px",gap:"8px"},children:[(0,r.jsx)("span",{style:{fontSize:"16px"},children:"🎨"}),(0,r.jsx)("h4",{style:{margin:"0",fontSize:"14px",fontWeight:"600",color:"#92400e"},children:(0,p.__)("Visual Theme","caliph")})]}),(0,r.jsx)(a.PanelColorSettings,{title:(0,p.__)("Color Settings","caliph"),colorSettings:[{value:_,onChange:e=>t({backgroundColor:e}),label:_?(0,p.__)("🖼️ Background Color (Custom)","caliph"):(0,p.__)("🖼️ Background Color (Theme Default)","caliph"),clearable:!0},{value:C,onChange:e=>t({textColor:e}),label:C?(0,p.__)("✏️ Text Color (Custom)","caliph"):(0,p.__)("✏️ Text Color (Theme Default)","caliph"),clearable:!0}]}),(0,r.jsxs)("div",{style:{marginTop:"16px",padding:"12px",backgroundColor:"rgba(251, 191, 36, 0.1)",borderRadius:"8px",fontSize:"12px",color:"#92400e"},children:["💡 ",(0,p.__)("Tip: Leave colors empty to use theme defaults that automatically adapt when switching theme styles. Custom colors override theme colors.","caliph")]})]})}),(0,r.jsx)(n.PanelBody,{title:(0,p.__)("📐 Spacing","caliph"),initialOpen:!1,className:"caliph-spacing-panel",children:(0,r.jsxs)("div",{style:{background:"linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%)",border:"1px solid #10b981",borderRadius:"12px",padding:"20px",marginBottom:"16px"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px",gap:"8px"},children:[(0,r.jsx)("span",{style:{fontSize:"16px"},children:"📏"}),(0,r.jsx)("h4",{style:{margin:"0",fontSize:"14px",fontWeight:"600",color:"#065f46"},children:(0,p.__)("Layout Control","caliph")})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("label",{style:{display:"block",marginBottom:"8px",fontSize:"13px",fontWeight:"600",color:"#065f46"},children:["🎯 ",(0,p.__)("Padding","caliph")]}),(0,r.jsx)(n.__experimentalBoxControl,{values:B,onChange:e=>t({padding:e}),units:[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],allowReset:!0})]}),(0,r.jsxs)("div",{style:{padding:"12px",backgroundColor:"rgba(16, 185, 129, 0.1)",borderRadius:"8px",fontSize:"12px",color:"#065f46"},children:["💡 ",(0,p.__)("Adjust padding to control the space around your marquee content","caliph")]})]})})]})},$=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"caliph/marquee","version":"1.0.0","title":"Marquee","category":"widgets","icon":"controls-forward","description":"Display scrolling text with customizable speed, direction, and styling options.","keywords":["marquee","scroll","ticker","animation"],"textdomain":"caliph","editorScript":"file:./index.js","editorStyle":"file:./style-index.css","style":"file:./style-index.css","attributes":{"content":{"type":"string","source":"html","selector":".caliph-marquee-content","default":"✦ BOOK FOR ONLINE APPOINTMENT ✦ PROFESSIONAL HEALTHCARE SERVICES ✦ 24/7 EMERGENCY SUPPORT ✦ EXPERT MEDICAL CONSULTATIONS ✦ MODERN FACILITIES & EQUIPMENT ✦ TRUSTED BY THOUSANDS OF PATIENTS ✦"},"speed":{"type":"number","default":50},"direction":{"type":"string","default":"left"},"backgroundColor":{"type":"string","default":""},"textColor":{"type":"string","default":""}},"supports":{"html":false,"align":["wide","full"]},"example":{"attributes":{"content":"✦ BOOK FOR ONLINE APPOINTMENT ✦ PROFESSIONAL HEALTHCARE SERVICES ✦ 24/7 EMERGENCY SUPPORT ✦ EXPERT MEDICAL CONSULTATIONS ✦ MODERN FACILITIES & EQUIPMENT ✦ TRUSTED BY THOUSANDS OF PATIENTS ✦","speed":50,"direction":"left"}}}');(0,S.registerBlockType)($.name,{...$,attributes:{content:{type:"string",source:"html",selector:".caliph-marquee-content",default:"✦ BOOK FOR ONLINE APPOINTMENT ✦ PROFESSIONAL HEALTHCARE SERVICES ✦ 24/7 EMERGENCY SUPPORT ✦ EXPERT MEDICAL CONSULTATIONS ✦ MODERN FACILITIES & EQUIPMENT ✦ TRUSTED BY THOUSANDS OF PATIENTS ✦"},textSegments:{type:"array",default:[{id:1,text:"BOOK FOR ONLINE APPOINTMENT",enabled:!0},{id:2,text:"PROFESSIONAL HEALTHCARE SERVICES",enabled:!0},{id:3,text:"24/7 EMERGENCY SUPPORT",enabled:!0},{id:4,text:"EXPERT MEDICAL CONSULTATIONS",enabled:!0},{id:5,text:"MODERN FACILITIES & EQUIPMENT",enabled:!0},{id:6,text:"TRUSTED BY THOUSANDS OF PATIENTS",enabled:!0}]},segmentSeparator:{type:"string",default:"✦"},separatorSize:{type:"string",default:"1em"},separatorStyle:{type:"string",default:"normal"},separatorColor:{type:"string",default:""},separatorWeight:{type:"string",default:"normal"},segmentGap:{type:"string",default:"10px"},displayMode:{type:"string",default:"text"},logoImages:{type:"array",default:[]},imageHeight:{type:"string",default:"40px"},imageSpacing:{type:"string",default:"30px"},speed:{type:"number",default:50},direction:{type:"string",default:"left"},backgroundColor:{type:"string",default:""},textColor:{type:"string",default:""},pauseOnHover:{type:"boolean",default:!0},fontSize:{type:"string",default:"16px"},fontWeight:{type:"string",default:"normal"},padding:{type:"object",default:{top:"10px",right:"20px",bottom:"10px",left:"20px"}}},edit:function({attributes:e,setAttributes:t}){const{content:o="",displayMode:l="text",logoImages:i=[],imageHeight:n="40px",imageSpacing:s="30px",speed:c=50,direction:d="left",backgroundColor:h="",textColor:g="",pauseOnHover:u=!0,fontSize:x="16px",fontWeight:m="normal",padding:b={top:"10px",right:"20px",bottom:"10px",left:"20px"},textSegments:v=[],segmentSeparator:f="✦",separatorSize:y="1em",separatorStyle:_="normal",separatorColor:C="",separatorWeight:j="normal",segmentGap:S="10px"}=e||{},k=Math.max(10,Math.min(200,Number(c)||50)),B=["left","right"].includes(d)?d:"left",I=(0,a.useBlockProps)({className:"caliph-marquee-block "+(u?"pause-on-hover":""),style:{backgroundColor:h||void 0,color:g||void 0,fontSize:x||"16px",fontWeight:m||"normal",padding:(e=>{if(e&&"object"==typeof e)try{return`${e.top||"10px"} ${e.right||"20px"} ${e.bottom||"10px"} ${e.left||"20px"}`}catch(e){return console.warn("Marquee block: Invalid padding format",e),"10px 20px"}})(b),"--marquee-speed":`${k}s`,"--marquee-direction":"right"===B?"reverse":"normal"}});try{return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R,{attributes:e,setAttributes:t}),(0,r.jsx)("div",{...I,children:(0,r.jsx)("div",{className:"caliph-marquee-container",children:(0,r.jsx)("div",{className:"caliph-marquee-track",children:"text"===l?(0,r.jsx)(r.Fragment,{children:v.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-segments",style:{display:"flex",alignItems:"center",gap:S||"10px",fontSize:x||"16px",fontWeight:m||"normal"},children:v.filter((e=>e.enabled)).map(((e,t)=>(0,r.jsxs)(w.Fragment,{children:[t>0&&f&&(0,r.jsx)("span",{className:"caliph-marquee-separator",style:{fontSize:y||"1em",fontWeight:j||"normal",fontStyle:_||"normal",color:C||"inherit"},children:f}),(0,r.jsx)("span",{className:"caliph-marquee-segment",style:{fontSize:x||"16px",fontWeight:m||"normal"},children:e.text})]},e.id)))}),(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-segments caliph-marquee-duplicate",style:{display:"flex",alignItems:"center",gap:S||"10px",fontSize:x||"16px",fontWeight:m||"normal"},"aria-hidden":"true",children:v.filter((e=>e.enabled)).map(((e,t)=>(0,r.jsxs)(w.Fragment,{children:[f&&(0,r.jsx)("span",{className:"caliph-marquee-separator",style:{fontSize:y||"1em",fontWeight:j||"normal",fontStyle:_||"normal",color:C||"inherit"},children:f}),(0,r.jsx)("span",{className:"caliph-marquee-segment",style:{fontSize:x||"16px",fontWeight:m||"normal"},children:e.text})]},`duplicate-${e.id}`)))})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-placeholder",style:{fontSize:x||"16px",fontWeight:m||"normal",color:"#94a3b8",fontStyle:"italic"},children:(0,p.__)("Add text segments to display content...","caliph")}),(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-placeholder caliph-marquee-duplicate",style:{fontSize:x||"16px",fontWeight:m||"normal",color:"#94a3b8",fontStyle:"italic"},"aria-hidden":"true",children:(0,p.__)("Add text segments to display content...","caliph")})]})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-images",style:{display:"flex",alignItems:"center",gap:s||"30px"},children:i&&i.length>0?i.map(((e,t)=>(0,r.jsx)("img",{src:e.url,alt:e.alt||`Logo ${t+1}`,style:{height:n||"40px",width:"auto",objectFit:"contain",flexShrink:0}},e.id||t))):(0,r.jsx)("div",{className:"caliph-marquee-placeholder",children:(0,p.__)("No images uploaded. Use the sidebar to add logo images.","caliph")})}),(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-images caliph-marquee-duplicate",style:{display:"flex",alignItems:"center",gap:s||"30px"},"aria-hidden":"true",children:i&&i.length>0&&i.map(((e,t)=>(0,r.jsx)("img",{src:e.url,alt:e.alt||`Logo ${t+1}`,style:{height:n||"40px",width:"auto",objectFit:"contain",flexShrink:0}},`duplicate-${e.id||t}`)))})]})})})})]})}catch(e){return console.error("Marquee block: Render error",e),(0,r.jsx)("div",{className:"caliph-marquee-error",children:(0,r.jsx)("p",{children:(0,p.__)("Error rendering marquee block. Please refresh the editor.","caliph")})})}},save:function({attributes:e}){const{content:t="",displayMode:o="text",logoImages:l=[],imageHeight:i="40px",imageSpacing:n="30px",speed:s=50,direction:c="left",backgroundColor:p="",textColor:d="",pauseOnHover:h=!0,fontSize:g="16px",fontWeight:u="normal",padding:x={top:"10px",right:"20px",bottom:"10px",left:"20px"},textSegments:m=[],segmentSeparator:b="✦",separatorSize:v="1em",separatorStyle:f="normal",separatorColor:y="",separatorWeight:_="normal",segmentGap:C="10px"}=e||{},j=Math.max(10,Math.min(200,Number(s)||50)),S=["left","right"].includes(c)?c:"left",k=a.useBlockProps.save({className:"caliph-marquee-block "+(h?"pause-on-hover":""),style:{backgroundColor:p||void 0,color:d||void 0,fontSize:g||"16px",fontWeight:u||"normal",padding:(e=>{if(e&&"object"==typeof e)try{return`${e.top||"10px"} ${e.right||"20px"} ${e.bottom||"10px"} ${e.left||"20px"}`}catch(e){return console.warn("Marquee block: Invalid padding format in save",e),"10px 20px"}})(x),"--marquee-speed":`${j}s`,"--marquee-direction":"right"===S?"reverse":"normal"}});try{const e=t||"";return(0,r.jsx)("div",{...k,children:(0,r.jsx)("div",{className:"caliph-marquee-container",children:(0,r.jsx)("div",{className:"caliph-marquee-track",children:"text"===o?(0,r.jsx)(r.Fragment,{children:m.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-segments",style:{display:"flex",alignItems:"center",gap:C||"10px",fontSize:g||"16px",fontWeight:u||"normal"},children:m.filter((e=>e.enabled)).map(((e,t)=>(0,r.jsxs)(w.Fragment,{children:[t>0&&b&&(0,r.jsx)("span",{className:"caliph-marquee-separator",style:{fontSize:v||"1em",fontWeight:_||"normal",fontStyle:f||"normal",color:y||"inherit"},children:b}),(0,r.jsx)("span",{className:"caliph-marquee-segment",style:{fontSize:g||"16px",fontWeight:u||"normal"},children:e.text})]},e.id)))}),(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-segments caliph-marquee-duplicate",style:{display:"flex",alignItems:"center",gap:C||"10px",fontSize:g||"16px",fontWeight:u||"normal"},"aria-hidden":"true",children:m.filter((e=>e.enabled)).map(((e,t)=>(0,r.jsxs)(w.Fragment,{children:[b&&(0,r.jsx)("span",{className:"caliph-marquee-separator",style:{fontSize:v||"1em",fontWeight:_||"normal",fontStyle:f||"normal",color:y||"inherit"},children:b}),(0,r.jsx)("span",{className:"caliph-marquee-segment",style:{fontSize:g||"16px",fontWeight:u||"normal"},children:e.text})]},`duplicate-${e.id}`)))})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.RichText.Content,{tagName:"div",className:"caliph-marquee-content",value:e}),(0,r.jsx)(a.RichText.Content,{tagName:"div",className:"caliph-marquee-content caliph-marquee-duplicate",value:e,"aria-hidden":"true"})]})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-images",style:{display:"flex",alignItems:"center",gap:n||"30px"},children:l&&l.length>0&&l.map(((e,t)=>(0,r.jsx)("img",{src:e.url,alt:e.alt||`Logo ${t+1}`,style:{height:i||"40px",width:"auto",objectFit:"contain",flexShrink:0}},e.id||t)))}),(0,r.jsx)("div",{className:"caliph-marquee-content caliph-marquee-images caliph-marquee-duplicate",style:{display:"flex",alignItems:"center",gap:n||"30px"},"aria-hidden":"true",children:l&&l.length>0&&l.map(((e,t)=>(0,r.jsx)("img",{src:e.url,alt:e.alt||`Logo ${t+1}`,style:{height:i||"40px",width:"auto",objectFit:"contain",flexShrink:0}},`duplicate-${e.id||t}`)))})]})})})})}catch(e){return console.error("Marquee block: Save render error",e),(0,r.jsx)("div",{className:"caliph-marquee-error",children:(0,r.jsx)("p",{children:"Error rendering marquee content"})})}}});const{registerBlockType:H}=wp.blocks;H("caliph/announcement-widget",{title:(0,p.__)("Announcement Widget","caliph"),description:(0,p.__)("A customizable announcement widget with badge, text, and icon.","caliph"),category:"widgets",icon:"megaphone",keywords:["announcement","widget","badge","cta","notification"],supports:{html:!0,align:["wide","full"],spacing:{margin:!0,padding:!0},color:{text:!0,background:!0},style:{color:{background:!0,text:!0,border:!0}}},attributes:{badgeText:{type:"string",default:"NEW"},mainText:{type:"string",default:"The Financial Brighter Application"},badgeColor:{type:"string",default:""},badgeTextColor:{type:"string",default:""},textColor:{type:"string",default:""},backgroundColor:{type:"string",default:""},borderColor:{type:"string",default:""},borderRadius:{type:"number",default:10},borderWidth:{type:"number",default:1},padding:{type:"object",default:{top:"6px",right:"6px",bottom:"6px",left:"6px"}},margin:{type:"object",default:{top:"0px",right:"0px",bottom:"0px",left:"0px"}},width:{type:"number",default:325},height:{type:"number",default:41},gap:{type:"number",default:12},showIcon:{type:"boolean",default:!0},iconColor:{type:"string",default:""},iconBackgroundColor:{type:"string",default:""},align:{type:"string",default:"left"},fontSize:{type:"number",default:12},badgeFontSize:{type:"number",default:10},fontWeight:{type:"string",default:"500"},badgeFontWeight:{type:"string",default:"600"}},edit:({attributes:e,setAttributes:t,isSelected:o})=>{try{const{badgeText:o,mainText:l,badgeColor:i,badgeTextColor:s,textColor:c,backgroundColor:d,borderColor:h,borderRadius:g,borderWidth:u,padding:x,margin:m,gap:b,showIcon:v,iconColor:f,iconBackgroundColor:y,align:_,fontSize:C,badgeFontSize:j,fontWeight:S,badgeFontWeight:w}=e,k=(0,a.useSetting)("color.palette")||[],B={};k.forEach((e=>{B[e.slug]=e.color}));const I={base:"var(--wp--preset--color--base, #FFFFFF)",contrast:"var(--wp--preset--color--contrast, #F97316)",accent1:"var(--wp--preset--color--accent-1, #FFF2E8)",accent2:"var(--wp--preset--color--accent-2, #F4F6F7)",accent3:"var(--wp--preset--color--accent-3, #52525A)",accent4:"var(--wp--preset--color--accent-4, #505561)",accent5:"var(--wp--preset--color--accent-5, #282828)",accent6:"var(--wp--preset--color--accent-6, #F9F9F9)",accent7:"var(--wp--preset--color--accent-7, rgba(0, 0, 0, 0.2))",accent8:"var(--wp--preset--color--accent-8, #FFFFFF1A)"},T=(0,a.useBlockProps)({className:`caliph-announcement-widget align-${_}`,style:{backgroundColor:d||I.accent8,border:`${u}px solid ${h||I.accent8}`,borderRadius:`${g}px`,padding:`${x.top} ${x.right} ${x.bottom} ${x.left}`,margin:`${m.top} ${m.right} ${m.bottom} ${m.left}`,display:"inline-flex",alignItems:"center",justifyContent:"space-between",gap:`${b}px`,minHeight:"auto",width:"auto",maxWidth:"none"}}),N={backgroundColor:i||I.accent1,color:s||I.accent5,fontSize:`${j}px`,fontWeight:w,padding:"4px 12px",borderRadius:"6px",textTransform:"uppercase",letterSpacing:"0.5px",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"40px",height:"24px"},P={color:c||I.base,fontSize:`${C}px`,fontWeight:S,flex:1,margin:0,lineHeight:"1.4"},F={backgroundColor:y||I.accent2,color:f||I.accent5,width:"32px",height:"32px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.BlockControls,{children:(0,r.jsx)(a.AlignmentToolbar,{value:_,onChange:e=>t({align:e})})}),(0,r.jsxs)(a.InspectorControls,{children:[(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Content Settings","caliph"),initialOpen:!0,children:[(0,r.jsx)(n.TextControl,{label:(0,p.__)("Badge Text","caliph"),value:o,onChange:e=>t({badgeText:e})}),(0,r.jsx)(n.TextControl,{label:(0,p.__)("Main Text","caliph"),value:l,onChange:e=>t({mainText:e})}),(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Show Icon","caliph"),checked:v,onChange:e=>t({showIcon:e})})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Badge Styling","caliph"),initialOpen:!1,children:[(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,p.__)("Badge Background Color","caliph")}),(0,r.jsx)(a.ColorPalette,{value:i,onChange:e=>t({badgeColor:e}),colors:k,disableCustomColors:!1})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,p.__)("Badge Text Color","caliph")}),(0,r.jsx)(a.ColorPalette,{value:s,onChange:e=>t({badgeTextColor:e}),colors:k,disableCustomColors:!1})]}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Badge Font Size","caliph"),value:j,onChange:e=>t({badgeFontSize:e}),min:8,max:24,step:1}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Badge Font Weight","caliph"),value:w,options:[{label:(0,p.__)("Normal","caliph"),value:"400"},{label:(0,p.__)("Medium","caliph"),value:"500"},{label:(0,p.__)("Semi Bold","caliph"),value:"600"},{label:(0,p.__)("Bold","caliph"),value:"700"}],onChange:e=>t({badgeFontWeight:e})})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Text Styling","caliph"),initialOpen:!1,children:[(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,p.__)("Text Color","caliph")}),(0,r.jsx)(a.ColorPalette,{value:c,onChange:e=>t({textColor:e}),colors:k,disableCustomColors:!1})]}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Font Size","caliph"),value:C,onChange:e=>t({fontSize:e}),min:12,max:32,step:1}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Font Weight","caliph"),value:S,options:[{label:(0,p.__)("Normal","caliph"),value:"400"},{label:(0,p.__)("Medium","caliph"),value:"500"},{label:(0,p.__)("Semi Bold","caliph"),value:"600"},{label:(0,p.__)("Bold","caliph"),value:"700"}],onChange:e=>t({fontWeight:e})})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Background & Border","caliph"),initialOpen:!1,children:[(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,p.__)("Background Color","caliph")}),(0,r.jsx)(a.ColorPalette,{value:d,onChange:e=>t({backgroundColor:e}),colors:k,disableCustomColors:!1})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,p.__)("Border Color","caliph")}),(0,r.jsx)(a.ColorPalette,{value:h,onChange:e=>t({borderColor:e}),colors:k,disableCustomColors:!1})]}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Border Radius","caliph"),value:g,onChange:e=>t({borderRadius:e}),min:0,max:50,step:1}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Border Width","caliph"),value:u,onChange:e=>t({borderWidth:e}),min:0,max:10,step:1})]}),(0,r.jsx)(n.PanelBody,{title:(0,p.__)("Dimensions & Spacing","caliph"),initialOpen:!1,children:(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Gap (px)","caliph"),value:b,onChange:e=>t({gap:e}),min:4,max:32,step:1})}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Icon Styling","caliph"),initialOpen:!1,children:[(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,p.__)("Icon Color","caliph")}),(0,r.jsx)(a.ColorPalette,{value:f,onChange:e=>t({iconColor:e}),colors:k,disableCustomColors:!1})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,p.__)("Icon Background Color","caliph")}),(0,r.jsx)(a.ColorPalette,{value:y,onChange:e=>t({iconBackgroundColor:e}),colors:k,disableCustomColors:!1})]})]})]}),(0,r.jsxs)("div",{...T,children:[(0,r.jsx)("div",{style:N,children:(0,r.jsx)(a.RichText,{tagName:"span",value:o,onChange:e=>t({badgeText:e}),placeholder:(0,p.__)("Badge text...","caliph"),className:"caliph-announcement-badge-text"})}),(0,r.jsx)(a.RichText,{tagName:"p",value:l,onChange:e=>t({mainText:e}),placeholder:(0,p.__)("Main announcement text...","caliph"),className:"caliph-announcement-text",style:P}),v?(0,r.jsx)("div",{style:F,children:(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}):(0,r.jsx)("div",{style:{...F,opacity:.3},children:(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}catch(e){return console.error("Announcement Widget Edit Error:",e),(0,r.jsxs)("div",{style:{padding:"20px",border:"2px dashed #ff0000",backgroundColor:"#fff5f5",color:"#ff0000",textAlign:"center"},children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Announcement Widget Error"})}),(0,r.jsx)("p",{children:"There was an error rendering this widget."}),(0,r.jsxs)("p",{children:["Error: ",e.message]})]})}},save:({attributes:e})=>{const{badgeText:t,mainText:o,badgeColor:l,badgeTextColor:i,textColor:n,backgroundColor:s,borderColor:c,borderRadius:p,borderWidth:d,padding:h,margin:g,gap:u,showIcon:x,iconColor:m,iconBackgroundColor:b,align:v,fontSize:f,badgeFontSize:y,fontWeight:_,badgeFontWeight:C}=e,j="var(--wp--preset--color--accent-1, #FFF2E8)",S="var(--wp--preset--color--accent-5, #282828)",w="var(--wp--preset--color--accent-8, #FFFFFF1A)",k=a.useBlockProps.save({className:`caliph-announcement-widget align-${v}`,style:{backgroundColor:s||w,border:`${d}px solid ${c||w}`,borderRadius:`${p}px`,padding:`${h.top} ${h.right} ${h.bottom} ${h.left}`,margin:`${g.top} ${g.right} ${g.bottom} ${g.left}`,display:"inline-flex",alignItems:"center",justifyContent:"space-between",gap:`${u}px`,minHeight:"auto",width:"auto",maxWidth:"none"}}),B={backgroundColor:l||j,color:i||S,fontSize:`${y}px`,fontWeight:C,padding:"4px 12px",borderRadius:"6px",textTransform:"uppercase",letterSpacing:"0.5px",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"40px",height:"24px"},I={color:n||"var(--wp--preset--color--base, #FFFFFF)",fontSize:`${f}px`,fontWeight:_,flex:1,margin:0,lineHeight:"1.4"},T={backgroundColor:b||j,color:m||S,width:"32px",height:"32px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return(0,r.jsxs)("div",{...k,children:[(0,r.jsx)("div",{style:B,children:(0,r.jsx)(a.RichText.Content,{tagName:"span",value:t,className:"caliph-announcement-badge-text"})}),(0,r.jsx)(a.RichText.Content,{tagName:"p",value:o,className:"caliph-announcement-text",style:I}),x&&(0,r.jsx)("div",{style:T,children:(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}});const M=(0,r.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(k.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),E=(0,r.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})}),{registerBlockType:L}=wp.blocks,{useState:W,useEffect:O}=wp.element,A=[{attributes:{iconSvg:{type:"string",default:""},iconUrl:{type:"string",default:""},size:{type:"number",default:48},align:{type:"string",default:"center"},style:{type:"object",default:{}}},save:({attributes:e})=>{const{iconSvg:t,iconUrl:o,size:l=48,align:i="center",style:a={}}=e,n={className:`has-text-align-${i} caliph-svg-icon-block`,style:{display:"inline-block",textAlign:i,width:"fit-content",margin:"0 auto","--icon-color":a?.color?.text||"currentColor","--icon-bg-color":a?.color?.background||"transparent"}},s={display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${l}px`,height:`${l}px`,lineHeight:0,color:"var(--icon-color)",backgroundColor:"var(--icon-bg-color)"};return t||o?o?(0,r.jsx)("div",{...n,children:(0,r.jsx)("div",{className:"svg-icon-container",style:s,children:(0,r.jsx)("div",{className:"svg-icon-mask","data-icon-url":o,style:{width:"100%",height:"100%",backgroundColor:"currentColor",WebkitMask:`url("${o}") center / contain no-repeat`,mask:`url("${o}") center / contain no-repeat`}})})}):(0,r.jsx)("div",{...n,children:(0,r.jsx)("div",{className:"svg-icon-container",style:s,dangerouslySetInnerHTML:{__html:t.replace(/]*)>/,'{const{attributes:t,setAttributes:o}=e,{iconSvg:l,iconUrl:i,size:s=48,align:c="center",enableColorModification:d=!1}=t,h=(0,a.useSetting)("spacing.iconSizes.medium")||48,[g,u]=W(""),{style:x={}}=t,m=x?.color?.text||"currentColor",b=x?.color?.background||"transparent",v=(0,a.useBlockProps)({className:`has-text-align-${c} caliph-svg-icon-block`,style:{display:"inline-block",textAlign:c,"--icon-color":m,"--icon-bg-color":b}});return O((()=>{if(l){const e=e=>{const t=document.createElement("div");t.innerHTML=e;const o=t.querySelector("svg");return o?(d&&(o.setAttribute("fill","currentColor"),o.style.color="currentColor",o.querySelectorAll("*").forEach((e=>{e.removeAttribute("fill"),e.removeAttribute("stroke"),e.style.fill="currentColor",e.style.stroke="currentColor",e.style.color="currentColor"}))),t.innerHTML.replace(/<\/?div[^>]*>/g,"").replace(/style=""/g,"")):""};l.startsWith("e.text())).then((t=>u(e(t)))).catch((e=>console.error("Error loading SVG:",e)))}else u("")}),[l,d]),(0,r.jsxs)("div",{...v,children:[(0,r.jsxs)(a.BlockControls,{group:"block",children:[(0,r.jsx)(a.AlignmentToolbar,{value:c,onChange:e=>o({align:e})}),(0,r.jsx)(n.Button,{variant:"secondary",onClick:()=>{const e=wp.media({title:(0,p.__)("Replace SVG Icon","caliph"),button:{text:(0,p.__)("Select","caliph")},multiple:!1,library:{type:"image/svg+xml"}});e.on("select",(()=>{const t=e.state().get("selection").first().toJSON();t&&t.url&&o({iconUrl:t.url,iconSvg:""})})),e.open()},children:(0,p.__)("Replace","caliph")}),(0,r.jsx)(n.ToolbarGroup,{children:(0,r.jsx)(n.DropdownMenu,{icon:"ellipsis",label:(0,p.__)("More options","caliph"),toggleProps:{isSmall:!0,variant:"tertiary"},children:()=>(0,r.jsxs)("div",{style:{minWidth:"240px"},children:[(i||l)&&(0,r.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid #e0e0e0",marginBottom:"4px"},children:[(0,r.jsx)("div",{style:{fontSize:"11px",color:"#757575",marginBottom:"4px",textTransform:"uppercase",fontWeight:500},children:(0,p.__)("URL","caliph")}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"13px"},children:[(0,r.jsx)("span",{className:"dashicons dashicons-admin-site",style:{color:"#757575",flexShrink:0}}),(0,r.jsx)("span",{style:{flex:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i?i.split("/").pop():l.includes("http")?l.split("/").pop():"inline-svg.svg"}),(0,r.jsx)(n.Button,{icon:M,label:(0,p.__)("Edit","caliph"),onClick:e=>{e.stopPropagation(),wp.media({title:(0,p.__)("Edit Media","caliph"),button:{text:(0,p.__)("Update","caliph")},multiple:!1,library:{type:"image/svg+xml"}}).open()},isSmall:!0,variant:"tertiary"}),(0,r.jsx)(n.Button,{icon:E,label:(0,p.__)("Copy URL","caliph"),onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(i||l)},isSmall:!0,variant:"tertiary"})]})]}),(0,r.jsxs)(n.MenuGroup,{children:[(0,r.jsx)(n.MenuItem,{icon:"admin-media",onClick:()=>{const e=wp.media({title:(0,p.__)("Open Media Library","caliph"),button:{text:(0,p.__)("Select","caliph")},multiple:!1,library:{type:"image/svg+xml"}});e.on("select",(()=>{const t=e.state().get("selection").first().toJSON();t&&t.url&&o({iconUrl:t.url,iconSvg:""})})),e.open()},children:(0,p.__)("Open Media Library","caliph")}),(0,r.jsx)(n.MenuItem,{icon:"image-rotate",onClick:()=>{o({iconUrl:"",iconSvg:""})},children:(0,p.__)("Reset","caliph")})]})]})})})]}),(0,r.jsx)(a.InspectorControls,{children:(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Icon Settings","caliph"),children:[(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Size","caliph"),value:s||h,onChange:e=>o({size:e}),min:16,max:200,step:1}),(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Enable Color Modification","caliph"),help:d?(0,p.__)("SVG colors will be modified to match theme colors.","caliph"):(0,p.__)("SVG will display in its original colors.","caliph"),checked:d,onChange:e=>o({enableColorModification:e})})]})}),i?(0,r.jsx)("div",{className:"svg-icon-container",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${s}px`,height:`${s}px`,lineHeight:0,color:m},children:l?(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:d?l.replace(/]*)>/,'o({iconSvg:e}),className:"svg-icon-url-input"}),(0,r.jsx)(n.Button,{isSecondary:!0,isLarge:!0,onClick:()=>{const e=wp.media({title:(0,p.__)("Select SVG","caliph"),button:{text:(0,p.__)("Select","caliph")},multiple:!1,library:{type:"image/svg+xml"}});e.on("select",(()=>(e=>(e&&e.url&&o({iconUrl:e.url,iconSvg:""}),!1))(e.state().get("selection").first().toJSON()))),e.open()},className:"svg-icon-upload-button",children:(0,p.__)("Upload SVG","caliph")})]})})]})},deprecated:A,save:({attributes:e})=>{const{iconSvg:t,iconUrl:o,size:l=48,align:i="center",style:n={},enableColorModification:s=!1}=e,c=n?.color?.text||"currentColor",p=n?.color?.background||"transparent",d=a.useBlockProps.save({className:`has-text-align-${i} caliph-svg-icon-block`,style:{display:"inline-block",textAlign:i,width:"fit-content",margin:"0 auto","--icon-color":c,"--icon-bg-color":p}}),h={display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${l}px`,height:`${l}px`,lineHeight:0,color:"var(--icon-color)",backgroundColor:"var(--icon-bg-color)"};return t||o?o?(0,r.jsx)("div",{...d,children:(0,r.jsx)("div",{className:"svg-icon-container",style:h,children:s?(0,r.jsx)("div",{className:"svg-icon-mask","data-icon-url":o,style:{width:"100%",height:"100%",backgroundColor:"currentColor",WebkitMask:`url("${o}") center / contain no-repeat`,mask:`url("${o}") center / contain no-repeat`}}):(0,r.jsx)("img",{src:o,alt:"SVG Icon",style:{width:"100%",height:"100%",objectFit:"contain"}})})}):t?(0,r.jsx)("div",{...d,children:(0,r.jsx)("div",{className:"svg-icon-container",style:h,dangerouslySetInnerHTML:{__html:s?t.replace(/]*)>/,'your budgeting needs","caliph")}],["core/paragraph",{align:"center",style:{spacing:{padding:{top:"var:preset|spacing|30",bottom:"var:preset|spacing|20",left:"var:preset|spacing|80",right:"var:preset|spacing|80"}}},content:(0,p.__)("Whether you're saving, investing, or budgeting, we offer flexible plans
designed to meet your unique financial goals.","caliph")}],["core/columns",{style:{spacing:{padding:{top:"var:preset|spacing|50",left:"var:preset|spacing|50",right:"var:preset|spacing|30"},blockGap:"var:preset|spacing|50"}},layout:{type:"flex",flexWrap:"nowrap",justifyContent:"space-around"}},[["core/column",{style:{flexBasis:"0",flexGrow:"1",spacing:{padding:{top:"var:preset|spacing|50",bottom:"var:preset|spacing|50",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}},border:{radius:"30px"}},backgroundColor:"accent-6"},[["core/heading",{level:2,className:"is-style-default",fontSize:"x-large",content:(0,p.__)("Standard","caliph")}],["core/paragraph",{style:{spacing:{margin:{bottom:"0",top:"0px"}}},fontSize:"medium",content:(0,p.__)("For personal use","caliph")}],["core/separator",{className:"is-style-default",style:{spacing:{margin:{top:"var:preset|spacing|40",bottom:"var:preset|spacing|40"}}},backgroundColor:"accent-7"}],["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[["core/heading",{level:2,fontSize:"x-large",content:(0,p.__)("$ 29 USD","caliph")}],["core/paragraph",{fontSize:"medium",content:(0,p.__)("Monthly","caliph")}]]],["core/list",{className:"is-style-checkmark-list",style:{spacing:{padding:{top:"var:preset|spacing|20"}}},fontSize:"medium",values:`
  • ${(0,p.__)("Budgeting and Expense Tracking","caliph")}
  • ${(0,p.__)("Unlimited Activity Notifications","caliph")}
  • ${(0,p.__)("Credit Score Monitoring","caliph")}
  • ${(0,p.__)("Expense Tracking","caliph")}
  • ${(0,p.__)("Bank Transaction Imports","caliph")}
  • `}],["core/buttons",{style:{spacing:{padding:{top:"var:preset|spacing|30"}}},layout:{type:"flex",justifyContent:"left"}},[["core/button",{textAlign:"center",className:"is-style-secondary",text:(0,p.__)("Get Started","caliph")}]]]]],["core/column",{style:{flexBasis:"0",flexGrow:"1",spacing:{padding:{top:"var:preset|spacing|50",bottom:"var:preset|spacing|50",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}},border:{radius:"30px"}},backgroundColor:"accent-5"},[["core/heading",{level:2,textAlign:"left",className:"is-style-default",style:{elements:{link:{color:{text:"var:preset|color|base"}}}},textColor:"base",fontSize:"x-large",content:(0,p.__)("Business","caliph")}],["core/paragraph",{align:"left",style:{spacing:{margin:{bottom:"0",top:"0px"}},elements:{link:{color:{text:"var:preset|color|accent-6"}}}},textColor:"accent-6",fontSize:"medium",content:(0,p.__)("For personal use","caliph")}],["core/separator",{className:"is-style-default",style:{spacing:{margin:{top:"var:preset|spacing|40",bottom:"var:preset|spacing|40"}}},backgroundColor:"accent-3"}],["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[["core/heading",{level:2,style:{elements:{link:{color:{text:"var:preset|color|base"}}}},textColor:"base",fontSize:"x-large",content:(0,p.__)("$ 69 USD","caliph")}],["core/paragraph",{style:{elements:{link:{color:{text:"var:preset|color|accent-6"}}}},textColor:"accent-6",fontSize:"medium",content:(0,p.__)("Yearly","caliph")}]]],["core/list",{className:"is-style-checkmark-list",style:{spacing:{padding:{top:"var:preset|spacing|20"}},elements:{link:{color:{text:"var:preset|color|base"}}}},textColor:"base",fontSize:"medium",values:`
  • ${(0,p.__)("Budgeting and Expense Tracking","caliph")}
  • ${(0,p.__)("Unlimited Activity Notifications","caliph")}
  • ${(0,p.__)("Credit Score Monitoring","caliph")}
  • ${(0,p.__)("Expense Tracking","caliph")}
  • ${(0,p.__)("Bank Transaction Imports","caliph")}
  • `}],["core/buttons",{style:{spacing:{padding:{top:"var:preset|spacing|30"}}}},[["core/button",{textAlign:"left",className:"is-style-secondary",text:(0,p.__)("Get Started","caliph")}]]]]],["core/column",{style:{flexBasis:"0",flexGrow:"1",spacing:{padding:{top:"var:preset|spacing|50",bottom:"var:preset|spacing|50",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}},border:{radius:"30px"}},backgroundColor:"accent-6"},[["core/heading",{level:2,className:"is-style-default",fontSize:"x-large",content:(0,p.__)("Unlimited","caliph")}],["core/paragraph",{style:{spacing:{margin:{bottom:"0",top:"0px"}}},fontSize:"medium",content:(0,p.__)("For personal use","caliph")}],["core/separator",{className:"is-style-default",style:{spacing:{margin:{top:"var:preset|spacing|40",bottom:"var:preset|spacing|40"}}},backgroundColor:"accent-7"}],["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[["core/heading",{level:2,fontSize:"x-large",content:(0,p.__)("$ 129 USD","caliph")}],["core/paragraph",{fontSize:"medium",content:(0,p.__)("Lifetime","caliph")}]]],["core/list",{className:"is-style-checkmark-list",style:{spacing:{padding:{top:"var:preset|spacing|20"}}},fontSize:"medium",values:`
  • ${(0,p.__)("Budgeting and Expense Tracking","caliph")}
  • ${(0,p.__)("Unlimited Activity Notifications","caliph")}
  • ${(0,p.__)("Credit Score Monitoring","caliph")}
  • ${(0,p.__)("Expense Tracking","caliph")}
  • ${(0,p.__)("Bank Transaction Imports","caliph")}
  • `}],["core/buttons",{style:{spacing:{padding:{top:"var:preset|spacing|30"}}}},[["core/button",{className:"is-style-secondary",text:(0,p.__)("Get Started","caliph")}]]]]]]]]]];D("caliph/pricing-block",{title:(0,p.__)("Pricing Block","caliph"),icon:"money-alt",category:"design",edit:()=>{const e=(0,a.useBlockProps)();return(0,r.jsx)("div",{...e,children:(0,r.jsx)(a.InnerBlocks,{template:U})})},save:()=>{const e=a.useBlockProps.save();return(0,r.jsx)("div",{...e,children:(0,r.jsx)(a.InnerBlocks.Content,{})})}});const q=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"caliph/accordion-block","version":"0.1.0","title":"Accordion Block","category":"widgets","icon":"list-view","description":"A customizable accordion block with FAQ-style design and interactive functionality.","example":{},"supports":{"html":false,"align":["wide","full"],"spacing":{"padding":true,"margin":true},"color":{"background":true,"text":true,"link":true},"typography":{"fontSize":true,"lineHeight":true}},"attributes":{"items":{"type":"array","default":[{"id":1,"question":"What services do you offer?","answer":"We provide grooming, hair styling, vet checkups, paw and nail care, training, and more for all types of pets.","isOpen":true},{"id":2,"question":"Are your veterinarians certified?","answer":"Our services cover everything from professional grooming and pet styling to routine vet visits, nail trimming, and behavioral training for pets of all sizes.","isOpen":false}]},"headerTitle":{"type":"string","default":"FAQ"},"headerSubtitle":{"type":"string","default":"Frequently Asked Questions"},"headerDescription":{"type":"string","default":"At PetCove, we\'re here to answer all your pet care questions covering grooming, health checkups, training, emergencies, and booking guidance for your furry friends."},"showHeader":{"type":"boolean","default":true},"allowMultipleOpen":{"type":"boolean","default":false}},"textdomain":"caliph","editorScript":"file:./index.js","editorStyle":"file:./style.scss","style":"file:./style.scss","script":"file:./frontend.js"}'),V=({attributes:e,setAttributes:t})=>{const[o,l]=(0,w.useState)("text"),{colors:i,themeColors:a}=(0,C.useSelect)((e=>{const t=e("core/block-editor").getSettings();return{colors:t.colors||[],themeColors:t.__experimentalFeatures?.color?.palette?.theme||[]}}),[]),s=[],c=((e,t)=>{const o=new Map,l=e=>e.toLowerCase().replace(/\s+/g,"");return e.forEach((e=>{if(e.color){const t=l(e.color);o.has(t)||o.set(t,{name:e.name,color:e.color,source:"wordpress"})}})),t.forEach((e=>{const t=l(e.color);o.has(t)||o.set(t,{name:e.name,color:e.color,source:"default"})})),[...Array.from(o.values()).filter((e=>"wordpress"===e.source)),...Array.from(o.values()).filter((e=>"default"===e.source))].map((({name:e,color:t})=>({name:e,color:t})))})([...i,...a.map((e=>({name:e.name,slug:e.slug,color:e.color})))],s),d=c.length>0?c:s,h=e.colorSettings||{},g=({label:e,colorKey:o,description:l,isHighlighted:i=!1})=>(0,r.jsx)("div",{className:"color-control-wrapper "+(i?"highlighted":""),children:(0,r.jsx)(n.BaseControl,{label:e,help:l,className:"enhanced-color-control",children:(0,r.jsxs)("div",{className:"color-palette-container",children:[(0,r.jsx)(n.ColorPalette,{colors:d,value:h[o],onChange:e=>((e,o)=>{const l={...h,[e]:o};t({colorSettings:l})})(o,e),enableAlpha:!1,clearable:!0,disableCustomColors:!1}),h[o]&&(0,r.jsx)("div",{className:"selected-color-preview",children:(0,r.jsx)("span",{className:"color-value",children:h[o]})})]})})});return(0,r.jsx)(n.PanelBody,{title:(0,p.__)("Color Customization","caliph"),initialOpen:!1,children:(0,r.jsxs)("div",{className:"color-panel-wrapper",children:[(0,r.jsxs)(n.Flex,{justify:"space-between",style:{marginBottom:"16px"},children:[(0,r.jsx)(n.FlexItem,{children:(0,r.jsx)("p",{style:{margin:0,fontSize:"13px",color:"#757575"},children:(0,p.__)("Customize colors for all text elements and components","caliph")})}),(0,r.jsx)(n.FlexItem,{children:(0,r.jsx)(n.Button,{isSecondary:!0,isSmall:!0,onClick:()=>{t({colorSettings:{}})},children:(0,p.__)("Reset All","caliph")})})]}),(0,r.jsx)(n.TabPanel,{className:"color-customization-tabs",activeClass:"active-tab",tabs:[{name:"text",title:(0,r.jsxs)("span",{className:"tab-with-icon",children:[(0,r.jsx)("span",{className:"tab-icon",style:{backgroundColor:"#3b82f6"}}),(0,p.__)("Header Text","caliph")]}),className:"tab-text"},{name:"questions",title:(0,r.jsxs)("span",{className:"tab-with-icon",children:[(0,r.jsx)("span",{className:"tab-icon",style:{backgroundColor:"#8b5cf6"}}),(0,p.__)("Questions","caliph")]}),className:"tab-questions"},{name:"answers",title:(0,r.jsxs)("span",{className:"tab-with-icon",children:[(0,r.jsx)("span",{className:"tab-icon",style:{backgroundColor:"#ec4899"}}),(0,p.__)("Answers","caliph")]}),className:"tab-answers"},{name:"icons",title:(0,r.jsxs)("span",{className:"tab-with-icon",children:[(0,r.jsx)("span",{className:"tab-icon",style:{backgroundColor:"#f97316"}}),(0,p.__)("Icons","caliph")]}),className:"tab-icons"}],children:e=>(e=>{switch(e){case"text":return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{label:(0,p.__)("Header Title Color","caliph"),colorKey:"headerTitle",description:(0,p.__)("Color for the main header title","caliph")}),(0,r.jsx)(g,{label:(0,p.__)("Header Subtitle Color","caliph"),colorKey:"headerSubtitle",description:(0,p.__)("Color for the header subtitle","caliph")}),(0,r.jsx)(g,{label:(0,p.__)("Header Description Color","caliph"),colorKey:"headerDescription",description:(0,p.__)("Color for the header description text","caliph")})]});case"questions":return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{label:(0,p.__)("Question Text (Closed)","caliph"),colorKey:"questionClosed",description:(0,p.__)("Color for question text when accordion is closed","caliph")}),(0,r.jsx)(g,{label:(0,p.__)("Question Text (Open)","caliph"),colorKey:"questionOpen",description:(0,p.__)("Color for question text when accordion is open","caliph")}),(0,r.jsx)(g,{label:(0,p.__)("Question Text (Hover)","caliph"),colorKey:"questionHover",description:(0,p.__)("Color for question text on hover","caliph")})]});case"answers":return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{label:(0,p.__)("Answer Text Color","caliph"),colorKey:"answerText",description:(0,p.__)("Color for answer text content","caliph")}),(0,r.jsx)(g,{label:(0,p.__)("Answer Link Color","caliph"),colorKey:"answerLink",description:(0,p.__)("Color for links within answer text","caliph")})]});case"icons":return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{label:(0,p.__)("Icon Color (Closed)","caliph"),colorKey:"iconClosed",description:(0,p.__)("Color for accordion icons when closed","caliph")}),(0,r.jsx)(g,{label:(0,p.__)("Icon Color (Open)","caliph"),colorKey:"iconOpen",description:(0,p.__)("Color for accordion icons when open","caliph")}),(0,r.jsx)(g,{label:(0,p.__)("Icon Color (Hover)","caliph"),colorKey:"iconHover",description:(0,p.__)("Color for accordion icons on hover","caliph")})]});default:return null}})(e.name)})]})})},G=({attributes:e,setAttributes:t})=>{const{items:o,headerTitle:l,headerSubtitle:i,headerDescription:s,showHeader:c,allowMultipleOpen:d,iconStyle:h,iconSize:g,colorSettings:u,fontSizes:x,fontSizePixels:m,fontSizeMode:b}=e,v=[{label:(0,p.__)("Small","caliph"),value:"small"},{label:(0,p.__)("Medium","caliph"),value:"medium"},{label:(0,p.__)("Large","caliph"),value:"large"},{label:(0,p.__)("Extra Large","caliph"),value:"x-large"},{label:(0,p.__)("Extra Extra Large","caliph"),value:"xx-large"}],f={headerTitle:{min:16,max:48},headerSubtitle:{min:14,max:36},headerDescription:{min:12,max:24},questionText:{min:14,max:32},answerText:{min:12,max:24}},y=({element:e,label:o,helpText:l})=>{const i=(e=>b?.[e]||"preset")(e),a=f[e],s=(e=>m?.[e]||f[e]?.min||16)(e),c=x?.[e]||"medium",d=`font-size-control-${e}`,h=`font-size-live-${e}`;return(0,r.jsxs)("div",{style:{marginBottom:"20px",padding:"12px",border:"1px solid #ddd",borderRadius:"4px"},role:"group","aria-labelledby":`${d}-label`,"aria-describedby":`${d}-description`,children:[(0,r.jsx)("div",{id:`${d}-label`,style:{marginBottom:"12px",fontWeight:"600"},children:o}),(0,r.jsx)("div",{id:`${d}-description`,style:{fontSize:"12px",color:"#666",marginBottom:"8px"},children:l}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Font Size Type","caliph"),value:i,onChange:o=>{((e,o)=>{const l={...b||{},[e]:o};t({fontSizeMode:l})})(e,o);const l="preset"===o?(0,p.__)("Switched to theme preset font sizes","caliph"):(0,p.__)("Switched to custom pixel font sizes","caliph");document.getElementById(h).textContent=l},options:[{label:(0,p.__)("Theme Preset","caliph"),value:"preset"},{label:(0,p.__)("Custom Size","caliph"),value:"custom"}],style:{marginBottom:"12px"},"aria-describedby":`${d}-type-help`}),(0,r.jsx)("div",{id:`${d}-type-help`,style:{fontSize:"11px",color:"#888",marginBottom:"8px"},children:"preset"===i?(0,p.__)("Use predefined theme font sizes for consistency","caliph"):(0,p.__)("Set exact pixel values for precise control","caliph")}),"preset"===i?(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Preset Size","caliph"),value:c,onChange:o=>{((e,o)=>{const l={...x||{},[e]:o};t({fontSizes:l})})(e,o);const l=v.find((e=>e.value===o))?.label||o;document.getElementById(h).textContent=(0,p.__)("Font size changed to: ","caliph")+l},options:v,"aria-describedby":`${d}-preset-help`}):(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Custom Size (px)","caliph"),value:s,onChange:o=>{((e,o)=>{const l={...m||{},[e]:o};t({fontSizePixels:l})})(e,o),clearTimeout(window[`fontSizeTimeout_${e}`]),window[`fontSizeTimeout_${e}`]=setTimeout((()=>{document.getElementById(h).textContent=(0,p.__)("Font size: ","caliph")+o+(0,p.__)(" pixels","caliph")}),500)},min:a.min,max:a.max,step:1,allowReset:!0,resetFallbackValue:a.min,"aria-label":`${o} ${(0,p.__)("font size in pixels","caliph")}`,"aria-describedby":`${d}-range-help`,renderTooltipContent:e=>`${e}px`,trackColor:"#0073aa",color:"#0073aa"}),(0,r.jsx)("div",{id:`${d}-range-help`,style:{fontSize:"11px",color:"#888",marginTop:"4px"},children:"custom"===i&&(0,r.jsxs)(r.Fragment,{children:[(0,p.__)("Range: ","caliph"),a.min,"px - ",a.max,"px.",(0,p.__)("Use arrow keys for fine adjustment, Page Up/Down for larger steps.","caliph")]})}),(0,r.jsx)("div",{id:h,"aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"}})]})},_=(e,l,i)=>{const a=o.map((t=>t.id===e?{...t,[l]:i}:t));t({items:a})};return(0,r.jsxs)(a.InspectorControls,{children:[(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Header Settings","caliph"),initialOpen:!0,children:[(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Show Header","caliph"),checked:c,onChange:e=>t({showHeader:e})}),c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.TextControl,{label:(0,p.__)("Header Title","caliph"),value:l,onChange:e=>t({headerTitle:e})}),(0,r.jsx)(n.TextControl,{label:(0,p.__)("Header Subtitle","caliph"),value:i,onChange:e=>t({headerSubtitle:e})}),(0,r.jsx)(n.TextareaControl,{label:(0,p.__)("Header Description","caliph"),value:s,onChange:e=>t({headerDescription:e}),rows:3})]})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Accordion Settings","caliph"),initialOpen:!0,children:[(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Allow Multiple Open","caliph"),checked:d,onChange:e=>t({allowMultipleOpen:e}),help:(0,p.__)("Allow multiple accordion items to be open at the same time","caliph")}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Icon Style","caliph"),value:h,onChange:e=>t({iconStyle:e}),options:[{label:(0,p.__)("Plus/Minus","caliph"),value:"plus-minus"},{label:(0,p.__)("Arrow Down","caliph"),value:"arrow-down"},{label:(0,p.__)("Chevron Down","caliph"),value:"chevron-down"},{label:(0,p.__)("Triangle","caliph"),value:"triangle"}],help:(0,p.__)("Choose the icon style for accordion toggles","caliph")}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Icon Size","caliph"),value:g,onChange:e=>t({iconSize:e}),min:16,max:32,step:2,help:(0,p.__)("Adjust the size of accordion icons","caliph")})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Accordion Items","caliph"),initialOpen:!1,children:[o.map(((e,l)=>(0,r.jsxs)("div",{style:{marginBottom:"20px",padding:"15px",border:"1px solid #ddd",borderRadius:"4px"},children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"},children:[(0,r.jsxs)("strong",{children:[(0,p.__)("Item","caliph")," ",l+1]}),(0,r.jsx)(n.Button,{isDestructive:!0,isSmall:!0,onClick:()=>{return l=e.id,void t({items:o.filter((e=>e.id!==l))});var l},children:(0,p.__)("Remove","caliph")})]}),(0,r.jsx)(n.TextControl,{label:(0,p.__)("Question","caliph"),value:e.question,onChange:t=>_(e.id,"question",t)}),(0,r.jsx)(n.TextareaControl,{label:(0,p.__)("Answer","caliph"),value:e.answer,onChange:t=>_(e.id,"answer",t),rows:3}),(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Open by Default","caliph"),checked:e.isOpen,onChange:t=>_(e.id,"isOpen",t)})]},e.id))),(0,r.jsx)(n.Button,{isPrimary:!0,onClick:()=>{const e={id:Date.now(),question:"New Question",answer:"New Answer",isOpen:!1};t({items:[...o,e]})},style:{marginTop:"10px"},children:(0,p.__)("Add Item","caliph")})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Typography","caliph"),initialOpen:!1,children:[c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y,{element:"headerTitle",label:(0,p.__)("Header Title Font Size","caliph"),helpText:(0,p.__)("Set the font size for the header title","caliph")}),(0,r.jsx)(y,{element:"headerSubtitle",label:(0,p.__)("Header Subtitle Font Size","caliph"),helpText:(0,p.__)("Set the font size for the header subtitle","caliph")}),(0,r.jsx)(y,{element:"headerDescription",label:(0,p.__)("Header Description Font Size","caliph"),helpText:(0,p.__)("Set the font size for the header description","caliph")})]}),(0,r.jsx)(y,{element:"questionText",label:(0,p.__)("Question Text Font Size","caliph"),helpText:(0,p.__)("Set the font size for accordion questions","caliph")}),(0,r.jsx)(y,{element:"answerText",label:(0,p.__)("Answer Text Font Size","caliph"),helpText:(0,p.__)("Set the font size for accordion answers","caliph")})]}),(0,r.jsx)(V,{attributes:e,setAttributes:t})]})};(0,S.registerBlockType)(q.name,{...q,attributes:{items:{type:"array",default:[{id:1,question:"What services do you offer?",answer:"We provide grooming, hair styling, vet checkups, paw and nail care, training, and more for all types of pets.",isOpen:!0},{id:2,question:"Are your veterinarians certified?",answer:"Our services cover everything from professional grooming and pet styling to routine vet visits, nail trimming, and behavioral training for pets of all sizes.",isOpen:!1},{id:3,question:"Can you handle anxious or aggressive pets?",answer:"From paw care to hair styling, grooming to training, we provide a full range of services designed to keep pets healthy, happy, and well cared for.",isOpen:!1}]},headerTitle:{type:"string",default:"FAQ"},headerSubtitle:{type:"string",default:"Frequently Asked Questions"},headerDescription:{type:"string",default:"At PetCove, we're here to answer all your pet care questions covering grooming, health checkups, training, emergencies, and booking guidance for your furry friends."},showHeader:{type:"boolean",default:!0},allowMultipleOpen:{type:"boolean",default:!1},iconStyle:{type:"string",default:"plus-minus"},iconSize:{type:"number",default:24},colorSettings:{type:"object",default:{}},fontSizes:{type:"object",default:{headerTitle:"xx-large",headerSubtitle:"large",headerDescription:"medium",questionText:"large",answerText:"medium"}},fontSizePixels:{type:"object",default:{headerTitle:32,headerSubtitle:24,headerDescription:16,questionText:20,answerText:16}},fontSizeMode:{type:"object",default:{headerTitle:"preset",headerSubtitle:"preset",headerDescription:"preset",questionText:"preset",answerText:"preset"}}},edit:function({attributes:e,setAttributes:t}){const{items:o,headerTitle:l,headerSubtitle:i,headerDescription:n,showHeader:s,allowMultipleOpen:c,iconStyle:d,iconSize:h,colorSettings:g,fontSizes:x,fontSizePixels:m,fontSizeMode:b}=e,v=e=>{const t=b?.[e]||"preset",o=x?.[e];return"preset"===t&&o?`has-${o}-font-size`:""},f=e=>{if("custom"===(b?.[e]||"preset")){const t=m?.[e];return t?{fontSize:`${t}px`}:{}}return{}},y=(0,a.useBlockProps)({className:"wp-block-caliph-accordion-block"}),[_,C]=(0,w.useState)(o.reduce(((e,t)=>(t.isOpen&&(e[t.id]=!0),e)),{})),j=e=>{C(c?t=>({...t,[e]:!t[e]}):{[e]:!_[e]})},S=(e,l,i)=>{const a=o.map((t=>t.id===e?{...t,[l]:i}:t));t({items:a})},k=e=>{const t=h||24,o={width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};switch(d){case"plus-minus":default:return e?(0,r.jsx)("svg",{...o,children:(0,r.jsx)("path",{d:"M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,r.jsx)("svg",{...o,children:(0,r.jsx)("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"arrow-down":return(0,r.jsx)("svg",{...o,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,r.jsx)("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"chevron-down":return(0,r.jsx)("svg",{...o,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,r.jsx)("path",{d:"M8 10L12 14L16 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"triangle":return(0,r.jsx)("svg",{...o,style:{transform:e?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,r.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}};return(0,r.jsxs)("div",{...y,children:[(0,r.jsx)(G,{attributes:e,setAttributes:t}),(0,r.jsxs)("div",{className:"accordion-layout",children:[s&&(0,r.jsxs)("div",{className:"accordion-header",children:[(0,r.jsx)(a.RichText,{tagName:"h2",className:`header-title ${v("headerTitle")}`,value:l,onChange:e=>t({headerTitle:e}),placeholder:(0,p.__)("Enter header title...","caliph"),allowedFormats:["core/bold","core/italic"],style:{color:g&&g.headerTitle||"var(--wp--preset--color--contrast)",...f("headerTitle")}}),(0,r.jsx)(a.RichText,{tagName:"h3",className:`header-subtitle ${v("headerSubtitle")}`,value:i,onChange:e=>t({headerSubtitle:e}),placeholder:(0,p.__)("Enter header subtitle...","caliph"),allowedFormats:["core/bold","core/italic"],style:{color:g&&g.headerSubtitle||"var(--wp--preset--color--accent-5)",...f("headerSubtitle")}}),(0,r.jsx)(a.RichText,{tagName:"p",className:`header-description ${v("headerDescription")}`,value:n,onChange:e=>t({headerDescription:e}),placeholder:(0,p.__)("Enter header description...","caliph"),allowedFormats:["core/bold","core/italic","core/link"],style:{color:g&&g.headerDescription||"var(--wp--preset--color--accent-4)",...f("headerDescription")}})]}),(0,r.jsx)("div",{className:"accordion-items",children:o.map(((e,t)=>{const o=_[e.id],l=u()("accordion-item",{"is-open":o});return(0,r.jsxs)("div",{className:l,"data-icon-size":h,children:[(0,r.jsxs)("div",{className:"accordion-question",onClick:()=>j(e.id),role:"button",tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),j(e.id))},"aria-expanded":o,"aria-controls":`accordion-answer-${e.id}`,children:[(0,r.jsx)(a.RichText,{tagName:"h2",className:`question-text ${v("questionText")}`,value:`${t+1}. ${e.question}`,onChange:t=>{const o=t.replace(/^\d+\.\s*/,"");S(e.id,"question",o)},placeholder:(0,p.__)("Enter question...","caliph"),allowedFormats:["core/bold","core/italic"],style:{color:o?g&&g.questionOpen||"inherit":g&&g.questionClosed||"inherit",...f("questionText")}}),(0,r.jsx)("div",{className:"accordion-icon",style:{color:o?g&&g.iconOpen||"inherit":g&&g.iconClosed||"inherit"},children:k(o)})]}),(0,r.jsx)("div",{id:`accordion-answer-${e.id}`,className:"accordion-answer","aria-hidden":!o,children:(0,r.jsx)(a.RichText,{tagName:"p",className:`answer-text ${v("answerText")}`,value:e.answer,onChange:t=>S(e.id,"answer",t),placeholder:(0,p.__)("Enter answer...","caliph"),allowedFormats:["core/bold","core/italic","core/link"],style:{color:g&&g.answerText||"inherit",...f("answerText")}})})]},e.id)}))})]})]})},save:function({attributes:e}){const{items:t,headerTitle:o,headerSubtitle:l,headerDescription:i,showHeader:n,allowMultipleOpen:s,iconStyle:c,iconSize:p,colorSettings:d,fontSizes:h,fontSizePixels:g,fontSizeMode:x}=e,m=e=>{const t=x?.[e]||"preset",o=h?.[e];return"preset"===t&&o?`has-${o}-font-size`:""},b=e=>{if("custom"===(x?.[e]||"preset")){const t=g?.[e];return t?{fontSize:`${t}px`}:{}}return{}},v=a.useBlockProps.save({className:"wp-block-caliph-accordion-block"}),f=e=>{const t=p||24,o={width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};switch(c){case"plus-minus":default:return e?(0,r.jsx)("svg",{...o,children:(0,r.jsx)("path",{d:"M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,r.jsx)("svg",{...o,children:(0,r.jsx)("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"arrow-down":return(0,r.jsx)("svg",{...o,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,r.jsx)("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"chevron-down":return(0,r.jsx)("svg",{...o,style:{transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,r.jsx)("path",{d:"M8 10L12 14L16 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});case"triangle":return(0,r.jsx)("svg",{...o,style:{transform:e?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.3s ease"},children:(0,r.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}};return(0,r.jsx)("div",{...v,children:(0,r.jsxs)("div",{className:"accordion-layout",children:[n&&(0,r.jsxs)("div",{className:"accordion-header",children:[(0,r.jsx)(a.RichText.Content,{tagName:"h2",className:`header-title ${m("headerTitle")}`,value:o,style:{color:d&&d.headerTitle||"var(--wp--preset--color--contrast)",...b("headerTitle")}}),(0,r.jsx)(a.RichText.Content,{tagName:"h3",className:`header-subtitle ${m("headerSubtitle")}`,value:l,style:{color:d&&d.headerSubtitle||"var(--wp--preset--color--accent-5)",...b("headerSubtitle")}}),(0,r.jsx)(a.RichText.Content,{tagName:"p",className:`header-description ${m("headerDescription")}`,value:i,style:{color:d&&d.headerDescription||"var(--wp--preset--color--accent-4)",...b("headerDescription")}})]}),(0,r.jsx)("div",{className:"accordion-items",children:t.map(((e,t)=>{const o=u()("accordion-item",{"is-open":e.isOpen});return(0,r.jsxs)("div",{className:o,"data-icon-size":p,children:[(0,r.jsxs)("div",{className:"accordion-question",role:"button",tabIndex:0,"aria-expanded":e.isOpen,"aria-controls":`accordion-answer-${e.id}`,"data-accordion-toggle":!0,"data-item-id":e.id,children:[(0,r.jsx)(a.RichText.Content,{tagName:"h2",className:`question-text ${m("questionText")}`,value:`${t+1}. ${e.question}`,style:{color:e.isOpen?d&&d.questionOpen||"inherit":d&&d.questionClosed||"inherit",...b("questionText")}}),(0,r.jsx)("div",{className:"accordion-icon","data-icon-style":c,"data-icon-size":p,style:{color:e.isOpen?d&&d.iconOpen||"inherit":d&&d.iconClosed||"inherit"},children:f(e.isOpen)})]}),(0,r.jsx)("div",{id:`accordion-answer-${e.id}`,className:"accordion-answer","aria-hidden":!e.isOpen,children:(0,r.jsx)(a.RichText.Content,{tagName:"p",className:`answer-text ${m("answerText")}`,value:e.answer,style:{color:d&&d.answerText||"inherit",...b("answerText")}})})]},e.id)}))})]})})}}),o(652);const K=(0,r.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(k.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),Z=(0,r.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(k.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})}),{registerBlockType:Q}=wp.blocks;Q("caliph/button-widget",{title:(0,p.__)("Button Widget","caliph"),description:(0,p.__)("A fully customizable button widget with text and icon-only variations, supporting circular icon-only display.","caliph"),category:"widgets",icon:"button",keywords:["button","widget","cta","icon","customizable"],supports:{html:!0,align:["wide","full"],spacing:{margin:!0,padding:!0},color:{text:!0,background:!0}},attributes:{buttonText:{type:"string",default:"Add text..."},buttonUrl:{type:"string",default:""},openInNewTab:{type:"boolean",default:!1},buttonType:{type:"string",default:"text-with-icon"},iconType:{type:"string",default:"arrow"},customIcon:{type:"string",default:"↗"},customIconImageId:{type:"number",default:0},customIconImageUrl:{type:"string",default:""},customIconImageAlt:{type:"string",default:""},backgroundColor:{type:"string",default:"var(--wp--preset--color--contrast)"},textColor:{type:"string",default:"var(--wp--preset--color--base)"},iconBackgroundColor:{type:"string",default:"var(--wp--preset--color--base)"},iconColor:{type:"string",default:"var(--wp--preset--color--contrast)"},hoverBackgroundColor:{type:"string",default:""},hoverTextColor:{type:"string",default:""},hoverIconColor:{type:"string",default:""},hoverIconBackgroundColor:{type:"string",default:""},borderRadius:{type:"number",default:25},borderWidth:{type:"number",default:0},borderColor:{type:"string",default:""},fontSize:{type:"number",default:16},fontWeight:{type:"string",default:"600"},iconSize:{type:"number",default:16},iconCircleSize:{type:"number",default:38},gap:{type:"number",default:12},padding:{type:"object",default:{top:"5px",right:"5px",bottom:"5px",left:"20px"}},margin:{type:"object",default:{top:"0px",right:"0px",bottom:"0px",left:"0px"}},width:{type:"string",default:"fit-content"},height:{type:"string",default:"auto"},alignment:{type:"string",default:"left"},hoverEffect:{type:"boolean",default:!0},shadowEnabled:{type:"boolean",default:!0},shadowColor:{type:"string",default:"rgba(0,0,0,0.1)"},shadowBlur:{type:"number",default:4},shadowOffsetX:{type:"number",default:0},shadowOffsetY:{type:"number",default:2},showBgColorPicker:{type:"boolean",default:!1},showTextColorPicker:{type:"boolean",default:!1},showIconBgColorPicker:{type:"boolean",default:!1},showIconColorPicker:{type:"boolean",default:!1},emailPlaceholder:{type:"string",default:"Enter Your Email Address"},emailInputStyle:{type:"string",default:"white-input-dark-button"},formAction:{type:"string",default:""},formMethod:{type:"string",default:"post"}},edit:({attributes:e,setAttributes:t,isSelected:o})=>{const l=(0,a.useSetting)("color.palette")||[],i=e=>`var:preset|color|${e}`,s=e=>e&&(e=>"string"==typeof e&&e.startsWith("var:preset|color|"))(e)?`var(--wp--preset--color--${e.split("|").pop()})`:e,[c,d]=(0,w.useState)({bgColor:!1,textColor:!1,iconBgColor:!1,iconColor:!1,borderColor:!1,hoverBgColor:!1,hoverTextColor:!1,hoverIconBgColor:!1,hoverIconColor:!1}),h=e=>{d((t=>({...t,[e]:!t[e]})))},{buttonText:g,buttonUrl:u,openInNewTab:x,buttonType:m,iconType:b,customIcon:v,customIconImageId:f,customIconImageUrl:y,customIconImageAlt:_,backgroundColor:C,textColor:j,iconBackgroundColor:S,iconColor:k,hoverBackgroundColor:B,hoverTextColor:I,hoverIconColor:T,hoverIconBackgroundColor:N,borderRadius:P,borderWidth:F,borderColor:z,fontSize:R,fontWeight:$,iconSize:H,iconCircleSize:M,gap:E,padding:L,margin:W,width:O,height:A,alignment:D,hoverEffect:U,shadowEnabled:q,shadowColor:V,shadowBlur:G,shadowOffsetX:Q,shadowOffsetY:Y,emailPlaceholder:J,emailInputStyle:X,formAction:ee,formMethod:te}=e,oe={backgroundColor:"var:preset|color|contrast",textColor:"var:preset|color|base",iconBackgroundColor:"var:preset|color|base",iconColor:"var:preset|color|contrast",hoverBackgroundColor:"var:preset|color|accent-5",hoverTextColor:"var:preset|color|base",hoverIconBackgroundColor:"var:preset|color|accent-1",hoverIconColor:"var:preset|color|contrast",borderColor:"",shadowColor:"rgba(0,0,0,0.1)"},le=(e,o)=>{null==o?t({[e]:oe[e]}):((e,o)=>{if(null==o)return;const a=(e=>{if(!e||!Array.isArray(l))return null;const t=String(e).toLowerCase(),o=l.find((e=>String(e.color).toLowerCase()===t));return o?o.slug:null})(o);t(a?{[e]:i(a)}:{[e]:o})})(e,o)},[ie,ae]=(0,w.useState)(!1),ne=()=>{switch(b){case"arrow":default:return(0,r.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"chevron":return(0,r.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"plus":return(0,r.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"image":return y?(0,r.jsx)("img",{src:y,alt:_||"",style:{display:"block",width:"1em",height:"1em",objectFit:"contain"}}):(0,r.jsx)("span",{style:{fontSize:"0.8em",lineHeight:1},children:"[+]"});case"custom":return v}},re={color:s(j),fontSize:`${R}px`,fontWeight:$},se={position:"relative",display:"inline-flex",alignItems:"center",gap:"icon-only"===m?"0px":`${E}px`,backgroundColor:s("icon-only"===m?S:C),color:s("icon-only"===m?k:j),borderRadius:"icon-only"===m?"50%":`${P}px`,border:F>0?`${F}px solid ${s(z)}`:"none",fontSize:`${R}px`,fontWeight:$,padding:"icon-only"===m?"0":`${L.top} ${L.right} ${L.bottom} ${L.left}`,margin:`${W.top} ${W.right} ${W.bottom} ${W.left}`,width:"icon-only"===m?`${M}px`:O,height:"icon-only"===m?`${M}px`:A,textAlign:D,textDecoration:"none",cursor:"pointer",boxShadow:q?`${Q}px ${Y}px ${G}px ${V}`:"none",justifyContent:"icon-only"===m?"center":"flex-start","--button-icon-color":s(k),...B?{"--button-hover-bg-color":s(B)}:{},...I?{"--button-hover-text-color":s(I)}:{},...T?{"--button-icon-hover-color":s(T)}:{},...N?{"--button-hover-icon-bg-color":s(N)}:{}},ce={display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${M}px`,height:`${M}px`,backgroundColor:s(S),color:s(k),borderRadius:"50%",fontSize:`${H}px`,fontWeight:"bold",boxShadow:q?"0 2px 4px rgba(0,0,0,0.1)":"none"},pe=(0,a.useBlockProps)({className:"button-widget-container",style:{textAlign:D}});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.BlockControls,{children:[(0,r.jsx)(a.AlignmentToolbar,{value:D,onChange:e=>t({alignment:e})}),(0,r.jsx)(n.Button,{icon:u?K:Z,label:u?(0,p.__)("Edit link","caliph"):(0,p.__)("Add link","caliph"),onClick:()=>ae(!ie),isPressed:ie})]}),(0,r.jsxs)(a.InspectorControls,{children:[(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Button Settings","caliph"),initialOpen:!0,children:[(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Button Type","caliph"),value:m,options:[{label:(0,p.__)("Text with Icon","caliph"),value:"text-with-icon"},{label:(0,p.__)("Text Only","caliph"),value:"text-only"},{label:(0,p.__)("Icon Only","caliph"),value:"icon-only"},{label:(0,p.__)("Email Input","caliph"),value:"email-input"}],onChange:e=>t({buttonType:e})}),"text-only"!==m&&"email-input"!==m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Icon Type","caliph"),value:b,options:[{label:(0,p.__)("Arrow","caliph"),value:"arrow"},{label:(0,p.__)("Chevron","caliph"),value:"chevron"},{label:(0,p.__)("Plus","caliph"),value:"plus"},{label:(0,p.__)("Custom Character","caliph"),value:"custom"},{label:(0,p.__)("Upload Image","caliph"),value:"image"}],onChange:e=>t({iconType:e})}),"custom"===b&&(0,r.jsx)(n.TextControl,{label:(0,p.__)("Custom Icon","caliph"),value:v,onChange:e=>t({customIcon:e}),help:(0,p.__)("Enter any character or symbol","caliph")}),"image"===b&&(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,r.jsx)(a.MediaUpload,{onSelect:e=>{t({customIconImageId:e.id||0,customIconImageUrl:(e.sizes&&e.sizes.thumbnail?e.sizes.thumbnail.url:e.url)||"",customIconImageAlt:e.alt||e.title||""})},allowedTypes:["image"],value:f,render:({open:e})=>(0,r.jsx)(n.Button,{variant:"secondary",onClick:e,children:y?(0,p.__)("Change Icon Image","caliph"):(0,p.__)("Select Icon Image","caliph")})}),y&&(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,r.jsx)("img",{src:y,alt:"",style:{width:"32px",height:"32px",objectFit:"contain",background:"#fff",border:"1px solid #ddd"}}),(0,r.jsx)(n.Button,{variant:"link",isDestructive:!0,onClick:()=>t({customIconImageId:0,customIconImageUrl:"",customIconImageAlt:""}),children:(0,p.__)("Remove","caliph")})]})]})]}),"email-input"===m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.TextControl,{label:(0,p.__)("Email Placeholder","caliph"),value:J,onChange:e=>t({emailPlaceholder:e})}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Email Input Style","caliph"),value:X,options:[{label:(0,p.__)("White Input, Dark Button","caliph"),value:"white-input-dark-button"},{label:(0,p.__)("Dark Input, White Button","caliph"),value:"dark-input-white-button"}],onChange:e=>t({emailInputStyle:e})}),(0,r.jsx)(n.TextControl,{label:(0,p.__)("Form Action URL","caliph"),value:ee,onChange:e=>t({formAction:e}),help:(0,p.__)("URL where the form will be submitted (optional)","caliph")}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Form Method","caliph"),value:te,options:[{label:(0,p.__)("POST","caliph"),value:"post"},{label:(0,p.__)("GET","caliph"),value:"get"}],onChange:e=>t({formMethod:e})})]}),"email-input"!==m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.TextControl,{label:(0,p.__)("Button URL","caliph"),value:u,onChange:e=>t({buttonUrl:e})}),(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Open in new tab","caliph"),checked:x,onChange:e=>t({openInNewTab:e})})]})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Colors","caliph"),initialOpen:!0,children:[(0,r.jsxs)("div",{style:{marginBottom:"16px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontWeight:"600"},children:(0,p.__)("Color Settings","caliph")}),(0,r.jsx)(n.Button,{variant:"secondary",size:"small",onClick:()=>{t({backgroundColor:oe.backgroundColor,textColor:oe.textColor,iconBackgroundColor:oe.iconBackgroundColor,iconColor:oe.iconColor,hoverBackgroundColor:oe.hoverBackgroundColor,hoverTextColor:oe.hoverTextColor,hoverIconBackgroundColor:oe.hoverIconBackgroundColor,hoverIconColor:oe.hoverIconColor,borderColor:oe.borderColor,shadowColor:oe.shadowColor})},style:{fontSize:"12px",padding:"4px 8px"},children:(0,p.__)("Reset All","caliph")})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("bgColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Background Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.bgColor?"▲":"▼"})]}),c.bgColor&&(0,r.jsxs)("div",{style:{padding:"12px 0"},children:[(0,r.jsx)(a.ColorPalette,{value:s(C),onChange:e=>le("backgroundColor",e),clearable:!0,colors:l}),C===oe.backgroundColor&&(0,r.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,p.__)("Using theme default color","caliph")})]})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("textColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Text Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.textColor?"▲":"▼"})]}),c.textColor&&(0,r.jsxs)("div",{style:{padding:"12px 0"},children:[(0,r.jsx)(a.ColorPalette,{value:s(j),onChange:e=>le("textColor",e),clearable:!0,colors:l}),j===oe.textColor&&(0,r.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,p.__)("Using theme default color","caliph")})]})]}),"text-only"!==m&&"email-input"!==m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("iconBgColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Icon Background Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.iconBgColor?"▲":"▼"})]}),c.iconBgColor&&(0,r.jsxs)("div",{style:{padding:"12px 0"},children:[(0,r.jsx)(a.ColorPalette,{value:s(S),onChange:e=>le("iconBackgroundColor",e),clearable:!0,colors:l}),S===oe.iconBackgroundColor&&(0,r.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,p.__)("Using theme default color","caliph")})]})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("iconColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Icon Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.iconColor?"▲":"▼"})]}),c.iconColor&&(0,r.jsxs)("div",{style:{padding:"12px 0"},children:[(0,r.jsx)(a.ColorPalette,{value:s(k),onChange:e=>le("iconColor",e),clearable:!0,colors:l}),k===oe.iconColor&&(0,r.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,p.__)("Using theme default color","caliph")})]})]})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("borderColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Border Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.borderColor?"▲":"▼"})]}),c.borderColor&&(0,r.jsxs)("div",{style:{padding:"12px 0"},children:[(0,r.jsx)(a.ColorPalette,{value:s(z),onChange:e=>le("borderColor",e),clearable:!0,colors:[{name:"Transparent",color:"transparent"},...l]}),z!==oe.borderColor&&""!==z&&z?(0,r.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:F>0?(0,p.__)("Border color applied","caliph"):(0,p.__)("Border color set (increase border width to show)","caliph")}):(0,r.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"8px",display:"block"},children:(0,p.__)("No border color (default)","caliph")})]})]}),(0,r.jsxs)("div",{style:{marginTop:"16px",paddingTop:"8px",borderTop:"1px solid #e0e0e0"},children:[(0,r.jsx)("div",{style:{marginBottom:"8px",fontWeight:600},children:(0,p.__)("Hover Colors","caliph")}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("hoverBgColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Hover Background","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.hoverBgColor?"▲":"▼"})]}),c.hoverBgColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{value:s(B),onChange:e=>le("hoverBackgroundColor",e),clearable:!0,colors:l})})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("hoverTextColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Hover Text","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.hoverTextColor?"▲":"▼"})]}),c.hoverTextColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{value:s(I),onChange:e=>le("hoverTextColor",e),clearable:!0,colors:l})})]}),"text-only"!==m&&"email-input"!==m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("hoverIconBgColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Hover Icon Background","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.hoverIconBgColor?"▲":"▼"})]}),c.hoverIconBgColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{value:s(N),onChange:e=>le("hoverIconBackgroundColor",e),clearable:!0,colors:l})})]}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsxs)("div",{className:"caliph-color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>h("hoverIconColor"),children:[(0,r.jsx)("span",{children:(0,p.__)("Hover Icon Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:c.hoverIconColor?"▲":"▼"})]}),c.hoverIconColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{value:s(T),onChange:e=>le("hoverIconColor",e),clearable:!0,colors:l})})]})]})]})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Typography","caliph"),initialOpen:!1,children:[(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Font Size","caliph"),value:R,onChange:e=>t({fontSize:e}),min:10,max:48}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Font Weight","caliph"),value:$,options:[{label:(0,p.__)("Normal","caliph"),value:"400"},{label:(0,p.__)("Medium","caliph"),value:"500"},{label:(0,p.__)("Semi Bold","caliph"),value:"600"},{label:(0,p.__)("Bold","caliph"),value:"700"},{label:(0,p.__)("Extra Bold","caliph"),value:"800"}],onChange:e=>t({fontWeight:e})}),"text-only"!==m&&"email-input"!==m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Icon Size","caliph"),value:H,onChange:e=>t({iconSize:e}),min:10,max:32}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Icon Circle Size","caliph"),value:M,onChange:e=>t({iconCircleSize:e}),min:20,max:60})]})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Spacing & Layout","caliph"),initialOpen:!1,children:["icon-only"!==m&&"email-input"!==m&&(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Gap between text and icon","caliph"),value:E,onChange:e=>t({gap:e}),min:0,max:30}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Border Radius","caliph"),value:P,onChange:e=>t({borderRadius:e}),min:0,max:50}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Border Width","caliph"),value:F,onChange:e=>t({borderWidth:e}),min:0,max:10}),"icon-only"!==m&&"email-input"!==m&&(0,r.jsx)(n.__experimentalBoxControl,{label:(0,p.__)("Padding","caliph"),values:L,onChange:e=>t({padding:e})}),(0,r.jsx)(n.__experimentalBoxControl,{label:(0,p.__)("Margin","caliph"),values:W,onChange:e=>t({margin:e})})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Effects","caliph"),initialOpen:!1,children:[(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Enable Hover Effect","caliph"),checked:U,onChange:e=>t({hoverEffect:e})}),(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Enable Shadow","caliph"),checked:q,onChange:e=>t({shadowEnabled:e})}),q&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("label",{children:(0,p.__)("Shadow Color","caliph")}),(0,r.jsx)(a.ColorPalette,{value:s(V),onChange:e=>le("shadowColor",e),clearable:!0,colors:l}),V===oe.shadowColor&&(0,r.jsx)("small",{style:{color:"#666",fontSize:"12px",marginTop:"4px",display:"block"},children:(0,p.__)("Using default shadow color","caliph")})]}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Shadow Blur","caliph"),value:G,onChange:e=>t({shadowBlur:e}),min:0,max:20}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Shadow Offset X","caliph"),value:Q,onChange:e=>t({shadowOffsetX:e}),min:-10,max:10}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Shadow Offset Y","caliph"),value:Y,onChange:e=>t({shadowOffsetY:e}),min:-10,max:10})]})]})]}),(0,r.jsxs)("div",{...pe,children:[ie&&"email-input"!==m&&(0,r.jsx)("div",{style:{marginBottom:"16px"},children:(0,r.jsx)(a.URLInput,{value:u,onChange:e=>t({buttonUrl:e}),placeholder:(0,p.__)("Enter URL...","caliph")})}),"email-input"===m?(0,r.jsxs)("div",{className:`email-input-container ${X}`,children:[(0,r.jsx)("input",{type:"email",className:"email-input",placeholder:J,value:g,onChange:e=>t({buttonText:e}),style:{pointerEvents:"none"},readOnly:!0}),(0,r.jsx)("div",{className:"email-submit-button",children:ne()})]}):(0,r.jsx)("div",{style:se,className:`button-widget ${U?"has-hover-effect":""} ${B||I||T||N?"has-custom-hover-colors":""} ${"icon-only"===m?"icon-only":""} ${"text-only"===m?"text-only":""}`,children:"icon-only"===m?(0,r.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:0,margin:0},children:(0,r.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"1em",height:"1em",fontSize:`${H}px`,lineHeight:"1",flexShrink:0},children:ne()})}):(0,r.jsxs)(r.Fragment,{children:["text-only"!==m&&(0,r.jsx)(a.RichText,{tagName:"span",value:g,onChange:e=>t({buttonText:e}),placeholder:(0,p.__)("Add text...","caliph"),allowedFormats:[],style:{...re,flex:1}}),"text-only"===m&&(0,r.jsx)(a.RichText,{tagName:"span",value:g,onChange:e=>t({buttonText:e}),placeholder:(0,p.__)("Add text...","caliph"),allowedFormats:[],style:re}),"text-with-icon"===m&&(0,r.jsx)("span",{style:ce,children:ne()})]})})]})]})},save:({attributes:e})=>{const{buttonText:t,buttonUrl:o,openInNewTab:l,buttonType:i,iconType:n,customIcon:s,customIconImageId:c,customIconImageUrl:p,customIconImageAlt:d,backgroundColor:h,textColor:g,iconBackgroundColor:u,iconColor:x,hoverBackgroundColor:m,hoverTextColor:b,hoverIconColor:v,hoverIconBackgroundColor:f,borderRadius:y,borderWidth:_,borderColor:C,fontSize:j,fontWeight:S,iconSize:w,iconCircleSize:k,gap:B,padding:I,margin:T,width:N,height:P,alignment:F,hoverEffect:z,shadowEnabled:R,shadowColor:$,shadowBlur:H,shadowOffsetX:M,shadowOffsetY:E,emailPlaceholder:L,emailInputStyle:W,formAction:O,formMethod:A}=e,D=()=>{switch(n){case"arrow":default:return(0,r.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"chevron":return(0,r.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"plus":return(0,r.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})});case"image":return p?(0,r.jsx)("img",{src:p,alt:d||"",style:{display:"block",width:"1em",height:"1em",objectFit:"contain"}}):null;case"custom":return s}},U=e=>e&&"string"==typeof e&&e.startsWith("var:preset|color|")?`var(--wp--preset--color--${e.split("|").pop()})`:e,q={color:U(g),fontSize:`${j}px`,fontWeight:S},V={position:"relative",display:"inline-flex",alignItems:"center",gap:"icon-only"===i?"0px":`${B}px`,backgroundColor:U("icon-only"===i?u:h),color:U("icon-only"===i?x:g),borderRadius:"icon-only"===i?"50%":`${y}px`,border:_>0?`${_}px solid ${U(C)}`:"none",fontSize:`${j}px`,fontWeight:S,padding:"icon-only"===i?"0":`${I.top} ${I.right} ${I.bottom} ${I.left}`,margin:`${T.top} ${T.right} ${T.bottom} ${T.left}`,width:"icon-only"===i?`${k}px`:N,height:"icon-only"===i?`${k}px`:P,textAlign:F,textDecoration:"none",cursor:"pointer",boxShadow:R?`${M}px ${E}px ${H}px ${$}`:"none",justifyContent:"icon-only"===i?"center":"flex-start","--button-icon-color":U(x),"--button-hover-bg-color":U(m),"--button-hover-text-color":U(b),"--button-icon-hover-color":U(v),"--button-hover-icon-bg-color":U(f)},G={display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${k}px`,height:`${k}px`,backgroundColor:U(u),color:U(x),borderRadius:"50%",fontSize:`${w}px`,fontWeight:"bold",boxShadow:R?"0 2px 4px rgba(0,0,0,0.1)":"none"},K=a.useBlockProps.save({className:"button-widget-container",style:{textAlign:F}}),Z=()=>(0,r.jsx)("div",{style:V,className:`button-widget ${z?"has-hover-effect":""} ${m||b||v||f?"has-custom-hover-colors":""} ${"icon-only"===i?"icon-only":""} ${"text-only"===i?"text-only":""}`,children:"icon-only"===i?(0,r.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:0,margin:0},children:(0,r.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"1em",height:"1em",fontSize:`${w}px`,lineHeight:"1",flexShrink:0},children:D()})}):(0,r.jsxs)(r.Fragment,{children:["text-only"!==i&&(0,r.jsx)("span",{style:{...q,flex:1},children:t}),"text-only"===i&&(0,r.jsx)("span",{style:q,children:t}),"text-with-icon"===i&&(0,r.jsx)("div",{style:G,children:(0,r.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"1em",height:"1em",fontSize:`${w}px`,lineHeight:"1",flexShrink:0},children:D()})})]})}),Q=()=>(0,r.jsxs)("form",{className:`email-input-container ${W}`,action:O||"#",method:A,onSubmit:e=>{e.preventDefault(),alert("Form submitted! (Note: Actual submission requires additional setup)")},children:[(0,r.jsx)("input",{type:"email",className:"email-input",placeholder:L,name:"email",required:!0}),(0,r.jsx)("button",{type:"submit",className:"email-submit-button",children:D()})]});return(0,r.jsx)("div",{...K,children:"email-input"===i?(0,r.jsx)(Q,{}):o?(0,r.jsx)("a",{href:o,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:(0,r.jsx)(Z,{})}):(0,r.jsx)(Z,{})})}});const{registerBlockType:Y}=wp.blocks,J=["image"];Y("caliph/card-widget",{title:(0,p.__)("Card Widget","caliph"),icon:"id-alt",category:"widgets",edit:({attributes:e,setAttributes:t,clientId:o})=>{const{cardStyle:l,cardImage:i,cardBackgroundColor:s,iconBackgroundColor:c,titleColor:d,descriptionColor:h,actionButtonColor:g,actionButtonIconColor:u,iconUrl:x,iconSize:m,iconBackgroundSize:b,titleFontSize:v,titleFontWeight:f,descriptionFontSize:y,descriptionFontWeight:_,title:j,description:S,actionButtonUrl:k,borderRadius:B,cardPadding:I,customPadding:T,useCustomPadding:N,hoverEffect:P,hoverIntensity:F,enableHoverEffects:z,cardHoverBackgroundColor:R,titleHoverColor:$,descriptionHoverColor:H,actionButtonHoverColor:M,actionButtonIconHoverColor:E,iconHoverBackgroundColor:L,actionButtonVisibility:W,buttonAlignment:O,enableHoverColorTransitions:A,hoverTransitionDuration:D,buttonPositionTop:U,buttonPositionRight:q,buttonPositionBottom:V,buttonPositionLeft:G,buttonPositionUnit:K,shapeType:Z,shapeColor:Q,shapeHoverColor:Y,shapeSize:X,shapePositionTop:ee,shapePositionRight:te,shapePositionBottom:oe,shapePositionLeft:le,shapePositionUnit:ie,shapeRotation:ae,shapeOpacity:ne,cardWidth:re,cardHeight:se,imageWidth:ce,imageHeight:pe,titleGap:de,descriptionGap:he,buttonGap:ge,imageGap:ue,dogTrainingLayout:xe,vetProfileTitle:me,vetProfileDesignation:be,vetProfileImage:ve,vetProfileBackgroundColor:fe,vetProfileTitleColor:ye,vetProfileDesignationColor:_e,vetProfileInfoPadding:Ce,vetProfileInfoPositionTop:je,vetProfileInfoPositionLeft:Se,vetProfileInfoPositionRight:we,vetProfileInfoPositionBottom:ke,vetProfileInfoBorderRadius:Be,cardAlignment:Ie}=e,Te=R||L||$||H||M||E,Ne="hover"===W,Pe=N&&T?`${T.top||"0"} ${T.right||"0"} ${T.bottom||"0"} ${T.left||"0"}`:`${I}px`,Fe=(0,a.useBlockProps)({className:["caliph-card-widget",`card-style-${l}`,`align-${Ie}`,P&&`hover-effect-${P}`,W&&`action-button-${W}`,z?"hover-enabled":"hover-disabled",A&&Te?"hover-colors-enabled":"hover-colors-disabled",Te?"has-hover-colors":"no-hover-colors",Y&&"has-shape-hover-color","dog-training"===l&&`layout-${xe}`].filter(Boolean).join(" "),"data-hover-effects":Ne?"enabled":"disabled",style:{"--card-bg-color":s,"--icon-bg-color":c,"--title-color":d,"--description-color":h,"--action-button-color":g,"--action-button-icon-color":u,"--border-radius":`${B}px`,"--card-padding":`${I}px`,"--custom-padding":Pe,"--icon-size":`${m}px`,"--icon-bg-size":`${b}px`,"--title-font-size":`${v}px`,"--title-font-weight":f,"--description-font-size":`${y}px`,"--description-font-weight":_,"--hover-intensity":F,"--hover-enabled":z?1:0,...R&&{"--card-hover-bg-color":R},...$&&{"--title-hover-color":$},...H&&{"--description-hover-color":H},...M&&{"--action-button-hover-color":M},...E&&{"--action-button-icon-hover-color":E},...L&&{"--icon-hover-bg-color":L},"--hover-transition-duration":`${D}ms`,"--button-position-top":U?`${U}${K}`:"auto","--button-position-right":q?`${q}${K}`:"auto","--button-position-bottom":V?`${V}${K}`:"auto","--button-position-left":G?`${G}${K}`:"auto","--button-position-type":0!==U||0!==q||0!==V||0!==G?"absolute":"static","--shape-color":Q,"--shape-hover-color":Y,"--shape-size":`${X}px`,"--shape-position-top":ee?`${ee}${ie}`:"auto","--shape-position-right":te?`${te}${ie}`:"auto","--shape-position-bottom":oe?`${oe}${ie}`:"auto","--shape-position-left":le?`${le}${ie}`:"auto","--shape-rotation":ae,"--shape-opacity":ne,"--card-width":`${re}px`,"--card-height":`${se}px`,"--image-width":`${ce}px`,"--image-height":`${pe}px`,"--title-gap":`${de}px`,"--description-gap":`${he}px`,"--button-gap":`${ge}px`,"--image-gap":`${ue}px`,"--vet-profile-bg-color":fe,"--vet-profile-title-color":ye,"--vet-profile-designation-color":_e,...ve&&{"--vet-profile-bg-image":`url(${ve})`},"--vet-profile-info-padding":`${Ce}px`,"--vet-profile-info-position-top":`${je}px`,"--vet-profile-info-position-left":`${Se}px`,"--vet-profile-info-position-right":`${we}px`,"--vet-profile-info-position-bottom":`${ke}px`,"--vet-profile-info-border-radius":`${Be}px`}}),ze=(0,C.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return t().colors}),[]),Re=e=>{if(!e||!ze)return e;if(e.startsWith("var(--wp--preset--color--")){const t=e.match(/var\(--wp--preset--color--([^,)]+)/)?.[1];if(t){const o=ze.find((e=>e.slug===t));return o?o.color:e}}return e},$e=(e,o)=>{const l=(e=>{if(!e||!ze)return e;if(e.startsWith("var("))return e;const t=ze.find((t=>t.color===e));return t&&t.slug?`var(--wp--preset--color--${t.slug})`:e})(o);t({[e]:l})},[He,Me]=(0,w.useState)({cardBackgroundColor:!1,titleColor:!1,descriptionColor:!1,actionButtonColor:!1,actionButtonIconColor:!1,iconBackgroundColor:!1,cardHoverBackgroundColor:!1,iconHoverBackgroundColor:!1,titleHoverColor:!1,descriptionHoverColor:!1,actionButtonHoverColor:!1,actionButtonIconHoverColor:!1,shapeColor:!1,shapeHoverColor:!1,vetProfileBackgroundColor:!1}),[Ee,Le]=(0,w.useState)(0!==U||0!==q||0!==V||0!==G),We=e=>{Me((t=>({...t,[e]:!t[e]})))},Oe=[{id:"default",name:(0,p.__)("Default","caliph")},{id:"cat-grooming",name:(0,p.__)("Cat Grooming","caliph")},{id:"dog-training",name:(0,p.__)("Dog Training","caliph")},{id:"vet-profile",name:(0,p.__)("Vet Profile","caliph")}],Ae={default:{width:400,height:358},"cat-grooming":{width:399,height:532},"dog-training":{width:830,height:257},"vet-profile":{width:400,height:480}};return(0,r.jsxs)("div",{...Fe,children:[(0,r.jsxs)(a.InspectorControls,{children:[(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Card Style","caliph"),initialOpen:!0,children:[(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Select Card Style","caliph"),value:l,options:Oe.map((e=>({label:e.name,value:e.id}))),onChange:e=>{const o=Ae[e];o&&t({cardStyle:e,cardWidth:o.width,cardHeight:o.height})}}),("cat-grooming"===l||"dog-training"===l)&&(0,r.jsxs)("div",{className:"card-image-control",children:[(0,r.jsx)(a.MediaUploadCheck,{children:(0,r.jsx)(a.MediaUpload,{onSelect:e=>t({cardImage:e.url}),allowedTypes:J,value:i,render:({open:e})=>(0,r.jsx)(n.Button,{className:i?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,children:i?(0,r.jsx)("img",{src:i,alt:(0,p.__)("Card Image","caliph"),style:{width:"100px",height:"auto"}}):(0,p.__)("Select Image","caliph")})})}),i&&(0,r.jsx)(n.Button,{onClick:()=>t({cardImage:""}),isDestructive:!0,children:(0,p.__)("Remove Image","caliph")})]})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Card Settings","caliph"),initialOpen:!1,children:[(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Card Alignment","caliph"),value:Ie,options:[{label:(0,p.__)("Left","caliph"),value:"left"},{label:(0,p.__)("Center","caliph"),value:"center"},{label:(0,p.__)("Right","caliph"),value:"right"}],onChange:e=>t({cardAlignment:e})}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Border Radius","caliph"),value:B,onChange:e=>t({borderRadius:e}),min:0,max:50}),"vet-profile"!==l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Use Custom Padding","caliph"),checked:N,onChange:e=>t({useCustomPadding:e}),help:(0,p.__)("Enable to set different padding values for each side of the card","caliph")}),N?(0,r.jsx)(n.__experimentalBoxControl,{label:(0,p.__)("Custom Padding","caliph"),values:T,onChange:e=>t({customPadding:e}),units:["px","em","rem","%","vw","vh"]}):(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Card Padding","caliph"),value:I,onChange:e=>t({cardPadding:e}),min:0,max:100})]}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Card Width","caliph"),value:re,onChange:e=>t({cardWidth:e}),min:200,max:1200}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Card Height","caliph"),value:se,onChange:e=>t({cardHeight:e}),min:300,max:1e3}),("cat-grooming"===l||"dog-training"===l)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Image Width","caliph"),value:ce,onChange:e=>t({imageWidth:e}),min:100,max:1200}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Image Height","caliph"),value:pe,onChange:e=>t({imageHeight:e}),min:100,max:600})]})]}),"vet-profile"===l&&(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Vet Profile Settings","caliph"),initialOpen:!0,children:[(0,r.jsxs)("div",{className:"card-image-control",children:[(0,r.jsx)(a.MediaUploadCheck,{children:(0,r.jsx)(a.MediaUpload,{onSelect:e=>t({vetProfileImage:e.url}),allowedTypes:J,value:ve,render:({open:e})=>(0,r.jsx)(n.Button,{className:ve?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,children:ve?(0,r.jsx)("img",{src:ve,alt:(0,p.__)("Vet Profile Image","caliph"),style:{width:"100px",height:"auto"}}):(0,p.__)("Select Vet Image","caliph")})})}),ve&&(0,r.jsx)(n.Button,{onClick:()=>t({vetProfileImage:""}),isDestructive:!0,children:(0,p.__)("Remove Image","caliph")})]}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("vetProfileBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("vetProfileBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":He.vetProfileBackgroundColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Background Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.vetProfileBackgroundColor?"▲":"▼"})]}),He.vetProfileBackgroundColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(fe),onChange:e=>$e("vetProfileBackgroundColor",e)})}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Info Panel Padding","caliph"),value:Ce,onChange:e=>t({vetProfileInfoPadding:e}),min:5,max:30}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Info Panel Position Top","caliph"),value:je,onChange:e=>t({vetProfileInfoPositionTop:e}),min:200,max:450}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Info Panel Position Left","caliph"),value:Se,onChange:e=>t({vetProfileInfoPositionLeft:e}),min:0,max:100}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Info Panel Position Right","caliph"),value:we,onChange:e=>t({vetProfileInfoPositionRight:e}),min:0,max:100}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Info Panel Position Bottom","caliph"),value:ke,onChange:e=>t({vetProfileInfoPositionBottom:e}),min:0,max:100}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Info Panel Border Radius","caliph"),value:Be,onChange:e=>t({vetProfileInfoBorderRadius:e}),min:0,max:30})]}),"dog-training"===l&&(0,r.jsx)(n.PanelBody,{title:(0,p.__)("Dog Training Layout","caliph"),initialOpen:!0,children:(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Content Position","caliph"),value:xe,options:[{label:(0,p.__)("Content Left, Image Right","caliph"),value:"content-left"},{label:(0,p.__)("Image Left, Content Right","caliph"),value:"content-right"}],onChange:e=>t({dogTrainingLayout:e})})}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Spacing Settings","caliph"),initialOpen:!1,children:[(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Title Gap","caliph"),value:de,onChange:e=>t({titleGap:e}),min:0,max:50}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Description Gap","caliph"),value:he,onChange:e=>t({descriptionGap:e}),min:0,max:50}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Button Gap","caliph"),value:ge,onChange:e=>t({buttonGap:e}),min:0,max:50}),("cat-grooming"===l||"dog-training"===l)&&(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Image Gap","caliph"),value:ue,onChange:e=>t({imageGap:e}),min:0,max:50})]}),"vet-profile"!==l&&(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Shape Settings","caliph"),initialOpen:!1,children:[(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Shape Type","caliph"),value:Z,options:[{label:(0,p.__)("None","caliph"),value:"none"},{label:(0,p.__)("Circle","caliph"),value:"circle"},{label:(0,p.__)("Square","caliph"),value:"square"},{label:(0,p.__)("Triangle","caliph"),value:"triangle"},{label:(0,p.__)("Diamond","caliph"),value:"diamond"}],onChange:e=>t({shapeType:e})}),"none"!==Z&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("shapeColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("shapeColor"))},tabIndex:0,role:"button","aria-expanded":He.shapeColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Shape Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.shapeColor?"▲":"▼"})]}),He.shapeColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(Q),onChange:e=>$e("shapeColor",e)})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("shapeHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("shapeHoverColor"))},tabIndex:0,role:"button","aria-expanded":He.shapeHoverColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Shape Hover Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.shapeHoverColor?"▲":"▼"})]}),He.shapeHoverColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(Y),onChange:e=>$e("shapeHoverColor",e),clearable:!0})}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Shape Size","caliph"),value:X,onChange:e=>t({shapeSize:e}),min:20,max:300}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Shape Rotation","caliph"),value:ae,onChange:e=>t({shapeRotation:e}),min:0,max:360}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Shape Opacity","caliph"),value:ne,onChange:e=>t({shapeOpacity:e}),min:0,max:100}),(0,r.jsx)("div",{style:{marginBottom:"16px",marginTop:"24px",fontWeight:"600",color:"#1e1e1e"},children:(0,p.__)("Shape Position","caliph")}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Position Unit","caliph"),value:ie,options:[{label:(0,p.__)("Pixels (px)","caliph"),value:"px"},{label:(0,p.__)("Percentage (%)","caliph"),value:"%"},{label:(0,p.__)("Em","caliph"),value:"em"}],onChange:e=>t({shapePositionUnit:e})}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Position from Top","caliph"),value:ee,onChange:e=>t({shapePositionTop:e}),min:0,max:100}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Position from Right","caliph"),value:te,onChange:e=>t({shapePositionRight:e}),min:0,max:100}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Position from Bottom","caliph"),value:oe,onChange:e=>t({shapePositionBottom:e}),min:0,max:100}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Position from Left","caliph"),value:le,onChange:e=>t({shapePositionLeft:e}),min:0,max:100})]})]}),"vet-profile"!==l&&(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Icon Settings","caliph"),initialOpen:!1,children:[(0,r.jsx)(a.MediaUploadCheck,{children:(0,r.jsx)(a.MediaUpload,{onSelect:e=>t({iconUrl:e.url}),allowedTypes:J,value:x,render:({open:e})=>(0,r.jsx)(n.Button,{className:x?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,children:x?(0,r.jsx)("img",{src:x,alt:(0,p.__)("Icon","caliph"),style:{width:"100px",height:"auto"}}):(0,p.__)("Select Icon","caliph")})})}),x&&(0,r.jsx)(n.Button,{onClick:()=>t({iconUrl:""}),isDestructive:!0,children:(0,p.__)("Remove Icon","caliph")}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Icon Size","caliph"),value:m,onChange:e=>t({iconSize:e}),min:20,max:80}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Icon Background Size","caliph"),value:b,onChange:e=>t({iconBackgroundSize:e}),min:30,max:100})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Typography Settings","caliph"),initialOpen:!1,children:[(0,r.jsx)("div",{style:{marginBottom:"16px",fontWeight:"600",color:"#1e1e1e"},children:(0,p.__)("Title Typography","caliph")}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Title Font Size","caliph"),value:v,onChange:e=>t({titleFontSize:e}),min:14,max:48}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Title Font Weight","caliph"),value:f,options:[{label:(0,p.__)("Normal","caliph"),value:"400"},{label:(0,p.__)("Medium","caliph"),value:"500"},{label:(0,p.__)("Semi Bold","caliph"),value:"600"},{label:(0,p.__)("Bold","caliph"),value:"700"},{label:(0,p.__)("Extra Bold","caliph"),value:"800"},{label:(0,p.__)("Black","caliph"),value:"900"}],onChange:e=>t({titleFontWeight:e})}),(0,r.jsx)("div",{style:{marginBottom:"16px",marginTop:"24px",fontWeight:"600",color:"#1e1e1e"},children:(0,p.__)("Description Typography","caliph")}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Description Font Size","caliph"),value:y,onChange:e=>t({descriptionFontSize:e}),min:12,max:24}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Description Font Weight","caliph"),value:_,options:[{label:(0,p.__)("Light","caliph"),value:"300"},{label:(0,p.__)("Normal","caliph"),value:"400"},{label:(0,p.__)("Medium","caliph"),value:"500"},{label:(0,p.__)("Semi Bold","caliph"),value:"600"}],onChange:e=>t({descriptionFontWeight:e})})]}),(0,r.jsx)(n.PanelBody,{title:(0,p.__)("Content Settings","caliph"),initialOpen:!1,children:(0,r.jsx)(n.TextControl,{label:(0,p.__)("Action Button URL","caliph"),value:k,onChange:e=>t({actionButtonUrl:e})})}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Hover Effects","caliph"),initialOpen:!1,children:[(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Enable Hover Effects","caliph"),checked:z,onChange:e=>t({enableHoverEffects:e}),help:(0,p.__)("Enable or disable hover animations for the card","caliph")}),z&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Hover Effect Type","caliph"),value:P,options:[{label:(0,p.__)("Lift Up","caliph"),value:"lift"},{label:(0,p.__)("Scale","caliph"),value:"scale"},{label:(0,p.__)("Tilt","caliph"),value:"tilt"},{label:(0,p.__)("Glow","caliph"),value:"glow"},{label:(0,p.__)("Slide","caliph"),value:"slide"}],onChange:e=>t({hoverEffect:e}),help:(0,p.__)("Choose the type of hover animation","caliph")}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Effect Intensity","caliph"),value:F,onChange:e=>t({hoverIntensity:e}),min:1,max:10,help:(0,p.__)("Control the intensity of the hover effect","caliph")})]})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Color Settings","caliph"),initialOpen:!1,children:[(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("cardBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("cardBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":He.cardBackgroundColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Card Background Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.cardBackgroundColor?"▲":"▼"})]}),He.cardBackgroundColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(s),onChange:e=>$e("cardBackgroundColor",e)})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("iconBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("iconBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":He.iconBackgroundColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Icon Background Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.iconBackgroundColor?"▲":"▼"})]}),He.iconBackgroundColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(c),onChange:e=>$e("iconBackgroundColor",e)})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("titleColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("titleColor"))},tabIndex:0,role:"button","aria-expanded":He.titleColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Title Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.titleColor?"▲":"▼"})]}),He.titleColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(d),onChange:e=>$e("titleColor",e)})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("descriptionColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("descriptionColor"))},tabIndex:0,role:"button","aria-expanded":He.descriptionColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Description Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.descriptionColor?"▲":"▼"})]}),He.descriptionColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(h),onChange:e=>$e("descriptionColor",e)})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("actionButtonColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("actionButtonColor"))},tabIndex:0,role:"button","aria-expanded":He.actionButtonColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Action Button Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.actionButtonColor?"▲":"▼"})]}),He.actionButtonColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(g),onChange:e=>$e("actionButtonColor",e)})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("actionButtonIconColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("actionButtonIconColor"))},tabIndex:0,role:"button","aria-expanded":He.actionButtonIconColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Action Button Icon Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.actionButtonIconColor?"▲":"▼"})]}),He.actionButtonIconColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(u),onChange:e=>$e("actionButtonIconColor",e)})})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Hover Color Settings","caliph"),initialOpen:!1,children:[(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Enable Hover Color Transitions","caliph"),checked:A,onChange:e=>t({enableHoverColorTransitions:e})}),A&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Transition Duration (ms)","caliph"),value:D,onChange:e=>t({hoverTransitionDuration:e}),min:100,max:1e3,step:50}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("cardHoverBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("cardHoverBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":He.cardHoverBackgroundColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Card Hover Background Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.cardHoverBackgroundColor?"▲":"▼"})]}),He.cardHoverBackgroundColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(R),onChange:e=>$e("cardHoverBackgroundColor",e),clearable:!0})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("iconHoverBackgroundColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("iconHoverBackgroundColor"))},tabIndex:0,role:"button","aria-expanded":He.iconHoverBackgroundColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Icon Hover Background Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.iconHoverBackgroundColor?"▲":"▼"})]}),He.iconHoverBackgroundColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(L),onChange:e=>$e("iconHoverBackgroundColor",e),clearable:!0})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("titleHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("titleHoverColor"))},tabIndex:0,role:"button","aria-expanded":He.titleHoverColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Title Hover Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.titleHoverColor?"▲":"▼"})]}),He.titleHoverColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re($),onChange:e=>$e("titleHoverColor",e),clearable:!0})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("descriptionHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("descriptionHoverColor"))},tabIndex:0,role:"button","aria-expanded":He.descriptionHoverColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Description Hover Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.descriptionHoverColor?"▲":"▼"})]}),He.descriptionHoverColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(H),onChange:e=>$e("descriptionHoverColor",e),clearable:!0})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("actionButtonHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("actionButtonHoverColor"))},tabIndex:0,role:"button","aria-expanded":He.actionButtonHoverColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Action Button Hover Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.actionButtonHoverColor?"▲":"▼"})]}),He.actionButtonHoverColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(M),onChange:e=>$e("actionButtonHoverColor",e),clearable:!0})}),(0,r.jsxs)("div",{className:"color-picker-toggle",style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"8px 0",borderBottom:"1px solid #e0e0e0",userSelect:"none"},onClick:()=>We("actionButtonIconHoverColor"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),We("actionButtonIconHoverColor"))},tabIndex:0,role:"button","aria-expanded":He.actionButtonIconHoverColor,children:[(0,r.jsx)("span",{children:(0,p.__)("Action Button Icon Hover Color","caliph")}),(0,r.jsx)("span",{style:{fontSize:"10px"},children:He.actionButtonIconHoverColor?"▲":"▼"})]}),He.actionButtonIconHoverColor&&(0,r.jsx)("div",{style:{padding:"12px 0"},children:(0,r.jsx)(a.ColorPalette,{colors:ze,value:Re(E),onChange:e=>$e("actionButtonIconHoverColor",e),clearable:!0})})]})]}),(0,r.jsxs)(n.PanelBody,{title:(0,p.__)("Action Button Settings","caliph"),initialOpen:!1,children:[(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Action Button Visibility","caliph"),value:W,options:[{label:(0,p.__)("Always Visible","caliph"),value:"always"},{label:(0,p.__)("Visible on Hover","caliph"),value:"hover"},{label:(0,p.__)("Hidden","caliph"),value:"hidden"}],onChange:e=>t({actionButtonVisibility:e})}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Button Alignment","caliph"),value:O,options:[{label:(0,p.__)("Left","caliph"),value:"left"},{label:(0,p.__)("Center","caliph"),value:"center"},{label:(0,p.__)("Right","caliph"),value:"right"}],onChange:e=>t({buttonAlignment:e}),help:(0,p.__)("Only applies when custom positioning is not used","caliph")}),(0,r.jsx)(n.ToggleControl,{label:(0,p.__)("Use Custom Positioning","caliph"),checked:Ee,onChange:e=>{Le(e),t(e?{buttonPositionTop:U||10,buttonPositionRight:q||10,buttonPositionBottom:V||"auto",buttonPositionLeft:G||"auto",buttonPositionUnit:K||"px"}:{buttonPositionTop:0,buttonPositionRight:0,buttonPositionBottom:0,buttonPositionLeft:0})},help:(0,p.__)("Enable to precisely position the button within the card","caliph")}),Ee&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:{marginBottom:"16px",marginTop:"24px",fontWeight:"600",color:"#1e1e1e"},children:(0,p.__)("Button Position","caliph")}),(0,r.jsx)(n.SelectControl,{label:(0,p.__)("Position Unit","caliph"),value:K,options:[{label:(0,p.__)("Pixels (px)","caliph"),value:"px"},{label:(0,p.__)("Percentage (%)","caliph"),value:"%"},{label:(0,p.__)("Em","caliph"),value:"em"}],onChange:e=>t({buttonPositionUnit:e})}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Position from Top","caliph"),value:U,onChange:e=>t({buttonPositionTop:e}),min:0,max:600}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Position from Right","caliph"),value:q,onChange:e=>t({buttonPositionRight:e}),min:0,max:600}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Position from Bottom","caliph"),value:V,onChange:e=>t({buttonPositionBottom:e}),min:0,max:600}),(0,r.jsx)(n.RangeControl,{label:(0,p.__)("Position from Left","caliph"),value:G,onChange:e=>t({buttonPositionLeft:e}),min:0,max:600})]})]})]}),(0,r.jsxs)("div",{className:"card-widget-container",children:["cat-grooming"===l&&(0,r.jsxs)("div",{className:"cat-grooming-layout",children:[(0,r.jsxs)("div",{className:"cat-grooming-content",children:[(0,r.jsx)(a.RichText,{tagName:"h3",className:"card-widget-title",value:j,onChange:e=>t({title:e}),placeholder:(0,p.__)("Enter card title...","caliph")}),(0,r.jsx)(a.RichText,{tagName:"p",className:"card-widget-description",value:S,onChange:e=>t({description:e}),placeholder:(0,p.__)("Enter card description...","caliph")}),(0,r.jsx)("div",{className:`card-widget-action align-${O}`,children:(0,r.jsx)("div",{className:"action-button",children:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,r.jsx)("div",{className:"cat-grooming-image",children:i?(0,r.jsx)("img",{src:i,alt:j||(0,p.__)("Card Image","caliph")}):(0,r.jsx)("div",{className:"image-placeholder",children:(0,p.__)("Select Image","caliph")})})]}),"dog-training"===l&&(0,r.jsxs)("div",{className:`dog-training-layout layout-${xe}`,children:[(0,r.jsxs)("div",{className:"dog-training-content",children:[(0,r.jsx)(a.RichText,{tagName:"h3",className:"card-widget-title",value:j,onChange:e=>t({title:e}),placeholder:(0,p.__)("Enter card title...","caliph")}),(0,r.jsx)(a.RichText,{tagName:"p",className:"card-widget-description",value:S,onChange:e=>t({description:e}),placeholder:(0,p.__)("Enter card description...","caliph")}),(0,r.jsx)("div",{className:`card-widget-action align-${O}`,children:(0,r.jsx)("div",{className:"action-button",children:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,r.jsx)("div",{className:"dog-training-image",children:i?(0,r.jsx)("img",{src:i,alt:j||(0,p.__)("Card Image","caliph")}):(0,r.jsx)("div",{className:"image-placeholder",children:(0,p.__)("Select Image","caliph")})})]}),"vet-profile"===l&&(0,r.jsxs)(r.Fragment,{children:[!ve&&(0,r.jsx)(a.MediaUploadCheck,{children:(0,r.jsx)(a.MediaUpload,{onSelect:e=>t({vetProfileImage:e.url}),allowedTypes:J,value:ve,render:({open:e})=>(0,r.jsx)(n.Button,{className:"vet-profile-upload-button",onClick:e,children:(0,p.__)("Upload Vet Image","caliph")})})}),(0,r.jsxs)("div",{className:"vet-profile-info",children:[(0,r.jsx)(a.RichText,{tagName:"h3",className:"card-widget-title",value:me,onChange:e=>t({vetProfileTitle:e}),placeholder:(0,p.__)("Enter vet name...","caliph")}),(0,r.jsx)(a.RichText,{tagName:"p",className:"card-widget-description",value:be,onChange:e=>t({vetProfileDesignation:e}),placeholder:(0,p.__)("Enter designation...","caliph")})]})]}),"default"===l&&(0,r.jsxs)(r.Fragment,{children:["none"!==Z&&(0,r.jsx)("div",{className:`card-widget-shape shape-${Z}`}),(0,r.jsx)("div",{className:"card-widget-icon",children:x?(0,r.jsx)("img",{src:x,alt:(0,p.__)("Card Icon","caliph")}):(0,r.jsx)("div",{className:"icon-placeholder",children:(0,p.__)("Select Icon","caliph")})}),(0,r.jsx)(a.RichText,{tagName:"h3",className:"card-widget-title",value:j,onChange:e=>t({title:e}),placeholder:(0,p.__)("Enter card title...","caliph")}),(0,r.jsx)(a.RichText,{tagName:"p",className:"card-widget-description",value:S,onChange:e=>t({description:e}),placeholder:(0,p.__)("Enter card description...","caliph")}),(0,r.jsx)("div",{className:`card-widget-action align-${O}`,children:(0,r.jsx)("div",{className:"action-button",children:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})]})},save:({attributes:e})=>{const{cardStyle:t,cardImage:o,cardBackgroundColor:l,iconBackgroundColor:i,titleColor:n,descriptionColor:s,actionButtonColor:c,actionButtonIconColor:d,cardHoverBackgroundColor:h,iconHoverBackgroundColor:g,titleHoverColor:u,descriptionHoverColor:x,actionButtonHoverColor:m,actionButtonIconHoverColor:b,actionButtonVisibility:v,enableHoverColorTransitions:f,hoverTransitionDuration:y,iconUrl:_,iconSize:C,iconBackgroundSize:j,titleFontSize:S,titleFontWeight:w,descriptionFontSize:k,descriptionFontWeight:B,title:I,description:T,actionButtonUrl:N,borderRadius:P,cardPadding:F,customPadding:z,useCustomPadding:R,hoverEffect:$,hoverIntensity:H,enableHoverEffects:M,buttonAlignment:E,buttonPositionTop:L,buttonPositionRight:W,buttonPositionBottom:O,buttonPositionLeft:A,buttonPositionUnit:D,shapeType:U,shapeColor:q,shapeHoverColor:V,shapeSize:G,shapePositionTop:K,shapePositionRight:Z,shapePositionBottom:Q,shapePositionLeft:Y,shapePositionUnit:J,shapeRotation:X,shapeOpacity:ee,cardWidth:te,cardHeight:oe,imageWidth:le,imageHeight:ie,titleGap:ae,descriptionGap:ne,buttonGap:re,imageGap:se,dogTrainingLayout:ce,vetProfileTitle:pe,vetProfileDesignation:de,vetProfileImage:he,vetProfileBackgroundColor:ge,vetProfileTitleColor:ue,vetProfileDesignationColor:xe,vetProfileInfoPadding:me,vetProfileInfoPositionTop:be,vetProfileInfoPositionLeft:ve,vetProfileInfoPositionRight:fe,vetProfileInfoPositionBottom:ye,vetProfileInfoBorderRadius:_e,cardAlignment:Ce}=e,je=h||g||u||x||m||b,Se="hover"===v,we=R&&z?`${z.top||"0"} ${z.right||"0"} ${z.bottom||"0"} ${z.left||"0"}`:`${F}px`,ke=a.useBlockProps.save({className:["caliph-card-widget",`card-style-${t}`,`align-${Ce}`,$&&`hover-effect-${$}`,v&&`action-button-${v}`,M?"hover-enabled":"hover-disabled",f&&je?"hover-colors-enabled":"hover-colors-disabled",je?"has-hover-colors":"no-hover-colors",V&&"has-shape-hover-color","dog-training"===t&&`layout-${ce}`].filter(Boolean).join(" "),"data-hover-effects":Se?"enabled":"disabled",style:{"--card-bg-color":l,"--icon-bg-color":i,"--title-color":n,"--description-color":s,"--action-button-color":c,"--action-button-icon-color":d,...h&&{"--card-hover-bg-color":h},...g&&{"--icon-hover-bg-color":g},...u&&{"--title-hover-color":u},...x&&{"--description-hover-color":x},...m&&{"--action-button-hover-color":m},...b&&{"--action-button-icon-hover-color":b},"--hover-transition-duration":`${y}ms`,"--border-radius":`${P}px`,"--card-padding":`${F}px`,"--custom-padding":we,"--icon-size":`${C}px`,"--icon-bg-size":`${j}px`,"--title-font-size":`${S}px`,"--title-font-weight":w,"--description-font-size":`${k}px`,"--description-font-weight":B,"--hover-intensity":H,"--hover-enabled":M?1:0,"--button-position-top":L?`${L}${D}`:"auto","--button-position-right":W?`${W}${D}`:"auto","--button-position-bottom":O?`${O}${D}`:"auto","--button-position-left":A?`${A}${D}`:"auto","--button-position-type":0!==L||0!==W||0!==O||0!==A?"absolute":"static","--shape-color":q,"--shape-hover-color":V,"--shape-size":`${G}px`,"--shape-position-top":K?`${K}${J}`:"auto","--shape-position-right":Z?`${Z}${J}`:"auto","--shape-position-bottom":Q?`${Q}${J}`:"auto","--shape-position-left":Y?`${Y}${J}`:"auto","--shape-rotation":X,"--shape-opacity":ee,"--card-width":`${te}px`,"--card-height":`${oe}px`,"--image-width":`${le}px`,"--image-height":`${ie}px`,"--title-gap":`${ae}px`,"--description-gap":`${ne}px`,"--button-gap":`${re}px`,"--image-gap":`${se}px`,"--vet-profile-bg-color":ge,"--vet-profile-title-color":ue,"--vet-profile-designation-color":xe,...he&&{"--vet-profile-bg-image":`url(${he})`},"--vet-profile-info-padding":`${me}px`,"--vet-profile-info-position-top":`${be}px`,"--vet-profile-info-position-left":`${ve}px`,"--vet-profile-info-position-right":`${fe}px`,"--vet-profile-info-position-bottom":`${ye}px`,"--vet-profile-info-border-radius":`${_e}px`}});return(0,r.jsx)("div",{...ke,children:(0,r.jsxs)("div",{className:"card-widget-container",children:["cat-grooming"===t&&(0,r.jsxs)("div",{className:"cat-grooming-layout",children:[(0,r.jsxs)("div",{className:"cat-grooming-content",children:[(0,r.jsx)(a.RichText.Content,{tagName:"h3",className:"card-widget-title",value:I}),(0,r.jsx)(a.RichText.Content,{tagName:"p",className:"card-widget-description",value:T}),(0,r.jsx)("div",{className:`card-widget-action align-${E}`,children:(0,r.jsx)("a",{href:N,className:"action-button",children:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,r.jsx)("div",{className:"cat-grooming-image",children:o&&(0,r.jsx)("img",{src:o,alt:I||(0,p.__)("Card Image","caliph")})})]}),"dog-training"===t&&(0,r.jsxs)("div",{className:`dog-training-layout layout-${ce}`,children:[(0,r.jsxs)("div",{className:"dog-training-content",children:[(0,r.jsx)(a.RichText.Content,{tagName:"h3",className:"card-widget-title",value:I}),(0,r.jsx)(a.RichText.Content,{tagName:"p",className:"card-widget-description",value:T}),(0,r.jsx)("div",{className:`card-widget-action align-${E}`,children:(0,r.jsx)("a",{href:N,className:"action-button",children:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,r.jsx)("div",{className:"dog-training-image",children:o&&(0,r.jsx)("img",{src:o,alt:I||(0,p.__)("Card Image","caliph")})})]}),"vet-profile"===t&&(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"vet-profile-info",children:[(0,r.jsx)(a.RichText.Content,{tagName:"h3",className:"card-widget-title",value:pe}),(0,r.jsx)(a.RichText.Content,{tagName:"p",className:"card-widget-description",value:de})]})}),"default"===t&&(0,r.jsxs)(r.Fragment,{children:["none"!==U&&(0,r.jsx)("div",{className:`card-widget-shape shape-${U}`}),(0,r.jsx)("div",{className:"card-widget-icon",children:_&&(0,r.jsx)("img",{src:_,alt:I||(0,p.__)("Card Icon","caliph")})}),(0,r.jsx)(a.RichText.Content,{tagName:"h3",className:"card-widget-title",value:I}),(0,r.jsx)(a.RichText.Content,{tagName:"p",className:"card-widget-description",value:T}),(0,r.jsx)("div",{className:`card-widget-action align-${E}`,children:(0,r.jsx)("a",{href:N,className:"action-button",children:(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})})}})},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},942:(e,t)=>{var o;!function(){"use strict";var l={}.hasOwnProperty;function i(){for(var e="",t=0;t{"use strict";e.exports=window.wp.blocks}},o={};function l(e){var i=o[e];if(void 0!==i)return i.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,l),a.exports}l.m=t,e=[],l.O=(t,o,i,a)=>{if(!o){var n=1/0;for(p=0;p=a)&&Object.keys(l.O).every((e=>l.O[e](o[s])))?o.splice(s--,1):(r=!1,a0&&e[p-1][2]>a;p--)e[p]=e[p-1];e[p]=[o,i,a]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var o in t)l.o(t,o)&&!l.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,628:0,350:0};l.O.j=t=>0===e[t];var t=(t,o)=>{var i,a,[n,r,s]=o,c=0;if(n.some((t=>0!==e[t]))){for(i in r)l.o(r,i)&&(l.m[i]=r[i]);if(s)var p=s(l)}for(t&&t(o);cl(773)));i=l.O(i)})();