[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.217.14.208: ~ $
(()=>{var e,t={2516:(e,t,n)=>{"use strict";var a=n(1609),o=n.n(a);const l=window.wp.blocks,i=window.wp.i18n,r=window.kadence.icons,c=window.wp.blockEditor,s=({setAttributes:e,label:t,showLabel:n,required:o})=>n?(0,a.createElement)("div",{className:"kb-adv-form-label"},(0,a.createElement)(c.RichText,{onChange:t=>{e({label:t})},placeholder:(0,i.__)("Field label","kadence-blocks"),allowedFormats:["core/bold","core/italic","core/link","core/underline"],tagName:"label",value:t,multiline:!1}),o&&(0,a.createElement)("span",{className:"kb-adv-form-required"},"*")):(0,a.createElement)(a.Fragment,null),d=window.wp.components,u=window.wp.data,p=window.kadence.components,m=window.wp.element,b=window.kadence.helpers;var h=n(2485),g=n.n(h);const f=["kadence/advanced-form-text","kadence/advanced-form-textarea","kadence/advanced-form-select","kadence/advanced-form-radio","kadence/advanced-form-file","kadence/advanced-form-time","kadence/advanced-form-date","kadence/advanced-form-telephone","kadence/advanced-form-checkbox","kadence/advanced-form-email","kadence/advanced-form-accept","kadence/advanced-form-number","kadence/advanced-form-hidden"],v=function e(t){if(Array.isArray(t)&&t.length){let n=[];return t.forEach((t=>{let a=[];f.includes(t.name)&&n.push({uniqueID:t?.attributes?.uniqueID||"",name:t?.attributes?.inputName||"",label:t?.attributes?.label||t?.name.replace("kadence/advanced-form-",""),type:t?.name.replace("kadence/advanced-form-","")||""}),void 0!==t.innerBlocks&&Array.isArray(t.innerBlocks)&&t.innerBlocks.length&&(a=e(t.innerBlocks)),n=[...n,...a]})),n}};function k(e){if(Array.isArray(e)&&e.length){let t=[];return e.forEach((e=>{let n=[];f.includes(e.name)&&t.push({uniqueID:e?.attributes?.uniqueID||"",formID:e?.attributes?.formID||"",clientId:e?.clientId||""}),void 0!==e.innerBlocks&&Array.isArray(e.innerBlocks)&&e.innerBlocks.length&&(n=k(e.innerBlocks)),t=[...t,...n]})),t}}const _=function(e,t,n){const a=k(e),o=n.toString();if(Array.isArray(a)&&a.length){const e=[];a.forEach((n=>{let a=n.uniqueID,l=n.formID,i=!1;e.includes(a)&&(a=y("",n.clientId),i=!0),o!==l&&(l=o,i=!0),i&&t(n.clientId,{uniqueID:a,formID:l}),e.push(a)}))}};function y(e,t){const n=t.substr(2,9);return e||n}function E({onSelect:e,isSelecting:t,onAdd:n,isAdding:o,postType:l="post",label:c=(0,i.__)("Post"),instructions:s=(0,i.__)("Select an existing post or create a new one.","kadence-blocks"),placeholder:p=(0,i.__)("Select Post","kadence-blocks")}){const[b,h]=(0,m.useState)(0),{posts:g}=(0,u.useSelect)((e=>({posts:e("core").getEntityRecords("postType",l,{per_page:-1,orderby:"title",order:"asc"})})),[l]),f=[{label:p,value:0},...(g||[]).map((e=>({label:C(e.title.rendered),value:e.id})))];return"undefined"==typeof pagenow||"widgets"!==pagenow&&"customize"!==pagenow?(0,a.createElement)(d.Placeholder,{className:"kb-select-or-create-placeholder",icon:r.advancedFormIcon,label:c,instructions:s},(0,a.createElement)("form",{className:"kb-select-or-create-placeholder__actions"},(0,a.createElement)(d.SelectControl,{label:c,hideLabelFromVision:!0,options:f,onChange:h,value:b}),(0,a.createElement)(d.Button,{variant:"primary",type:"submit",disabled:!b||o,isBusy:t,onClick:()=>e(Number.parseInt(b))},(0,i.__)("Select","kadence-blocks")),(0,a.createElement)(d.Button,{variant:"secondary",onClick:n,disabled:t,isBusy:o},(0,i.__)("Create New","kadence-blocks")))):(0,a.createElement)(d.Placeholder,{className:"kb-select-or-create-placeholder",icon:r.advancedFormIcon,label:c,instructions:s},(0,a.createElement)("form",{className:"kb-select-or-create-placeholder__actions"},(0,a.createElement)(d.SelectControl,{label:c,hideLabelFromVision:!0,options:f,onChange:h,value:b}),(0,a.createElement)(d.Button,{variant:"primary",type:"submit",disabled:!b||o,isBusy:t,onClick:()=>e(Number.parseInt(b))},(0,i.__)("Select","kadence-blocks"))))}function C(e){const t=(e=e||"").replace(/<!--[\s\S]*?(-->|$)/g,"").replace(/<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/gi,"").replace(/<\/?[a-z][\s\S]*?(>|$)/gi,"");return t!==e?C(t):t}const S=window.wp.hooks,x=window.lodash;function w({setTitle:e,isAdding:t,existingTitle:n,onAdd:o}){const[l,c]=(0,m.useState)(n),[s,u]=(0,m.useState)(""),[p,b]=(0,m.useState)("start"),[h,g]=(0,m.useState)(""),[f,v]=(0,m.useState)("basic"),[k,_]=(0,m.useState)(!1),y=[{key:"start",name:(0,i.__)("Layout","kadence-blocks")},{key:"style",name:(0,i.__)("Style","kadence-blocks")},{key:"title",name:(0,i.__)("Title","kadence-blocks")}],E=[{key:"skip",name:(0,i.__)("Skip (blank)","kadence-blocks"),icon:"",isDisabled:!1},{key:"contact",name:(0,i.__)("Contact","kadence-blocks"),icon:r.formTemplateContactIcon,isDisabled:!1},{key:"contactAdvanced",name:(0,i.__)("Contact With Options","kadence-blocks"),icon:r.formTemplateContactAdvancedIcon,isDisabled:!1},{key:"subscribe",name:(0,i.__)("Subscribe","kadence-blocks"),icon:r.formTemplateSubscribeIcon,isDisabled:!1},{key:"subscribeAdvanced",name:(0,i.__)("Subscribe With Name","kadence-blocks"),icon:r.formTemplateSubscribeAdvancedIcon,isDisabled:!1}];let C={skip:r.formTemplateContactIcon,dark:r.formTemplateContactDarkIcon,infield:r.formTemplateContactInFieldIcon,underline:r.formTemplateContactUnderlineIcon};"subscribe"===h?C={skip:r.formTemplateSubscribeIcon,dark:r.formTemplateSubscribeDarkIcon,infield:r.formTemplateSubscribeInFieldIcon,underline:r.formTemplateSubscribeUnderlineIcon}:"contactAdvanced"===h?C={skip:r.formTemplateContactAdvancedIcon,dark:r.formTemplateContactAdvancedDarkIcon,infield:r.formTemplateContactAdvancedInFieldIcon,underline:r.formTemplateContactAdvancedUnderlineIcon}:"subscribeAdvanced"===h&&(C={skip:r.formTemplateSubscribeAdvancedIcon,dark:r.formTemplateSubscribeAdvancedDarkIcon,infield:r.formTemplateSubscribeAdvancedInFieldIcon,underline:r.formTemplateSubscribeAdvancedUnderlineIcon});const w=[{key:"skip",name:(0,i.__)("Basic"),icon:C.skip,isDisabled:!1},{key:"dark",name:(0,i.__)("Dark","kadence-blocks"),icon:C.dark,isDisabled:!1},{key:"infield",name:(0,i.__)("Infield","kadence-blocks"),icon:C.infield,isDisabled:!1},{key:"underline",name:(0,i.__)("Underline","kadence-blocks"),icon:C.underline,isDisabled:!1}],T=(0,S.applyFilters)("kadence.formTemplates",E),F=(0,S.applyFilters)("kadence.formStyles",w);return(0,a.createElement)(d.Placeholder,{className:"kb-select-or-create-placeholder kb-adv-form-select",icon:r.formBlockIcon,label:(0,i.__)("Kadence Form","kadence-blocks")},(0,a.createElement)("div",{className:"kb-form-wizard-pagination"},(0,x.map)(y,(({name:e,key:t},n)=>(0,a.createElement)(d.Button,{key:t,className:"kb-form-pagination-btn",isSmall:!0,onClick:()=>{b("style"!==t||"skip"!==h&&""!==h?t:"start")},icon:(0,a.createElement)("span",{className:"kb-form-pagination-icon"},n+1),"aria-label":(0,i.sprintf)(/* translators: 1: current page number 2: total number of pages */ /* translators: 1: current page number 2: total number of pages */
(0,i.__)("Page %1$d of %2$d","kadence-blocks"),n+1,y.length),text:e,isPressed:p==t})))),(0,a.createElement)("div",{className:"kb-select-or-create-placeholder__actions"},"start"===p&&(0,a.createElement)("div",{className:"kt-select-starter-style-forms"},(0,a.createElement)("div",{className:"kt-select-starter-style-forms-title"},(0,i.__)("Select Initial Layout","kadence-blocks")),(0,a.createElement)(d.ButtonGroup,{className:"kt-init-forms-btn-group","aria-label":(0,i.__)("Initial Layout","kadence-blocks")},(0,x.map)(T,(({name:e,key:t,icon:n,isDisabled:o})=>(0,a.createElement)(d.Button,{key:t,className:"kt-inital-form-style-btn",isSmall:!0,onClick:()=>{g(t),""===l&&c("skip"===t?(0,i.__)("Blank Form","kadence-blocks"):e+(0,i.__)(" Form","kadence-blocks")),b("skip"===t?"title":"style")},isPressed:h==t,label:e,isDisabled:o},e,n,"skip"!==t&&(0,a.createElement)("span",{className:"template-select"},(0,i.__)("Select","kadence-blocks"))))))),"style"===p&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"kt-select-starter-style-forms kt-select-starter-styles-only"},(0,a.createElement)("div",{className:"kt-select-starter-style-forms-title"},(0,i.__)("Select Initial Style","kadence-blocks")),(0,a.createElement)(d.ButtonGroup,{className:"kt-init-forms-btn-group style-only","aria-label":(0,i.__)("Initial Style","kadence-blocks")},(0,x.map)(F,(({name:e,key:t,icon:n,isDisabled:o})=>(0,a.createElement)(d.Button,{key:t,className:"kt-inital-form-style-btn",isSmall:!0,onClick:()=>{v(t),b("title")},isPressed:f==t,isDisabled:o,label:e},e,n,(0,a.createElement)("span",{className:"template-select"},(0,i.__)("Select","kadence-blocks")))))))),"title"===p&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.TextControl,{className:"kb-form-block-title"+(l?"":" kadence-input-required-warning"),label:(0,i.__)("Give your form a title (required)","kadence-blocks"),placeholder:(0,i.__)("Contact Us","kadence-blocks"),help:(0,i.__)("This is used for your reference only.","kadence-blocks"),value:l,onChange:c,autoFocus:!0}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Form Description","kadence-blocks"),placeholder:(0,i.__)("Optionally add an description about your form","kadence-blocks"),help:(0,i.__)("This is used for your reference only.","kadence-blocks"),value:s,onChange:u}),(0,a.createElement)(d.Button,{variant:"primary",onClick:()=>{_(!0),o(l,h,f,s)},isBusy:t,disabled:""===l||k},(0,i.__)("Create","kadence-blocks")))))}const T=window.wp.coreData;function F({value:e,onChange:t,uniqueID:n}){const[o,l]=(0,m.useState)(!0),[r,c]=(0,m.useState)([]),[s]=function(e){const[t,n]=(0,T.useEntityProp)("postType","kadence_form","meta");return[t[e],(0,m.useCallback)((a=>{n({...t,[e]:a})}),[e,n])]}("_kad_form_fields");return(0,m.useEffect)((()=>{if(e){const t=function(e,t,n){return Array.isArray(e)&&e.length?(e=e.filter((e=>!(!e?.name||t===e.uniqueID)))).filter((e=>e.name===n&&t!==e.uniqueID)):[]}(s,n,e);c(t),t.length>0?l(!1):l(!0)}else l(!0),c([])}),[e]),(0,a.createElement)("div",{className:"kb-form-field-name-wrap "+(o?"":"kb-field-has-warning")},(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Name","kadence-blocks"),help:(0,i.__)("This is the name attribute that is applied to the html input tag. Names must be unique","kadence-blocks"),value:e,onChange:e=>t(e.replace(/[^a-z0-9-_]/gi,""))}),!o&&(0,a.createElement)(d.Notice,{status:"error",isDismissible:!1},(0,i.__)("Field name must be unique, Conflicts:","kadence-blocks"),(0,a.createElement)("ul",null,r.map(((e,t)=>(0,a.createElement)("li",{key:t},(0,i.__)("Field Label:","kadence-blocks")," ",e.label))))))}function O({setAttributes:e,messages:t}){const n=n=>{e({...t,...n},"messages")};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.TextControl,{label:(0,i.__)("Success Message","kadence-blocks"),placeholder:(0,i.__)("Submission Success, Thanks for getting in touch!","kadence-blocks"),value:void 0!==t.success?t.success:"",onChange:e=>n({success:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Pre Submit Form Validation Error Message","kadence-blocks"),placeholder:(0,i.__)("Please fix the errors to proceed","kadence-blocks"),value:void 0!==t.preError?t.preError:"",onChange:e=>n({preError:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Error Message","kadence-blocks"),placeholder:(0,i.__)("Submission Failed","kadence-blocks"),value:void 0!==t.error?t.error:"",onChange:e=>n({error:e})}))}function I({setMetaAttribute:e,useFormMeta:t}){const[n]=t("_kad_form_messageBorderRadius"),[o]=t("_kad_form_tabletMessageBorderRadius"),[l]=t("_kad_form_mobileMessageBorderRadius"),[r]=t("_kad_form_messageBorderRadiusUnit"),[c]=t("_kad_form_messagePadding"),[s]=t("_kad_form_tabletMessagePadding"),[d]=t("_kad_form_mobileMessagePadding"),[u]=t("_kad_form_messagePaddingUnit"),[m]=t("_kad_form_messageMargin"),[b]=t("_kad_form_tabletMessageMargin"),[h]=t("_kad_form_mobileMessageMargin"),[g]=t("_kad_form_messageMarginUnit"),[f]=t("_kad_form_messageColor"),[v]=t("_kad_form_messageBackground"),[k]=t("_kad_form_messageColorError"),[_]=t("_kad_form_messageBackgroundError"),[y]=t("_kad_form_messageBorderSuccess"),[E]=t("_kad_form_tabletMessageBorderSuccess"),[C]=t("_kad_form_mobileMessageBorderSuccess"),[S]=t("_kad_form_messageBorderError"),[x]=t("_kad_form_tabletMessageBorderError"),[w]=t("_kad_form_mobileMessageBorderError"),[T]=t("_kad_form_messageFont"),F=e=>{if(void 0===e)return e;let t=!1,n=e;return e.forEach((e=>{isNaN(e)||(t=!0)})),t&&(n=e.map((e=>parseInt(e,10)))),n},O=t=>{e([{...T[0],...t}],"messageFont")};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ColorGroup,{label:(0,i.__)("Success Message Colors","kadence-blocks")},(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Text Color","kadence-blocks"),value:f||"",default:"",onChange:t=>{e(t,"messageColor")}}),(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Background Color","kadence-blocks"),value:v||"",default:"",onChange:t=>{e(t,"messageBackground")}})),(0,a.createElement)(p.ResponsiveBorderControl,{label:(0,i.__)("Border","kadence-blocks"),value:[y],tabletValue:[E],mobileValue:[C],onChange:t=>e(t[0],"messageBorderSuccess"),onChangeTablet:t=>e(t[0],"tabletMessageBorderSuccess"),onChangeMobile:t=>e(t[0],"mobileMessageBorderSuccess")}),(0,a.createElement)(p.ColorGroup,{label:(0,i.__)("Error Message Colors","kadence-blocks")},(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Error Message Color","kadence-blocks"),value:k||"",default:"",onChange:t=>{e(t,"messageColorError")}}),(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Error Message Background","kadence-blocks"),value:_||"",default:"",onChange:t=>{e(t,"messageBackgroundError")}})),(0,a.createElement)(p.ResponsiveBorderControl,{label:(0,i.__)("Error Border","kadence-blocks"),value:[S],tabletValue:[x],mobileValue:[w],onChange:t=>e(t[0],"messageBorderError"),onChangeTablet:t=>e(t[0],"tabletMessageBorderError"),onChangeMobile:t=>e(t[0],"mobileMessageBorderError")}),(0,a.createElement)(p.TypographyControls,{fontSize:T[0].size,onFontSize:e=>O({size:e}),fontSizeType:T[0].sizetype,onFontSizeType:e=>O({sizetype:e}),lineHeight:T[0].lineHeight,onLineHeight:e=>O({lineHeight:e}),lineHeightType:T[0].lineType,onLineHeightType:e=>O({lineType:e}),textTransform:T[0].textTransform,onTextTransform:e=>O({textTransform:e})}),(0,a.createElement)(p.ResponsiveMeasurementControls,{label:(0,i.__)("Border Radius","kadence-blocks"),value:n,tabletValue:o,mobileValue:l,onChange:t=>e(t.map(String),"messageBorderRadius"),onChangeTablet:t=>e(t.map(String),"tabletMessageBorderRadius"),onChangeMobile:t=>e(t.map(String),"mobileMessageBorderRadius"),unit:r,units:["px","em","rem","%"],onUnit:t=>e(t,"messageBorderRadiusUnit"),max:"em"===r||"rem"===r?24:500,step:"em"===r||"rem"===r?.1:1,min:0,isBorderRadius:!0,allowEmpty:!0}),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Advanced Message Font Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-form-advanced-message-font-settings"},(0,a.createElement)(p.TypographyControls,{fontGroup:"body",reLetterSpacing:T[0].letterSpacing,onLetterSpacing:e=>O({letterSpacing:e}),letterSpacingType:T[0].letterType,onLetterSpacingType:e=>O({letterType:e}),fontFamily:T[0].family,onFontFamily:e=>O({family:e}),onFontChange:e=>{O({family:e.value,google:e.google})},onFontArrayChange:e=>O(e),googleFont:T[0].google,onGoogleFont:e=>O({google:e}),loadGoogleFont:T[0].loadGoogle,onLoadGoogleFont:e=>O({loadGoogle:e}),fontVariant:T[0].variant,onFontVariant:e=>O({variant:e}),fontWeight:T[0].weight,onFontWeight:e=>O({weight:e}),fontStyle:T[0].style,onFontStyle:e=>O({style:e}),fontSubset:T[0].subset,onFontSubset:e=>O({subset:e})}),(0,a.createElement)(p.ResponsiveMeasureRangeControl,{label:(0,i.__)("Padding","kadence-blocks"),value:F(c),tabletValue:F(s),mobileValue:F(d),onChange:t=>{e(t.map(String),"messagePadding")},onChangeTablet:t=>{e(t.map(String),"tabletMessagePadding")},onChangeMobile:t=>{e(t.map(String),"mobileMessagePadding")},min:0,max:"em"===u||"rem"===u?24:999,step:"em"===u||"rem"===u?.1:1,unit:u,units:["px","em","rem","%","vh","vw"],onUnit:t=>e(t,"messagePaddingUnit")}),(0,a.createElement)(p.ResponsiveMeasureRangeControl,{label:(0,i.__)("Margin","kadence-blocks"),value:F(m),tabletValue:F(b),mobileValue:F(h),onChange:t=>{e(t.map(String),"messageMargin")},onChangeTablet:t=>{e(t.map(String),"tabletMessageMargin")},onChangeMobile:t=>{e(t.map(String),"mobileMessageMargin")},min:"em"===g||"rem"===g?-24:-999,max:"em"===g||"rem"===g?24:999,step:"em"===g||"rem"===g?.1:1,unit:g,units:["px","em","rem","%","vh","vw"],onUnit:t=>e(t,"messageMarginUnit"),allowAuto:!0})))}function A({clientId:e,name:t,attributes:n}){const{insertBlock:o}=(0,u.useDispatch)(c.store),{blockIndex:s,rootClientId:p}=(0,u.useSelect)((t=>{const{getBlockIndex:n,getBlockRootClientId:a}=t(c.store);return{blockIndex:n(e),rootClientId:a(e)}}),[e]);return(0,a.createElement)(c.BlockControls,null,(0,a.createElement)(d.ToolbarGroup,{group:"duplicate-block"},(0,a.createElement)(d.ToolbarButton,{className:"kb-duplicate-field",icon:r.duplicate,onClick:()=>{const e=n;e.uniqueID="",e.inputName="";const a=(0,l.createBlock)(t,e);o(a,s+1,p)},label:(0,i.__)("Duplicate Field","kadence-blocks"),showTooltip:!0})))}var N={grad:.9,turn:360,rad:360/(2*Math.PI)},P=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},B=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},D=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},M=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},R=function(e){return{r:D(e.r,0,255),g:D(e.g,0,255),b:D(e.b,0,255),a:D(e.a)}},V=function(e){return{r:B(e.r),g:B(e.g),b:B(e.b),a:B(e.a,3)}},L=/^#([0-9a-f]{3,8})$/i,W=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},z=function(e){var t=e.r,n=e.g,a=e.b,o=e.a,l=Math.max(t,n,a),i=l-Math.min(t,n,a),r=i?l===t?(n-a)/i:l===n?2+(a-t)/i:4+(t-n)/i:0;return{h:60*(r<0?r+6:r),s:l?i/l*100:0,v:l/255*100,a:o}},q=function(e){var t=e.h,n=e.s,a=e.v,o=e.a;t=t/360*6,n/=100,a/=100;var l=Math.floor(t),i=a*(1-n),r=a*(1-(t-l)*n),c=a*(1-(1-t+l)*n),s=l%6;return{r:255*[a,r,i,i,c,a][s],g:255*[c,a,a,r,i,i][s],b:255*[i,i,c,a,a,r][s],a:o}},U=function(e){return{h:M(e.h),s:D(e.s,0,100),l:D(e.l,0,100),a:D(e.a)}},H=function(e){return{h:B(e.h),s:B(e.s),l:B(e.l),a:B(e.a,3)}},$=function(e){return q((n=(t=e).s,{h:t.h,s:(n*=((a=t.l)<50?a:100-a)/100)>0?2*n/(a+n)*100:0,v:a+n,a:t.a}));var t,n,a},K=function(e){return{h:(t=z(e)).h,s:(o=(200-(n=t.s))*(a=t.v)/100)>0&&o<200?n*a/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,a,o},j=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,G=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Q=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,J=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Y={string:[[function(e){var t=L.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?B(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?B(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Q.exec(e)||J.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:R({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=j.exec(e)||G.exec(e);if(!t)return null;var n,a,o=U({h:(n=t[1],a=t[2],void 0===a&&(a="deg"),Number(n)*(N[a]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return $(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,a=e.b,o=e.a,l=void 0===o?1:o;return P(t)&&P(n)&&P(a)?R({r:Number(t),g:Number(n),b:Number(a),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,a=e.l,o=e.a,l=void 0===o?1:o;if(!P(t)||!P(n)||!P(a))return null;var i=U({h:Number(t),s:Number(n),l:Number(a),a:Number(l)});return $(i)},"hsl"],[function(e){var t=e.h,n=e.s,a=e.v,o=e.a,l=void 0===o?1:o;if(!P(t)||!P(n)||!P(a))return null;var i=function(e){return{h:M(e.h),s:D(e.s,0,100),v:D(e.v,0,100),a:D(e.a)}}({h:Number(t),s:Number(n),v:Number(a),a:Number(l)});return q(i)},"hsv"]]},X=function(e,t){for(var n=0;n<t.length;n++){var a=t[n][0](e);if(a)return[a,t[n][1]]}return[null,void 0]},Z=function(e,t){var n=K(e);return{h:n.h,s:D(n.s+100*t,0,100),l:n.l,a:n.a}},ee=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},te=function(e,t){var n=K(e);return{h:n.h,s:n.s,l:D(n.l+100*t,0,100),a:n.a}},ne=function(){function e(e){this.parsed=function(e){return"string"==typeof e?X(e.trim(),Y.string):"object"==typeof e&&null!==e?X(e,Y.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return B(ee(this.rgba),2)},e.prototype.isDark=function(){return ee(this.rgba)<.5},e.prototype.isLight=function(){return ee(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=V(this.rgba)).r,n=e.g,a=e.b,l=(o=e.a)<1?W(B(255*o)):"","#"+W(t)+W(n)+W(a)+l;var e,t,n,a,o,l},e.prototype.toRgb=function(){return V(this.rgba)},e.prototype.toRgbString=function(){return t=(e=V(this.rgba)).r,n=e.g,a=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+a+", "+o+")":"rgb("+t+", "+n+", "+a+")";var e,t,n,a,o},e.prototype.toHsl=function(){return H(K(this.rgba))},e.prototype.toHslString=function(){return t=(e=H(K(this.rgba))).h,n=e.s,a=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+a+"%, "+o+")":"hsl("+t+", "+n+"%, "+a+"%)";var e,t,n,a,o},e.prototype.toHsv=function(){return e=z(this.rgba),{h:B(e.h),s:B(e.s),v:B(e.v),a:B(e.a,3)};var e},e.prototype.invert=function(){return ae({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),ae(Z(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),ae(Z(this.rgba,-e))},e.prototype.grayscale=function(){return ae(Z(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),ae(te(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),ae(te(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?ae({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):B(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=K(this.rgba);return"number"==typeof e?ae({h:e,s:t.s,l:t.l,a:t.a}):B(t.h)},e.prototype.isEqual=function(e){return this.toHex()===ae(e).toHex()},e}(),ae=function(e){return e instanceof ne?e:new ne(e)};function oe({setMetaAttribute:e,inputFont:t,style:n,useFormMeta:o}){const[l]=o("_kad_form_fieldBorderRadius"),[r]=o("_kad_form_tabletFieldBorderRadius"),[s]=o("_kad_form_mobileFieldBorderRadius"),[d]=o("_kad_form_fieldBorderRadiusUnit"),[u]=o("_kad_form_fieldBorderStyle"),[m]=o("_kad_form_tabletFieldBorderStyle"),[h]=o("_kad_form_mobileFieldBorderStyle"),g=(0,c.useSetting)("color.palette"),f=t=>{e({...n,...t},"style")},v=[{value:"small",label:(0,i.__)("SM","kadence-blocks")},{value:"standard",label:(0,i.__)("MD","kadence-blocks")},{value:"large",label:(0,i.__)("LG","kadence-blocks")}],k=(e,t)=>{const a=n.boxShadow.map(((n,a)=>(t===a&&(n=e),n)));f({boxShadow:a})},_=(e,t)=>{const a=n.boxShadowActive.map(((n,a)=>(t===a&&(n=e),n)));f({boxShadowActive:a})},y=n=>{e({...t,...n},"inputFont")};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ResponsiveGapSizeControl,{label:(0,i.__)("Field Row Gap","kadence-blocks"),value:void 0!==n?.gap?.[0]?n.gap[0]:"",onChange:e=>f({gap:[e,void 0!==n?.gap?.[1]?n.gap[1]:"",void 0!==n?.gap?.[2]?n.gap[2]:""]}),tabletValue:void 0!==n?.gap?.[1]?n.gap[1]:"",onChangeTablet:e=>f({gap:[void 0!==n?.gap?.[0]?n.gap[0]:"",e,void 0!==n?.gap?.[2]?n.gap[2]:""]}),mobileValue:void 0!==n?.gap?.[2]?n.gap[2]:"",onChangeMobile:e=>f({gap:[void 0!==n?.gap?.[0]?n.gap[0]:"",void 0!==n?.gap?.[1]?n.gap[1]:"",e]}),min:0,max:"px"===n?.gapUnit?200:12,step:"px"===n?.gapUnit?1:.1,unit:n?.gapUnit?n.gapUnit:"px",onUnit:e=>{f({gapUnit:e})},units:["px","em","rem"]}),(0,a.createElement)(p.KadenceRadioButtons,{value:n?.size?n?.size:"standard",options:v,hideLabel:!1,label:(0,i.__)("Input Size","kadence-blocks"),onChange:e=>{f({size:e})}}),(0,a.createElement)(p.HoverToggleControl,{hoverTab:(0,i.__)("Focus","kadence-blocks"),hover:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Input Focus Color","kadence-blocks"),value:t?.colorActive?t.colorActive:"",default:"",onChange:e=>{y({colorActive:e})}}),(0,a.createElement)(p.BackgroundTypeControl,{label:(0,i.__)("Focus Type","kadence-blocks"),type:n?.backgroundActiveType?n.backgroundActiveType:"normal",onChange:e=>f({backgroundActiveType:e}),allowedTypes:["normal","gradient"]}),"gradient"!==n?.backgroundActiveType&&(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Input Focus Background","kadence-blocks"),value:n?.backgroundActive?n.backgroundActive:"",default:"",onChange:e=>{f({backgroundActive:e})}}),"gradient"===n?.backgroundActiveType&&(0,a.createElement)(p.GradientControl,{value:n.gradientActive,onChange:e=>f({gradientActive:e}),gradients:[]}),(0,a.createElement)(p.BoxShadowControl,{label:(0,i.__)("Input Focus Box Shadow","kadence-blocks"),enable:void 0!==n?.boxShadowActive&&void 0!==n.boxShadowActive[0]&&n.boxShadowActive[0],color:void 0!==n?.boxShadowActive&&void 0!==n.boxShadowActive[1]?n.boxShadowActive[1]:"#000000",default:"#000000",opacity:void 0!==n?.boxShadowActive&&void 0!==n.boxShadowActive[2]?n.boxShadowActive[2]:.4,hOffset:void 0!==n?.boxShadowActive&&void 0!==n.boxShadowActive[3]?n.boxShadowActive[3]:2,vOffset:void 0!==n?.boxShadowActive&&void 0!==n.boxShadowActive[4]?n.boxShadowActive[4]:2,blur:void 0!==n?.boxShadowActive&&void 0!==n.boxShadowActive[5]?n.boxShadowActive[5]:3,spread:void 0!==n?.boxShadowActive&&void 0!==n.boxShadowActive[6]?n.boxShadowActive[6]:0,inset:void 0!==n?.boxShadowActive&&void 0!==n.boxShadowActive[7]&&n.boxShadowActive[7],onEnableChange:e=>{_(e,0)},onColorChange:e=>{_(e,1)},onOpacityChange:e=>{_(e,2)},onHOffsetChange:e=>{_(e,3)},onVOffsetChange:e=>{_(e,4)},onBlurChange:e=>{_(e,5)},onSpreadChange:e=>{_(e,6)},onInsetChange:e=>{_(e,7)}}),(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Input Focus Border","kadence-blocks"),value:n?.borderActive?n.borderActive:"",default:"",onChange:e=>{f({borderActive:(0,b.KadenceColorOutput)(e)})}})),normal:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Input Color","kadence-blocks"),value:t?.color?t.color:"",default:"",onChange:e=>{y({color:e})}}),(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Placeholder Color","kadence-blocks"),value:n?.placeholderColor?n.placeholderColor:"",default:"",onChange:e=>{f({placeholderColor:e})}}),(0,a.createElement)(p.BackgroundTypeControl,{label:(0,i.__)("Background Type","kadence-blocks"),type:n?.backgroundType?n.backgroundType:"normal",onChange:e=>f({backgroundType:e}),allowedTypes:["normal","gradient"]}),"gradient"!==n?.backgroundType&&(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Input Background","kadence-blocks"),value:n?.background?n.background:"",default:"",onChange:e=>{const t=function(e,t){return!!e&&ae(function(e,t){if(!e)return"";if(!t)return e;let n=t&&t?.[parseInt(e.slice(-1),10)-1]?t[parseInt(e.slice(-1),10)-1].color:e;return n&&n.startsWith("var(")&&(n=window.getComputedStyle(document.documentElement).getPropertyValue(e.replace("var(","").split(",")[0].replace(")",""))),n}(e,t)).isDark()}(e,g);f({background:e,isDark:t})}}),"gradient"===n?.backgroundType&&(0,a.createElement)(p.GradientControl,{value:n?.gradient,onChange:e=>{f({gradient:e,isDark:!1})},gradients:[]}),(0,a.createElement)(p.BoxShadowControl,{label:(0,i.__)("Input Box Shadow","kadence-blocks"),enable:void 0!==n?.boxShadow&&void 0!==n?.boxShadow[0]&&n.boxShadow[0],color:void 0!==n?.boxShadow&&void 0!==n?.boxShadow[1]?n.boxShadow[1]:"#000000",default:"#000000",opacity:void 0!==n?.boxShadow&&void 0!==n?.boxShadow[2]?n.boxShadow[2]:.4,hOffset:void 0!==n?.boxShadow&&void 0!==n?.boxShadow[3]?n.boxShadow[3]:2,vOffset:void 0!==n?.boxShadow&&void 0!==n?.boxShadow[4]?n.boxShadow[4]:2,blur:void 0!==n?.boxShadow&&void 0!==n?.boxShadow[5]?n.boxShadow[5]:3,spread:void 0!==n?.boxShadow&&void 0!==n?.boxShadow[6]?n.boxShadow[6]:0,inset:void 0!==n?.boxShadow&&void 0!==n?.boxShadow[7]&&n.boxShadow[7],onEnableChange:e=>{k(e,0)},onColorChange:e=>{k(e,1)},onOpacityChange:e=>{k(e,2)},onHOffsetChange:e=>{k(e,3)},onVOffsetChange:e=>{k(e,4)},onBlurChange:e=>{k(e,5)},onSpreadChange:e=>{k(e,6)},onInsetChange:e=>{k(e,7)}}),(0,a.createElement)("h2",null,(0,i.__)("Border Settings","kadence-blocks")),(0,a.createElement)(p.ResponsiveBorderControl,{label:(0,i.__)("Border","kadence-blocks"),value:[u],tabletValue:[m],mobileValue:[h],onChange:t=>e(t[0],"fieldBorderStyle"),onChangeTablet:t=>e(t[0],"tabletFieldBorderStyle"),onChangeMobile:t=>e(t[0],"mobileFieldBorderStyle")}),(0,a.createElement)(p.ResponsiveMeasurementControls,{label:(0,i.__)("Border Radius","kadence-blocks"),value:l,tabletValue:r,mobileValue:s,onChange:t=>e(t,"fieldBorderRadius"),onChangeTablet:t=>e(t,"tabletFieldBorderRadius"),onChangeMobile:t=>e(t,"mobileFieldBorderRadius"),unit:d,units:["px","em","rem","%"],onUnit:t=>e(t,"fieldBorderRadiusUnit"),max:"em"===d||"rem"===d?24:500,step:"em"===d||"rem"===d?.1:1,min:0,isBorderRadius:!0,allowEmpty:!0}),(0,a.createElement)(p.TypographyControls,{fontSize:t.size,onFontSize:e=>y({size:e}),fontSizeType:t.sizeType,onFontSizeType:e=>y({sizeType:e}),lineHeight:t.lineHeight,onLineHeight:e=>y({lineHeight:e}),lineHeightType:t.lineType,onLineHeightType:e=>y({lineType:e})}),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Advanced Field Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-form-advanced-field-settings"},(0,a.createElement)(p.TypographyControls,{fontGroup:"body",reLetterSpacing:t.letterSpacing,onLetterSpacing:e=>y({letterSpacing:e}),letterSpacingType:t?.letterType,onLetterSpacingType:e=>y({letterType:e}),textTransform:t.textTransform,onTextTransform:e=>y({textTransform:e}),fontFamily:t.family,onFontFamily:e=>y({family:e}),onFontChange:e=>{y({family:e.value,google:e.google})},onFontArrayChange:e=>y(e),googleFont:t.google,onGoogleFont:e=>y({google:e}),loadGoogleFont:t.loadGoogle,onLoadGoogleFont:e=>y({loadGoogle:e}),fontVariant:t.variant,onFontVariant:e=>y({variant:e}),fontWeight:t.weight,onFontWeight:e=>y({weight:e}),fontStyle:t.style,onFontStyle:e=>y({style:e}),fontSubset:t.subset,onFontSubset:e=>y({subset:e})}),(0,a.createElement)(p.ResponsiveMeasurementControls,{label:(0,i.__)("Input Padding","kadence-blocks"),value:n?.padding,onChange:e=>f({padding:e}),tabletValue:n?.tabletPadding,onChangeTablet:e=>f({tabletPadding:e}),mobileValue:n?.mobilePadding,onChangeMobile:e=>f({mobilePadding:e}),min:0,max:"em"===n?.paddingUnit||"rem"===n?.paddingUnit?12:200,step:"em"===n?.paddingUnit||"rem"===n?.paddingUnit?.1:1,unit:n?.paddingUnit?n?.paddingUnit:"px",units:["px","em","rem"],onUnit:e=>f({paddingUnit:e}),allowEmpty:!0})))}))}function le({setAttributes:e,styleAttribute:t,labelFont:n}){const[o,l]=(0,m.useState)("individual"),[r,c]=(0,m.useState)("individual"),s=t=>{e({...n,...t},"labelFont")},u=n=>{e({...t,...n},"style")},b=[{value:"normal",label:(0,i.__)("Normal","kadence-blocks")},{value:"infield",label:(0,i.__)("In Field Label","kadence-blocks")},{value:"float",label:(0,i.__)("Float Label","kadence-blocks")}],h=void 0===t?.showRequired||t.showRequired;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Label Layout Style","kadence-blocks"),options:b,onChange:e=>{u({labelStyle:e})},value:t?.labelStyle}),(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Label Color","kadence-blocks"),value:n.color?n.color:"",default:"",onChange:e=>{s({color:e})}}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Required Asterisk?","kadence-blocks"),help:(0,i.__)("If field is required this will add an asterisk after the label.","kadence-blocks"),checked:h,onChange:e=>u({showRequired:e})}),h&&(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Required Asterisk Color","kadence-blocks"),value:t?.requiredColor?t.requiredColor:"",default:"",onChange:e=>u({requiredColor:e})}),(0,a.createElement)(p.TypographyControls,{fontSize:n.size,onFontSize:e=>s({size:e}),fontSizeType:n.sizeType,onFontSizeType:e=>s({sizeType:e}),lineHeight:n.lineHeight,onLineHeight:e=>s({lineHeight:e}),lineHeightType:n.lineType,onLineHeightType:e=>s({lineType:e})}),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Advanced Label Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-form-advanced-label-settings"},(0,a.createElement)(p.TypographyControls,{fontGroup:"body",reLetterSpacing:n.letterSpacing,onLetterSpacing:e=>s({letterSpacing:e}),letterSpacingType:n.letterType,onLetterSpacingType:e=>s({letterType:e}),textTransform:n.textTransform,onTextTransform:e=>s({textTransform:e}),fontFamily:n.family,onFontFamily:e=>s({family:e}),onFontChange:e=>{s({family:e.value,google:e.google})},onFontArrayChange:e=>s(e),googleFont:n.google,onGoogleFont:e=>s({google:e}),loadGoogleFont:n.loadGoogle,onLoadGoogleFont:e=>s({loadGoogle:e}),fontVariant:n.variant,onFontVariant:e=>s({variant:e}),fontWeight:n.weight,onFontWeight:e=>s({weight:e}),fontStyle:n.style,onFontStyle:e=>s({style:e}),fontSubset:n.subset,onFontSubset:e=>s({subset:e}),padding:n.padding,onPadding:e=>s({padding:e}),paddingControl:o,onPaddingControl:e=>l(e),margin:n.margin,onMargin:e=>s({margin:e}),marginControl:r,onMarginControl:e=>c(e)})))}function ie({setAttributes:e,radioLabelFont:t}){const n=n=>{e({...t,...n},"radioLabelFont")};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Label Color","kadence-blocks"),value:t?.color?t?.color:"",default:"",onChange:e=>{n({color:e})}}),(0,a.createElement)(p.TypographyControls,{fontSize:t?.size?t?.size:void 0,onFontSize:e=>n({size:e}),fontSizeType:t?.sizeType?t?.sizeType:"px",onFontSizeType:e=>n({sizeType:e}),lineHeight:t?.lineHeight,onLineHeight:e=>n({lineHeight:e}),lineHeightType:t?.lineType,onLineHeightType:e=>n({lineType:e})}),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Advanced Label Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-form-advanced-label-settings"},(0,a.createElement)(p.TypographyControls,{fontGroup:"body",reLetterSpacing:t?.letterSpacing,onLetterSpacing:e=>n({letterSpacing:e}),letterSpacingType:t?.letterType,onLetterSpacingType:e=>n({letterType:e}),textTransform:t?.textTransform,onTextTransform:e=>n({textTransform:e}),fontFamily:t?.family,onFontFamily:e=>n({family:e}),onFontChange:e=>{n({family:e.value,google:e.google})},onFontArrayChange:e=>n(e),googleFont:t?.google,onGoogleFont:e=>n({google:e}),loadGoogleFont:t?.loadGoogle,onLoadGoogleFont:e=>n({loadGoogle:e}),fontVariant:t?.variant,onFontVariant:e=>n({variant:e}),fontWeight:t?.weight,onFontWeight:e=>n({weight:e}),fontStyle:t?.style,onFontStyle:e=>n({style:e}),fontSubset:t?.subset,onFontSubset:e=>n({subset:e})})))}function re({setAttributes:e,helpFont:t}){const[n,o]=(0,m.useState)("individual"),[l,r]=(0,m.useState)("individual"),c=n=>{e({...t,...n},"helpFont")};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Label Color","kadence-blocks"),value:t.color?t.color:"",default:"",onChange:e=>{c({color:e})}}),(0,a.createElement)(p.TypographyControls,{fontSize:t.size,onFontSize:e=>c({size:e}),fontSizeType:t.sizeType,onFontSizeType:e=>c({sizeType:e}),lineHeight:t.lineHeight,onLineHeight:e=>c({lineHeight:e}),lineHeightType:t.lineType,onLineHeightType:e=>c({lineType:e})}),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Advanced Help Text Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-form-advanced-label-settings"},(0,a.createElement)(p.TypographyControls,{fontGroup:"body",reLetterSpacing:t.letterSpacing,onLetterSpacing:e=>c({letterSpacing:e}),letterSpacingType:t.letterType,onLetterSpacingType:e=>c({letterType:e}),textTransform:t.textTransform,onTextTransform:e=>c({textTransform:e}),fontFamily:t.family,onFontFamily:e=>c({family:e}),onFontChange:e=>{c({family:e.value,google:e.google})},onFontArrayChange:e=>c(e),googleFont:t.google,onGoogleFont:e=>c({google:e}),loadGoogleFont:t.loadGoogle,onLoadGoogleFont:e=>c({loadGoogle:e}),fontVariant:t.variant,onFontVariant:e=>c({variant:e}),fontWeight:t.weight,onFontWeight:e=>c({weight:e}),fontStyle:t.style,onFontStyle:e=>c({style:e}),fontSubset:t.subset,onFontSubset:e=>c({subset:e}),padding:t.padding,onPadding:e=>c({padding:e}),paddingControl:n,onPaddingControl:e=>o(e),margin:t.margin,onMargin:e=>c({margin:e}),marginControl:l,onMarginControl:e=>r(e)})))}var ce=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function se(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((a=e[n])===(o=t[n])||ce(a)&&ce(o)))return!1;var a,o;return!0}const de=function(e,t){var n;void 0===t&&(t=se);var a,o=[],l=!1;return function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];return l&&n===this&&t(i,o)||(a=e.apply(this,i),l=!0,n=this,o=i),a}},ue={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},pe=function(e){function t(e,a,c,s,p){for(var m,b,h,g,_,E=0,C=0,S=0,x=0,w=0,N=0,B=h=m=0,M=0,R=0,V=0,L=0,W=c.length,z=W-1,q="",U="",H="",$="";M<W;){if(b=c.charCodeAt(M),M===z&&0!==C+x+S+E&&(0!==C&&(b=47===C?10:47),x=S=E=0,W++,z++),0===C+x+S+E){if(M===z&&(0<R&&(q=q.replace(u,"")),0<q.trim().length)){switch(b){case 32:case 9:case 59:case 13:case 10:break;default:q+=c.charAt(M)}b=59}switch(b){case 123:for(m=(q=q.trim()).charCodeAt(0),h=1,L=++M;M<W;){switch(b=c.charCodeAt(M)){case 123:h++;break;case 125:h--;break;case 47:switch(b=c.charCodeAt(M+1)){case 42:case 47:e:{for(B=M+1;B<z;++B)switch(c.charCodeAt(B)){case 47:if(42===b&&42===c.charCodeAt(B-1)&&M+2!==B){M=B+1;break e}break;case 10:if(47===b){M=B+1;break e}}M=B}}break;case 91:b++;case 40:b++;case 34:case 39:for(;M++<z&&c.charCodeAt(M)!==b;);}if(0===h)break;M++}if(h=c.substring(L,M),0===m&&(m=(q=q.replace(d,"").trim()).charCodeAt(0)),64===m){switch(0<R&&(q=q.replace(u,"")),b=q.charCodeAt(1)){case 100:case 109:case 115:case 45:R=a;break;default:R=A}if(L=(h=t(a,R,h,b,p+1)).length,0<P&&(_=r(3,h,R=n(A,q,V),a,F,T,L,b,p,s),q=R.join(""),void 0!==_&&0===(L=(h=_.trim()).length)&&(b=0,h="")),0<L)switch(b){case 115:q=q.replace(y,i);case 100:case 109:case 45:h=q+"{"+h+"}";break;case 107:h=(q=q.replace(f,"$1 $2"))+"{"+h+"}",h=1===I||2===I&&l("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=q+h,112===s&&(U+=h,h="")}else h=""}else h=t(a,n(a,q,V),h,s,p+1);H+=h,h=V=R=B=m=0,q="",b=c.charCodeAt(++M);break;case 125:case 59:if(1<(L=(q=(0<R?q.replace(u,""):q).trim()).length))switch(0===B&&(m=q.charCodeAt(0),45===m||96<m&&123>m)&&(L=(q=q.replace(" ",":")).length),0<P&&void 0!==(_=r(1,q,a,e,F,T,U.length,s,p,s))&&0===(L=(q=_.trim()).length)&&(q="\0\0"),m=q.charCodeAt(0),b=q.charCodeAt(1),m){case 0:break;case 64:if(105===b||99===b){$+=q+c.charAt(M);break}default:58!==q.charCodeAt(L-1)&&(U+=o(q,m,b,q.charCodeAt(2)))}V=R=B=m=0,q="",b=c.charCodeAt(++M)}}switch(b){case 13:case 10:47===C?C=0:0===1+m&&107!==s&&0<q.length&&(R=1,q+="\0"),0<P*D&&r(0,q,a,e,F,T,U.length,s,p,s),T=1,F++;break;case 59:case 125:if(0===C+x+S+E){T++;break}default:switch(T++,g=c.charAt(M),b){case 9:case 32:if(0===x+E+C)switch(w){case 44:case 58:case 9:case 32:g="";break;default:32!==b&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===x+C+E&&(R=V=1,g="\f"+g);break;case 108:if(0===x+C+E+O&&0<B)switch(M-B){case 2:112===w&&58===c.charCodeAt(M-3)&&(O=w);case 8:111===N&&(O=N)}break;case 58:0===x+C+E&&(B=M);break;case 44:0===C+S+x+E&&(R=1,g+="\r");break;case 34:case 39:0===C&&(x=x===b?0:0===x?b:x);break;case 91:0===x+C+S&&E++;break;case 93:0===x+C+S&&E--;break;case 41:0===x+C+E&&S--;break;case 40:0===x+C+E&&(0===m&&(2*w+3*N==533||(m=1)),S++);break;case 64:0===C+S+x+E+B+h&&(h=1);break;case 42:case 47:if(!(0<x+E+S))switch(C){case 0:switch(2*b+3*c.charCodeAt(M+1)){case 235:C=47;break;case 220:L=M,C=42}break;case 42:47===b&&42===w&&L+2!==M&&(33===c.charCodeAt(L+2)&&(U+=c.substring(L,M+1)),g="",C=0)}}0===C&&(q+=g)}N=w,w=b,M++}if(0<(L=U.length)){if(R=a,0<P&&void 0!==(_=r(2,U,R,e,F,T,L,s,p,s))&&0===(U=_).length)return $+U+H;if(U=R.join(",")+"{"+U+"}",0!=I*O){switch(2!==I||l(U,2)||(O=0),O){case 111:U=U.replace(k,":-moz-$1")+U;break;case 112:U=U.replace(v,"::-webkit-input-$1")+U.replace(v,"::-moz-$1")+U.replace(v,":-ms-input-$1")+U}O=0}}return $+U+H}function n(e,t,n){var o=t.trim().split(h);t=o;var l=o.length,i=e.length;switch(i){case 0:case 1:var r=0;for(e=0===i?"":e[0]+" ";r<l;++r)t[r]=a(e,t[r],n).trim();break;default:var c=r=0;for(t=[];r<l;++r)for(var s=0;s<i;++s)t[c++]=a(e[s]+" ",o[r],n).trim()}return t}function a(e,t,n){var a=t.charCodeAt(0);switch(33>a&&(a=(t=t.trim()).charCodeAt(0)),a){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,a){var i=e+";",r=2*t+3*n+4*a;if(944===r){e=i.indexOf(":",9)+1;var c=i.substring(e,i.length-1).trim();return c=i.substring(0,e).trim()+c+";",1===I||2===I&&l(c,1)?"-webkit-"+c+c:c}if(0===I||2===I&&!l(i,1))return i;switch(r){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(w,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(c=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+c+i;case 1005:return m.test(i)?i.replace(p,":-webkit-")+i.replace(p,":-moz-")+i:i;case 1e3:switch(t=(c=i.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=i.replace(_,"tb");break;case 232:c=i.replace(_,"tb-rl");break;case 220:c=i.replace(_,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+c+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,r=(c=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:i=i.replace(c,"-webkit-"+c)+";"+i;break;case 207:case 102:i=i.replace(c,"-webkit-"+(102<r?"inline-":"")+"box")+";"+i.replace(c,"-webkit-"+c)+";"+i.replace(c,"-ms-"+c+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return c=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+c+"-ms-flex-"+c+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(C,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(C,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===x.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,a).replace(":fill-available",":stretch"):i.replace(c,"-webkit-"+c)+i.replace(c,"-moz-"+c.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+a&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(b,"$1-webkit-$2")+i}return i}function l(e,t){var n=e.indexOf(1===t?":":"{"),a=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),B(2!==t?a:a.replace(S,"$1"),n,t)}function i(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(E," or ($1)").substring(4):"("+t+")"}function r(e,t,n,a,o,l,i,r,c,d){for(var u,p=0,m=t;p<P;++p)switch(u=N[p].call(s,e,m,n,a,o,l,i,r,c,d)){case void 0:case!1:case!0:case null:break;default:m=u}if(m!==t)return m}function c(e){return void 0!==(e=e.prefix)&&(B=null,e?"function"!=typeof e?I=1:(I=2,B=e):I=0),c}function s(e,n){var a=e;if(33>a.charCodeAt(0)&&(a=a.trim()),a=[a],0<P){var o=r(-1,n,a,a,F,T,0,0,0,0);void 0!==o&&"string"==typeof o&&(n=o)}var l=t(A,a,n,0,0);return 0<P&&void 0!==(o=r(-2,l,a,a,F,T,l.length,0,0,0))&&(l=o),O=0,T=F=1,l}var d=/^\0+/g,u=/[\0\r\f]/g,p=/: */g,m=/zoo|gra/,b=/([,: ])(transform)/g,h=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,f=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,k=/:(read-only)/g,_=/[svh]\w+-[tblr]{2}/,y=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,C=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,x=/stretch|:\s*\w+\-(?:conte|avail)/,w=/([^-])(image-set\()/,T=1,F=1,O=0,I=1,A=[],N=[],P=0,B=null,D=0;return s.use=function e(t){switch(t){case void 0:case null:P=N.length=0;break;default:switch(t.constructor){case Array:for(var n=0,a=t.length;n<a;++n)e(t[n]);break;case Function:N[P++]=t;break;case Boolean:D=0|!!t}}return e},s.set=c,void 0!==e&&c(e),s};var me,be,he=n(8226),ge=n.n(he),fe=/[A-Z]|^ms/g,ve=(me=function(e){return e.replace(fe,"-$&").toLowerCase()},be={},function(e){return void 0===be[e]&&(be[e]=me(e)),be[e]}),ke=function(e,t){return null==t||"boolean"==typeof t?"":1===ue[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"},_e=function e(t){for(var n=t.length,a=0,o="";a<n;a++){var l=t[a];if(null!=l){var i=void 0;switch(typeof l){case"boolean":break;case"function":i=e([l()]);break;case"object":if(Array.isArray(l))i=e(l);else for(var r in i="",l)l[r]&&r&&(i&&(i+=" "),i+=r);break;default:i=l}i&&(o&&(o+=" "),o+=i)}}return o},ye="undefined"!=typeof document;function Ee(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var Ce=function(){function e(e){this.isSpeedy=!0,this.tags=[],this.ctr=0,this.opts=e}var t=e.prototype;return t.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=Ee(this.opts),this.injected=!0},t.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},t.insert=function(e,t){if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else{var a=Ee(this.opts);this.tags.push(a),a.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(Ee(this.opts))},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0,this.injected=!1},e}();var Se=function(e,t){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===t&&(t={});var n,a,o=t.key||"css",l=ge()((function(e){n+=e,ye&&r.insert(e,s)}));void 0!==t.prefix&&(a={prefix:t.prefix});var i={registered:{},inserted:{},nonce:t.nonce,key:o},r=new Ce(t);ye&&r.inject();var c=new pe(a);c.use(t.stylisPlugins)(l);var s="";function d(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":return void 0!==e.__emotion_styles?e.toString():d.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return b.call(this,e);default:var n=i.registered[e];return!1===t&&void 0!==n?n:e}}var u,p,m=new WeakMap;function b(e){if(m.has(e))return m.get(e);var t="";return Array.isArray(e)?e.forEach((function(e){t+=d.call(this,e,!1)}),this):Object.keys(e).forEach((function(n){"object"!=typeof e[n]?void 0!==i.registered[e[n]]?t+=n+"{"+i.registered[e[n]]+"}":t+=ve(n)+":"+ke(n,e[n])+";":Array.isArray(e[n])&&"string"==typeof e[n][0]&&void 0===i.registered[e[n][0]]?e[n].forEach((function(e){t+=ve(n)+":"+ke(n,e)+";"})):t+=n+"{"+d.call(this,e[n],!1)+"}"}),this),m.set(e,t),t}var h=/label:\s*([^\s;\n{]+)\s*;/g,g=function(e){var t=!0,n="",a="";null==e||void 0===e.raw?(t=!1,n+=d.call(this,e,!1)):n+=e[0];for(var o=arguments.length,l=new Array(o>1?o-1:0),i=1;i<o;i++)l[i-1]=arguments[i];return l.forEach((function(a,o){n+=d.call(this,a,46===n.charCodeAt(n.length-1)),!0===t&&void 0!==e[o+1]&&(n+=e[o+1])}),this),p=n,n=n.replace(h,(function(e,t){return a+="-"+t,""})),u=function(e,t){return function(e){for(var t,n=e.length,a=0,o=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:a^=(255&e.charCodeAt(o+2))<<16;case 2:a^=(255&e.charCodeAt(o+1))<<8;case 1:a=1540483477*(65535&(a^=255&e.charCodeAt(o)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),((a^=a>>>15)>>>0).toString(36)}(e+t)+t}(n,a),n};function f(e,t){void 0===i.inserted[u]&&(n="",c(e,t),i.inserted[u]=n)}var v=function(){var e=g.apply(this,arguments),t=o+"-"+u;return void 0===i.registered[t]&&(i.registered[t]=p),f("."+t,e),t};function k(e,t){var n="";return t.split(" ").forEach((function(t){void 0!==i.registered[t]?e.push(t):n+=t+" "})),n}function _(e,t){var n=[],a=k(n,e);return n.length<2?e:a+v(n,t)}function y(e){i.inserted[e]=!0}if(ye){var E=document.querySelectorAll("[data-emotion-"+o+"]");Array.prototype.forEach.call(E,(function(e){r.tags[0].parentNode.insertBefore(e,r.tags[0]),e.getAttribute("data-emotion-"+o).split(" ").forEach(y)}))}var C={flush:function(){ye&&(r.flush(),r.inject()),i.inserted={},i.registered={}},hydrate:function(e){e.forEach(y)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _(_e(t))},merge:_,getRegisteredStyles:k,injectGlobal:function(){f("",g.apply(this,arguments))},keyframes:function(){var e=g.apply(this,arguments),t="animation-"+u;return f("","@keyframes "+t+"{"+e+"}"),t},css:v,sheet:r,caches:i};return e.__SECRET_EMOTION__=C,C}(void 0!==n.g?n.g:{}),xe=(Se.flush,Se.hydrate,Se.cx,Se.merge,Se.getRegisteredStyles,Se.injectGlobal),we=(Se.keyframes,Se.css),Te=(Se.sheet,Se.caches,n(5795)),Fe=n(5556),Oe=n.n(Fe),Ie=n(3146),Ae=n.n(Ie),Ne=n(8006),Pe=n(9790);function Be(e){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(e)}function De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Re(e,t,n){return t&&Me(e.prototype,t),n&&Me(e,n),e}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Ve(e,t,n[t])}))}return e}function ze(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ue(e,t)}function qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qe(e)}function Ue(e,t){return Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ue(e,t)}function He(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ke(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?$e(e):t}function je(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Ge=function(){};function Qe(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Je(e,t,n,a){var o=[t,a];if(n&&e)for(var l in n)n.hasOwnProperty(l)&&n[l]&&o.push("".concat(Qe(e,l)));return o.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Ye=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===Be(e)&&null!==e?[e]:[]};function Xe(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Ze(e){return Xe(e)?window.pageYOffset:e.scrollTop}function et(e,t){Xe(e)?window.scrollTo(0,t):e.scrollTop=t}function tt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ge,o=Ze(e),l=t-o,i=0;!function t(){var r=function(e,t,n,a){return n*((e=e/a-1)*e*e+1)+t}(i+=10,o,l,n);et(e,r),i<n?Ae()(t):a(e)}()}function nt(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var at=function(e){return"auto"===e?"bottom":e},ot=function(e){function t(){var e,n;De(this,t);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return Ve($e($e(n=Ke(this,(e=qe(t)).call.apply(e,[this].concat(o))))),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),Ve($e($e(n)),"getPlacement",(function(e){var t=n.props,a=t.minMenuHeight,o=t.maxMenuHeight,l=t.menuPlacement,i=t.menuPosition,r=t.menuShouldScrollIntoView,c=t.theme,s=n.context.getPortalPlacement;if(e){var d="fixed"===i,u=function(e){var t=e.maxHeight,n=e.menuEl,a=e.minHeight,o=e.placement,l=e.shouldScroll,i=e.isFixedPosition,r=e.theme.spacing,c=function(e){var t=getComputedStyle(e),n="absolute"===t.position,a=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var l=e;l=l.parentElement;)if(t=getComputedStyle(l),(!n||"static"!==t.position)&&a.test(t.overflow+t.overflowY+t.overflowX))return l;return o}(n),s={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return s;var d=c.getBoundingClientRect().height,u=n.getBoundingClientRect(),p=u.bottom,m=u.height,b=u.top,h=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,f=Ze(c),v=parseInt(getComputedStyle(n).marginBottom,10),k=parseInt(getComputedStyle(n).marginTop,10),_=h-k,y=g-b,E=_+f,C=d-f-b,S=p-g+f+v,x=f+b-k,w=160;switch(o){case"auto":case"bottom":if(y>=m)return{placement:"bottom",maxHeight:t};if(C>=m&&!i)return l&&tt(c,S,w),{placement:"bottom",maxHeight:t};if(!i&&C>=a||i&&y>=a)return l&&tt(c,S,w),{placement:"bottom",maxHeight:i?y-v:C-v};if("auto"===o||i){var T=t,F=i?_:E;return F>=a&&(T=Math.min(F-v-r.controlHeight,t)),{placement:"top",maxHeight:T}}if("bottom"===o)return et(c,S),{placement:"bottom",maxHeight:t};break;case"top":if(_>=m)return{placement:"top",maxHeight:t};if(E>=m&&!i)return l&&tt(c,x,w),{placement:"top",maxHeight:t};if(!i&&E>=a||i&&_>=a){var O=t;return(!i&&E>=a||i&&_>=a)&&(O=i?_-k:E-k),l&&tt(c,x,w),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return s}({maxHeight:o,menuEl:e,minHeight:a,placement:l,shouldScroll:r&&!d,isFixedPosition:d,theme:c});s&&s(u),n.setState(u)}})),Ve($e($e(n)),"getUpdatedProps",(function(){var e=n.props.menuPlacement,t=n.state.placement||at(e);return We({},n.props,{placement:t,maxHeight:n.state.maxHeight})})),n}return ze(t,e),Re(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);Ve(ot,"contextTypes",{getPortalPlacement:Oe().func});var lt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},it=lt,rt=lt,ct=function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.innerProps;return o().createElement("div",Le({className:a(we(l("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};ct.defaultProps={children:"No options"};var st=function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.innerProps;return o().createElement("div",Le({className:a(we(l("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};st.defaultProps={children:"Loading..."};var dt=function(e){function t(){var e,n;De(this,t);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return Ve($e($e(n=Ke(this,(e=qe(t)).call.apply(e,[this].concat(o))))),"state",{placement:null}),Ve($e($e(n)),"getPortalPlacement",(function(e){var t=e.placement;t!==at(n.props.menuPlacement)&&n.setState({placement:t})})),n}return ze(t,e),Re(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,a=e.controlElement,l=e.menuPlacement,i=e.menuPosition,r=e.getStyles,c="fixed"===i;if(!t&&!c||!a)return null;var s=this.state.placement||at(l),d=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(a),u=c?0:window.pageYOffset,p={offset:d[s]+u,position:i,rect:d},m=o().createElement("div",{className:we(r("menuPortal",p))},n);return t?(0,Te.createPortal)(m,t):m}}]),t}(a.Component);Ve(dt,"childContextTypes",{getPortalPlacement:Oe().func});var ut=Array.isArray,pt=Object.keys,mt=Object.prototype.hasOwnProperty;function bt(e,t){if(e===t)return!0;if(e&&t&&"object"==Be(e)&&"object"==Be(t)){var n,a,o,l=ut(e),i=ut(t);if(l&&i){if((a=e.length)!=t.length)return!1;for(n=a;0!=n--;)if(!bt(e[n],t[n]))return!1;return!0}if(l!=i)return!1;var r=e instanceof Date,c=t instanceof Date;if(r!=c)return!1;if(r&&c)return e.getTime()==t.getTime();var s=e instanceof RegExp,d=t instanceof RegExp;if(s!=d)return!1;if(s&&d)return e.toString()==t.toString();var u=pt(e);if((a=u.length)!==pt(t).length)return!1;for(n=a;0!=n--;)if(!mt.call(t,u[n]))return!1;for(n=a;0!=n--;)if(!("_owner"===(o=u[n])&&e.$$typeof||bt(e[o],t[o])))return!1;return!0}return e!=e&&t!=t}function ht(e,t){try{return bt(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}var gt=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],ft=function(e){for(var t=0;t<gt.length;t++)e=e.replace(gt[t].letters,gt[t].base);return e},vt=function(e){return e.replace(/^\s+|\s+$/g,"")},kt=function(e){return"".concat(e.label," ").concat(e.value)},_t=function(e){return o().createElement("span",Le({className:we({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},yt=function(e){function t(){return De(this,t),Ke(this,qe(t).apply(this,arguments))}return ze(t,e),Re(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=(e.emotion,He(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return o().createElement("input",Le({ref:t},n,{className:we({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(a.Component),Et=function(e){function t(){return De(this,t),Ke(this,qe(t).apply(this,arguments))}return ze(t,e),Re(t,[{key:"componentDidMount",value:function(){this.props.innerRef((0,Te.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(a.Component),Ct=["boxSizing","height","overflow","paddingRight","position"],St={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function xt(e){e.preventDefault()}function wt(e){e.stopPropagation()}function Tt(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ft(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ot=!("undefined"==typeof window||!window.document||!window.document.createElement),It=0,At=function(e){function t(){var e,n;De(this,t);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return Ve($e($e(n=Ke(this,(e=qe(t)).call.apply(e,[this].concat(o))))),"originalStyles",{}),Ve($e($e(n)),"listenerOptions",{capture:!1,passive:!1}),n}return ze(t,e),Re(t,[{key:"componentDidMount",value:function(){var e=this;if(Ot){var t=this.props,n=t.accountForScrollbars,a=t.touchScrollTarget,o=document.body,l=o&&o.style;if(n&&Ct.forEach((function(t){var n=l&&l[t];e.originalStyles[t]=n})),n&&It<1){var i=parseInt(this.originalStyles.paddingRight,10)||0,r=document.body?document.body.clientWidth:0,c=window.innerWidth-r+i||0;Object.keys(St).forEach((function(e){var t=St[e];l&&(l[e]=t)})),l&&(l.paddingRight="".concat(c,"px"))}o&&Ft()&&(o.addEventListener("touchmove",xt,this.listenerOptions),a&&(a.addEventListener("touchstart",Tt,this.listenerOptions),a.addEventListener("touchmove",wt,this.listenerOptions))),It+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(Ot){var t=this.props,n=t.accountForScrollbars,a=t.touchScrollTarget,o=document.body,l=o&&o.style;It=Math.max(It-1,0),n&&It<1&&Ct.forEach((function(t){var n=e.originalStyles[t];l&&(l[t]=n)})),o&&Ft()&&(o.removeEventListener("touchmove",xt,this.listenerOptions),a&&(a.removeEventListener("touchstart",Tt,this.listenerOptions),a.removeEventListener("touchmove",wt,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}(a.Component);Ve(At,"defaultProps",{accountForScrollbars:!0});var Nt=function(e){function t(){var e,n;De(this,t);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return Ve($e($e(n=Ke(this,(e=qe(t)).call.apply(e,[this].concat(o))))),"state",{touchScrollTarget:null}),Ve($e($e(n)),"getScrollTarget",(function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})})),Ve($e($e(n)),"blurSelectInput",(function(){document.activeElement&&document.activeElement.blur()})),n}return ze(t,e),Re(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,a=this.state.touchScrollTarget;return n?o().createElement("div",null,o().createElement("div",{onClick:this.blurSelectInput,className:we({position:"fixed",left:0,bottom:0,right:0,top:0})}),o().createElement(Et,{innerRef:this.getScrollTarget},t),a?o().createElement(At,{touchScrollTarget:a}):null):t}}]),t}(a.PureComponent),Pt=function(e){function t(){var e,n;De(this,t);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return Ve($e($e(n=Ke(this,(e=qe(t)).call.apply(e,[this].concat(o))))),"isBottom",!1),Ve($e($e(n)),"isTop",!1),Ve($e($e(n)),"scrollTarget",void 0),Ve($e($e(n)),"touchStart",void 0),Ve($e($e(n)),"cancelScroll",(function(e){e.preventDefault(),e.stopPropagation()})),Ve($e($e(n)),"handleEventDelta",(function(e,t){var a=n.props,o=a.onBottomArrive,l=a.onBottomLeave,i=a.onTopArrive,r=a.onTopLeave,c=n.scrollTarget,s=c.scrollTop,d=c.scrollHeight,u=c.clientHeight,p=n.scrollTarget,m=t>0,b=d-u-s,h=!1;b>t&&n.isBottom&&(l&&l(e),n.isBottom=!1),m&&n.isTop&&(r&&r(e),n.isTop=!1),m&&t>b?(o&&!n.isBottom&&o(e),p.scrollTop=d,h=!0,n.isBottom=!0):!m&&-t>s&&(i&&!n.isTop&&i(e),p.scrollTop=0,h=!0,n.isTop=!0),h&&n.cancelScroll(e)})),Ve($e($e(n)),"onWheel",(function(e){n.handleEventDelta(e,e.deltaY)})),Ve($e($e(n)),"onTouchStart",(function(e){n.touchStart=e.changedTouches[0].clientY})),Ve($e($e(n)),"onTouchMove",(function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)})),Ve($e($e(n)),"getScrollTarget",(function(e){n.scrollTarget=e})),n}return ze(t,e),Re(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return o().createElement(Et,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),Bt=function(e){function t(){return De(this,t),Ke(this,qe(t).apply(this,arguments))}return ze(t,e),Re(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=He(e,["isEnabled"]);return t?o().createElement(Pt,n):this.props.children}}]),t}(a.Component);Ve(Bt,"defaultProps",{isEnabled:!0});var Dt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,a=t.isMulti,o=t.label,l=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(l?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(a?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Mt=function(e,t){var n=t.value,a=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,a?" is disabled. Select another option.":", selected.")}},Rt=function(e){return!!e.isDisabled},Vt=function(e){function t(){return De(this,t),Ke(this,qe(t).apply(this,arguments))}return ze(t,e),Re(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,a=e.cx,l=e.isMulti,i=e.getStyles,r=e.hasValue;return o().createElement("div",{className:a(we(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":l,"value-container--has-value":r},n)},t)}}]),t}(a.Component),Lt=function(e){var t=e.size,n=He(e,["size"]);return o().createElement("svg",Le({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:we({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},Wt=function(e){return o().createElement(Lt,Le({size:20},e),o().createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},zt=function(e){return o().createElement(Lt,Le({size:20},e),o().createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},qt=function(e){var t=e.isFocused,n=e.theme,a=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Ut=qt,Ht=qt,$t="react-select-loading-indicator",Kt=!1,jt=function(e){var t=e.color,n=e.delay,a=e.offset;return o().createElement("span",{className:we({animationDuration:"1s",animationDelay:"".concat(n,"ms"),animationIterationCount:"infinite",animationName:$t,animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:a?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},Gt=function(e){var t=e.className,n=e.cx,a=e.getStyles,l=e.innerProps,i=e.isFocused,r=e.isRtl,c=e.theme.colors,s=i?c.neutral80:c.neutral20;return Kt||(xe("@keyframes ",$t,"{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),Kt=!0),o().createElement("div",Le({},l,{className:n(we(a("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),o().createElement(jt,{color:s,delay:0,offset:r}),o().createElement(jt,{color:s,delay:160,offset:!0}),o().createElement(jt,{color:s,delay:320,offset:!r}))};Gt.defaultProps={size:4};var Qt=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},Jt=function(e){var t=e.children,n=e.innerProps;return o().createElement("div",n,t)},Yt=Jt,Xt=Jt,Zt=function(e){function t(){return De(this,t),Ke(this,qe(t).apply(this,arguments))}return ze(t,e),Re(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return o().createElement("div",n,t||o().createElement(Wt,{size:14}))}}]),t}(a.Component),en=function(e){function t(){return De(this,t),Ke(this,qe(t).apply(this,arguments))}return ze(t,e),Re(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,a=e.components,l=e.cx,i=e.data,r=e.getStyles,c=e.innerProps,s=e.isDisabled,d=e.removeProps,u=e.selectProps,p=a.Container,m=a.Label,b=a.Remove,h=We({className:l(we(r("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},c),g={className:l(we(r("multiValueLabel",this.props)),{"multi-value__label":!0},n)},f=We({className:l(we(r("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},d);return o().createElement(p,{data:i,innerProps:h,selectProps:u},o().createElement(m,{data:i,innerProps:g,selectProps:u},t),o().createElement(b,{data:i,innerProps:f,selectProps:u}))}}]),t}(a.Component);Ve(en,"defaultProps",{cropWithEllipsis:!0});var tn={ClearIndicator:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.innerProps;return o().createElement("div",Le({},i,{className:a(we(l("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||o().createElement(Wt,null))},Control:function(e){var t=e.children,n=e.cx,a=e.getStyles,l=e.className,i=e.isDisabled,r=e.isFocused,c=e.innerRef,s=e.innerProps,d=e.menuIsOpen;return o().createElement("div",Le({ref:c,className:n(we(a("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":r,"control--menu-is-open":d},l)},s),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.innerProps;return o().createElement("div",Le({},i,{className:a(we(l("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||o().createElement(zt,null))},DownChevron:zt,CrossIcon:Wt,Group:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.Heading,r=e.headingProps,c=e.label,s=e.theme,d=e.selectProps;return o().createElement("div",{className:a(we(l("group",e)),{group:!0},n)},o().createElement(i,Le({},r,{selectProps:d,theme:s,getStyles:l,cx:a}),c),o().createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,a=e.getStyles,l=e.theme,i=(e.selectProps,He(e,["className","cx","getStyles","theme","selectProps"]));return o().createElement("div",Le({className:n(we(a("groupHeading",We({theme:l},i))),{"group-heading":!0},t)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles;return o().createElement("div",{className:a(we(l("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,a=e.getStyles,l=e.innerProps;return o().createElement("span",Le({},l,{className:n(we(a("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,a=e.getStyles,l=e.innerRef,i=e.isHidden,r=e.isDisabled,c=e.theme,s=(e.selectProps,He(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return o().createElement("div",{className:we(a("input",We({theme:c},s)))},o().createElement(Ne.A,Le({className:n(null,{input:!0},t),inputRef:l,inputStyle:Qt(i),disabled:r},s)))},LoadingIndicator:Gt,Menu:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.innerRef,r=e.innerProps,c=a(we(l("menu",e)),{menu:!0},n);return o().createElement("div",Le({className:c},r,{ref:i}),t)},MenuList:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.isMulti,r=e.innerRef;return o().createElement("div",{className:a(we(l("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:r},t)},MenuPortal:dt,LoadingMessage:st,NoOptionsMessage:ct,MultiValue:en,MultiValueContainer:Yt,MultiValueLabel:Xt,MultiValueRemove:Zt,Option:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.isDisabled,r=e.isFocused,c=e.isSelected,s=e.innerRef,d=e.innerProps;return o().createElement("div",Le({ref:s,className:a(we(l("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":r,"option--is-selected":c},n)},d),t)},Placeholder:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.innerProps;return o().createElement("div",Le({className:a(we(l("placeholder",e)),{placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.innerProps,r=e.isDisabled,c=e.isRtl;return o().createElement("div",Le({className:a(we(l("container",e)),{"--is-disabled":r,"--is-rtl":c},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,a=e.cx,l=e.getStyles,i=e.isDisabled,r=e.innerProps;return o().createElement("div",Le({className:a(we(l("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},r),t)},ValueContainer:Vt},nn=function(e){return We({},tn,e.components)},an={clearIndicator:Ht,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,a=e.theme,o=a.colors,l=a.borderRadius,i=a.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:Ut,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,a=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*a,marginTop:2*a,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,a=n.spacing,o=n.colors;return{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,a=e.theme,o=a.colors,l=a.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*l,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:rt,menu:function(e){var t,n=e.placement,a=e.theme,o=a.borderRadius,l=a.spacing,i=a.colors;return Ve(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Ve(t,"backgroundColor",i.neutral0),Ve(t,"borderRadius",o),Ve(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ve(t,"marginBottom",l.menuGutter),Ve(t,"marginTop",l.menuGutter),Ve(t,"position","absolute"),Ve(t,"width","100%"),Ve(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,a=e.position;return{left:t.left,position:a,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,a=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:a/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,a=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:a.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,a=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:a/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:it,option:function(e){var t=e.isDisabled,n=e.isFocused,a=e.isSelected,o=e.theme,l=o.spacing,i=o.colors;return{label:"option",backgroundColor:a?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:a?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*l.baseUnit,"px ").concat(3*l.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(a?i.primary:i.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,a=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2,maxWidth:"calc(100% - ".concat(2*a.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},on={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},ln={backspaceRemovesValue:!0,blurInputOnSelect:nt(),captureMenuScroll:!nt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=We({ignoreCase:!0,ignoreAccents:!0,stringify:kt,trim:!0,matchFrom:"any"},undefined),a=n.ignoreCase,o=n.ignoreAccents,l=n.stringify,i=n.trim,r=n.matchFrom,c=i?vt(t):t,s=i?vt(l(e)):l(e);return a&&(c=c.toLowerCase(),s=s.toLowerCase()),o&&(c=ft(c),s=ft(s)),"start"===r?s.substr(0,c.length)===c:s.indexOf(c)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Rt,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},rn=1,cn=function(e){function t(e){var n;De(this,t),Ve($e($e(n=Ke(this,qe(t).call(this,e)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),Ve($e($e(n)),"blockOptionHover",!1),Ve($e($e(n)),"isComposing",!1),Ve($e($e(n)),"clearFocusValueOnUpdate",!1),Ve($e($e(n)),"commonProps",void 0),Ve($e($e(n)),"components",void 0),Ve($e($e(n)),"hasGroups",!1),Ve($e($e(n)),"initialTouchX",0),Ve($e($e(n)),"initialTouchY",0),Ve($e($e(n)),"inputIsHiddenAfterUpdate",void 0),Ve($e($e(n)),"instancePrefix",""),Ve($e($e(n)),"openAfterFocus",!1),Ve($e($e(n)),"scrollToFocusedOptionOnUpdate",!1),Ve($e($e(n)),"userIsDragging",void 0),Ve($e($e(n)),"controlRef",null),Ve($e($e(n)),"getControlRef",(function(e){n.controlRef=e})),Ve($e($e(n)),"focusedOptionRef",null),Ve($e($e(n)),"getFocusedOptionRef",(function(e){n.focusedOptionRef=e})),Ve($e($e(n)),"menuListRef",null),Ve($e($e(n)),"getMenuListRef",(function(e){n.menuListRef=e})),Ve($e($e(n)),"inputRef",null),Ve($e($e(n)),"getInputRef",(function(e){n.inputRef=e})),Ve($e($e(n)),"cacheComponents",(function(e){n.components=nn({components:e})})),Ve($e($e(n)),"focus",n.focusInput),Ve($e($e(n)),"blur",n.blurInput),Ve($e($e(n)),"onChange",(function(e,t){var a=n.props;(0,a.onChange)(e,We({},t,{name:a.name}))})),Ve($e($e(n)),"setValue",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",a=arguments.length>2?arguments[2]:void 0,o=n.props,l=o.closeMenuOnSelect,i=o.isMulti;n.onInputChange("",{action:"set-value"}),l&&(n.inputIsHiddenAfterUpdate=!i,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:a})})),Ve($e($e(n)),"selectOption",(function(e){var t=n.props,a=t.blurInputOnSelect,o=t.isMulti,l=n.state.selectValue;if(o)if(n.isOptionSelected(e,l)){var i=n.getOptionValue(e);n.setValue(l.filter((function(e){return n.getOptionValue(e)!==i})),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,l)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(je(l),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,l)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));a&&n.blurInput()})),Ve($e($e(n)),"removeValue",(function(e){var t=n.state.selectValue,a=n.getOptionValue(e);n.onChange(t.filter((function(e){return n.getOptionValue(e)!==a})),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()})),Ve($e($e(n)),"clearValue",(function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})})),Ve($e($e(n)),"popValue",(function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})})),Ve($e($e(n)),"getOptionLabel",(function(e){return n.props.getOptionLabel(e)})),Ve($e($e(n)),"getOptionValue",(function(e){return n.props.getOptionValue(e)})),Ve($e($e(n)),"getStyles",(function(e,t){var a=an[e](t);a.boxSizing="border-box";var o=n.props.styles[e];return o?o(a,t):a})),Ve($e($e(n)),"getElementId",(function(e){return"".concat(n.instancePrefix,"-").concat(e)})),Ve($e($e(n)),"getActiveDescendentId",(function(){var e=n.props.menuIsOpen,t=n.state,a=t.menuOptions,o=t.focusedOption;if(o&&e){var l=a.focusable.indexOf(o),i=a.render[l];return i&&i.key}})),Ve($e($e(n)),"announceAriaLiveSelection",(function(e){var t=e.event,a=e.context;n.setState({ariaLiveSelection:Mt(t,a)})})),Ve($e($e(n)),"announceAriaLiveContext",(function(e){var t=e.event,a=e.context;n.setState({ariaLiveContext:Dt(t,We({},a,{label:n.props["aria-label"]}))})})),Ve($e($e(n)),"onMenuMouseDown",(function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())})),Ve($e($e(n)),"onMenuMouseMove",(function(e){n.blockOptionHover=!1})),Ve($e($e(n)),"onControlMouseDown",(function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()})),Ve($e($e(n)),"onDropdownIndicatorMouseDown",(function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,a=t.isMulti,o=t.menuIsOpen;n.focusInput(),o?(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}})),Ve($e($e(n)),"onClearIndicatorMouseDown",(function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout((function(){return n.focusInput()})))})),Ve($e($e(n)),"onScroll",(function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Xe(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()})),Ve($e($e(n)),"onCompositionStart",(function(){n.isComposing=!0})),Ve($e($e(n)),"onCompositionEnd",(function(){n.isComposing=!1})),Ve($e($e(n)),"onTouchStart",(function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)})),Ve($e($e(n)),"onTouchMove",(function(e){var t=e.touches.item(0);if(t){var a=Math.abs(t.clientX-n.initialTouchX),o=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=a>5||o>5}})),Ve($e($e(n)),"onTouchEnd",(function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)})),Ve($e($e(n)),"onControlTouchEnd",(function(e){n.userIsDragging||n.onControlMouseDown(e)})),Ve($e($e(n)),"onClearIndicatorTouchEnd",(function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)})),Ve($e($e(n)),"onDropdownIndicatorTouchEnd",(function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)})),Ve($e($e(n)),"handleInputChange",(function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()})),Ve($e($e(n)),"onInputFocus",(function(e){var t=n.props,a=t.isSearchable,o=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:a,isMulti:o}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1})),Ve($e($e(n)),"onInputBlur",(function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))})),Ve($e($e(n)),"onOptionHover",(function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})})),Ve($e($e(n)),"shouldHideSelectedOptions",(function(){var e=n.props,t=e.hideSelectedOptions,a=e.isMulti;return void 0===t?a:t})),Ve($e($e(n)),"onKeyDown",(function(e){var t=n.props,a=t.isMulti,o=t.backspaceRemovesValue,l=t.escapeClearsValue,i=t.inputValue,r=t.isClearable,c=t.isDisabled,s=t.menuIsOpen,d=t.onKeyDown,u=t.tabSelectsValue,p=t.openMenuOnFocus,m=n.state,b=m.focusedOption,h=m.focusedValue,g=m.selectValue;if(!(c||"function"==typeof d&&(d(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!a||i)return;n.focusValue("previous");break;case"ArrowRight":if(!a||i)return;n.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(h)n.removeValue(h);else{if(!o)return;a?n.popValue():r&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!s||!u||!b||p&&n.isOptionSelected(b,g))return;n.selectOption(b);break;case"Enter":if(229===e.keyCode)break;if(s){if(!b)return;if(n.isComposing)return;n.selectOption(b);break}return;case"Escape":s?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):r&&l&&n.clearValue();break;case" ":if(i)return;if(!s){n.openMenu("first");break}if(!b)return;n.selectOption(b);break;case"ArrowUp":s?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":s?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!s)return;n.focusOption("pageup");break;case"PageDown":if(!s)return;n.focusOption("pagedown");break;case"Home":if(!s)return;n.focusOption("first");break;case"End":if(!s)return;n.focusOption("last");break;default:return}e.preventDefault()}}));var a=e.value;n.cacheComponents=de(n.cacheComponents,ht).bind($e($e(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++rn);var o=Ye(a),l=n.buildMenuOptions(e,o);return n.state.menuOptions=l,n.state.selectValue=o,n}return ze(t,e),Re(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,a=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==a||e.options!==n||e.inputValue!==o){var l=Ye(e.value),i=this.buildMenuOptions(e,l),r=this.getNextFocusedValue(l),c=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:l,focusedOption:c,focusedValue:r})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,a,o,l,i=this.props,r=i.isDisabled,c=i.menuIsOpen,s=this.state.isFocused;(s&&!r&&e.isDisabled||s&&c&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,a=t.getBoundingClientRect(),o=n.getBoundingClientRect(),l=n.offsetHeight/3,o.bottom+l>a.bottom?et(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+l,t.scrollHeight)):o.top-l<a.top&&et(t,Math.max(n.offsetTop-l,0))),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,a=t.selectValue,o=t.isFocused,l=this.props.isMulti,i="first"===e?0:n.focusable.length-1;if(!l){var r=n.focusable.indexOf(a[0]);r>-1&&(i=r)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[i]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,a=t.isSearchable,o=this.state,l=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var r=l.indexOf(i);i||(r=-1,this.announceAriaLiveContext({event:"value"}));var c=l.length-1,s=-1;if(l.length){switch(e){case"previous":s=0===r?0:-1===r?c:r-1;break;case"next":r>-1&&r<c&&(s=r+1)}-1===s&&this.announceAriaLiveContext({event:"input",context:{isSearchable:a,isMulti:n}}),this.setState({inputIsHidden:-1!==s,focusedValue:l[s]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,a=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var l=0,i=o.indexOf(a);a||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?l=i>0?i-1:o.length-1:"down"===e?l=(i+1)%o.length:"pageup"===e?(l=i-t)<0&&(l=0):"pagedown"===e?(l=i+t)>o.length-1&&(l=o.length-1):"last"===e&&(l=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[l],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Rt(o[l])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(on):We({},on,this.props.theme):on}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,a=this.selectOption,o=this.props,l=o.classNamePrefix,i=o.isMulti,r=o.isRtl,c=o.options,s=this.state.selectValue,d=this.hasValue();return{cx:Je.bind(null,l),clearValue:e,getStyles:t,getValue:function(){return s},hasValue:d,isMulti:i,isRtl:r,options:c,selectOption:a,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,a=t.selectValue.indexOf(n);if(a>-1){if(e.indexOf(n)>-1)return n;if(a<e.length)return e[a]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var a=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===a}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:a})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,a=e.inputValue,o=void 0===a?"":a,l=e.options,i=function(e,a){var l=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),r=n.getOptionLabel(e),c=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:r,value:c,data:e},o))){var s=l?void 0:function(){return n.onOptionHover(e)},d=l?void 0:function(){return n.selectOption(e)},u="".concat(n.getElementId("option"),"-").concat(a);return{innerProps:{id:u,onClick:d,onMouseMove:s,onMouseOver:s,tabIndex:-1},data:e,isDisabled:l,isSelected:i,key:u,label:r,type:"option",value:c}}};return l.reduce((function(e,t,a){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map((function(t,n){var o=i(t,"".concat(a,"-").concat(n));return o&&e.focusable.push(t),o})).filter(Boolean);if(o.length){var l="".concat(n.getElementId("group"),"-").concat(a);e.render.push({type:"group",key:l,data:t,options:o})}}else{var r=i(t,"".concat(a));r&&(e.render.push(r),e.focusable.push(t))}return e}),{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,a=e.focusedValue,o=e.focusedOption,l=this.props,i=l.options,r=l.menuIsOpen,c=l.inputValue,s=l.screenReaderStatus,d=a?function(e){var t=e.focusedValue,n=e.selectValue;return"value ".concat((0,e.getOptionLabel)(t)," focused, ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedValue:a,getOptionLabel:this.getOptionLabel,selectValue:n}):"",u=o&&r?function(e){var t=e.focusedOption,n=e.options;return"option ".concat((0,e.getOptionLabel)(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"",p=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")}({inputValue:c,screenReaderMessage:s({count:this.countOptions()})});return"".concat(d," ").concat(u," ").concat(p," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,a=e.inputId,l=e.inputValue,i=e.tabIndex,r=this.components.Input,c=this.state.inputIsHidden,s=a||this.getElementId("input");if(!n)return o().createElement(yt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ge,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,value:""});var d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},u=this.commonProps,p=u.cx,m=u.theme,b=u.selectProps;return o().createElement(r,Le({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:c,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:b,spellCheck:"false",tabIndex:i,theme:m,type:"text",value:l},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,a=t.MultiValueContainer,l=t.MultiValueLabel,i=t.MultiValueRemove,r=t.SingleValue,c=t.Placeholder,s=this.commonProps,d=this.props,u=d.controlShouldRenderValue,p=d.isDisabled,m=d.isMulti,b=d.inputValue,h=d.placeholder,g=this.state,f=g.selectValue,v=g.focusedValue,k=g.isFocused;if(!this.hasValue()||!u)return b?null:o().createElement(c,Le({},s,{key:"placeholder",isDisabled:p,isFocused:k}),h);if(m){var _=f.map((function(t){var r=t===v;return o().createElement(n,Le({},s,{components:{Container:a,Label:l,Remove:i},isFocused:r,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));return _}if(b)return null;var y=f[0];return o().createElement(r,Le({},s,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,a=n.isDisabled,l=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||a||!this.hasValue()||l)return null;var r={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o().createElement(e,Le({},t,{innerProps:r,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,a=n.isDisabled,l=n.isLoading,i=this.state.isFocused;return e&&l?o().createElement(e,Le({},t,{innerProps:{"aria-hidden":"true"},isDisabled:a,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var a=this.commonProps,l=this.props.isDisabled,i=this.state.isFocused;return o().createElement(n,Le({},a,{isDisabled:l,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,a=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o().createElement(e,Le({},t,{innerProps:l,isDisabled:n,isFocused:a}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,a=t.GroupHeading,l=t.Menu,i=t.MenuList,r=t.MenuPortal,c=t.LoadingMessage,s=t.NoOptionsMessage,d=t.Option,u=this.commonProps,p=this.state,m=p.focusedOption,b=p.menuOptions,h=this.props,g=h.captureMenuScroll,f=h.inputValue,v=h.isLoading,k=h.loadingMessage,_=h.minMenuHeight,y=h.maxMenuHeight,E=h.menuIsOpen,C=h.menuPlacement,S=h.menuPosition,x=h.menuPortalTarget,w=h.menuShouldBlockScroll,T=h.menuShouldScrollIntoView,F=h.noOptionsMessage,O=h.onMenuScrollToTop,I=h.onMenuScrollToBottom;if(!E)return null;var A,N=function(t){var n=m===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,o().createElement(d,Le({},u,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())A=b.render.map((function(t){if("group"===t.type){t.type;var l=He(t,["type"]),i="".concat(t.key,"-heading");return o().createElement(n,Le({},u,l,{Heading:a,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return N(e)})))}if("option"===t.type)return N(t)}));else if(v){var P=k({inputValue:f});if(null===P)return null;A=o().createElement(c,u,P)}else{var B=F({inputValue:f});if(null===B)return null;A=o().createElement(s,u,B)}var D={minMenuHeight:_,maxMenuHeight:y,menuPlacement:C,menuPosition:S,menuShouldScrollIntoView:T},M=o().createElement(ot,Le({},u,D),(function(t){var n=t.ref,a=t.placerProps,r=a.placement,c=a.maxHeight;return o().createElement(l,Le({},u,D,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:r}),o().createElement(Bt,{isEnabled:g,onTopArrive:O,onBottomArrive:I},o().createElement(Nt,{isEnabled:w},o().createElement(i,Le({},u,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:c}),A))))}));return x||"fixed"===S?o().createElement(r,Le({},u,{appendTo:x,controlElement:this.controlRef,menuPlacement:C,menuPosition:S}),M):M}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,a=t.isDisabled,l=t.isMulti,i=t.name,r=this.state.selectValue;if(i&&!a){if(l){if(n){var c=r.map((function(t){return e.getOptionValue(t)})).join(n);return o().createElement("input",{name:i,type:"hidden",value:c})}var s=r.length>0?r.map((function(t,n){return o().createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):o().createElement("input",{name:i,type:"hidden"});return o().createElement("div",null,s)}var d=r[0]?this.getOptionValue(r[0]):"";return o().createElement("input",{name:i,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?o().createElement(_t,{"aria-live":"assertive"},o().createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),o().createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,a=e.SelectContainer,l=e.ValueContainer,i=this.props,r=i.className,c=i.id,s=i.isDisabled,d=i.menuIsOpen,u=this.state.isFocused,p=this.commonProps=this.getCommonProps();return o().createElement(a,Le({},p,{className:r,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:u}),this.renderLiveRegion(),o().createElement(t,Le({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:u,menuIsOpen:d}),o().createElement(l,Le({},p,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),o().createElement(n,Le({},p,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Ve(cn,"defaultProps",ln);var sn={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},dn=function(e){var t,n;return n=t=function(t){function n(){var e,t;De(this,n);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return Ve($e($e(t=Ke(this,(e=qe(n)).call.apply(e,[this].concat(o))))),"select",void 0),Ve($e($e(t)),"state",{inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue}),Ve($e($e(t)),"onChange",(function(e,n){t.callProp("onChange",e,n),t.setState({value:e})})),Ve($e($e(t)),"onInputChange",(function(e,n){var a=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==a?a:e})})),Ve($e($e(t)),"onMenuOpen",(function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})})),Ve($e($e(t)),"onMenuClose",(function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})})),t}return ze(n,t),Re(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return(t=this.props)[e].apply(t,a)}}},{key:"render",value:function(){var t=this,n=this.props,a=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,He(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return o().createElement(e,Le({},a,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(a.Component),Ve(t,"defaultProps",sn),n},un={cacheOptions:!1,defaultOptions:!1,filterOption:null},pn=function(e){var t,n;return n=t=function(t){function n(e){var t;return De(this,n),Ve($e($e(t=Ke(this,qe(n).call(this)))),"select",void 0),Ve($e($e(t)),"lastRequest",void 0),Ve($e($e(t)),"mounted",!1),Ve($e($e(t)),"optionsCache",{}),Ve($e($e(t)),"handleInputChange",(function(e,n){var a=t.props,o=a.cacheOptions,l=function(e,t,n){if(n){var a=n(e,t);if("string"==typeof a)return a}return e}(e,n,a.onInputChange);if(!l)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[l])t.setState({inputValue:l,loadedInputValue:l,loadedOptions:t.optionsCache[l],isLoading:!1,passEmptyOptions:!1});else{var i=t.lastRequest={};t.setState({inputValue:l,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},(function(){t.loadOptions(l,(function(e){t.mounted&&(e&&(t.optionsCache[l]=e),i===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:l,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return l})),t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return ze(n,t),Re(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var a=n(e,t);a&&"function"==typeof a.then&&a.then(t,(function(){return t()}))}},{key:"render",value:function(){var t=this,n=this.props,a=(n.loadOptions,He(n,["loadOptions"])),l=this.state,i=l.defaultOptions,r=l.inputValue,c=l.isLoading,s=l.loadedInputValue,d=l.loadedOptions,u=l.passEmptyOptions?[]:r&&s?d:i||[];return o().createElement(e,Le({},a,{ref:function(e){t.select=e},options:u,isLoading:c,onInputChange:this.handleInputChange}))}}]),n}(a.Component),Ve(t,"defaultProps",un),n},mn=(pn(dn(cn)),function(){var e=arguments.length>1?arguments[1]:void 0,t=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase(),n=String(e.value).toLowerCase(),a=String(e.label).toLowerCase();return n===t||a===t}),bn=We({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some((function(t){return mn(e,t)}))||n.some((function(t){return mn(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),hn=function(e){var t,n;return n=t=function(t){function n(e){var t;De(this,n),Ve($e($e(t=Ke(this,qe(n).call(this,e)))),"select",void 0),Ve($e($e(t)),"onChange",(function(e,n){var a=t.props,o=a.getNewOptionData,l=a.inputValue,i=a.isMulti,r=a.onChange,c=a.onCreateOption,s=a.value;if("select-option"!==n.action)return r(e,n);var d=t.state.newOption,u=Array.isArray(e)?e:[e];if(u[u.length-1]!==d)r(e,n);else if(c)c(l);else{var p=o(l,l);r(i?[].concat(je(Ye(s)),[p]):p,{action:"create-option"})}}));var a=e.options||[];return t.state={newOption:void 0,options:a},t}return ze(n,t),Re(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,a=e.formatCreateLabel,o=e.getNewOptionData,l=e.inputValue,i=e.isLoading,r=e.isValidNewOption,c=e.value,s=e.options||[],d=this.state.newOption;d=r(l,Ye(c),s)?o(l,a(l)):void 0,this.setState({newOption:d,options:!t&&i||!d?s:"first"===n?[d].concat(je(s)):[].concat(je(s),[d])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=Le({},this.props),a=this.state.options;return o().createElement(e,Le({},n,{ref:function(e){t.select=e},options:a,onChange:this.onChange}))}}]),n}(a.Component),Ve(t,"defaultProps",bn),n},gn=(dn(hn(cn)),pn(dn(hn(cn))),function(e){var t=e.component,n=e.duration,a=void 0===n?1:n,l=e.in,i=(e.onExited,He(e,["component","duration","in","onExited"])),r={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(a,"ms")},exiting:{opacity:0},exited:{opacity:0}};return o().createElement(Pe.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:l,timeout:a},(function(e){var n={style:We({},r[e])};return o().createElement(t,Le({innerProps:n},i))}))}),fn=function(e){function t(){var e,n;De(this,t);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return Ve($e($e(n=Ke(this,(e=qe(t)).call.apply(e,[this].concat(o))))),"duration",260),Ve($e($e(n)),"rafID",void 0),Ve($e($e(n)),"state",{width:"auto"}),Ve($e($e(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),Ve($e($e(n)),"getWidth",(function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame((function(){var t=e.getBoundingClientRect().width;n.setState({width:t})})))})),Ve($e($e(n)),"getStyle",(function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}})),Ve($e($e(n)),"getTransition",(function(e){return n.transition[e]})),n}return ze(t,e),Re(t,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,a=t.in,l=this.state.width;return o().createElement(Pe.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:a,timeout:this.duration},(function(t){var a=We({},e.getStyle(l),e.getTransition(t));return o().createElement("div",{ref:e.getWidth,style:a},n)}))}}]),t}(a.Component),vn=function(e){return function(t){var n=t.in,a=t.onExited,l=He(t,["in","onExited"]);return o().createElement(fn,{in:n,onExited:a},o().createElement(e,Le({cropWithEllipsis:n},l)))}},kn=function(e){return function(t){return o().createElement(gn,Le({component:e,duration:t.isMulti?260:1},t))}},yn=function(e){return function(t){return o().createElement(gn,Le({component:e},t))}},En=function(e){return function(t){return o().createElement(Pe.TransitionGroup,Le({component:e},t))}},Cn=function(){var e,t=nn({components:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}),n=t.Input,a=t.MultiValue,l=t.Placeholder,i=t.SingleValue,r=t.ValueContainer,c=He(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return We({Input:(e=n,function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var n=He(t,["in","onExited","appear","enter","exit"]);return o().createElement(e,n)}),MultiValue:vn(a),Placeholder:kn(l),SingleValue:yn(i),ValueContainer:En(r)},c)},Sn=Cn();Sn.Input,Sn.MultiValue,Sn.Placeholder,Sn.SingleValue,Sn.ValueContainer,de(Cn,ht);const xn=dn(cn);function wn({setAttributes:e,selectedActions:t}){const n=[{value:"activecampaign",label:(0,i.__)("ActiveCampaign (Pro addon)","kadence-blocks"),help:(0,i.__)("Add user to ActiveCampaign","kadence-blocks"),isDisabled:!0},{value:"autoEmail",label:(0,i.__)("Auto Respond Email (Pro addon)","kadence-blocks"),help:(0,i.__)("Send instant response to form entrant","kadence-blocks"),isDisabled:!0},{value:"sendinblue",label:(0,i.__)("Brevo (SendInBlue) (Pro addon)","kadence-blocks"),help:(0,i.__)("Add user to Brevo list","kadence-blocks"),isDisabled:!0},{value:"convertkit",label:(0,i.__)("ConvertKit (Pro addon)","kadence-blocks"),help:(0,i.__)("Add user to ConvertKit","kadence-blocks"),isDisabled:!0},{value:"entry",label:(0,i.__)("Database Entry (Pro addon)","kadence-blocks"),help:(0,i.__)("Log each form submission","kadence-blocks"),isDisabled:!0},{value:"email",label:(0,i.__)("Email","kadence-blocks"),help:"",isDisabled:!1},{value:"fluentCRM",label:(0,i.__)("FluentCRM","kadence-blocks"),help:(0,i.__)("Add User to FluentCRM list","kadence-blocks"),isDisabled:!1},{value:"getresponse",label:(0,i.__)("Get Response (Pro addon)","kadence-blocks"),help:(0,i.__)("Add User to Get Response list","kadence-blocks"),isDisabled:!0},{value:"mailchimp",label:(0,i.__)("MailChimp (Pro addon)","kadence-blocks"),help:(0,i.__)("Add user to MailChimp list","kadence-blocks"),isDisabled:!0},{value:"mailerlite",label:(0,i.__)("Mailerlite","kadence-blocks"),help:(0,i.__)("Add User to MailerLite list","kadence-blocks"),isDisabled:!1},{value:"redirect",label:(0,i.__)("Redirect","kadence-blocks"),help:"",isDisabled:!1},{value:"webhook",label:(0,i.__)("WebHook (Pro addon)","kadence-blocks"),help:(0,i.__)("Send form information to any third party webhook","kadence-blocks"),isDisabled:!0}],o=(0,S.applyFilters)("kadence.actionOptionsAdvancedForm",n),l=o.filter((e=>t.includes(e.value)));return(0,a.createElement)(xn,{className:"kb-adv-form-actions",isMulti:!0,value:l,onChange:t=>{const n=t.map((e=>e.value));e(n,"actions")},options:o})}const Tn=window.wp.url,Fn=window.wp.apiFetch;var On=n.n(Fn);function In({formInnerBlocks:e,parentClientId:t,settings:n,save:o}){const[l,r]=(0,m.useState)(""),[c,s]=(0,m.useState)(!1),[u,b]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[f,k]=(0,m.useState)(!1),[_,y]=(0,m.useState)(!1),[E,C]=(0,m.useState)(!1),[S,x]=(0,m.useState)(!1),[w,T]=(0,m.useState)(!1);(0,m.useEffect)((()=>{On()({path:"/wp/v2/settings",method:"GET"}).then((e=>{r(e.kadence_blocks_mailerlite_api),""!==e.kadence_blocks_mailerlite_api&&s(!0)}))}),[]);const F=(0,m.useMemo)((()=>v(e)),[t]),O=Array.isArray(h)&&h.length,I=Array.isArray(S)&&S.length;return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("MailerLite Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-mailerlite-settings"},(0,a.createElement)("p",null,(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.ExternalLink,{href:"https://app.mailerlite.com/integrations/api/"},(0,i.__)("Get API Key","kadence-blocks")),"| ",(0,a.createElement)(d.ExternalLink,{href:"https://help.mailerlite.com/article/show/35040-where-can-i-find-the-api-key"},(0,i.__)("Get help","kadence-blocks")))),(0,a.createElement)(d.TextControl,{label:(0,i.__)("API Key","kadence-blocks"),value:l,onChange:e=>r(e)}),(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)(d.Button,{isPrimary:!0,onClick:()=>(b(!0),void new wp.api.models.Settings({kadence_blocks_mailerlite_api:l}).save().then((e=>{b(!1),s(!0)}))),disabled:""===l},u?(0,i.__)("Saving","kadence-blocks"):(0,i.__)("Save","kadence-blocks")),c&&(0,a.createElement)(a.Fragment,null," ",(0,a.createElement)(d.Button,{isSecondary:!0,onClick:()=>(r(""),void(c&&(b(!0),new wp.api.models.Settings({kadence_blocks_mailerlite_api:""}).save().then((()=>{s(!1),b(!1)})))))},(0,i.__)("Remove","kadence-blocks")))),c&&(0,a.createElement)(a.Fragment,null,f&&(0,a.createElement)(d.Spinner,null),!f&&!O&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select a Group","kadence-blocks")),_?"":(()=>{if(!l)return g([]),void y(!0);k(!0),On()({path:(0,Tn.addQueryArgs)("/kb-mailerlite/v1/get",{apikey:l,endpoint:"groups",queryargs:["limit=500"]})}).then((e=>{const t=[];e.data.map((e=>{t.push({value:e.id,label:e.name})})),g(t),y(!0),k(!1)})).catch((e=>{console.log("err"),console.log(e),g([]),y(!0),k(!1)}))})(),Array.isArray(h)?(0,i.__)("No group found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!f&&O&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Group","kadence-blocks")),(0,a.createElement)("div",{className:"mailerlite-select-form-row"},(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.group?n.group:"",onChange:e=>{o({group:e||{}})},placeholder:(0,i.__)("Select a Group","kadence-blocks"),maxMenuHeight:300,options:h,isMulti:!1})),!n.group&&(0,a.createElement)("div",{style:{height:"100px"}}),n.group&&(0,a.createElement)(a.Fragment,null,E&&(0,a.createElement)(d.Spinner,null),!E&&!I&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),w?"":(()=>{if(!l){const e=[];return e.push({value:null,label:"None"}),e.push({value:"email",label:"Email *"}),x(e),void T(!0)}C(!0),On()({path:(0,Tn.addQueryArgs)("/kb-mailerlite/v1/get",{apikey:l,endpoint:"fields"})}).then((e=>{const t=[];t.push({value:null,label:"None"}),t.push({value:"email",label:"Email *"}),e.data.map(((e,n)=>{"email"!==e.key&&t.push({value:e.key,label:e.name})})),x(t),T(!0),C(!1)})).catch((e=>{const t=[];t.push({value:null,label:"None"}),t.push({value:"email",label:"Email *"}),x(t),T(!0),C(!1)}))})(),Array.isArray(S)?(0,i.__)("No Fields found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!E&&I&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),F&&F.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"kb-field-map-item"},(0,a.createElement)("div",{className:"kb-field-map-item-form"},(0,a.createElement)("p",{className:"kb-field-map-item-label"},(0,i.__)("Form Field","kadence-blocks")),(0,a.createElement)("p",{className:"kb-field-map-item-name"},e.label)),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Select Field:"),options:S,value:void 0!==n.map&&void 0!==n.map[e.uniqueID]&&n.map[e.uniqueID]?n.map[e.uniqueID]:"",onChange:t=>{((e,t)=>{const a={...n.map};a[t]=e,o({map:a})})(t,e.uniqueID)}})))))))))}function An({formInnerBlocks:e,parentClientId:t,settings:n,save:o}){const[l,r]=(0,m.useState)(!1),[c,s]=(0,m.useState)(!1),[u,b]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[f,k]=(0,m.useState)(!1),[_,y]=(0,m.useState)(!1),[E,C]=(0,m.useState)(!1),[S,x]=(0,m.useState)(!1),[w,T]=(0,m.useState)(!1),[F,O]=(0,m.useState)(!1),[I,A]=(0,m.useState)(!1);(0,m.useEffect)((()=>{void 0!==kadence_blocks_params.fluentCRM&&kadence_blocks_params.fluentCRM&&r(!0)}),[]);const N=(0,m.useMemo)((()=>v(e)),[t]),P=Array.isArray(u)&&u.length>0,B=Array.isArray(F)&&F.length>0,D=Array.isArray(h)&&h.length>0;return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("FluentCRM Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-fluent-crm-settings"},l?(0,a.createElement)(a.Fragment,null,_&&(0,a.createElement)(d.Spinner,null),!_&&!P&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select List","kadence-blocks")),S?"":(y(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-fluentcrm/v1/get",{endpoint:"lists"})}).then((e=>{const t=[];e.map((e=>{t.push({value:e.id,label:e.title})})),b(t),x(!0),y(!1)})).catch((()=>{b([]),x(!0),y(!1)}))),Array.isArray(u)?(0,i.__)("No lists found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!_&&P&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kb-heading-fln-list-title"},(0,i.__)("Select List","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n.lists?n.lists:"",onChange:e=>{o({lists:e||[]})},id:"fln-list-selection",options:u,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select List")}),!n.lists&&(0,a.createElement)("div",{style:{height:"100px"}}),void 0!==n&&void 0!==n&&n.lists&&n.lists[0]&&(0,a.createElement)(a.Fragment,null,E&&(0,a.createElement)(d.Spinner,null),!E&&!D&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Tags","kadence-blocks")),f?"":(C(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-fluentcrm/v1/get",{endpoint:"tags"})}).then((e=>{const t=[];e.map((e=>{t.push({value:e.id,label:e.title})})),g(t),k(!0),C(!1)})).catch((()=>{g([]),k(!0),C(!1)}))),Array.isArray(h)?(0,i.__)("No Tags found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!E&&D&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Tags","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.tags?n.tags:"",onChange:e=>{o({tags:e||[]})},id:"fln-tag-selection",isClearable:!0,options:h,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select Tags")})),w&&(0,a.createElement)(d.Spinner,null),!w&&!B&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),I?"":(T(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-fluentcrm/v1/get",{endpoint:"fields"})}).then((e=>{const t=[];t.push({value:null,label:"None"}),t.push({value:"email",label:"Email *"}),e.map(((e,n)=>{"email"!==e.key&&t.push({value:e.key,label:e.title})})),O(t),A(!0),T(!1)})).catch((()=>{const e=[];e.push({value:null,label:"None"}),e.push({value:"email",label:"Email *"}),O(e),A(!0),T(!1)}))),Array.isArray(F)?(0,i.__)("No Fields found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!w&&B&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),N&&N.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"kb-field-map-item"},(0,a.createElement)("div",{className:"kb-field-map-item-form"},(0,a.createElement)("p",{className:"kb-field-map-item-label"},(0,i.__)("Form Field","kadence-blocks")),(0,a.createElement)("p",{className:"kb-field-map-item-name"},e.label)),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Select Field:"),options:F,value:void 0!==n.map&&void 0!==n.map[e.uniqueID]&&n.map[e.uniqueID]?n.map[e.uniqueID]:"",onChange:t=>{((e,t)=>{const a={...n.map};a[t]=e,o({map:a})})(t,e.uniqueID)}}))))),(0,a.createElement)("div",{style:{height:"10px"}}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Require Double Opt In?","kadence-blocks"),checked:void 0!==n&&void 0!==n&&void 0!==n.doubleOptin&&n.doubleOptin,onChange:e=>o({doubleOptin:e})})))):(0,a.createElement)(a.Fragment,null,(0,i.__)("FluentCRM is not setup/active.","kadence-blocks")))}const Nn=function({formInnerBlocks:e,parentClientId:t,settings:n,save:o}){const[l,r]=(0,m.useState)(""),[c,s]=(0,m.useState)(!1),[u,b]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[f,k]=(0,m.useState)(!1),[_,y]=(0,m.useState)(!1),[E,C]=(0,m.useState)(!1),[S,x]=(0,m.useState)(!1),[w,T]=(0,m.useState)(!1),F=(0,m.useMemo)((()=>v(e)),[t]);(0,m.useEffect)((()=>{On()({path:"/wp/v2/settings",method:"GET"}).then((e=>{r(e.kadence_blocks_send_in_blue_api),""!==e.kadence_blocks_send_in_blue_api&&s(!0)}))}),[]);const O=Array.isArray(h)&&h.length>0,I=Array.isArray(S)&&S.length>0;return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Brevo (SendInBlue) Settings","kadence-blocks"),initialOpen:!1},(0,a.createElement)("p",null,(0,a.createElement)(m.Fragment,null,(0,a.createElement)(d.ExternalLink,{href:"https://app.brevo.com/settings/keys/smtp"},(0,i.__)("Get API Key","kadence-blocks")),"| ",(0,a.createElement)(d.ExternalLink,{href:"https://help.brevo.com/hc/en-us/articles/209467485-What-s-an-API-key-and-how-can-I-get-mine-"},(0,i.__)("Get help","kadence-blocks")))),(0,a.createElement)(d.TextControl,{label:(0,i.__)("API Key (v3)","kadence-blocks"),value:l,onChange:e=>r(e)}),(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)(d.Button,{isPrimary:!0,onClick:()=>(b(!0),void new wp.api.models.Settings({kadence_blocks_send_in_blue_api:l}).save().then((e=>{b(!1),s(!0)}))),disabled:""===l},u?(0,i.__)("Saving","kadence-blocks"):(0,i.__)("Save","kadence-blocks")),""!==l&&(0,a.createElement)(m.Fragment,null," ",(0,a.createElement)(d.Button,{isSecondary:!0,onClick:()=>(r(""),void(c&&(b(!0),new wp.api.models.Settings({kadence_blocks_send_in_blue_api:""}).save().then((()=>{s(!1),b(!1)})))))},(0,i.__)("Remove","kadence-blocks")))),c&&(0,a.createElement)(m.Fragment,null,f&&(0,a.createElement)(d.Spinner,null),!f&&!O&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Lists","kadence-blocks")),_?"":(()=>{if(!l)return g([]),void y(!0);k(!0),On()({path:(0,Tn.addQueryArgs)("/kb-sendinblue/v1/get",{apikey:l,endpoint:"contacts/lists",queryargs:["limit=50","offset=0"]})}).then((e=>{const t=[];e.lists.map((e=>{t.push({value:e.id,label:e.name})})),g(t),y(!0),k(!1)})).catch((()=>{g([]),y(!0),k(!1)}))})(),Array.isArray(h)?(0,i.__)("No list found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!f&&O&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Lists","kadence-blocks")),(0,a.createElement)(xn,{value:n&&void 0!==n.lists?n.lists:"",onChange:e=>{o({lists:e||[]})},id:"snb-list-selection",options:h,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select Lists")}),!n.lists&&(0,a.createElement)("div",{style:{height:"100px"}}),n.lists&&(0,a.createElement)(m.Fragment,null,E&&(0,a.createElement)(d.Spinner,null),!E&&!I&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),w?"":(()=>{if(!l){const e=[];return e.push({value:null,label:"None"}),e.push({value:"email",label:"Email *"}),x(e),void y(!0)}C(!0),On()({path:(0,Tn.addQueryArgs)("/kb-sendinblue/v1/get",{apikey:l,endpoint:"contacts/attributes"})}).then((e=>{const t=[];t.push({value:null,label:"None"}),t.push({value:"email",label:"Email *"}),e.attributes.map(((e,n)=>{"normal"===e.category&&t.push({value:e.name,label:e.name})})),x(t),y(!0),C(!1)})).catch((()=>{const e=[];e.push({value:null,label:"None"}),e.push({value:"email",label:"Email *"}),x(e),T(!0),C(!1)}))})(),Array.isArray(S)?(0,i.__)("No Fields found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!E&&I&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),F&&F.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"kb-field-map-item"},(0,a.createElement)("div",{className:"kb-field-map-item-form"},(0,a.createElement)("p",{className:"kb-field-map-item-label"},(0,i.__)("Form Field","kadence-blocks")),(0,a.createElement)("p",{className:"kb-field-map-item-name"},e.label)),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Select Field:"),options:S,value:void 0!==n.map&&void 0!==n.map[e.uniqueID]&&n.map[e.uniqueID]?n.map[e.uniqueID]:"",onChange:t=>{((e,t)=>{const a={...n.map};a[t]=e,o({map:a})})(t,e.uniqueID)}})))))))))},Pn=function({formInnerBlocks:e,parentClientId:t,settings:n,save:o}){const[l,r]=(0,m.useState)(""),[c,s]=(0,m.useState)(!1),[u,b]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[f,k]=(0,m.useState)(!1),[_,y]=(0,m.useState)(!1),[E,C]=(0,m.useState)(!1),[S,x]=(0,m.useState)(!1),[w,T]=(0,m.useState)(!1),[F,O]=(0,m.useState)(!1),[I,A]=(0,m.useState)(!1),[N,P]=(0,m.useState)(!1),[B,D]=(0,m.useState)(!1),[M,R]=(0,m.useState)(!1),[V,L]=(0,m.useState)(!1);(0,m.useEffect)((()=>{On()({path:"/wp/v2/settings",method:"GET"}).then((e=>{r(e.kadence_blocks_mail_chimp_api),""!==e.kadence_blocks_mail_chimp_api&&s(!0)}))}),[]);const W=(0,m.useMemo)((()=>v(e)),[t]),z=Array.isArray(h)&&h.length>0,q=Array.isArray(S)&&S.length>0,U=Array.isArray(I)&&I.length>0,H=Array.isArray(M)&&M.length>0;return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("MailChimp Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-mailchimp-settings"},(0,a.createElement)("p",null,(0,a.createElement)(m.Fragment,null,(0,a.createElement)(d.ExternalLink,{href:"https://mailchimp.com/help/about-api-keys/"},(0,i.__)("Get help","kadence-blocks")))),(0,a.createElement)(d.TextControl,{label:(0,i.__)("API Key","kadence-blocks"),value:l,onChange:e=>r(e)}),(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)(d.Button,{isPrimary:!0,onClick:()=>(b(!0),void new wp.api.models.Settings({kadence_blocks_mail_chimp_api:l}).save().then((e=>{b(!1),s(!0)}))),disabled:""===l},u?(0,i.__)("Saving","kadence-blocks"):(0,i.__)("Save","kadence-blocks")),""!==l&&(0,a.createElement)(m.Fragment,null," ",(0,a.createElement)(d.Button,{isSecondary:!0,onClick:()=>(r(""),void(c&&(b(!0),new wp.api.models.Settings({kadence_blocks_mail_chimp_api:""}).save().then((()=>{s(!1),b(!1)})))))},(0,i.__)("Remove","kadence-blocks")))),c&&(0,a.createElement)(m.Fragment,null,f&&(0,a.createElement)(d.Spinner,null),!f&&!z&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Audience","kadence-blocks")),_?"":l&&l.split("-")[1]?(k(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-mailchimp/v1/get",{apikey:l,endpoint:"lists/",queryargs:["count=300","offset=0"]})}).then((e=>{const t=[];e.lists.map((e=>{t.push({value:e.id,label:e.name})})),g(t),y(!0),k(!1)})).catch((e=>{g([]),y(!0),k(!1)}))):(g([]),void y(!0)),Array.isArray(h)?(0,i.__)("No Audience found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!f&&z&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Audience","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.list?n.list:"",onChange:e=>{o({list:e||{}})},id:"mc-list-selection",isClearable:!0,options:h,isMulti:!1,maxMenuHeight:200,placeholder:(0,i.__)("Select Audience")}),(void 0===n||void 0===n||!n.list||!n.list.value)&&(0,a.createElement)("div",{style:{height:"100px"}}),void 0!==n&&void 0!==n&&n.list&&n.list.value&&(0,a.createElement)(m.Fragment,null,F&&(0,a.createElement)(d.Spinner,null),!F&&!U&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Groups","kadence-blocks")),N?"":(()=>{if(!l||!n.list.value)return A([]),void P(!0);O(!0),On()({path:(0,Tn.addQueryArgs)("/kb-mailchimp/v1/get",{apikey:l,endpoint:"lists/"+n.list.value+"/interest-categories/",queryargs:["count=300","offset=0"]})}).then((e=>{const t=[];e.map((e=>{t.push({value:e.id,label:e.title})})),A(t),P(!0),O(!1)})).catch((()=>{A([]),P(!0),O(!1)}))})(),Array.isArray(I)?(0,i.__)("No Groups found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!F&&U&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Groups","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.groups?n.groups:"",onChange:e=>{o({groups:e||[]})},id:"mc-group-selection",isClearable:!0,options:I,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select Groups")})),B&&(0,a.createElement)(d.Spinner,null),!B&&!H&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Tags","kadence-blocks")),V?"":(()=>{if(!l||!n.list.value)return R([]),void L(!0);D(!0),On()({path:(0,Tn.addQueryArgs)("/kb-mailchimp/v1/get",{apikey:l,endpoint:"lists/"+n.list.value+"/tag-search/",queryargs:["count=500","offset=0"]})}).then((e=>{const t=[];e.tags&&e.tags.map((e=>{t.push({value:e.id,label:e.name})})),R(t),L(!0),D(!1)})).catch((()=>{R([]),L(!0),D(!1)}))})(),Array.isArray(M)?(0,i.__)("No Tags found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!B&&H&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Tags","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.tags?n.tags:"",onChange:e=>{o({tags:e||[]})},id:"mc-tag-selection",isClearable:!0,options:M,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select Tags")})),E&&(0,a.createElement)(d.Spinner,null),!E&&!q&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),w?"":(()=>{if(!l||!n.list.value){const e=[];return e.push({value:null,label:"None"}),e.push({value:"email",label:"Email *"}),x(e),void T(!0)}C(!0),On()({path:(0,Tn.addQueryArgs)("/kb-mailchimp/v1/get",{apikey:l,endpoint:"lists/"+n.list.value+"/merge-fields/",queryargs:["count=300","offset=0"]})}).then((e=>{const t=[];t.push({value:null,label:"None"}),t.push({value:"email",label:"Email *"}),e.merge_fields.map(((e,n)=>{t.push({value:e.tag,label:e.name})})),x(t),T(!0),C(!1)})).catch((()=>{const e=[];e.push({value:null,label:"None"}),e.push({value:"email",label:"Email *"}),x(e),T(!0),C(!1)}))})(),Array.isArray(S)?(0,i.__)("No Fields found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!E&&q&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),W&&W.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"kb-field-map-item"},(0,a.createElement)("div",{className:"kb-field-map-item-form"},(0,a.createElement)("p",{className:"kb-field-map-item-label"},(0,i.__)("Form Field","kadence-blocks")),(0,a.createElement)("p",{className:"kb-field-map-item-name"},e.label)),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Select Field:"),options:S,value:void 0!==n.map&&void 0!==n.map[e.uniqueID]&&n.map[e.uniqueID]?n.map[e.uniqueID]:"",onChange:t=>{((e,t)=>{const a={...n.map};a[t]=e,o({map:a})})(t,e.uniqueID)}}))))),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Require Double Opt In?","kadence-blocks"),checked:void 0!==n&&void 0!==n&&void 0!==n.doubleOptin&&n.doubleOptin,onChange:e=>o({doubleOptin:e})})))))},Bn=function({formInnerBlocks:e,parentClientId:t,settings:n,save:o}){const[l,r]=(0,m.useState)(""),[c,s]=(0,m.useState)(!1),[u,b]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[f,k]=(0,m.useState)(!1),[_,y]=(0,m.useState)(!1),[E,C]=(0,m.useState)(!1),[S,x]=(0,m.useState)(!1),[w,T]=(0,m.useState)(!1),[F,O]=(0,m.useState)(!1),[I,A]=(0,m.useState)(!1),[N,P]=(0,m.useState)(!1),[B,D]=(0,m.useState)(!1),[M,R]=(0,m.useState)(!1),[V,L]=(0,m.useState)(!1);(0,m.useEffect)((()=>{On()({path:"/wp/v2/settings",method:"GET"}).then((e=>{r(e.kadence_blocks_convertkit_api),""!==e.kadence_blocks_convertkit_api&&s(!0)}))}),[]);const W=(0,m.useMemo)((()=>v(e)),[t]),z=Array.isArray(h)&&h.length>0,q=Array.isArray(S)&&S.length>0,U=Array.isArray(I)&&I.length>0,H=Array.isArray(M)&&M.length>0;return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("ConvertKit Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-convertkit"},(0,a.createElement)("p",null,(0,a.createElement)(d.ExternalLink,{href:"https://app.convertkit.com/account_settings/advanced_settings"},(0,i.__)("Get help","kadence-blocks"))),(0,a.createElement)(d.TextControl,{label:(0,i.__)("API Key","kadence-blocks"),value:l,onChange:e=>r(e)}),(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)(d.Button,{isPrimary:!0,onClick:()=>(b(!0),void new wp.api.models.Settings({kadence_blocks_convertkit_api:l}).save().then((e=>{b(!1),s(!0)}))),disabled:""===l},u?(0,i.__)("Saving","kadence-blocks"):(0,i.__)("Save","kadence-blocks")),""!==l&&(0,a.createElement)(m.Fragment,null," ",(0,a.createElement)(d.Button,{isSecondary:!0,onClick:()=>(r(""),void(c&&(b(!0),new wp.api.models.Settings({kadence_blocks_convertkit_api:""}).save().then((()=>{s(!1),b(!1)})))))},(0,i.__)("Remove","kadence-blocks")))),c&&(0,a.createElement)(m.Fragment,null,f&&(0,a.createElement)(d.Spinner,null),!f&&!z&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Form","kadence-blocks")),_?"":(()=>{if(!l)return g([]),void y(!0);k(!0),On()({path:(0,Tn.addQueryArgs)("/kb-convertkit/v1/get",{endpoint:"forms"})}).then((e=>{const t=[];e.forms.map((e=>{t.push({value:e.id,label:e.name})})),g(t),y(!0),k(!1)})).catch((e=>{g([]),y(!0),k(!1)}))})(),Array.isArray(h)?(0,i.__)("No forms found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!f&&z&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Form","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.form?n.form:"",onChange:e=>{o({form:e||[]})},id:"mc-list-selection",isClearable:!0,options:h,isMulti:!1,maxMenuHeight:200,placeholder:(0,i.__)("Select Form")}),(0,a.createElement)(m.Fragment,null,F&&(0,a.createElement)(d.Spinner,null),!F&&!U&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Sequence","kadence-blocks")),N?"":(O(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-convertkit/v1/get",{endpoint:"sequences"})}).then((e=>{const t=[];e.courses.map((e=>{t.push({value:e.id,label:e.name})})),A(t),P(!0),O(!1)})).catch((()=>{A([]),P(!0),O(!1)}))),Array.isArray(I)?(0,i.__)("No Sequences found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!F&&U&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Sequence","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.sequence?n.sequence:"",onChange:e=>{o({sequence:e||[]})},id:"mc-sequence-selection",isClearable:!0,options:I,maxMenuHeight:200,placeholder:(0,i.__)("Select Sequence")})),B&&(0,a.createElement)(d.Spinner,null),!B&&!H&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Tags","kadence-blocks")),V?"":(D(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-convertkit/v1/get",{endpoint:"tags"})}).then((e=>{const t=[];e.tags&&e.tags.map((e=>{t.push({value:e.id,label:e.name})})),R(t),L(!0),D(!1)})).catch((()=>{R([]),L(!0),D(!1)}))),Array.isArray(M)?(0,i.__)("No Tags found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!B&&H&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Tags","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.tags?n.tags:"",onChange:e=>{o({tags:e||[]})},id:"mc-tag-selection",isClearable:!0,options:M,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select Tags")})),E&&(0,a.createElement)(d.Spinner,null),!E&&!q&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),w?"":(C(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-convertkit/v1/get",{endpoint:"custom_fields"})}).then((e=>{const t=[];t.push({value:null,label:"None"}),t.push({value:"email",label:"Email *"}),t.push({value:"first_name",label:"First Name"}),e.custom_fields&&e.custom_fields.map((e=>{t.push({value:e.key,label:e.label})})),x(t),T(!0),C(!1)})).catch((e=>{x([]),T(!0),C(!1)}))),Array.isArray(S)?(0,i.__)("No Fields found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!E&&q&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),W&&W.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"kb-field-map-item"},(0,a.createElement)("div",{className:"kb-field-map-item-form"},(0,a.createElement)("p",{className:"kb-field-map-item-label"},(0,i.__)("Form Field","kadence-blocks")),(0,a.createElement)("p",{className:"kb-field-map-item-name"},e.label)),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Select Field:"),options:S,value:void 0!==n.map&&void 0!==n.map[e.uniqueID]&&n.map[e.uniqueID]?n.map[e.uniqueID]:"",onChange:t=>{((e,t)=>{const a={...n.map};a[t]=e,o({map:a})})(t,e.uniqueID)}})))))))))},Dn=window.wp.primitives,Mn=(0,m.createElement)(Dn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,m.createElement)(Dn.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),{Component:Rn}=wp.element,{Button:Vn,TextControl:Ln,Popover:Wn}=wp.components,zn=class extends Rn{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.state={open:!1},this.popRef=(0,m.createRef)()}toggle(){this.setState({open:!this.state.open})}render(){const{open:e}=this.state;return(0,a.createElement)(a.Fragment,null,e&&(0,a.createElement)(Wn,{className:"kb-dynamic-popover",position:"bottom center",onClick:()=>{},expandOnMobile:!0,onClose:this.toggle,ref:this.popRef},(0,a.createElement)("div",{className:"kb-dynamic-popover-inner-wrap"},(0,a.createElement)("div",{className:"kb-tag-search-inner-wrap"},(0,a.createElement)(Ln,{label:(0,i.__)("Search for Tag","kadence-blocks"),value:this.props.value,onChange:e=>{this.props.onChange(e)}}),(0,a.createElement)(Vn,{className:"kb-tag-action-search",isPrimary:!0,icon:Mn,onClick:()=>{this.props.onAction(),this.toggle},label:(0,i.__)("Search","kadence-blocks"),showTooltip:!0})))),(0,a.createElement)(Vn,{className:"kb-tag-search",icon:Mn,onClick:this.toggle,isPressed:!!this.props.value,"aria-haspopup":"true","aria-expanded":e,label:(0,i.__)("Search","kadence-blocks"),showTooltip:!0}))}},qn=function({formInnerBlocks:e,parentClientId:t,settings:n,save:o}){const[l,r]=(0,m.useState)(""),[c,s]=(0,m.useState)(!1),[u,b]=(0,m.useState)(!0),[h,g]=(0,m.useState)(""),[f,k]=(0,m.useState)(!1),[_,y]=(0,m.useState)(!1),[E,C]=(0,m.useState)(!1),[S,x]=(0,m.useState)(!1),[w,T]=(0,m.useState)(!1),[F,O]=(0,m.useState)(!1),[I,A]=(0,m.useState)(!1),[N,P]=(0,m.useState)(!1),[B,D]=(0,m.useState)(!1),[M,R]=(0,m.useState)(!1),[V,L]=(0,m.useState)(!1),[W,z]=(0,m.useState)(!1),[q,U]=(0,m.useState)(!1),[H,$]=(0,m.useState)(!1),[K,j]=(0,m.useState)(""),[G,Q]=(0,m.useState)(!1);(0,m.useEffect)((()=>{On()({path:"/wp/v2/settings",method:"GET"}).then((e=>{r(e.kadence_blocks_activecampaign_api_key),g(e.kadence_blocks_activecampaign_api_base),b(!1),""!==e.kadence_blocks_activecampaign_api_key&&""!==e.kadence_blocks_activecampaign_api_base&&(s(!0),k(!0))}))}),[]);const J=(0,m.useMemo)((()=>v(e)),[t]),Y=()=>{U(!0),On()({path:(0,Tn.addQueryArgs)("/kb-activecampaign/v1/get",{endpoint:"tags",queryargs:["search="+K]})}).then((e=>{const t=[];e&&e.map((e=>{t.push({value:e.id,label:e.tag})})),$(t),Q(!0),U(!1)})).catch((()=>{$([]),Q(!0),U(!1)}))},X=Array.isArray(S)&&S.length>0,Z=Array.isArray(N)&&N.length>0,ee=Array.isArray(V)&&V.length>0,te=Array.isArray(H)&&H.length>0,ne=void 0!==n.listMulti&&n.listMulti?n.listMulti:void 0!==n.list&&n.list?[n.list]:"";return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("ActiveCampaign Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-activecampaign-settings"},(0,a.createElement)("p",null,(0,a.createElement)(d.ExternalLink,{href:"https://help.activecampaign.com/hc/en-us/articles/207317590-Getting-started-with-the-API/"},(0,i.__)("Get help","kadence-blocks"))),u&&(0,a.createElement)(d.Spinner,null),!u&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ObfuscateTextControl,{label:(0,i.__)("API Key","kadence-blocks"),value:l,onChange:e=>(e=>{y(!0),On()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_activecampaign_api_key:e}}).then((()=>{r(e),y(!1),s(!0)}))})(e),isSaving:_}),(0,a.createElement)(p.ObfuscateTextControl,{label:(0,i.__)("API URL","kadence-blocks"),value:h,obfuscate:!1,placeholder:"https://youaccount.api-us1.com",onChange:e=>(e=>{C(!0),On()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_activecampaign_api_base:e}}).then((()=>{g(e),C(!1),k(!0)}))})(e),isSaving:E})),c&&f&&(0,a.createElement)(a.Fragment,null,w&&(0,a.createElement)(d.Spinner,null),!w&&!X&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select List","kadence-blocks")),F?"":(()=>{if(!l)return x([]),void O(!0);T(!0),On()({path:(0,Tn.addQueryArgs)("/kb-activecampaign/v1/get",{endpoint:"lists",queryargs:["limit=200"]})}).then((e=>{const t=[];e.map((e=>{t.push({value:e.id,label:e.name})})),x(t),O(!0),T(!1)})).catch((e=>{x([]),O(!0),T(!1)}))})(),Array.isArray(S)?(0,i.__)("No Lists found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!w&&X&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)("span",{className:"kt-heading-size-title"},(0,i.__)("Select List","kadence-blocks")),(0,a.createElement)(xn,{value:ne,onChange:e=>{o({listMulti:e||[],list:{}})},id:"mc-list-selection",isClearable:!0,options:S,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select List","kadence-blocks")})),(0,a.createElement)(a.Fragment,null,M&&(0,a.createElement)(d.Spinner,null),!M&&!ee&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Automation (Optional)","kadence-blocks")),W?"":(R(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-activecampaign/v1/get",{endpoint:"automations"})}).then((e=>{const t=[];e.map((e=>{t.push({value:e.id,label:e.name})})),L(t),z(!0),R(!1)})).catch((e=>{L([]),z(!0),R(!1)}))),Array.isArray(V)?(0,i.__)("No Groups found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!M&&ee&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)("span",{className:"kt-heading-size-title"},(0,i.__)("Select Automation (Optional)","kadence-blocks")),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n&&void 0!==n.automation?n.automation:"",onChange:e=>{o({automation:e||[]})},id:"mc-automation-selection",isClearable:!0,options:V,maxMenuHeight:200,placeholder:(0,i.__)("Select Automation")}))),q&&(0,a.createElement)(d.Spinner,null),!q&&!te&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Tags (Optional)","kadence-blocks")),G?"":Y(),Array.isArray(H)?(0,i.__)("No Tags found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!q&&te&&(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)("div",{className:"kadence-select-tags-title-wrap"},(0,a.createElement)("span",{className:"kt-heading-size-title"},(0,i.__)("Select Tags (Optional)","kadence-blocks")),(0,a.createElement)(zn,{value:K,onChange:e=>{j(e)},onAction:()=>{Y()}})),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n.tags?n.tags:"",onChange:e=>{o({tags:e||[]})},id:"mc-tag-selection",isClearable:!0,options:H,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select Tags")})),I&&(0,a.createElement)(d.Spinner,null),!I&&!Z&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),B?"":(A(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-activecampaign/v1/get",{endpoint:"fields",queryargs:["count=300","offset=0"]})}).then((e=>{const t=[];t.push({value:null,label:"None"}),t.push({value:"email",label:(0,i.__)("Email","kadence-blocks")+" *"}),t.push({value:"firstName",label:(0,i.__)("First Name","kadence-blocks")}),t.push({value:"lastName",label:(0,i.__)("Last Name","kadence-blocks")}),t.push({value:"phone",label:(0,i.__)("Phone","kadence-blocks")}),t.push({value:"acct_name",label:(0,i.__)("Account","kadence-blocks")}),t.push({value:"contact_jobtitle",label:(0,i.__)("Job Title","kadence-blocks")}),e.map(((e,n)=>{t.push({value:e.id,label:e.title})})),P(t),D(!0),A(!1)})).catch((()=>{const e=[];e.push({value:null,label:"None"}),e.push({value:"email",label:(0,i.__)("Email","kadence-blocks")+" *"}),e.push({value:"firstName",label:(0,i.__)("First Name","kadence-blocks")}),e.push({value:"lastName",label:(0,i.__)("Last Name","kadence-blocks")}),e.push({value:"phone",label:(0,i.__)("Phone","kadence-blocks")}),e.push({value:"acct_name",label:(0,i.__)("Account","kadence-blocks")}),e.push({value:"contact_jobtitle",label:(0,i.__)("Job Title","kadence-blocks")}),P(e),D(!0),A(!1)}))),Array.isArray(N)?(0,i.__)("No Fields found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!I&&Z&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)("span",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),J&&J.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"kb-field-map-item"},(0,a.createElement)("div",{className:"kb-field-map-item-form"},(0,a.createElement)("p",{className:"kb-field-map-item-label"},(0,i.__)("Form Field","kadence-blocks")),(0,a.createElement)("p",{className:"kb-field-map-item-name"},e.label)),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Select Field:"),options:N,value:void 0!==n.map&&void 0!==n.map[e.uniqueID]&&n.map[e.uniqueID]?n.map[e.uniqueID]:"",onChange:t=>{((e,t)=>{const a={...n.map};a[t]=e,o({map:a})})(t,e.uniqueID)}}))))))),(0,a.createElement)("div",{style:{height:"10px"}}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Require Double Opt In?","kadence-blocks"),help:(0,i.__)("This will set the status of the contact to unconfirmed, you must setup an automation in ActiveCampaign to email the contact and update the status after confirmation.","kadence-blocks"),checked:void 0!==n.doubleOptin&&n.doubleOptin,onChange:e=>{o({doubleOptin:e})}}))))},Un=function({formInnerBlocks:e,parentClientId:t,settings:n,save:o}){const[l,r]=(0,m.useState)(""),[c,s]=(0,m.useState)(!1),[u,b]=(0,m.useState)(!0),[h,g]=(0,m.useState)(""),[f,k]=(0,m.useState)(!1),[_,y]=(0,m.useState)(!1),[E,C]=(0,m.useState)(!1),[S,x]=(0,m.useState)(!1),[w,T]=(0,m.useState)(!1),[F,O]=(0,m.useState)(!1),[I,A]=(0,m.useState)(!1),[N,P]=(0,m.useState)(!1),[B,D]=(0,m.useState)(!1),[M,R]=(0,m.useState)(!1),[V,L]=(0,m.useState)(!1),[W,z]=(0,m.useState)(""),[q,U]=(0,m.useState)(!1);(0,m.useEffect)((()=>{On()({path:"/wp/v2/settings",method:"GET"}).then((e=>{r(e.kadence_blocks_getresponse_api_key),g(e.kadence_blocks_getresponse_api_endpoint),b(!1),""!==e.kadence_blocks_getresponse_api_key&&""!==e.kadence_blocks_getresponse_api_endpoint&&(s(!0),k(!0))}))}),[]);const H=(0,m.useMemo)((()=>v(e)),[t]),$=Array.isArray(S)&&S.length>0,K=Array.isArray(N)&&N.length>0,j=Array.isArray(V)&&V.length>0,G=void 0!==n.listMulti&&n.listMulti?n.listMulti:"";return(0,m.useEffect)((()=>{h&&l&&((()=>{if(!l)return x([]),O(!0),void T(!1);T(!0),On()({path:(0,Tn.addQueryArgs)("/kb-getresponse/v1/get",{endpoint:"campaigns",queryargs:["perPage=200"]})}).then((e=>{const t=[];e.map((e=>{t.push({value:e.campaignId,label:e.name})})),x(t||[]),O(!0),T(!1)})).catch((e=>{x([]),O(!0),T(!1)}))})(),U(!1))}),[l,h]),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("GetResponse Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-getresponse-settings"},(0,a.createElement)("p",null,(0,a.createElement)(d.ExternalLink,{href:"https://apidocs.getresponse.com/v3/case-study/getting-started"},(0,i.__)("Get help","kadence-blocks"))),u&&(0,a.createElement)(d.Spinner,null),!u&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ObfuscateTextControl,{label:(0,i.__)("API Key","kadence-blocks"),value:l,onChange:e=>(e=>{y(!0),On()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_getresponse_api_key:e}}).then((()=>{r(e),y(!1),s(""!==e)}))})(e),isSaving:_}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Select API Endpoint","kadence-blocks"),value:h,options:[{value:"https://api.getresponse.com/v3",label:"https://api.getresponse.com/v3"},{value:"https://api3.getresponse360.com/v3",label:"https://api3.getresponse360.com/v3"},{value:"https://api3.getresponse360.pl/v3",label:"https://api3.getresponse360.pl/v3"}],onChange:e=>{e!==h&&(k(!1),x(!1),L(!1)),(e=>{C(!0),On()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_getresponse_api_endpoint:e}}).then((()=>{g(e),C(!1),k(!0)}))})(e)}})),c&&f&&(0,a.createElement)(a.Fragment,null,w&&(0,a.createElement)(d.Spinner,null),!w&&!$&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select List","kadence-blocks")),Array.isArray(S)?(0,i.__)("No Lists found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!w&&$&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)("span",{className:"kt-heading-size-title"},(0,i.__)("Select List","kadence-blocks")),(0,a.createElement)(xn,{value:G,onChange:e=>{o({listMulti:e?[e]:[]})},id:"mc-list-selection",isClearable:!0,options:S,isMulti:!1,maxMenuHeight:200,placeholder:(0,i.__)("Select List","kadence-blocks")})),(0,a.createElement)(a.Fragment,null,M&&(0,a.createElement)(d.Spinner,null),!M&&!j&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Select Tags (Optional)","kadence-blocks")),q?"":(R(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-getresponse/v1/get",{endpoint:"tags"})}).then((e=>{const t=[];e&&e.map((e=>{t.push({value:e.tagId,label:e.name})})),L(t),U(!0),R(!1)})).catch((()=>{L([]),U(!0),R(!1)}))),Array.isArray(V)?(0,i.__)("No Tags found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!M&&j&&(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)("div",{className:"kadence-select-tags-title-wrap"},(0,a.createElement)("span",{className:"kt-heading-size-title"},(0,i.__)("Select Tags (Optional)","kadence-blocks"))),(0,a.createElement)(xn,{value:void 0!==n&&void 0!==n.tags?n.tags:"",onChange:e=>{o({tags:e||[]})},id:"mc-tag-selection",isClearable:!0,options:V,isMulti:!0,maxMenuHeight:200,placeholder:(0,i.__)("Select Tags")})),I&&(0,a.createElement)(d.Spinner,null),!I&&!K&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),B?"":(A(!0),void On()({path:(0,Tn.addQueryArgs)("/kb-getresponse/v1/get",{endpoint:"custom-fields",queryargs:["perPage=300"]})}).then((e=>{const t=[];t.push({value:null,label:"None"}),t.push({value:"email",label:(0,i.__)("Email","kadence-blocks")+" *"}),t.push({value:"name",label:(0,i.__)("Name","kadence-blocks")}),e.map(((e,n)=>{t.push({value:e.customFieldId,label:e.name})})),P(t),D(!0),A(!1)})).catch((()=>{const e=[];e.push({value:null,label:"None"}),e.push({value:"email",label:(0,i.__)("Email","kadence-blocks")+" *"}),e.push({value:"name",label:(0,i.__)("Name","kadence-blocks")}),P(e),D(!0),A(!1)}))),Array.isArray(N)?(0,i.__)("No Fields found.","kadence-blocks"):(0,a.createElement)(d.Spinner,null)),!I&&K&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)("span",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),H&&H.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"kb-field-map-item"},(0,a.createElement)("div",{className:"kb-field-map-item-form"},(0,a.createElement)("p",{className:"kb-field-map-item-label"},(0,i.__)("Form Field","kadence-blocks")),(0,a.createElement)("p",{className:"kb-field-map-item-name"},e.label)),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Select Field:"),options:N,value:void 0!==n.map&&void 0!==n.map[e.uniqueID]&&n.map[e.uniqueID]?n.map[e.uniqueID]:"",onChange:t=>{((e,t)=>{const a={...n.map};a[t]=e,o({map:a})})(t,e.uniqueID)}}))))))),(0,a.createElement)("div",{style:{height:"10px"}}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Require Double Opt In?","kadence-blocks"),help:(0,i.__)("This will set the status of the contact to unconfirmed, you must setup an automation in GetResponse to email the contact and update the status after confirmation.","kadence-blocks"),checked:void 0!==n.doubleOptin&&n.doubleOptin,onChange:e=>{o({doubleOptin:e})}}))))},Hn=function({formInnerBlocks:e,parentClientId:t,settings:n,save:o}){const l=(0,m.useMemo)((()=>v(e)),[t]),r=/[\s#]/g;return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Webhook Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-webhook-settings"},(0,a.createElement)(d.TextControl,{label:(0,i.__)("Webhook URL","kadence-blocks"),help:(0,i.__)("Enter the URL that will receive the form submitted data.","kadence-blocks"),value:void 0!==n.url?n.url:"",onChange:e=>o({url:e})}),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h2",{className:"kt-heading-size-title"},(0,i.__)("Map Fields","kadence-blocks")),l&&l.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"kb-field-map-item"},(0,a.createElement)("div",{className:"kb-field-map-item-form"},(0,a.createElement)("p",{className:"kb-field-map-item-label"},(0,i.__)("Form Field","kadence-blocks")),(0,a.createElement)("p",{className:"kb-field-map-item-name"},e.label)),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Webhook Field Name","kadence-blocks"),value:void 0!==n.map&&void 0!==n.map[e.uniqueID]&&n.map[e.uniqueID]?n.map[e.uniqueID]:"",onChange:t=>{((e,t)=>{const a={...n.map};a[t]=e,o({map:a})})(t=t.replace(r,"-"),e.uniqueID)}}))))))},$n=function({settings:e,save:t}){return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Auto Respond Email Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-auto-email-settings"},(0,a.createElement)(d.TextControl,{label:(0,i.__)("Email Subject","kadence-blocks"),placeholder:(0,i.__)("Thanks for contacting us!","kadence-blocks"),value:void 0!==e&&void 0!==e.subject?e.subject:"",onChange:e=>t({subject:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Email Message","kadence-blocks"),placeholder:(0,i.__)("Thanks for getting in touch, we will respond within the next 24 hours.","kadence-blocks"),value:void 0!==e&&void 0!==e.message?e.message:"",onChange:e=>t({message:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("From Email","kadence-blocks"),value:void 0!==e&&void 0!==e.fromEmail?e.fromEmail:"",onChange:e=>t({fromEmail:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("From Name","kadence-blocks"),value:void 0!==e&&void 0!==e.fromName?e.fromName:"",onChange:e=>t({fromName:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Reply To","kadence-blocks"),value:void 0!==e&&void 0!==e&&void 0!==e.replyTo?e.replyTo:"",onChange:e=>t({replyTo:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Cc","kadence-blocks"),value:void 0!==e&&void 0!==e&&void 0!==e.cc?e.cc:"",onChange:e=>t({cc:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Bcc","kadence-blocks"),value:void 0!==e&&void 0!==e.bcc?e.bcc:"",onChange:e=>t({bcc:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Send as HTML email?","kadence-blocks"),help:(0,i.__)("If off, plain text is used.","kadence-blocks"),checked:void 0===e||void 0===e.html||e.html,onChange:e=>t({html:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Override Email to Address","kadence-blocks"),help:(0,i.__)("By default email is sent to the email field, you can use this to override.","kadence-blocks"),value:void 0!==e&&void 0!==e.emailTo?e.emailTo:"",onChange:e=>t({emailTo:e})}))},Kn=function({settings:e,save:t}){return(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Database Entry Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-db-entry-settings"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Save User IP Address","kadence-blocks"),help:(0,i.__)("Saves the entrants IP address with the form data","kadence-blocks"),checked:void 0===e?.userIP||e.userIP,onChange:e=>t({userIP:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Save User Device","kadence-blocks"),help:(0,i.__)("Saves the entrants device with form data","kadence-blocks"),checked:void 0===e?.userDevice||e.userDevice,onChange:e=>t({userDevice:e})}))};function jn({uniqueID:e,previewDevice:t,fieldStyle:n,labelStyle:o,helpStyle:l,inputFont:i,radioLabelFont:r,useFormMeta:c}){const s=((e,t,n,a)=>{const[o]=a("_kad_form_fieldBorderRadius"),[l]=a("_kad_form_tabletFieldBorderRadius"),[i]=a("_kad_form_mobileFieldBorderRadius"),[r]=a("_kad_form_fieldBorderRadiusUnit"),[c]=a("_kad_form_fieldBorderStyle"),[s]=a("_kad_form_tabletFieldBorderStyle"),[d]=a("_kad_form_mobileFieldBorderStyle"),u={},p=(0,b.getPreviewSize)(e,n?.lineHeight?.[0],n?.lineHeight?.[1],n?.lineHeight?.[2]);p&&(u.lineHeight=p+(0,x.get)(n,"lineType",""));const m=(0,b.getPreviewSize)(e,n?.letterSpacing?.[0],n?.letterSpacing?.[1],n?.letterSpacing?.[2]);m&&(u.letterSpacing=m+(0,x.get)(n,"letterType","px"));const h=(0,b.getPreviewSize)(e,n.size[0],n.size[1],n.size[2]);u.fontSize=(0,b.getFontSizeOptionOutput)(h,n.sizeType),u.fieldFont=n,n?.color&&(u.color=(0,b.KadenceColorOutput)(n.color));const g=(0,b.getPreviewSize)(e,void 0!==t?.gap?.[0]&&""!==t?.gap?.[0]?t?.gap[0]:"",void 0!==t?.gap?.[1]&&""!==t?.gap?.[1]?t?.gap[1]:"",void 0!==t?.gap?.[2]&&""!==t?.gap?.[2]?t?.gap[2]:"");g&&(u.previewRowGap=(0,b.getGapSizeOptionOutput)(g,t?.gapUnit?t.gapUnit:"px"));const f=(0,b.getPreviewSize)(e,t?.padding?.[0],t?.tabletPadding?.[0],t?.mobilePadding?.[0]),v=(0,b.getPreviewSize)(e,t?.padding?.[1],t?.tabletPadding?.[1],t?.mobilePadding?.[1]),k=(0,b.getPreviewSize)(e,t?.padding?.[2],t?.tabletPadding?.[2],t?.mobilePadding?.[2]),_=(0,b.getPreviewSize)(e,t?.padding?.[3],t?.tabletPadding?.[3],t?.mobilePadding?.[3]),y=t?.paddingUnit?t?.paddingUnit:"px";u.paddingTop=""!==f?f+y:void 0,u.paddingRight=""!==v?v+y:void 0,u.paddingBottom=""!==k?k+y:void 0,u.paddingLeft=""!==_?_+y:void 0,u.placeholderColor=void 0!==t?.placeholderColor?(0,b.KadenceColorOutput)(t?.placeholderColor):void 0;const E=(0,b.getPreviewSize)(e,void 0!==o?.[0]?o[0]:"",void 0!==l?.[0]?l[0]:"",void 0!==i?.[0]?i[0]:""),C=(0,b.getPreviewSize)(e,void 0!==o?.[1]?o[1]:"",void 0!==l?.[1]?l[1]:"",void 0!==i?.[1]?i[1]:""),S=(0,b.getPreviewSize)(e,void 0!==o?.[2]?o[2]:"",void 0!==l?.[2]?l[2]:"",void 0!==i?.[2]?i[2]:""),w=(0,b.getPreviewSize)(e,void 0!==o?.[3]?o[3]:"",void 0!==l?.[3]?l[3]:"",void 0!==i?.[3]?i[3]:"");return u.borderRadiusUnit=r||"px",u.borderRadiusTop=""!==E?E+u.borderRadiusUnit:void 0,u.borderRadiusRight=""!==C?C+u.borderRadiusUnit:void 0,u.borderRadiusBottom=""!==S?S+u.borderRadiusUnit:void 0,u.borderRadiusLeft=""!==w?w+u.borderRadiusUnit:void 0,u.borderTopWidth=(0,b.getBorderWidth)(e,"top",[c],[s],[d]),u.borderTopColor=(0,b.getBorderColor)(e,"top",[c],[s],[d]),u.borderRightColor=(0,b.getBorderColor)(e,"right",[c],[s],[d]),u.borderBottomColor=(0,b.getBorderColor)(e,"bottom",[c],[s],[d]),u.borderLeftColor=(0,b.getBorderColor)(e,"left",[c],[s],[d]),u.borderActive=t?.borderActive?t.borderActive:"",u.borderTop=(0,b.getBorderStyle)(e,"top",[c],[s],[d]),u.borderRight=(0,b.getBorderStyle)(e,"right",[c],[s],[d]),u.borderBottom=(0,b.getBorderStyle)(e,"bottom",[c],[s],[d]),u.borderLeft=(0,b.getBorderStyle)(e,"left",[c],[s],[d]),u.boxShadow=void 0!==t?.boxShadow&&void 0!==t?.boxShadow[0]&&t?.boxShadow[0]?(void 0!==t?.boxShadow[7]&&t?.boxShadow[7]?"inset ":"")+(void 0!==t?.boxShadow[3]?t?.boxShadow[3]:1)+"px "+(void 0!==t?.boxShadow[4]?t?.boxShadow[4]:1)+"px "+(void 0!==t?.boxShadow[5]?t?.boxShadow[5]:2)+"px "+(void 0!==t?.boxShadow[6]?t?.boxShadow[6]:0)+"px "+(0,b.KadenceColorOutput)(void 0!==t?.boxShadow[1]?t?.boxShadow[1]:"#000000",void 0!==t?.boxShadow[2]?t?.boxShadow[2]:1):void 0,u.background=void 0!==t?.backgroundType&&"gradient"===t?.backgroundType&&void 0!==t?.gradient&&""!==t?.gradient?t?.gradient:void 0===t?.background?void 0:(0,b.KadenceColorOutput)(t?.background,void 0!==t?.backgroundOpacity?t?.backgroundOpacity:1),u.backgroundActive=void 0!==t?.backgroundActiveType&&"gradient"===t?.backgroundActiveType&&void 0!==t?.gradientActive&&""!==t?.gradientActive?t?.gradientActive:void 0===t?.backgroundActive?void 0:(0,b.KadenceColorOutput)(t?.backgroundActive,void 0!==t?.backgroundActiveOpacity?t?.backgroundActiveOpacity:1),u})(t,n,i,c),d=((e,t)=>{const n={};(0,x.isEmpty)(t,"color")?n.color="inherit":n.color=(0,b.KadenceColorOutput)(t.color),n.fontSize=(0,b.getFontSizeOptionOutput)((0,b.getPreviewSize)(e,t.size[0],t.size[1],t.size[2]),(0,x.get)(t,"sizeType","px"));const a=(0,b.getPreviewSize)(e,t?.lineHeight?.[0],t?.lineHeight?.[1],t?.lineHeight?.[2]);a&&(n.lineHeight=a+(0,x.get)(t,"lineType",""));const o=(0,b.getPreviewSize)(e,t?.letterSpacing?.[0],t?.letterSpacing?.[1],t?.letterSpacing?.[2]);return o&&(n.letterSpacing=o+(0,x.get)(t,"letterType","px")),t.weight&&(n.fontWeight=t.weight),t.textTransform&&(n.textTransform=t.textTransform),t.family&&(n.fontFamily=t.family),t.fontStyle&&(n.fontStyle=t.fontStyle),n.paddingTop=""!==t.padding[0]?t.padding[0]+"px":void 0,n.paddingRight=""!==t.padding[1]?t.padding[1]+"px":void 0,n.paddingBottom=""!==t.padding[2]?t.padding[2]+"px":void 0,n.paddingLeft=""!==t.padding[3]?t.padding[3]+"px":void 0,n.marginTop=""!==t.margin[0]?t.margin[0]+"px":void 0,n.marginRight=""!==t.margin[1]?t.margin[1]+"px":void 0,n.marginBottom=""!==t.margin[2]?t.margin[2]+"px":void 0,n.marginLeft=""!==t.margin[3]?t.margin[3]+"px":void 0,n})(t,o),u=((e,t)=>{const n={};(0,x.isEmpty)(t,"color")?n.color="undefined":n.color=(0,b.KadenceColorOutput)(t.color),n.fontSize=(0,b.getFontSizeOptionOutput)((0,b.getPreviewSize)(e,t.size[0],t.size[1],t.size[2]),(0,x.get)(t,"sizeType","px"));const a=(0,b.getPreviewSize)(e,t?.lineHeight?.[0],t?.lineHeight?.[1],t?.lineHeight?.[2]);a&&(n.lineHeight=a+(0,x.get)(t,"lineType",""));const o=(0,b.getPreviewSize)(e,t?.letterSpacing?.[0],t?.letterSpacing?.[1],t?.letterSpacing?.[2]);return o&&(n.letterSpacing=o+(0,x.get)(t,"letterType","px")),n.fontWeight=t.weight?t.weight:void 0,n.textTransform=t.textTransform?t.textTransform:void 0,n.fontFamily=t.family?t.family:void 0,n.fontStyle=t.style?t.style:void 0,n.paddingTop=""!==t.padding[0]?t.padding[0]+"px":void 0,n.paddingRight=""!==t.padding[1]?t.padding[1]+"px":void 0,n.paddingBottom=""!==t.padding[2]?t.padding[2]+"px":void 0,n.paddingLeft=""!==t.padding[3]?t.padding[3]+"px":void 0,n.marginTop=""!==t.margin[0]?t.margin[0]+"px":void 0,n.marginRight=""!==t.margin[1]?t.margin[1]+"px":void 0,n.marginBottom=""!==t.margin[2]?t.margin[2]+"px":void 0,n.marginLeft=""!==t.margin[3]?t.margin[3]+"px":void 0,n})(t,l),p=((e,t)=>{const n={};(0,x.isEmpty)(t,"color")?n.color="undefined":n.color=(0,b.KadenceColorOutput)(t.color),n.fontSize=(0,b.getFontSizeOptionOutput)((0,b.getPreviewSize)(e,t.size[0],t.size[1],t.size[2]),(0,x.get)(t,"sizeType","px"));const a=(0,b.getPreviewSize)(e,t?.lineHeight?.[0],t?.lineHeight?.[1],t?.lineHeight?.[2]);a&&(n.lineHeight=a+(0,x.get)(t,"lineType",""));const o=(0,b.getPreviewSize)(e,t?.letterSpacing?.[0],t?.letterSpacing?.[1],t?.letterSpacing?.[2]);return o&&(n.letterSpacing=o+(0,x.get)(t,"letterType","px")),n.fontWeight=t.weight?t.weight:void 0,n.textTransform=t.textTransform?t.textTransform:void 0,n.fontFamily=t.family?t.family:void 0,n.fontStyle=t.fontStyle?t.fontStyle:void 0,n})(t,r),m=(0,a.createElement)("style",null,`\n\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form {\n\t\t\t\t${s?.previewRowGap?"gap:"+s?.previewRowGap+";":""}\n\t\t\t\t${s?.background?"--kb-form-background-color: "+s.background+";":""}\n\t\t\t\t${s?.color?"--kb-form-text-color:"+s.color+";":""}\n\t\t\t\t${s?.borderTopColor?"--kb-form-border-color: "+s.borderTopColor+";":""}\n\t\t\t\t${s?.borderTopWidth?"--kb-form-border-width: "+s.borderTopWidth+";":""}\n\t\t\t}\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="text"]:not(.ignore-field-styles),\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="email"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="url"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="password"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="search"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="number"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="tel"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="range"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="date"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="month"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="week"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="time"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="datetime"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="datetime-local"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="color"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="file"],\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field select,\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field textarea {\n\t\t\t\t${s?.fontSize?"font-size:"+s.fontSize+";":""}\n\t\t\t\t${s?.lineHeight?"line-height:"+s.lineHeight+";":""}\n\t\t\t\t${s?.letterSpacing?"letter-spacing:"+s.letterSpacing+";":""}\n\t\t\t\t${s?.fieldFont?.textTransform?"text-transform:"+s.fieldFont.textTransform+";":""}\n\t\t\t\t${s?.fieldFont?.family?"font-family:"+s.fieldFont.family+";":""}\n\t\t\t\t${s?.fieldFont?.style?"font-style:"+s.fieldFont.style+";":""}\n\t\t\t\t${s?.fieldFont?.weight?"font-weight:"+s.fieldFont.weight+";":""}\n\n\t\t\t\t${s?.paddingTop?"padding-top:"+s.paddingTop+";":""}\n\t\t\t\t${s?.paddingRight?"padding-right:"+s.paddingRight+";":""}\n\t\t\t\t${s?.paddingBottom?"padding-bottom:"+s.paddingBottom+";":""}\n\t\t\t\t${s?.paddingLeft?"padding-left:"+s.paddingLeft+";":""}\n\n\t\t\t\t${s?.borderRadiusTop?"border-top-left-radius: "+s.borderRadiusTop+";":""}\n\t\t\t\t${s?.borderRadiusRight?"border-top-right-radius: "+s.borderRadiusRight+";":""}\n\t\t\t\t${s?.borderRadiusBottom?"border-bottom-right-radius: "+s.borderRadiusBottom+";":""}\n\t\t\t\t${s?.borderRadiusLeft?"border-bottom-left-radius: "+s.borderRadiusLeft+";":""}\n\n\t\t\t\t${s?.borderTop?"border-top: "+s.borderTop+";":""}\n\t\t\t\t${s?.borderRight?"border-right: "+s.borderRight+";":""}\n\t\t\t\t${s?.borderBottom?"border-bottom: "+s.borderBottom+";":""}\n\t\t\t\t${s?.borderLeft?"border-left: "+s.borderLeft+";":""}\n\n\t\t\t\t${s?.borderTopColor?"border-top-color: "+s.borderTopColor+";":""}\n\t\t\t\t${s?.borderRightColor?"border-right-color: "+s.borderRightColor+";":""}\n\t\t\t\t${s?.borderBottomColor?"border-bottom-color: "+s.borderBottomColor+";":""}\n\t\t\t\t${s?.borderLeftColor?"border-left-color: "+s.borderLeftColor+";":""}\n\n\t\t\t\t${s?.boxShadow?"box-shadow: "+s.boxShadow+";":""}\n\t\t}\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="text"]:not(.ignore-field-styles):focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="email"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="url"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="password"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="search"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="number"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="tel"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="range"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="date"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="month"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="week"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="time"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="datetime"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="datetime-local"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="color"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="file"]:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field select:focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field textarea:focus {\n\t\t\t${s?.borderActive?"border-color: "+s.borderActive+";":""}\n\t\t}\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input:not(.ignore-field-styles):focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field select:not(.ignore-field-styles):focus,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field textarea:focus {\n\t\t\t${s?.backgroundActive?"background: "+s.backgroundActive+";":""}\n\t\t}\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input::placeholder,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field select::placeholder,\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field textarea::placeholder {\n\t\t\t${s?.placeholderColor?"color: "+s.placeholderColor+";":""}\n\t\t}\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="radio"]{\n\t\t\t${s?.borderColor?"border-color:"+s.borderColor+";":""}\n\t\t}\n\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-field input[type="checkbox"]{\n\t\t\t${s?.borderColor?"border-color:"+s.borderColor+";":""}\n\t\t}\n\t\t`),h=(0,a.createElement)("style",null,`\n\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-label {\n\t\t\t\t${d?.fontStyle?"font-style:"+d.fontStyle+";":""}\n\t\t\t\t${d?.lineHeight?"line-height:"+d.lineHeight+";":""}\n\t\t\t\t${d?.fontWeight?"font-weight:"+d.fontWeight+";":""}\n\t\t\t\t${d?.letterSpacing?"letter-spacing:"+d.letterSpacing+"px;":""}\n\t\t\t\t${d?.textTransform?"text-transform:"+d.textTransform+";":""}\n\t\t\t\t${d?.fontFamily?"font-family:"+d.fontFamily+";":""}\n\t\t\t\t${d?.fontSize?"font-size:"+d.fontSize+";":""}\n\n\t\t\t\t${d?.color?"color:"+d.color+";":""}\n\n\t\t\t\t${d?.paddingTop?"padding-top:"+d.paddingTop+";":""}\n\t\t\t\t${d?.paddingRight?"padding-right:"+d.paddingRight+";":""}\n\t\t\t\t${d?.paddingBottom?"padding-bottom:"+d.paddingBottom+";":""}\n\t\t\t\t${d?.paddingLeft?"padding-left:"+d.paddingLeft+";":""}\n\n\t\t\t\t${d?.marginTop?"margin-top:"+d.marginTop+";":""}\n\t\t\t\t${d?.marginRight?"margin-right:"+d.marginRight+";":""}\n\t\t\t\t${d?.marginBottom?"margin-bottom:"+d.marginBottom+";":""}\n\t\t\t\t${d?.marginLeft?"margin-left:"+d.marginLeft+";":""}\n\t\t\t}\n\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-label .kb-adv-form-required {;\n\t\t\t\t${n?.requiredColor?"color:"+n.requiredColor+";":""}\n\t\t\t}\n\n\t\t\t`),g=(0,a.createElement)("style",null,`\n\t\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-radio-check-item label {\n\t\t\t\t\t${p?.fontSize?"font-size:"+p.fontSize+";":""}\n\t\t\t\t\t${p?.fontStyle?"font-style:"+p.fontStyle+";":""}\n\t\t\t\t\t${p?.lineHeight?"line-height:"+p.lineHeight+";":""}\n\t\t\t\t\t${p?.fontWeight?"font-weight:"+p.fontWeight+";":""}\n\t\t\t\t\t${p?.letterSpacing?"letter-spacing:"+p.letterSpacing+";":""}\n\t\t\t\t\t${p?.textTransform?"text-transform:"+p.textTransform+";":""}\n\t\t\t\t\t${p?.fontFamily?"font-family:"+p.fontFamily+";":""}\n\n\t\t\t\t\t${p?.color?"color:"+p.color+";":""}\n\t\t\t\t}\n\t\t\t`),f=(0,a.createElement)("style",null,`\n\n\t\t\t.wp-block-kadence-advanced-form${e} .kb-advanced-form .kb-adv-form-help {\n\t\t\t\t${u?.fontSize?"font-size: "+u.fontSize+";":""}\n\t\t\t\t${u?.lineHeight?"line-height: "+u.lineHeight+";":""}\n\t\t\t\t${u?.fontWeight?"font-weight: "+u.fontWeight+";":""}\n\n\t\t\t\t${u?.textTransform?"text-transform: "+u.textTransform+";":""}\n\t\t\t\t${u?.fontFamily?"font-family: "+u.fontFamily+";":""}\n\t\t\t\t${u?.fontStyle?"font-style: "+u.fontStyle+";":""}\n\t\t\t\t${u?.letterSpacing?"letter-spacing: "+u.letterSpacing+";":""}\n\n\t\t\t\t${u?.paddingTop?"padding-top: "+u.paddingTop+";":""}\n\t\t\t\t${u?.paddingRight?"padding-right: "+u.paddingRight+";":""}\n\t\t\t\t${u?.paddingBottom?"padding-bottom: "+u.paddingBottom+";":""}\n\t\t\t\t${u?.paddingLeft?"padding-left: "+u.paddingLeft+";":""}\n\n\t\t\t\t${u?.marginTop?"margin-top: "+u.marginTop+";":""}\n\t\t\t\t${u?.marginRight?"margin-right: "+u.marginRight+";":""}\n\t\t\t\t${u?.marginBottom?"margin-bottom: "+u.marginBottom+";":""}\n\t\t\t\t${u?.marginLeft?"margin-left: "+u.marginLeft+";":""}\n\n\t\t\t\t${u?.color?"color: "+u.color+";":""}\n\t\t\t}\n\n\t\t\t`);return(0,a.createElement)(a.Fragment,null,m,h,f,g)}const Gn=function(e){let{icon:t,size:n=24,...a}=e;return(0,m.cloneElement)(t,{width:n,height:n,...a})},Qn=(0,m.createElement)(Dn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,m.createElement)(Dn.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),Jn=window.wp.a11y,Yn=window.wp.compose,Xn=window.wp.keycodes,Zn=(0,m.memo)((function({className:e,item:t,onSelect:n,...o}){const l=t.icon?{backgroundColor:t.icon.background,color:t.icon.foreground}:{};return(0,a.createElement)("div",{className:g()("block-editor-block-types-list__list-item","kb-custom-insert__list-item")},(0,a.createElement)(d.Button,{className:g()("block-editor-block-types-list__item",e),disabled:t.isDisabled,onClick:e=>{e.preventDefault(),n(t,(0,Xn.isAppleOS)()?e.metaKey:e.ctrlKey)},onKeyDown:e=>{const{keyCode:a}=e;a===Xn.ENTER&&(e.preventDefault(),n(t,(0,Xn.isAppleOS)()?e.metaKey:e.ctrlKey))},...o},(0,a.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:l},(0,a.createElement)(c.BlockIcon,{icon:t.icon,showColors:!0})),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,a.createElement)(d.__experimentalTruncate,{numberOfLines:3},t.title))))})),ea=["kadence/advanced-form-text","kadence/advanced-form-email","kadence/advanced-form-textarea","kadence/advanced-form-select","kadence/advanced-form-radio","kadence/advanced-form-telephone","kadence/advanced-form-checkbox","kadence/advanced-form-number"],ta=["kadence/advanced-form-file","kadence/advanced-form-time","kadence/advanced-form-date","kadence/advanced-form-accept","kadence/advanced-form-hidden"],na=["kadence/advanced-form-submit","kadence/advanced-form-captcha"],aa=["core/paragraph","kadence/advancedheading","kadence/column","kadence/rowlayout","kadence/spacer"];function oa({onSelect:e,rootClientId:t,clientId:n,isAppender:o,insertionIndex:r,prioritizePatterns:s,selectBlockOnInsert:p,orderInitialBlockItems:b}){const[h,f]=(0,m.useState)(""),[v,k]=function({rootClientId:e="",clientId:t,isAppender:n,insertionIndex:a,onSelect:o,shouldFocusBlock:r=!0,selectBlockOnInsert:s=!0}){const{getSelectedBlock:d}=(0,u.useSelect)(c.store),{destinationRootClientId:p,destinationIndex:b}=(0,u.useSelect)((o=>{const{getSelectedBlockClientId:l,getBlockRootClientId:i,getBlockIndex:r,getBlockOrder:s}=o(c.store),d=l();let u,p=e;return void 0!==a?u=a:t?u=r(t):!n&&d?(p=i(d),u=r(d)+1):u=s(p).length,{destinationRootClientId:p,destinationIndex:u}}),[e,a,t,n]),{replaceBlocks:h,insertBlocks:g,showInsertionPoint:f,hideInsertionPoint:v}=(0,u.useDispatch)(c.store),k=(0,m.useCallback)(((e,t,a=!1,c=!1)=>{const u=d();o&&o(e),setTimeout((()=>{!n&&u&&(0,l.isUnmodifiedDefaultBlock)(u)?h(u.clientId,e,null,r||a?0:null,t):g(e,c||b,p,s,r||a?0:null,t);const o=Array.isArray(e)?e.length:1,d=(0,i.sprintf)(
// translators: %d: the name of the block that has been added
// translators: %d: the name of the block that has been added
(0,i._n)("%d block added.","%d blocks added.",o),o);(0,Jn.speak)(d)}),0)}),[n,d,h,g,p,b,o,r]),_=(0,m.useCallback)((e=>{e?f(p,b):v()}),[f,v,p,b]);return[p,k,_]}({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:p}),[_,y,E,C,S]=((e,t)=>{const{submitItems:n,layoutItems:a,formItems:o,formAdvItems:i}=(0,u.useSelect)((t=>{const{getInserterItems:n}=t(c.store),a=n(e);let o=a.filter((e=>ea.includes(e.id))),l=a.filter((e=>ta.includes(e.id)));const i=a.filter((e=>na.includes(e.id)));let r=a.filter((e=>aa.includes(e.id)));return o=(0,x.sortBy)(o,(function(e){return ea.indexOf(e.name)})),l=(0,x.sortBy)(l,(function(e){return ta.indexOf(e.name)})),r=(0,x.sortBy)(r,(function(e){return aa.indexOf(e.name)})),{submitItems:i,layoutItems:r,formItems:o,formAdvItems:l}}),[e]);return[o,i,a,n,(0,m.useCallback)((({name:e,initialAttributes:n,innerBlocks:a},o,i)=>{const r=(0,l.createBlock)(e,n,(0,l.createBlocksFromInnerBlocksTemplate)(a));t(r,void 0,o,i)}),[t])]})(v,k),{setInserterIsOpened:w,insertIndex:T}=(0,u.useSelect)((e=>{const{getSettings:t,getBlockIndex:a,getBlockCount:o}=e(c.store),l=t(),i=a(n),r=o();return{setInserterIsOpened:l.__experimentalSetIsInserterOpened,insertIndex:-1===i?r-1:i}}),[n]);(0,m.useEffect)((()=>{w&&w(!1)}),[w]);const F=({name:e})=>{switch(e){case"layout":return(0,a.createElement)(a.Fragment,null,E.map(((e,t)=>(0,a.createElement)(Zn,{key:e.id,item:e,className:(0,l.getBlockMenuDefaultClassName)(e.id),onSelect:(e,t)=>S(e,!0,r||T)}))));case"extra":return(0,a.createElement)(a.Fragment,null,C.map(((e,t)=>(0,a.createElement)(Zn,{key:e.id,item:e,className:(0,l.getBlockMenuDefaultClassName)(e.id),onSelect:(e,t)=>S(e,!0,r||T)}))));case"advanced":return(0,a.createElement)(a.Fragment,null,y.map(((e,t)=>(0,a.createElement)(Zn,{key:e.id,item:e,className:(0,l.getBlockMenuDefaultClassName)(e.id),onSelect:(e,t)=>S(e,!0,r||T)}))));default:return(0,a.createElement)(a.Fragment,null,_.map(((e,t)=>(0,a.createElement)(Zn,{key:e.id,item:e,className:(0,l.getBlockMenuDefaultClassName)(e.id),onSelect:(e,t)=>S(e,!0,r||T)}))))}};return(0,a.createElement)("div",{className:g()("block-editor-inserter__quick-inserter",{"has-expand":w})},(0,a.createElement)("div",{className:"kb-custom-insert"},(0,a.createElement)(d.TabPanel,{className:"kb-custom-insert_tabs",activeClass:"active-insert-list",tabs:[{name:"fields",title:(0,a.createElement)("span",{className:"insert-tab-title-wrap"},(0,a.createElement)("span",{className:"insert-tab-subtitle"},(0,i.__)("Standard","kadence-blocks")),(0,a.createElement)("span",{className:"insert-tab-title"},(0,i.__)("Fields","kadence-blocks")))},{name:"advanced",title:(0,a.createElement)("span",{className:"insert-tab-title-wrap"},(0,a.createElement)("span",{className:"insert-tab-subtitle"},(0,i.__)("Advanced","kadence-blocks")),(0,a.createElement)("span",{className:"insert-tab-title"},(0,i.__)("Fields","kadence-blocks")))},{name:"layout",title:(0,i.__)("Layout","kadence-blocks")},{name:"extra",title:(0,i.__)("Misc","kadence-blocks")}]},(e=>(0,a.createElement)("div",{className:"kb-custom-insert__list"},(0,a.createElement)(F,{name:e.name}))))))}const la=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:l,toggleProps:r={},prioritizePatterns:c})=>{const{as:s=d.Button,label:u,onClick:p,...m}=r;let b=u;return!b&&l?b=(0,i.sprintf)(
// translators: %s: the name of the block when there is only one
// translators: %s: the name of the block when there is only one
(0,i._x)("Add %s","directly add the only allowed block"),o):!b&&c?b=(0,i.__)("Add pattern"):b||(b=(0,i._x)("Add block","Generic label for block inserter button")),(0,a.createElement)(s,{icon:Qn,label:b,tooltipPosition:"bottom",onClick:function(t){e&&e(t),p&&p(t)},className:"block-editor-inserter__toggle","aria-haspopup":!l&&"true","aria-expanded":!l&&n,disabled:t,...m})};class ia extends m.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:a,hasSingleBlockType:o,directInsertBlock:l,toggleProps:i,hasItems:r,renderToggle:c=la,prioritizePatterns:s}=this.props;return c({onToggle:e,isOpen:t,disabled:n||!r,blockTitle:a,hasSingleBlockType:o,directInsertBlock:l,toggleProps:i,prioritizePatterns:s})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:l,prioritizePatterns:i,onSelectOrClose:r,selectBlockOnInsert:c,orderInitialBlockItems:s,insertionIndex:d}=this.props;return(0,a.createElement)(oa,{onSelect:t=>{const n=Array.isArray(t)&&t?.length?t[0]:t;r&&"function"==typeof r&&r(n),e()},rootClientId:t,clientId:n,isAppender:o,insertionIndex:d,prioritizePatterns:i,selectBlockOnInsert:c,orderInitialBlockItems:s})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,onSelectOrClose:l,inline:r}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,a.createElement)(d.Dropdown,{className:g()({"block-editor-inserter":!0,"kb-form-custom-insert":r}),contentClassName:g()("block-editor-inserter__popover",{"is-quick":!0}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,i.__)("Add a field","kadence-blocks"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}const ra=(0,Yn.compose)([(0,u.withSelect)(((e,{clientId:t,rootClientId:n,shouldDirectInsert:a=!0})=>{const{getBlockRootClientId:o,hasInserterItems:i,getAllowedBlocks:r,__experimentalGetDirectInsertBlock:s,getSettings:d}=e(c.store),{getBlockVariations:u}=e(l.store),p=r(n=n||o(t)||void 0),m=a&&s(n),b=d(),h=1===p?.length&&0===u(p[0].name,"inserter")?.length;let g=!1;return h&&(g=p[0]),{hasItems:i(n),hasSingleBlockType:h,blockTitle:g?g.title:"",allowedBlockType:g,directInsertBlock:m,rootClientId:n,prioritizePatterns:b.__experimentalPreferPatternsOnRoot&&!n}})),(0,u.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:a,clientId:o,isAppender:r,hasSingleBlockType:s,allowedBlockType:d,directInsertBlock:u,onSelectOrClose:p,selectBlockOnInsert:m}=t;if(!s&&!u)return;const{insertBlock:b}=e(c.store);let h;if(u){const e=function(e){const{getBlock:t,getPreviousBlockClientId:l}=n(c.store);if(!e||!o&&!a)return{};const i={};let r={};if(o){const e=t(o),n=t(l(o));e?.name===n?.name&&(r=n?.attributes||{})}else{const e=t(a);if(e?.innerBlocks?.length){const t=e.innerBlocks[e.innerBlocks.length-1];u&&u?.name===t.name&&(r=t.attributes)}}return e.forEach((e=>{r.hasOwnProperty(e)&&(i[e]=r[e])})),i}(u.attributesToCopy);h=(0,l.createBlock)(u.name,{...u.attributes||{},...e})}else h=(0,l.createBlock)(d.name);b(h,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:l,getBlockRootClientId:i}=n(c.store);if(o)return e(o);const s=t();return!r&&s&&i(s)===a?e(s)+1:l(a).length}(),a,m),p&&p({clientId:h?.clientId});const g=(0,i.sprintf)(
// translators: %s: the name of the block that has been added
// translators: %s: the name of the block that has been added
(0,i.__)("%s block added"),d.title);(0,Jn.speak)(g)}}))),(0,Yn.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:a})=>e||!t&&!n&&!a))])(ia),ca=(0,m.forwardRef)(((e,t)=>(0,a.createElement)(ra,{ref:t,...e,orderInitialBlockItems:void 0}))),sa=(0,m.forwardRef)((function({rootClientId:e,className:t,onFocus:n,tabIndex:o,inline:l=!1,getRoot:r=!1},s){const{parentFormBlock:p,insertIndex:m}=(0,u.useSelect)((e=>{if(!r)return{parentFormBlock:!1,insertIndex:!1};const{getBlockParentsByBlockName:t,getBlockIndex:n,getBlockParents:a}=e(c.store),o=t(r,"kadence/column"),l=!(void 0===o||!o.length)&&o[o.length-1],i=t(r,"kadence/advanced-form"),s=!(void 0===i||!i.length)&&i[0],d=a(r);let u=!1;return void 0!==d&&d.length&&d.includes(s)&&d.includes(l)&&d.indexOf(s)>d.indexOf(l)&&(u=s),{parentFormBlock:u||l||s,insertIndex:n(r)+1}}),[r]);return(0,a.createElement)(ca,{position:"bottom center",inline:l,rootClientId:p||e,insertionIndex:m||void 0,selectBlockOnInsert:!0,renderToggle:({onToggle:e,disabled:r,isOpen:c,blockTitle:u,hasSingleBlockType:p})=>{let m;m=p?(0,i.sprintf)(
// translators: %s: the name of the block when there is only one
// translators: %s: the name of the block when there is only one
(0,i._x)("Add %s","directly add the only allowed block"),u):(0,i._x)("Add field","Generic label for block inserter button");const b=!p;let h=(0,a.createElement)(d.Button,{ref:s,onFocus:n,tabIndex:o,className:g()(t,{"block-editor-button-block-appender":!l,"block-editor-inserter__toggle":l,"has-icon":l}),onClick:e,"aria-haspopup":b?"true":void 0,"aria-expanded":b?c:void 0,disabled:r,label:m},!p&&(0,a.createElement)(d.VisuallyHidden,{as:"span"},m),(0,a.createElement)(Gn,{icon:Qn}));return(b||p)&&(h=(0,a.createElement)(d.Tooltip,{text:m},h)),h},isAppender:!0})})),da=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-accept","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"isChecked":{"type":"boolean","default":false},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"helpText":{"type":"string","default":""},"description":{"type":"string","default":""},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"inputName":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"ktdynamic":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');function ua(){return ua=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ua.apply(this,arguments)}function pa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(0,l.registerBlockType)("kadence/advanced-form-accept",{...da,title:(0,i.__)("Accept","kadence-blocks"),description:(0,i.__)("Kadence Form accept input","kadence-blocks"),keywords:["kadence"],parent:["kadence/advanced-form"],icon:{src:r.acceptInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,defaultValue:_,isChecked:E,helpText:C,ariaDescription:S,maxWidth:x,maxWidthUnit:w,minWidth:T,minWidthUnit:O,defaultParameter:I,placeholder:N,inputName:P,description:B,requiredMessage:D,kadenceDynamic:M}=e,[R,V]=(0,m.useState)("general"),{previewDevice:L}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const W=(0,b.getPreviewSize)(L,x&&x[0]?x[0]:"",x&&x[1]?x[1]:"",x&&x[2]?x[2]:""),z=(0,b.getPreviewSize)(L,T&&T[0]?T[0]:"",T&&T[1]?T[1]:"",T&&T[2]?T[2]:""),q=g()({"kb-adv-form-field":!0}),U=(0,c.useBlockProps)({className:q,style:{maxWidth:""!==W?W+(w||"%"):void 0,minWidth:""!==z?z+(O||"px"):void 0}}),H=(0,m.useMemo)((()=>void 0!==M&&void 0!==M.defaultValue&&void 0!==M.defaultValue?.enable&&""!==M.defaultValue.enable&&!0===M.defaultValue.enable?M?.defaultValue?.field?"{"+M.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[M,_]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...U},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-accept",setActiveTab:V,activeTab:R,allowedTabs:["general","advanced"]}),"general"===R&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-text-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Accept Statement","kadence-blocks"),value:B,placeholder:(0,i.__)("Opt me in!","kadence-blocks"),onChange:e=>t({description:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:C,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Start checked?","kadence-blocks"),checked:void 0!==E&&E,onChange:e=>t({isChecked:e})}))),"advanced"===R&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-text-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==x&&void 0!==x[0]?x[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==x&&void 0!==x[1]?x[1]:"",void 0!==x&&void 0!==x[2]?x[2]:""]})},tabletValue:void 0!==x&&void 0!==x[1]?x[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==x&&void 0!==x[0]?x[0]:"",e,void 0!==x&&void 0!==x[2]?x[2]:""]})},mobileValue:void 0!==x&&void 0!==x[2]?x[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==x&&void 0!==x[0]?x[0]:"",void 0!==x&&void 0!==x[1]?x[1]:"",e]})},min:0,max:"px"===w?2e3:100,step:1,unit:w||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==T&&void 0!==T[0]?T[0]:"",onChange:e=>{t({minWidth:[e,void 0!==T&&void 0!==T[1]?T[1]:"",void 0!==T&&void 0!==T[2]?T[2]:""]})},tabletValue:void 0!==T&&void 0!==T[1]?T[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",e,void 0!==T&&void 0!==T[2]?T[2]:""]})},mobileValue:void 0!==T&&void 0!==T[2]?T[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",void 0!==T&&void 0!==T[1]?T[1]:"",e]})},min:0,max:"px"===O?2e3:100,step:1,unit:O||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-text-extra-settings"},(0,a.createElement)(F,{value:P,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:S,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:D,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:I,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("div",{className:"kb-radio-check-item"},(0,a.createElement)("input",{type:"checkbox",className:"kb-field",value:H,placeholder:N,checked:void 0!==E&&E,onChange:e=>!1}),(0,a.createElement)("label",null,(0,a.createElement)(c.RichText,{className:"kadence-field-label__input",onChange:e=>{t({description:e})},placeholder:(0,i.__)("Opt me in!","kadence-blocks"),allowedFormats:["core/bold","core/italic","core/link","core/underline"],tagName:"span",value:B,multiline:!1}),!k&&f&&(0,a.createElement)("span",{className:"kb-adv-form-required"},"*"))),C&&(0,a.createElement)("span",{className:"kb-adv-form-help"},C)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});var ma=function(e){var t,n;function a(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(pa(t)),t.handleErrored=t.handleErrored.bind(pa(t)),t.handleChange=t.handleChange.bind(pa(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(pa(t)),t}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=a.prototype;return l.getValue=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this.props.grecaptcha.getResponse(this._widgetId):null},l.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},l.execute=function(){var e=this.props.grecaptcha;if(e&&void 0!==this._widgetId)return e.execute(this._widgetId);this._executeRequested=!0},l.executeAsync=function(){var e=this;return new Promise((function(t,n){e.executionResolve=t,e.executionReject=n,e.execute()}))},l.reset=function(){this.props.grecaptcha&&void 0!==this._widgetId&&this.props.grecaptcha.reset(this._widgetId)},l.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},l.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},l.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},l.explicitRender=function(){if(this.props.grecaptcha&&this.props.grecaptcha.render&&void 0===this._widgetId){var e=document.createElement("div");this._widgetId=this.props.grecaptcha.render(e,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge}),this.captcha.appendChild(e)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},l.componentDidMount=function(){this.explicitRender()},l.componentDidUpdate=function(){this.explicitRender()},l.componentWillUnmount=function(){void 0!==this._widgetId&&(this.delayOfCaptchaIframeRemoving(),this.reset())},l.delayOfCaptchaIframeRemoving=function(){var e=document.createElement("div");for(document.body.appendChild(e),e.style.display="none";this.captcha.firstChild;)e.appendChild(this.captcha.firstChild);setTimeout((function(){document.body.removeChild(e)}),5e3)},l.handleRecaptchaRef=function(e){this.captcha=e},l.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,function(e,t){if(null==e)return{};var n,a,o={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"]));return o().createElement("div",ua({},t,{ref:this.handleRecaptchaRef}))},a}(o().Component);ma.displayName="ReCAPTCHA",ma.propTypes={sitekey:Oe().string.isRequired,onChange:Oe().func,grecaptcha:Oe().object,theme:Oe().oneOf(["dark","light"]),type:Oe().oneOf(["image","audio"]),tabindex:Oe().number,onExpired:Oe().func,onErrored:Oe().func,size:Oe().oneOf(["compact","normal","invisible"]),stoken:Oe().string,hl:Oe().string,badge:Oe().oneOf(["bottomright","bottomleft","inline"])},ma.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var ba=n(4146),ha=n.n(ba);function ga(){return ga=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ga.apply(this,arguments)}var fa={},va=0,ka="onloadcallback";const _a=(ya=function(){return"https://"+(("undefined"!=typeof window&&window.recaptchaOptions||{}).useRecaptchaNet?"recaptcha.net":"www.google.com")+"/recaptcha/api.js?onload="+ka+"&render=explicit"},Ea=(Ea={callbackName:ka,globalName:"grecaptcha"})||{},function(e){var t=e.displayName||e.name||"Component",n=function(t){var n,o;function l(e,n){var a;return(a=t.call(this,e,n)||this).state={},a.__scriptURL="",a}o=t,(n=l).prototype=Object.create(o.prototype),n.prototype.constructor=n,n.__proto__=o;var i=l.prototype;return i.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+va++),this.__scriptLoaderID},i.setupScriptURL=function(){return this.__scriptURL=ya(),this.__scriptURL},i.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},i.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=fa[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var t in e.observers)e.observers[t](e);delete window[Ea.callbackName]},i.componentDidMount=function(){var e=this,t=this.setupScriptURL(),n=this.asyncScriptLoaderGetScriptLoaderID(),a=Ea,o=a.globalName,l=a.callbackName,i=a.scriptId;if(o&&void 0!==window[o]&&(fa[t]={loaded:!0,observers:{}}),fa[t]){var r=fa[t];return r&&(r.loaded||r.errored)?void this.asyncScriptLoaderHandleLoad(r):void(r.observers[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var c={};c[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)},fa[t]={loaded:!1,observers:c};var s=document.createElement("script");for(var d in s.src=t,s.async=!0,Ea.attributes)s.setAttribute(d,Ea.attributes[d]);i&&(s.id=i);var u=function(e){if(fa[t]){var n=fa[t].observers;for(var a in n)e(n[a])&&delete n[a]}};l&&"undefined"!=typeof window&&(window[l]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),s.onload=function(){var e=fa[t];e&&(e.loaded=!0,u((function(t){return!l&&(t(e),!0)})))},s.onerror=function(){var e=fa[t];e&&(e.errored=!0,u((function(t){return t(e),!0})))},document.body.appendChild(s)},i.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===Ea.removeOnUnmount)for(var t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1)t[n].src.indexOf(e)>-1&&t[n].parentNode&&t[n].parentNode.removeChild(t[n]);var a=fa[e];a&&(delete a.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===Ea.removeOnUnmount&&delete fa[e])},i.render=function(){var t=Ea.globalName,n=this.props,o=(n.asyncScriptOnLoad,n.forwardedRef),l=function(e,t){if(null==e)return{};var n,a,o={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(n,["asyncScriptOnLoad","forwardedRef"]);return t&&"undefined"!=typeof window&&(l[t]=void 0!==window[t]?window[t]:void 0),l.ref=o,(0,a.createElement)(e,l)},l}(a.Component),o=(0,a.forwardRef)((function(e,t){return(0,a.createElement)(n,ga({},e,{forwardedRef:t}))}));return o.displayName="AsyncScriptLoader("+t+")",o.propTypes={asyncScriptOnLoad:Oe().func},ha()(o,e)})(ma);var ya,Ea;const Ca=_a;var Sa=n(30),xa=n.n(Sa);function wa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ta(e,t){return Ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ta(e,t)}function Fa(e){var t=e&&e.ownerDocument||document;return{document:t,window:t.defaultView||t.parentWindow||window}}function Oa(e){return e||document.head}var Ia="hcaptcha-api-script-id",Aa="hcaptchaOnLoad",Na=[];const Pa=function(e){var t,n;function o(t){var n;return(n=e.call(this,t)||this)._hcaptcha=void 0,n.renderCaptcha=n.renderCaptcha.bind(wa(n)),n.resetCaptcha=n.resetCaptcha.bind(wa(n)),n.removeCaptcha=n.removeCaptcha.bind(wa(n)),n.isReady=n.isReady.bind(wa(n)),n.loadCaptcha=n.loadCaptcha.bind(wa(n)),n.handleOnLoad=n.handleOnLoad.bind(wa(n)),n.handleSubmit=n.handleSubmit.bind(wa(n)),n.handleExpire=n.handleExpire.bind(wa(n)),n.handleError=n.handleError.bind(wa(n)),n.handleOpen=n.handleOpen.bind(wa(n)),n.handleClose=n.handleClose.bind(wa(n)),n.handleChallengeExpired=n.handleChallengeExpired.bind(wa(n)),n.ref=a.createRef(),n.apiScriptRequested=!1,n.state={isApiReady:!1,isRemoved:!1,elementId:t.id,captchaId:""},n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ta(t,n);var l=o.prototype;return l.componentDidMount=function(){var e=this,t=Fa(Oa(this.props.scriptLocation));this._hcaptcha=t.window.hcaptcha||void 0,void 0!==this._hcaptcha?this.setState({isApiReady:!0},(function(){e.renderCaptcha()})):this.loadCaptcha()},l.componentWillUnmount=function(){var e=this.state.captchaId,t=this._hcaptcha;this.isReady()&&(t.reset(e),t.remove(e))},l.shouldComponentUpdate=function(e,t){return this.state.isApiReady===t.isApiReady&&this.state.isRemoved===t.isRemoved},l.componentDidUpdate=function(e){var t=this;["sitekey","size","theme","tabindex","languageOverride","endpoint"].every((function(n){return e[n]===t.props[n]}))||this.removeCaptcha((function(){t.renderCaptcha()}))},l.loadCaptcha=function(){if(!this.apiScriptRequested){var e=this.props,t=e.apihost,n=e.assethost,a=e.endpoint,o=e.host,l=e.imghost;(function(e){void 0===e&&(e={});var t=Oa(e.scriptLocation);delete e.scriptLocation;var n=Fa(t),a=Na.find((function(e){return e.scope===n.window}));if(n.document.getElementById(Ia)&&a)return a.promise;var o=new Promise((function(a,o){n.window[Aa]=a;var l=e.apihost||"https://js.hcaptcha.com";delete e.apihost;var i=n.document.createElement("script");i.id=Ia,i.src=l+"/1/api.js?render=explicit&onload="+Aa,i.async=void 0===e.loadAsync||e.loadAsync,delete e.loadAsync,i.onerror=function(e){return o("script-error")};var r=function(e){return Object.entries(e).filter((function(e){e[0];var t=e[1];return t||!1===t})).map((function(e){var t=e[0],n=e[1];return encodeURIComponent(t)+"="+encodeURIComponent(n)})).join("&")}(e);i.src+=""!==r?"&"+r:"",t.appendChild(i)}));return Na.push({promise:o,scope:n.window}),o})({apihost:t,assethost:n,endpoint:a,hl:e.languageOverride,host:o,imghost:l,recaptchacompat:!1===e.reCaptchaCompat?"off":null,reportapi:e.reportapi,sentry:e.sentry,custom:e.custom,loadAsync:e.loadAsync,scriptLocation:e.scriptLocation}).then(this.handleOnLoad).catch(this.handleError),this.apiScriptRequested=!0}},l.renderCaptcha=function(e){if(this.state.isApiReady){var t=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),n=this._hcaptcha.render(this.ref.current,t);this.setState({isRemoved:!1,captchaId:n},(function(){e&&e()}))}},l.resetCaptcha=function(){var e=this.state.captchaId,t=this._hcaptcha;this.isReady()&&t.reset(e)},l.removeCaptcha=function(e){var t=this.state.captchaId,n=this._hcaptcha;this.isReady()&&this.setState({isRemoved:!0},(function(){n.remove(t),e&&e()}))},l.handleOnLoad=function(){var e=this;this.setState({isApiReady:!0},(function(){var t=Fa(Oa(e.props.scriptLocation));e._hcaptcha=t.window.hcaptcha,e.renderCaptcha((function(){var t=e.props.onLoad;t&&t()}))}))},l.handleSubmit=function(e){var t=this.props.onVerify,n=this.state,a=n.isRemoved,o=n.captchaId,l=this._hcaptcha;if(void 0!==l&&!a){var i=l.getResponse(o),r=l.getRespKey(o);t&&t(i,r)}},l.handleExpire=function(){var e=this.props.onExpire,t=this.state.captchaId,n=this._hcaptcha;this.isReady()&&(n.reset(t),e&&e())},l.handleError=function(e){var t=this.props.onError,n=this.state.captchaId,a=this._hcaptcha;this.isReady()&&a.reset(n),t&&t(e)},l.isReady=function(){var e=this.state,t=e.isApiReady,n=e.isRemoved;return t&&!n},l.handleOpen=function(){this.isReady()&&this.props.onOpen&&this.props.onOpen()},l.handleClose=function(){this.isReady()&&this.props.onClose&&this.props.onClose()},l.handleChallengeExpired=function(){this.isReady()&&this.props.onChalExpired&&this.props.onChalExpired()},l.execute=function(e){void 0===e&&(e=null);var t=this.state.captchaId,n=this._hcaptcha;if(this.isReady())return e&&"object"!=typeof e&&(e=null),n.execute(t,e)},l.setData=function(e){var t=this.state.captchaId,n=this._hcaptcha;this.isReady()&&(e&&"object"!=typeof e&&(e=null),n.setData(t,e))},l.getResponse=function(){return this._hcaptcha.getResponse(this.state.captchaId)},l.getRespKey=function(){return this._hcaptcha.getRespKey(this.state.captchaId)},l.render=function(){var e=this.state.elementId;return a.createElement("div",{ref:this.ref,id:e})},o}(a.Component),Ba=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"title":"Captcha","name":"kadence/advanced-form-captcha","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string","default":""},"formID":{"type":"string"},"type":{"type":"string","default":"googlev2"},"useKcSettings":{"type":"boolean","default":false},"useKbSettings":{"type":"boolean","default":true},"hideRecaptcha":{"type":"boolean","default":false},"theme":{"type":"string","default":"light"},"size":{"type":"string","default":"normal"},"showRecaptchaNotice":{"type":"boolean","default":false},"recaptchaNotice":{"type":"string","default":""},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"recaptchaSiteKey":{"type":"string","default":"-"},"recaptchaSecretKey":{"type":"string","default":""},"recaptchaLanguage":{"type":"string","default":""},"hCaptchaSiteKey":{"type":"string","default":"-"},"hCaptchaSecretKey":{"type":"string","default":""},"turnstileSiteKey":{"type":"string","default":"-"},"turnstileSecretKey":{"type":"string","default":""}},"supports":{"html":false,"reusable":false,"kbMetadata":true},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-captcha",{...Ba,title:(0,i.__)("Captcha","kadence-blocks"),description:(0,i.__)("Kadence Form Captcha Block","kadence-blocks"),keywords:["captcha","verify","bot"],ancestor:["kadence/advanced-form"],parent:["kadence/advanced-form","kadence/column"],icon:{src:r.captchaIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:s,hideRecaptcha:h,type:f,useKcSettings:v,useKbSettings:k,showRecaptchaNotice:_,recaptchaNotice:E,theme:C,size:S,maxWidth:w,minWidth:T,maxWidthUnit:F,minWidthUnit:O,requiredMessage:I,recaptchaSiteKey:A,recaptchaSecretKey:N,recaptchaLanguage:P,hCaptchaSiteKey:B,hCaptchaSecretKey:D,turnstileSiteKey:M,turnstileSecretKey:R}=e,[V,L]=(0,m.useState)("general"),{previewDevice:W}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(s,o);n!==s&&(e.uniqueID=n,t({uniqueID:n}))}),[]),(0,m.useEffect)((()=>{On()({path:(0,Tn.addQueryArgs)("/wp/v2/settings",{_fields:["kadence_blocks_recaptcha_site_key","kadence_blocks_recaptcha_secret_key","kadence_blocks_recaptcha_language","kadence_blocks_hcaptcha_site_key","kadence_blocks_hcaptcha_secret_key","kadence_blocks_turnstile_site_key","kadence_blocks_turnstile_secret_key","kt_recaptcha"]}),method:"GET"}).then((e=>{Q(e.kadence_blocks_recaptcha_site_key),Y(e.kadence_blocks_recaptcha_secret_key),Z(e.kadence_blocks_recaptcha_language),te(e.kadence_blocks_hcaptcha_site_key),ae(e.kadence_blocks_hcaptcha_secret_key),le(e.kadence_blocks_turnstile_site_key),re(e.kadence_blocks_turnstile_secret_key);try{se(JSON.parse((0,x.get)(e,"kt_recaptcha",{})))}catch(e){se({})}j(!0)}))}),[f]);const z=(0,b.getPreviewSize)(W,w&&w[0]?w[0]:"",w&&w[1]?w[1]:"",w&&w[2]?w[2]:""),q=(0,b.getPreviewSize)(W,T&&T[0]?T[0]:"",T&&T[1]?T[1]:"",T&&T[2]?T[2]:""),U=""!==kadence_blocks_params.hasKadenceCaptcha,H=g()({"kb-adv-form-field":!0}),$=(0,c.useBlockProps)({className:H,style:{maxWidth:""!==z?z+(F||"%"):void 0,minWidth:""!==q?q+(O||"px"):void 0}}),[K,j]=(0,m.useState)(!1),[G,Q]=(0,m.useState)("-"),[J,Y]=(0,m.useState)(""),[X,Z]=(0,m.useState)(""),[ee,te]=(0,m.useState)("-"),[ne,ae]=(0,m.useState)(""),[oe,le]=(0,m.useState)("-"),[ie,re]=(0,m.useState)(""),[ce,se]=(0,m.useState)(!1),[de,ue]=(0,m.useState)(!1),pe=(0,a.createElement)("a",{href:kadence_blocks_params.adminUrl+"options-general.php?page=kadence-recaptcha-settings",target:"_blank",rel:"noreferrer"},(0,i.__)("Modify Kadence Captcha settings","kadence-blocks")),me=v?["googlev2","googlev3","turnstile"][(0,x.get)(ce,"enable_v3",0)]:f,be=v?(0,x.get)(ce,"v3_re_site_key","-"):k?G:A,he=k?J:N,ge=k?X:P,fe=v?(0,x.get)(ce,"v3_re_site_key","-"):k?oe:M,ve=k?ie:R,ke=v?(0,x.get)(ce,"v3_re_site_key","-"):k?ee:B,_e=k?ne:D,ye=v?(0,x.get)(ce,"kt_re_theme","light"):C,Ee=v?(0,x.get)(ce,"kt_re_size","normal"):S,Ce=v?(0,x.get)(ce,"hide_v3_badge",!1):h,Se=v?(0,x.get)(ce,"show_v3_notice",!0):_,xe=v?(0,x.get)(ce,"v3_notice",""):E,we=""!==xe?xe:(0,i.__)("This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply","kadence-blocks"),Te=C+S+ge+be+N,Fe=()=>{ue(!0),"turnstile"===f?new wp.api.models.Settings({kadence_blocks_turnstile_site_key:oe,kadence_blocks_turnstile_secret_key:ie,kadence_blocks_recaptcha_language:X}).save().then((e=>{ue(!1)})):"googlev2"===f||"googlev3"===f?new wp.api.models.Settings({kadence_blocks_recaptcha_site_key:G,kadence_blocks_recaptcha_secret_key:J,kadence_blocks_recaptcha_language:X}).save().then((e=>{ue(!1)})):"hcaptcha"===f&&new wp.api.models.Settings({kadence_blocks_hcaptcha_site_key:ee,kadence_blocks_hcaptcha_secret_key:ne,kadence_blocks_recaptcha_language:X}).save().then((e=>{ue(!1)}))};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...$},(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-date-general",setActiveTab:e=>L(e),activeTab:V,allowedTabs:["general","style","advanced"]}),"general"===V&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{initialOpen:!0,panelName:"kb-adv-form-captcha-controls"},U&&(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Use Kadence Captcha Settings","kadence-blocks"),checked:v,onChange:e=>t({useKcSettings:e}),help:(0,i.__)("Use settings from Kadence Captcha Plugin","kadence-blocks")}),U&&v?pe:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Captcha Type","kadence-blocks"),value:f,options:[{value:"googlev2",label:(0,i.__)("Google V2","kadence-blocks")},{value:"googlev3",label:(0,i.__)("Google V3","kadence-blocks")},{value:"turnstile",label:(0,i.__)("Turnstile","kadence-blocks")},{value:"hcaptcha",label:(0,i.__)("hCaptcha","kadence-blocks")}],onChange:e=>{t({type:e})}}),"turnstile"===f&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.TextControl,{label:(0,i.__)("Turnstile Site Key","kadence-blocks"),value:fe,onChange:e=>k?le(e):t({turnstileSiteKey:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Turnstile Secret Key","kadence-blocks"),value:ve,onChange:e=>k?re(e):t({turnstileSecretKey:e})}),k&&(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)(d.Button,{isPrimary:!0,onClick:()=>Fe(),disabled:""===fe||""===ve},de?(0,i.__)("Saving","kadence-blocks"):(0,i.__)("Save","kadence-blocks")))),("googlev2"===f||"googlev3"===f)&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.TextControl,{label:(0,i.__)("Recaptcha Site Key","kadence-blocks"),value:be,onChange:e=>k?Q(e):t({recaptchaSiteKey:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Recaptcha Secret Key","kadence-blocks"),value:he,onChange:e=>k?Y(e):t({recaptchaSecretKey:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Force Specific Language","kadence-blocks"),value:ge,onChange:e=>k?Z(e):t({recaptchaLanguage:e})}),(0,a.createElement)("p",{className:"kb-small-help"},(0,a.createElement)(d.ExternalLink,{href:"https://developers.google.com/recaptcha/docs/language/"},(0,i.__)("View language codes here","kadence-blocks"))),k&&(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)(d.Button,{isPrimary:!0,onClick:()=>Fe(),disabled:""===be||""===he},de?(0,i.__)("Saving","kadence-blocks"):(0,i.__)("Save","kadence-blocks")))),"hcaptcha"===f&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.TextControl,{label:(0,i.__)("hCaptcha Site Key","kadence-blocks"),value:ke,onChange:e=>k?te(e):t({hCaptchaSiteKey:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("hCaptcha Secret Key","kadence-blocks"),value:_e,onChange:e=>k?ae(e):t({hCaptchaSecretKey:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Force Specific Language","kadence-blocks"),value:ge,onChange:e=>k?Z(e):t({recaptchaLanguage:e})}),k&&(0,a.createElement)("div",{className:"components-base-control"},(0,a.createElement)(d.Button,{isPrimary:!0,onClick:()=>Fe(),disabled:""===ke||""===_e},de?(0,i.__)("Saving","kadence-blocks"):(0,i.__)("Save","kadence-blocks")))),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Use Global Kadence Settings","kadence-blocks"),checked:k,onChange:e=>t({useKbSettings:e}),help:(0,i.__)("Use settings shared for all Kadence Form Captchas","kadence-blocks")})))),"style"===V&&(0,a.createElement)(p.KadencePanelBody,null,"googlev3"===f&&!1===v&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Hide reCAPTCHA badge","kadence-blocks"),checked:h,onChange:e=>t({hideRecaptcha:e}),help:(0,i.__)("Hiding requires that information about recaptcha be added to your form","kadence-blocks")}),h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Add reCAPTCHA notice info to form","kadence-blocks"),checked:_,onChange:e=>t({showRecaptchaNotice:e}),help:(0,i.__)("This will add the required reCAPTCHA version 3 informtion to your form.","kadence-blocks")}),_&&(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Optional - Custom reCaptcha notice","kadence-blocks"),value:E,onChange:e=>t({recaptchaNotice:e}),help:(0,i.__)('If left empty then "This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply" is used.',"kadence-blocks")}))),!0===v&&pe,!1===v&&(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Color Theme","kadence-blocks"),value:C,options:[{label:(0,i.__)("Light","kadence-blocks"),value:"light"},{label:(0,i.__)("Dark","kadence-blocks"),value:"dark"}],onChange:e=>t({theme:e})}),"googlev3"!==f&&(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Size","kadence-blocks"),options:[{label:(0,i.__)("Normal","kadence-blocks"),value:"normal"},{label:(0,i.__)("Compact","kadence-blocks"),value:"compact"}],value:S,onChange:e=>t({size:e})})),"advanced"===V&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-date-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==w&&void 0!==w[0]?w[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==w&&void 0!==w[1]?w[1]:"",void 0!==w&&void 0!==w[2]?w[2]:""]})},tabletValue:void 0!==w&&void 0!==w[1]?w[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",e,void 0!==w&&void 0!==w[2]?w[2]:""]})},mobileValue:void 0!==w&&void 0!==w[2]?w[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",void 0!==w&&void 0!==w[1]?w[1]:"",e]})},min:0,max:"px"===F?2e3:100,step:1,unit:F||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==T&&void 0!==T[0]?T[0]:"",onChange:e=>{t({minWidth:[e,void 0!==T&&void 0!==T[1]?T[1]:"",void 0!==T&&void 0!==T[2]?T[2]:""]})},tabletValue:void 0!==T&&void 0!==T[1]?T[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",e,void 0!==T&&void 0!==T[2]?T[2]:""]})},mobileValue:void 0!==T&&void 0!==T[2]?T[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",void 0!==T&&void 0!==T[1]?T[1]:"",e]})},min:0,max:"px"===O?2e3:100,step:1,unit:O||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})))),(0,a.createElement)("div",{style:{minHeight:"googlev3"!==f?"74px":void 0}},!k||K?(0,a.createElement)(a.Fragment,null,"hcaptcha"===me&&(0,a.createElement)(a.Fragment,null,ke&&(0,a.createElement)(Pa,{reCaptchaCompat:!1,theme:ye,size:Ee,sitekey:ke,onVerify:(e,t)=>null}),!ke&&(0,a.createElement)("div",{className:"preview-captcha  preview-captcha-"+Ee+" preview-captcha-"+ye},(0,i.__)("Please Add API Key","kadence-blocks"))),"googlev2"===me&&(0,a.createElement)(a.Fragment,null,be&&Te&&(0,a.createElement)(Ca,{key:Te,sitekey:be,theme:ye,hl:ge,size:Ee,onChange:()=>null}),(!be||!Te)&&(0,a.createElement)("div",{className:"preview-captcha  preview-captcha-"+Ee+" preview-captcha-"+ye},(0,i.__)("Please Add API Keys","kadence-blocks"))),"googlev3"===me&&(0,a.createElement)(a.Fragment,null,!1===Ce&&(0,a.createElement)("em",null,(0,i.__)("Google V3 reCAPTCHA","kadence-blocks")),Ce&&!Se&&(0,a.createElement)("em",null,(0,i.__)("Placeholder for hidden Google V3 reCaptcha","kadence-blocks")),Ce&&Se&&(0,a.createElement)("span",{style:{fontSize:"11px",color:"#555",lineHeight:"1.2",display:"block",marginBottom:"16px",padding:"10px",background:"#f2f2f2"},className:"kt-recaptcha-branding-string"},we)),"turnstile"===me&&(0,a.createElement)(a.Fragment,null,fe&&(0,a.createElement)(xa(),{theme:ye,size:Ee,sitekey:fe,onVerify:e=>null}),!fe&&(0,a.createElement)("div",{className:"preview-captcha  preview-captcha-"+Ee+" preview-captcha-"+ye},(0,i.__)("Please Add API Key","kadence-blocks")))):(0,a.createElement)("div",{className:"preview-captcha  preview-captcha-"+Ee+" preview-captcha-"+ye},(0,i.__)(" Loading Captcha Settings","kadence-blocks"),(0,a.createElement)(d.Spinner,null))),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const Da=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-checkbox","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"inputName":{"type":"string"},"helpText":{"type":"string","default":""},"options":{"type":"array","default":[{"value":"","label":"","selected":false}]},"inline":{"type":"boolean","default":false},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktfieldconditional":true,"ktdynamic":true,"reusable":false,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-checkbox",{...Da,title:(0,i.__)("Checkbox","kadence-blocks"),description:(0,i.__)("Kadence Form checkbox","kadence-blocks"),keywords:["kadence"],icon:{src:r.checkboxInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,defaultValue:_,options:E,inline:C,helpText:S,ariaDescription:w,maxWidth:T,maxWidthUnit:O,minWidth:I,minWidthUnit:N,defaultParameter:P,placeholder:B,inputName:D,requiredMessage:M,kadenceDynamic:R}=e,[V,L]=(0,m.useState)(0),[W,z]=(0,m.useState)("general"),{previewDevice:q}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const U=(0,b.getPreviewSize)(q,T&&T[0]?T[0]:"",T&&T[1]?T[1]:"",T&&T[2]?T[2]:""),H=(0,b.getPreviewSize)(q,I&&I[0]?I[0]:"",I&&I[1]?I[1]:"",I&&I[2]?I[2]:""),$=g()({"kb-adv-form-field":!0}),K=(0,c.useBlockProps)({className:$,style:{maxWidth:""!==U?U+(O||"%"):void 0,minWidth:""!==H?H+(N||"px"):void 0}}),j=(0,m.useMemo)((()=>void 0!==R&&void 0!==R.defaultValue&&void 0!==R.defaultValue?.enable&&""!==R.defaultValue.enable&&!0===R.defaultValue.enable?R?.defaultValue?.field?"{"+R.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[R,_]),G=(e,n)=>{const a=E.map(((t,a)=>(e===a&&(t={...t,...n}),t)));t({options:a}),L(Math.random())};function Q(e){return()=>{e!==E.length-1&&J(e,e+1)}}function J(e,n){if(!E)return;const a=E[n];E.splice(n,1,E[e]),E.splice(e,1,a),t({options:E})}const Y=e=>{if(1===Math.abs(E.length))return;const n=(0,x.filter)(E,((t,n)=>e!==n));t({options:n})};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...K},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-checkbox",setActiveTab:z,activeTab:W,allowedTabs:["general","advanced"]}),"general"===W&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Options","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-checkbox-options"},(0,a.createElement)("div",{className:"kb-adv-field-options-wrap"},(0,x.times)(E.length,(e=>{return(0,a.createElement)("div",{key:e,className:"kb-adv-field-option"},(0,a.createElement)(d.TextControl,{className:"kb-option-text-control",label:(0,i.__)("Option","kadence-blocks")+" "+(e+1)+" "+(0,i.__)("label","kadence-blocks"),placeholder:(0,i.__)("Option","kadence-blocks"),value:void 0!==E[e].label?E[e].label:"",onChange:t=>G(e,{label:t})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Option","kadence-blocks")+" "+(e+1)+" "+(0,i.__)("value","kadence-blocks"),placeholder:E[e].label,value:void 0!==E[e].value?E[e].value:"",onChange:t=>G(e,{value:t})}),(0,a.createElement)("div",{className:"kadence-blocks-list-item__control-menu"},(0,a.createElement)(d.Button,{icon:"arrow-up",onClick:0===e?void 0:(t=e,()=>{0!==t&&J(t,t-1)}),className:"kadence-blocks-list-item__move-up",label:(0,i.__)("Move Item Up","kadence-blocks"),"aria-disabled":0===e,disabled:0===e}),(0,a.createElement)(d.Button,{icon:"arrow-down",onClick:e+1===E.length?void 0:Q(e),className:"kadence-blocks-list-item__move-down",label:(0,i.__)("Move Item Down","kadence-blocks"),"aria-disabled":e+1===E.length,disabled:e+1===E.length}),(0,a.createElement)(d.Button,{icon:"no-alt",onClick:()=>Y(e),className:"kadence-blocks-list-item__remove",label:(0,i.__)("Remove Item","kadence-blocks"),disabled:1===E.length})));var t}))),(0,a.createElement)(d.Button,{className:"kb-add-option",variant:"primary",icon:Qn,onClick:()=>{const e=E;e.push({value:"",label:""}),t({options:e}),L(Math.random())}},(0,i.__)("Add Option","kadence-blocks")),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Display inline?","kadence-blocks"),checked:C,onChange:e=>t({inline:e})})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-checkbox-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:S,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Placeholder","kadence-blocks"),value:B,onChange:e=>t({placeholder:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:_,preview:j,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===W&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-checkbox-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==T&&void 0!==T[0]?T[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==T&&void 0!==T[1]?T[1]:"",void 0!==T&&void 0!==T[2]?T[2]:""]})},tabletValue:void 0!==T&&void 0!==T[1]?T[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",e,void 0!==T&&void 0!==T[2]?T[2]:""]})},mobileValue:void 0!==T&&void 0!==T[2]?T[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",void 0!==T&&void 0!==T[1]?T[1]:"",e]})},min:0,max:"px"===O?2e3:100,step:1,unit:O||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==I&&void 0!==I[0]?I[0]:"",onChange:e=>{t({minWidth:[e,void 0!==I&&void 0!==I[1]?I[1]:"",void 0!==I&&void 0!==I[2]?I[2]:""]})},tabletValue:void 0!==I&&void 0!==I[1]?I[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==I&&void 0!==I[0]?I[0]:"",e,void 0!==I&&void 0!==I[2]?I[2]:""]})},mobileValue:void 0!==I&&void 0!==I[2]?I[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==I&&void 0!==I[0]?I[0]:"",void 0!==I&&void 0!==I[1]?I[1]:"",e]})},min:0,max:"px"===N?2e3:100,step:1,unit:N||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-checkbox-extra-settings"},(0,a.createElement)(F,{value:D,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:w,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:M,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:P,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),n?(0,a.createElement)("div",{className:"kb-form-field kb-form-multi"},(0,x.times)(E.length,(e=>(0,a.createElement)("div",{className:"inline-option-add-item",key:e},(0,a.createElement)("input",{key:"cb"+e,type:"checkbox",name:"kb_field",className:"kb-sub-field kb-checkbox-style",onChange:t=>{return n=e,t.target.value,void G(n,{selected:!E[n].selected});var n},checked:E[e].selected}),(0,a.createElement)("input",{key:"text"+e,type:"text",value:E[e].label,className:"ignore-field-styles",onChange:t=>G(e,{label:t.target.value})}),(0,a.createElement)(d.Button,{onClick:()=>Y(e)},(0,a.createElement)("span",{className:"dashicons dashicons-trash"}))))),(0,a.createElement)(d.Button,{variant:"primary",icon:Qn,className:"kb-form-multi__add-option",onClick:()=>{const e=E;e.push({value:"",label:""}),t({options:e}),L(Math.random())}},(0,i.__)("Add Option","kadence-blocks"))):(0,a.createElement)("div",{className:!0===C?"kb-radio-check-inline":""},(0,x.times)(E.length,(e=>(0,a.createElement)("div",{className:"kb-radio-check-item",key:e},(0,a.createElement)("input",{type:"checkbox",name:"kb_field",className:"kb-sub-field kb-checkbox-style",checked:E[e].selected}),(0,a.createElement)("label",{htmlFor:"kb_field"},E[e].label))))),S&&(0,a.createElement)("span",{className:"kb-form-field-help kb-adv-form-help"},S)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const Ma=window.wp.date,Ra=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-date","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"helpText":{"type":"string"},"inputName":{"type":"string"},"auto":{"type":"string"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktdynamic":true,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-date",{...Ra,title:(0,i.__)("Date","kadence-blocks"),description:(0,i.__)("Kadence Form date","kadence-blocks"),keywords:["kadence"],icon:{src:r.dateInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,defaultValue:_,helpText:E,ariaDescription:C,maxWidth:S,maxWidthUnit:x,minWidth:w,minWidthUnit:T,defaultParameter:O,auto:I,inputName:N,requiredMessage:P,kadenceDynamic:B}=e,[D,M]=(0,m.useState)("general"),{previewDevice:R}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const V=(0,b.getPreviewSize)(R,S&&S[0]?S[0]:"",S&&S[1]?S[1]:"",S&&S[2]?S[2]:""),L=(0,b.getPreviewSize)(R,w&&w[0]?w[0]:"",w&&w[1]?w[1]:"",w&&w[2]?w[2]:""),W=g()({"kb-adv-form-field":!0,"kb-adv-form-infield-type-input":!0}),z=(0,c.useBlockProps)({className:W,style:{maxWidth:""!==V?V+(x||"%"):void 0,minWidth:""!==L?L+(T||"px"):void 0}}),q=(0,m.useMemo)((()=>"today"===_?(0,Ma.dateI18n)("Y-m-d",new Date):void 0!==B&&void 0!==B.defaultValue&&void 0!==B.defaultValue?.enable&&""!==B.defaultValue.enable&&!0===B.defaultValue.enable?B?.defaultValue?.field?"{"+B.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[B,_]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...z},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-date",setActiveTab:M,activeTab:D,allowedTabs:["general","advanced"]}),"general"===D&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-date-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:E,onChange:e=>t({helpText:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:_,preview:q,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}),(0,a.createElement)("em",null,(0,i.__)('Set to "today" to fill with the current date',"kadence-blocks")))),"advanced"===D&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-date-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==S&&void 0!==S[0]?S[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==S&&void 0!==S[1]?S[1]:"",void 0!==S&&void 0!==S[2]?S[2]:""]})},tabletValue:void 0!==S&&void 0!==S[1]?S[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",e,void 0!==S&&void 0!==S[2]?S[2]:""]})},mobileValue:void 0!==S&&void 0!==S[2]?S[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",void 0!==S&&void 0!==S[1]?S[1]:"",e]})},min:0,max:"px"===x?2e3:100,step:1,unit:x||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==w&&void 0!==w[0]?w[0]:"",onChange:e=>{t({minWidth:[e,void 0!==w&&void 0!==w[1]?w[1]:"",void 0!==w&&void 0!==w[2]?w[2]:""]})},tabletValue:void 0!==w&&void 0!==w[1]?w[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",e,void 0!==w&&void 0!==w[2]?w[2]:""]})},mobileValue:void 0!==w&&void 0!==w[2]?w[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",void 0!==w&&void 0!==w[1]?w[1]:"",e]})},min:0,max:"px"===T?2e3:100,step:1,unit:T||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-date-extra-settings"},(0,a.createElement)(F,{value:N,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Field Auto Fill","kadence-blocks"),value:I,options:[{value:"",label:(0,i.__)("Default","kadence-blocks")},{value:"name",label:(0,i.__)("Name","kadence-blocks")},{value:"given-name",label:(0,i.__)("First Name","kadence-blocks")},{value:"family-name",label:(0,i.__)("Last Name","kadence-blocks")},{value:"email",label:(0,i.__)("Email","kadence-blocks")},{value:"organization",label:(0,i.__)("Organization","kadence-blocks")},{value:"street-address",label:(0,i.__)("Street Address","kadence-blocks")},{value:"address-line1",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"address-line2",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"country-name",label:(0,i.__)("Country Name","kadence-blocks")},{value:"postal-code",label:(0,i.__)("Postal Code","kadence-blocks")},{value:"tel",label:(0,i.__)("Telephone","kadence-blocks")},{value:"off",label:(0,i.__)("Off","kadence-blocks")}],onChange:e=>t({auto:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:C,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:P,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:O,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("input",{type:"date",className:"kb-field",value:q,onChange:e=>!1}),E&&(0,a.createElement)("span",{className:"kb-adv-form-help"},E)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const Va=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-email","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"placeholder":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"helpText":{"type":"string","default":""},"inputName":{"type":"string"},"auto":{"type":"string"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktdynamic":true,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-email",{...Va,icon:{src:r.emailInputIcon},title:(0,i.__)("Email Field","kadence-blocks"),description:(0,i.__)("Kadence Form email input field","kadence-blocks"),keywords:["kadence"],edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,defaultValue:_,helpText:E,ariaDescription:C,maxWidth:S,maxWidthUnit:x,minWidth:w,minWidthUnit:T,defaultParameter:O,placeholder:I,auto:N,inputName:P,requiredMessage:B,kadenceDynamic:D}=e,[M,R]=(0,m.useState)("general"),{previewDevice:V}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const L=(0,b.getPreviewSize)(V,S&&S[0]?S[0]:"",S&&S[1]?S[1]:"",S&&S[2]?S[2]:""),W=(0,b.getPreviewSize)(V,w&&w[0]?w[0]:"",w&&w[1]?w[1]:"",w&&w[2]?w[2]:""),z=g()({"kb-adv-form-field":!0,"kb-adv-form-text-type-input":!0,"kb-adv-form-infield-type-input":!0,"kb-form-field-focus":n}),q=(0,c.useBlockProps)({className:z,style:{maxWidth:""!==L?L+(x||"%"):void 0,minWidth:""!==W?W+(T||"px"):void 0}}),U=(0,m.useMemo)((()=>void 0!==D&&void 0!==D.defaultValue&&void 0!==D.defaultValue?.enable&&""!==D.defaultValue.enable&&!0===D.defaultValue.enable?D?.defaultValue?.field?"{"+D.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[D,_]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{...q},(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-email",setActiveTab:R,activeTab:M,allowedTabs:["general","advanced"]}),"general"===M&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-email-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:E,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Placeholder","kadence-blocks"),value:I,onChange:e=>t({placeholder:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:_,preview:U,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===M&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-email-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==S&&void 0!==S[0]?S[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==S&&void 0!==S[1]?S[1]:"",void 0!==S&&void 0!==S[2]?S[2]:""]})},tabletValue:void 0!==S&&void 0!==S[1]?S[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",e,void 0!==S&&void 0!==S[2]?S[2]:""]})},mobileValue:void 0!==S&&void 0!==S[2]?S[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",void 0!==S&&void 0!==S[1]?S[1]:"",e]})},min:0,max:"px"===x?2e3:100,step:1,unit:x||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==w&&void 0!==w[0]?w[0]:"",onChange:e=>{t({minWidth:[e,void 0!==w&&void 0!==w[1]?w[1]:"",void 0!==w&&void 0!==w[2]?w[2]:""]})},tabletValue:void 0!==w&&void 0!==w[1]?w[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",e,void 0!==w&&void 0!==w[2]?w[2]:""]})},mobileValue:void 0!==w&&void 0!==w[2]?w[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",void 0!==w&&void 0!==w[1]?w[1]:"",e]})},min:0,max:"px"===T?2e3:100,step:1,unit:T||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-email-extra-settings"},(0,a.createElement)(F,{value:P,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Field Auto Fill","kadence-blocks"),value:N,options:[{value:"",label:(0,i.__)("Default","kadence-blocks")},{value:"name",label:(0,i.__)("Name","kadence-blocks")},{value:"given-name",label:(0,i.__)("First Name","kadence-blocks")},{value:"family-name",label:(0,i.__)("Last Name","kadence-blocks")},{value:"email",label:(0,i.__)("Email","kadence-blocks")},{value:"organization",label:(0,i.__)("Organization","kadence-blocks")},{value:"street-address",label:(0,i.__)("Street Address","kadence-blocks")},{value:"address-line1",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"address-line2",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"country-name",label:(0,i.__)("Country Name","kadence-blocks")},{value:"postal-code",label:(0,i.__)("Postal Code","kadence-blocks")},{value:"tel",label:(0,i.__)("Telephone","kadence-blocks")},{value:"off",label:(0,i.__)("Off","kadence-blocks")}],onChange:e=>t({auto:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:C,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:B,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:O,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("input",{type:"email",className:"kb-field",value:U,placeholder:I,onChange:e=>!1}),E&&(0,a.createElement)("span",{className:"kb-adv-form-help"},E)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const La=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-file","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"requiredMessage":{"type":"string"},"multiple":{"type":"boolean","default":false},"multipleLimit":{"type":"number","default":5},"allowedTypes":{"type":"array","default":["image"]},"maxSizeMb":{"type":"number","default":10},"ariaDescription":{"type":"string","default":""},"helpText":{"type":"string","default":""},"anchor":{"type":"string"},"inputName":{"type":"string"}},"supports":{"ktfieldconditional":true},"parent":["kadence/advanced-form"]}');(0,l.registerBlockType)("kadence/advanced-form-file",{...La,title:(0,i.__)("File","kadence-blocks"),description:(0,i.__)("Kadence Form file upload","kadence-blocks"),keywords:["kadence"],icon:{src:r.fileInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,maxSizeMb:_,allowedTypes:E,helpText:C,ariaDescription:S,maxWidth:w,maxWidthUnit:T,minWidth:O,minWidthUnit:I,inputName:N,requiredMessage:P,multiple:B,multipleLimit:D}=e,M=kadence_blocks_params.wp_max_upload_size,R=function(e){if(0===e)return 0;return parseFloat((e/Math.pow(1024,2)).toFixed(0))}(M),V=function(e){if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(0))+" "+["Bytes","KB","MB","GB","TB"][t]}(M),[L,W]=(0,m.useState)("general"),{previewDevice:z}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]),(0,m.useEffect)((()=>{_>R&&t({maxSizeMb:R})}),[R]);const q=(0,b.getPreviewSize)(z,w&&w[0]?w[0]:"",w&&w[1]?w[1]:"",w&&w[2]?w[2]:""),U=(0,b.getPreviewSize)(z,O&&O[0]?O[0]:"",O&&O[1]?O[1]:"",O&&O[2]?O[2]:""),H=g()({"kb-adv-form-field":!0,"kb-adv-form-infield-type-input":!0}),$=(0,c.useBlockProps)({className:H,style:{maxWidth:""!==q?q+(T||"%"):void 0,minWidth:""!==U?U+(I||"px"):void 0}}),K=e=>{let n=[];n=E.includes(e)?(0,x.without)(E,e):[...E,e],t({allowedTypes:n})};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...$},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-file",setActiveTab:W,activeTab:L,allowedTabs:["general","advanced"]}),"general"===L&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-text-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:C,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Allow Multiple","kadence-blocks"),checked:B,help:(0,i.__)("This will allow users to upload multiple files","kadence-blocks"),onChange:e=>t({multiple:e})}),B&&(0,a.createElement)(d.RangeControl,{label:(0,i.__)("Maxim amount of files per form submission","kadence-blocks"),value:D||5,onChange:e=>t({multipleLimit:e}),min:0,max:30})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("File Options","kadence-blocks")},(0,a.createElement)(d.SelectControl,{label:(0,i.__)("File Size Limit","kadence-blocks"),value:_,onChange:e=>{t({maxSizeMb:parseInt(e)})},options:(()=>{const e=[];for(let t=1;5*t<=Math.min(25,R);t++)e.push({value:5*t,label:5*t+" MB"});return e})(),max:R,help:(0,i.__)("WordPress max upload size: ","kadence-blocks")+" "+V}),(0,a.createElement)("h2",null,(0,i.__)("Allowed File Types","kadence-blocks")),(0,a.createElement)(d.CheckboxControl,{label:(0,i.__)("Images","kadence-blocks"),help:"jpeg, jpg, gif, and png",checked:E.includes("image"),onChange:e=>K("image")}),(0,a.createElement)(d.CheckboxControl,{label:(0,i.__)("PDF","kadence-blocks"),checked:E.includes("pdf"),onChange:e=>K("pdf")}),(0,a.createElement)(d.CheckboxControl,{label:(0,i.__)("Audio","kadence-blocks"),help:"mp3, wav, ogg, wma, m4a, mid, mka",checked:E.includes("audio"),onChange:e=>K("audio")}),(0,a.createElement)(d.CheckboxControl,{label:(0,i.__)("Video","kadence-blocks"),help:"mp4, mpg, mpeg, mpe, m4v, avi, mov",checked:E.includes("video"),onChange:e=>K("video")}),(0,a.createElement)(d.CheckboxControl,{label:(0,i.__)("Documents","kadence-blocks"),help:"csv, doc, ppt, docx, ody, odp, ods, txt, rtf, xls, xlsx, odt, ott",checked:E.includes("document"),onChange:e=>K("document")}),(0,a.createElement)(d.CheckboxControl,{label:(0,i.__)("Zip Archive","kadence-blocks"),checked:E.includes("archive"),onChange:e=>K("archive")}))),"advanced"===L&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-text-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==w&&void 0!==w[0]?w[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==w&&void 0!==w[1]?w[1]:"",void 0!==w&&void 0!==w[2]?w[2]:""]})},tabletValue:void 0!==w&&void 0!==w[1]?w[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",e,void 0!==w&&void 0!==w[2]?w[2]:""]})},mobileValue:void 0!==w&&void 0!==w[2]?w[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",void 0!==w&&void 0!==w[1]?w[1]:"",e]})},min:0,max:"px"===T?2e3:100,step:1,unit:T||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==O&&void 0!==O[0]?O[0]:"",onChange:e=>{t({minWidth:[e,void 0!==O&&void 0!==O[1]?O[1]:"",void 0!==O&&void 0!==O[2]?O[2]:""]})},tabletValue:void 0!==O&&void 0!==O[1]?O[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==O&&void 0!==O[0]?O[0]:"",e,void 0!==O&&void 0!==O[2]?O[2]:""]})},mobileValue:void 0!==O&&void 0!==O[2]?O[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==O&&void 0!==O[0]?O[0]:"",void 0!==O&&void 0!==O[1]?O[1]:"",e]})},min:0,max:"px"===I?2e3:100,step:1,unit:I||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-text-extra-settings"},(0,a.createElement)(F,{value:N,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:S,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:P,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")})))),(0,a.createElement)("div",{className:"kb-form-field-container"},(0,a.createElement)("div",{className:"kb-form-field"},(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("input",{type:"file",multiple:!!B}),C&&(0,a.createElement)("span",{className:"kb-adv-form-help"},C))),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const Wa=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-hidden","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"inputName":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"reusable":false,"ktdynamic":true,"ktfieldconditional":true,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-hidden",{...Wa,title:(0,i.__)("Hidden Field","kadence-blocks"),description:(0,i.__)("Kadence Form hidden field","kadence-blocks"),keywords:["kadence"],icon:{src:r.hiddenInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:s,label:b,defaultValue:h,defaultParameter:f,inputName:v,kadenceDynamic:k}=e,[_,E]=(0,m.useState)("general"),{previewDevice:C}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(s,o);n!==s&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const S=g()({"kb-adv-form-field":!0}),x=(0,c.useBlockProps)({className:S}),w=(0,m.useMemo)((()=>void 0!==k&&void 0!==k.defaultValue&&void 0!==k.defaultValue?.enable&&""!==k.defaultValue.enable&&!0===k.defaultValue.enable?k?.defaultValue?.field?"{"+k.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[k,h]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...x},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-hidden",setActiveTab:E,activeTab:_,allowedTabs:["general","advanced"]}),"general"===_&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-hidden-controls"},(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:b,onChange:e=>t({label:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:h,preview:w,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===_&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-hidden-extra-settings"},(0,a.createElement)(F,{value:v,uniqueID:s,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:f,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,""===b?(0,a.createElement)("em",{className:"kb-hidden-field-label"},"Hidden Field"):(0,a.createElement)("em",{className:"kb-hidden-field-label"},"Hidden Field: ",b)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const za=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-number","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"placeholder":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"allowDecimals":{"type":"boolean","default":false},"maxValue":{"type":"number","default":""},"minValue":{"type":"number","default":""},"ariaDescription":{"type":"string","default":""},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"helpText":{"type":"string","default":""},"inputName":{"type":"string"},"auto":{"type":"string"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktdynamic":true,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-number",{...za,title:(0,i.__)("Number","kadence-blocks"),description:(0,i.__)("Kadence Form number input","kadence-blocks"),keywords:["kadence"],icon:{src:r.numberInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,defaultValue:_,helpText:E,ariaDescription:C,allowDecimals:S,maxValue:x,minValue:w,maxWidth:T,maxWidthUnit:O,minWidth:I,minWidthUnit:N,defaultParameter:P,placeholder:B,auto:D,inputName:M,requiredMessage:R,kadenceDynamic:V}=e,[L,W]=(0,m.useState)("general"),{previewDevice:z}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const q=(0,b.getPreviewSize)(z,T&&T[0]?T[0]:"",T&&T[1]?T[1]:"",T&&T[2]?T[2]:""),U=(0,b.getPreviewSize)(z,I&&I[0]?I[0]:"",I&&I[1]?I[1]:"",I&&I[2]?I[2]:""),H=g()({"kb-adv-form-field":!0,"kb-adv-form-text-type-input":!0,"kb-adv-form-infield-type-input":!0,"kb-form-field-focus":n}),$=(0,c.useBlockProps)({className:H,style:{maxWidth:""!==q?q+(O||"%"):void 0,minWidth:""!==U?U+(N||"px"):void 0}}),K=(0,m.useMemo)((()=>void 0!==V&&void 0!==V.defaultValue&&void 0!==V.defaultValue?.enable&&""!==V.defaultValue.enable&&!0===V.defaultValue.enable?V?.defaultValue?.field?"{"+V.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[V,_]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...$},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-number",setActiveTab:W,activeTab:L,allowedTabs:["general","advanced"]}),"general"===L&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-number-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:E,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Placeholder","kadence-blocks"),value:B,onChange:e=>t({placeholder:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:_,preview:K,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Allow decimal numbers?","kadence-blocks"),checked:S,onChange:e=>t({allowDecimals:e})}),(0,a.createElement)(d.__experimentalNumberControl,{label:(0,i.__)("Maximum Value","kadence-blocks"),value:x,onChange:e=>t({maxValue:parseInt(e)})}),(0,a.createElement)(d.__experimentalNumberControl,{label:(0,i.__)("Minimum Value","kadence-blocks"),value:w,onChange:e=>t({minValue:parseInt(e)})}))),"advanced"===L&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-number-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==T&&void 0!==T[0]?T[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==T&&void 0!==T[1]?T[1]:"",void 0!==T&&void 0!==T[2]?T[2]:""]})},tabletValue:void 0!==T&&void 0!==T[1]?T[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",e,void 0!==T&&void 0!==T[2]?T[2]:""]})},mobileValue:void 0!==T&&void 0!==T[2]?T[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",void 0!==T&&void 0!==T[1]?T[1]:"",e]})},min:0,max:"px"===O?2e3:100,step:1,unit:O||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==I&&void 0!==I[0]?I[0]:"",onChange:e=>{t({minWidth:[e,void 0!==I&&void 0!==I[1]?I[1]:"",void 0!==I&&void 0!==I[2]?I[2]:""]})},tabletValue:void 0!==I&&void 0!==I[1]?I[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==I&&void 0!==I[0]?I[0]:"",e,void 0!==I&&void 0!==I[2]?I[2]:""]})},mobileValue:void 0!==I&&void 0!==I[2]?I[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==I&&void 0!==I[0]?I[0]:"",void 0!==I&&void 0!==I[1]?I[1]:"",e]})},min:0,max:"px"===N?2e3:100,step:1,unit:N||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-number-extra-settings"},(0,a.createElement)(F,{value:M,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Field Auto Fill","kadence-blocks"),value:D,options:[{value:"",label:(0,i.__)("Default","kadence-blocks")},{value:"name",label:(0,i.__)("Name","kadence-blocks")},{value:"given-name",label:(0,i.__)("First Name","kadence-blocks")},{value:"family-name",label:(0,i.__)("Last Name","kadence-blocks")},{value:"email",label:(0,i.__)("Email","kadence-blocks")},{value:"organization",label:(0,i.__)("Organization","kadence-blocks")},{value:"street-address",label:(0,i.__)("Street Address","kadence-blocks")},{value:"address-line1",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"address-line2",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"country-name",label:(0,i.__)("Country Name","kadence-blocks")},{value:"postal-code",label:(0,i.__)("Postal Code","kadence-blocks")},{value:"tel",label:(0,i.__)("Telephone","kadence-blocks")},{value:"off",label:(0,i.__)("Off","kadence-blocks")}],onChange:e=>t({auto:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:C,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:R,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:P,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("input",{type:"number",className:"kb-field",value:K,placeholder:B,min:w,max:x,onChange:e=>!1}),E&&(0,a.createElement)("span",{className:"kb-adv-form-help"},E)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const qa=(window.wp.blob,window.wp.notices,{from:[{type:"block",blocks:["kadence/advanced-form-checkbox","kadence/advanced-form-select"],transform:e=>(0,l.createBlock)("kadence/advanced-form-radio",e)}],to:[{type:"block",blocks:["kadence/advanced-form-radio"],transform:e=>(0,l.createBlock)("kadence/advanced-form-checkbox",e)},{type:"block",blocks:["kadence/advanced-form-radio"],transform:e=>(0,l.createBlock)("kadence/advanced-form-select",e)}]}),Ua=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-radio","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"placeholder":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"helpText":{"type":"string","default":""},"options":{"type":"array","default":[{"value":"","label":"","selected":false}]},"inline":{"type":"boolean","default":false},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"inputName":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"ktdynamic":true,"kbContentLabel":"label"},"parent":["kadence/advanced-form"]}');(0,l.registerBlockType)("kadence/advanced-form-radio",{...Ua,title:(0,i.__)("Radio","kadence-blocks"),description:(0,i.__)("Kadence Form radio input","kadence-blocks"),keywords:["kadence"],icon:{src:r.radioInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,options:_,inline:E,defaultValue:C,helpText:S,ariaDescription:w,maxWidth:T,maxWidthUnit:O,minWidth:I,minWidthUnit:A,defaultParameter:N,placeholder:P,auto:B,inputName:D,requiredMessage:M,kadenceDynamic:R}=e,[V,L]=(0,m.useState)(0),[W,z]=(0,m.useState)("general"),{previewDevice:q}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const U=(0,b.getPreviewSize)(q,T&&T[0]?T[0]:"",T&&T[1]?T[1]:"",T&&T[2]?T[2]:""),H=(0,b.getPreviewSize)(q,I&&I[0]?I[0]:"",I&&I[1]?I[1]:"",I&&I[2]?I[2]:""),$=g()({"kb-adv-form-field":!0}),K=(0,c.useBlockProps)({className:$,style:{maxWidth:""!==U?U+(O||"%"):void 0,minWidth:""!==H?H+(A||"px"):void 0}}),j=(0,m.useMemo)((()=>void 0!==R&&void 0!==R.defaultValue&&void 0!==R.defaultValue?.enable&&""!==R.defaultValue.enable&&!0===R.defaultValue.enable?R?.defaultValue?.field?"{"+R.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[R,C]),G=(e,n)=>{if(!_)return;const a=_[n];_.splice(n,1,_[e]),_.splice(e,1,a),t({options:_}),L(Math.random())},Q=e=>{if(1===Math.abs(_.length))return;const n=(0,x.filter)(_,((t,n)=>e!==n));t({options:n})},J=(e,n)=>{const a=_.map(((t,a)=>(e===a&&(t={...t,...n}),t)));t({options:a})};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...K},(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-radio",setActiveTab:z,activeTab:W,allowedTabs:["general","advanced"]}),"general"===W&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Radio Options","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-radio-options"},(0,a.createElement)("div",{className:"kb-adv-field-options-wrap"},(0,x.times)(_.length,(e=>(0,a.createElement)("div",{key:e,className:"kb-adv-field-option"},(0,a.createElement)(d.TextControl,{className:"kb-option-text-control",label:(0,i.__)("Option","kadence-blocks")+" "+(e+1)+" "+(0,i.__)("label","kadence-blocks"),placeholder:(0,i.__)("Option","kadence-blocks"),value:void 0!==_[e].label?_[e].label:"",onChange:t=>J(e,{label:t})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Option","kadence-blocks")+" "+(e+1)+" "+(0,i.__)("value","kadence-blocks"),placeholder:_[e].label,value:void 0!==_[e].value?_[e].value:"",onChange:t=>J(e,{value:t})}),(0,a.createElement)("div",{className:"kadence-blocks-list-item__control-menu"},(0,a.createElement)(d.Button,{icon:"arrow-up",onClick:()=>{return 0===e?void 0:void(0!==(t=e)&&G(t,t-1));var t},className:"kadence-blocks-list-item__move-up",label:(0,i.__)("Move Item Up","kadence-blocks"),"aria-disabled":0===e,disabled:0===e}),(0,a.createElement)(d.Button,{icon:"arrow-down",onClick:()=>{return e+1===_.length?void 0:void((t=e)!==_.length-1&&G(t,t+1));var t},className:"kadence-blocks-list-item__move-down",label:(0,i.__)("Move Item Down","kadence-blocks"),"aria-disabled":e+1===_.length,disabled:e+1===_.length}),(0,a.createElement)(d.Button,{icon:"no-alt",onClick:()=>Q(e),className:"kadence-blocks-list-item__remove",label:(0,i.__)("Remove Item","kadence-blocks"),disabled:1===_.length})))))),(0,a.createElement)(d.Button,{className:"kb-add-option",variant:"primary",icon:Qn,onClick:()=>{const e=_;e.push({value:"",label:""}),t({options:e}),L(Math.random())}},(0,i.__)("Add Option","kadence-blocks")),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Display inline?","kadence-blocks"),checked:E,onChange:e=>t({inline:e})})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-radio-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:S,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Placeholder","kadence-blocks"),value:P,onChange:e=>t({placeholder:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:C,preview:j,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===W&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-radui-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==T&&void 0!==T[0]?T[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==T&&void 0!==T[1]?T[1]:"",void 0!==T&&void 0!==T[2]?T[2]:""]})},tabletValue:void 0!==T&&void 0!==T[1]?T[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",e,void 0!==T&&void 0!==T[2]?T[2]:""]})},mobileValue:void 0!==T&&void 0!==T[2]?T[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",void 0!==T&&void 0!==T[1]?T[1]:"",e]})},min:0,max:"px"===O?2e3:100,step:1,unit:O||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==I&&void 0!==I[0]?I[0]:"",onChange:e=>{t({minWidth:[e,void 0!==I&&void 0!==I[1]?I[1]:"",void 0!==I&&void 0!==I[2]?I[2]:""]})},tabletValue:void 0!==I&&void 0!==I[1]?I[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==I&&void 0!==I[0]?I[0]:"",e,void 0!==I&&void 0!==I[2]?I[2]:""]})},mobileValue:void 0!==I&&void 0!==I[2]?I[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==I&&void 0!==I[0]?I[0]:"",void 0!==I&&void 0!==I[1]?I[1]:"",e]})},min:0,max:"px"===A?2e3:100,step:1,unit:A||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-radio-extra-settings"},(0,a.createElement)(F,{value:D,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Field Auto Fill","kadence-blocks"),value:B,options:[{value:"",label:(0,i.__)("Default","kadence-blocks")},{value:"name",label:(0,i.__)("Name","kadence-blocks")},{value:"given-name",label:(0,i.__)("First Name","kadence-blocks")},{value:"family-name",label:(0,i.__)("Last Name","kadence-blocks")},{value:"email",label:(0,i.__)("Email","kadence-blocks")},{value:"organization",label:(0,i.__)("Organization","kadence-blocks")},{value:"street-address",label:(0,i.__)("Street Address","kadence-blocks")},{value:"address-line1",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"address-line2",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"country-name",label:(0,i.__)("Country Name","kadence-blocks")},{value:"postal-code",label:(0,i.__)("Postal Code","kadence-blocks")},{value:"tel",label:(0,i.__)("Telephone","kadence-blocks")},{value:"off",label:(0,i.__)("Off","kadence-blocks")}],onChange:e=>t({auto:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:w,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:M,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:N,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),n?(0,a.createElement)("div",{className:"kb-form-multi"},(0,x.times)(_.length,(e=>(0,a.createElement)("div",{className:"inline-option-add-item",key:e},(0,a.createElement)("input",{type:"radio",className:"kb-sub-field kb-checkbox-style",onClick:n=>{(e=>{const n=_[e].selected;(()=>{const e=_;e.forEach((function(e,t){e.selected=!1})),t({options:e})})(),J(e,{selected:!n})})(e,n.target.value)},checked:_[e].selected}),(0,a.createElement)("input",{key:"text"+e,type:"text",value:_[e].label,className:"ignore-field-styles",onChange:t=>J(e,{label:t.target.value})}),(0,a.createElement)(d.Button,{onClick:()=>Q(e)},(0,a.createElement)("span",{className:"dashicon dashicons dashicons-trash"}))))),(0,a.createElement)(d.Button,{variant:"primary",icon:Qn,className:"kb-form-multi__add-option",onClick:()=>{const e=_;e.push({value:"",label:""}),t({options:e}),L(Math.random())}},(0,i.__)("Add Option","kadence-blocks"))):(0,a.createElement)("div",{className:!0===E?"kb-radio-check-inline":""},(0,x.times)(_.length,(e=>(0,a.createElement)("div",{key:e,className:"kb-radio-check-item"},(0,a.createElement)("input",{type:"radio",className:"kb-sub-field kb-checkbox-style",value:_[e].value||_[e].label,onChange:e=>!1}),(0,a.createElement)("label",{htmlFor:"kb_field"},_[e].label))))),S&&(0,a.createElement)("span",{className:"kb-form-field-help"},S)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},transforms:qa,save:()=>null});const Ha=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-select","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"placeholder":{"type":"string"},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"helpText":{"type":"string","default":""},"inputName":{"type":"string"},"options":{"type":"array","default":[{"value":"","label":""}]},"multiSelect":{"type":"boolean","default":false},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktdynamic":true,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-select",{...Ha,title:(0,i.__)("Select","kadence-blocks"),
/* translators: block description */
description:(0,i.__)("Kadence Form select input","kadence-blocks"),keywords:["kadence"],parent:["kadence/advanced-form"],icon:{src:r.selectInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,placeholder:_,options:E,multiSelect:C,defaultValue:S,helpText:w,ariaDescription:T,maxWidth:O,maxWidthUnit:I,minWidth:N,minWidthUnit:P,defaultParameter:B,inputName:D,requiredMessage:M,kadenceDynamic:R}=e,[V,L]=(0,m.useState)(0);function W(e){return()=>{e!==E.length-1&&z(e,e+1)}}function z(e,n){if(!E)return;const a=E[n];E.splice(n,1,E[e]),E.splice(e,1,a),t({options:E}),L(Math.random())}const q=e=>{if(1===Math.abs(E.length))return;const n=(0,x.filter)(E,((t,n)=>e!==n));t({options:n})},U=(e,n)=>{const a=E.map(((t,a)=>(e===a&&(t={...t,...n}),t)));t({options:a})},H=e=>{if(""!==S&&(0,x.get)(e,"value","")===S)return!0},[$,K]=(0,m.useState)("general"),{previewDevice:j}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const G=(0,b.getPreviewSize)(j,O&&O[0]?O[0]:"",O&&O[1]?O[1]:"",O&&O[2]?O[2]:""),Q=(0,b.getPreviewSize)(j,N&&N[0]?N[0]:"",N&&N[1]?N[1]:"",N&&N[2]?N[2]:""),J=g()({"kb-adv-form-field":!0,"kb-adv-form-infield-type-input":!0}),Y=(0,c.useBlockProps)({className:J,style:{maxWidth:""!==G?G+(I||"%"):void 0,minWidth:""!==Q?Q+(P||"px"):void 0}}),X=(0,m.useMemo)((()=>void 0!==R&&void 0!==R.defaultValue&&void 0!==R.defaultValue?.enable&&""!==R.defaultValue.enable&&!0===R.defaultValue.enable?R?.defaultValue?.field?"{"+R.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[R,S]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...Y},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-select",setActiveTab:K,activeTab:$,allowedTabs:["general","advanced"]}),"general"===$&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Select Options","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-select-options"},(0,a.createElement)("div",{className:"kb-adv-field-options-wrap"},(0,x.times)(E.length,(e=>{return(0,a.createElement)("div",{key:e,className:"kb-adv-field-option"},(0,a.createElement)(d.TextControl,{className:"kb-option-text-control",label:(0,i.__)("Option","kadence-blocks")+" "+(e+1)+" "+(0,i.__)("label","kadence-blocks"),placeholder:(0,i.__)("Option","kadence-blocks"),value:void 0!==E[e].label?E[e].label:"",onChange:t=>U(e,{label:t})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Option","kadence-blocks")+" "+(e+1)+" "+(0,i.__)("value","kadence-blocks"),placeholder:E[e].label,value:void 0!==E[e].value?E[e].value:"",onChange:t=>U(e,{value:t})}),(0,a.createElement)("div",{className:"kadence-blocks-list-item__control-menu"},(0,a.createElement)(d.Button,{icon:"arrow-up",onClick:0===e?void 0:(t=e,()=>{0!==t&&z(t,t-1)}),className:"kadence-blocks-list-item__move-up",label:(0,i.__)("Move Item Up","kadence-blocks"),"aria-disabled":0===e,disabled:0===e}),(0,a.createElement)(d.Button,{icon:"arrow-down",onClick:e+1===E.length?void 0:W(e),className:"kadence-blocks-list-item__move-down",label:(0,i.__)("Move Item Down","kadence-blocks"),"aria-disabled":e+1===E.length,disabled:e+1===E.length}),(0,a.createElement)(d.Button,{icon:"no-alt",onClick:()=>q(e),className:"kadence-blocks-list-item__remove",label:(0,i.__)("Remove Item","kadence-blocks"),disabled:1===E.length})));var t}))),(0,a.createElement)(d.Button,{className:"kb-add-option",variant:"primary",icon:Qn,onClick:()=>{const e=E;e.push({value:"",label:""}),t({options:e}),L(Math.random())}},(0,i.__)("Add Option","kadence-blocks")),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Multi Select","kadence-blocks"),checked:C,onChange:e=>t({multiSelect:e}),help:(0,i.__)("Checkboxes are a preferred alternative due to their easier usability.","kadence-blocks")})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-select-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:w,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Select Placeholder","kadence-blocks"),value:_,onChange:e=>t({placeholder:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:S,preview:X,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===$&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-select-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==O&&void 0!==O[0]?O[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==O&&void 0!==O[1]?O[1]:"",void 0!==O&&void 0!==O[2]?O[2]:""]})},tabletValue:void 0!==O&&void 0!==O[1]?O[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==O&&void 0!==O[0]?O[0]:"",e,void 0!==O&&void 0!==O[2]?O[2]:""]})},mobileValue:void 0!==O&&void 0!==O[2]?O[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==O&&void 0!==O[0]?O[0]:"",void 0!==O&&void 0!==O[1]?O[1]:"",e]})},min:0,max:"px"===I?2e3:100,step:1,unit:I||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==N&&void 0!==N[0]?N[0]:"",onChange:e=>{t({minWidth:[e,void 0!==N&&void 0!==N[1]?N[1]:"",void 0!==N&&void 0!==N[2]?N[2]:""]})},tabletValue:void 0!==N&&void 0!==N[1]?N[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==N&&void 0!==N[0]?N[0]:"",e,void 0!==N&&void 0!==N[2]?N[2]:""]})},mobileValue:void 0!==N&&void 0!==N[2]?N[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==N&&void 0!==N[0]?N[0]:"",void 0!==N&&void 0!==N[1]?N[1]:"",e]})},min:0,max:"px"===P?2e3:100,step:1,unit:P||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-select-extra-settings"},(0,a.createElement)(F,{value:D,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:T,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:M,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:B,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),n?(0,a.createElement)("div",{className:"kb-form-multi"},(0,x.times)(E.length,(e=>(0,a.createElement)("div",{className:"inline-option-add-item",key:e},(0,a.createElement)("input",{key:"text"+e,type:"text",value:E[e].label,className:"ignore-field-styles",onChange:t=>U(e,{label:t.target.value})}),(0,a.createElement)(d.Button,{onClick:()=>q(e)},(0,a.createElement)("span",{className:"dashicons dashicons-trash"}))))),(0,a.createElement)(d.Button,{variant:"primary",icon:Qn,className:"kb-form-multi__add-option",onClick:()=>{const e=E;e.push({value:"",label:""}),t({options:e}),L(Math.random())}},(0,i.__)("Add Option","kadence-blocks"))):(0,a.createElement)("select",{multiple:C},(0,x.times)(E.length,(e=>(0,a.createElement)("option",{key:e,value:e,selected:H(E[e]),disabled:(0,x.get)(E[e],"disabled",!1)},E[e].label)))),w&&(0,a.createElement)("span",{className:"kb-form-field-help"},w)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const $a=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"title":"Submit Button","name":"kadence/advanced-form-submit","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string","default":""},"formID":{"type":"string"},"text":{"type":"string","default":"","__experimentalRole":"content"},"style":{"type":"string","default":"basic"},"sizePreset":{"type":"string","default":"standard"},"gap":{"type":"array","default":["","",""]},"width":{"type":"array","default":["","",""]},"widthUnit":{"type":"string","default":"px"},"widthType":{"type":"string","default":"auto"},"padding":{"type":"array","default":["","","",""]},"tablePadding":{"type":"array","default":["","","",""]},"mobilePadding":{"type":"array","default":["","","",""]},"paddingUnit":{"type":"string","default":"px"},"margin":{"type":"array","default":["","","",""]},"tabletMargin":{"type":"array","default":["","","",""]},"mobileMargin":{"type":"array","default":["","","",""]},"marginUnit":{"type":"string","default":"px"},"color":{"type":"string","default":""},"background":{"type":"string","default":""},"gradient":{"type":"string","default":""},"backgroundType":{"type":"string","default":"normal"},"colorHover":{"type":"string","default":""},"backgroundHover":{"type":"string","default":""},"backgroundHoverType":{"type":"string","default":"normal"},"gradientHover":{"type":"string","default":""},"borderStyle":{"type":"array","default":[{"top":["","",""],"right":["","",""],"bottom":["","",""],"left":["","",""],"unit":"px"}]},"tabletBorderStyle":{"type":"array","default":[{"top":["","",""],"right":["","",""],"bottom":["","",""],"left":["","",""],"unit":"px"}]},"mobileBorderStyle":{"type":"array","default":[{"top":["","",""],"right":["","",""],"bottom":["","",""],"left":["","",""],"unit":"px"}]},"borderHoverStyle":{"type":"array","default":[{"top":["","",""],"right":["","",""],"bottom":["","",""],"left":["","",""],"unit":"px"}]},"tabletBorderHoverStyle":{"type":"array","default":[{"top":["","",""],"right":["","",""],"bottom":["","",""],"left":["","",""],"unit":"px"}]},"mobileBorderHoverStyle":{"type":"array","default":[{"top":["","",""],"right":["","",""],"bottom":["","",""],"left":["","",""],"unit":"px"}]},"borderRadius":{"type":"array","default":["","","",""]},"tabletBorderRadius":{"type":"array","default":["","","",""]},"mobileBorderRadius":{"type":"array","default":["","","",""]},"borderRadiusUnit":{"type":"string","default":"px"},"borderHoverRadius":{"type":"array","default":["","","",""]},"tabletBorderHoverRadius":{"type":"array","default":["","","",""]},"mobileBorderHoverRadius":{"type":"array","default":["","","",""]},"borderHoverRadiusUnit":{"type":"string","default":"px"},"icon":{"type":"string","default":""},"iconColor":{"type":"string","default":""},"iconColorHover":{"type":"string","default":""},"iconSide":{"type":"string","default":"right"},"iconHover":{"type":"boolean","default":false},"iconPadding":{"type":"array","default":["","","",""]},"iconPaddingUnit":{"type":"string","default":"px"},"tabletIconPadding":{"type":"array","default":["","","",""]},"mobileIconPadding":{"type":"array","default":["","","",""]},"iconSize":{"type":"array","default":["","",""]},"iconSizeUnit":{"type":"string","default":"px"},"onlyIcon":{"type":"array","default":[false,"",""]},"label":{"type":"string","default":""},"inheritStyles":{"type":"string","default":"fill"},"typography":{"type":"array","default":[{"size":["","",""],"sizeType":"px","lineHeight":["","",""],"lineType":"","letterSpacing":["","",""],"letterType":"px","textTransform":"","family":"","google":"","style":"","weight":"","variant":"","subset":"","loadGoogle":true}]},"displayShadow":{"type":"boolean","default":false},"displayHoverShadow":{"type":"boolean","default":false},"shadow":{"type":"array","default":[{"color":"#000000","opacity":0.2,"spread":0,"blur":2,"hOffset":1,"vOffset":1,"inset":false}]},"shadowHover":{"type":"array","default":[{"color":"#000000","opacity":0.4,"spread":0,"blur":3,"hOffset":2,"vOffset":2,"inset":false}]},"anchor":{"type":"string"},"noCustomDefaults":{"type":"boolean","default":false},"hAlign":{"type":"string","default":"left"},"thAlign":{"type":"string","default":""},"mhAlign":{"type":"string","default":""}},"supports":{"anchor":true,"html":false,"reusable":false,"kbMetadata":true,"kbContentLabel":"text"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-submit",{...$a,title:(0,i.__)("Submit Button","kadence-blocks"),description:(0,i.__)("Kadence Form Submit Button","kadence-blocks"),keywords:["submit","button","send"],ancestor:["kadence/advanced-form"],parent:["kadence/advanced-form","kadence/column"],icon:{src:r.advancedBtnIcon},edit:function({attributes:e,setAttributes:t,className:n,isSelected:o,context:l,clientId:r,name:s}){const{uniqueID:h,text:f,sizePreset:v,padding:k,tabletPadding:_,mobilePadding:E,paddingUnit:C,color:x,background:w,backgroundType:T,gradient:F,colorHover:O,backgroundHover:I,backgroundHoverType:A,gradientHover:N,borderStyle:P,tabletBorderStyle:B,mobileBorderStyle:D,borderHoverStyle:M,tabletBorderHoverStyle:R,mobileBorderHoverStyle:V,typography:L,borderRadius:W,tabletBorderRadius:z,mobileBorderRadius:q,borderRadiusUnit:U,borderHoverRadius:H,tabletBorderHoverRadius:$,mobileBorderHoverRadius:K,borderHoverRadiusUnit:j,icon:G,iconSide:Q,iconHover:J,width:Y,widthUnit:X,widthType:Z,displayShadow:ee,shadow:te,displayHoverShadow:ne,shadowHover:ae,inheritStyles:oe,iconSize:le,iconPadding:ie,tabletIconPadding:re,mobileIconPadding:ce,iconPaddingUnit:se,onlyIcon:de,iconColor:ue,iconColorHover:pe,label:me,marginUnit:be,margin:he,iconSizeUnit:ge,tabletMargin:fe,mobileMargin:ve,hAlign:ke,thAlign:_e,mhAlign:ye}=e,{previewDevice:Ee}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[r]);(0,m.useEffect)((()=>{const n=y(h,r);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const Ce=(0,b.mouseOverVisualizer)(),Se=(0,b.mouseOverVisualizer)();(0,m.useEffect)((()=>{(0,b.setBlockDefaults)("kadence/singlebtn",e)}),[]);const[xe,we]=(0,m.useState)("general"),Te=e=>{const n=L.map(((t,n)=>(0===n&&(t={...t,...e}),t)));t({typography:n})},Fe=e=>{const n=te.map(((t,n)=>(0===n&&(t={...t,...e}),t)));t({shadow:n})},Oe=e=>{const n=ae.map(((t,n)=>(0===n&&(t={...t,...e}),t)));t({shadowHover:n})},Ie=[{value:"small",label:(0,i.__)("SM","kadence-blocks")},{value:"standard",label:(0,i.__)("MD","kadence-blocks")},{value:"large",label:(0,i.__)("LG","kadence-blocks")},{value:"xlarge",label:(0,i.__)("XL","kadence-blocks")}],Ae=[{value:"auto",label:(0,i.__)("Auto","kadence-blocks")},{value:"fixed",label:(0,i.__)("Fixed","kadence-blocks")},{value:"full",label:(0,i.__)("Full","kadence-blocks")}],Ne=[{value:"fill",label:(0,i.__)("Fill","kadence-blocks")},{value:"outline",label:(0,i.__)("Outline","kadence-blocks")},{value:"inherit",label:(0,i.__)("Theme","kadence-blocks")}],Pe=(0,b.getPreviewSize)(Ee,void 0!==he?.[0]?he[0]:"",void 0!==fe?.[0]?fe[0]:"",void 0!==ve?.[0]?ve[0]:""),Be=(0,b.getPreviewSize)(Ee,void 0!==he?.[1]?he[1]:"",void 0!==fe?.[1]?fe[1]:"",void 0!==ve?.[1]?ve[1]:""),De=(0,b.getPreviewSize)(Ee,void 0!==he?.[2]?he[2]:"",void 0!==fe?.[2]?fe[2]:"",void 0!==ve?.[2]?ve[2]:""),Me=(0,b.getPreviewSize)(Ee,void 0!==he?.[3]?he[3]:"",void 0!==fe?.[3]?fe[3]:"",void 0!==ve?.[3]?ve[3]:""),Re=be||"px",Ve=(0,b.getPreviewSize)(Ee,void 0!==k?.[0]?k[0]:"",void 0!==_?.[0]?_[0]:"",void 0!==E?.[0]?E[0]:""),Le=(0,b.getPreviewSize)(Ee,void 0!==k?.[1]?k[1]:"",void 0!==_?.[1]?_[1]:"",void 0!==E?.[1]?E[1]:""),We=(0,b.getPreviewSize)(Ee,void 0!==k?.[2]?k[2]:"",void 0!==_?.[2]?_[2]:"",void 0!==E?.[2]?E[2]:""),ze=(0,b.getPreviewSize)(Ee,void 0!==k?.[3]?k[3]:"",void 0!==_?.[3]?_[3]:"",void 0!==E?.[3]?E[3]:""),qe=(0,b.getPreviewSize)(Ee,void 0!==W?W[0]:"",void 0!==z?z[0]:"",void 0!==q?q[0]:""),Ue=(0,b.getPreviewSize)(Ee,void 0!==W?W[1]:"",void 0!==z?z[1]:"",void 0!==q?q[1]:""),He=(0,b.getPreviewSize)(Ee,void 0!==W?W[2]:"",void 0!==z?z[2]:"",void 0!==q?q[2]:""),$e=(0,b.getPreviewSize)(Ee,void 0!==W?W[3]:"",void 0!==z?z[3]:"",void 0!==q?q[3]:""),Ke=(0,b.getPreviewSize)(Ee,void 0!==le?.[0]?le[0]:"",void 0!==le?.[1]?le[1]:"",void 0!==le?.[2]?le[2]:""),je=(0,b.getPreviewSize)(Ee,void 0!==ie?.[0]?ie[0]:"",void 0!==re?.[0]?re[0]:"",void 0!==ce?.[0]?ce[0]:""),Ge=(0,b.getPreviewSize)(Ee,void 0!==ie?.[1]?ie[1]:"",void 0!==re?.[1]?re[1]:"",void 0!==ce?.[1]?ce[1]:""),Qe=(0,b.getPreviewSize)(Ee,void 0!==ie?.[2]?ie[2]:"",void 0!==re?.[2]?re[2]:"",void 0!==ce?.[2]?ce[2]:""),Je=(0,b.getPreviewSize)(Ee,void 0!==ie?.[3]?ie[3]:"",void 0!==re?.[3]?re[3]:"",void 0!==ce?.[3]?ce[3]:""),Ye=(0,b.getPreviewSize)(Ee,void 0!==Y?.[0]?Y[0]:"",void 0!==Y?.[1]?Y[1]:void 0,void 0!==Y?.[2]?Y[2]:void 0),Xe=(0,b.getBorderStyle)(Ee,"top",P,B,D),Ze=(0,b.getBorderStyle)(Ee,"right",P,B,D),et=(0,b.getBorderStyle)(Ee,"bottom",P,B,D),tt=(0,b.getBorderStyle)(Ee,"left",P,B,D),nt=(0,b.getBorderColor)(Ee,"top",P,B,D),at=(0,b.getBorderColor)(Ee,"right",P,B,D),ot=(0,b.getBorderColor)(Ee,"bottom",P,B,D),lt=(0,b.getBorderColor)(Ee,"left",P,B,D),it=[P,B,D],rt=(0,b.getBorderStyle)(Ee,"top",M,R,V,it),ct=(0,b.getBorderStyle)(Ee,"right",M,R,V,it),st=(0,b.getBorderStyle)(Ee,"bottom",M,R,V,it),dt=(0,b.getBorderStyle)(Ee,"left",M,R,V,it),ut=(0,b.getBorderColor)(Ee,"top",P,B,D,it),pt=(0,b.getBorderColor)(Ee,"right",P,B,D,it),mt=(0,b.getBorderColor)(Ee,"bottom",P,B,D,it),bt=(0,b.getBorderColor)(Ee,"left",P,B,D,it),ht=(0,b.getPreviewSize)(Ee,void 0!==H?H[0]:"",void 0!==$?$[0]:"",void 0!==K?K[0]:""),gt=(0,b.getPreviewSize)(Ee,void 0!==H?H[1]:"",void 0!==$?$[1]:"",void 0!==K?K[1]:""),ft=(0,b.getPreviewSize)(Ee,void 0!==H?H[2]:"",void 0!==$?$[2]:"",void 0!==K?K[2]:""),vt=(0,b.getPreviewSize)(Ee,void 0!==H?H[3]:"",void 0!==$?$[3]:"",void 0!==K?K[3]:""),kt=(0,b.getPreviewSize)(Ee,void 0!==ke?ke:"",void 0!==_e?_e:"",void 0!==ye?ye:""),_t=(0,b.getPreviewSize)(Ee,void 0!==de?.[0]?de[0]:"",void 0!==de?.[1]?de[1]:void 0,void 0!==de?.[2]?de[2]:void 0);let yt;yt=void 0!==T&&"gradient"===T?F:"transparent"===w||void 0===w?void 0:(0,b.KadenceColorOutput)(w);const Et=["text"],Ct=g()({"kt-button":!0,[`kt-button-${h}`]:!0,[`kb-btn-global-${oe}`]:oe,"wp-block-button__link":oe&&"inherit"===oe,"kb-btn-has-icon":G,["kt-btn-svg-show-"+(J?"hover":"always")]:G,"kb-btn-only-icon":_t,[`kt-btn-size-${v||"standard"}`]:!0}),St=g()({className:n,[`kb-single-btn-${h}`]:!0,[`kt-btn-width-type-${Z||"auto"}`]:!0}),xt=g()({"btn-inner-wrap":!0,[`kt-btn-align-${kt}`]:kt}),wt=(0,c.useBlockProps)({className:St,style:{width:void 0!==Z&&"fixed"===Z&&"%"===(void 0!==X?X:"px")&&""!==Ye?Ye+(void 0!==X?X:"px"):void 0}});let Tt="0",Ft="",Ot="";const It="gradient"===A?N:(0,b.KadenceColorOutput)(I);void 0!==ne&&ne&&void 0!==ae?.[0]&&void 0!==ae?.[0].inset&&!1===ae?.[0].inset&&(Ft=(void 0!==ae?.[0].inset&&ae[0].inset?"inset ":"")+(void 0!==ae?.[0].hOffset?ae[0].hOffset:0)+"px "+(void 0!==ae?.[0].vOffset?ae[0].vOffset:0)+"px "+(void 0!==ae?.[0].blur?ae[0].blur:14)+"px "+(void 0!==ae?.[0].spread?ae[0].spread:0)+"px "+(0,b.KadenceColorOutput)(void 0!==ae?.[0].color?ae[0].color:"#000000",void 0!==ae?.[0].opacity?ae[0].opacity:1),Ot="none",Tt="0"),void 0!==ne&&ne&&void 0!==ae?.[0]&&void 0!==ae?.[0].inset&&!0===ae?.[0].inset&&(Ot=(void 0!==ae?.[0].inset&&ae[0].inset?"inset ":"")+(void 0!==ae?.[0].hOffset?ae[0].hOffset:0)+"px "+(void 0!==ae?.[0].vOffset?ae[0].vOffset:0)+"px "+(void 0!==ae?.[0].blur?ae[0].blur:14)+"px "+(void 0!==ae?.[0].spread?ae[0].spread:0)+"px "+(0,b.KadenceColorOutput)(void 0!==ae?.[0].color?ae[0].color:"#000000",void 0!==ae?.[0].opacity?ae[0].opacity:1),Tt=void 0!==W?W:"3",Ft="none");const At=(0,b.typographyStyle)(L,`.editor-styles-wrapper .wp-block-kadence-advanced-form-submit.kb-single-btn-${h} .kt-button-${h}`,Ee),Nt=(0,a.createElement)("style",null,""!==At?At:"",`.kb-single-btn-${h} .kt-button-${h}.kb-btn-global-outline {`,!Xe&&nt?"border-top-color:"+nt+";":"",!Ze&&at?"border-right-color:"+at+";":"",!tt&&lt?"border-left-color:"+lt+";":"",!et&&ot?"border-bottom-color:"+ot+";":"","}",`.kb-single-btn-${h} .kt-button-${h}.kb-btn-global-outline:hover {`,!rt&&ut?"border-top-color:"+ut+";":"",!ct&&pt?"border-right-color:"+pt+";":"",!dt&&bt?"border-left-color:"+bt+";":"",!st&&mt?"border-bottom-color:"+mt+";":"","}",`.kb-single-btn-${h} .kt-button-${h}:hover {`,O?"color:"+(0,b.KadenceColorOutput)(O)+"!important;":"",Ft?"box-shadow:"+Ft+"!important;":"",rt?"border-top:"+rt+"!important;":"",ct?"border-right:"+ct+"!important;":"",dt?"border-left:"+dt+"!important;":"",st?"border-bottom:"+st+"!important;":"",""!==ht?"border-top-left-radius:"+ht+(j||"px")+"!important;":"",""!==gt?"border-top-right-radius:"+gt+(j||"px")+"!important;":"",""!==vt?"border-bottom-left-radius:"+vt+(j||"px")+"!important;":"",""!==ft?"border-bottom-right-radius:"+ft+(j||"px")+"!important;":"","}",pe?`.kb-single-btn-${h} .kt-button-${h}:hover .kt-btn-svg-icon { color:${(0,b.KadenceColorOutput)(pe)} !important;}`:"",`.kb-single-btn-${h} .kt-button-${h}::before {`,It?"background:"+It+";":"",Ot?"box-shadow:"+Ot+";":"",Tt?"border-radius:"+Tt+"px;":"","}");return(0,a.createElement)("div",{...wt},Nt,(0,a.createElement)(c.BlockControls,null,(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(c.JustifyContentControl,{value:kt,allowedControls:["left","center","right"],onChange:e=>{t("Mobile"===Ee?{mhAlign:e||""}:"Tablet"===Ee?{thAlign:e||""}:{hAlign:e||"center"})}})),(0,a.createElement)(p.CopyPasteAttributes,{attributes:e,excludedAttrs:Et,defaultAttributes:$a.attributes,blockSlug:$a.name,onPaste:e=>t(e)})),(0,b.showSettings)("allSettings","kadence/advancedbtn")&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:r,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-submit",setActiveTab:we,activeTab:xe}),"general"===xe&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Button Settings","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-single-btn"},(0,a.createElement)(p.KadenceRadioButtons,{value:oe,options:Ne,hideLabel:!1,label:(0,i.__)("Button Inherit Styles","kadence-blocks"),onChange:e=>{t({inheritStyles:e})}}),(0,b.showSettings)("sizeSettings","kadence/advancedbtn")&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)(p.KadenceRadioButtons,{value:v,options:Ie,hideLabel:!1,label:(0,i.__)("Button Size","kadence-blocks"),onChange:e=>{t({sizePreset:e})}}),(0,a.createElement)(p.KadenceRadioButtons,{value:Z,options:Ae,hideLabel:!1,label:(0,i.__)("Button Width","kadence-blocks"),onChange:e=>{t({widthType:e})}}),"fixed"===Z&&(0,a.createElement)("div",{className:"kt-inner-sub-section"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Fixed Width","kadence-blocks"),value:void 0!==Y?.[0]?Y[0]:void 0,onChange:e=>{t({width:[e,void 0!==Y?.[1]?Y[1]:"",void 0!==Y?.[2]?Y[2]:""]})},tabletValue:void 0!==Y?.[1]?Y[1]:void 0,onChangeTablet:e=>{t({width:[void 0!==Y?.[0]?Y[0]:"",e,void 0!==Y?.[2]?Y[2]:""]})},mobileValue:void 0!==Y?.[2]?Y[2]:void 0,onChangeMobile:e=>{t({width:[void 0!==Y?.[0]?Y[0]:"",void 0!==Y?.[1]?Y[1]:"",e]})},min:0,max:"px"!==(X||"px")?100:600,step:1,unit:X||"px",onUnit:e=>{t({widthUnit:e})},units:["px","%"]}))))),"style"===xe&&(0,a.createElement)(m.Fragment,null,(0,b.showSettings)("colorSettings","kadence/advancedbtn")&&(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Button Styles","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-single-btn-styles"},(0,a.createElement)(p.HoverToggleControl,{hover:(0,a.createElement)(m.Fragment,null,(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Color Hover","kadence-blocks"),value:O||"",default:"",onChange:e=>t({colorHover:e})}),(0,a.createElement)(p.BackgroundTypeControl,{label:(0,i.__)("Hover Type","kadence-blocks"),type:A||"normal",onChange:e=>t({backgroundHoverType:e}),allowedTypes:["normal","gradient"]}),"gradient"===A&&(0,a.createElement)(p.GradientControl,{value:N,onChange:e=>t({gradientHover:e}),gradients:[]}),"normal"===A&&(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Background Color","kadence-blocks"),value:I||"",default:"",onChange:e=>t({backgroundHover:e})}),(0,a.createElement)(p.ResponsiveBorderControl,{label:(0,i.__)("Border","kadence-blocks"),value:M,tabletValue:R,mobileValue:V,onChange:e=>t({borderHoverStyle:e}),onChangeTablet:e=>t({tabletBorderHoverStyle:e}),onChangeMobile:e=>t({mobileBorderHoverStyle:e})}),(0,a.createElement)(p.ResponsiveMeasurementControls,{label:(0,i.__)("Border Radius","kadence-blocks"),value:H,tabletValue:$,mobileValue:K,onChange:e=>t({borderHoverRadius:e}),onChangeTablet:e=>t({tabletBorderHoverRadius:e}),onChangeMobile:e=>t({mobileBorderHoverRadius:e}),unit:j,units:["px","em","rem","%"],onUnit:e=>t({borderHoverRadiusUnit:e}),max:"em"===j||"rem"===j?24:500,step:"em"===j||"rem"===j?.1:1,min:0,isBorderRadius:!0,allowEmpty:!0}),(0,a.createElement)(p.BoxShadowControl,{label:(0,i.__)("Box Shadow","kadence-blocks"),enable:void 0!==ne&&ne,color:void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].color?ae[0].color:"#000000",colorDefault:"#000000",onArrayChange:(e,t)=>{Oe({color:e,opacity:t})},opacity:void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].opacity?ae[0].opacity:.2,hOffset:void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].hOffset?ae[0].hOffset:0,vOffset:void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].vOffset?ae[0].vOffset:0,blur:void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].blur?ae[0].blur:14,spread:void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].spread?ae[0].spread:0,inset:void 0!==ae&&void 0!==ae[0]&&void 0!==ae[0].inset&&ae[0].inset,onEnableChange:e=>{t({displayHoverShadow:e})},onColorChange:e=>{Oe({color:e})},onOpacityChange:e=>{Oe({opacity:e})},onHOffsetChange:e=>{Oe({hOffset:e})},onVOffsetChange:e=>{Oe({vOffset:e})},onBlurChange:e=>{Oe({blur:e})},onSpreadChange:e=>{Oe({spread:e})},onInsetChange:e=>{Oe({inset:e})}})),normal:(0,a.createElement)(m.Fragment,null,(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Color","kadence-blocks"),value:x||"",default:"",onChange:e=>t({color:e})}),(0,a.createElement)(p.BackgroundTypeControl,{label:(0,i.__)("Type","kadence-blocks"),type:T||"normal",onChange:e=>t({backgroundType:e}),allowedTypes:["normal","gradient"]}),"gradient"===T&&(0,a.createElement)(p.GradientControl,{value:F,onChange:e=>t({gradient:e}),gradients:[]}),"normal"===T&&(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Background Color","kadence-blocks"),value:w||"",default:"",onChange:e=>t({background:e})}),(0,a.createElement)(p.ResponsiveBorderControl,{label:(0,i.__)("Border","kadence-blocks"),value:P,tabletValue:B,mobileValue:D,onChange:e=>t({borderStyle:e}),onChangeTablet:e=>t({tabletBorderStyle:e}),onChangeMobile:e=>t({mobileBorderStyle:e})}),(0,a.createElement)(p.ResponsiveMeasurementControls,{label:(0,i.__)("Border Radius","kadence-blocks"),value:W,tabletValue:z,mobileValue:q,onChange:e=>t({borderRadius:e}),onChangeTablet:e=>t({tabletBorderRadius:e}),onChangeMobile:e=>t({mobileBorderRadius:e}),unit:U,units:["px","em","rem","%"],onUnit:e=>t({borderRadiusUnit:e}),max:"em"===U||"rem"===U?24:500,step:"em"===U||"rem"===U?.1:1,min:0,isBorderRadius:!0,allowEmpty:!0}),(0,a.createElement)(p.BoxShadowControl,{label:(0,i.__)("Box Shadow","kadence-blocks"),enable:void 0!==ee&&ee,color:void 0!==te&&void 0!==te[0]&&void 0!==te[0].color?te[0].color:"#000000",colorDefault:"#000000",onArrayChange:(e,t)=>{Fe({color:e,opacity:t})},opacity:void 0!==te&&void 0!==te[0]&&void 0!==te[0].opacity?te[0].opacity:.2,hOffset:void 0!==te&&void 0!==te[0]&&void 0!==te[0].hOffset?te[0].hOffset:0,vOffset:void 0!==te&&void 0!==te[0]&&void 0!==te[0].vOffset?te[0].vOffset:0,blur:void 0!==te&&void 0!==te[0]&&void 0!==te[0].blur?te[0].blur:14,spread:void 0!==te&&void 0!==te[0]&&void 0!==te[0].spread?te[0].spread:0,inset:void 0!==te&&void 0!==te[0]&&void 0!==te[0].inset&&te[0].inset,onEnableChange:e=>{t({displayShadow:e})},onColorChange:e=>{Fe({color:e})},onOpacityChange:e=>{Fe({opacity:e})},onHOffsetChange:e=>{Fe({hOffset:e})},onVOffsetChange:e=>{Fe({vOffset:e})},onBlurChange:e=>{Fe({blur:e})},onSpreadChange:e=>{Fe({spread:e})},onInsetChange:e=>{Fe({inset:e})}}))})),(0,b.showSettings)("iconSettings","kadence/advancedbtn")&&(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Icon Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-single-btn-icons"},(0,a.createElement)("div",{className:"kt-select-icon-container"},(0,a.createElement)(p.KadenceIconPicker,{value:G,onChange:e=>{t({icon:e})},allowClear:!0})),(0,a.createElement)(p.SmallResponsiveControl,{label:(0,i.__)("Icon and Text Display","kadence-blocks"),desktopChildren:(0,a.createElement)(d.SelectControl,{value:void 0!==de?.[0]&&de[0]?"true":"false",options:[{value:"false",label:(0,i.__)("Show Icon and Text","kadence-blocks")},{value:"true",label:(0,i.__)("Show Only Icon","kadence-blocks")}],onChange:e=>{t({onlyIcon:["true"===e,void 0!==de?.[1]?de[1]:"",void 0!==de?.[2]?de[2]:""]})}}),tabletChildren:(0,a.createElement)(d.SelectControl,{value:void 0!==de?.[1]&&de[1]?"true":void 0!==de?.[1]&&!1===de[1]?"false":"",options:[{value:"",label:(0,i.__)("Inherit","kadence-blocks")},{value:"false",label:(0,i.__)("Show Icon and Text","kadence-blocks")},{value:"true",label:(0,i.__)("Show Only Icon","kadence-blocks")}],onChange:e=>{let n=e;"true"===e?n=!0:"false"===e&&(n=!1),t({onlyIcon:[void 0!==de?.[0]?de[0]:"",n,void 0!==de?.[2]?de[2]:""]})}}),mobileChildren:(0,a.createElement)(d.SelectControl,{value:void 0!==de?.[2]&&de[2]?"true":void 0!==de?.[2]&&!1===de[2]?"false":"",options:[{value:"",label:(0,i.__)("Inherit","kadence-blocks")},{value:"false",label:(0,i.__)("Show Icon and Text","kadence-blocks")},{value:"true",label:(0,i.__)("Show Only Icon","kadence-blocks")}],onChange:e=>{let n=e;"true"===e?n=!0:"false"===e&&(n=!1),t({onlyIcon:[void 0!==de?.[0]?de[0]:"",void 0!==de?.[1]?de[1]:"",n]})}})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Icon Location","kadence-blocks"),value:Q,options:[{value:"right",label:(0,i.__)("Right")},{value:"left",label:(0,i.__)("Left")}],onChange:e=>{t({iconSide:e})}}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Icon Size","kadence-blocks"),value:void 0!==le?.[0]?le[0]:"",onChange:e=>{t({iconSize:[e,void 0!==le[1]?le[1]:"",void 0!==le?.[2]&&le[2]?le[2]:""]})},tabletValue:void 0!==le?.[1]?le[1]:"",onChangeTablet:e=>{t({iconSize:[void 0!==le?.[0]?le[0]:"",e,void 0!==le?.[2]?le[2]:""]})},mobileValue:void 0!==le?.[2]?le[2]:"",onChangeMobile:e=>{t({iconSize:[void 0!==le?.[0]?le[0]:"",void 0!==le?.[1]?le[1]:"",e]})},min:0,max:"px"!==(ge||"px")?12:200,step:"px"!==(ge||"px")?.1:1,unit:ge||"px",onUnit:e=>{t({iconSizeUnit:e})},units:["px","em","rem"]}),(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Icon Color","kadence-blocks"),value:ue||"",default:"",onChange:e=>{t({iconColor:e})},swatchLabel2:(0,i.__)("Hover Color","kadence-blocks"),value2:pe||"",default2:"",onChange2:e=>{t({iconColorHover:e})}}),(0,a.createElement)(p.ResponsiveMeasureRangeControl,{label:(0,i.__)("Icon Padding","kadence-blocks"),value:void 0!==ie?ie:["","","",""],tabletValue:void 0!==re?re:["","","",""],mobileValue:void 0!==ce?ce:["","","",""],onChange:e=>t({iconPadding:e}),onChangeTablet:e=>t({tabletIconPadding:e}),onChangeMobile:e=>t({mobileIconPadding:e}),min:"em"===se||"rem"===se?-2:-999,max:"em"===se||"rem"===se?12:999,step:"em"===se||"rem"===se?.1:1,unit:se,units:["px","em","rem"],onUnit:e=>t({iconPaddingUnit:e})})),(0,b.showSettings)("fontSettings","kadence/advancedbtn")&&(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Typography Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-btn-font-family"},(0,a.createElement)(p.TypographyControls,{fontGroup:"button",fontSize:L[0].size,onFontSize:e=>Te({size:e}),fontSizeType:L[0].sizeType,onFontSizeType:e=>Te({sizeType:e}),lineHeight:L[0].lineHeight,onLineHeight:e=>Te({lineHeight:e}),lineHeightType:L[0].lineType,onLineHeightType:e=>Te({lineType:e}),reLetterSpacing:L[0].letterSpacing,onLetterSpacing:e=>Te({letterSpacing:e}),letterSpacingType:L[0].letterType,onLetterSpacingType:e=>Te({letterType:e}),textTransform:L[0].textTransform,onTextTransform:e=>Te({textTransform:e}),fontFamily:L[0].family,onFontFamily:e=>Te({family:e}),onFontChange:e=>{Te({family:e.value,google:e.google})},onFontArrayChange:e=>Te(e),googleFont:L[0].google,onGoogleFont:e=>Te({google:e}),loadGoogleFont:L[0].loadGoogle,onLoadGoogleFont:e=>Te({loadGoogle:e}),fontVariant:L[0].variant,onFontVariant:e=>Te({variant:e}),fontWeight:L[0].weight,onFontWeight:e=>Te({weight:e}),fontStyle:L[0].style,onFontStyle:e=>Te({style:e}),fontSubset:L[0].subset,onFontSubset:e=>Te({subset:e})}))),"advanced"===xe&&(0,a.createElement)(m.Fragment,null,(0,b.showSettings)("marginSettings","kadence/advancedbtn")&&(0,a.createElement)(m.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{panelName:"kb-single-button-margin-settings"},(0,a.createElement)(p.ResponsiveMeasureRangeControl,{label:(0,i.__)("Padding","kadence-blocks"),value:k,onChange:e=>t({padding:e}),tabletValue:_,onChangeTablet:e=>t({tabletPadding:e}),mobileValue:E,onChangeMobile:e=>t({mobilePadding:e}),min:"em"===C||"rem"===C?-2:-999,max:"em"===C||"rem"===C?12:999,step:"em"===C||"rem"===C?.1:1,unit:C,units:["px","em","rem"],onUnit:e=>t({paddingUnit:e}),onMouseOver:Se.onMouseOver,onMouseOut:Se.onMouseOut}),(0,a.createElement)(p.ResponsiveMeasureRangeControl,{label:(0,i.__)("Margin","kadence-blocks"),value:he,onChange:e=>t({margin:e}),tabletValue:fe,onChangeTablet:e=>t({tabletMargin:e}),mobileValue:ve,onChangeMobile:e=>t({mobileMargin:e}),min:"em"===be||"rem"===be?-2:-999,max:"em"===be||"rem"===be?12:999,step:"em"===be||"rem"===be?.1:1,unit:be,units:["px","em","rem"],onUnit:e=>t({marginUnit:e}),onMouseOver:Ce.onMouseOver,onMouseOut:Ce.onMouseOut,allowAuto:!0}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Add Aria Label","kadence-blocks"),value:me||"",onChange:e=>t({label:e}),className:"kb-textbox-style"})),(0,a.createElement)("div",{className:"kt-sidebar-settings-spacer"})),(0,a.createElement)(p.KadenceBlockDefaults,{attributes:e,defaultAttributes:$a.attributes,blockSlug:$a.name,excludedAttrs:Et})))),(0,a.createElement)("div",{className:xt},(0,a.createElement)("span",{className:Ct,style:{paddingTop:Ve?(0,b.getSpacingOptionOutput)(Ve,C):void 0,paddingRight:Le?(0,b.getSpacingOptionOutput)(Le,C):void 0,paddingBottom:We?(0,b.getSpacingOptionOutput)(We,C):void 0,paddingLeft:ze?(0,b.getSpacingOptionOutput)(ze,C):void 0,marginTop:Pe?(0,b.getSpacingOptionOutput)(Pe,Re):void 0,marginRight:Be?(0,b.getSpacingOptionOutput)(Be,Re):void 0,marginBottom:De?(0,b.getSpacingOptionOutput)(De,Re):void 0,marginLeft:Me?(0,b.getSpacingOptionOutput)(Me,Re):void 0,borderTop:Xe||void 0,borderRight:Ze||void 0,borderBottom:et||void 0,borderLeft:tt||void 0,borderTopLeftRadius:""!==qe?qe+(U||"px"):void 0,borderTopRightRadius:""!==Ue?Ue+(U||"px"):void 0,borderBottomRightRadius:""!==He?He+(U||"px"):void 0,borderBottomLeftRadius:""!==$e?$e+(U||"px"):void 0,boxShadow:void 0!==ee&&ee&&void 0!==te&&void 0!==te[0]&&void 0!==te[0].color?(void 0!==te[0].inset&&te[0].inset?"inset ":"")+(void 0!==te[0].hOffset?te[0].hOffset:0)+"px "+(void 0!==te[0].vOffset?te[0].vOffset:0)+"px "+(void 0!==te[0].blur?te[0].blur:14)+"px "+(void 0!==te[0].spread?te[0].spread:0)+"px "+(0,b.KadenceColorOutput)(void 0!==te[0].color?te[0].color:"#000000",void 0!==te[0].opacity?te[0].opacity:1):void 0,background:void 0!==yt?yt:void 0,color:void 0!==x?(0,b.KadenceColorOutput)(x):void 0,width:void 0!==Z&&"fixed"===Z&&"px"===(void 0!==X?X:"px")&&""!==Ye?Ye+(void 0!==X?X:"px"):void 0}},G&&"left"===Q&&(0,a.createElement)(p.IconRender,{className:`kt-btn-svg-icon kt-btn-svg-icon-${G} kt-btn-side-${Q}`,name:G,size:"1em",style:{fontSize:Ke?(0,b.getFontSizeOptionOutput)(Ke,void 0!==ge?ge:"px"):void 0,color:""!==ue?(0,b.KadenceColorOutput)(ue):void 0,paddingTop:je?(0,b.getSpacingOptionOutput)(je,se):void 0,paddingRight:Ge?(0,b.getSpacingOptionOutput)(Ge,se):void 0,paddingBottom:Qe?(0,b.getSpacingOptionOutput)(Qe,se):void 0,paddingLeft:Je?(0,b.getSpacingOptionOutput)(Je,se):void 0}}),(0,a.createElement)(c.RichText,{tagName:"div",placeholder:(0,i.__)("Button…","kadence-blocks"),value:f,onChange:e=>t({text:e}),allowedFormats:(0,S.applyFilters)("kadence.whitelist_richtext_formats",["kadence/insert-dynamic","core/bold","core/italic","core/strikethrough","toolset/inline-field"],"kadence/advancedbtn"),className:"kt-button-text",keepPlaceholderOnFocus:!0}),G&&"left"!==Q&&(0,a.createElement)(p.IconRender,{className:`kt-btn-svg-icon kt-btn-svg-icon-${G} kt-btn-side-${Q}`,name:G,size:"1em",style:{fontSize:Ke?(0,b.getFontSizeOptionOutput)(Ke,void 0!==ge?ge:"px"):void 0,color:""!==ue?(0,b.KadenceColorOutput)(ue):void 0,paddingTop:je?(0,b.getSpacingOptionOutput)(je,se):void 0,paddingRight:Ge?(0,b.getSpacingOptionOutput)(Ge,se):void 0,paddingBottom:Qe?(0,b.getSpacingOptionOutput)(Qe,se):void 0,paddingLeft:Je?(0,b.getSpacingOptionOutput)(Je,se):void 0}}),(0,a.createElement)(p.SpacingVisualizer,{type:"inside",forceShow:Se.isMouseOver,spacing:[(0,b.getSpacingOptionOutput)(Ve,C),(0,b.getSpacingOptionOutput)(Le,C),(0,b.getSpacingOptionOutput)(We,C),(0,b.getSpacingOptionOutput)(ze,C)]})),(0,a.createElement)(p.SpacingVisualizer,{type:"inside",forceShow:Ce.isMouseOver,spacing:[(0,b.getSpacingOptionOutput)(Pe,Re),(0,b.getSpacingOptionOutput)(Be,Re),(0,b.getSpacingOptionOutput)(De,Re),(0,b.getSpacingOptionOutput)(Me,Re)]}),L?.[0]?.google&&(0,a.createElement)(p.KadenceWebfontLoader,{typography:L,clientId:r,id:"typography"})))},save:()=>null});const Ka=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-telephone","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"placeholder":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"helpText":{"type":"string","default":""},"inputName":{"type":"string"},"auto":{"type":"string"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktdynamic":true,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-telephone",{...Ka,title:(0,i.__)("Telephone Field","kadence-blocks"),
/* translators: block description */
description:(0,i.__)("Kadence Form telephone input field","kadence-blocks"),keywords:["kadence"],icon:{src:r.phoneInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,defaultValue:_,helpText:E,ariaDescription:C,maxWidth:S,maxWidthUnit:x,minWidth:w,minWidthUnit:T,defaultParameter:O,placeholder:I,auto:N,inputName:P,requiredMessage:B,kadenceDynamic:D}=e,[M,R]=(0,m.useState)("general"),{previewDevice:V}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const L=(0,b.getPreviewSize)(V,S&&S[0]?S[0]:"",S&&S[1]?S[1]:"",S&&S[2]?S[2]:""),W=(0,b.getPreviewSize)(V,w&&w[0]?w[0]:"",w&&w[1]?w[1]:"",w&&w[2]?w[2]:""),z=g()({"kb-adv-form-field":!0,"kb-adv-form-text-type-input":!0,"kb-adv-form-infield-type-input":!0,"kb-form-field-focus":n}),q=(0,c.useBlockProps)({className:z,style:{maxWidth:""!==L?L+(x||"%"):void 0,minWidth:""!==W?W+(T||"px"):void 0}}),U=(0,m.useMemo)((()=>void 0!==D&&void 0!==D.defaultValue&&void 0!==D.defaultValue?.enable&&""!==D.defaultValue.enable&&!0===D.defaultValue.enable?D?.defaultValue?.field?"{"+D.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[D,_]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...q},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-telephone",setActiveTab:R,activeTab:M,allowedTabs:["general","advanced"]}),"general"===M&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-tel-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:E,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Placeholder","kadence-blocks"),value:I,onChange:e=>t({placeholder:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:_,preview:U,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===M&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-tel-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==S&&void 0!==S[0]?S[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==S&&void 0!==S[1]?S[1]:"",void 0!==S&&void 0!==S[2]?S[2]:""]})},tabletValue:void 0!==S&&void 0!==S[1]?S[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",e,void 0!==S&&void 0!==S[2]?S[2]:""]})},mobileValue:void 0!==S&&void 0!==S[2]?S[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",void 0!==S&&void 0!==S[1]?S[1]:"",e]})},min:0,max:"px"===x?2e3:100,step:1,unit:x||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==w&&void 0!==w[0]?w[0]:"",onChange:e=>{t({minWidth:[e,void 0!==w&&void 0!==w[1]?w[1]:"",void 0!==w&&void 0!==w[2]?w[2]:""]})},tabletValue:void 0!==w&&void 0!==w[1]?w[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",e,void 0!==w&&void 0!==w[2]?w[2]:""]})},mobileValue:void 0!==w&&void 0!==w[2]?w[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",void 0!==w&&void 0!==w[1]?w[1]:"",e]})},min:0,max:"px"===T?2e3:100,step:1,unit:T||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-tel-extra-settings"},(0,a.createElement)(F,{value:P,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Field Auto Fill","kadence-blocks"),value:N,options:[{value:"",label:(0,i.__)("Default","kadence-blocks")},{value:"name",label:(0,i.__)("Name","kadence-blocks")},{value:"given-name",label:(0,i.__)("First Name","kadence-blocks")},{value:"family-name",label:(0,i.__)("Last Name","kadence-blocks")},{value:"email",label:(0,i.__)("Email","kadence-blocks")},{value:"organization",label:(0,i.__)("Organization","kadence-blocks")},{value:"street-address",label:(0,i.__)("Street Address","kadence-blocks")},{value:"address-line1",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"address-line2",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"country-name",label:(0,i.__)("Country Name","kadence-blocks")},{value:"postal-code",label:(0,i.__)("Postal Code","kadence-blocks")},{value:"tel",label:(0,i.__)("Telephone","kadence-blocks")},{value:"off",label:(0,i.__)("Off","kadence-blocks")}],onChange:e=>t({auto:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:C,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:B,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:O,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("input",{type:"tel",className:"kb-field",value:U,placeholder:I,onChange:e=>!1}),E&&(0,a.createElement)("span",{className:"kb-adv-form-help"},E)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const ja={from:[{type:"block",blocks:["kadence/advanced-form-textarea","kadence/advanced-form-telephone","kadence/advanced-form-number"],transform:e=>(0,l.createBlock)("kadence/advanced-form-text",e)}],to:[{type:"block",blocks:["kadence/advanced-form-textarea"],transform:e=>(0,l.createBlock)("kadence/advanced-form-textarea",e)},{type:"block",blocks:["kadence/advanced-form-telephone"],transform:e=>(0,l.createBlock)("kadence/advanced-form-telephone",e)},{type:"block",blocks:["kadence/advanced-form-number"],transform:e=>(0,l.createBlock)("kadence/advanced-form-number",e)}]},Ga=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-text","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string"},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"helpText":{"type":"string"},"inputName":{"type":"string"},"auto":{"type":"string"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktdynamic":true,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-text",{...Ga,title:(0,i.__)("Text Field","kadence-blocks"),description:(0,i.__)("Kadence Form text input field","kadence-blocks"),keywords:["kadence"],icon:{src:r.textInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,defaultValue:_,helpText:E,ariaDescription:C,maxWidth:S,maxWidthUnit:x,minWidth:w,minWidthUnit:T,defaultParameter:O,placeholder:I,auto:N,inputName:P,requiredMessage:B,kadenceDynamic:D}=e,[M,R]=(0,m.useState)("general"),{previewDevice:V}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const L=(0,b.getPreviewSize)(V,S&&S[0]?S[0]:"",S&&S[1]?S[1]:"",S&&S[2]?S[2]:""),W=(0,b.getPreviewSize)(V,w&&w[0]?w[0]:"",w&&w[1]?w[1]:"",w&&w[2]?w[2]:""),z=g()({"kb-adv-form-field":!0,"kb-adv-form-text-type-input":!0,"kb-adv-form-infield-type-input":!0,"kb-form-field-focus":n}),q=(0,c.useBlockProps)({className:z,style:{maxWidth:""!==L?L+(x||"%"):void 0,minWidth:""!==W?W+(T||"px"):void 0}}),U=(0,m.useMemo)((()=>void 0!==D&&void 0!==D.defaultValue&&void 0!==D.defaultValue?.enable&&""!==D.defaultValue.enable&&!0===D.defaultValue.enable?D?.defaultValue?.field?"{"+D.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[D,_]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...q},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-text",setActiveTab:R,activeTab:M,allowedTabs:["general","advanced"]}),"general"===M&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-text-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:E,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Placeholder","kadence-blocks"),value:I,onChange:e=>t({placeholder:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:_,preview:U,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===M&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-text-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==S&&void 0!==S[0]?S[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==S&&void 0!==S[1]?S[1]:"",void 0!==S&&void 0!==S[2]?S[2]:""]})},tabletValue:void 0!==S&&void 0!==S[1]?S[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",e,void 0!==S&&void 0!==S[2]?S[2]:""]})},mobileValue:void 0!==S&&void 0!==S[2]?S[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",void 0!==S&&void 0!==S[1]?S[1]:"",e]})},min:0,max:"px"===x?2e3:100,step:1,unit:x||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==w&&void 0!==w[0]?w[0]:"",onChange:e=>{t({minWidth:[e,void 0!==w&&void 0!==w[1]?w[1]:"",void 0!==w&&void 0!==w[2]?w[2]:""]})},tabletValue:void 0!==w&&void 0!==w[1]?w[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",e,void 0!==w&&void 0!==w[2]?w[2]:""]})},mobileValue:void 0!==w&&void 0!==w[2]?w[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",void 0!==w&&void 0!==w[1]?w[1]:"",e]})},min:0,max:"px"===T?2e3:100,step:1,unit:T||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-text-extra-settings"},(0,a.createElement)(F,{value:P,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Field Auto Fill","kadence-blocks"),value:N,options:[{value:"",label:(0,i.__)("Default","kadence-blocks")},{value:"name",label:(0,i.__)("Name","kadence-blocks")},{value:"given-name",label:(0,i.__)("First Name","kadence-blocks")},{value:"family-name",label:(0,i.__)("Last Name","kadence-blocks")},{value:"email",label:(0,i.__)("Email","kadence-blocks")},{value:"organization",label:(0,i.__)("Organization","kadence-blocks")},{value:"street-address",label:(0,i.__)("Street Address","kadence-blocks")},{value:"address-line1",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"address-line2",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"country-name",label:(0,i.__)("Country Name","kadence-blocks")},{value:"postal-code",label:(0,i.__)("Postal Code","kadence-blocks")},{value:"tel",label:(0,i.__)("Telephone","kadence-blocks")},{value:"off",label:(0,i.__)("Off","kadence-blocks")}],onChange:e=>t({auto:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:C,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:B,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:O,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("input",{type:"text",className:"kb-field",value:U,placeholder:I,onChange:e=>!1}),E&&(0,a.createElement)("span",{className:"kb-adv-form-help"},E)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},transforms:ja,save:()=>null});const Qa=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-textarea","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"placeholder":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"helpText":{"type":"string","default":""},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"rows":{"type":"number","default":3},"inputName":{"type":"string"},"auto":{"type":"string"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"ktdynamic":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-textarea",{...Qa,title:(0,i.__)("Text Area","kadence-blocks"),description:(0,i.__)("Kadence Form text input field","kadence-blocks"),keywords:["kadence"],icon:{src:r.textareaInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,rows:f,required:v,label:k,showLabel:_,defaultValue:E,helpText:C,ariaDescription:S,maxWidth:x,maxWidthUnit:w,minWidth:T,minWidthUnit:O,defaultParameter:I,placeholder:N,auto:P,inputName:B,requiredMessage:D,kadenceDynamic:M}=e,[R,V]=(0,m.useState)("general"),{previewDevice:L}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const W=(0,b.getPreviewSize)(L,x&&x[0]?x[0]:"",x&&x[1]?x[1]:"",x&&x[2]?x[2]:""),z=(0,b.getPreviewSize)(L,T&&T[0]?T[0]:"",T&&T[1]?T[1]:"",T&&T[2]?T[2]:""),q=(0,m.useMemo)((()=>void 0!==M&&void 0!==M.defaultValue&&void 0!==M.defaultValue?.enable&&""!==M.defaultValue.enable&&!0===M.defaultValue.enable?M?.defaultValue?.field?"{"+M.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[M,E]),U=g()({"kb-adv-form-field":!0,"kb-adv-form-text-type-input":!0,"kb-adv-form-infield-type-input":!0,"kb-form-field-focus":n||q}),H=(0,c.useBlockProps)({className:U,style:{maxWidth:""!==W?W+(w||"%"):void 0,minWidth:""!==z?z+(O||"px"):void 0}});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{...H},(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-textarea",setActiveTab:V,activeTab:R,allowedTabs:["general","advanced"]}),"general"===R&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-text-controls"},(0,a.createElement)(d.RangeControl,{label:(0,i.__)("Rows"),value:f,onChange:e=>t({rows:parseInt(e)}),min:2,max:50}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:v,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:k,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:_,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:C,onChange:e=>t({helpText:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Placeholder","kadence-blocks"),value:N,onChange:e=>t({placeholder:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:E,preview:q,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===R&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-text-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==x&&void 0!==x[0]?x[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==x&&void 0!==x[1]?x[1]:"",void 0!==x&&void 0!==x[2]?x[2]:""]})},tabletValue:void 0!==x&&void 0!==x[1]?x[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==x&&void 0!==x[0]?x[0]:"",e,void 0!==x&&void 0!==x[2]?x[2]:""]})},mobileValue:void 0!==x&&void 0!==x[2]?x[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==x&&void 0!==x[0]?x[0]:"",void 0!==x&&void 0!==x[1]?x[1]:"",e]})},min:0,max:"px"===w?2e3:100,step:1,unit:w||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==T&&void 0!==T[0]?T[0]:"",onChange:e=>{t({minWidth:[e,void 0!==T&&void 0!==T[1]?T[1]:"",void 0!==T&&void 0!==T[2]?T[2]:""]})},tabletValue:void 0!==T&&void 0!==T[1]?T[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",e,void 0!==T&&void 0!==T[2]?T[2]:""]})},mobileValue:void 0!==T&&void 0!==T[2]?T[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==T&&void 0!==T[0]?T[0]:"",void 0!==T&&void 0!==T[1]?T[1]:"",e]})},min:0,max:"px"===O?2e3:100,step:1,unit:O||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-text-extra-settings"},(0,a.createElement)(F,{value:B,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Field Auto Fill","kadence-blocks"),value:P,options:[{value:"",label:(0,i.__)("Default","kadence-blocks")},{value:"name",label:(0,i.__)("Name","kadence-blocks")},{value:"given-name",label:(0,i.__)("First Name","kadence-blocks")},{value:"family-name",label:(0,i.__)("Last Name","kadence-blocks")},{value:"email",label:(0,i.__)("Email","kadence-blocks")},{value:"organization",label:(0,i.__)("Organization","kadence-blocks")},{value:"street-address",label:(0,i.__)("Street Address","kadence-blocks")},{value:"address-line1",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"address-line2",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"country-name",label:(0,i.__)("Country Name","kadence-blocks")},{value:"postal-code",label:(0,i.__)("Postal Code","kadence-blocks")},{value:"tel",label:(0,i.__)("Telephone","kadence-blocks")},{value:"off",label:(0,i.__)("Off","kadence-blocks")}],onChange:e=>t({auto:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:S,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),v&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:D,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==k?k:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:I,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:v,label:k,showLabel:_,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("textarea",{className:"kb-field",placeholder:N,rows:f,onChange:e=>!1,value:q}),C&&(0,a.createElement)("span",{className:"kb-adv-form-help"},C)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const Ja=JSON.parse('{"apiVersion":3,"name":"kadence/advanced-form-time","category":"kadence-blocks","textdomain":"kadence-blocks","attributes":{"uniqueID":{"type":"string"},"formID":{"type":"string"},"label":{"type":"string","default":""},"showLabel":{"type":"boolean","default":true},"required":{"type":"boolean","default":false},"defaultValue":{"type":"string"},"defaultParameter":{"type":"string"},"ariaDescription":{"type":"string","default":""},"maxWidth":{"type":"array","default":["","",""]},"maxWidthUnit":{"type":"string","default":"%"},"minWidth":{"type":"array","default":["","",""]},"minWidthUnit":{"type":"string","default":"px"},"helpText":{"type":"string","default":""},"inputName":{"type":"string"},"auto":{"type":"string"},"errorMessage":{"type":"string"},"requiredMessage":{"type":"string"},"anchor":{"type":"string"}},"supports":{"anchor":true,"html":false,"ktdynamic":true,"ktfieldconditional":true,"reusable":false,"kbMetadata":true,"kbContentLabel":"label"},"ancestor":["kadence/advanced-form"],"parent":["kadence/advanced-form","kadence/column"]}');(0,l.registerBlockType)("kadence/advanced-form-time",{...Ja,title:(0,i.__)("Time","kadence-blocks"),description:(0,i.__)("Kadence Form time input field","kadence-blocks"),keywords:["kadence"],icon:{src:r.timeInputIcon},edit:function({attributes:e,setAttributes:t,isSelected:n,clientId:o,context:l,name:r}){const{uniqueID:h,required:f,label:v,showLabel:k,defaultValue:_,helpText:E,ariaDescription:C,maxWidth:S,maxWidthUnit:x,minWidth:w,minWidthUnit:T,defaultParameter:O,auto:I,inputName:N,requiredMessage:P,kadenceDynamic:B}=e,[D,M]=(0,m.useState)("general"),{previewDevice:R}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]);(0,m.useEffect)((()=>{const n=y(h,o);n!==h&&(e.uniqueID=n,t({uniqueID:n}))}),[]);const V=(0,b.getPreviewSize)(R,S&&S[0]?S[0]:"",S&&S[1]?S[1]:"",S&&S[2]?S[2]:""),L=(0,b.getPreviewSize)(R,w&&w[0]?w[0]:"",w&&w[1]?w[1]:"",w&&w[2]?w[2]:""),W=g()({"kb-adv-form-field":!0,"kb-adv-form-infield-type-input":!0}),z=(0,c.useBlockProps)({className:W,style:{maxWidth:""!==V?V+(x||"%"):void 0,minWidth:""!==L?L+(T||"px"):void 0}}),q=(0,m.useMemo)((()=>void 0!==B&&void 0!==B.defaultValue&&void 0!==B.defaultValue?.enable&&""!==B.defaultValue.enable&&!0===B.defaultValue.enable?B?.defaultValue?.field?"{"+B.defaultValue.field+"}":"":e?.defaultValue?e.defaultValue:""),[B,_]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,n&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)("div",{...z},(0,a.createElement)(A,{clientId:o,name:r,attributes:e}),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.SelectParentBlock,{label:(0,i.__)("View Form Settings","kadence-blocks"),clientId:o,parentSlug:"kadence/advanced-form"}),(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form-time",setActiveTab:M,activeTab:D,allowedTabs:["general","advanced"]}),"general"===D&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Controls","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-time-controls"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Required","kadence-blocks"),checked:f,onChange:e=>t({required:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field Label","kadence-blocks"),value:v,onChange:e=>t({label:e})}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Show Label","kadence-blocks"),checked:k,onChange:e=>t({showLabel:e})}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Description","kadence-blocks"),help:(0,i.__)("This will be displayed under the input and can be used to provide direction on how the field should be filled out.","kadence-blocks"),value:E,onChange:e=>t({helpText:e})}),(0,a.createElement)(p.DynamicTextInputControl,{label:(0,i.__)("Default Value","kadence-blocks"),value:_,preview:q,onChange:e=>t({defaultValue:e}),dynamicAttribute:"defaultValue",allowClear:!0,isSelected:n,attributes:e,setAttributes:t,name:r,clientId:o,context:l}))),"advanced"===D&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Field Width","kadence-blocks"),initialOpen:!0,panelName:"kb-adv-form-time-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:void 0!==S&&void 0!==S[0]?S[0]:"",onChange:e=>{t({maxWidth:[e,void 0!==S&&void 0!==S[1]?S[1]:"",void 0!==S&&void 0!==S[2]?S[2]:""]})},tabletValue:void 0!==S&&void 0!==S[1]?S[1]:"",onChangeTablet:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",e,void 0!==S&&void 0!==S[2]?S[2]:""]})},mobileValue:void 0!==S&&void 0!==S[2]?S[2]:"",onChangeMobile:e=>{t({maxWidth:[void 0!==S&&void 0!==S[0]?S[0]:"",void 0!==S&&void 0!==S[1]?S[1]:"",e]})},min:0,max:"px"===x?2e3:100,step:1,unit:x||"%",onUnit:e=>{t({maxWidthUnit:e})},units:["px","%","vw"]}),(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Min Width","kadence-blocks"),value:void 0!==w&&void 0!==w[0]?w[0]:"",onChange:e=>{t({minWidth:[e,void 0!==w&&void 0!==w[1]?w[1]:"",void 0!==w&&void 0!==w[2]?w[2]:""]})},tabletValue:void 0!==w&&void 0!==w[1]?w[1]:"",onChangeTablet:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",e,void 0!==w&&void 0!==w[2]?w[2]:""]})},mobileValue:void 0!==w&&void 0!==w[2]?w[2]:"",onChangeMobile:e=>{t({minWidth:[void 0!==w&&void 0!==w[0]?w[0]:"",void 0!==w&&void 0!==w[1]?w[1]:"",e]})},min:0,max:"px"===T?2e3:100,step:1,unit:T||"px",onUnit:e=>{t({minWidthUnit:e})},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Extra Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-time-extra-settings"},(0,a.createElement)(F,{value:N,uniqueID:h,onChange:e=>t({inputName:e.replace(/[^a-z0-9-_]/gi,"")})}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Field Auto Fill","kadence-blocks"),value:I,options:[{value:"",label:(0,i.__)("Default","kadence-blocks")},{value:"name",label:(0,i.__)("Name","kadence-blocks")},{value:"given-name",label:(0,i.__)("First Name","kadence-blocks")},{value:"family-name",label:(0,i.__)("Last Name","kadence-blocks")},{value:"email",label:(0,i.__)("Email","kadence-blocks")},{value:"organization",label:(0,i.__)("Organization","kadence-blocks")},{value:"street-address",label:(0,i.__)("Street Address","kadence-blocks")},{value:"address-line1",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"address-line2",label:(0,i.__)("Address Line 1","kadence-blocks")},{value:"country-name",label:(0,i.__)("Country Name","kadence-blocks")},{value:"postal-code",label:(0,i.__)("Postal Code","kadence-blocks")},{value:"tel",label:(0,i.__)("Telephone","kadence-blocks")},{value:"off",label:(0,i.__)("Off","kadence-blocks")}],onChange:e=>t({auto:e})}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Input aria description","kadence-blocks"),value:C,onChange:e=>t({ariaDescription:e}),help:(0,i.__)("This content will be hidden by default and exposed to screen readers as the aria-describedby attribute for this form field. Note that the normal description field will no longer be used for aria-describedby.","kadence-blocks")}),f&&(0,a.createElement)(d.TextControl,{label:(0,i.__)("Field error message when required","kadence-blocks"),value:P,onChange:e=>t({requiredMessage:e}),placeholder:(void 0!==v?v:"")+" "+(0,i.__)("is required","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Populate with Parameter","kadence-blocks"),help:(0,i.__)("Enter a parameter that can be used in the page url to dynamically populate the field.","kadence-blocks"),value:O,onChange:e=>t({defaultParameter:e})})))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s,{required:f,label:v,showLabel:k,setAttributes:t,isSelected:n,name:r}),(0,a.createElement)("input",{type:"time",className:"kb-field",value:q,onChange:e=>!1}),E&&(0,a.createElement)("span",{className:"kb-adv-form-help"},E)),(0,a.createElement)(sa,{inline:!0,className:"kb-custom-inbetween-inserter",getRoot:o})))},save:()=>null});const Ya=["core/paragraph","kadence/advancedheading","kadence/spacer","kadence/rowlayout","kadence/column","kadence/advanced-form-text","kadence/advanced-form-textarea","kadence/advanced-form-select","kadence/advanced-form-submit","kadence/advanced-form-radio","kadence/advanced-form-file","kadence/advanced-form-time","kadence/advanced-form-date","kadence/advanced-form-telephone","kadence/advanced-form-checkbox","kadence/advanced-form-email","kadence/advanced-form-accept","kadence/advanced-form-number","kadence/advanced-form-hidden","kadence/advanced-form-captcha"],Xa=/[\s#]/g,Za=function(e){const{attributes:t,setAttributes:n,clientId:o,direct:s,id:h,isSelected:f}=e,{uniqueID:k}=t,{previewDevice:y}=(0,u.useSelect)((e=>({previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[o]),[E,C]=(0,m.useState)("general"),F=(0,b.mouseOverVisualizer)(),A=(0,b.mouseOverVisualizer)(),[N]=to("_kad_form_fields"),[P]=to("_kad_form_email"),[B]=to("_kad_form_actions"),[D]=to("_kad_form_mailerlite"),[M]=to("_kad_form_fluentcrm"),[R]=to("_kad_form_sendinblue"),[V]=to("_kad_form_mailchimp"),[L]=to("_kad_form_convertkit"),[W]=to("_kad_form_activecampaign"),[z]=to("_kad_form_getresponse"),[q]=to("_kad_form_redirect"),[U]=to("_kad_form_description"),[H]=to("_kad_form_webhook"),[$]=to("_kad_form_autoEmail"),[K]=to("_kad_form_entry"),[j]=to("_kad_form_messages"),[G]=to("_kad_form_labelFont"),[Q]=to("_kad_form_inputFont"),[J]=to("_kad_form_padding"),[Y]=to("_kad_form_tabletPadding"),[X]=to("_kad_form_mobilePadding"),[Z]=to("_kad_form_paddingUnit"),[ee]=to("_kad_form_margin"),[te]=to("_kad_form_tabletMargin"),[ne]=to("_kad_form_mobileMargin"),[ae]=to("_kad_form_marginUnit"),[ce]=to("_kad_form_style"),[se]=to("_kad_form_background"),[de]=to("_kad_form_helpFont"),[ue]=to("_kad_form_radioLabelFont"),[pe]=to("_kad_form_maxWidth"),[me]=to("_kad_form_maxWidthUnit"),[be]=to("_kad_form_submitHide"),[he]=to("_kad_form_browserValidation"),[ge]=to("_kad_form_enableAnalytics"),[fe]=to("_kad_form_className"),[ve]=to("_kad_form_anchor"),[ke,_e]=eo("meta"),ye=(e,t)=>{_e({...ke,["_kad_form_"+t]:e})},Ee=e=>{ye({...se,...e},"background")},Ce=(0,b.getPreviewSize)(y,void 0!==ee?ee[0]:"",void 0!==te?te[0]:"",void 0!==ne?ne[0]:""),Se=(0,b.getPreviewSize)(y,void 0!==ee?ee[1]:"",void 0!==te?te[1]:"",void 0!==ne?ne[1]:""),xe=(0,b.getPreviewSize)(y,void 0!==ee?ee[2]:"",void 0!==te?te[2]:"",void 0!==ne?ne[2]:""),we=(0,b.getPreviewSize)(y,void 0!==ee?ee[3]:"",void 0!==te?te[3]:"",void 0!==ne?ne[3]:""),Te=(0,b.getPreviewSize)(y,void 0!==J?J[0]:"",void 0!==Y?Y[0]:"",void 0!==X?X[0]:""),Fe=(0,b.getPreviewSize)(y,void 0!==J?J[1]:"",void 0!==Y?Y[1]:"",void 0!==X?X[1]:""),Oe=(0,b.getPreviewSize)(y,void 0!==J?J[2]:"",void 0!==Y?Y[2]:"",void 0!==X?X[2]:""),Ie=(0,b.getPreviewSize)(y,void 0!==J?J[3]:"",void 0!==Y?Y[3]:"",void 0!==X?X[3]:""),Ae=(0,b.getPreviewSize)(y,void 0!==pe?.[0]?pe[0]:"",void 0!==pe?.[1]?pe[1]:"",void 0!==pe?.[2]?pe[2]:""),Ne=void 0!==se?.backgroundType&&""!==se?.backgroundType?se.backgroundType:"normal";let Pe="normal"===Ne&&void 0!==se?.background&&""!==se?.background;Pe||(Pe="gradient"===Ne&&void 0!==se?.gradient&&""!==se?.gradient);const Be="gradient"===Ne?se?.gradient:se?.background,De=g()({"kb-advanced-form":!0,[`kb-advanced-form-${h}`]:!0,[`kb-form${k}`]:k,[`kb-form-label-style-${ce?.labelStyle}`]:ce?.labelStyle,"kb-form-basic-style":void 0===ce?.basicStyles||!1!==ce.basicStyles,"kb-form-hide-required-asterisk":void 0!==ce?.showRequired&&!1===ce.showRequired,"kb-form-has-background":Pe,"kb-form-is-dark":void 0!==ce?.isDark&&!0===ce.isDark,[`kb-form-input-size-${ce?.size}`]:ce?.size}),[Me,Re]=eo("title");let[Ve,Le,We]=(0,T.useEntityBlockEditor)("postType","kadence_form",h);const{updateBlockAttributes:ze}=(0,u.useDispatch)(c.store),qe=(0,m.useMemo)((()=>[(0,l.createBlock)("kadence/advanced-form",{})]),[o]);0===Ve.length&&(Ve=qe);const Ue=(0,m.useMemo)((()=>(0,x.get)(Ve,[0,"innerBlocks"],[])),[Ve]),He=(0,b.allowOneBlockOfType)();(0,m.useEffect)((()=>{He(Ue,"kadence/advanced-form-submit",(0,i.__)("submit button","kadence-blocks")),He(Ue,"kadence/advanced-form-captcha",(0,i.__)("captcha","kadence-blocks"))}),[Ue]);const $e=(0,m.useMemo)((()=>(0,x.get)(Ve,[0],{})),[Ve]);(0,m.useEffect)((()=>{if(Array.isArray(Ue)&&Ue.length){_(Ue,ze,h);const e=v(Ue);(0,x.isEqual)(N,e)||ye(e,"fields")}}),[Ue]);const Ke=(0,m.useMemo)((()=>(0,S.applyFilters)("kadence.analyticsOptionAdvancedForm",!1)),[]),[je,Ge]=function(e,t=""){const[n,a]=(0,m.useState)(!1),{receiveEntityRecords:o}=(0,u.useDispatch)(T.store);return[n,async()=>{a(!0);try{const n=await On()({method:"POST",path:`/wp/v2/${e}/${t}`,data:{status:"publish"}});return o("postType",n.type,[n]),n}finally{a(!1)}}]}("kadence_form",h),Qe=(0,c.useInnerBlocksProps)({className:De,style:{marginTop:""!==Ce?(0,b.getSpacingOptionOutput)(Ce,ae):void 0,marginRight:""!==Se?(0,b.getSpacingOptionOutput)(Se,ae):void 0,marginBottom:""!==xe?(0,b.getSpacingOptionOutput)(xe,ae):void 0,marginLeft:""!==we?(0,b.getSpacingOptionOutput)(we,ae):void 0,paddingTop:""!==Te?(0,b.getSpacingOptionOutput)(Te,Z):void 0,paddingRight:""!==Fe?(0,b.getSpacingOptionOutput)(Fe,Z):void 0,paddingBottom:""!==Oe?(0,b.getSpacingOptionOutput)(Oe,Z):void 0,paddingLeft:""!==Ie?(0,b.getSpacingOptionOutput)(Ie,Z):void 0,maxWidth:""!==Ae?Ae+me:void 0,background:""!==Be?(0,b.KadenceColorOutput)(Be):void 0}},{allowedBlocks:Ya,value:s?void 0:Ue,onInput:s?void 0:(e,t)=>Le([{...$e,innerBlocks:e}],t),onChange:s?void 0:(e,t)=>We([{...$e,innerBlocks:e}],t),templateLock:!1,renderAppender:0===Ue.length?()=>(0,a.createElement)(sa,{inline:!1,rootClientId:o}):()=>f?null:(0,a.createElement)(sa,{inline:!0,rootClientId:o})});if(0===Ue.length)return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(w,{onAdd:async(e,t,n,a)=>{try{const i=await Ge();let r={text:"Submit",widthType:"full"};if("subscribe"===t&&"infield"===n&&(r={typography:[{size:["","",""],sizeType:"px",lineHeight:["42","",""],lineType:"px",letterSpacing:["","",""],letterType:"px",textTransform:"",family:"",google:"",style:"",weight:"",variant:"",subset:"",loadGoogle:!0}],text:"Submit",widthType:"full"}),i.id){switch(t){case"contact":We([{...$e,innerBlocks:[(0,l.createBlock)("kadence/rowlayout",{colLayout:"equal",padding:["0","0","0","0"]},[(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-text",{label:"Name"})]),(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-email",{label:"Email",required:!0})])]),(0,l.createBlock)("kadence/advanced-form-textarea",{label:"Message",required:!0}),(0,l.createBlock)("kadence/advanced-form-submit",{text:"Submit"})]}],o);break;case"contactAdvanced":We([{...$e,innerBlocks:[(0,l.createBlock)("kadence/rowlayout",{colLayout:"equal",padding:["0","0","0","0"]},[(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-text",{label:"Name"})]),(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-email",{label:"Email",required:!0})])]),(0,l.createBlock)("kadence/rowlayout",{colLayout:"equal",padding:["0","0","0","0"]},[(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-select",{label:"Option 1"})]),(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-select",{label:"Option 2"})])]),(0,l.createBlock)("kadence/advanced-form-textarea",{label:"Message",required:!0}),(0,l.createBlock)("kadence/advanced-form-submit",{text:"Submit"})]}],o);break;case"subscribeAdvanced":We([{...$e,innerBlocks:[(0,l.createBlock)("kadence/rowlayout",{colLayout:"equal",padding:["0","0","0","0"]},[(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-text",{label:"Name"})]),(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-email",{label:"Email",required:!0})])]),(0,l.createBlock)("kadence/advanced-form-submit",{text:"Submit"})]}],o);break;case"subscribe":We([{...$e,innerBlocks:[(0,l.createBlock)("kadence/rowlayout",{colLayout:"left-golden",padding:["0","0","0","0"]},[(0,l.createBlock)("kadence/column",{},[(0,l.createBlock)("kadence/advanced-form-email",{label:"Email",required:!0})]),(0,l.createBlock)("kadence/column",{verticalAlignment:"bottom"},[(0,l.createBlock)("kadence/advanced-form-submit",r)])])]}],o);break;default:We([{...$e,innerBlocks:[(0,l.createBlock)("core/paragraph",{}),(0,l.createBlock)("kadence/advanced-form-submit",{text:"Submit",uniqueID:"1_default"})]}],o)}Re(e);const i=ke;if("true"===kadence_blocks_params.pro&&i?._kad_form_actions&&!i._kad_form_actions.includes("entry")&&i._kad_form_actions.push("entry"),i._kad_form_description=a,"dark"===n){i._kad_form_style={...i._kad_form_style,background:"palette3",isDark:!0,placeholderColor:"palette6",borderActive:"palette7"},i._kad_form_inputFont={...i._kad_form_inputFont,color:"palette9"},i._kad_form_labelFont={...i._kad_form_labelFont,color:"palette9"},i._kad_form_background={...i._kad_form_background,background:"palette3"};const e={top:["palette6","",1],right:["palette6","",1],bottom:["palette6","",1],left:["palette6","",1],unit:"px"};i._kad_form_fieldBorderStyle=e}else if("infield"===n)i._kad_form_style={...i._kad_form_style,labelStyle:"infield"};else if("underline"===n){const e={top:["#B9B9C5","",0],right:["#B9B9C5","",0],bottom:["#B9B9C5","",2],left:["#B9B9C5","",0],unit:"px"};i._kad_form_labelFont={...i._kad_form_labelFont,color:"#909097"},i._kad_form_style={...i._kad_form_style,labelStyle:"float",borderActive:"palette1",boxShadow:[!0,"#000000",0,0,0,0,0,!1],boxShadowActive:[!0,"#000000",0,0,0,0,0,!1]},i._kad_form_fieldBorderStyle=e,i._kad_form_fieldBorderRadius=[0,0,0,0]}_e({...ke,...i}),await wp.data.dispatch("core").saveEditedEntityRecord("postType","kadence_form",h)}}catch(e){console.error(e)}},isAdding:je,existingTitle:Me}),(0,a.createElement)("div",{className:"kb-form-hide-while-setting-up"},(0,a.createElement)("div",{...Qe})));if("undefined"!=typeof pagenow&&("widgets"===pagenow||"customize"===pagenow)){const e=(0,Tn.addQueryArgs)("post.php",{post:h,action:"edit"});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.Placeholder,{className:"kb-select-or-create-placeholder",label:(0,i.__)("Kadence Form","kadence-blocks"),icon:r.formBlockIcon},(0,a.createElement)("p",{style:{width:"100%",marginBottom:"10px"}},(0,i.__)("Advanced forms can not be edited within the widgets screen.","kadence-blocks")),(0,a.createElement)(d.Button,{href:e,variant:"primary",className:"kb-form-edit-link"},(0,i.__)("Edit Form","kadence-blocks"))),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.KadencePanelBody,{panelName:"kb-advanced-form-selected-switch",title:(0,i.__)("Selected Form","kadence-blocks")},(0,a.createElement)(p.SelectPostFromPostType,{postType:"kadence_form",label:(0,i.__)("Selected Form","kadence-blocks"),hideLabelFromVision:!0,onChange:e=>{n({id:parseInt(e)})},value:h}))))}return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,f&&(0,a.createElement)(a.Fragment,null,".block-editor-block-popover__inbetween-container .block-editor-block-list__insertion-point.is-with-inserter { display: none }",";")),(0,a.createElement)(c.BlockControls,null,(0,a.createElement)(d.ToolbarGroup,{group:"add-block",className:"kb-add-block"},(0,a.createElement)(sa,{rootClientId:o}))),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.InspectorControlTabs,{panelName:"advanced-form",setActiveTab:e=>C(e),activeTab:E}),"general"===E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{panelName:"kb-advanced-form-selected-switch",title:(0,i.__)("Form","kadence-blocks")},!s&&(0,a.createElement)(p.SelectPostFromPostType,{postType:"kadence_form",label:(0,i.__)("Selected Form","kadence-blocks"),hideLabelFromVision:!0,onChange:e=>n({id:parseInt(e)}),value:h}),(0,a.createElement)(d.TextareaControl,{label:(0,i.__)("Form Description","kadence-blocks"),placeholder:(0,i.__)("Optionally add an description about your form","kadence-blocks"),help:(0,i.__)("This is used for your reference only.","kadence-blocks"),value:void 0!==U?U:"",onChange:e=>ye(e,"description")})),(0,a.createElement)(p.KadencePanelBody,{panelName:"kb-advanced-form-submit-actions",title:(0,i.__)("Submit Actions","kadence-blocks")},(0,a.createElement)(wn,{setAttributes:ye,selectedActions:B}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Hide form after submit?","kadence-blocks"),checked:void 0!==be&&be,onChange:e=>{ye(e,"submitHide")}})),(0,x.size)(B)>0&&(0,a.createElement)("div",{className:"kt-sidebar-settings-spacer"}),B.includes("email")&&(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Email Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-form-email-settings"},(0,a.createElement)(d.TextControl,{label:(0,i.__)("Email To Address","kadence-blocks"),placeholder:(0,i.__)("name@example.com","kadence-blocks"),value:void 0!==P.emailTo?P.emailTo:"",onChange:e=>ye({...P,emailTo:e},"email"),help:(0,i.__)("Separate with a comma for more than one email address.","kadence-blocks")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Email Subject","kadence-blocks"),value:void 0!==P.subject?P.subject:"",onChange:e=>ye({...P,subject:e},"email")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("From Email","kadence-blocks"),value:void 0!==P.fromEmail?P.fromEmail:"",onChange:e=>ye({...P,fromEmail:e},"email")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("From Name","kadence-blocks"),value:void 0!==P.fromName?P.fromName:"",onChange:e=>ye({...P,fromName:e},"email")}),(0,a.createElement)(d.SelectControl,{label:(0,i.__)("Reply To","kadence-blocks"),value:P.replyTo,options:[{value:"email_field",label:(0,i.__)("Email Field","kadence-blocks")},{value:"from_email",label:(0,i.__)("From Email","kadence-blocks")}],onChange:e=>{ye({...P,replyTo:e},"email")}}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Cc","kadence-blocks"),value:void 0!==P.cc?P.cc:"",onChange:e=>ye({...P,cc:e},"email")}),(0,a.createElement)(d.TextControl,{label:(0,i.__)("Bcc","kadence-blocks"),value:void 0!==P.bcc?P.bcc:"",onChange:e=>ye({...P,bcc:e},"email")}),(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Send as HTML email?","kadence-blocks"),help:(0,i.__)("If off, plain text is used.","kadence-blocks"),checked:void 0===P.html||P.html,onChange:e=>ye({...P,html:e},"email")})),B.includes("redirect")&&(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Redirect Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-form-redirect-settings"},(0,a.createElement)(p.URLInputControl,{label:(0,i.__)("Redirect to","kadence-blocks"),url:q,onChangeUrl:e=>ye(e,"redirect"),additionalControls:!1})),B.includes("mailerlite")&&(0,a.createElement)(In,{parentClientId:o,formInnerBlocks:Ue,settings:D,save:e=>{ye({...D,...e},"mailerlite")}}),B.includes("fluentCRM")&&(0,a.createElement)(An,{parentClientId:o,formInnerBlocks:Ue,settings:M,save:e=>ye({...M,...e},"fluentcrm")}),B.includes("sendinblue")&&(0,a.createElement)(Nn,{parentClientId:o,formInnerBlocks:Ue,settings:R,save:e=>ye({...R,...e},"sendinblue")}),B.includes("mailchimp")&&(0,a.createElement)(Pn,{parentClientId:o,formInnerBlocks:Ue,settings:V,save:e=>ye({...V,...e},"mailchimp")}),B.includes("convertkit")&&(0,a.createElement)(Bn,{parentClientId:o,formInnerBlocks:Ue,settings:L,save:e=>ye({...L,...e},"convertkit")}),B.includes("activecampaign")&&(0,a.createElement)(qn,{parentClientId:o,formInnerBlocks:Ue,settings:W,save:e=>ye({...W,...e},"activecampaign")}),B.includes("getresponse")&&(0,a.createElement)(Un,{parentClientId:o,formInnerBlocks:Ue,settings:z,save:e=>ye({...z,...e},"getresponse")}),B.includes("webhook")&&(0,a.createElement)(Hn,{parentClientId:o,formInnerBlocks:Ue,settings:H,save:e=>ye({...H,...e},"webhook")}),B.includes("autoEmail")&&(0,a.createElement)($n,{settings:$,save:e=>ye({...$,...e},"autoEmail")}),B.includes("entry")&&(0,a.createElement)(Kn,{settings:K,save:e=>ye({...K,...e},"entry")}),(0,a.createElement)("div",{className:"kt-sidebar-settings-spacer"}),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Message Settings","kadence-blocks"),initialOpen:!1,panelName:"kb-form-message"},(0,a.createElement)(O,{setAttributes:ye,messages:j}))),"style"===E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Input Fields","kadence-blocks"),initialOpen:!0,panelName:"kb-form-field-styles"},(0,a.createElement)(oe,{setMetaAttribute:ye,inputFont:Q,style:ce,useFormMeta:to})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Labels","kadence-blocks"),initialOpen:!1,panelName:"kb-form-label-styles"},(0,a.createElement)(le,{styleAttribute:ce,setAttributes:ye,labelFont:G})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Radio/Checkbox Labels","kadence-blocks"),initialOpen:!1,panelName:"kb-form-radio-label-styles"},(0,a.createElement)(ie,{setAttributes:ye,radioLabelFont:ue})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Help Text","kadence-blocks"),initialOpen:!1,panelName:"kb-form-help-styles"},(0,a.createElement)(re,{setAttributes:ye,helpFont:de})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Message Styling","kadence-blocks"),initialOpen:!1,panelName:"kb-form-message"},(0,a.createElement)(I,{setMetaAttribute:ye,useFormMeta:to})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Background","kadence-blocks"),initialOpen:!1,panelName:"kb-form-background"},(0,a.createElement)(p.BackgroundTypeControl,{label:(0,i.__)("Background Type","kadence-blocks"),type:se?.backgroundType?se.backgroundType:"normal",onChange:e=>Ee({backgroundType:e}),allowedTypes:["normal","gradient"]}),"gradient"!==se?.backgroundType&&(0,a.createElement)(p.PopColorControl,{label:(0,i.__)("Background","kadence-blocks"),value:se?.background?se.background:"",default:"",onChange:e=>{Ee({background:e})}}),"gradient"===se?.backgroundType&&(0,a.createElement)(p.GradientControl,{value:se?.gradient,onChange:e=>{Ee({gradient:e})},gradients:[]}))),"advanced"===E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.KadencePanelBody,{panelName:"kb-row-padding"},(0,a.createElement)(p.ResponsiveMeasureRangeControl,{label:(0,i.__)("Padding","kadence-blocks"),value:(0,b.arrayStringToInt)(J),tabletValue:(0,b.arrayStringToInt)(Y),mobileValue:(0,b.arrayStringToInt)(X),onChange:e=>{ye(e.map(String),"padding")},onChangeTablet:e=>{ye(e.map(String),"tabletPadding")},onChangeMobile:e=>{ye(e.map(String),"mobilePadding")},min:0,max:"em"===Z||"rem"===Z?24:999,step:"em"===Z||"rem"===Z?.1:1,unit:Z,units:["px","em","rem","%"],onUnit:e=>ye(e,"paddingUnit"),onMouseOver:F.onMouseOver,onMouseOut:F.onMouseOut}),(0,a.createElement)(p.ResponsiveMeasureRangeControl,{label:(0,i.__)("Margin","kadence-blocks"),value:(0,b.arrayStringToInt)(ee),tabletValue:(0,b.arrayStringToInt)(te),mobileValue:(0,b.arrayStringToInt)(ne),onChange:e=>{ye(e.map(String),"margin")},onChangeTablet:e=>{ye(e.map(String),"tabletMargin")},onChangeMobile:e=>{ye(e.map(String),"mobileMargin")},min:"em"===ae||"rem"===ae?-12:-999,max:"em"===ae||"rem"===ae?24:999,step:"em"===ae||"rem"===ae?.1:1,unit:ae,units:["px","em","rem","%","vh"],onUnit:e=>ye(e,"marginUnit"),onMouseOver:A.onMouseOver,onMouseOut:A.onMouseOut,allowAuto:!0})),(0,a.createElement)(p.KadencePanelBody,{initialOpen:!0,panelName:"kb-adv-form-max-width"},(0,a.createElement)(p.ResponsiveRangeControls,{label:(0,i.__)("Max Width","kadence-blocks"),value:""!==pe[0]?parseInt(pe[0]):"",onChange:e=>{ye([(e=e||"").toString(),pe[1],pe[2]],"maxWidth")},tabletValue:""!==pe[1]?parseInt(pe[1]):"",onChangeTablet:e=>{e=e||"",ye([pe[0],e.toString(),pe[2]],"maxWidth")},mobileValue:""!==pe[2]?parseInt(pe[2]):"",onChangeMobile:e=>{e=e||"",ye([pe[0],pe[1],e.toString()],"maxWidth")},min:0,max:"px"===me?2e3:100,step:1,reset:()=>ye(["","",""],"maxWidth"),unit:me||"%",onUnit:e=>{ye(e,"maxWidthUnit")},units:["px","%","vw"]})),(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Validation","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-browser-validation"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Use Browser Validation","kadence-blocks"),checked:he,onChange:e=>{ye(e,"browserValidation")},help:(0,i.__)("This will use the browsers default validation for required fields. If disabled, custom error message will be displayed.","kadence-blocks")})),Ke&&(0,a.createElement)(p.KadencePanelBody,{title:(0,i.__)("Analytics","kadence-blocks"),initialOpen:!1,panelName:"kb-adv-form-enable-analytics"},(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Enable Form Analytics","kadence-blocks"),checked:ge,onChange:e=>{ye(e,"enableAnalytics")},help:(0,i.__)("This will capture how many times the form is loaded, started, and submitted so you can have conversion analytics.","kadence-blocks")})))),(0,a.createElement)(c.InspectorAdvancedControls,null,(0,a.createElement)(d.ToggleControl,{label:(0,i.__)("Form Styles","kadence-blocks"),help:(0,i.__)("Only disable if you intend to control form styles through custom css or theme","kadence-blocks"),checked:void 0===ce?.basicStyles||ce.basicStyles,onChange:e=>{ye({...ce,basicStyles:e},"style")}}),(0,a.createElement)(d.TextControl,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,i.__)("HTML anchor","kadence-blocks"),help:(0,a.createElement)(a.Fragment,null,(0,i.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page.","kadence-blocks"),(0,a.createElement)(d.ExternalLink,{href:(0,i.__)("https://wordpress.org/documentation/article/page-jumps/","kadence-blocks")},(0,i.__)("Learn more about anchors","kadence-blocks"))),value:ve,placeholder:(0,i.__)("Add an anchor","kadence-blocks"),onChange:e=>{e=e.replace(Xa,"-"),ye(e,"anchor")},autoCapitalize:"none",autoComplete:"off"}),(0,a.createElement)(d.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,i.__)("Additional CSS class(es)","kadence-blocks"),value:fe,onChange:e=>{ye(""!==e?e:void 0,"className")},help:(0,i.__)("Separate multiple classes with spaces.","kadence-blocks")})),(0,a.createElement)(jn,{uniqueID:k,useFormMeta:to,previewDevice:y,inputFont:Q,fieldStyle:ce,labelStyle:G,helpStyle:de,radioLabelFont:ue}),(0,a.createElement)("div",{...Qe}),(0,a.createElement)(p.SpacingVisualizer,{style:{marginLeft:void 0!==we?(0,b.getSpacingOptionOutput)(we,ae):void 0,marginRight:void 0!==Se?(0,b.getSpacingOptionOutput)(Se,ae):void 0,marginTop:void 0!==Ce?(0,b.getSpacingOptionOutput)(Ce,ae):void 0,marginBottom:void 0!==xe?(0,b.getSpacingOptionOutput)(xe,ae):void 0},type:"inside",forceShow:F.isMouseOver,spacing:[(0,b.getSpacingOptionOutput)(Te,Z),(0,b.getSpacingOptionOutput)(Fe,Z),(0,b.getSpacingOptionOutput)(Oe,Z),(0,b.getSpacingOptionOutput)(Ie,Z)]}),(0,a.createElement)(p.SpacingVisualizer,{type:"inside",forceShow:A.isMouseOver,spacing:[(0,b.getSpacingOptionOutput)(Ce,ae),(0,b.getSpacingOptionOutput)(Se,ae),(0,b.getSpacingOptionOutput)(xe,ae),(0,b.getSpacingOptionOutput)(we,ae)]}))};function eo(e){return(0,T.useEntityProp)("postType","kadence_form",e)}function to(e){const[t,n]=eo("meta");return[t[e],(0,m.useCallback)((a=>{n({...t,[e]:a})}),[e,n])]}function no({id:e,post:t,commit:n,postExists:o}){const[l,r]=function(e,t="post"){const[n,a]=(0,m.useState)(!1),{receiveEntityRecords:o}=(0,u.useDispatch)(T.store);return[n,async()=>{a(!0);try{const n=await On()({method:"POST",path:`/wp/v2/${e}/auto-draft`,data:{post_type:t}});return o("postType",n.type,[n]),n}finally{a(!1)}}]}("kadence_form","kadence_form");return(0,a.createElement)(E,{postType:"kadence_form",label:(0,i.__)("Advanced Form","kadence-blocks"),instructions:(0,i.__)("Select an existing form or create a new one.","kadence-blocks"),placeholder:(0,i.__)("Select Form","kadence-blocks"),onSelect:n,isSelecting:e&&(0,x.isEmpty)(t)&&void 0!==o,onAdd:async()=>{try{const e=await r();n(e.id)}catch(e){console.error(e)}},isAdding:l})}const ao=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"kadence/advanced-form","title":"Advanced Form","category":"kadence-blocks","description":"Create an advanced contact or marketing form for your website.","supports":{"html":false,"customClassName":false,"reusable":false,"lock":false,"kbMetadata":true},"textdomain":"kadence-blocks","keywords":["kb","form","contact"],"attributes":{"id":{"type":"integer","default":0},"uniqueID":{"type":"string"}}}');(0,l.registerBlockType)("kadence/advanced-form",{...ao,title:(0,i._x)("Form (Adv)","block title","kadence-blocks"),description:(0,i._x)("Create an advanced contact or marketing form for your website.","block description","kadence-blocks"),keywords:[(0,i.__)("contact","kadence-blocks"),(0,i.__)("form","kadence-blocks"),"kb"],icon:{src:r.formBlockIcon},transforms:{from:[],to:[]},edit:function(e){const{attributes:t,setAttributes:n,clientId:o}=e,{id:l,uniqueID:s}=t,h=g()({"wp-block-kadence-advanced-form":!0,[`wp-block-kadence-advanced-form${s}`]:s}),f=(0,c.useBlockProps)({className:h}),{post:v,postExists:k,isLoading:_,currentPostType:y,postId:E}=(0,u.useSelect)((e=>({post:l&&e(T.store).getEditedEntityRecord("postType","kadence_form",l),postExists:l&&e(T.store).getEntityRecord("postType","kadence_form",l),isLoading:e(T.store).isResolving("getEntityRecord",["postType","kadence_form",l]),currentPostType:e("core/editor")?.getCurrentPostType()?e("core/editor")?.getCurrentPostType():"",postId:e("core/editor")?.getCurrentPostId()?e("core/editor")?.getCurrentPostId():""})),[l]),{addUniqueID:C}=(0,u.useDispatch)("kadenceblocks/data"),{isUniqueID:S,isUniqueBlock:w,parentData:F,isPreviewMode:O}=(0,u.useSelect)((e=>({isUniqueID:t=>e("kadenceblocks/data").isUniqueID(t),isUniqueBlock:(t,n)=>e("kadenceblocks/data").isUniqueBlock(t,n),isPreviewMode:e("core/block-editor").getSettings().__unstableIsPreviewMode,parentData:{rootBlock:e("core/block-editor").getBlock(e("core/block-editor").getBlockHierarchyRootClientId(o)),postId:e("core/editor")?.getCurrentPostId()?e("core/editor")?.getCurrentPostId():"",reusableParent:e("core/block-editor").getBlockAttributes(e("core/block-editor").getBlockParentsByBlockName(o,"core/block").slice(-1)[0]),editedPostId:!!e("core/edit-site")&&e("core/edit-site").getEditedPostId()}})),[o]);return O?(0,a.createElement)(a.Fragment,null,r.formTemplateContactIcon):((0,m.useEffect)((()=>{const a=(0,b.getPostOrFseId)(e,F),l=(0,b.getUniqueId)(s,o,S,w,a);l!==s?(t.uniqueID=l,n({uniqueID:l}),C(l,o)):C(l,o),"kadence_form"===y&&window.wp.data.dispatch("core/block-editor").setTemplateValidity(!0)}),[]),"kadence_form"===y?(0,a.createElement)("div",{...f},(0,a.createElement)(Za,{...e,direct:!0,id:E})):(0,a.createElement)("div",{...f},(0===l||void 0===k&&!_)&&(0,a.createElement)(no,{id:l,postExists:k,post:v,commit:e=>n({id:e})}),l>0&&(0,x.isEmpty)(v)&&void 0===k&&_&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.Placeholder,{className:"kb-select-or-create-placeholder",label:(0,i.__)("Kadence Form","kadence-blocks"),icon:r.formBlockIcon},(0,a.createElement)(d.Spinner,null)),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.KadencePanelBody,{panelName:"kb-advanced-form-selected-switch",title:(0,i.__)("Selected Form","kadence-blocks")},(0,a.createElement)(p.SelectPostFromPostType,{postType:"kadence_form",label:(0,i.__)("Selected Form","kadence-blocks"),hideLabelFromVision:!0,onChange:e=>{n({id:parseInt(e)})},value:l})))),l>0&&!(0,x.isEmpty)(v)&&"trash"===v.status&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.Placeholder,{className:"kb-select-or-create-placeholder",label:(0,i.__)("Kadence Form","kadence-blocks"),icon:r.formBlockIcon},(0,i.__)("The selected from is in the trash.","kadence-blocks")),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(p.KadencePanelBody,{panelName:"kb-advanced-form-selected-switch",title:(0,i.__)("Selected Form","kadence-blocks")},(0,a.createElement)(p.SelectPostFromPostType,{postType:"kadence_form",label:(0,i.__)("Selected Form","kadence-blocks"),hideLabelFromVision:!0,onChange:e=>{n({id:parseInt(e)})},value:l})))),l>0&&!(0,x.isEmpty)(v)&&"trash"!==v.status&&(0,a.createElement)(T.EntityProvider,{kind:"postType",type:"kadence_form",id:l},(0,a.createElement)(Za,{...e,direct:!1,id:l}))))},save:()=>(0,a.createElement)(c.InnerBlocks.Content,null)})},2485:(e,t)=>{var n;!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var r in n)a.call(n,r)&&n[r]&&e.push(r);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},2963:(e,t,n)=>{"use strict";var a=n(4994);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=a(n(598));e.exports=t.default},598:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},788:e=>{"use strict";function t(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,n){e.classList?e.classList.remove(n):"string"==typeof e.className?e.className=t(e.className,n):e.setAttribute("class",t(e.className&&e.className.baseVal||"",n))}},4146:(e,t,n)=>{"use strict";var a=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},l={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},r={};function c(e){return a.isMemo(e)?i:r[e.$$typeof]||o}r[a.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r[a.Memo]=i;var s=Object.defineProperty,d=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,b=Object.prototype;e.exports=function e(t,n,a){if("string"!=typeof n){if(b){var o=m(n);o&&o!==b&&e(t,o,a)}var i=d(n);u&&(i=i.concat(u(n)));for(var r=c(t),h=c(n),g=0;g<i.length;++g){var f=i[g];if(!(l[f]||a&&a[f]||h&&h[f]||r&&r[f])){var v=p(n,f);try{s(t,f,v)}catch(e){}}}}return t}},3491:function(e){(function(){var t,n,a,o,l,i;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-l)/1e6},n=process.hrtime,o=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),i=1e9*process.uptime(),l=o-i):Date.now?(e.exports=function(){return Date.now()-a},a=Date.now()):(e.exports=function(){return(new Date).getTime()-a},a=(new Date).getTime())}).call(this)},2694:(e,t,n)=>{"use strict";var a=n(6925);function o(){}function l(){}l.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,l,i){if(i!==a){var r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw r.name="Invariant Violation",r}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3146:(e,t,n)=>{for(var a=n(3491),o="undefined"==typeof window?n.g:window,l=["moz","webkit"],i="AnimationFrame",r=o["request"+i],c=o["cancel"+i]||o["cancelRequest"+i],s=0;!r&&s<l.length;s++)r=o[l[s]+"Request"+i],c=o[l[s]+"Cancel"+i]||o[l[s]+"CancelRequest"+i];if(!r||!c){var d=0,u=0,p=[],m=1e3/60;r=function(e){if(0===p.length){var t=a(),n=Math.max(0,m-(t-d));d=n+t,setTimeout((function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(d)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return p.push({handle:++u,callback:e,cancelled:!1}),u},c=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}e.exports=function(e){return r.call(o,e)},e.exports.cancel=function(){c.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=r,e.cancelAnimationFrame=c}},2799:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,a=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,r=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,m=n?Symbol.for("react.suspense"):60113,b=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,f=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,k=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case d:case u:case l:case r:case i:case m:return e;default:switch(e=e&&e.$$typeof){case s:case p:case g:case h:case c:return e;default:return t}}case o:return t}}}function E(e){return y(e)===u}t.AsyncMode=d,t.ConcurrentMode=u,t.ContextConsumer=s,t.ContextProvider=c,t.Element=a,t.ForwardRef=p,t.Fragment=l,t.Lazy=g,t.Memo=h,t.Portal=o,t.Profiler=r,t.StrictMode=i,t.Suspense=m,t.isAsyncMode=function(e){return E(e)||y(e)===d},t.isConcurrentMode=E,t.isContextConsumer=function(e){return y(e)===s},t.isContextProvider=function(e){return y(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return y(e)===p},t.isFragment=function(e){return y(e)===l},t.isLazy=function(e){return y(e)===g},t.isMemo=function(e){return y(e)===h},t.isPortal=function(e){return y(e)===o},t.isProfiler=function(e){return y(e)===r},t.isStrictMode=function(e){return y(e)===i},t.isSuspense=function(e){return y(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===u||e===r||e===i||e===m||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===c||e.$$typeof===s||e.$$typeof===p||e.$$typeof===v||e.$$typeof===k||e.$$typeof===_||e.$$typeof===f)},t.typeOf=y},4363:(e,t,n)=>{"use strict";e.exports=n(2799)},1345:(e,t,n)=>{"use strict";function a(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function l(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,r=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?r="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(r="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==r){var c=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+c+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==i?"\n  "+i:"")+(null!==r?"\n  "+r:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=a,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=l;var d=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var a=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;d.call(this,e,t,a)}}return e}n.r(t),n.d(t,{polyfill:()=>i}),a.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,l.__suppressDeprecationWarning=!0},8006:(e,t,n)=>{"use strict";var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),l=n(1609),i=c(l),r=c(n(5556));function c(e){return e&&e.__esModule?e:{default:e}}var s={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},d=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],u=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),m=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||m()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||m()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(u(e,this.sizer),this.placeHolderSizer&&u(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?i.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=a({},this.props.style);t.display||(t.display="inline-block");var n=a({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),o=function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}(this.props,[]);return function(e){d.forEach((function(t){return delete e[t]}))}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",a({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:s},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:s},this.props.placeholder):null)}}]),t}(l.Component);b.propTypes={className:r.default.string,defaultValue:r.default.any,extraWidth:r.default.oneOfType([r.default.number,r.default.string]),id:r.default.string,injectStyles:r.default.bool,inputClassName:r.default.string,inputRef:r.default.func,inputStyle:r.default.object,minWidth:r.default.oneOfType([r.default.number,r.default.string]),onAutosize:r.default.func,onChange:r.default.func,placeholder:r.default.string,placeholderIsMinWidth:r.default.bool,style:r.default.object,value:r.default.any},b.defaultProps={minWidth:1,injectStyles:!0},t.A=b},8514:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};a.get||a.set?Object.defineProperty(t,n,a):t[n]=e[n]}t.default=e}(n(5556));var a=r(n(2963)),o=r(n(788)),l=r(n(1609)),i=r(n(495));function r(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(this,arguments)}n(554);var s=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,a.default)(e,t)}))},d=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,o.default)(e,t)}))},u=function(e){var t,n;function a(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return(t=e.call.apply(e,[this].concat(a))||this).onEnter=function(e,n){var a=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),s(e,a),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var a=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,a),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var a=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,l=n?a+" "+o:o;t.removeClasses(e,n?"appear":"enter"),s(e,l),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),s(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),s(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,a="string"==typeof n,o=a?(a&&n?n+"-":"")+e:n[e];return{className:o,activeClassName:a?o+"-active":n[e+"Active"],doneClassName:a?o+"-done":n[e+"Done"]}},t}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=a.prototype;return o.removeClasses=function(e,t){var n=this.getClassNames(t),a=n.className,o=n.activeClassName,l=n.doneClassName;a&&d(e,a),o&&d(e,o),l&&d(e,l)},o.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,s(e,t))},o.render=function(){var e=c({},this.props);return delete e.classNames,l.default.createElement(i.default,c({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},a}(l.default.Component);u.defaultProps={classNames:""},u.propTypes={};var p=u;t.default=p,e.exports=t.default},1369:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0,i(n(5556));var a=i(n(1609)),o=n(5795),l=i(n(2312));function i(e){return e&&e.__esModule?e:{default:e}}var r=function(e){var t,n;function i(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return(t=e.call.apply(e,[this].concat(a))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.handleLifecycle=function(e,t,n){var l,i=this.props.children,r=a.default.Children.toArray(i)[t];r.props[e]&&(l=r.props)[e].apply(l,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},r.render=function(){var e=this.props,t=e.children,n=e.in,o=function(e,t){if(null==e)return{};var n,a,o={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),i=a.default.Children.toArray(t),r=i[0],c=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,a.default.createElement(l.default,o,n?a.default.cloneElement(r,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):a.default.cloneElement(c,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(a.default.Component);r.propTypes={};var c=r;t.default=c,e.exports=t.default},495:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};a.get||a.set?Object.defineProperty(t,n,a):t[n]=e[n]}return t.default=e,t}(n(5556)),o=r(n(1609)),l=r(n(5795)),i=n(1345);function r(e){return e&&e.__esModule?e:{default:e}}n(554);var c="unmounted";t.UNMOUNTED=c;var s="exited";t.EXITED=s;var d="entering";t.ENTERING=d;var u="entered";t.ENTERED=u;var p="exiting";t.EXITING=p;var m=function(e){var t,n;function a(t,n){var a;a=e.call(this,t,n)||this;var o,l=n.transitionGroup,i=l&&!l.isMounting?t.enter:t.appear;return a.appearStatus=null,t.in?i?(o=s,a.appearStatus=d):o=u:o=t.unmountOnExit||t.mountOnEnter?c:s,a.state={status:o},a.nextCallback=null,a}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=a.prototype;return i.getChildContext=function(){return{transitionGroup:null}},a.getDerivedStateFromProps=function(e,t){return e.in&&t.status===c?{status:s}:null},i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==d&&n!==u&&(t=d):n!==d&&n!==u||(t=p)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,a=this.props.timeout;return e=t=n=a,null!=a&&"number"!=typeof a&&(e=a.exit,t=a.enter,n=void 0!==a.appear?a.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=l.default.findDOMNode(this);t===d?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===s&&this.setState({status:c})},i.performEnter=function(e,t){var n=this,a=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,l=this.getTimeouts(),i=o?l.appear:l.enter;t||a?(this.props.onEnter(e,o),this.safeSetState({status:d},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i,(function(){n.safeSetState({status:u},(function(){n.props.onEntered(e,o)}))}))}))):this.safeSetState({status:u},(function(){n.props.onEntered(e)}))},i.performExit=function(e){var t=this,n=this.props.exit,a=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:p},(function(){t.props.onExiting(e),t.onTransitionEnd(e,a.exit,(function(){t.safeSetState({status:s},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:s},(function(){t.props.onExited(e)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,t.nextCallback=null,e(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var a=null==t&&!this.props.addEndListener;e&&!a?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===c)return null;var t=this.props,n=t.children,a=function(e,t){if(null==e)return{};var n,a,o={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete a.in,delete a.mountOnEnter,delete a.unmountOnExit,delete a.appear,delete a.enter,delete a.exit,delete a.timeout,delete a.addEndListener,delete a.onEnter,delete a.onEntering,delete a.onEntered,delete a.onExit,delete a.onExiting,delete a.onExited,"function"==typeof n)return n(e,a);var l=o.default.Children.only(n);return o.default.cloneElement(l,a)},a}(o.default.Component);function b(){}m.contextTypes={transitionGroup:a.object},m.childContextTypes={transitionGroup:function(){}},m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:b,onEntering:b,onEntered:b,onExit:b,onExiting:b,onExited:b},m.UNMOUNTED=0,m.EXITED=1,m.ENTERING=2,m.ENTERED=3,m.EXITING=4;var h=(0,i.polyfill)(m);t.default=h},2312:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var a=r(n(5556)),o=r(n(1609)),l=n(1345),i=n(2958);function r(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(this,arguments)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},u=function(e){var t,n;function a(t,n){var a,o=(a=e.call(this,t,n)||this).handleExited.bind(s(s(a)));return a.state={handleExited:o,firstRender:!0},a}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=a.prototype;return l.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},l.componentDidMount=function(){this.appeared=!0,this.mounted=!0},l.componentWillUnmount=function(){this.mounted=!1},a.getDerivedStateFromProps=function(e,t){var n=t.children,a=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,a):(0,i.getNextChildMapping)(e,n,a),firstRender:!1}},l.handleExited=function(e,t){var n=(0,i.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=c({},t.children);return delete n[e.key],{children:n}})))},l.render=function(){var e=this.props,t=e.component,n=e.childFactory,a=function(e,t){if(null==e)return{};var n,a,o={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),l=d(this.state.children).map(n);return delete a.appear,delete a.enter,delete a.exit,null===t?l:o.default.createElement(t,a,l)},a}(o.default.Component);u.childContextTypes={transitionGroup:a.default.object.isRequired},u.propTypes={},u.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,l.polyfill)(u);t.default=p,e.exports=t.default},9790:(e,t,n)=>{"use strict";var a=r(n(8514)),o=r(n(1369)),l=r(n(2312)),i=r(n(495));function r(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:l.default,ReplaceTransition:o.default,CSSTransition:a.default}},2958:(e,t,n)=>{"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=l,t.getInitialChildMapping=function(e,t){return o(e.children,(function(n){return(0,a.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var r=o(e.children),c=l(t,r);return Object.keys(c).forEach((function(o){var l=c[o];if((0,a.isValidElement)(l)){var s=o in t,d=o in r,u=t[o],p=(0,a.isValidElement)(u)&&!u.props.in;!d||s&&!p?d||!s||p?d&&s&&(0,a.isValidElement)(u)&&(c[o]=(0,a.cloneElement)(l,{onExited:n.bind(null,l),in:u.props.in,exit:i(l,"exit",e),enter:i(l,"enter",e)})):c[o]=(0,a.cloneElement)(l,{in:!1}):c[o]=(0,a.cloneElement)(l,{onExited:n.bind(null,l),in:!0,exit:i(l,"exit",e),enter:i(l,"enter",e)})}})),c};var a=n(1609);function o(e,t){var n=Object.create(null);return e&&a.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,a.isValidElement)(e)?t(e):e}(e)})),n}function l(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var a,o=Object.create(null),l=[];for(var i in e)i in t?l.length&&(o[i]=l,l=[]):l.push(i);var r={};for(var c in t){if(o[c])for(a=0;a<o[c].length;a++){var s=o[c][a];r[o[c][a]]=n(s)}r[c]=n(c)}for(a=0;a<l.length;a++)r[l[a]]=n(l[a]);return r}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},554:(e,t,n)=>{"use strict";var a;t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,(a=n(5556))&&a.__esModule,t.timeoutsShape=null,t.classNamesShape=null},30:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const i=l(n(1609)),r="undefined"!=typeof globalThis?globalThis:window;let c,s=void 0!==r.turnstile?"ready":"unloaded";{const e="cf__reactTurnstileOnLoad",t="https://challenges.cloudflare.com/turnstile/v0/api.js";let n;const a=new Promise(((e,t)=>{n={resolve:e,reject:t},"ready"===s&&e(void 0)}));c=()=>{if("unloaded"===s){s="loading",r[e]=()=>{n.resolve(),s="ready",delete r[e]};const a=`${t}?onload=${e}&render=explicit`,o=document.createElement("script");o.src=a,o.async=!0,o.addEventListener("error",(()=>{n.reject("Failed to load Turnstile."),delete r[e]})),document.head.appendChild(o)}return a}}t.default=function({id:e,className:t,style:n,sitekey:a,action:o,cData:l,theme:r,language:d,tabIndex:u,responseField:p,responseFieldName:m,size:b,retry:h,retryInterval:g,refreshExpired:f,appearance:v,execution:k,userRef:_,onVerify:y,onLoad:E,onError:C,onExpire:S,onTimeout:x}){const w=(0,i.useRef)(null),T=(0,i.useState)({onVerify:y})[0],F=null!=_?_:w;return(0,i.useEffect)((()=>{if(!F.current)return;let e=!1,t="";return(async()=>{var n,i;if("ready"!==s)try{await c()}catch(e){return void(null===(n=T.onError)||void 0===n||n.call(T,e))}if(e||!F.current)return;const _={sitekey:a,action:o,cData:l,theme:r,language:d,tabindex:u,"response-field":p,"response-field-name":m,size:b,retry:h,"retry-interval":g,"refresh-expired":f,appearance:v,execution:k,callback:e=>T.onVerify(e),"error-callback":()=>{var e;return null===(e=T.onError)||void 0===e?void 0:e.call(T)},"expired-callback":()=>{var e;return null===(e=T.onExpire)||void 0===e?void 0:e.call(T)},"timeout-callback":()=>{var e;return null===(e=T.onTimeout)||void 0===e?void 0:e.call(T)}};t=window.turnstile.render(F.current,_),null===(i=T.onLoad)||void 0===i||i.call(T,t)})(),()=>{e=!0,t&&window.turnstile.remove(t)}}),[a,o,l,r,d,u,p,m,b,h,g,f,v,k]),(0,i.useEffect)((()=>{T.onVerify=y,T.onLoad=E,T.onError=C,T.onExpire=S,T.onTimeout=x}),[y,E,C,S,x]),i.default.createElement("div",{ref:F,id:e,className:t,style:n})}},8226:e=>{e.exports=function(){"use strict";return function(e){var t="/*|*/",n=t+"}";function a(t){if(t)try{e(t+"}")}catch(e){}}return function(o,l,i,r,c,s,d,u,p,m){switch(o){case 1:if(0===p&&64===l.charCodeAt(0))return e(l+";"),"";break;case 2:if(0===u)return l+t;break;case 3:switch(u){case 102:case 112:return e(i[0]+l),"";default:return l+(0===m?t:"")}case-2:l.split(n).forEach(a)}}}}()},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}},n={};function a(e){var o=n[e];if(void 0!==o)return o.exports;var l=n[e]={exports:{}};return t[e].call(l.exports,l,l.exports,a),l.exports}a.m=t,e=[],a.O=(t,n,o,l)=>{if(!n){var i=1/0;for(d=0;d<e.length;d++){n=e[d][0],o=e[d][1],l=e[d][2];for(var r=!0,c=0;c<n.length;c++)(!1&l||i>=l)&&Object.keys(a.O).every((e=>a.O[e](n[c])))?n.splice(c--,1):(r=!1,l<i&&(i=l));if(r){e.splice(d--,1);var s=o();void 0!==s&&(t=s)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[n,o,l]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1351:0,5342:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var o,l,i=n[0],r=n[1],c=n[2],s=0;if(i.some((t=>0!==e[t]))){for(o in r)a.o(r,o)&&(a.m[o]=r[o]);if(c)var d=c(a)}for(t&&t(n);s<i.length;s++)l=i[s],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return a.O(d)},n=self.webpackChunkkadence=self.webpackChunkkadence||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=a.O(void 0,[5342],(()=>a(2516)));o=a.O(o),(this.kadence=this.kadence||{})["blocks-advanced-form"]=o})();

Filemanager

Name Type Size Permission Actions
blocks Folder 0755
images Folder 0755
admin-kadence-home.asset.php File 260 B 0644
admin-kadence-home.css File 42.54 KB 0644
admin-kadence-home.js File 331.56 KB 0644
blocks-accordion.asset.php File 275 B 0644
blocks-accordion.css File 12.26 KB 0644
blocks-accordion.js File 65.94 KB 0644
blocks-advanced-form.asset.php File 404 B 0644
blocks-advanced-form.css File 30.99 KB 0644
blocks-advanced-form.js File 420.08 KB 0644
blocks-advancedbtn.asset.php File 288 B 0644
blocks-advancedbtn.css File 8.82 KB 0644
blocks-advancedbtn.js File 124.14 KB 0644
blocks-advancedgallery.asset.php File 315 B 0644
blocks-advancedgallery.css File 29.13 KB 0644
blocks-advancedgallery.js File 153.72 KB 0644
blocks-advancedheading.asset.php File 330 B 0644
blocks-advancedheading.css File 18.39 KB 0644
blocks-advancedheading.js File 126.14 KB 0644
blocks-column.asset.php File 256 B 0644
blocks-column.css File 9.03 KB 0644
blocks-column.js File 95.59 KB 0644
blocks-countdown.asset.php File 281 B 0644
blocks-countdown.css File 4.39 KB 0644
blocks-countdown.js File 65.05 KB 0644
blocks-countup.asset.php File 234 B 0644
blocks-countup.css File 91 B 0644
blocks-countup.js File 39.05 KB 0644
blocks-form.asset.php File 324 B 0644
blocks-form.css File 8.01 KB 0644
blocks-form.js File 295.96 KB 0644
blocks-googlemaps.asset.php File 287 B 0644
blocks-googlemaps.css File 515 B 0644
blocks-googlemaps.js File 152.02 KB 0644
blocks-header.asset.php File 328 B 0644
blocks-header.css File 17.33 KB 0644
blocks-header.js File 295.24 KB 0644
blocks-icon.asset.php File 261 B 0644
blocks-icon.css File 1.2 KB 0644
blocks-icon.js File 42.66 KB 0644
blocks-iconlist.asset.php File 289 B 0644
blocks-iconlist.css File 2.65 KB 0644
blocks-iconlist.js File 55.04 KB 0644
blocks-identity.asset.php File 250 B 0644
blocks-identity.css File 2.88 KB 0644
blocks-identity.js File 78.88 KB 0644
blocks-image.asset.php File 328 B 0644
blocks-image.css File 6.39 KB 0644
blocks-image.js File 64.23 KB 0644
blocks-infobox.asset.php File 303 B 0644
blocks-infobox.css File 8.58 KB 0644
blocks-infobox.js File 208.7 KB 0644
blocks-lottie.asset.php File 244 B 0644
blocks-lottie.css File 276 B 0644
blocks-lottie.js File 399.32 KB 0644
blocks-navigation-link.asset.php File 392 B 0644
blocks-navigation-link.css File 1 B 0644
blocks-navigation-link.js File 111.29 KB 0644
blocks-navigation.asset.php File 316 B 0644
blocks-navigation.css File 154.75 KB 0644
blocks-navigation.js File 185.56 KB 0644
blocks-posts.asset.php File 301 B 0644
blocks-posts.css File 5.83 KB 0644
blocks-posts.js File 27.17 KB 0644
blocks-progress-bar.asset.php File 244 B 0644
blocks-progress-bar.css File 888 B 0644
blocks-progress-bar.js File 68.32 KB 0644
blocks-rowlayout.asset.php File 361 B 0644
blocks-rowlayout.css File 114.04 KB 0644
blocks-rowlayout.js File 819.02 KB 0644
blocks-search.asset.php File 234 B 0644
blocks-search.css File 1.28 KB 0644
blocks-search.js File 28.92 KB 0644
blocks-show-more.asset.php File 244 B 0644
blocks-show-more.css File 189 B 0644
blocks-show-more.js File 11.87 KB 0644
blocks-single-icon.asset.php File 234 B 0644
blocks-single-icon.js File 16.82 KB 0644
blocks-singlebtn.asset.php File 288 B 0644
blocks-singlebtn.js File 67.43 KB 0644
blocks-spacer.asset.php File 234 B 0644
blocks-spacer.css File 1.88 KB 0644
blocks-spacer.js File 22.91 KB 0644
blocks-table.asset.php File 298 B 0644
blocks-table.css File 269 B 0644
blocks-table.js File 43.46 KB 0644
blocks-tableofcontents.asset.php File 285 B 0644
blocks-tableofcontents.css File 7.64 KB 0644
blocks-tableofcontents.js File 40.17 KB 0644
blocks-tabs.asset.php File 300 B 0644
blocks-tabs.css File 14.48 KB 0644
blocks-tabs.js File 180.84 KB 0644
blocks-testimonial.asset.php File 261 B 0644
blocks-testimonial.js File 45.21 KB 0644
blocks-testimonials.asset.php File 261 B 0644
blocks-testimonials.css File 19.51 KB 0644
blocks-testimonials.js File 246.17 KB 0644
blocks-videopopup.asset.php File 273 B 0644
blocks-videopopup.css File 1.72 KB 0644
blocks-videopopup.js File 51.68 KB 0644
components.asset.php File 363 B 0644
components.css File 93.12 KB 0644
components.js File 647.82 KB 0644
early-filters.asset.php File 212 B 0644
early-filters.js File 3.32 KB 0644
extension-block-css.asset.php File 231 B 0644
extension-block-css.js File 503.13 KB 0644
extension-image-picker.asset.php File 219 B 0644
extension-image-picker.css File 6.1 KB 0644
extension-image-picker.js File 88.64 KB 0644
extension-kadence-base.asset.php File 99 B 0644
extension-kadence-base.js File 198 B 0644
extension-stores.asset.php File 103 B 0644
extension-stores.js File 5.86 KB 0644
header-visual-builder.asset.php File 239 B 0644
header-visual-builder.css File 8.93 KB 0644
header-visual-builder.js File 63.86 KB 0644
helpers.asset.php File 187 B 0644
helpers.js File 27.17 KB 0644
icons.asset.php File 91 B 0644
icons.js File 457.37 KB 0644
plugin-kadence-control.asset.php File 374 B 0644
plugin-kadence-control.css File 4.18 KB 0644
plugin-kadence-control.js File 155.14 KB 0644
style-blocks-accordion.css File 10.96 KB 0644
style-blocks-advanced-form.css File 16.23 KB 0644
style-blocks-advancedbtn.css File 2.62 KB 0644
style-blocks-advancedgallery.css File 29.79 KB 0644
style-blocks-advancedheading.css File 196 B 0644
style-blocks-column.css File 1.44 KB 0644
style-blocks-countdown.css File 3.7 KB 0644
style-blocks-form.css File 9.49 KB 0644
style-blocks-header.css File 10.18 KB 0644
style-blocks-icon.css File 1.02 KB 0644
style-blocks-iconlist.css File 3.51 KB 0644
style-blocks-identity.css File 2.41 KB 0644
style-blocks-image.css File 4.5 KB 0644
style-blocks-infobox.css File 7.54 KB 0644
style-blocks-lottie.css File 239 B 0644
style-blocks-navigation.css File 96.07 KB 0644
style-blocks-posts.css File 8.37 KB 0644
style-blocks-progress-bar.css File 813 B 0644
style-blocks-rowlayout.css File 7.83 KB 0644
style-blocks-search.css File 1.28 KB 0644
style-blocks-spacer.css File 2.25 KB 0644
style-blocks-table.css File 112 B 0644
style-blocks-tableofcontents.css File 8.29 KB 0644
style-blocks-tabs.css File 10.23 KB 0644
style-blocks-testimonials.css File 10.54 KB 0644
style-blocks-videopopup.css File 4.59 KB 0644