(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{useMetaState:()=>c,useSiteOption:()=>n,useSiteOptionJSON:()=>i});const o=window.wp.data,n=function(e){const{editEntityRecord:t}=(0,o.useDispatch)("core"),{setting:n,isResolving:i}=(0,o.useSelect)((t=>({setting:t("core").getEditedEntityRecord("root","site")[e],isResolving:t("core").isResolving("getEditedEntityRecord",["root","site"])})),[e]);return{value:n,onChange:o=>{i||t("root","site",void 0,{[e]:o})},isResolving:i}},i=function(e){const{value:t,onChange:o,...i}=n(e);return{value:i.isResolving?{}:t?JSON.parse(t):{},onChange:e=>o(JSON.stringify({...e})),...i}},r=window.wp.element;var s;function u(e,t="{}",n=[]){const i=(0,o.useSelect)((o=>(o("core/editor").getEditedPostAttribute("meta")||{})[e]||t),n),s=(0,r.useRef)(null),u=(0,r.useRef)(null),c=(0,r.useMemo)((()=>{if(u.current===i)return s.current;const e=JSON.parse(i);return s.current=e,u.current=i,e}),[i]),{editPost:d}=(0,o.useDispatch)("core/editor");return[c,o=>{let n="function"==typeof o?o(c):o;"object"==typeof n&&null!==n||(n=JSON.parse(t)),d({meta:{[e]:JSON.stringify(n)}})}]}window.JetFBHooks=null!==(s=window.JetFBHooks)&&void 0!==s?s:{},window.JetFBHooks.useMetaState=u;const c=u;(window.jfb=window.jfb||{}).data=t})();