STRATO-apps/wordpress_03/app/wp-content/plugins/fluentform/assets/js/fluent_gutenblock.js

SHA-256: 1bf31e88cbbcd43fa9feab784fd6a684840cde9c2c9013f3fe12ca6c3324f4b0
/*! For license information please see fluent_gutenblock.js.LICENSE.txt */
(()=>{"use strict";var e={15287:(e,t)=>{var o=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function m(e,t,o){this.props=e,this.context=t,this.refs=g,this.updater=o||b}function v(){}function y(e,t,o){this.props=e,this.context=t,this.refs=g,this.updater=o||b}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=m.prototype;var x=y.prototype=new v;x.constructor=y,h(x,m.prototype),x.isPureReactComponent=!0;var k=Array.isArray,S=Object.prototype.hasOwnProperty,j={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function w(e,t,n){var r,l={},a=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,r)&&!C.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(1===u)l.children=n;else if(1<u){for(var c=Array(u),s=0;s<u;s++)c[s]=arguments[s+2];l.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===l[r]&&(l[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:i,props:l,_owner:j.current}}function B(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var O=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function P(e,t,r,l,a){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var u=!1;if(null===e)u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case n:u=!0}}if(u)return a=a(u=e),e=""===l?"."+T(u,0):l,k(a)?(r="",null!=e&&(r=e.replace(O,"$&/")+"/"),P(a,t,r,"",function(e){return e})):null!=a&&(B(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,r+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+e)),t.push(a)),1;if(u=0,l=""===l?".":l+":",k(e))for(var c=0;c<e.length;c++){var s=l+T(i=e[c],c);u+=P(i,t,r,s,a)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),c=0;!(i=e.next()).done;)u+=P(i=i.value,t,r,s=l+T(i,c++),a);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function _(e,t,o){if(null==e)return e;var n=[],r=0;return P(e,n,"","",function(e){return t.call(o,e,r++)}),n}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var E={current:null},N={transition:null},I={ReactCurrentDispatcher:E,ReactCurrentBatchConfig:N,ReactCurrentOwner:j};function M(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:_,forEach:function(e,t,o){_(e,function(){t.apply(this,arguments)},o)},count:function(e){var t=0;return _(e,function(){t++}),t},toArray:function(e){return _(e,function(e){return e})||[]},only:function(e){if(!B(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=r,t.Profiler=a,t.PureComponent=y,t.StrictMode=l,t.Suspense=s,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.act=M,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=h({},e.props),l=e.key,a=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,i=j.current),void 0!==t.key&&(l=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)S.call(t,c)&&!C.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=n;else if(1<c){u=Array(c);for(var s=0;s<c;s++)u[s]=arguments[s+2];r.children=u}return{$$typeof:o,type:e.type,key:l,ref:a,props:r,_owner:i}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=w,t.createFactory=function(e){var t=w.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=B,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=M,t.useCallback=function(e,t){return E.current.useCallback(e,t)},t.useContext=function(e){return E.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return E.current.useDeferredValue(e)},t.useEffect=function(e,t){return E.current.useEffect(e,t)},t.useId=function(){return E.current.useId()},t.useImperativeHandle=function(e,t,o){return E.current.useImperativeHandle(e,t,o)},t.useInsertionEffect=function(e,t){return E.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return E.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return E.current.useMemo(e,t)},t.useReducer=function(e,t,o){return E.current.useReducer(e,t,o)},t.useRef=function(e){return E.current.useRef(e)},t.useState=function(e){return E.current.useState(e)},t.useSyncExternalStore=function(e,t,o){return E.current.useSyncExternalStore(e,t,o)},t.useTransition=function(){return E.current.useTransition()},t.version="18.3.1"},21020:(e,t,o)=>{var n=o(96540),r=Symbol.for("react.element"),l=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,o){var n,l={},c=null,s=null;for(n in void 0!==o&&(c=""+o),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,n)&&!u.hasOwnProperty(n)&&(l[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===l[n]&&(l[n]=t[n]);return{$$typeof:r,type:e,key:c,ref:s,props:l,_owner:i.current}}t.Fragment=l,t.jsx=c,t.jsxs=c},74848:(e,t,o)=>{e.exports=o(21020)},96540:(e,t,o)=>{e.exports=o(15287)}},t={};function o(e){return o="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},o(e)}function n(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,t){if(e){if("string"==typeof e)return r(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var n=0,l=function(){};return{s:l,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==o.return||o.return()}finally{if(u)throw a}}}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var l=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e&&!t||e===t||!o.length)return!0;if(!e||!t)return!1;var r,l=n(o);try{for(l.s();!(r=l.n()).done;){var a=r.value;if(null!=e&&e[a]||null!=t&&t[a]){if(null==e||!e[a]||null==t||!t[a])return!1;if(JSON.stringify(e[a])!==JSON.stringify(t[a]))return!1}}}catch(e){l.e(e)}finally{l.f()}return!0},a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!r.length)return!0;var l,a=n(r);try{for(a.s();!(l=a.n()).done;){var i=l.value,u=e[i],c=t[i];if("object"!==o(u)||"object"!==o(c)){if(u!==c)return!1}else if(JSON.stringify(u)!==JSON.stringify(c))return!1}}catch(e){a.e(e)}finally{a.f()}return!0},i=function o(n){var r=t[n];if(void 0!==r)return r.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,o),l.exports}(74848);wp.i18n.__;const u=(0,wp.element.memo)(function(e){var t=e.label,o=void 0===t?"":t,n=e.className,r=void 0===n?"":n,l=e.style,a="fluent-separator fluent-separator-".concat(void 0===l?"default":l," ").concat(r);return o?(0,i.jsx)("div",{className:a,children:(0,i.jsx)("span",{className:"fluent-separator-label",children:o})}):(0,i.jsx)("hr",{className:a})},function(e,t){return a(e,t,["label","className","style"])});function c(e){return c="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},c(e)}function s(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}const f=function(){return e=function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.formId=t,this.targetDocument=o||document,this.TABLET_BREAKPOINT="780px",this.MOBILE_BREAKPOINT="480px",this.styleElementId="fluentform-block-custom-styles-".concat(t),this.baseSelector=".fluentform.fluentform_wrapper_".concat(t,".ff_guten_block.ff_guten_block-").concat(t),this.setStyleElement()},t=[{key:"setStyleElement",value:function(){var e=this.targetDocument.getElementById(this.styleElementId);if(e)this.styleElement=e;else{var t=this.targetDocument.createElement("style");t.id=this.styleElementId,this.targetDocument.head.appendChild(t),this.styleElement=t}}},{key:"updateStyles",value:function(e){if(e){if(this.styleElement||this.setStyleElement(),this.styleElement){var t=this.generateAllStyles(e);return this.styleElement.innerHTML=t,t}return!1}}},{key:"generateAllStyles",value:function(e){if(!e||0===Object.keys(e).length)return"";var t="";return t+=this.generateContainerStyles(e),t+=this.generateLabelStyles(e),t+=this.generateInputStyles(e),t+=this.generatePlaceholderStyles(e),t+=this.generateButtonStyles(e),t+=this.generateRadioCheckboxStyles(e),t+=this.generateMessageStyles(e)}},{key:"generateContainerStyles",value:function(e){var t="",o=this.baseSelector,n=[];if("gradient"===e.backgroundType&&e.gradientColor1&&e.gradientColor2){var r=e.gradientType||"linear",l=e.gradientAngle||90;"linear"===r?n.push("background: linear-gradient(".concat(l,"deg, ").concat(e.gradientColor1,", ").concat(e.gradientColor2,")")):n.push("background: radial-gradient(circle, ".concat(e.gradientColor1,", ").concat(e.gradientColor2,")"))}else e.backgroundColor&&n.push("background-color: ".concat(e.backgroundColor));if("classic"===e.backgroundType&&e.backgroundImage&&(n.push("background-image: url(".concat(e.backgroundImage,")")),e.backgroundSize&&n.push("background-size: ".concat(e.backgroundSize)),e.backgroundPosition&&n.push("background-position: ".concat(e.backgroundPosition)),e.backgroundRepeat&&n.push("background-repeat: ".concat(e.backgroundRepeat))),e.containerPadding&&(t+=this.generateSpacingWithResponsive(e.containerPadding,"padding",o)),e.containerMargin&&(t+=this.generateSpacingWithResponsive(e.containerMargin,"margin",o)),e.containerBoxShadow&&e.containerBoxShadow.enable){var a=this.generateBoxShadow(e.containerBoxShadow);a&&n.push("box-shadow: ".concat(a))}return n.length>0&&(t+="".concat(o," { ").concat(n.join("; "),"; }\n")),e.formBorder&&(t+=this.generateBorder(e.formBorder,o)),t}},{key:"generateLabelStyles",value:function(e){var t="",o="".concat(this.baseSelector," .ff-el-input--label label"),n=[];if(e.labelColor&&n.push("color: ".concat(e.labelColor)),e.labelTypography){var r=this.generateTypography(e.labelTypography);r&&n.push(r)}return n.length>0&&(t+="".concat(o," { ").concat(n.join("; "),"; }\n")),t}},{key:"generateInputStyles",value:function(e){var t="",o=["".concat(this.baseSelector," .ff-el-form-control"),"".concat(this.baseSelector," .ff-el-input--content input"),"".concat(this.baseSelector," .ff-el-input--content textarea"),"".concat(this.baseSelector," .ff-el-input--content select")],n=o.join(", "),r=[];if(e.inputTextColor&&r.push("color: ".concat(e.inputTextColor)),e.inputBackgroundColor&&r.push("background-color: ".concat(e.inputBackgroundColor)),e.inputTypography){var l=this.generateTypography(e.inputTypography);l&&r.push(l)}if(e.inputSpacing&&(t+=this.generateSpacingWithResponsive(e.inputSpacing,"padding",n)),e.inputBoxShadow&&e.inputBoxShadow.enable){var a=this.generateBoxShadow(e.inputBoxShadow);a&&r.push("box-shadow: ".concat(a))}r.length>0&&(t+="".concat(n," { ").concat(r.join("; "),"; }\n")),e.inputBorder&&(t+=this.generateBorder(e.inputBorder,n));var i=[],u=o.map(function(e){return"".concat(e,":focus")}).join(", ");if(e.inputTextFocusColor&&i.push("color: ".concat(e.inputTextFocusColor)),e.inputBackgroundFocusColor&&i.push("background-color: ".concat(e.inputBackgroundFocusColor)),e.inputFocusSpacing&&(t+=this.generateSpacingWithResponsive(e.inputFocusSpacing,"padding",u)),e.inputBoxShadowFocus&&e.inputBoxShadowFocus.enable){var c=this.generateBoxShadow(e.inputBoxShadowFocus);c&&i.push("box-shadow: ".concat(c))}return i.length>0&&(t+="".concat(u," { ").concat(i.join("; "),"; }\n")),e.inputBorderFocus&&(t+=this.generateBorder(e.inputBorderFocus,u)),t}},{key:"generatePlaceholderStyles",value:function(e){var t="";if(e.placeholderColor){var o=["".concat(this.baseSelector," .ff-el-input--content input::placeholder"),"".concat(this.baseSelector," .ff-el-input--content textarea::placeholder")];t+="".concat(o.join(", ")," { color: ").concat(e.placeholderColor,"; }\n")}if(e.placeholderTypography){var n=this.generateTypography(e.placeholderTypography);if(n){var r=["".concat(this.baseSelector," .ff-el-input--content input::placeholder"),"".concat(this.baseSelector," .ff-el-input--content textarea::placeholder")];t+="".concat(r.join(", ")," { ").concat(n,"; }\n")}}return t}},{key:"generateButtonStyles",value:function(e){var t="",o="".concat(this.baseSelector," .ff_submit_btn_wrapper .ff-btn-submit");e.buttonAlignment&&"left"!==e.buttonAlignment&&(t+="".concat(this.baseSelector," .ff_submit_btn_wrapper { text-align: ").concat(e.buttonAlignment,"; }\n"));var n=[];if(e.buttonWidth&&n.push("width: ".concat(e.buttonWidth,"%")),e.buttonColor&&n.push("color: ".concat(e.buttonColor)),e.buttonBGColor&&n.push("background-color: ".concat(e.buttonBGColor)),e.buttonTypography){var r=this.generateTypography(e.buttonTypography);r&&n.push(r)}if(e.buttonPadding&&(t+=this.generateSpacingWithResponsive(e.buttonPadding,"padding",o)),e.buttonMargin&&(t+=this.generateSpacingWithResponsive(e.buttonMargin,"margin",o)),e.buttonBoxShadow&&e.buttonBoxShadow.enable){var l=this.generateBoxShadow(e.buttonBoxShadow);l&&n.push("box-shadow: ".concat(l))}n.length>0&&(t+="".concat(o," { ").concat(n.join("; "),"; }\n")),e.buttonBorder&&(t+=this.generateBorder(e.buttonBorder,o));var a=[],i="".concat(o,":hover");if(e.buttonHoverColor&&a.push("color: ".concat(e.buttonHoverColor)),e.buttonHoverBGColor&&a.push("background-color: ".concat(e.buttonHoverBGColor)),e.buttonHoverTypography){var u=this.generateTypography(e.buttonHoverTypography);u&&a.push(u)}if(e.buttonHoverPadding&&(t+=this.generateSpacingWithResponsive(e.buttonHoverPadding,"padding",i)),e.buttonHoverMargin&&(t+=this.generateSpacingWithResponsive(e.buttonHoverMargin,"margin",i)),e.buttonHoverBoxShadow&&e.buttonHoverBoxShadow.enable){var c=this.generateBoxShadow(e.buttonHoverBoxShadow);c&&a.push("box-shadow: ".concat(c))}return a.length>0&&(t+="".concat(i," { ").concat(a.join("; "),"; }\n")),e.buttonHoverBorder&&(t+=this.generateBorder(e.buttonHoverBorder,i)),t}},{key:"generateRadioCheckboxStyles",value:function(e){var t="",o=[];return e.radioCheckboxItemsColor&&o.push("color: ".concat(e.radioCheckboxItemsColor)),e.radioCheckboxItemsSize&&o.push("font-size: ".concat(e.radioCheckboxItemsSize,"px;")),o.length>0&&(t+="".concat(this.baseSelector," .ff-el-form-check label { ").concat(o.join("; "),"; }\n")),t}},{key:"generateMessageStyles",value:function(e){var t="";return e.successMessageColor&&(t+="".concat(this.baseSelector," .ff-message-success { color: ").concat(e.successMessageColor,"; }\n")),e.successMessageBgColor&&(t+="".concat(this.baseSelector," .ff-message-success { background-color: ").concat(e.successMessageBgColor,"; }\n")),e.successMessageAlignment&&"left"!==e.successMessageAlignment&&(t+="".concat(this.baseSelector," .ff-message-success { text-align: ").concat(e.successMessageAlignment,"; }\n")),e.errorMessageColor&&(t+="".concat(this.baseSelector," .ff-errors-in-stack, ").concat(this.baseSelector," .error { color: ").concat(e.errorMessageColor,"; }\n")),e.errorMessageBgColor&&(t+="".concat(this.baseSelector," .ff-errors-in-stack, ").concat(this.baseSelector," .error { background-color: ").concat(e.errorMessageBgColor,"; }\n")),e.errorMessageAlignment&&"left"!==e.errorMessageAlignment&&(t+="".concat(this.baseSelector," .ff-errors-in-stack, ").concat(this.baseSelector," .error { text-align: ").concat(e.errorMessageAlignment,"; }\n")),e.submitErrorMessageColor&&(t+="".concat(this.baseSelector," .ff-submit-error { color: ").concat(e.submitErrorMessageColor,"; }\n")),e.submitErrorMessageBgColor&&(t+="".concat(this.baseSelector," .ff-submit-error { background-color: ").concat(e.submitErrorMessageBgColor,"; }\n")),e.submitErrorMessageAlignment&&"left"!==e.submitErrorMessageAlignment&&(t+="".concat(this.baseSelector," .ff-submit-error { text-align: ").concat(e.submitErrorMessageAlignment,"; }\n")),e.asteriskColor&&(t+="".concat(this.baseSelector," .asterisk-right label:after, ").concat(this.baseSelector," .asterisk-left label:before { color: ").concat(e.asteriskColor,"; }\n")),t}},{key:"generateTypography",value:function(e){if(!e)return"";var t=[];return e.fontSize&&t.push("font-size: ".concat(e.fontSize,"px")),e.fontWeight&&t.push("font-weight: ".concat(e.fontWeight)),e.lineHeight&&t.push("line-height: ".concat(e.lineHeight)),e.letterSpacing&&t.push("letter-spacing: ".concat(e.letterSpacing,"px")),e.textTransform&&t.push("text-transform: ".concat(e.textTransform)),t.join("; ")}},{key:"generateBorder",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e||!e.enable||!e.color)return"";var o="",n=[];if(e.type&&n.push("border-style: ".concat(e.type)),e.color&&n.push("border-color: ".concat(e.color)),e.width&&e.width.desktop){var r=this.generateBorderWidth(e.width.desktop);r&&n.push(r)}if(e.radius&&e.radius.desktop){var l=this.generateBorderRadius(e.radius.desktop);l&&n.push(l)}if(!t)return n.join("; ");if(n.length>0&&(o+="".concat(t," { ").concat(n.join("; "),"; }\n")),e.width&&e.width.tablet&&e.width.desktop&&!this.areSpacingValuesEqual(e.width.desktop,e.width.tablet)){var a=this.generateBorderWidth(e.width.tablet);a&&(o+="@media (max-width: ".concat(this.TABLET_BREAKPOINT,") { ").concat(t," { ").concat(a,"; } }\n"))}if(e.radius&&e.radius.tablet&&e.radius.desktop&&!this.areSpacingValuesEqual(e.radius.desktop,e.radius.tablet)){var i=this.generateBorderRadius(e.radius.tablet);i&&(o+="@media (max-width: ".concat(this.TABLET_BREAKPOINT,") { ").concat(t," { ").concat(i,"; } }\n"))}if(e.width&&e.width.mobile&&e.width.desktop&&!this.areSpacingValuesEqual(e.width.desktop,e.width.mobile)){var u=this.generateBorderWidth(e.width.mobile);u&&(o+="@media (max-width: ".concat(this.MOBILE_BREAKPOINT,") { ").concat(t," { ").concat(u,"; } }\n"))}if(e.radius&&e.radius.mobile&&e.radius.desktop&&!this.areSpacingValuesEqual(e.radius.desktop,e.radius.mobile)){var c=this.generateBorderRadius(e.radius.mobile);c&&(o+="@media (max-width: ".concat(this.MOBILE_BREAKPOINT,") { ").concat(t," { ").concat(c,"; } }\n"))}return o}},{key:"generateBorderWidth",value:function(e){if(!e)return"";var t=e.unit||"px";if(e.linked&&void 0!==e.top&&""!==e.top)return"border-width: ".concat(e.top).concat(t);var o=[];return void 0!==e.top&&""!==e.top&&o.push("border-top-width: ".concat(e.top).concat(t)),void 0!==e.right&&""!==e.right&&o.push("border-right-width: ".concat(e.right).concat(t)),void 0!==e.bottom&&""!==e.bottom&&o.push("border-bottom-width: ".concat(e.bottom).concat(t)),void 0!==e.left&&""!==e.left&&o.push("border-left-width: ".concat(e.left).concat(t)),o.join("; ")}},{key:"generateBorderRadius",value:function(e){if(!e)return"";var t=e.unit||"px";if(e.linked&&void 0!==e.top&&""!==e.top)return"border-radius: ".concat(e.top).concat(t);var o=[];return void 0!==e.top&&""!==e.top&&o.push("border-top-left-radius: ".concat(e.top).concat(t)),void 0!==e.right&&""!==e.right&&o.push("border-top-right-radius: ".concat(e.right).concat(t)),void 0!==e.bottom&&""!==e.bottom&&o.push("border-bottom-right-radius: ".concat(e.bottom).concat(t)),void 0!==e.left&&""!==e.left&&o.push("border-bottom-left-radius: ".concat(e.left).concat(t)),o.join("; ")}},{key:"generateSpacingWithResponsive",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"padding",o=arguments.length>2?arguments[2]:void 0;if(!e||!o||Array.isArray(e)&&0===e.length||"object"===c(e)&&0===Object.keys(e).length)return"";var n="";if(e.desktop){var r=this.getSpacingRules(e.desktop,t);r.length>0&&(n+="".concat(o," { ").concat(r.join("; "),"; }\n"))}if(e.tablet&&e.desktop&&!this.areSpacingValuesEqual(e.desktop,e.tablet)){var l=this.getSpacingRules(e.tablet,t);l.length>0&&(n+="@media (max-width: ".concat(this.TABLET_BREAKPOINT,") { ").concat(o," { ").concat(l.join("; "),"; } }\n"))}if(e.mobile&&e.desktop&&!this.areSpacingValuesEqual(e.desktop,e.mobile)){var a=this.getSpacingRules(e.mobile,t);a.length>0&&(n+="@media (max-width: ".concat(this.MOBILE_BREAKPOINT,") { ").concat(o," { ").concat(a.join("; "),"; } }\n"))}return n}},{key:"getSpacingRules",value:function(e,t){if(!e)return[];var o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)||e.unit||"px",n=[];return e.linked&&void 0!==e.top&&""!==e.top?n.push("".concat(t,": ").concat(e.top).concat(o)):(void 0!==e.top&&""!==e.top&&n.push("".concat(t,"-top: ").concat(e.top).concat(o)),void 0!==e.right&&""!==e.right&&n.push("".concat(t,"-right: ").concat(e.right).concat(o)),void 0!==e.bottom&&""!==e.bottom&&n.push("".concat(t,"-bottom: ").concat(e.bottom).concat(o)),void 0!==e.left&&""!==e.left&&n.push("".concat(t,"-left: ").concat(e.left).concat(o))),n}},{key:"generateBoxShadow",value:function(e){var t,o,n,r,l,a,i,u;if(!e||!e.enable||!e.color)return"";var c="inset"===e.position?"inset ":"",s="".concat((null===(t=e.horizontal)||void 0===t?void 0:t.value)||"0").concat((null===(o=e.horizontal)||void 0===o?void 0:o.unit)||"px"),d="".concat((null===(n=e.vertical)||void 0===n?void 0:n.value)||"0").concat((null===(r=e.vertical)||void 0===r?void 0:r.unit)||"px"),f="".concat((null===(l=e.blur)||void 0===l?void 0:l.value)||"5").concat((null===(a=e.blur)||void 0===a?void 0:a.unit)||"px"),p="".concat((null===(i=e.spread)||void 0===i?void 0:i.value)||"0").concat((null===(u=e.spread)||void 0===u?void 0:u.unit)||"px");return"".concat(c).concat(s," ").concat(d," ").concat(f," ").concat(p," ").concat(e.color)}},{key:"areSpacingValuesEqual",value:function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(e.unit!==t.unit)return!1;if(t.linked){var o=t.top||"";if(""===o)return!0;if(e.linked)return(e.top||"")===o;for(var n=0,r=["top","right","bottom","left"];n<r.length;n++){var l=e[r[n]]||"";if(""!==l&&l!==o)return!1}return!0}for(var a=0,i=["top","right","bottom","left"];a<i.length;a++){var u=i[a],c=e.linked?e.top||"":e[u]||"",s=t[u]||"";if(""!==s&&c!==s)return!1}return!0}}],t&&s(e.prototype,t),o&&s(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,o}();var p=wp.i18n.__,b=wp.components,h=b.PanelBody,g=b.SelectControl;const m=(0,wp.element.memo)(function(e){var t=e.attributes,o=e.handlePresetChange,n=window.fluentform_block_vars.style_presets;return(0,i.jsx)(h,{title:p("Form Style Template"),initialOpen:!0,children:(0,i.jsx)(g,{label:p("Choose a Template"),value:t.themeStyle,options:n,onChange:function(e){return o(e)}})})},function(e,t){return e.attributes.themeStyle===t.attributes.themeStyle});function v(e){return v="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},v(e)}function y(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function x(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?y(Object(o),!0).forEach(function(t){k(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function k(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=v(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==v(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?j(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var C=wp.components,w=C.Button,B=C.Flex,O=C.Popover,T=C.FontSizePicker,P=C.SelectControl,_=C.RangeControl,A=wp.element,E=A.useState,N=A.useEffect,I=A.useMemo;const M=(0,A.memo)(function(e){var t=e.label,o=e.typography,n=void 0===o?{}:o,r=e.onChange,l=S(E(!1),2),a=l[0],u=l[1],c=S(E({fontSize:"",fontWeight:"",lineHeight:"",letterSpacing:"",textTransform:""}),2),s=c[0],d=c[1];N(function(){d({fontSize:(null==n?void 0:n.fontSize)||"",fontWeight:(null==n?void 0:n.fontWeight)||"",lineHeight:(null==n?void 0:n.lineHeight)||"",letterSpacing:(null==n?void 0:n.letterSpacing)||"",textTransform:(null==n?void 0:n.textTransform)||""})},[n]);var f=function(){return u(!a)},p=function(e){var t=x(x({},n),e);r(t)},b=I(function(){return""!==s.fontSize&&null!=s.fontSize||""!==s.fontWeight&&null!=s.fontWeight||""!==s.lineHeight&&null!=s.lineHeight||""!==s.letterSpacing&&null!=s.letterSpacing||""!==s.textTransform&&null!=s.textTransform},[s]);return(0,i.jsxs)("div",{className:"ffblock-control-field ffblock-control-typography-wrap",children:[(0,i.jsxs)(B,{align:"center",justify:"space-between",children:[(0,i.jsx)("span",{className:"ffblock-label",children:t}),(0,i.jsxs)("div",{className:"ffblock-flex-gap",children:[b&&(0,i.jsx)(w,{icon:"image-rotate",isSmall:!0,onClick:function(){r({}),a&&u(!1)},label:"Reset to default",className:"ffblock-reset-button"}),(0,i.jsx)(w,{icon:"edit",isSmall:!0,onClick:f,className:"fluent-typography-edit-btn"})]})]}),a&&(0,i.jsx)(O,{className:"fluent-typography-popover",onClose:f,position:"bottom center",children:(0,i.jsxs)("div",{className:"ffblock-popover-content",children:[(0,i.jsx)(T,{fontSizes:[{name:"Small",slug:"small",size:12},{name:"Medium",slug:"medium",size:16},{name:"Large",slug:"large",size:24},{name:"Extra Large",slug:"x-large",size:32}],value:s.fontSize,onChange:function(e){return p({fontSize:e})},withSlider:!0}),(0,i.jsx)(P,{label:"Font Weight",value:s.fontWeight,options:[{value:"",label:"Select"},{value:"300",label:"Light (300)"},{value:"400",label:"Regular (400)"},{value:"500",label:"Medium (500)"},{value:"600",label:"Semi Bold (600)"},{value:"700",label:"Bold (700)"},{value:"800",label:"Extra Bold (800)"}],onChange:function(e){return p({fontWeight:e})}}),(0,i.jsx)(_,{label:"Line Height",value:s.lineHeight,onChange:function(e){return p({lineHeight:e})},min:.5,max:3,step:.1}),(0,i.jsx)(_,{label:"Letter Spacing (px)",value:s.letterSpacing,onChange:function(e){return p({letterSpacing:e})},min:-5,max:10,step:.1}),(0,i.jsx)(P,{label:"Text Transform",value:s.textTransform,options:[{value:"",label:"Select"},{value:"none",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"UPPERCASE"},{value:"lowercase",label:"lowercase"}],onChange:function(e){return p({textTransform:e})}})]})},"typo-popover")]})},function(e,t){return a(e,t,["label","typography"])});function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var H=wp.components,z=H.Button,D=H.Flex,L=H.Popover,W=H.ColorPalette,$=wp.element,G=$.useState,U=$.useRef,V=$.useEffect;const q=(0,$.memo)(function(e){var t=e.label,o=e.value,n=e.onChange,r=e.defaultColor,l=void 0===r?"":r,a=R(G(!1),2),u=a[0],c=a[1],s=R(G(o||l),2),d=s[0],f=s[1],p=R(G(!1),2),b=p[0],h=(p[1],R(G(!1),2)),g=h[0],m=h[1],v=U(null),y=U(null),x=U(null);V(function(){f(o||"")},[o]),V(function(){m(d!==l&&null!=d)},[d,l]);return V(function(){if(u){var e=function(e){e.target.closest(".components-color-picker, .components-color-palette")||y.current&&!y.current.contains(e.target)&&x.current&&!x.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e,!0),function(){document.removeEventListener("mousedown",e,!0)}}},[u]),(0,i.jsxs)("div",{className:"ffblock-control-field ffblock-control-color-wrap",ref:v,children:[(0,i.jsxs)(D,{align:"center",justify:"space-between",children:[(0,i.jsx)("span",{className:"ffblock-label",children:t}),(0,i.jsxs)("div",{className:"ffblock-flex-gap",children:[g&&(0,i.jsx)(z,{icon:"image-rotate",isSmall:!0,onClick:function(){f(l),n(l)},label:"Reset to default",className:"ffblock-reset-button"}),(0,i.jsx)("div",{className:"ffblock-color-button",onClick:function(e){e.stopPropagation(),c(!u)},ref:y,children:(0,i.jsx)("div",{className:"ffblock-color-swatch ".concat(b?"ffblock-color-transparent-pattern":""),style:{backgroundColor:d||"transparent"},title:d||"transparent"})})]})]}),u&&(0,i.jsx)(L,{onClose:function(){},anchor:y.current,focusOnMount:!1,noArrow:!1,position:"middle right",expandOnMobile:!0,className:"ffblock-color-popover",offset:16,flip:!0,resize:!0,__unstableSlotName:"ffblock-popover-content",children:(0,i.jsxs)("div",{className:"ffblock-popover-content",ref:x,children:[(0,i.jsxs)("div",{className:"ffblock-color-picker-header",children:[(0,i.jsx)("span",{children:"Select Color"}),(0,i.jsx)(z,{className:"ffblock-color-picker-close",onClick:function(){return c(!1)},icon:"no-alt",isSmall:!0,label:"Close"})]}),(0,i.jsx)(W,{colors:[{name:"Theme Blue",color:"#72aee6"},{name:"Theme Red",color:"#e65054"},{name:"Theme Green",color:"#68de7c"},{name:"Black",color:"#000000"},{name:"White",color:"#ffffff"},{name:"Gray",color:"#dddddd"}],value:d,onChange:function(e){f(e),n(e)},enableAlpha:!0,clearable:!0})]})})]})},function(e,t){return a(e,t,["label","value","defaultColor"])});var K=wp.element.memo,J=wp.i18n.__,Z=wp.components.PanelBody;const Y=K(function(e){var t=e.styles,o=e.updateStyles;return(0,i.jsxs)(Z,{title:J("Label Styles"),initialOpen:!1,children:[(0,i.jsx)(q,{label:"Color",value:t.labelColor,onChange:function(e){return o({labelColor:e})},defaultColor:""}),(0,i.jsx)(M,{label:"Typography",typography:t.labelTypography||{},onChange:function(e){return o({labelTypography:e})}})]})},function(e,t){return l(e.styles,t.styles,["labelColor","labelTypography"])});function X(e){return X="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},X(e)}function Q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function ee(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(o),!0).forEach(function(t){te(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Q(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function te(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=X(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==X(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ne(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?ne(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var re=wp.components,le=re.Button,ae=re.ButtonGroup,ie=re.TextControl,ue=re.Tooltip,ce=re.DropdownMenu,se=wp.element,de=se.useState,fe=se.useEffect,pe=se.memo,be=wp.i18n.__;const he=pe(function(e){var t=e.label,o=e.values,n=e.onChange,r=e.units,l=void 0===r?[{value:"px",key:"px-unit"},{value:"em",key:"em-unit"},{value:"%",key:"percent-unit"}]:r,a=e.showPresetsToggle,u=void 0===a||a,c=e.presetType,s=void 0===c?"spacing":c,d=oe(de("desktop"),2),f=d[0],p=d[1],b=!o||!o[f]||void 0===o[f].linked||o[f].linked,h=oe(de(b),2),g=h[0],m=h[1],v=oe(de("px"),2),y=v[0],x=v[1],k=oe(de(!1),2),S=k[0],j=k[1],C=oe(de({}),2),w=C[0],B=C[1],O=oe(de(!1),2),T=O[0],P=O[1];fe(function(){if(o){var e,t,n,r,l,a,i,u,c,s,d,p,b,h,g,v,y,k,S,C,w,O,T,P,A,E,N,I,M,R,F,H,z={desktop:{unit:(null===(e=o.desktop)||void 0===e?void 0:e.unit)||o.unit||"px",top:null!==(t=null===(n=o.desktop)||void 0===n?void 0:n.top)&&void 0!==t?t:"",right:null!==(r=null===(l=o.desktop)||void 0===l?void 0:l.right)&&void 0!==r?r:"",bottom:null!==(a=null===(i=o.desktop)||void 0===i?void 0:i.bottom)&&void 0!==a?a:"",left:null!==(u=null===(c=o.desktop)||void 0===c?void 0:c.left)&&void 0!==u?u:"",linked:void 0===(null===(s=o.desktop)||void 0===s?void 0:s.linked)||o.desktop.linked},tablet:{unit:null!==(d=null===(p=o.tablet)||void 0===p?void 0:p.unit)&&void 0!==d?d:o.unit||"px",top:null!==(b=null===(h=o.tablet)||void 0===h?void 0:h.top)&&void 0!==b?b:"",right:null!==(g=null===(v=o.tablet)||void 0===v?void 0:v.right)&&void 0!==g?g:"",bottom:null!==(y=null===(k=o.tablet)||void 0===k?void 0:k.bottom)&&void 0!==y?y:"",left:null!==(S=null===(C=o.tablet)||void 0===C?void 0:C.left)&&void 0!==S?S:"",linked:void 0===(null===(w=o.tablet)||void 0===w?void 0:w.linked)||o.tablet.linked},mobile:{unit:null!==(O=null===(T=o.mobile)||void 0===T?void 0:T.unit)&&void 0!==O?O:o.unit||"px",top:null!==(P=null===(A=o.mobile)||void 0===A?void 0:A.top)&&void 0!==P?P:"",right:null!==(E=null===(N=o.mobile)||void 0===N?void 0:N.right)&&void 0!==E?E:"",bottom:null!==(I=null===(M=o.mobile)||void 0===M?void 0:M.bottom)&&void 0!==I?I:"",left:null!==(R=null===(F=o.mobile)||void 0===F?void 0:F.left)&&void 0!==R?R:"",linked:void 0===(null===(H=o.mobile)||void 0===H?void 0:H.linked)||o.mobile.linked}};B(z),m(!1!==z[f].linked),x(z[f].unit||"px"),j(_(z))}},[o,f]);var _=function(e){for(var t=0,o=["desktop","tablet","mobile"];t<o.length;t++){var n=o[t];if(e[n]){var r=e[n];if(""!==r.top||""!==r.right||""!==r.bottom||""!==r.left)return!0}}return!1};fe(function(){w[f]&&(m(!1!==w[f].linked),x(w[f].unit||"px"),j(_(w)))},[f,w]);var A=function(e,t){var o=""===t?"":"em"===y||"%"===y?parseFloat(t):parseInt(t);if(""!==t)j(!0);else{var r=ee({},w),l=ee({},r[f]);l[e]=o,r[f]=l,j(_(r))}if(g){var a=ee({},w),i=ee({},a[f]);i.top=o,i.right=o,i.bottom=o,i.left=o,i.linked=!0,a[f]=i,B(a),n&&n(a)}else{var u=ee({},w),c=ee({},u[f]);c[e]=o,c.linked=g,u[f]=c,B(u),n&&n(u)}},E=w[f]||{desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}}[f],N=[{label:be("None"),value:{desktop:{unit:"px",top:"0",right:"0",bottom:"0",left:"0",linked:!0},tablet:{unit:"px",top:"0",right:"0",bottom:"0",left:"0",linked:!0},mobile:{unit:"px",top:"0",right:"0",bottom:"0",left:"0",linked:!0}}},{label:be("Small"),value:{desktop:{unit:"px",top:"10",right:"10",bottom:"10",left:"10",linked:!0},tablet:{unit:"px",top:"8",right:"8",bottom:"8",left:"8",linked:!0},mobile:{unit:"px",top:"5",right:"5",bottom:"5",left:"5",linked:!0}}},{label:be("Medium"),value:{desktop:{unit:"px",top:"20",right:"20",bottom:"20",left:"20",linked:!0},tablet:{unit:"px",top:"15",right:"15",bottom:"15",left:"15",linked:!0},mobile:{unit:"px",top:"10",right:"10",bottom:"10",left:"10",linked:!0}}},{label:be("Large"),value:{desktop:{unit:"px",top:"30",right:"30",bottom:"30",left:"30",linked:!0},tablet:{unit:"px",top:"25",right:"25",bottom:"25",left:"25",linked:!0},mobile:{unit:"px",top:"20",right:"20",bottom:"20",left:"20",linked:!0}}},{label:be("Custom V"),value:{desktop:{unit:"px",top:"20",right:"0",bottom:"20",left:"0",linked:!1},tablet:{unit:"px",top:"15",right:"0",bottom:"15",left:"0",linked:!1},mobile:{unit:"px",top:"10",right:"0",bottom:"10",left:"0",linked:!1}}},{label:be("Custom H"),value:{desktop:{unit:"px",top:"0",right:"20",bottom:"0",left:"20",linked:!1},tablet:{unit:"px",top:"0",right:"15",bottom:"0",left:"15",linked:!1},mobile:{unit:"px",top:"0",right:"10",bottom:"0",left:"10",linked:!1}}}],I=[{label:be("None"),value:{desktop:{unit:"px",top:"0",right:"0",bottom:"0",left:"0",linked:!0},tablet:{unit:"px",top:"0",right:"0",bottom:"0",left:"0",linked:!0},mobile:{unit:"px",top:"0",right:"0",bottom:"0",left:"0",linked:!0}}},{label:be("Small"),value:{desktop:{unit:"px",top:"3",right:"3",bottom:"3",left:"3",linked:!0},tablet:{unit:"px",top:"3",right:"3",bottom:"3",left:"3",linked:!0},mobile:{unit:"px",top:"3",right:"3",bottom:"3",left:"3",linked:!0}}},{label:be("Medium"),value:{desktop:{unit:"px",top:"5",right:"5",bottom:"5",left:"5",linked:!0},tablet:{unit:"px",top:"5",right:"5",bottom:"5",left:"5",linked:!0},mobile:{unit:"px",top:"5",right:"5",bottom:"5",left:"5",linked:!0}}},{label:be("Large"),value:{desktop:{unit:"px",top:"10",right:"10",bottom:"10",left:"10",linked:!0},tablet:{unit:"px",top:"10",right:"10",bottom:"10",left:"10",linked:!0},mobile:{unit:"px",top:"10",right:"10",bottom:"10",left:"10",linked:!0}}},{label:be("Rounded"),value:{desktop:{unit:"px",top:"15",right:"15",bottom:"15",left:"15",linked:!0},tablet:{unit:"px",top:"15",right:"15",bottom:"15",left:"15",linked:!0},mobile:{unit:"px",top:"15",right:"15",bottom:"15",left:"15",linked:!0}}},{label:be("Pill"),value:{desktop:{unit:"px",top:"50",right:"50",bottom:"50",left:"50",linked:!0},tablet:{unit:"px",top:"50",right:"50",bottom:"50",left:"50",linked:!0},mobile:{unit:"px",top:"50",right:"50",bottom:"50",left:"50",linked:!0}}}],M="radius"===s?I:N;return(0,i.jsxs)("div",{className:"ffblock-control-field ffblock-control-space",children:[(0,i.jsxs)("div",{className:"ffblock-space-header",children:[(0,i.jsx)("div",{className:"ffblock-label-container",children:(0,i.jsx)("span",{className:"ffblock-label",children:t})}),(0,i.jsxs)("div",{className:"ffblock-header-actions",children:[u&&(0,i.jsx)(le,{icon:"grid-view",isSmall:!0,onClick:function(){return P(!T)},className:"ffblock-preset-toggle",label:be("radius"===s?"Border Radius Presets":"Spacing Presets")}),S&&(0,i.jsx)(ue,{text:be("Reset spacing values"),children:(0,i.jsx)(le,{onClick:function(){m(!0),x("px"),j(!1);var e={desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}};B(e),n&&n(e)},className:"ffblock-reset-button",icon:"image-rotate",isSmall:!0})})]})]}),u&&T&&(0,i.jsx)("div",{className:"ffblock-presets-container",children:(0,i.jsx)("div",{className:"ffblock-presets-grid",children:M.map(function(e,t){return(0,i.jsxs)(le,{className:"ffblock-preset-button ".concat("radius"===s?"":"ffblock-preset-text-only"),onClick:function(){return function(e){B(e.value),m(e.value[f].linked),x(e.value[f].unit),j(!0),n&&n(e.value),P(!1)}(e)},children:["radius"===s&&(0,i.jsx)("div",{className:"ffblock-preset-preview ffblock-radius-preview",children:(0,i.jsx)("div",{className:"ffblock-radius-box",style:{border:"2px solid #dddddd",borderRadius:"".concat(e.value.desktop.top||0,"px")}})}),(0,i.jsx)("span",{className:"ffblock-preset-label",children:e.label})]},t)})})}),(0,i.jsx)("div",{className:"ffblock-space-body",children:(0,i.jsxs)("div",{className:"ffblock-space-controls",children:[(0,i.jsx)("div",{className:"ffblock-device-selector",children:(0,i.jsx)(ce,{className:"ffblock-device-dropdown",icon:"desktop"===f?"desktop":"tablet"===f?"tablet":"smartphone",label:be("Select device"),controls:[{value:"desktop",label:be("Desktop"),icon:"desktop"},{value:"tablet",label:be("Tablet"),icon:"tablet"},{value:"mobile",label:be("Mobile"),icon:"smartphone"}].map(function(e){return{title:e.label,icon:e.icon,isActive:f===e.value,onClick:function(){p(e.value),w[e.value]&&m(!1!==w[e.value].linked)}}})})}),(0,i.jsx)("div",{className:"ffblock-unit-selector",children:(0,i.jsx)(ae,{children:l.map(function(e){return(0,i.jsx)(le,{isSmall:!0,isPrimary:y===e.value,onClick:function(){return function(e){x(e);var t=ee(ee({},w),{},te({},f,ee(ee({},w[f]),{},{unit:e})));n(t)}(e.value)},children:e.value.toUpperCase()},e.key)})})})]})}),(0,i.jsx)("div",{className:"ffblock-space-inputs device-".concat(f),children:(0,i.jsxs)("div",{className:"ffblock-space-input-row",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(ie,{type:"number",value:E.top,onChange:function(e){return A("top",e)},min:0,step:"em"===y||"%"===y?.1:1}),(0,i.jsx)("span",{children:"TOP"},"label-top")]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(ie,{type:"number",value:E.right,onChange:function(e){return A("right",e)},min:0,step:"em"===y||"%"===y?.1:1}),(0,i.jsx)("span",{children:"RIGHT"},"label-right")]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(ie,{type:"number",value:E.bottom,onChange:function(e){return A("bottom",e)},min:0,step:"em"===y||"%"===y?.1:1}),(0,i.jsx)("span",{children:"BOTTOM"},"label-bottom")]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(ie,{type:"number",value:E.left,onChange:function(e){return A("left",e)},min:0,step:"em"===y||"%"===y?.1:1}),(0,i.jsx)("span",{children:"LEFT"},"label-left")]}),(0,i.jsx)(le,{icon:g?"admin-links":"editor-unlink",onClick:function(){var e=!g;m(e);var t=ee(ee({},w),{},te({},f,ee(ee({},w[f]),{},{linked:e})));n(t)},className:"ffblock-linked-button"})]})})]})},function(e,t){return a(e,t,["label","values","units"])});function ge(e){return ge="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},ge(e)}function me(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function ve(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?me(Object(o),!0).forEach(function(t){ye(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):me(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function ye(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=ge(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ge(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ke(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?ke(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var Se=wp.components,je=Se.BaseControl,Ce=Se.ToggleControl,we=Se.SelectControl,Be=Se.Button,Oe=wp.element,Te=Oe.useEffect,Pe=Oe.memo,_e=Oe.useCallback,Ae=Oe.useRef,Ee=Oe.useState,Ne=wp.i18n.__;const Ie=Pe(function(e){var t=e.label,o=void 0===t?Ne("Border"):t,n=e.border,r=void 0===n?{}:n,l=e.onChange,a=e.defaultColor,u=void 0===a?"#dddddd":a,c=xe(Ee(!1),2),s=c[0],d=c[1],f=Ae(r||{enable:!1,type:"solid",color:"",width:{},radius:{}});Te(function(){f.current=r||f.current},[r]);var p=_e(function(e){var t=ve(ve({},f.current),e);f.current=t,l&&l(t)},[f,l]),b=[{label:Ne("Solid"),value:"solid"},{label:Ne("Dashed"),value:"dashed"},{label:Ne("Dotted"),value:"dotted"},{label:Ne("Double"),value:"double"}],h=[{label:Ne("None"),value:{enable:!1,type:"solid",color:"",width:{desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}},radius:{desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}}}},{label:Ne("Thin"),value:{enable:!0,type:"solid",color:"#dddddd",width:{desktop:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0},tablet:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0},mobile:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0}},radius:{desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}}}},{label:Ne("Medium"),value:{enable:!0,type:"solid",color:"#dddddd",width:{desktop:{unit:"px",top:"2",right:"2",bottom:"2",left:"2",linked:!0},tablet:{unit:"px",top:"2",right:"2",bottom:"2",left:"2",linked:!0},mobile:{unit:"px",top:"2",right:"2",bottom:"2",left:"2",linked:!0}},radius:{desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}}}},{label:Ne("Rounded"),value:{enable:!0,type:"solid",color:"#dddddd",width:{desktop:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0},tablet:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0},mobile:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0}},radius:{desktop:{unit:"px",top:"5",right:"5",bottom:"5",left:"5",linked:!0},tablet:{unit:"px",top:"5",right:"5",bottom:"5",left:"5",linked:!0},mobile:{unit:"px",top:"5",right:"5",bottom:"5",left:"5",linked:!0}}}},{label:Ne("Pill"),value:{enable:!0,type:"solid",color:"#dddddd",width:{desktop:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0},tablet:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0},mobile:{unit:"px",top:"1",right:"1",bottom:"1",left:"1",linked:!0}},radius:{desktop:{unit:"px",top:"50",right:"50",bottom:"50",left:"50",linked:!0},tablet:{unit:"px",top:"50",right:"50",bottom:"50",left:"50",linked:!0},mobile:{unit:"px",top:"50",right:"50",bottom:"50",left:"50",linked:!0}}}},{label:Ne("Dashed"),value:{enable:!0,type:"dashed",color:"#dddddd",width:{desktop:{unit:"px",top:"2",right:"2",bottom:"2",left:"2",linked:!0},tablet:{unit:"px",top:"2",right:"2",bottom:"2",left:"2",linked:!0},mobile:{unit:"px",top:"2",right:"2",bottom:"2",left:"2",linked:!0}},radius:{desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}}}}];return(0,i.jsxs)(je,{label:o,className:"ffblock-border-control",children:[(0,i.jsxs)("div",{className:"ffblock-control-header",children:[(0,i.jsx)(Ce,{label:Ne("Enable Border"),checked:r.enable,onChange:function(e){var t={enable:e};e&&(r.color||(t.color=u),r.type||(t.type="solid"),r.width&&0!==Object.keys(r.width).length||(t.width={desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}}),r.radius&&0!==Object.keys(r.radius).length||(t.radius={desktop:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},tablet:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0},mobile:{unit:"px",top:"",right:"",bottom:"",left:"",linked:!0}})),p(t)}}),(0,i.jsx)(Be,{icon:"grid-view",isSmall:!0,onClick:function(){return d(!s)},className:"ffblock-preset-toggle",label:Ne("Border Presets")})]}),s&&(0,i.jsx)("div",{className:"ffblock-presets-container",children:(0,i.jsx)("div",{className:"ffblock-presets-grid",children:h.map(function(e,t){return(0,i.jsxs)(Be,{className:"ffblock-preset-button",onClick:function(){return function(e){p(e.value),d(!1)}(e)},children:[(0,i.jsx)("div",{className:"ffblock-preset-preview ffblock-border-preview",children:(0,i.jsx)("div",{className:"ffblock-border-box",style:{border:e.value.enable?"".concat(e.value.width.desktop.top||0,"px ").concat(e.value.type," ").concat(e.value.color):"none",borderRadius:e.value.enable&&e.value.radius.desktop.top?"".concat(e.value.radius.desktop.top,"px"):"0"}})}),(0,i.jsx)("span",{className:"ffblock-preset-label",children:e.label})]},t)})})}),r.enable&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(we,{label:Ne("Border Type"),value:r.type||"solid",options:b,onChange:function(e){return p({type:e})}}),(0,i.jsx)(q,{label:Ne("Border Color"),value:r.color||"",onChange:function(e){return p({color:e})},defaultColor:u}),(0,i.jsx)(he,{label:Ne("Border Width"),values:r.width,onChange:function(e){return p({width:e})},showPresetsToggle:!1}),(0,i.jsx)(he,{label:Ne("Border Radius"),values:r.radius,onChange:function(e){return p({radius:e})},showPresetsToggle:!0,presetType:"radius"})]})]})},function(e,t){return a(e,t,["label","defaultColor","border"])});function Me(e){return Me="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},Me(e)}function Re(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Fe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(o),!0).forEach(function(t){He(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Re(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function He(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=Me(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Me(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return De(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?De(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var Le=wp.components,We=Le.BaseControl,$e=Le.ToggleControl,Ge=Le.SelectControl,Ue=Le.Button,Ve=(Le.ButtonGroup,wp.element),qe=Ve.useEffect,Ke=Ve.memo,Je=(Ve.useCallback,Ve.useRef),Ze=Ve.useState,Ye=wp.i18n.__;const Xe=Ke(function(e){var t,o,n,r,l,a,u,c,s=e.label,d=void 0===s?Ye("Box Shadow"):s,f=e.shadow,p=void 0===f?{}:f,b=e.onChange,h=e.defaultColor,g=void 0===h?"rgba(0,0,0,0.5)":h,m=ze(Ze(!1),2),v=m[0],y=m[1],x=Je(p||{enable:!1,color:"",position:"outline",horizontal:{value:"0",unit:"px"},vertical:{value:"0",unit:"px"},blur:{value:"5",unit:"px"},spread:{value:"0",unit:"px"}});qe(function(){x.current=p||x.current},[p]);var k=function(e){var t=Fe(Fe({},x.current),e);x.current=t,b&&b(t)},S=[{label:Ye("Outline"),value:"outline"},{label:Ye("Inset"),value:"inset"}],j=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"%",value:"%"}],C=[{label:Ye("None"),value:{enable:!1,color:"",position:"outline",horizontal:{value:"0",unit:"px"},vertical:{value:"0",unit:"px"},blur:{value:"0",unit:"px"},spread:{value:"0",unit:"px"}}},{label:Ye("Subtle"),value:{enable:!0,color:"rgba(0,0,0,0.1)",position:"outline",horizontal:{value:"0",unit:"px"},vertical:{value:"2",unit:"px"},blur:{value:"4",unit:"px"},spread:{value:"0",unit:"px"}}},{label:Ye("Small"),value:{enable:!0,color:"rgba(0,0,0,0.15)",position:"outline",horizontal:{value:"0",unit:"px"},vertical:{value:"4",unit:"px"},blur:{value:"6",unit:"px"},spread:{value:"0",unit:"px"}}},{label:Ye("Medium"),value:{enable:!0,color:"rgba(0,0,0,0.2)",position:"outline",horizontal:{value:"0",unit:"px"},vertical:{value:"6",unit:"px"},blur:{value:"12",unit:"px"},spread:{value:"0",unit:"px"}}},{label:Ye("Large"),value:{enable:!0,color:"rgba(0,0,0,0.25)",position:"outline",horizontal:{value:"0",unit:"px"},vertical:{value:"10",unit:"px"},blur:{value:"20",unit:"px"},spread:{value:"0",unit:"px"}}},{label:Ye("Inset"),value:{enable:!0,color:"rgba(0,0,0,0.15)",position:"inset",horizontal:{value:"0",unit:"px"},vertical:{value:"2",unit:"px"},blur:{value:"4",unit:"px"},spread:{value:"0",unit:"px"}}}];return(0,i.jsxs)(We,{label:d,className:"ffblock-box-shadow-control",children:[(0,i.jsxs)("div",{className:"ffblock-control-header",children:[(0,i.jsx)($e,{label:Ye("Enable Box Shadow"),checked:p.enable,onChange:function(e){var t,o,n,r,l={enable:e};e&&(p.color||(l.color=g),p.position||(l.position="outline"),null!==(t=p.horizontal)&&void 0!==t&&t.value||(l.horizontal={value:"0",unit:"px"}),null!==(o=p.vertical)&&void 0!==o&&o.value||(l.vertical={value:"0",unit:"px"}),null!==(n=p.blur)&&void 0!==n&&n.value||(l.blur={value:"5",unit:"px"}),null!==(r=p.spread)&&void 0!==r&&r.value||(l.spread={value:"0",unit:"px"}));k(l)}}),(0,i.jsx)(Ue,{icon:"grid-view",isSmall:!0,onClick:function(){return y(!v)},className:"ffblock-preset-toggle",label:Ye("Shadow Presets")})]}),v&&(0,i.jsx)("div",{className:"ffblock-presets-container",children:(0,i.jsx)("div",{className:"ffblock-presets-grid",children:C.map(function(e,t){return(0,i.jsxs)(Ue,{className:"ffblock-preset-button",onClick:function(){return function(e){k(e.value),y(!1)}(e)},children:[(0,i.jsx)("div",{className:"ffblock-preset-preview ffblock-shadow-preview",children:(0,i.jsx)("div",{className:"ffblock-shadow-box",style:{boxShadow:e.value.enable?"".concat("inset"===e.value.position?"inset ":"").concat(e.value.horizontal.value).concat(e.value.horizontal.unit," ").concat(e.value.vertical.value).concat(e.value.vertical.unit," ").concat(e.value.blur.value).concat(e.value.blur.unit," ").concat(e.value.spread.value).concat(e.value.spread.unit," ").concat(e.value.color):"none"}})}),(0,i.jsx)("span",{className:"ffblock-preset-label",children:e.label})]},t)})})}),p.enable&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q,{label:Ye("Shadow Color"),value:p.color||"",onChange:function(e){return k({color:e})},defaultColor:g}),(0,i.jsx)(Ge,{label:Ye("Shadow Position"),value:p.position||"outline",options:S,onChange:function(e){return k({position:e})}}),(0,i.jsx)(We,{label:Ye("Horizontal Offset"),children:(0,i.jsxs)("div",{className:"ffblock-unit-control",children:[(0,i.jsx)("input",{type:"number",className:"components-text-control__input",value:(null===(t=p.horizontal)||void 0===t?void 0:t.value)||"",onChange:function(e){return k({horizontal:Fe(Fe({},p.horizontal),{},{value:e.target.value})})},min:"-50",max:"50",placeholder:"0"}),(0,i.jsx)(Ge,{value:(null===(o=p.horizontal)||void 0===o?void 0:o.unit)||"px",options:j,onChange:function(e){return k({horizontal:Fe(Fe({},p.horizontal),{},{unit:e})})}})]})}),(0,i.jsx)(We,{label:Ye("Vertical Offset"),children:(0,i.jsxs)("div",{className:"ffblock-unit-control",children:[(0,i.jsx)("input",{type:"number",className:"components-text-control__input",value:(null===(n=p.vertical)||void 0===n?void 0:n.value)||"",onChange:function(e){return k({vertical:Fe(Fe({},p.vertical),{},{value:e.target.value})})},min:"-50",max:"50",placeholder:"0"}),(0,i.jsx)(Ge,{value:(null===(r=p.vertical)||void 0===r?void 0:r.unit)||"px",options:j,onChange:function(e){return k({vertical:Fe(Fe({},p.vertical),{},{unit:e})})}})]})}),(0,i.jsx)(We,{label:Ye("Blur Radius"),children:(0,i.jsxs)("div",{className:"ffblock-unit-control",children:[(0,i.jsx)("input",{type:"number",className:"components-text-control__input",value:(null===(l=p.blur)||void 0===l?void 0:l.value)||"",onChange:function(e){return k({blur:Fe(Fe({},p.blur),{},{value:e.target.value})})},min:"0",max:"100",placeholder:"0"}),(0,i.jsx)(Ge,{value:(null===(a=p.blur)||void 0===a?void 0:a.unit)||"px",options:j,onChange:function(e){return k({blur:Fe(Fe({},p.blur),{},{unit:e})})}})]})}),(0,i.jsx)(We,{label:Ye("Spread Radius"),children:(0,i.jsxs)("div",{className:"ffblock-unit-control",children:[(0,i.jsx)("input",{type:"number",className:"components-text-control__input",value:(null===(u=p.spread)||void 0===u?void 0:u.value)||"",onChange:function(e){return k({spread:Fe(Fe({},p.spread),{},{value:e.target.value})})},min:"-50",max:"50",placeholder:"0"}),(0,i.jsx)(Ge,{value:(null===(c=p.spread)||void 0===c?void 0:c.unit)||"px",options:j,onChange:function(e){return k({spread:Fe(Fe({},p.spread),{},{unit:e})})}})]})})]})]})},function(e,t){return a(e,t,["label","defaultColor","shadow"])});var Qe=wp.element.memo,et=wp.i18n.__,tt=wp.components,ot=tt.PanelBody,nt=tt.TabPanel;const rt=Qe(function(e){var t=e.styles,o=e.updateStyles;return(0,i.jsx)(ot,{title:et("Input & Textarea"),initialOpen:!1,children:(0,i.jsx)(nt,{className:"input-styles-tabs",activeClass:"is-active",tabs:[{name:"normal",title:et("Normal"),className:"tab-normal"},{name:"focus",title:et("Focus"),className:"tab-focus"}],children:function(e){return"normal"===e.name?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q,{label:"Text Color",value:(null==t?void 0:t.inputTextColor)||"",onChange:function(e){o({inputTextColor:e})},defaultColor:""},"input-text-color-normal"),(0,i.jsx)(q,{label:"Background Color",value:(null==t?void 0:t.inputBackgroundColor)||"",onChange:function(e){o({inputBackgroundColor:e})},defaultColor:""},"input-bg-color-normal"),(0,i.jsx)(M,{label:"Typography",typography:t.inputTypography||{},onChange:function(e){return o({inputTypography:e})}}),(0,i.jsx)(he,{label:"Spacing",values:t.inputSpacing,onChange:function(e){return o({inputSpacing:e})}}),(0,i.jsx)(Ie,{label:et("Border"),border:t.inputBorder||{},onChange:function(e){return o({inputBorder:e})}}),(0,i.jsx)(Xe,{label:et("Box Shadow"),shadow:t.inputBoxShadow||{},onChange:function(e){return o({inputBoxShadow:e})}})]}):"focus"===e.name?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q,{label:"Text Color",value:t.inputTextFocusColor||"",onChange:function(e){o({inputTextFocusColor:e})},defaultColor:""},"input-text-color-focus"),(0,i.jsx)(q,{label:"Background Color",value:(null==t?void 0:t.inputBackgroundFocusColor)||"",onChange:function(e){o({inputBackgroundFocusColor:e})},defaultColor:""},"input-bg-color-focus"),(0,i.jsx)(he,{label:"Spacing",values:t.inputFocusSpacing,onChange:function(e){return o({inputFocusSpacing:e})}}),(0,i.jsx)(Ie,{label:et("Border"),border:t.inputBorderFocus||{},onChange:function(e){return o({inputBorderFocus:e})}}),(0,i.jsx)(Xe,{label:et("Box Shadow"),shadow:t.inputBoxShadowFocus||{},onChange:function(e){return o({inputBoxShadowFocus:e})}})]}):null}})})},function(e,t){return l(e.styles,t.styles,["inputTextColor","inputBackgroundColor","inputTypography","inputSpacing","inputBorder","inputBoxShadow","inputTextFocusColor","inputBackgroundFocusColor","inputFocusSpacing","inputBorderFocus","inputBoxShadowFocus"])});function lt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return at(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?at(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var it=wp.element,ut=it.useState,ct=it.useEffect,st=it.memo,dt=wp.i18n.__,ft=wp.components,pt=ft.ButtonGroup,bt=ft.Button,ht=ft.Tooltip;const gt=st(function(e){var t=e.label,o=(void 0===t&&dt("Alignment"),e.value),n=void 0===o?"left":o,r=e.onChange,l=e.options,a=void 0===l?[{value:"left",icon:"editor-alignleft",label:dt("Left")},{value:"center",icon:"editor-aligncenter",label:dt("Center")},{value:"right",icon:"editor-alignright",label:dt("Right")}]:l,u=lt(ut(n),2),c=u[0],s=u[1];ct(function(){n!==c&&s(n)},[n]);return(0,i.jsx)("div",{className:"ffblock-alignment-control",children:(0,i.jsx)("div",{className:"ffblock-alignment-buttons",children:(0,i.jsx)(pt,{children:a.map(function(e){return(0,i.jsx)(ht,{text:e.label,children:(0,i.jsx)(bt,{icon:e.icon,isPrimary:c===e.value,isSecondary:c!==e.value,onClick:function(){return t=e.value,s(t),void(r&&r(t));var t},"aria-label":e.label})},e.value)})})})})},function(e,t){return a(e,t,["label","value","options"])});var mt=wp.element.memo,vt=wp.i18n.__,yt=wp.components,xt=yt.PanelBody,kt=yt.TabPanel,St=yt.RangeControl;const jt=mt(function(e){var t=e.styles,o=e.updateStyles;return(0,i.jsxs)(xt,{title:vt("Button Styles"),initialOpen:!1,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{className:"ffblock-label",children:vt("Alignment")}),(0,i.jsx)(gt,{value:t.buttonAlignment,onChange:function(e){return o({buttonAlignment:e})},options:[{value:"left",icon:"editor-alignleft",label:vt("Left")},{value:"center",icon:"editor-aligncenter",label:vt("Center")},{value:"right",icon:"editor-alignright",label:vt("Right")}]})]}),(0,i.jsx)(St,{label:vt("Width (%)"),value:t.buttonWidth,onChange:function(e){return o({buttonWidth:e})},min:0,max:100,allowReset:!0,initialPosition:0,help:vt("Set to 0 for auto width")}),(0,i.jsx)(kt,{className:"button-styles-tabs",activeClass:"is-active",tabs:[{name:"normal",title:vt("Normal"),className:"tab-normal"},{name:"hover",title:vt("Hover"),className:"tab-hover"}],children:function(e){return"normal"===e.name?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q,{label:"Text Color",value:t.buttonColor,onChange:function(e){return o({buttonColor:e})},defaultColor:"#ffffff"}),(0,i.jsx)(q,{label:"Background Color",value:t.buttonBGColor,onChange:function(e){return o({buttonBGColor:e})},defaultColor:"#409EFF"}),(0,i.jsx)(M,{label:"Typography",typography:t.buttonTypography||{},onChange:function(e){return o({buttonTypography:e})}}),(0,i.jsx)(he,{label:"Padding",values:t.buttonPadding,onChange:function(e){return o({buttonPadding:e})}}),(0,i.jsx)(he,{label:"Margin",values:t.buttonMargin,onChange:function(e){return o({buttonMargin:e})}}),(0,i.jsx)(Xe,{label:vt("Box Shadow"),shadow:t.buttonBoxShadow||{},onChange:function(e){return o({buttonBoxShadow:e})}}),(0,i.jsx)(Ie,{label:vt("Border"),border:t.buttonBorder||{},onChange:function(e){return o({buttonBorder:e})}})]}):"hover"===e.name?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q,{label:"Text Color",value:t.buttonHoverColor,onChange:function(e){return o({buttonHoverColor:e})},defaultColor:"#ffffff"}),(0,i.jsx)(q,{label:"Background Color",value:t.buttonHoverBGColor,onChange:function(e){return o({buttonHoverBGColor:e})},defaultColor:"#66b1ff"}),(0,i.jsx)(M,{label:"Typography",typography:t.buttonHoverTypography||{},onChange:function(e){return o({buttonHoverTypography:e})}}),(0,i.jsx)(he,{label:"Padding",values:t.buttonHoverPadding,onChange:function(e){return o({buttonHoverPadding:e})}}),(0,i.jsx)(he,{label:"Margin",values:t.buttonHoverMargin,onChange:function(e){return o({buttonHoverMargin:e})}}),(0,i.jsx)(Xe,{label:vt("Box Shadow"),shadow:t.buttonHoverBoxShadow||{},onChange:function(e){return o({buttonHoverBoxShadow:e})}}),(0,i.jsx)(Ie,{label:vt("Border"),border:t.buttonHoverBorder||{},onChange:function(e){return o({buttonHoverBorder:e})}})]}):null}})]})},function(e,t){return l(e.styles,t.styles,["buttonWidth","buttonAlignment","buttonColor","buttonBGColor","buttonTypography","buttonPadding","buttonMargin","buttonBoxShadow","buttonBorder","buttonHoverColor","buttonHoverBGColor","buttonHoverTypography","buttonHoverPadding","buttonHoverMargin","buttonHoverBoxShadow","buttonHoverBorder"])});var Ct=wp.element.memo,wt=wp.i18n.__,Bt=wp.components.PanelBody;const Ot=Ct(function(e){var t=e.styles,o=e.updateStyles;return(0,i.jsxs)(Bt,{title:wt("Placeholder Styles"),initialOpen:!1,children:[(0,i.jsx)(q,{label:"Text Color",value:t.placeholderColor,onChange:function(e){return o({placeholderColor:e})},defaultColor:""}),(0,i.jsx)(M,{label:"Typography",typography:t.placeholderTypography||{},onChange:function(e){return o({placeholderTypography:e})}})]})},function(e,t){return l(e.styles,t.styles,["placeholderColor","placeholderTypography"])});function Tt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pt(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Pt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var _t=wp.element,At=_t.useState,Et=_t.useEffect,Nt=_t.memo,It=wp.i18n.__,Mt=wp.components,Rt=Mt.PanelBody,Ft=Mt.RangeControl;const Ht=Nt(function(e){var t=e.styles,o=e.updateStyles,n=Tt(At(t.radioCheckboxItemsSize||15),2),r=n[0],l=n[1];Et(function(){void 0!==t.radioCheckboxItemsSize&&t.radioCheckboxItemsSize!==r&&l(t.radioCheckboxItemsSize)},[t.radioCheckboxItemsSize]);return(0,i.jsxs)(Rt,{title:It("Radio & Checkbox Styles"),initialOpen:!1,children:[(0,i.jsx)(q,{label:"Items Color",value:t.radioCheckboxItemsColor,onChange:function(e){return o({radioCheckboxItemsColor:e})},defaultColor:""}),(0,i.jsxs)("div",{className:"ffblock-control-field",children:[(0,i.jsx)("span",{className:"ffblock-label",children:"Size (px)"}),(0,i.jsx)(Ft,{value:r,min:1,max:30,step:1,onChange:function(e){l(e),o({radioCheckboxItemsSize:e})}})]})]})},function(e,t){return l(e.styles,t.styles,["radioCheckboxItemsColor","radioCheckboxItemsSize"])});var zt=wp.element.memo,Dt=["labelColor","labelTypography","inputTextColor","inputBackgroundColor","inputTypography","inputSpacing","inputBorder","inputBorderFocus","inputTextFocusColor","inputBackgroundFocusColor","inputFocusSpacing","inputBoxShadow","inputBoxShadowFocus","placeholderColor","placeholderFocusColor","placeholderTypography","radioCheckboxLabelColor","radioCheckboxTypography","radioCheckboxItemsColor","radioCheckboxItemsSize","checkboxSize","checkboxBorderColor","checkboxBgColor","checkboxCheckedColor","radioSize","radioBorderColor","radioBgColor","radioCheckedColor","buttonWidth","buttonAlignment","buttonColor","buttonBGColor","buttonTypography","buttonPadding","buttonMargin","buttonBoxShadow","buttonBorder","buttonHoverColor","buttonHoverBGColor","buttonHoverTypography","buttonHoverPadding","buttonHoverMargin","buttonHoverBoxShadow","buttonHoverBorder"];const Lt=zt(function(e){var t=e.attributes,o=e.updateStyles,n=e.handlePresetChange;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m,{attributes:t,handlePresetChange:n}),(0,i.jsx)(Y,{styles:t.styles,updateStyles:o}),(0,i.jsx)(rt,{styles:t.styles,updateStyles:o}),(0,i.jsx)(Ot,{styles:t.styles,updateStyles:o}),(0,i.jsx)(Ht,{styles:t.styles,updateStyles:o}),(0,i.jsx)(jt,{styles:t.styles,updateStyles:o})]})},function(e,t){return e.attributes.themeStyle===t.attributes.themeStyle&&l(e.attributes.styles,t.attributes.styles,Dt)});function Wt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $t(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?$t(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}var Gt=wp.element,Ut=Gt.useState,Vt=Gt.useEffect,qt=Gt.memo,Kt=wp.i18n.__,Jt=wp.components,Zt=Jt.PanelBody,Yt=Jt.SelectControl,Xt=Jt.RangeControl,Qt=Jt.Button,eo=Jt.BaseControl,to=["backgroundType","backgroundImage","backgroundImageId","backgroundColor","gradientColor1","gradientColor2","containerPadding","containerMargin","containerBoxShadow","borderType","borderColor","borderWidth","borderRadius","enableFormBorder","formBorder","formWidth","backgroundSize","backgroundPosition","backgroundRepeat","backgroundAttachment","backgroundOverlayColor","backgroundOverlayOpacity","gradientType","gradientAngle","enableBoxShadow","boxShadowColor","boxShadowPosition","boxShadowHorizontal","boxShadowHorizontalUnit","boxShadowVertical","boxShadowVerticalUnit","boxShadowBlur","boxShadowBlurUnit","boxShadowSpread","boxShadowSpreadUnit","asteriskColor","errorMessageBgColor","errorMessageColor","errorMessageAlignment","successMessageBgColor","successMessageColor","successMessageAlignment","submitErrorMessageBgColor","submitErrorMessageColor","submitErrorMessageAlignment"];const oo=qt(function(e){var t=e.attributes,o=e.updateStyles,n=Wt(Ut(t.styles.backgroundType||"classic"),2),r=n[0],l=n[1],a=Wt(Ut(t.styles.backgroundImage||""),2),c=a[0],s=a[1];Vt(function(){void 0!==t.styles.backgroundType&&t.styles.backgroundType!==r&&l(t.styles.backgroundType)},[t.styles.backgroundType]),Vt(function(){t.styles.backgroundImage!==c&&s(t.styles.backgroundImage||"")},[t.styles.backgroundImage]);var d=function(e){l(e),o({backgroundType:e})},f=function(){var e=wp.media({title:Kt("Select Background Image"),button:{text:Kt("Use this image")},multiple:!1,library:{type:"image"}});e.on("select",function(){var t=e.state().get("selection").first().toJSON();s(t.url),o({backgroundImage:t.url,backgroundImageId:t.id})}),e.open()},p=c||t.styles.backgroundImage;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(Zt,{title:Kt("Container Styles"),initialOpen:!1,children:[(0,i.jsxs)("div",{className:"ffblock-control-field",children:[(0,i.jsx)("strong",{className:"ffblock-label",children:Kt("Background Type")}),(0,i.jsxs)("div",{className:"ffblock-radio-options",style:{display:"flex",gap:"8px",marginTop:"8px"},children:[(0,i.jsx)(Qt,{isPrimary:"classic"===r,isSecondary:"classic"!==r,onClick:function(){return d("classic")},style:{flex:1,justifyContent:"center"},children:Kt("Classic")}),(0,i.jsx)(Qt,{isPrimary:"gradient"===r,isSecondary:"gradient"!==r,onClick:function(){return d("gradient")},style:{flex:1,justifyContent:"center"},children:Kt("Gradient")})]})]}),"classic"===r&&(0,i.jsxs)("div",{className:"ffblock-control-field",children:[(0,i.jsxs)("div",{className:"ffblock-media-upload",children:[(0,i.jsx)("span",{className:"ffblock-label",children:Kt("Background Image")}),p?(0,i.jsxs)("div",{className:"ffblock-image-preview",style:{marginTop:"8px"},children:[(0,i.jsx)("div",{style:{backgroundImage:"url(".concat(p,")"),backgroundSize:"cover",backgroundPosition:"center",height:"120px",width:"100%",borderRadius:"4px",position:"relative",marginBottom:"8px",border:"1px solid #ddd"},children:(0,i.jsx)(Qt,{icon:"no-alt",onClick:function(){s(""),o({backgroundImage:"",backgroundImageId:0})},isDestructive:!0,style:{position:"absolute",top:"8px",right:"8px",background:"rgba(0,0,0,0.7)",color:"white",borderRadius:"50%",padding:"4px",minWidth:"auto",height:"28px",width:"28px"}})}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,i.jsx)(Qt,{isSecondary:!0,onClick:f,children:Kt("Replace Image")})})]}):(0,i.jsx)(Qt,{className:"ffblock-upload-button",icon:"upload",onClick:f,children:Kt("Upload Media")})]}),p&&(0,i.jsxs)("div",{style:{marginTop:"16px"},children:[(0,i.jsx)(Yt,{label:Kt("Background Size"),value:t.styles.backgroundSize||"cover",options:[{label:Kt("Cover"),value:"cover"},{label:Kt("Contain"),value:"contain"},{label:Kt("Auto"),value:"auto"}],onChange:function(e){return o({backgroundSize:e})}}),(0,i.jsx)(Yt,{label:Kt("Background Position"),value:t.styles.backgroundPosition||"center center",options:[{label:Kt("Center Center"),value:"center center"},{label:Kt("Center Top"),value:"center top"},{label:Kt("Center Bottom"),value:"center bottom"},{label:Kt("Left Center"),value:"left center"},{label:Kt("Left Top"),value:"left top"},{label:Kt("Left Bottom"),value:"left bottom"},{label:Kt("Right Center"),value:"right center"},{label:Kt("Right Top"),value:"right top"},{label:Kt("Right Bottom"),value:"right bottom"}],onChange:function(e){return o({backgroundPosition:e})}}),(0,i.jsx)(Yt,{label:Kt("Background Repeat"),value:t.styles.backgroundRepeat||"no-repeat",options:[{label:Kt("No Repeat"),value:"no-repeat"},{label:Kt("Repeat"),value:"repeat"},{label:Kt("Repeat X"),value:"repeat-x"},{label:Kt("Repeat Y"),value:"repeat-y"}],onChange:function(e){return o({backgroundRepeat:e})}})]})]}),"gradient"===r&&(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{className:"ffblock-label",children:Kt("Background Gradient")}),(0,i.jsxs)("div",{className:"ffblock-bg-gradient",children:[(0,i.jsx)(q,{label:Kt("Primary Color"),value:t.styles.gradientColor1||"",onChange:function(e){return o({gradientColor1:e})},defaultColor:""}),(0,i.jsx)(q,{label:Kt("Secondary Color"),value:t.styles.gradientColor2||"",onChange:function(e){return o({gradientColor2:e})},defaultColor:""}),(0,i.jsx)(Yt,{label:Kt("Gradient Type"),value:t.styles.gradientType||"linear",options:[{label:Kt("Linear"),value:"linear"},{label:Kt("Radial"),value:"radial"}],onChange:function(e){return o({gradientType:e})}}),"linear"===t.styles.gradientType&&(0,i.jsx)(Xt,{label:Kt("Gradient Angle (°)"),value:t.styles.gradientAngle||90,onChange:function(e){return o({gradientAngle:e})},min:0,max:360})]})]}),(0,i.jsx)(q,{label:Kt("Background Color"),value:t.styles.backgroundColor||"",onChange:function(e){return o({backgroundColor:e})},defaultColor:""}),(0,i.jsx)(he,{label:Kt("Padding"),values:t.styles.containerPadding,onChange:function(e){return o({containerPadding:e})}}),(0,i.jsx)(he,{label:Kt("Margin"),values:t.styles.containerMargin,onChange:function(e){return o({containerMargin:e})}}),(0,i.jsx)(u,{label:Kt("Box Shadow")}),(0,i.jsx)(Xe,{label:Kt("Box Shadow"),shadow:t.styles.containerBoxShadow||{},onChange:function(e){return o({containerBoxShadow:e})}}),(0,i.jsx)(u,{label:Kt("Form Border Settings")}),(0,i.jsx)(Ie,{label:Kt("Form Border"),border:t.styles.formBorder||{},onChange:function(e){return o({formBorder:e})}})]}),(0,i.jsx)(Zt,{title:Kt("Asterisk Styles"),initialOpen:!1,children:(0,i.jsx)(q,{label:Kt("Asterisk Color"),value:t.styles.asteriskColor||"",onChange:function(e){return o({asteriskColor:e})},defaultColor:"#ff0000"})}),(0,i.jsxs)(Zt,{title:Kt("Inline Error Message Styles"),initialOpen:!1,children:[(0,i.jsx)(q,{label:Kt("Background Color"),value:t.styles.errorMessageBgColor||"",onChange:function(e){return o({errorMessageBgColor:e})},defaultColor:""}),(0,i.jsx)(q,{label:Kt("Text Color"),value:t.styles.errorMessageColor||"",onChange:function(e){return o({errorMessageColor:e})},defaultColor:"#ff0000"}),(0,i.jsx)(eo,{label:Kt("Alignment"),children:(0,i.jsx)(gt,{value:t.styles.errorMessageAlignment||"left",onChange:function(e){return o({errorMessageAlignment:e})},options:[{value:"left",icon:"editor-alignleft",title:Kt("Align Left")},{value:"center",icon:"editor-aligncenter",title:Kt("Align Center")},{value:"right",icon:"editor-alignright",title:Kt("Align Right")}]})})]}),(0,i.jsxs)(Zt,{title:Kt("After Submit Success Message Styles"),initialOpen:!1,children:[(0,i.jsx)(q,{label:Kt("Background Color"),value:t.styles.successMessageBgColor||"",onChange:function(e){return o({successMessageBgColor:e})},defaultColor:"#dff0d8"}),(0,i.jsx)(q,{label:Kt("Text Color"),value:t.styles.successMessageColor||"",onChange:function(e){return o({successMessageColor:e})},defaultColor:"#3c763d"}),(0,i.jsx)(eo,{label:Kt("Alignment"),children:(0,i.jsx)(gt,{value:t.styles.successMessageAlignment||"left",onChange:function(e){return o({successMessageAlignment:e})},options:[{value:"left",icon:"editor-alignleft",title:Kt("Align Left")},{value:"center",icon:"editor-aligncenter",title:Kt("Align Center")},{value:"right",icon:"editor-alignright",title:Kt("Align Right")}]})})]}),(0,i.jsxs)(Zt,{title:Kt("After Submit Error Message Styles"),initialOpen:!1,children:[(0,i.jsx)(q,{label:Kt("Background Color"),value:t.styles.submitErrorMessageBgColor||"",onChange:function(e){return o({submitErrorMessageBgColor:e})},defaultColor:"#f2dede"}),(0,i.jsx)(q,{label:Kt("Text Color"),value:t.styles.submitErrorMessageColor||"",onChange:function(e){return o({submitErrorMessageColor:e})},defaultColor:"#a94442"}),(0,i.jsx)(eo,{label:Kt("Alignment"),children:(0,i.jsx)(gt,{value:t.styles.submitErrorMessageAlignment||"left",onChange:function(e){return o({submitErrorMessageAlignment:e})},options:[{value:"left",icon:"editor-alignleft",title:Kt("Align Left")},{value:"center",icon:"editor-aligncenter",title:Kt("Align Center")},{value:"right",icon:"editor-alignright",title:Kt("Align Right")}]})})]})]})},function(e,t){return l(e.attributes.styles,t.attributes.styles,to)});var no=wp.i18n.__,ro=wp.components.TabPanel;const lo=(0,wp.element.memo)(function(e){var t=e.attributes,o=e.updateStyles,n=e.handlePresetChange;return(0,i.jsx)(ro,{className:"fluent-form-block-style-tabs",activeClass:"is-active",tabs:[{name:"general",title:no("General"),key:"general-tab"},{name:"misc",title:no("Misc"),key:"misc-tab"}],children:function(e){return"general"===e.name?(0,i.jsx)("div",{children:(0,i.jsx)(Lt,{attributes:t,updateStyles:o,handlePresetChange:n})},"general-tab-content"):"misc"===e.name?(0,i.jsx)("div",{children:(0,i.jsx)(oo,{attributes:t,updateStyles:o})},"misc-tab-content"):null}})},function(e,t){return e.updateStyles===t.updateStyles&&e.handlePresetChange===t.handlePresetChange&&e.attributes===t.attributes});function ao(e){return ao="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},ao(e)}function io(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function uo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?io(Object(o),!0).forEach(function(t){co(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):io(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function co(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=ao(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ao(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function so(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],u=!0,c=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fo(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?fo(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function po(){var e,t,o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",r=o.toStringTag||"@@toStringTag";function l(o,n,r,l){var u=n&&n.prototype instanceof i?n:i,c=Object.create(u.prototype);return bo(c,"_invoke",function(o,n,r){var l,i,u,c=0,s=r||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,o){return l=t,i=0,u=e,f.n=o,a}};function p(o,n){for(i=o,u=n,t=0;!d&&c&&!r&&t<s.length;t++){var r,l=s[t],p=f.p,b=l[2];o>3?(r=b===n)&&(u=l[(i=l[4])?5:(i=3,3)],l[4]=l[5]=e):l[0]<=p&&((r=o<2&&p<l[1])?(i=0,f.v=n,f.n=l[1]):p<b&&(r=o<3||l[0]>n||n>b)&&(l[4]=o,l[5]=n,f.n=b,i=0))}if(r||o>1)return a;throw d=!0,n}return function(r,s,b){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,b),i=s,u=b;(t=i<2?e:u)||!d;){l||(i?i<3?(i>1&&(f.n=-1),p(i,u)):f.n=u:f.v=u);try{if(c=2,l){if(i||(r="next"),t=l[r]){if(!(t=t.call(l,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=l.return)&&t.call(l),i<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),i=1);l=e}else if((t=(d=f.n<0)?u:o.call(n,f))!==a)break}catch(t){l=e,i=1,u=t}finally{c=1}}return{value:t,done:d}}}(o,r,l),!0),c}var a={};function i(){}function u(){}function c(){}t=Object.getPrototypeOf;var s=[][n]?t(t([][n]())):(bo(t={},n,function(){return this}),t),d=c.prototype=i.prototype=Object.create(s);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,bo(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=c,bo(d,"constructor",c),bo(c,"constructor",u),u.displayName="GeneratorFunction",bo(c,r,"GeneratorFunction"),bo(d),bo(d,r,"Generator"),bo(d,n,function(){return this}),bo(d,"toString",function(){return"[object Generator]"}),(po=function(){return{w:l,m:f}})()}function bo(e,t,o,n){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}bo=function(e,t,o,n){function l(t,o){bo(e,t,function(e){return this._invoke(t,o,e)})}t?r?r(e,t,{value:o,enumerable:!n,configurable:!n,writable:!n}):e[t]=o:(l("next",0),l("throw",1),l("return",2))},bo(e,t,o,n)}function ho(e,t,o,n,r,l,a){try{var i=e[l](a),u=i.value}catch(e){return void o(e)}i.done?t(u):Promise.resolve(u).then(n,r)}function go(e){return function(){var t=this,o=arguments;return new Promise(function(n,r){var l=e.apply(t,o);function a(e){ho(l,n,r,a,i,"next",e)}function i(e){ho(l,n,r,a,i,"throw",e)}a(void 0)})}}var mo=wp.i18n.__,vo=wp.blockEditor,yo=vo.InspectorControls,xo=vo.BlockControls,ko=wp.serverSideRender,So=wp.apiFetch,jo=wp.element.memo,Co=wp.components,wo=Co.SelectControl,Bo=Co.PanelBody,Oo=Co.Spinner,To=Co.ToolbarGroup,Po=Co.ToolbarButton,_o=wp.element,Ao=_o.useState,Eo=_o.useEffect,No=_o.useRef,Io=_o.useCallback,Mo=_o.useMemo,Ro=wp.compose.useRefEffect,Fo=function(){var e=go(po().m(function e(t,o){var n,r;return po().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:return n="".concat(window.fluentform_block_vars.rest.namespace,"/").concat(window.fluentform_block_vars.rest.version,"/settings/").concat(t,"?meta_key=").concat(o),e.n=2,So({path:n});case 2:return r=e.v,e.a(2,r.length&&r[0].value||!1)}},e)}));return function(t,o){return e.apply(this,arguments)}}();const Ho=jo(function(e){var t,o=e.attributes,n=e.setAttributes,r=so(Ao(!1),2),l=r[0],a=r[1],c=No(null),s=No(o.styles||{});Eo(function(){s.current=o.styles||{}},[o.styles]);var d=Ro(function(e){if(o.formId&&e){var t=e.ownerDocument;c.current=new f(o.formId,t)}},[o.formId]),p=Io(function(e){!1!==e&&(e=e?JSON.stringify(e):"")!==o.customCss&&n({customCss:e})},[o.customCss,n]),b=Io(function(e){var t=uo(uo({},s.current),e);s.current=t,n({styles:t})},[n]),h=Io(function(){var e=go(po().m(function e(t){var o;return po().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:return a(!0),e.n=2,Fo(t,"is_conversion_form");case 2:o=e.v,n({isConversationalForm:"yes"===o}),a(!1);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),[n]),g=Io(function(e){a(!0),n({formId:e}),e?h(e):(n({themeStyle:"",isConversationalForm:!1}),a(!1))},[n,h]),m=Io(function(e){a(!0),n({themeStyle:e}),setTimeout(function(){a(!1)},300)},[n]),v=Io(function(){window.confirm(mo("Are you sure you want to reset all styles? This cannot be undone."))&&(a(!0),n({styles:{},customCss:"",themeStyle:""}),c.current&&c.current.updateStyles({}),setTimeout(function(){a(!1)},300))},[n]),y=Mo(function(){return uo(uo({},o),{},{styles:{},customCss:""})},[o.formId,o.themeStyle]);Eo(function(){var e,t=!o.themeStyle&&(null===(e=window.fluentform_block_vars)||void 0===e?void 0:e.theme_style),r=window.fluentform_block_vars||{};t&&n({themeStyle:r.theme_style}),o.formId&&h(o.formId)},[]),Eo(function(){if(c.current){var e=c.current.updateStyles(o.styles);p(e)}},[o.formId,o.styles]);var x,k,S=window.fluentform_block_vars||{},j=(0,i.jsxs)(yo,{children:[(0,i.jsx)(Bo,{title:mo("Form Selection"),initialOpen:!o.formId,children:(0,i.jsx)(wo,{label:mo("Select a Form"),value:o.formId||"",options:(null===(t=S.forms)||void 0===t?void 0:t.map(function(e){return{value:e.id,label:e.title}}))||[],onChange:g})}),o.formId&&!o.isConversationalForm&&(0,i.jsx)(lo,{attributes:o,updateStyles:b,handlePresetChange:m})]},"ff-inspector-controls"),C=null;return l&&(C=(0,i.jsxs)("div",{className:"fluent-form-loading-overlay",children:[(0,i.jsx)(Oo,{}),(0,i.jsx)("p",{children:"Loading form preview..."}),(0,i.jsx)(u,{style:"dotted",className:"fluent-separator-sm"})]})),x=o.formId?!0===o.isConversationalForm?(0,i.jsxs)("div",{className:"fluent-form-conv-demo",children:[S.conversational_demo_img&&(0,i.jsx)("img",{src:S.conversational_demo_img,alt:mo("Fluent Forms Conversational Form"),className:"fluent-form-conv-img"}),(0,i.jsx)("p",{className:"fluent-form-conv-message",children:(0,i.jsx)("strong",{children:mo("This is a demo preview. The actual Conversational Form will appear on your live page.")})})]}):(0,i.jsx)("div",{className:"fluent-form-preview-wrapper",children:(0,i.jsx)(ko,{block:"fluentfom/guten-block",attributes:y},"ff-preview")}):(0,i.jsxs)("div",{className:"fluent-form-initial-wrapper",children:[(0,i.jsx)("div",{className:"fluent-form-logo",children:S.logo&&(0,i.jsx)("img",{src:S.logo,alt:mo("Fluent Forms Logo"),className:"fluent-form-logo-img"})}),(0,i.jsx)(wo,{label:mo("Select a Form"),value:"",options:(null===(k=S.forms)||void 0===k?void 0:k.map(function(e){return{value:e.id,label:e.title}}))||[],onChange:g}),(0,i.jsx)("p",{style:{marginTop:"16px",fontSize:"13px",color:"#666"},children:"Select a form to display and customize its appearance."})]}),(0,i.jsxs)("div",{ref:d,className:"fluentform-guten-wrapper",children:[j,o.formId&&(0,i.jsxs)(xo,{children:[(0,i.jsx)(To,{children:(0,i.jsx)(Po,{icon:"edit",label:mo("Edit Form"),onClick:function(){return window.open("admin.php?page=fluent_forms&route=editor&form_id=".concat(o.formId),"_blank","noopener")}})}),o.customCss&&(0,i.jsx)(To,{children:(0,i.jsx)(Po,{icon:"image-rotate",label:mo("Reset All Styles"),onClick:v})})]}),x,C]})},function(e,t){return e.attributes===t.attributes});function zo(e){return zo="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},zo(e)}function Do(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Lo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Do(Object(o),!0).forEach(function(t){Wo(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Do(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Wo(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=zo(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=zo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var $o=wp.blockEditor.useBlockProps;const Go=function(e){var t=$o({className:"fluentform-guten-wrapper"});return(0,i.jsx)("div",Lo(Lo({},t),{},{children:(0,i.jsx)(Ho,Lo({},e))}))};var Uo=wp.i18n.__,Vo=wp.blocks.registerBlockType,qo=wp.element.createElement("svg",{width:20,height:20},wp.element.createElement("path",{d:"M15.57,0H4.43A4.43,4.43,0,0,0,0,4.43V15.57A4.43,4.43,0,0,0,4.43,20H15.57A4.43,4.43,0,0,0,20,15.57V4.43A4.43,4.43,0,0,0,15.57,0ZM12.82,14a2.36,2.36,0,0,1-1.66.68H6.5A2.31,2.31,0,0,1,7.18,13a2.36,2.36,0,0,1,1.66-.68l4.66,0A2.34,2.34,0,0,1,12.82,14Zm3.3-3.46a2.36,2.36,0,0,1-1.66.68H3.21a2.25,2.25,0,0,1,.68-1.64,2.36,2.36,0,0,1,1.66-.68H16.79A2.25,2.25,0,0,1,16.12,10.53Zm0-3.73a2.36,2.36,0,0,1-1.66.68H3.21a2.25,2.25,0,0,1,.68-1.64,2.36,2.36,0,0,1,1.66-.68H16.79A2.25,2.25,0,0,1,16.12,6.81Z"}));Vo("fluentfom/guten-block",{title:Uo("Fluent Forms"),icon:qo,category:"formatting",keywords:[Uo("Contact Form"),Uo("Fluent Forms"),Uo("Forms"),Uo("Advanced Forms"),Uo("fluentforms-gutenberg-block")],apiVersion:3,edit:Go})})();