(()=>{"use strict";var e,t={2244:()=>{const e=window.wp.blocks,t=window.wp.element,r=e=>({width:24,height:24,fill:"none",className:e&&"spectra-block-icon--colored"}),o={fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a={modalTrigger:(e=!0)=>(0,t.createElement)("svg",{viewBox:"0 0 24 24",...r(e)},(0,t.createElement)("path",{d:"M20 6H4C2.89543 6 2 6.89543 2 8V16C2 17.1046 2.89543 18 4 18H20C21.1046 18 22 17.1046 22 16V8C22 6.89543 21.1046 6 20 6Z",...o}),(0,t.createElement)("path",{d:"M6 11.9678L17.9998 12.0316",...o})),modalContent:(e=!0)=>(0,t.createElement)("svg",{viewBox:"0 0 24 24",...r(e)},(0,t.createElement)("path",{d:"M17.9722 7.5H5.52778C4.54594 7.5 3.75 8.29949 3.75 9.28571V18.2143C3.75 19.2005 4.54594 20 5.52778 20H17.9722C18.9541 20 19.75 19.2005 19.75 18.2143V9.28571C19.75 8.29949 18.9541 7.5 17.9722 7.5Z",...o}),(0,t.createElement)("path",{d:"M8.18726 11.625H15.3126",...o}),(0,t.createElement)("path",{d:"M9.03564 15.875H14.4645",...o}),(0,t.createElement)("path",{d:"M21.25 2.875L19.25 4.875M19.25 2.875L21.25 4.875",strokeOpacity:e?.4:1,strokeLinecap:"round",strokeLinejoin:"round"})),modalClose:(e=!0)=>(0,t.createElement)("svg",{viewBox:"0 0 24 24",...r(e)},(0,t.createElement)("path",{d:"M17.9722 7.5H5.52778C4.54594 7.5 3.75 8.29949 3.75 9.28571V18.2143C3.75 19.2005 4.54594 20 5.52778 20H17.9722C18.9541 20 19.75 19.2005 19.75 18.2143V9.28571C19.75 8.29949 18.9541 7.5 17.9722 7.5Z",strokeOpacity:e?.4:1,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...o}),(0,t.createElement)("path",{d:"M8.18726 11.625H15.3126",strokeOpacity:e?.4:1,strokeWidth:2,strokeLinecap:"round",...o}),(0,t.createElement)("path",{d:"M9.03564 15.875H14.4645",strokeOpacity:e?.4:1,strokeWidth:2,strokeLinecap:"round",...o}),(0,t.createElement)("path",{d:"M21.25 2.875L19.25 4.875M19.25 2.875L21.25 4.875",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...o}))},n=window.wp.blockEditor,s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),c=window.ReactJSXRuntime,l=(0,t.memo)((e=>{const{attributes:r,context:o}=e,{"spectra/modal/modalTrigger":a}=o,l=["spectra-modal-trigger","wp-block-button",a&&!["button","icon","text"].includes(a)?"is-hidden":""],{style:i,classNames:d}=((e,r=[],o=[],a={})=>(0,t.useMemo)((()=>{const t=[...o],n={...a};return r.forEach((r=>{const{key:o,cssVar:a,className:c,value:l}=r;if(null===a&&null===c)return;const i=`--spectra-${s(o)}`,d=`spectra-${s(o)}`,p=void 0!==a?a:i,u=void 0!==c?c:d,k=e[o]||"",h=void 0!==l?l:k;h&&null!==p&&(n[p]=h),h&&null!==u&&t.push(u)})),{style:n,classNames:t}}),[e,r,o,a]))(r,[{key:"backgroundColor"},{key:"backgroundColorHover"},{key:"backgroundGradient"},{key:"backgroundGradientHover"}],l),p=(0,n.useBlockProps)({className:(u=d,u.filter(Boolean).join(" ")),style:{...i,cursor:"pointer"}});var u;const k=(0,n.useInnerBlocksProps)(p,{allowedBlocks:["spectra/modal-child-button","spectra/modal-child-icon","spectra/modal-child-content"],template:[["spectra/modal-child-button"],["spectra/modal-child-icon"],["spectra/modal-child-content"]],templateLock:"all"});return(0,c.jsx)("div",{...k,children:k.children})})),i=e=>{const{blockName:t,childPath:r="",pluginName:o="spectra"}=e;if(!["spectra","spectra-pro"].includes(o)||"spectra"===o&&!window?.uagb_blocks_info?.uagb_url||"spectra-pro"===o&&!window?.spectra_pro_blocks_info?.spectra_pro_url)return null;if(!t)return null;let a="";switch(o){case"spectra":a=`${window.uagb_blocks_info.uagb_url}/spectra-v3`;break;case"spectra-pro":a=`${window.spectra_pro_blocks_info.spectra_pro_url}/spectra-pro-v2`}const n=`${a}/assets/block-previews/${r?r+"/":""}${t}.webp`;return(0,c.jsx)("img",{width:"100%",src:n,alt:""})},d=JSON.parse('{"UU":"spectra/modal-child-trigger"}');(0,e.registerBlockType)(d.UU,{icon:a.modalTrigger(),edit:e=>{const{attributes:{isPreview:t}}=e;return t?(0,c.jsx)(i,{childPath:"modal-children",blockName:"trigger"}):(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(l,{...e})})},save:()=>(0,c.jsx)(n.InnerBlocks.Content,{})})}},r={};function o(e){var a=r[e];if(void 0!==a)return a.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,r,a,n)=>{if(!r){var s=1/0;for(d=0;d<e.length;d++){for(var[r,a,n]=e[d],c=!0,l=0;l<r.length;l++)(!1&n||s>=n)&&Object.keys(o.O).every((e=>o.O[e](r[l])))?r.splice(l--,1):(c=!1,n<s&&(s=n));if(c){e.splice(d--,1);var i=a();void 0!==i&&(t=i)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[r,a,n]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={7652:0,4204:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var a,n,[s,c,l]=r,i=0;if(s.some((t=>0!==e[t]))){for(a in c)o.o(c,a)&&(o.m[a]=c[a]);if(l)var d=l(o)}for(t&&t(r);i<s.length;i++)n=s[i],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},r=globalThis.webpackChunkspectra_v3=globalThis.webpackChunkspectra_v3||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=o.O(void 0,[4204],(()=>o(2244)));a=o.O(a)})();