PATH:
home
/
thebhoeo
/
public_html
/
wp-content
/
plugins
/
otter-blocks
/
build
/
atomic-wind
!function(){"use strict";var e,t={144:function(){var e=window.wp.hooks,t=window.wp.components,o=window.wp.i18n,l=window.ReactJSXRuntime;const s=[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Fade In","otter-blocks"),value:"fade-in"},{label:(0,o.__)("Slide Up","otter-blocks"),value:"slide-up"},{label:(0,o.__)("Slide Down","otter-blocks"),value:"slide-down"},{label:(0,o.__)("Slide Left","otter-blocks"),value:"slide-left"},{label:(0,o.__)("Slide Right","otter-blocks"),value:"slide-right"},{label:(0,o.__)("Zoom In","otter-blocks"),value:"zoom-in"},{label:(0,o.__)("Count Up","otter-blocks"),value:"count-up"}],n=[{label:(0,o.__)("0ms","otter-blocks"),value:"0"},{label:(0,o.__)("100ms","otter-blocks"),value:"100"},{label:(0,o.__)("200ms","otter-blocks"),value:"200"},{label:(0,o.__)("300ms","otter-blocks"),value:"300"},{label:(0,o.__)("400ms","otter-blocks"),value:"400"},{label:(0,o.__)("500ms","otter-blocks"),value:"500"}];function a({attributes:e,setAttributes:a}){const{animation:r,animationDelay:i}=e;return(0,l.jsxs)("div",{className:"aw-ce-tab-content",children:[(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Animation Type","otter-blocks"),value:r||"",options:s,onChange:e=>a({animation:e,animationDelay:e?i:""}),help:(0,o.__)("Animation is visible on the frontend only.","otter-blocks")}),r&&(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Delay","otter-blocks"),value:i||"0",options:n,onChange:e=>a({animationDelay:e})})]})}(0,e.addFilter)("blocks.registerBlockType","atomic-wind/animation-attributes",(e=>"atomic-wind"!==e.category?e:{...e,attributes:{...e.attributes,animation:{type:"string",default:""},animationDelay:{type:"string",default:""}}})),(0,e.addFilter)("blocks.getSaveContent.extraProps","atomic-wind/animation-save-props",((e,t,o)=>("atomic-wind"!==t.category||o.animation&&(e["data-animation"]=o.animation,o.animationDelay&&"0"!==o.animationDelay&&(e["data-animation-delay"]=o.animationDelay)),e)));var r=window.wp.data,i=window.wp.element;function c({triggers:e,onSelect:t}){return e.size?(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginTop:"4px"},children:[...e.entries()].map((([e,o])=>{const s=[];if("set"===o.action&&o.values.size)for(const n of o.values)s.push((0,l.jsxs)("button",{type:"button",onClick:()=>t(`${e}:${n}`),style:{background:"#f0f0f0",border:"1px solid #ddd",borderRadius:"2px",padding:"0 6px",fontSize:"11px",cursor:"pointer",lineHeight:"1.8"},children:[e,":",n]},`${e}:${n}`));else s.push((0,l.jsx)("button",{type:"button",onClick:()=>t(e),style:{background:"#f0f0f0",border:"1px solid #ddd",borderRadius:"2px",padding:"0 6px",fontSize:"11px",cursor:"pointer",lineHeight:"1.8"},children:e},e));return s}))}):null}function u({attributes:e,setAttributes:s}){const{showIf:n,hideIf:a,stateTrigger:u,stateAction:d,stateValue:b,stateDefault:m}=e,p=(0,r.useSelect)((e=>e("core/block-editor").getBlocks()),[]),h=(0,i.useMemo)((()=>{const e=new Map;return function t(o){for(const l of o){const o=l.attributes||{};if(o.stateTrigger){e.has(o.stateTrigger)||e.set(o.stateTrigger,{action:o.stateAction||"toggle",values:new Set,hasDefault:!1});const t=e.get(o.stateTrigger);"set"===o.stateAction&&o.stateValue&&t.values.add(o.stateValue),o.stateDefault&&(t.hasDefault=!0)}l.innerBlocks?.length&&t(l.innerBlocks)}}(p),e}),[p]);return(0,l.jsxs)("div",{className:"aw-ce-tab-content",children:[(0,l.jsx)(t.TextControl,{label:(0,o.__)("Show If","otter-blocks"),value:n||"",onChange:e=>s({showIf:e})}),(0,l.jsx)(c,{triggers:h,onSelect:e=>s({showIf:e})}),(0,l.jsx)("p",{className:"components-base-control__help",children:(0,o.__)("Show this block when a state is active. Use a name (e.g. tabs) for boolean triggers, or name:value (e.g. tabs:pricing) for set-value triggers.","otter-blocks")}),(0,l.jsxs)("div",{style:{marginTop:"16px"},children:[(0,l.jsx)(t.TextControl,{label:(0,o.__)("Hide If","otter-blocks"),value:a||"",onChange:e=>s({hideIf:e})}),(0,l.jsx)(c,{triggers:h,onSelect:e=>s({hideIf:e})}),(0,l.jsx)("p",{className:"components-base-control__help",children:(0,o.__)("Hide this block when a state is active. Same syntax as Show If.","otter-blocks")})]}),(0,l.jsx)(t.TextControl,{label:(0,o.__)("State Trigger","otter-blocks"),value:u||"",onChange:e=>s({stateTrigger:e}),help:(0,o.__)("Give this block a state name so clicking it changes state. Other blocks can react via Show If / Hide If.","otter-blocks")}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Action","otter-blocks"),value:d||"toggle",options:[{label:(0,o.__)("Toggle","otter-blocks"),value:"toggle"},{label:(0,o.__)("Set Value","otter-blocks"),value:"set"}],onChange:e=>s({stateAction:e}),help:(0,o.__)("Toggle flips a boolean on/off. Set Value assigns a specific value — useful for tab-style interfaces where only one option is active.","otter-blocks")}),"set"===d&&(0,l.jsx)(t.TextControl,{label:(0,o.__)("Value","otter-blocks"),value:b||"",onChange:e=>s({stateValue:e}),help:(0,o.__)("The value to assign when this trigger is clicked.","otter-blocks")}),(0,l.jsx)(t.ToggleControl,{label:(0,o.__)("Active by Default","otter-blocks"),checked:!!m,onChange:e=>s({stateDefault:e}),help:(0,o.__)("Turn on to make this trigger's state active on page load.","otter-blocks")})]})]})}(0,e.addFilter)("blocks.registerBlockType","atomic-wind/state-attributes",(e=>"atomic-wind"!==e.category?e:{...e,attributes:{...e.attributes,showIf:{type:"string",default:""},hideIf:{type:"string",default:""},stateTrigger:{type:"string",default:""},stateAction:{type:"string",default:"toggle"},stateValue:{type:"string",default:""},stateDefault:{type:"boolean",default:!1}}})),(0,e.addFilter)("blocks.getSaveContent.extraProps","atomic-wind/state-save-props",((e,t,o)=>("atomic-wind"!==t.category||(o.showIf&&(e["data-show-if"]=o.showIf),o.hideIf&&(e["data-hide-if"]=o.hideIf),o.stateTrigger&&(e["data-state-trigger"]=o.stateTrigger,e["data-state-action"]=o.stateAction,"set"===o.stateAction&&o.stateValue&&(e["data-state-value"]=o.stateValue),o.stateDefault&&(e["data-state-default"]=""))),e)));var d=window.wp.compose,b=window.wp.blockEditor;const m={"atomic-wind/text":[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Title","otter-blocks"),value:"title"},{label:(0,o.__)("Excerpt","otter-blocks"),value:"excerpt"},{label:(0,o.__)("Date","otter-blocks"),value:"date"},{label:(0,o.__)("Author","otter-blocks"),value:"author"},{label:(0,o.__)("Categories","otter-blocks"),value:"categories"},{label:(0,o.__)("Tags","otter-blocks"),value:"tags"},{label:(0,o.__)("Modified Date","otter-blocks"),value:"modified_date"},{label:(0,o.__)("Comment Count","otter-blocks"),value:"comment_count"},{label:(0,o.__)("Reading Time","otter-blocks"),value:"reading_time"},{label:(0,o.__)("Custom Field","otter-blocks"),value:"custom_field"}],"atomic-wind/link":[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Permalink","otter-blocks"),value:"permalink"},{label:(0,o.__)("Author Posts URL","otter-blocks"),value:"author_posts_url"},{label:(0,o.__)("Category Link","otter-blocks"),value:"category_link"},{label:(0,o.__)("Tag Link","otter-blocks"),value:"tag_link"},{label:(0,o.__)("Date Archive","otter-blocks"),value:"date_archive"},{label:(0,o.__)("Author Archive","otter-blocks"),value:"author_archive"}],"atomic-wind/image":[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Featured Image","otter-blocks"),value:"featured_image"},{label:(0,o.__)("Author Avatar","otter-blocks"),value:"author_avatar"}]},p=[{label:(0,o.__)("Date","otter-blocks"),value:"date"},{label:(0,o.__)("Title","otter-blocks"),value:"title"},{label:(0,o.__)("Modified","otter-blocks"),value:"modified"},{label:(0,o.__)("Random","otter-blocks"),value:"rand"},{label:(0,o.__)("Menu Order","otter-blocks"),value:"menu_order"}],h=[{label:(0,o.__)("DESC","otter-blocks"),value:"DESC"},{label:(0,o.__)("ASC","otter-blocks"),value:"ASC"}];(0,e.addFilter)("blocks.registerBlockType","atomic-wind/query-attributes",(e=>{if("atomic-wind"!==e.category)return e;const t={postField:{type:"string",default:""},excerptLength:{type:"number",default:25},customFieldKey:{type:"string",default:""}};return"atomic-wind/box"===e.name&&(t.queryPostType={type:"string",default:""},t.queryCount={type:"number",default:3},t.queryOrderBy={type:"string",default:"date"},t.queryOrder={type:"string",default:"DESC"},t.queryTaxonomy={type:"string",default:""},t.queryExcludeCurrent={type:"boolean",default:!1},t.querySticky={type:"string",default:""}),{...e,attributes:{...e.attributes,...t}}}));const v=(0,d.createHigherOrderComponent)((e=>s=>{if(!s.name.startsWith("atomic-wind/"))return(0,l.jsx)(e,{...s});const{attributes:n,setAttributes:a}=s,i="atomic-wind/box"===s.name,c=m.hasOwnProperty(s.name),u=(0,r.useSelect)((e=>{if(!i)return[];const t=e("core").getPostTypes({per_page:-1});return t?t.filter((e=>e.viewable)).map((e=>({label:e.labels.singular_name,value:e.slug}))):[]}),[i]),[d,v]=(n.queryTaxonomy||"").split(":"),g=(0,r.useSelect)((e=>{if(!i||!n.queryPostType)return[];const t=e("core").getTaxonomies({per_page:-1});return t?t.filter((e=>!1!==e.visibility?.public_queryable&&!1!==e.visibility?.show_ui)):[]}),[i,n.queryPostType]),_=(0,r.useSelect)((e=>i&&d&&e("core").getEntityRecords("taxonomy",d,{per_page:-1})||[]),[i,d]),k=(0,r.useSelect)((e=>{if(!c)return!1;const{getBlockParents:t,getBlock:o}=e("core/block-editor");return t(s.clientId).some((e=>{const t=o(e);return"atomic-wind/box"===t?.name&&!!t?.attributes?.queryPostType}))}),[s.clientId,c]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e,{...s}),(0,l.jsxs)(b.InspectorControls,{children:[i&&(0,l.jsxs)(t.PanelBody,{title:(0,o.__)("Query","otter-blocks"),initialOpen:!1,children:[(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Post Type","otter-blocks"),value:n.queryPostType||"",options:[{label:(0,o.__)("None","otter-blocks"),value:""},...u],onChange:e=>a({queryPostType:e})}),n.queryPostType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.RangeControl,{label:(0,o.__)("Posts Per Page","otter-blocks"),value:n.queryCount||3,onChange:e=>a({queryCount:e}),min:1,max:50}),(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Order By","otter-blocks"),value:n.queryOrderBy||"date",options:p,onChange:e=>a({queryOrderBy:e})}),(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Order","otter-blocks"),value:n.queryOrder||"DESC",options:h,onChange:e=>a({queryOrder:e})}),(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Taxonomy","otter-blocks"),value:d||"",options:[{label:(0,o.__)("None","otter-blocks"),value:""},...g.map((e=>({label:e.name,value:e.slug})))],onChange:e=>a({queryTaxonomy:e?e+":":""})}),d&&(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Term","otter-blocks"),value:v||"",options:[{label:(0,o.__)("All","otter-blocks"),value:""},..._.map((e=>({label:e.name,value:e.slug})))],onChange:e=>a({queryTaxonomy:d+":"+(e||"")})}),(0,l.jsx)(t.ToggleControl,{label:(0,o.__)("Exclude Current Post","otter-blocks"),checked:!!n.queryExcludeCurrent,onChange:e=>a({queryExcludeCurrent:e})}),(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Sticky Posts","otter-blocks"),value:n.querySticky||"",options:[{label:(0,o.__)("Default","otter-blocks"),value:""},{label:(0,o.__)("Exclude","otter-blocks"),value:"exclude"},{label:(0,o.__)("Only Sticky","otter-blocks"),value:"only"}],onChange:e=>a({querySticky:e})}),(0,l.jsx)("p",{className:"components-base-control__help",children:(0,o.__)("Inner blocks are repeated for each queried post on the frontend.","otter-blocks")})]})]}),c&&k&&(0,l.jsxs)(t.PanelBody,{title:(0,o.__)("Post Data","otter-blocks"),initialOpen:!1,children:[(0,l.jsx)(t.SelectControl,{label:(0,o.__)("Post Field","otter-blocks"),value:n.postField||"",options:m[s.name],onChange:e=>a({postField:e}),help:n.postField?(0,o.__)("Content will be replaced with post data on the frontend.","otter-blocks"):void 0}),"excerpt"===n.postField&&"atomic-wind/text"===s.name&&(0,l.jsx)(t.RangeControl,{label:(0,o.__)("Excerpt Length (words)","otter-blocks"),value:n.excerptLength||25,onChange:e=>a({excerptLength:e}),min:1,max:100}),"custom_field"===n.postField&&"atomic-wind/text"===s.name&&(0,l.jsx)(t.TextControl,{label:(0,o.__)("Meta Key","otter-blocks"),value:n.customFieldKey||"",onChange:e=>a({customFieldKey:e}),help:(0,o.__)("Enter the post meta key or ACF field name.","otter-blocks")})]})]})]})}),"withQueryControls");(0,e.addFilter)("editor.BlockEdit","atomic-wind/query-controls",v);var g=window.wp.plugins,_=window.wp.editor,k=window.wp.primitives,w=(0,l.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)(k.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})}),x=window.wp.blocks,f=(0,l.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(k.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),y=(0,l.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(k.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),C=(0,l.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(k.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),j=(0,l.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.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"})}),S=(0,l.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(k.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})}),T=(0,l.jsx)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(k.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),B=(0,l.jsxs)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,l.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20.3541 3.64593C18.5085 1.8004 13.2722 4.04455 8.65837 8.65837C4.04455 13.2722 1.8004 18.5085 3.64593 20.3541C5.49146 22.1996 10.7278 19.9555 15.3416 15.3416C19.9555 10.7278 22.1996 5.49146 20.3541 3.64593Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)(k.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3.64593 3.64593C1.8004 5.49146 4.04455 10.7278 8.65837 15.3416C13.2722 19.9555 18.5085 22.1996 20.3541 20.3541C22.1996 18.5085 19.9555 13.2722 15.3416 8.65837C10.7278 4.04455 5.49146 1.8004 3.64593 3.64593Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)(k.Path,{d:"M12.009 12H12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});const E=document.createElement("textarea");function I(e){return E.innerHTML=e,E.value}function N(e){if("atomic-wind/text"===e.name){const t=I((e.attributes?.content||"").replace(/<[^>]+>/g,"")).trim();return t.length>30?t.slice(0,30)+"…":t}if("atomic-wind/link"===e.name&&"inner-blocks"!==e.attributes?.mode){const t=I((e.attributes?.content||"").replace(/<[^>]+>/g,"")).trim();return t.length>30?t.slice(0,30)+"…":t}return""}const L=[{id:"classname",label:(0,o.__)("Classname","otter-blocks")},{id:"state",label:(0,o.__)("State","otter-blocks")},{id:"animation",label:(0,o.__)("Animation","otter-blocks")}],P=(0,i.memo)((({block:e,depth:t,selectedId:o,onSelect:s,collapsed:n,onToggle:a})=>{const i=(0,r.useSelect)((t=>{const o=t(x.store).getBlockType(e.name);return o?o.title:e.name}),[e.name]),c=e.innerBlocks&&e.innerBlocks.length>0,u=n[e.clientId],d=o===e.clientId,b=N(e);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("button",{type:"button",className:"aw-ce-tree-node"+(d?" is-selected":""),style:{paddingLeft:16*t+8},onClick:()=>s(e.clientId),"data-block-id":e.clientId,children:[c?(0,l.jsx)("span",{className:"aw-ce-tree-toggle",onClick:t=>{t.stopPropagation(),a(e.clientId)},role:"button",tabIndex:-1,children:u?"▶":"▼"}):(0,l.jsx)("span",{className:"aw-ce-tree-toggle-spacer"}),(0,l.jsx)("span",{className:"aw-ce-tree-title",children:i}),b&&(0,l.jsx)("span",{className:"aw-ce-tree-preview",children:b})]}),c&&!u&&e.innerBlocks.map((e=>(0,l.jsx)(P,{block:e,depth:t+1,selectedId:o,onSelect:s,collapsed:n,onToggle:a},e.clientId)))]})}));var A=({onClose:e})=>{const s=(0,i.useRef)({left:Math.round(window.innerWidth/2-340),top:80}),n=(0,i.useRef)({width:680,height:440}),c=(0,i.useRef)(220),d=(0,i.useRef)(null),m=(0,i.useRef)(null),p=(0,i.useRef)(null),h=(0,i.useRef)(null),[,v]=(0,i.useState)(0),[g,_]=(0,i.useState)({}),[k,w]=(0,i.useState)(!0),[E,I]=(0,i.useState)(""),[A,D]=(0,i.useState)(!1),[M,q]=(0,i.useState)(null),[F,O]=(0,i.useState)("classname"),R=(0,r.useSelect)((e=>e(b.store).getBlocks()),[]),V=(0,r.useSelect)((e=>e(b.store).getSelectedBlockClientId()),[]),z=(0,r.useSelect)((e=>{if(!V)return"";const t=e(b.store).getBlockAttributes(V);return t?.className||""}),[V]),{selectedTitle:H,selectedPreview:W,selectedAttributes:G}=(0,r.useSelect)((e=>{if(!V)return{selectedTitle:"",selectedPreview:"",selectedAttributes:{}};const t=e(b.store).getBlock(V);if(!t)return{selectedTitle:"",selectedPreview:"",selectedAttributes:{}};const o=e(x.store).getBlockType(t.name);return{selectedTitle:o?o.title:t.name,selectedPreview:N(t),selectedAttributes:t.attributes||{}}}),[V]),{selectBlock:X,updateBlockAttributes:Z}=(0,r.useDispatch)(b.store),K=(0,i.useCallback)((e=>{_((t=>({...t,[e]:!t[e]})))}),[]),U=(0,i.useCallback)((e=>{X(e)}),[X]),Y=(0,i.useCallback)((e=>{if(!V)return;const t=e.target.value.replace(/\n/g," ");Z(V,{className:t})}),[V,Z]),$=(0,i.useCallback)((e=>{"Enter"===e.key&&e.preventDefault()}),[]),Q=(0,i.useCallback)((()=>{z&&(I(z),navigator.clipboard?.writeText(z),D(!0),setTimeout((()=>D(!1)),1500))}),[z]),J=(0,i.useCallback)((()=>{V&&E&&(q({clientId:V,className:z}),Z(V,{className:E}))}),[V,E,z,Z]),ee=(0,i.useCallback)((()=>{M&&(Z(M.clientId,{className:M.className}),q(null))}),[M,Z]),te=(0,i.useCallback)((e=>{V&&Z(V,e)}),[V,Z]);(0,i.useEffect)((()=>{q(null)}),[V]),(0,i.useEffect)((()=>{if(!V||!p.current||!k)return;const e=p.current.querySelector(`[data-block-id="${V}"]`);e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}),[V,k]),(0,i.useEffect)((()=>{const e=m.current;if(!e)return;let t=!1,o=0,l=0;const n=e=>{if(!t)return;e.preventDefault();const n=d.current;if(!n)return;const a=n.getBoundingClientRect();let r=e.clientX-o,i=e.clientY-l;r=Math.max(0,Math.min(r,window.innerWidth-a.width)),i=Math.max(0,Math.min(i,window.innerHeight-a.height)),s.current={left:r,top:i},n.style.left=r+"px",n.style.top=i+"px"},a=()=>{t=!1,document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a)},r=e=>{e.target.closest("button")||(t=!0,o=e.clientX-s.current.left,l=e.clientY-s.current.top,document.addEventListener("mousemove",n),document.addEventListener("mouseup",a))};return e.addEventListener("mousedown",r),()=>{e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a)}}),[]),(0,i.useEffect)((()=>{const e=d.current;if(!e)return;let t,o,l,s,a=!1;const r=r=>{if(!a)return;r.preventDefault();const i=Math.max(400,l+(r.clientX-t)),c=Math.max(240,s+(r.clientY-o));n.current={width:i,height:c},e.style.width=i+"px",e.style.height=c+"px"},i=()=>{a=!1,document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i)},c=n=>{const c=e.getBoundingClientRect();n.clientX>=c.right-18&&n.clientY>=c.bottom-18&&(n.preventDefault(),a=!0,t=n.clientX,o=n.clientY,l=c.width,s=c.height,document.body.style.cursor="nwse-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",r),document.addEventListener("mouseup",i))};return e.addEventListener("mousedown",c),()=>{e.removeEventListener("mousedown",c),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i)}}),[]),(0,i.useEffect)((()=>{const e=h.current;if(!e)return;let t,o,l=!1;const s=e=>{if(!l)return;e.preventDefault();const s=p.current;if(!s)return;const n=Math.max(120,Math.min(500,o+(e.clientX-t)));c.current=n,s.style.width=n+"px"},n=()=>{l=!1,document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",n)},a=e=>{e.preventDefault(),l=!0,t=e.clientX,o=c.current,document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",s),document.addEventListener("mouseup",n)};return e.addEventListener("mousedown",a),()=>{e.removeEventListener("mousedown",a),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",n)}}),[k]);const oe=(0,l.jsxs)("div",{className:"aw-ce-panel",style:{left:s.current.left,top:s.current.top,width:n.current.width,height:n.current.height},ref:d,children:[(0,l.jsxs)("div",{className:"aw-ce-header",ref:m,children:[(0,l.jsxs)("div",{className:"aw-ce-header-left",children:[(0,l.jsx)("span",{className:"aw-ce-header-icon",children:B}),(0,l.jsx)("span",{className:"aw-ce-header-title",children:(0,o.__)("Atomic Wind","otter-blocks")})]}),(0,l.jsx)(t.Button,{icon:f,label:(0,o.__)("Close","otter-blocks"),onClick:e,size:"compact",className:"aw-ce-header-close"})]}),(0,l.jsxs)("div",{className:"aw-ce-body",children:[k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"aw-ce-tree",ref:p,style:{width:c.current},children:R.map((e=>(0,l.jsx)(P,{block:e,depth:0,selectedId:V,onSelect:U,collapsed:g,onToggle:K},e.clientId)))}),(0,l.jsx)("div",{className:"aw-ce-tree-resize",ref:h})]}),(0,l.jsxs)("div",{className:"aw-ce-classname",children:[(0,l.jsxs)("div",{className:"aw-ce-classname-header",children:[(0,l.jsx)(t.Button,{icon:k?y:C,label:k?(0,o.__)("Hide tree","otter-blocks"):(0,o.__)("Show tree","otter-blocks"),onClick:()=>w(!k),size:"compact",className:"aw-ce-sm-btn"}),V&&(0,l.jsxs)("span",{className:"aw-ce-classname-label",children:[H,W&&(0,l.jsx)("span",{className:"aw-ce-classname-label-preview",children:" — "+W})]}),V&&"classname"===F&&(0,l.jsxs)("div",{className:"aw-ce-classname-actions",children:[(0,l.jsx)(t.Button,{icon:j,label:A?(0,o.__)("Copied!","otter-blocks"):(0,o.__)("Copy classes","otter-blocks"),onClick:Q,size:"compact",className:"aw-ce-sm-btn"+(A?" is-copied":""),disabled:!z}),(0,l.jsx)(t.Button,{icon:S,label:(0,o.__)("Paste classes","otter-blocks"),onClick:J,size:"compact",className:"aw-ce-sm-btn",disabled:!E}),M&&(0,l.jsx)(t.Button,{icon:T,label:(0,o.__)("Undo paste","otter-blocks"),onClick:ee,size:"compact",className:"aw-ce-sm-btn is-undo"})]})]}),(0,l.jsx)("div",{className:"aw-ce-tabs",children:L.map((e=>(0,l.jsx)("button",{type:"button",className:"aw-ce-tab"+(F===e.id?" is-active":""),onClick:()=>O(e.id),children:e.label},e.id)))}),(0,l.jsx)("div",{className:"aw-ce-classname-body",children:(()=>{if(!V)return(0,l.jsx)("p",{className:"aw-ce-classname-placeholder",children:(0,o.__)("Select a block to edit.","otter-blocks")});switch(F){case"state":return(0,l.jsx)(u,{attributes:G,setAttributes:te});case"animation":return(0,l.jsx)(a,{attributes:G,setAttributes:te});default:return(0,l.jsx)("textarea",{className:"aw-ce-classname-input",value:z,onChange:Y,onKeyDown:$,placeholder:(0,o.__)("Add Tailwind classes…","otter-blocks")})}})()})]})]}),(0,l.jsx)("div",{className:"aw-ce-resize-handle"})]});return(0,i.createPortal)(oe,document.body)};let D=!1;const M=new Set;function q(e){D=e,M.forEach((t=>t(e)))}function F(){const[e,t]=(0,i.useState)(D);return(0,i.useEffect)((()=>{const e=e=>t(e);return M.add(e),()=>M.delete(e)}),[]),[e,q]}(0,g.registerPlugin)("atomic-wind-class-editor",{render:()=>{const[e,t]=F();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_.PluginMoreMenuItem,{icon:w,onClick:()=>t(!e),children:(0,o.__)("Atomic Wind","otter-blocks")}),e&&(0,l.jsx)(A,{onClose:()=>t(!1)})]})}});const O=(0,d.createHigherOrderComponent)((e=>s=>{if(!s.name.startsWith("atomic-wind/"))return(0,l.jsx)(e,{...s});const[n,r]=F(),{attributes:i,setAttributes:c}=s;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(b.InspectorControls,{children:(0,l.jsx)("div",{className:"aw-ce-inspector-toggle",children:(0,l.jsx)(t.Button,{icon:B,onClick:()=>r(!n),className:"aw-ce-inspector-btn"+(n?" is-active":""),children:(0,o.__)("Atomic Wind","otter-blocks")})})}),(0,l.jsx)(e,{...s}),(0,l.jsxs)(b.InspectorControls,{children:[(0,l.jsx)(t.PanelBody,{title:(0,o.__)("State & Visibility","otter-blocks"),initialOpen:!1,children:(0,l.jsx)(u,{attributes:i,setAttributes:c})}),(0,l.jsx)(t.PanelBody,{title:(0,o.__)("Animation","otter-blocks"),initialOpen:!1,children:(0,l.jsx)(a,{attributes:i,setAttributes:c})})]})]})}),"withClassEditorToggle");(0,e.addFilter)("editor.BlockEdit","atomic-wind/class-editor-toggle",O,-100),(0,g.registerPlugin)("atomic-wind-wrap-in",{render:()=>{const{clientIds:e,blocks:s}=(0,r.useSelect)((e=>{const{getSelectedBlockClientIds:t,getBlocksByClientId:o}=e("core/block-editor"),l=t();return{clientIds:l,blocks:o(l)}}),[]),{replaceBlocks:n}=(0,r.useDispatch)("core/block-editor");if(!(s.length>0&&s.every((e=>e?.name?.startsWith("atomic-wind/")))))return null;const a=(t,o={})=>{const l=(0,x.createBlock)(t,o,s.map((e=>(0,x.createBlock)(e.name,e.attributes,e.innerBlocks))));n(e,[l])};return(0,l.jsx)(b.BlockSettingsMenuControls,{children:({onClose:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.MenuItem,{icon:B,onClick:()=>{a("atomic-wind/box"),e()},children:(0,o.__)("Wrap in Box","otter-blocks")}),(0,l.jsx)(t.MenuItem,{icon:B,onClick:()=>{a("atomic-wind/link",{mode:"inner-blocks"}),e()},children:(0,o.__)("Wrap in Link","otter-blocks")})]})})}})}},o={};function l(e){var s=o[e];if(void 0!==s)return s.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=function(t,o,s,n){if(!o){var a=1/0;for(u=0;u<e.length;u++){o=e[u][0],s=e[u][1],n=e[u][2];for(var r=!0,i=0;i<o.length;i++)(!1&n||a>=n)&&Object.keys(l.O).every((function(e){return l.O[e](o[i])}))?o.splice(i--,1):(r=!1,n<a&&(a=n));if(r){e.splice(u--,1);var c=s();void 0!==c&&(t=c)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[o,s,n]},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={8:0,117:0};l.O.j=function(t){return 0===e[t]};var t=function(t,o){var s,n,a=o[0],r=o[1],i=o[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(s in r)l.o(r,s)&&(l.m[s]=r[s]);if(i)var u=i(l)}for(t&&t(o);c<a.length;c++)n=a[c],l.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return l.O(u)},o=self.webpackChunkotter_blocks=self.webpackChunkotter_blocks||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))}();var s=l.O(void 0,[117],(function(){return l(144)}));s=l.O(s)}();
[-] tailwind-generator-frontend.js
[edit]
[-] style-animations-frontend.css
[edit]
[-] style-editor-rtl.css
[edit]
[-] editor.asset.php
[edit]
[-] animations-frontend.asset.php
[edit]
[-] style-animations-frontend-rtl.css
[edit]
[-] editor.js
[edit]
[+]
pro
[-] style-builder.js
[edit]
[-] tailwind-generator-editor.asset.php
[edit]
[-] style-builder.asset.php
[edit]
[-] states-frontend.asset.php
[edit]
[-] animations-frontend.js
[edit]
[+]
..
[-] tailwind-generator-editor.js
[edit]
[-] style-editor.css
[edit]
[+]
blocks
[-] tailwind-generator-frontend.asset.php
[edit]
[+]
atomic-wind
[-] states-frontend.js
[edit]