(()=>{"use strict";var e={d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{useFields:()=>l,useSanitizeFieldsMap:()=>u});const t=window.wp.data,n=window.wp.blockEditor,i=window.jfb.actions;var d;function s(e={}){const o=(0,n.useBlockEditContext)(),d=(0,i.useRequestFields)();e.excludeCurrent&&o?.clientId?.length&&(e.currentId=o.clientId);const s=(0,t.useSelect)(o=>o("jet-forms/fields").getFields(e),[]);return e.placeholder?[{value:"",label:e.placeholder},...s,...d]:[...s,...d]}window.JetFBHooks=null!==(d=window.JetFBHooks)&&void 0!==d?d:{},window.JetFBHooks.useFields=s;const l=s,r=window.wp.element;var c;function w(e="fields_map"){const o=l(),{settings:t,onChangeSettingObj:n}=(0,r.useContext)(i.CurrentActionEditContext);(0,r.useEffect)(()=>{if(!t.hasOwnProperty(e))return;const i=t[e],d=e=>-1!==o.findIndex(o=>o.value===e);for(const e in i)i.hasOwnProperty(e)&&(d(e)||delete i[e]);n({[e]:i})},[e])}window.JetFBHooks=null!==(c=window.JetFBHooks)&&void 0!==c?c:{},window.JetFBHooks.useSanitizeFieldsMap=w;const u=w;(window.jfb=window.jfb||{}).blocksToActions=o})();