HEX
Server: Apache
System: Linux sg2plmcpnl492417.prod.sin2.secureserver.net 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User: nyiet8349bzl (9207396)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/nyiet8349bzl/www/oldwebsite.sbsc.in/wp-content/plugins/forminator/build/form-scripts.js
!function(){var e,t,s={2:function(e,t,s){var a=s(2199),r=s(4664),i=s(5950);e.exports=function(e){return a(e,i,r)}},76:function(e){"use strict";e.exports=Function.prototype.call},79:function(e,t,s){var a=s(3702),r=s(80),i=s(4739),n=s(8655),o=s(1175);function l(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var a=e[t];this.set(a[0],a[1])}}l.prototype.clear=a,l.prototype.delete=r,l.prototype.get=i,l.prototype.has=n,l.prototype.set=o,e.exports=l},80:function(e,t,s){var a=s(6025),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,s=a(t,e);return!(s<0)&&(s==t.length-1?t.pop():r.call(t,s,1),--this.size,!0)}},181:function(e){e.exports=function(e){var t=[];if(null!=e)for(var s in Object(e))t.push(s);return t}},289:function(e,t,s){var a=s(2651);e.exports=function(e){return a(this,e).get(e)}},294:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},346:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},361:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,s){var a=typeof e;return!!(s=null==s?9007199254740991:s)&&("number"==a||"symbol"!=a&&t.test(e))&&e>-1&&e%1==0&&e<s}},392:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},414:function(e){"use strict";e.exports=Math.round},453:function(e,t,s){"use strict";var a,r=s(9612),i=s(9383),n=s(1237),o=s(9290),l=s(9538),p=s(8068),c=s(9675),u=s(5345),d=s(1514),m=s(8968),h=s(6188),f=s(8002),b=s(5880),g=s(414),y=s(3093),E=Function,v=function(e){try{return E('"use strict"; return ('+e+").constructor;")()}catch(e){}},_=s(5795),w=s(655),x=function(){throw new c},N=_?function(){try{return x}catch(e){try{return _(arguments,"callee").get}catch(e){return x}}}():x,C=s(4039)(),k=s(3628),S=s(1064),P=s(8648),O=s(1002),D=s(76),F={},A="undefined"!=typeof Uint8Array&&k?k(Uint8Array):a,T={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?a:ArrayBuffer,"%ArrayIteratorPrototype%":C&&k?k([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":"undefined"==typeof Atomics?a:Atomics,"%BigInt%":"undefined"==typeof BigInt?a:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?a:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?a:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?a:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?a:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?a:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":F,"%Int8Array%":"undefined"==typeof Int8Array?a:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?a:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&k?k(k([][Symbol.iterator]())):a,"%JSON%":"object"==typeof JSON?JSON:a,"%Map%":"undefined"==typeof Map?a:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&C&&k?k((new Map)[Symbol.iterator]()):a,"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?a:Promise,"%Proxy%":"undefined"==typeof Proxy?a:Proxy,"%RangeError%":o,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?a:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?a:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&C&&k?k((new Set)[Symbol.iterator]()):a,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&k?k(""[Symbol.iterator]()):a,"%Symbol%":C?Symbol:a,"%SyntaxError%":p,"%ThrowTypeError%":N,"%TypedArray%":A,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?a:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?a:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?a:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?a:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?a:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?a:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?a:WeakSet,"%Function.prototype.call%":D,"%Function.prototype.apply%":O,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":S,"%Math.abs%":d,"%Math.floor%":m,"%Math.max%":h,"%Math.min%":f,"%Math.pow%":b,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":P};if(k)try{null.error}catch(e){var M=k(k(e));T["%Error.prototype%"]=M}var j=function e(t){var s;if("%AsyncFunction%"===t)s=v("async function () {}");else if("%GeneratorFunction%"===t)s=v("function* () {}");else if("%AsyncGeneratorFunction%"===t)s=v("async function* () {}");else if("%AsyncGenerator%"===t){var a=e("%AsyncGeneratorFunction%");a&&(s=a.prototype)}else if("%AsyncIteratorPrototype%"===t){var r=e("%AsyncGenerator%");r&&k&&(s=k(r.prototype))}return T[t]=s,s},U={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},V=s(6743),$=s(9957),I=V.call(D,Array.prototype.concat),R=V.call(O,Array.prototype.splice),L=V.call(D,String.prototype.replace),B=V.call(D,String.prototype.slice),z=V.call(D,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,q=function(e,t){var s,a=e;if($(U,a)&&(a="%"+(s=U[a])[0]+"%"),$(T,a)){var r=T[a];if(r===F&&(r=j(a)),void 0===r&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:a,value:r}}throw new p("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=function(e){var t=B(e,0,1),s=B(e,-1);if("%"===t&&"%"!==s)throw new p("invalid intrinsic syntax, expected closing `%`");if("%"===s&&"%"!==t)throw new p("invalid intrinsic syntax, expected opening `%`");var a=[];return L(e,W,function(e,t,s,r){a[a.length]=s?L(r,H,"$1"):t||e}),a}(e),a=s.length>0?s[0]:"",r=q("%"+a+"%",t),i=r.name,n=r.value,o=!1,l=r.alias;l&&(a=l[0],R(s,I([0,1],l)));for(var u=1,d=!0;u<s.length;u+=1){var m=s[u],h=B(m,0,1),f=B(m,-1);if(('"'===h||"'"===h||"`"===h||'"'===f||"'"===f||"`"===f)&&h!==f)throw new p("property names with quotes must have matching quotes");if("constructor"!==m&&d||(o=!0),$(T,i="%"+(a+="."+m)+"%"))n=T[i];else if(null!=n){if(!(m in n)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(_&&u+1>=s.length){var b=_(n,m);n=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:n[m]}else d=$(n,m),n=n[m];d&&!o&&(T[i]=n)}}return n}},507:function(e,t,s){"use strict";var a=s(453),r=s(6556),i=s(8859),n=s(9675),o=a("%Map%",!0),l=r("Map.prototype.get",!0),p=r("Map.prototype.set",!0),c=r("Map.prototype.has",!0),u=r("Map.prototype.delete",!0),d=r("Map.prototype.size",!0);e.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){if(e){var s=u(e,t);return 0===d(e)&&(e=void 0),s}return!1},get:function(t){if(e)return l(e,t)},has:function(t){return!!e&&c(e,t)},set:function(t,s){e||(e=new o),p(e,t,s)}};return t}},655:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},659:function(e,t,s){var a=s(1873),r=Object.prototype,i=r.hasOwnProperty,n=r.toString,o=a?a.toStringTag:void 0;e.exports=function(e){var t=i.call(e,o),s=e[o];try{e[o]=void 0;var a=!0}catch(e){}var r=n.call(e);return a&&(t?e[o]=s:delete e[o]),r}},695:function(e,t,s){var a=s(8096),r=s(2428),i=s(6449),n=s(3656),o=s(361),l=s(7167),p=Object.prototype.hasOwnProperty;e.exports=function(e,t){var s=i(e),c=!s&&r(e),u=!s&&!c&&n(e),d=!s&&!c&&!u&&l(e),m=s||c||u||d,h=m?a(e.length,String):[],f=h.length;for(var b in e)!t&&!p.call(e,b)||m&&("length"==b||u&&("offset"==b||"parent"==b)||d&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||o(b,f))||h.push(b);return h}},818:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],s=t.join(","),a="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function r(e,t){t=t||{};var r,n,o,c=[],u=[],d=e.querySelectorAll(s);for(t.includeContainer&&a.call(e,s)&&(d=Array.prototype.slice.apply(d)).unshift(e),r=0;r<d.length;r++)i(n=d[r])&&(0===(o=l(n))?c.push(n):u.push({documentOrder:r,tabIndex:o,node:n}));return u.sort(p).map(function(e){return e.node}).concat(c)}function i(e){return!(!n(e)||function(e){return function(e){return c(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'),s=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(t);return!s||s===e}(e)}(e)||l(e)<0)}function n(e){return!(e.disabled||function(e){return c(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}r.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==a.call(e,s)&&i(e)},r.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==a.call(e,o)&&n(e)};var o=t.concat("iframe").join(",");function l(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function p(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function c(e){return"INPUT"===e.tagName}e.exports=r},920:function(e,t,s){"use strict";var a=s(9675),r=s(8859),i=s(4803),n=s(507),o=s(4652)||n||i;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new a("Side channel does not contain "+r(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,s){e||(e=o()),e.set(t,s)}};return t}},938:function(e){e.exports=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}},945:function(e,t,s){var a=s(79),r=s(8223),i=s(3661);e.exports=function(e,t){var s=this.__data__;if(s instanceof a){var n=s.__data__;if(!r||n.length<199)return n.push([e,t]),this.size=++s.size,this;s=this.__data__=new i(n)}return s.set(e,t),this.size=s.size,this}},961:function(e,t,s){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=s(2551)},1002:function(e){"use strict";e.exports=Function.prototype.apply},1042:function(e,t,s){var a=s(6110)(Object,"create");e.exports=a},1064:function(e,t,s){"use strict";var a=s(9612);e.exports=a.getPrototypeOf||null},1175:function(e,t,s){var a=s(6025);e.exports=function(e,t){var s=this.__data__,r=a(s,e);return r<0?(++this.size,s.push([e,t])):s[r][1]=t,this}},1237:function(e){"use strict";e.exports=EvalError},1333:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),s=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(s))return!1;for(var a in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1420:function(e,t,s){var a=s(79);e.exports=function(){this.__data__=new a,this.size=0}},1514:function(e){"use strict";e.exports=Math.abs},1549:function(e,t,s){var a=s(2032),r=s(3862),i=s(6721),n=s(2749),o=s(5749);function l(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var a=e[t];this.set(a[0],a[1])}}l.prototype.clear=a,l.prototype.delete=r,l.prototype.get=i,l.prototype.has=n,l.prototype.set=o,e.exports=l},1594:function(e){"use strict";e.exports=React},1791:function(e,t,s){var a=s(6547),r=s(3360);e.exports=function(e,t,s,i){var n=!s;s||(s={});for(var o=-1,l=t.length;++o<l;){var p=t[o],c=i?i(s[p],e[p],p,s,e):void 0;void 0===c&&(c=e[p]),n?r(s,p,c):a(s,p,c)}return s}},1873:function(e,t,s){var a=s(9325).Symbol;e.exports=a},1882:function(e,t,s){var a=s(2552),r=s(3805);e.exports=function(e){if(!r(e))return!1;var t=a(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:function(e,t,s){var a=s(9653);e.exports=function(e,t){var s=t?a(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}},2032:function(e,t,s){var a=s(1042);e.exports=function(){this.__data__=a?a(null):{},this.size=0}},2199:function(e,t,s){var a=s(4528),r=s(6449);e.exports=function(e,t,s){var i=t(e);return r(e)?i:a(i,s(e))}},2271:function(e,t,s){var a=s(1791),r=s(4664);e.exports=function(e,t){return a(e,r(e),t)}},2428:function(e,t,s){var a=s(7534),r=s(346),i=Object.prototype,n=i.hasOwnProperty,o=i.propertyIsEnumerable,l=a(function(){return arguments}())?a:function(e){return r(e)&&n.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},2551:function(e,t,s){"use strict";var a=s(1594),r=s(9982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,o={};function l(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(o[e]=t,e=0;e<t.length;e++)n.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},h={};function f(e,t,s,a,r,i,n){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=a,this.attributeNamespace=r,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=n}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new f(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new f(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new f(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new f(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new f(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new f(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)});var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function E(e,t,s,a){var r=b.hasOwnProperty(t)?b[t]:null;(null!==r?0!==r.type:a||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,s,a){if(null==t||function(e,t,s,a){if(null!==s&&0===s.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!a&&(null!==s?!s.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,s,a))return!0;if(a)return!1;if(null!==s)switch(s.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,s,r,a)&&(s=null),a||null===r?function(e){return!!u.call(h,e)||!u.call(m,e)&&(d.test(e)?h[e]=!0:(m[e]=!0,!1))}(t)&&(null===s?e.removeAttribute(t):e.setAttribute(t,""+s)):r.mustUseProperty?e[r.propertyName]=null===s?3!==r.type&&"":s:(t=r.attributeName,a=r.attributeNamespace,null===s?e.removeAttribute(t):(s=3===(r=r.type)||4===r&&!0===s?"":""+s,a?e.setAttributeNS(a,t,s):e.setAttribute(t,s))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(g,y);b[t]=new f(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(g,y);b[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(g,y);b[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)});var v=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),w=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),S=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),A=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function j(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=M&&e[M]||e["@@iterator"])?e:null}var U,V=Object.assign;function $(e){if(void 0===U)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);U=t&&t[1]||""}return"\n"+U+e}var I=!1;function R(e,t){if(!e||I)return"";I=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var a=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){a=e}e.call(t.prototype)}else{try{throw Error()}catch(e){a=e}e()}}catch(t){if(t&&a&&"string"==typeof t.stack){for(var r=t.stack.split("\n"),i=a.stack.split("\n"),n=r.length-1,o=i.length-1;1<=n&&0<=o&&r[n]!==i[o];)o--;for(;1<=n&&0<=o;n--,o--)if(r[n]!==i[o]){if(1!==n||1!==o)do{if(n--,0>--o||r[n]!==i[o]){var l="\n"+r[n].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=n&&0<=o);break}}}finally{I=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?$(e):""}function L(e){switch(e.tag){case 5:return $(e.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return e=R(e.type,!1);case 11:return e=R(e.type.render,!1);case 1:return e=R(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case w:return"Portal";case C:return"Profiler";case N:return"StrictMode";case O:return"Suspense";case D:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case S:return(e.displayName||"Context")+".Consumer";case k:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case F:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return B(e(t))}catch(e){}}return null}function z(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===N?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function H(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=H(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==s&&"function"==typeof s.get&&"function"==typeof s.set){var r=s.get,i=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){a=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(e){a=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),a="";return e&&(a=H(e)?e.checked?"true":"false":e.value),(e=a)!==s&&(t.setValue(e),!0)}function Y(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function G(e,t){var s=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=s?s:e._wrapperState.initialChecked})}function K(e,t){var s=null==t.defaultValue?"":t.defaultValue,a=null!=t.checked?t.checked:t.defaultChecked;s=W(null!=t.value?t.value:s),e._wrapperState={initialChecked:a,initialValue:s,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&E(e,"checked",t,!1)}function Z(e,t){J(e,t);var s=W(t.value),a=t.type;if(null!=s)"number"===a?(0===s&&""===e.value||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if("submit"===a||"reset"===a)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,s):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!("submit"!==a&&"reset"!==a||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}""!==(s=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==s&&(e.name=s)}function ee(e,t,s){"number"===t&&Y(e.ownerDocument)===e||(null==s?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var te=Array.isArray;function se(e,t,s,a){if(e=e.options,t){t={};for(var r=0;r<s.length;r++)t["$"+s[r]]=!0;for(s=0;s<e.length;s++)r=t.hasOwnProperty("$"+e[s].value),e[s].selected!==r&&(e[s].selected=r),r&&a&&(e[s].defaultSelected=!0)}else{for(s=""+W(s),t=null,r=0;r<e.length;r++){if(e[r].value===s)return e[r].selected=!0,void(a&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function ae(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return V({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var s=t.value;if(null==s){if(s=t.children,t=t.defaultValue,null!=s){if(null!=t)throw Error(i(92));if(te(s)){if(1<s.length)throw Error(i(93));s=s[0]}t=s}null==t&&(t=""),s=t}e._wrapperState={initialValue:W(s)}}function ie(e,t){var s=W(t.value),a=W(t.defaultValue);null!=s&&((s=""+s)!==e.value&&(e.value=s),null==t.defaultValue&&e.defaultValue!==s&&(e.defaultValue=s)),null!=a&&(e.defaultValue=""+a)}function ne(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function oe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?oe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pe,ce,ue=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pe=pe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,s,a){MSApp.execUnsafeLocalFunction(function(){return ce(e,t)})}:ce);function de(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&3===s.nodeType)return void(s.nodeValue=t)}e.textContent=t}var me={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function fe(e,t,s){return null==t||"boolean"==typeof t||""===t?"":s||"number"!=typeof t||0===t||me.hasOwnProperty(e)&&me[e]?(""+t).trim():t+"px"}function be(e,t){for(var s in e=e.style,t)if(t.hasOwnProperty(s)){var a=0===s.indexOf("--"),r=fe(s,t[s],a);"float"===s&&(s="cssFloat"),a?e.setProperty(s,r):e[s]=r}}Object.keys(me).forEach(function(e){he.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),me[t]=me[e]})});var ge=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function Ee(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ve=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,xe=null,Ne=null;function Ce(e){if(e=yr(e)){if("function"!=typeof we)throw Error(i(280));var t=e.stateNode;t&&(t=vr(t),we(e.stateNode,e.type,t))}}function ke(e){xe?Ne?Ne.push(e):Ne=[e]:xe=e}function Se(){if(xe){var e=xe,t=Ne;if(Ne=xe=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function Pe(e,t){return e(t)}function Oe(){}var De=!1;function Fe(e,t,s){if(De)return e(t,s);De=!0;try{return Pe(e,t,s)}finally{De=!1,(null!==xe||null!==Ne)&&(Oe(),Se())}}function Ae(e,t){var s=e.stateNode;if(null===s)return null;var a=vr(s);if(null===a)return null;s=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(a=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!a;break e;default:e=!1}if(e)return null;if(s&&"function"!=typeof s)throw Error(i(231,t,typeof s));return s}var Te=!1;if(c)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Te=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ce){Te=!1}function je(e,t,s,a,r,i,n,o,l){var p=Array.prototype.slice.call(arguments,3);try{t.apply(s,p)}catch(e){this.onError(e)}}var Ue=!1,Ve=null,$e=!1,Ie=null,Re={onError:function(e){Ue=!0,Ve=e}};function Le(e,t,s,a,r,i,n,o,l){Ue=!1,Ve=null,je.apply(Re,arguments)}function Be(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(s=t.return),e=t.return}while(e)}return 3===t.tag?s:null}function ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if(Be(e)!==e)throw Error(i(188))}function He(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(i(188));return t!==e?null:e}for(var s=e,a=t;;){var r=s.return;if(null===r)break;var n=r.alternate;if(null===n){if(null!==(a=r.return)){s=a;continue}break}if(r.child===n.child){for(n=r.child;n;){if(n===s)return We(r),e;if(n===a)return We(r),t;n=n.sibling}throw Error(i(188))}if(s.return!==a.return)s=r,a=n;else{for(var o=!1,l=r.child;l;){if(l===s){o=!0,s=r,a=n;break}if(l===a){o=!0,a=r,s=n;break}l=l.sibling}if(!o){for(l=n.child;l;){if(l===s){o=!0,s=n,a=r;break}if(l===a){o=!0,a=n,s=r;break}l=l.sibling}if(!o)throw Error(i(189))}}if(s.alternate!==a)throw Error(i(190))}if(3!==s.tag)throw Error(i(188));return s.stateNode.current===s?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Qe=r.unstable_scheduleCallback,Ye=r.unstable_cancelCallback,Ge=r.unstable_shouldYield,Ke=r.unstable_requestPaint,Je=r.unstable_now,Ze=r.unstable_getCurrentPriorityLevel,Xe=r.unstable_ImmediatePriority,et=r.unstable_UserBlockingPriority,tt=r.unstable_NormalPriority,st=r.unstable_LowPriority,at=r.unstable_IdlePriority,rt=null,it=null;var nt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(ot(e)/lt|0)|0},ot=Math.log,lt=Math.LN2;var pt=64,ct=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var s=e.pendingLanes;if(0===s)return 0;var a=0,r=e.suspendedLanes,i=e.pingedLanes,n=268435455&s;if(0!==n){var o=n&~r;0!==o?a=ut(o):0!==(i&=n)&&(a=ut(i))}else 0!==(n=s&~r)?a=ut(n):0!==i&&(a=ut(i));if(0===a)return 0;if(0!==t&&t!==a&&0===(t&r)&&((r=a&-a)>=(i=t&-t)||16===r&&4194240&i))return t;if(4&a&&(a|=16&s),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=a;0<t;)r=1<<(s=31-nt(t)),a|=e[s],t&=~r;return a}function mt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ft(){var e=pt;return!(4194240&(pt<<=1))&&(pt=64),e}function bt(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function gt(e,t,s){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-nt(t)]=s}function yt(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var a=31-nt(s),r=1<<a;r&t|e[a]&t&&(e[a]|=t),s&=~r}}var Et=0;function vt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var _t,wt,xt,Nt,Ct,kt=!1,St=[],Pt=null,Ot=null,Dt=null,Ft=new Map,At=new Map,Tt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jt(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":Dt=null;break;case"pointerover":case"pointerout":Ft.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":At.delete(t.pointerId)}}function Ut(e,t,s,a,r,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:s,eventSystemFlags:a,nativeEvent:i,targetContainers:[r]},null!==t&&(null!==(t=yr(t))&&wt(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function Vt(e){var t=gr(e.target);if(null!==t){var s=Be(t);if(null!==s)if(13===(t=s.tag)){if(null!==(t=ze(s)))return e.blockedOn=t,void Ct(e.priority,function(){xt(s)})}else if(3===t&&s.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===s.tag?s.stateNode.containerInfo:null)}e.blockedOn=null}function $t(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var s=Gt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==s)return null!==(t=yr(s))&&wt(t),e.blockedOn=s,!1;var a=new(s=e.nativeEvent).constructor(s.type,s);ve=a,s.target.dispatchEvent(a),ve=null,t.shift()}return!0}function It(e,t,s){$t(e)&&s.delete(t)}function Rt(){kt=!1,null!==Pt&&$t(Pt)&&(Pt=null),null!==Ot&&$t(Ot)&&(Ot=null),null!==Dt&&$t(Dt)&&(Dt=null),Ft.forEach(It),At.forEach(It)}function Lt(e,t){e.blockedOn===t&&(e.blockedOn=null,kt||(kt=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Rt)))}function Bt(e){function t(t){return Lt(t,e)}if(0<St.length){Lt(St[0],e);for(var s=1;s<St.length;s++){var a=St[s];a.blockedOn===e&&(a.blockedOn=null)}}for(null!==Pt&&Lt(Pt,e),null!==Ot&&Lt(Ot,e),null!==Dt&&Lt(Dt,e),Ft.forEach(t),At.forEach(t),s=0;s<Tt.length;s++)(a=Tt[s]).blockedOn===e&&(a.blockedOn=null);for(;0<Tt.length&&null===(s=Tt[0]).blockedOn;)Vt(s),null===s.blockedOn&&Tt.shift()}var zt=v.ReactCurrentBatchConfig,Wt=!0;function Ht(e,t,s,a){var r=Et,i=zt.transition;zt.transition=null;try{Et=1,Qt(e,t,s,a)}finally{Et=r,zt.transition=i}}function qt(e,t,s,a){var r=Et,i=zt.transition;zt.transition=null;try{Et=4,Qt(e,t,s,a)}finally{Et=r,zt.transition=i}}function Qt(e,t,s,a){if(Wt){var r=Gt(e,t,s,a);if(null===r)za(e,t,a,Yt,s),jt(e,a);else if(function(e,t,s,a,r){switch(t){case"focusin":return Pt=Ut(Pt,e,t,s,a,r),!0;case"dragenter":return Ot=Ut(Ot,e,t,s,a,r),!0;case"mouseover":return Dt=Ut(Dt,e,t,s,a,r),!0;case"pointerover":var i=r.pointerId;return Ft.set(i,Ut(Ft.get(i)||null,e,t,s,a,r)),!0;case"gotpointercapture":return i=r.pointerId,At.set(i,Ut(At.get(i)||null,e,t,s,a,r)),!0}return!1}(r,e,t,s,a))a.stopPropagation();else if(jt(e,a),4&t&&-1<Mt.indexOf(e)){for(;null!==r;){var i=yr(r);if(null!==i&&_t(i),null===(i=Gt(e,t,s,a))&&za(e,t,a,Yt,s),i===r)break;r=i}null!==r&&a.stopPropagation()}else za(e,t,a,null,s)}}var Yt=null;function Gt(e,t,s,a){if(Yt=null,null!==(e=gr(e=_e(a))))if(null===(t=Be(e)))e=null;else if(13===(s=t.tag)){if(null!==(e=ze(t)))return e;e=null}else if(3===s){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ze()){case Xe:return 1;case et:return 4;case tt:case st:return 16;case at:return 536870912;default:return 16}default:return 16}}var Jt=null,Zt=null,Xt=null;function es(){if(Xt)return Xt;var e,t,s=Zt,a=s.length,r="value"in Jt?Jt.value:Jt.textContent,i=r.length;for(e=0;e<a&&s[e]===r[e];e++);var n=a-e;for(t=1;t<=n&&s[a-t]===r[i-t];t++);return Xt=r.slice(e,1<t?1-t:void 0)}function ts(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function ss(){return!0}function as(){return!1}function rs(e){function t(t,s,a,r,i){for(var n in this._reactName=t,this._targetInst=a,this.type=s,this.nativeEvent=r,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(n)&&(t=e[n],this[n]=t?t(r):r[n]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?ss:as,this.isPropagationStopped=as,this}return V(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ss)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ss)},persist:function(){},isPersistent:ss}),t}var is,ns,os,ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ps=rs(ls),cs=V({},ls,{view:0,detail:0}),us=rs(cs),ds=V({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ns,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==os&&(os&&"mousemove"===e.type?(is=e.screenX-os.screenX,ns=e.screenY-os.screenY):ns=is=0,os=e),is)},movementY:function(e){return"movementY"in e?e.movementY:ns}}),ms=rs(ds),hs=rs(V({},ds,{dataTransfer:0})),fs=rs(V({},cs,{relatedTarget:0})),bs=rs(V({},ls,{animationName:0,elapsedTime:0,pseudoElement:0})),gs=V({},ls,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ys=rs(gs),Es=rs(V({},ls,{data:0})),vs={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_s={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ws={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xs(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=ws[e])&&!!t[e]}function Ns(){return xs}var Cs=V({},cs,{key:function(e){if(e.key){var t=vs[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ts(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_s[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ns,charCode:function(e){return"keypress"===e.type?ts(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ts(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ks=rs(Cs),Ss=rs(V({},ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ps=rs(V({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ns})),Os=rs(V({},ls,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ds=V({},ds,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Fs=rs(Ds),As=[9,13,27,32],Ts=c&&"CompositionEvent"in window,Ms=null;c&&"documentMode"in document&&(Ms=document.documentMode);var js=c&&"TextEvent"in window&&!Ms,Us=c&&(!Ts||Ms&&8<Ms&&11>=Ms),Vs=String.fromCharCode(32),$s=!1;function Is(e,t){switch(e){case"keyup":return-1!==As.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rs(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ls=!1;var Bs={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Bs[e.type]:"textarea"===t}function Ws(e,t,s,a){ke(a),0<(t=Ha(t,"onChange")).length&&(s=new ps("onChange","change",null,s,a),e.push({event:s,listeners:t}))}var Hs=null,qs=null;function Qs(e){Va(e,0)}function Ys(e){if(Q(Er(e)))return e}function Gs(e,t){if("change"===e)return t}var Ks=!1;if(c){var Js;if(c){var Zs="oninput"in document;if(!Zs){var Xs=document.createElement("div");Xs.setAttribute("oninput","return;"),Zs="function"==typeof Xs.oninput}Js=Zs}else Js=!1;Ks=Js&&(!document.documentMode||9<document.documentMode)}function ea(){Hs&&(Hs.detachEvent("onpropertychange",ta),qs=Hs=null)}function ta(e){if("value"===e.propertyName&&Ys(qs)){var t=[];Ws(t,qs,e,_e(e)),Fe(Qs,t)}}function sa(e,t,s){"focusin"===e?(ea(),qs=s,(Hs=t).attachEvent("onpropertychange",ta)):"focusout"===e&&ea()}function aa(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Ys(qs)}function ra(e,t){if("click"===e)return Ys(t)}function ia(e,t){if("input"===e||"change"===e)return Ys(t)}var na="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function oa(e,t){if(na(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var r=s[a];if(!u.call(t,r)||!na(e[r],t[r]))return!1}return!0}function la(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pa(e,t){var s,a=la(e);for(e=0;a;){if(3===a.nodeType){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=la(a)}}function ca(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ca(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ua(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var s="string"==typeof t.contentWindow.location.href}catch(e){s=!1}if(!s)break;t=Y((e=t.contentWindow).document)}return t}function da(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ma(e){var t=ua(),s=e.focusedElem,a=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&ca(s.ownerDocument.documentElement,s)){if(null!==a&&da(s))if(t=a.start,void 0===(e=a.end)&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if((e=(t=s.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var r=s.textContent.length,i=Math.min(a.start,r);a=void 0===a.end?i:Math.min(a.end,r),!e.extend&&i>a&&(r=a,a=i,i=r),r=pa(s,i);var n=pa(s,a);r&&n&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==n.node||e.focusOffset!==n.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),i>a?(e.addRange(t),e.extend(n.node,n.offset)):(t.setEnd(n.node,n.offset),e.addRange(t)))}for(t=[],e=s;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<t.length;s++)(e=t[s]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ha=c&&"documentMode"in document&&11>=document.documentMode,fa=null,ba=null,ga=null,ya=!1;function Ea(e,t,s){var a=s.window===s?s.document:9===s.nodeType?s:s.ownerDocument;ya||null==fa||fa!==Y(a)||("selectionStart"in(a=fa)&&da(a)?a={start:a.selectionStart,end:a.selectionEnd}:a={anchorNode:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset},ga&&oa(ga,a)||(ga=a,0<(a=Ha(ba,"onSelect")).length&&(t=new ps("onSelect","select",null,t,s),e.push({event:t,listeners:a}),t.target=fa)))}function va(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var _a={animationend:va("Animation","AnimationEnd"),animationiteration:va("Animation","AnimationIteration"),animationstart:va("Animation","AnimationStart"),transitionend:va("Transition","TransitionEnd")},wa={},xa={};function Na(e){if(wa[e])return wa[e];if(!_a[e])return e;var t,s=_a[e];for(t in s)if(s.hasOwnProperty(t)&&t in xa)return wa[e]=s[t];return e}c&&(xa=document.createElement("div").style,"AnimationEvent"in window||(delete _a.animationend.animation,delete _a.animationiteration.animation,delete _a.animationstart.animation),"TransitionEvent"in window||delete _a.transitionend.transition);var Ca=Na("animationend"),ka=Na("animationiteration"),Sa=Na("animationstart"),Pa=Na("transitionend"),Oa=new Map,Da="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Fa(e,t){Oa.set(e,t),l(t,[e])}for(var Aa=0;Aa<Da.length;Aa++){var Ta=Da[Aa];Fa(Ta.toLowerCase(),"on"+(Ta[0].toUpperCase()+Ta.slice(1)))}Fa(Ca,"onAnimationEnd"),Fa(ka,"onAnimationIteration"),Fa(Sa,"onAnimationStart"),Fa("dblclick","onDoubleClick"),Fa("focusin","onFocus"),Fa("focusout","onBlur"),Fa(Pa,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ma="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ja=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ma));function Ua(e,t,s){var a=e.type||"unknown-event";e.currentTarget=s,function(e,t,s,a,r,n,o,l,p){if(Le.apply(this,arguments),Ue){if(!Ue)throw Error(i(198));var c=Ve;Ue=!1,Ve=null,$e||($e=!0,Ie=c)}}(a,t,void 0,e),e.currentTarget=null}function Va(e,t){t=!!(4&t);for(var s=0;s<e.length;s++){var a=e[s],r=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var n=a.length-1;0<=n;n--){var o=a[n],l=o.instance,p=o.currentTarget;if(o=o.listener,l!==i&&r.isPropagationStopped())break e;Ua(r,o,p),i=l}else for(n=0;n<a.length;n++){if(l=(o=a[n]).instance,p=o.currentTarget,o=o.listener,l!==i&&r.isPropagationStopped())break e;Ua(r,o,p),i=l}}}if($e)throw e=Ie,$e=!1,Ie=null,e}function $a(e,t){var s=t[hr];void 0===s&&(s=t[hr]=new Set);var a=e+"__bubble";s.has(a)||(Ba(t,e,2,!1),s.add(a))}function Ia(e,t,s){var a=0;t&&(a|=4),Ba(s,e,a,t)}var Ra="_reactListening"+Math.random().toString(36).slice(2);function La(e){if(!e[Ra]){e[Ra]=!0,n.forEach(function(t){"selectionchange"!==t&&(ja.has(t)||Ia(t,!1,e),Ia(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ra]||(t[Ra]=!0,Ia("selectionchange",!1,t))}}function Ba(e,t,s,a){switch(Kt(t)){case 1:var r=Ht;break;case 4:r=qt;break;default:r=Qt}s=r.bind(null,t,s,e),r=void 0,!Te||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),a?void 0!==r?e.addEventListener(t,s,{capture:!0,passive:r}):e.addEventListener(t,s,!0):void 0!==r?e.addEventListener(t,s,{passive:r}):e.addEventListener(t,s,!1)}function za(e,t,s,a,r){var i=a;if(!(1&t||2&t||null===a))e:for(;;){if(null===a)return;var n=a.tag;if(3===n||4===n){var o=a.stateNode.containerInfo;if(o===r||8===o.nodeType&&o.parentNode===r)break;if(4===n)for(n=a.return;null!==n;){var l=n.tag;if((3===l||4===l)&&((l=n.stateNode.containerInfo)===r||8===l.nodeType&&l.parentNode===r))return;n=n.return}for(;null!==o;){if(null===(n=gr(o)))return;if(5===(l=n.tag)||6===l){a=i=n;continue e}o=o.parentNode}}a=a.return}Fe(function(){var a=i,r=_e(s),n=[];e:{var o=Oa.get(e);if(void 0!==o){var l=ps,p=e;switch(e){case"keypress":if(0===ts(s))break e;case"keydown":case"keyup":l=ks;break;case"focusin":p="focus",l=fs;break;case"focusout":p="blur",l=fs;break;case"beforeblur":case"afterblur":l=fs;break;case"click":if(2===s.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=ms;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=hs;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Ps;break;case Ca:case ka:case Sa:l=bs;break;case Pa:l=Os;break;case"scroll":l=us;break;case"wheel":l=Fs;break;case"copy":case"cut":case"paste":l=ys;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Ss}var c=!!(4&t),u=!c&&"scroll"===e,d=c?null!==o?o+"Capture":null:o;c=[];for(var m,h=a;null!==h;){var f=(m=h).stateNode;if(5===m.tag&&null!==f&&(m=f,null!==d&&(null!=(f=Ae(h,d))&&c.push(Wa(h,f,m)))),u)break;h=h.return}0<c.length&&(o=new l(o,p,null,s,r),n.push({event:o,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||s===ve||!(p=s.relatedTarget||s.fromElement)||!gr(p)&&!p[mr])&&(l||o)&&(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,l?(l=a,null!==(p=(p=s.relatedTarget||s.toElement)?gr(p):null)&&(p!==(u=Be(p))||5!==p.tag&&6!==p.tag)&&(p=null)):(l=null,p=a),l!==p)){if(c=ms,f="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Ss,f="onPointerLeave",d="onPointerEnter",h="pointer"),u=null==l?o:Er(l),m=null==p?o:Er(p),(o=new c(f,h+"leave",l,s,r)).target=u,o.relatedTarget=m,f=null,gr(r)===a&&((c=new c(d,h+"enter",p,s,r)).target=m,c.relatedTarget=u,f=c),u=f,l&&p)e:{for(d=p,h=0,m=c=l;m;m=qa(m))h++;for(m=0,f=d;f;f=qa(f))m++;for(;0<h-m;)c=qa(c),h--;for(;0<m-h;)d=qa(d),m--;for(;h--;){if(c===d||null!==d&&c===d.alternate)break e;c=qa(c),d=qa(d)}c=null}else c=null;null!==l&&Qa(n,o,l,c,!1),null!==p&&null!==u&&Qa(n,u,p,c,!0)}if("select"===(l=(o=a?Er(a):window).nodeName&&o.nodeName.toLowerCase())||"input"===l&&"file"===o.type)var b=Gs;else if(zs(o))if(Ks)b=ia;else{b=aa;var g=sa}else(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(b=ra);switch(b&&(b=b(e,a))?Ws(n,b,s,r):(g&&g(e,o,a),"focusout"===e&&(g=o._wrapperState)&&g.controlled&&"number"===o.type&&ee(o,"number",o.value)),g=a?Er(a):window,e){case"focusin":(zs(g)||"true"===g.contentEditable)&&(fa=g,ba=a,ga=null);break;case"focusout":ga=ba=fa=null;break;case"mousedown":ya=!0;break;case"contextmenu":case"mouseup":case"dragend":ya=!1,Ea(n,s,r);break;case"selectionchange":if(ha)break;case"keydown":case"keyup":Ea(n,s,r)}var y;if(Ts)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Ls?Is(e,s)&&(E="onCompositionEnd"):"keydown"===e&&229===s.keyCode&&(E="onCompositionStart");E&&(Us&&"ko"!==s.locale&&(Ls||"onCompositionStart"!==E?"onCompositionEnd"===E&&Ls&&(y=es()):(Zt="value"in(Jt=r)?Jt.value:Jt.textContent,Ls=!0)),0<(g=Ha(a,E)).length&&(E=new Es(E,e,null,s,r),n.push({event:E,listeners:g}),y?E.data=y:null!==(y=Rs(s))&&(E.data=y))),(y=js?function(e,t){switch(e){case"compositionend":return Rs(t);case"keypress":return 32!==t.which?null:($s=!0,Vs);case"textInput":return(e=t.data)===Vs&&$s?null:e;default:return null}}(e,s):function(e,t){if(Ls)return"compositionend"===e||!Ts&&Is(e,t)?(e=es(),Xt=Zt=Jt=null,Ls=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Us&&"ko"!==t.locale?null:t.data}}(e,s))&&(0<(a=Ha(a,"onBeforeInput")).length&&(r=new Es("onBeforeInput","beforeinput",null,s,r),n.push({event:r,listeners:a}),r.data=y))}Va(n,t)})}function Wa(e,t,s){return{instance:e,listener:t,currentTarget:s}}function Ha(e,t){for(var s=t+"Capture",a=[];null!==e;){var r=e,i=r.stateNode;5===r.tag&&null!==i&&(r=i,null!=(i=Ae(e,s))&&a.unshift(Wa(e,i,r)),null!=(i=Ae(e,t))&&a.push(Wa(e,i,r))),e=e.return}return a}function qa(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qa(e,t,s,a,r){for(var i=t._reactName,n=[];null!==s&&s!==a;){var o=s,l=o.alternate,p=o.stateNode;if(null!==l&&l===a)break;5===o.tag&&null!==p&&(o=p,r?null!=(l=Ae(s,i))&&n.unshift(Wa(s,l,o)):r||null!=(l=Ae(s,i))&&n.push(Wa(s,l,o))),s=s.return}0!==n.length&&e.push({event:t,listeners:n})}var Ya=/\r\n?/g,Ga=/\u0000|\uFFFD/g;function Ka(e){return("string"==typeof e?e:""+e).replace(Ya,"\n").replace(Ga,"")}function Ja(e,t,s){if(t=Ka(t),Ka(e)!==t&&s)throw Error(i(425))}function Za(){}var Xa=null,er=null;function tr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var sr="function"==typeof setTimeout?setTimeout:void 0,ar="function"==typeof clearTimeout?clearTimeout:void 0,rr="function"==typeof Promise?Promise:void 0,ir="function"==typeof queueMicrotask?queueMicrotask:void 0!==rr?function(e){return rr.resolve(null).then(e).catch(nr)}:sr;function nr(e){setTimeout(function(){throw e})}function or(e,t){var s=t,a=0;do{var r=s.nextSibling;if(e.removeChild(s),r&&8===r.nodeType)if("/$"===(s=r.data)){if(0===a)return e.removeChild(r),void Bt(t);a--}else"$"!==s&&"$?"!==s&&"$!"!==s||a++;s=r}while(s);Bt(t)}function lr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function pr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var s=e.data;if("$"===s||"$!"===s||"$?"===s){if(0===t)return e;t--}else"/$"===s&&t++}e=e.previousSibling}return null}var cr=Math.random().toString(36).slice(2),ur="__reactFiber$"+cr,dr="__reactProps$"+cr,mr="__reactContainer$"+cr,hr="__reactEvents$"+cr,fr="__reactListeners$"+cr,br="__reactHandles$"+cr;function gr(e){var t=e[ur];if(t)return t;for(var s=e.parentNode;s;){if(t=s[mr]||s[ur]){if(s=t.alternate,null!==t.child||null!==s&&null!==s.child)for(e=pr(e);null!==e;){if(s=e[ur])return s;e=pr(e)}return t}s=(e=s).parentNode}return null}function yr(e){return!(e=e[ur]||e[mr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Er(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function vr(e){return e[dr]||null}var _r=[],wr=-1;function xr(e){return{current:e}}function Nr(e){0>wr||(e.current=_r[wr],_r[wr]=null,wr--)}function Cr(e,t){wr++,_r[wr]=e.current,e.current=t}var kr={},Sr=xr(kr),Pr=xr(!1),Or=kr;function Dr(e,t){var s=e.type.contextTypes;if(!s)return kr;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var r,i={};for(r in s)i[r]=t[r];return a&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Fr(e){return null!=(e=e.childContextTypes)}function Ar(){Nr(Pr),Nr(Sr)}function Tr(e,t,s){if(Sr.current!==kr)throw Error(i(168));Cr(Sr,t),Cr(Pr,s)}function Mr(e,t,s){var a=e.stateNode;if(t=t.childContextTypes,"function"!=typeof a.getChildContext)return s;for(var r in a=a.getChildContext())if(!(r in t))throw Error(i(108,z(e)||"Unknown",r));return V({},s,a)}function jr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,Or=Sr.current,Cr(Sr,e),Cr(Pr,Pr.current),!0}function Ur(e,t,s){var a=e.stateNode;if(!a)throw Error(i(169));s?(e=Mr(e,t,Or),a.__reactInternalMemoizedMergedChildContext=e,Nr(Pr),Nr(Sr),Cr(Sr,e)):Nr(Pr),Cr(Pr,s)}var Vr=null,$r=!1,Ir=!1;function Rr(e){null===Vr?Vr=[e]:Vr.push(e)}function Lr(){if(!Ir&&null!==Vr){Ir=!0;var e=0,t=Et;try{var s=Vr;for(Et=1;e<s.length;e++){var a=s[e];do{a=a(!0)}while(null!==a)}Vr=null,$r=!1}catch(t){throw null!==Vr&&(Vr=Vr.slice(e+1)),Qe(Xe,Lr),t}finally{Et=t,Ir=!1}}return null}var Br=[],zr=0,Wr=null,Hr=0,qr=[],Qr=0,Yr=null,Gr=1,Kr="";function Jr(e,t){Br[zr++]=Hr,Br[zr++]=Wr,Wr=e,Hr=t}function Zr(e,t,s){qr[Qr++]=Gr,qr[Qr++]=Kr,qr[Qr++]=Yr,Yr=e;var a=Gr;e=Kr;var r=32-nt(a)-1;a&=~(1<<r),s+=1;var i=32-nt(t)+r;if(30<i){var n=r-r%5;i=(a&(1<<n)-1).toString(32),a>>=n,r-=n,Gr=1<<32-nt(t)+r|s<<r|a,Kr=i+e}else Gr=1<<i|s<<r|a,Kr=e}function Xr(e){null!==e.return&&(Jr(e,1),Zr(e,1,0))}function ei(e){for(;e===Wr;)Wr=Br[--zr],Br[zr]=null,Hr=Br[--zr],Br[zr]=null;for(;e===Yr;)Yr=qr[--Qr],qr[Qr]=null,Kr=qr[--Qr],qr[Qr]=null,Gr=qr[--Qr],qr[Qr]=null}var ti=null,si=null,ai=!1,ri=null;function ii(e,t){var s=Fp(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,null===(t=e.deletions)?(e.deletions=[s],e.flags|=16):t.push(s)}function ni(e,t){switch(e.tag){case 5:var s=e.type;return null!==(t=1!==t.nodeType||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ti=e,si=lr(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ti=e,si=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(s=null!==Yr?{id:Gr,overflow:Kr}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},(s=Fp(18,null,null,0)).stateNode=t,s.return=e,e.child=s,ti=e,si=null,!0);default:return!1}}function oi(e){return!(!(1&e.mode)||128&e.flags)}function li(e){if(ai){var t=si;if(t){var s=t;if(!ni(e,t)){if(oi(e))throw Error(i(418));t=lr(s.nextSibling);var a=ti;t&&ni(e,t)?ii(a,s):(e.flags=-4097&e.flags|2,ai=!1,ti=e)}}else{if(oi(e))throw Error(i(418));e.flags=-4097&e.flags|2,ai=!1,ti=e}}}function pi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ti=e}function ci(e){if(e!==ti)return!1;if(!ai)return pi(e),ai=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!tr(e.type,e.memoizedProps)),t&&(t=si)){if(oi(e))throw ui(),Error(i(418));for(;t;)ii(e,t),t=lr(t.nextSibling)}if(pi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var s=e.data;if("/$"===s){if(0===t){si=lr(e.nextSibling);break e}t--}else"$"!==s&&"$!"!==s&&"$?"!==s||t++}e=e.nextSibling}si=null}}else si=ti?lr(e.stateNode.nextSibling):null;return!0}function ui(){for(var e=si;e;)e=lr(e.nextSibling)}function di(){si=ti=null,ai=!1}function mi(e){null===ri?ri=[e]:ri.push(e)}var hi=v.ReactCurrentBatchConfig;function fi(e,t,s){if(null!==(e=s.ref)&&"function"!=typeof e&&"object"!=typeof e){if(s._owner){if(s=s._owner){if(1!==s.tag)throw Error(i(309));var a=s.stateNode}if(!a)throw Error(i(147,e));var r=a,n=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===n?t.ref:(t=function(e){var t=r.refs;null===e?delete t[n]:t[n]=e},t._stringRef=n,t)}if("string"!=typeof e)throw Error(i(284));if(!s._owner)throw Error(i(290,e))}return e}function bi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gi(e){return(0,e._init)(e._payload)}function yi(e){function t(t,s){if(e){var a=t.deletions;null===a?(t.deletions=[s],t.flags|=16):a.push(s)}}function s(s,a){if(!e)return null;for(;null!==a;)t(s,a),a=a.sibling;return null}function a(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function r(e,t){return(e=Tp(e,t)).index=0,e.sibling=null,e}function n(t,s,a){return t.index=a,e?null!==(a=t.alternate)?(a=a.index)<s?(t.flags|=2,s):a:(t.flags|=2,s):(t.flags|=1048576,s)}function o(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,s,a){return null===t||6!==t.tag?((t=Vp(s,e.mode,a)).return=e,t):((t=r(t,s)).return=e,t)}function p(e,t,s,a){var i=s.type;return i===x?u(e,t,s.props.children,a,s.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===A&&gi(i)===t.type)?((a=r(t,s.props)).ref=fi(e,t,s),a.return=e,a):((a=Mp(s.type,s.key,s.props,null,e.mode,a)).ref=fi(e,t,s),a.return=e,a)}function c(e,t,s,a){return null===t||4!==t.tag||t.stateNode.containerInfo!==s.containerInfo||t.stateNode.implementation!==s.implementation?((t=$p(s,e.mode,a)).return=e,t):((t=r(t,s.children||[])).return=e,t)}function u(e,t,s,a,i){return null===t||7!==t.tag?((t=jp(s,e.mode,a,i)).return=e,t):((t=r(t,s)).return=e,t)}function d(e,t,s){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Vp(""+t,e.mode,s)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(s=Mp(t.type,t.key,t.props,null,e.mode,s)).ref=fi(e,null,t),s.return=e,s;case w:return(t=$p(t,e.mode,s)).return=e,t;case A:return d(e,(0,t._init)(t._payload),s)}if(te(t)||j(t))return(t=jp(t,e.mode,s,null)).return=e,t;bi(e,t)}return null}function m(e,t,s,a){var r=null!==t?t.key:null;if("string"==typeof s&&""!==s||"number"==typeof s)return null!==r?null:l(e,t,""+s,a);if("object"==typeof s&&null!==s){switch(s.$$typeof){case _:return s.key===r?p(e,t,s,a):null;case w:return s.key===r?c(e,t,s,a):null;case A:return m(e,t,(r=s._init)(s._payload),a)}if(te(s)||j(s))return null!==r?null:u(e,t,s,a,null);bi(e,s)}return null}function h(e,t,s,a,r){if("string"==typeof a&&""!==a||"number"==typeof a)return l(t,e=e.get(s)||null,""+a,r);if("object"==typeof a&&null!==a){switch(a.$$typeof){case _:return p(t,e=e.get(null===a.key?s:a.key)||null,a,r);case w:return c(t,e=e.get(null===a.key?s:a.key)||null,a,r);case A:return h(e,t,s,(0,a._init)(a._payload),r)}if(te(a)||j(a))return u(t,e=e.get(s)||null,a,r,null);bi(t,a)}return null}function f(r,i,o,l){for(var p=null,c=null,u=i,f=i=0,b=null;null!==u&&f<o.length;f++){u.index>f?(b=u,u=null):b=u.sibling;var g=m(r,u,o[f],l);if(null===g){null===u&&(u=b);break}e&&u&&null===g.alternate&&t(r,u),i=n(g,i,f),null===c?p=g:c.sibling=g,c=g,u=b}if(f===o.length)return s(r,u),ai&&Jr(r,f),p;if(null===u){for(;f<o.length;f++)null!==(u=d(r,o[f],l))&&(i=n(u,i,f),null===c?p=u:c.sibling=u,c=u);return ai&&Jr(r,f),p}for(u=a(r,u);f<o.length;f++)null!==(b=h(u,r,f,o[f],l))&&(e&&null!==b.alternate&&u.delete(null===b.key?f:b.key),i=n(b,i,f),null===c?p=b:c.sibling=b,c=b);return e&&u.forEach(function(e){return t(r,e)}),ai&&Jr(r,f),p}function b(r,o,l,p){var c=j(l);if("function"!=typeof c)throw Error(i(150));if(null==(l=c.call(l)))throw Error(i(151));for(var u=c=null,f=o,b=o=0,g=null,y=l.next();null!==f&&!y.done;b++,y=l.next()){f.index>b?(g=f,f=null):g=f.sibling;var E=m(r,f,y.value,p);if(null===E){null===f&&(f=g);break}e&&f&&null===E.alternate&&t(r,f),o=n(E,o,b),null===u?c=E:u.sibling=E,u=E,f=g}if(y.done)return s(r,f),ai&&Jr(r,b),c;if(null===f){for(;!y.done;b++,y=l.next())null!==(y=d(r,y.value,p))&&(o=n(y,o,b),null===u?c=y:u.sibling=y,u=y);return ai&&Jr(r,b),c}for(f=a(r,f);!y.done;b++,y=l.next())null!==(y=h(f,r,b,y.value,p))&&(e&&null!==y.alternate&&f.delete(null===y.key?b:y.key),o=n(y,o,b),null===u?c=y:u.sibling=y,u=y);return e&&f.forEach(function(e){return t(r,e)}),ai&&Jr(r,b),c}return function e(a,i,n,l){if("object"==typeof n&&null!==n&&n.type===x&&null===n.key&&(n=n.props.children),"object"==typeof n&&null!==n){switch(n.$$typeof){case _:e:{for(var p=n.key,c=i;null!==c;){if(c.key===p){if((p=n.type)===x){if(7===c.tag){s(a,c.sibling),(i=r(c,n.props.children)).return=a,a=i;break e}}else if(c.elementType===p||"object"==typeof p&&null!==p&&p.$$typeof===A&&gi(p)===c.type){s(a,c.sibling),(i=r(c,n.props)).ref=fi(a,c,n),i.return=a,a=i;break e}s(a,c);break}t(a,c),c=c.sibling}n.type===x?((i=jp(n.props.children,a.mode,l,n.key)).return=a,a=i):((l=Mp(n.type,n.key,n.props,null,a.mode,l)).ref=fi(a,i,n),l.return=a,a=l)}return o(a);case w:e:{for(c=n.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===n.containerInfo&&i.stateNode.implementation===n.implementation){s(a,i.sibling),(i=r(i,n.children||[])).return=a,a=i;break e}s(a,i);break}t(a,i),i=i.sibling}(i=$p(n,a.mode,l)).return=a,a=i}return o(a);case A:return e(a,i,(c=n._init)(n._payload),l)}if(te(n))return f(a,i,n,l);if(j(n))return b(a,i,n,l);bi(a,n)}return"string"==typeof n&&""!==n||"number"==typeof n?(n=""+n,null!==i&&6===i.tag?(s(a,i.sibling),(i=r(i,n)).return=a,a=i):(s(a,i),(i=Vp(n,a.mode,l)).return=a,a=i),o(a)):s(a,i)}}var Ei=yi(!0),vi=yi(!1),_i=xr(null),wi=null,xi=null,Ni=null;function Ci(){Ni=xi=wi=null}function ki(e){var t=_i.current;Nr(_i),e._currentValue=t}function Si(e,t,s){for(;null!==e;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==a&&(a.childLanes|=t)):null!==a&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===s)break;e=e.return}}function Pi(e,t){wi=e,Ni=xi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Eo=!0),e.firstContext=null)}function Oi(e){var t=e._currentValue;if(Ni!==e)if(e={context:e,memoizedValue:t,next:null},null===xi){if(null===wi)throw Error(i(308));xi=e,wi.dependencies={lanes:0,firstContext:e}}else xi=xi.next=e;return t}var Di=null;function Fi(e){null===Di?Di=[e]:Di.push(e)}function Ai(e,t,s,a){var r=t.interleaved;return null===r?(s.next=s,Fi(t)):(s.next=r.next,r.next=s),t.interleaved=s,Ti(e,a)}function Ti(e,t){e.lanes|=t;var s=e.alternate;for(null!==s&&(s.lanes|=t),s=e,e=e.return;null!==e;)e.childLanes|=t,null!==(s=e.alternate)&&(s.childLanes|=t),s=e,e=e.return;return 3===s.tag?s.stateNode:null}var Mi=!1;function ji(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ui(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Vi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $i(e,t,s){var a=e.updateQueue;if(null===a)return null;if(a=a.shared,2&Pl){var r=a.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),a.pending=t,Ti(e,s)}return null===(r=a.interleaved)?(t.next=t,Fi(a)):(t.next=r.next,r.next=t),a.interleaved=t,Ti(e,s)}function Ii(e,t,s){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&s)){var a=t.lanes;s|=a&=e.pendingLanes,t.lanes=s,yt(e,s)}}function Ri(e,t){var s=e.updateQueue,a=e.alternate;if(null!==a&&s===(a=a.updateQueue)){var r=null,i=null;if(null!==(s=s.firstBaseUpdate)){do{var n={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};null===i?r=i=n:i=i.next=n,s=s.next}while(null!==s);null===i?r=i=t:i=i.next=t}else r=i=t;return s={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:a.shared,effects:a.effects},void(e.updateQueue=s)}null===(e=s.lastBaseUpdate)?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function Li(e,t,s,a){var r=e.updateQueue;Mi=!1;var i=r.firstBaseUpdate,n=r.lastBaseUpdate,o=r.shared.pending;if(null!==o){r.shared.pending=null;var l=o,p=l.next;l.next=null,null===n?i=p:n.next=p,n=l;var c=e.alternate;null!==c&&((o=(c=c.updateQueue).lastBaseUpdate)!==n&&(null===o?c.firstBaseUpdate=p:o.next=p,c.lastBaseUpdate=l))}if(null!==i){var u=r.baseState;for(n=0,c=p=l=null,o=i;;){var d=o.lane,m=o.eventTime;if((a&d)===d){null!==c&&(c=c.next={eventTime:m,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var h=e,f=o;switch(d=t,m=s,f.tag){case 1:if("function"==typeof(h=f.payload)){u=h.call(m,u,d);break e}u=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(d="function"==typeof(h=f.payload)?h.call(m,u,d):h))break e;u=V({},u,d);break e;case 2:Mi=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(d=r.effects)?r.effects=[o]:d.push(o))}else m={eventTime:m,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(p=c=m,l=u):c=c.next=m,n|=d;if(null===(o=o.next)){if(null===(o=r.shared.pending))break;o=(d=o).next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}if(null===c&&(l=u),r.baseState=l,r.firstBaseUpdate=p,r.lastBaseUpdate=c,null!==(t=r.shared.interleaved)){r=t;do{n|=r.lane,r=r.next}while(r!==t)}else null===i&&(r.shared.lanes=0);Ul|=n,e.lanes=n,e.memoizedState=u}}function Bi(e,t,s){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var a=e[t],r=a.callback;if(null!==r){if(a.callback=null,a=s,"function"!=typeof r)throw Error(i(191,r));r.call(a)}}}var zi={},Wi=xr(zi),Hi=xr(zi),qi=xr(zi);function Qi(e){if(e===zi)throw Error(i(174));return e}function Yi(e,t){switch(Cr(qi,t),Cr(Hi,e),Cr(Wi,zi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Nr(Wi),Cr(Wi,t)}function Gi(){Nr(Wi),Nr(Hi),Nr(qi)}function Ki(e){Qi(qi.current);var t=Qi(Wi.current),s=le(t,e.type);t!==s&&(Cr(Hi,e),Cr(Wi,s))}function Ji(e){Hi.current===e&&(Nr(Wi),Nr(Hi))}var Zi=xr(0);function Xi(e){for(var t=e;null!==t;){if(13===t.tag){var s=t.memoizedState;if(null!==s&&(null===(s=s.dehydrated)||"$?"===s.data||"$!"===s.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var en=[];function tn(){for(var e=0;e<en.length;e++)en[e]._workInProgressVersionPrimary=null;en.length=0}var sn=v.ReactCurrentDispatcher,an=v.ReactCurrentBatchConfig,rn=0,nn=null,on=null,ln=null,pn=!1,cn=!1,un=0,dn=0;function mn(){throw Error(i(321))}function hn(e,t){if(null===t)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!na(e[s],t[s]))return!1;return!0}function fn(e,t,s,a,r,n){if(rn=n,nn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,sn.current=null===e||null===e.memoizedState?Zn:Xn,e=s(a,r),cn){n=0;do{if(cn=!1,un=0,25<=n)throw Error(i(301));n+=1,ln=on=null,t.updateQueue=null,sn.current=eo,e=s(a,r)}while(cn)}if(sn.current=Jn,t=null!==on&&null!==on.next,rn=0,ln=on=nn=null,pn=!1,t)throw Error(i(300));return e}function bn(){var e=0!==un;return un=0,e}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ln?nn.memoizedState=ln=e:ln=ln.next=e,ln}function yn(){if(null===on){var e=nn.alternate;e=null!==e?e.memoizedState:null}else e=on.next;var t=null===ln?nn.memoizedState:ln.next;if(null!==t)ln=t,on=e;else{if(null===e)throw Error(i(310));e={memoizedState:(on=e).memoizedState,baseState:on.baseState,baseQueue:on.baseQueue,queue:on.queue,next:null},null===ln?nn.memoizedState=ln=e:ln=ln.next=e}return ln}function En(e,t){return"function"==typeof t?t(e):t}function vn(e){var t=yn(),s=t.queue;if(null===s)throw Error(i(311));s.lastRenderedReducer=e;var a=on,r=a.baseQueue,n=s.pending;if(null!==n){if(null!==r){var o=r.next;r.next=n.next,n.next=o}a.baseQueue=r=n,s.pending=null}if(null!==r){n=r.next,a=a.baseState;var l=o=null,p=null,c=n;do{var u=c.lane;if((rn&u)===u)null!==p&&(p=p.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),a=c.hasEagerState?c.eagerState:e(a,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===p?(l=p=d,o=a):p=p.next=d,nn.lanes|=u,Ul|=u}c=c.next}while(null!==c&&c!==n);null===p?o=a:p.next=l,na(a,t.memoizedState)||(Eo=!0),t.memoizedState=a,t.baseState=o,t.baseQueue=p,s.lastRenderedState=a}if(null!==(e=s.interleaved)){r=e;do{n=r.lane,nn.lanes|=n,Ul|=n,r=r.next}while(r!==e)}else null===r&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function _n(e){var t=yn(),s=t.queue;if(null===s)throw Error(i(311));s.lastRenderedReducer=e;var a=s.dispatch,r=s.pending,n=t.memoizedState;if(null!==r){s.pending=null;var o=r=r.next;do{n=e(n,o.action),o=o.next}while(o!==r);na(n,t.memoizedState)||(Eo=!0),t.memoizedState=n,null===t.baseQueue&&(t.baseState=n),s.lastRenderedState=n}return[n,a]}function wn(){}function xn(e,t){var s=nn,a=yn(),r=t(),n=!na(a.memoizedState,r);if(n&&(a.memoizedState=r,Eo=!0),a=a.queue,jn(kn.bind(null,s,a,e),[e]),a.getSnapshot!==t||n||null!==ln&&1&ln.memoizedState.tag){if(s.flags|=2048,Dn(9,Cn.bind(null,s,a,r,t),void 0,null),null===Ol)throw Error(i(349));30&rn||Nn(s,t,r)}return r}function Nn(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},null===(t=nn.updateQueue)?(t={lastEffect:null,stores:null},nn.updateQueue=t,t.stores=[e]):null===(s=t.stores)?t.stores=[e]:s.push(e)}function Cn(e,t,s,a){t.value=s,t.getSnapshot=a,Sn(t)&&Pn(e)}function kn(e,t,s){return s(function(){Sn(t)&&Pn(e)})}function Sn(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!na(e,s)}catch(e){return!0}}function Pn(e){var t=Ti(e,1);null!==t&&sp(t,e,1,-1)}function On(e){var t=gn();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:e},t.queue=e,e=e.dispatch=Qn.bind(null,nn,e),[t.memoizedState,e]}function Dn(e,t,s,a){return e={tag:e,create:t,destroy:s,deps:a,next:null},null===(t=nn.updateQueue)?(t={lastEffect:null,stores:null},nn.updateQueue=t,t.lastEffect=e.next=e):null===(s=t.lastEffect)?t.lastEffect=e.next=e:(a=s.next,s.next=e,e.next=a,t.lastEffect=e),e}function Fn(){return yn().memoizedState}function An(e,t,s,a){var r=gn();nn.flags|=e,r.memoizedState=Dn(1|t,s,void 0,void 0===a?null:a)}function Tn(e,t,s,a){var r=yn();a=void 0===a?null:a;var i=void 0;if(null!==on){var n=on.memoizedState;if(i=n.destroy,null!==a&&hn(a,n.deps))return void(r.memoizedState=Dn(t,s,i,a))}nn.flags|=e,r.memoizedState=Dn(1|t,s,i,a)}function Mn(e,t){return An(8390656,8,e,t)}function jn(e,t){return Tn(2048,8,e,t)}function Un(e,t){return Tn(4,2,e,t)}function Vn(e,t){return Tn(4,4,e,t)}function $n(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function In(e,t,s){return s=null!=s?s.concat([e]):null,Tn(4,4,$n.bind(null,t,e),s)}function Rn(){}function Ln(e,t){var s=yn();t=void 0===t?null:t;var a=s.memoizedState;return null!==a&&null!==t&&hn(t,a[1])?a[0]:(s.memoizedState=[e,t],e)}function Bn(e,t){var s=yn();t=void 0===t?null:t;var a=s.memoizedState;return null!==a&&null!==t&&hn(t,a[1])?a[0]:(e=e(),s.memoizedState=[e,t],e)}function zn(e,t,s){return 21&rn?(na(s,t)||(s=ft(),nn.lanes|=s,Ul|=s,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Eo=!0),e.memoizedState=s)}function Wn(e,t){var s=Et;Et=0!==s&&4>s?s:4,e(!0);var a=an.transition;an.transition={};try{e(!1),t()}finally{Et=s,an.transition=a}}function Hn(){return yn().memoizedState}function qn(e,t,s){var a=tp(e);if(s={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null},Yn(e))Gn(t,s);else if(null!==(s=Ai(e,t,s,a))){sp(s,e,a,ep()),Kn(s,t,a)}}function Qn(e,t,s){var a=tp(e),r={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null};if(Yn(e))Gn(t,r);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var n=t.lastRenderedState,o=i(n,s);if(r.hasEagerState=!0,r.eagerState=o,na(o,n)){var l=t.interleaved;return null===l?(r.next=r,Fi(t)):(r.next=l.next,l.next=r),void(t.interleaved=r)}}catch(e){}null!==(s=Ai(e,t,r,a))&&(sp(s,e,a,r=ep()),Kn(s,t,a))}}function Yn(e){var t=e.alternate;return e===nn||null!==t&&t===nn}function Gn(e,t){cn=pn=!0;var s=e.pending;null===s?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Kn(e,t,s){if(4194240&s){var a=t.lanes;s|=a&=e.pendingLanes,t.lanes=s,yt(e,s)}}var Jn={readContext:Oi,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useInsertionEffect:mn,useLayoutEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useMutableSource:mn,useSyncExternalStore:mn,useId:mn,unstable_isNewReconciler:!1},Zn={readContext:Oi,useCallback:function(e,t){return gn().memoizedState=[e,void 0===t?null:t],e},useContext:Oi,useEffect:Mn,useImperativeHandle:function(e,t,s){return s=null!=s?s.concat([e]):null,An(4194308,4,$n.bind(null,t,e),s)},useLayoutEffect:function(e,t){return An(4194308,4,e,t)},useInsertionEffect:function(e,t){return An(4,2,e,t)},useMemo:function(e,t){var s=gn();return t=void 0===t?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var a=gn();return t=void 0!==s?s(t):t,a.memoizedState=a.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},a.queue=e,e=e.dispatch=qn.bind(null,nn,e),[a.memoizedState,e]},useRef:function(e){return e={current:e},gn().memoizedState=e},useState:On,useDebugValue:Rn,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=On(!1),t=e[0];return e=Wn.bind(null,e[1]),gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var a=nn,r=gn();if(ai){if(void 0===s)throw Error(i(407));s=s()}else{if(s=t(),null===Ol)throw Error(i(349));30&rn||Nn(a,t,s)}r.memoizedState=s;var n={value:s,getSnapshot:t};return r.queue=n,Mn(kn.bind(null,a,n,e),[e]),a.flags|=2048,Dn(9,Cn.bind(null,a,n,s,t),void 0,null),s},useId:function(){var e=gn(),t=Ol.identifierPrefix;if(ai){var s=Kr;t=":"+t+"R"+(s=(Gr&~(1<<32-nt(Gr)-1)).toString(32)+s),0<(s=un++)&&(t+="H"+s.toString(32)),t+=":"}else t=":"+t+"r"+(s=dn++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xn={readContext:Oi,useCallback:Ln,useContext:Oi,useEffect:jn,useImperativeHandle:In,useInsertionEffect:Un,useLayoutEffect:Vn,useMemo:Bn,useReducer:vn,useRef:Fn,useState:function(){return vn(En)},useDebugValue:Rn,useDeferredValue:function(e){return zn(yn(),on.memoizedState,e)},useTransition:function(){return[vn(En)[0],yn().memoizedState]},useMutableSource:wn,useSyncExternalStore:xn,useId:Hn,unstable_isNewReconciler:!1},eo={readContext:Oi,useCallback:Ln,useContext:Oi,useEffect:jn,useImperativeHandle:In,useInsertionEffect:Un,useLayoutEffect:Vn,useMemo:Bn,useReducer:_n,useRef:Fn,useState:function(){return _n(En)},useDebugValue:Rn,useDeferredValue:function(e){var t=yn();return null===on?t.memoizedState=e:zn(t,on.memoizedState,e)},useTransition:function(){return[_n(En)[0],yn().memoizedState]},useMutableSource:wn,useSyncExternalStore:xn,useId:Hn,unstable_isNewReconciler:!1};function to(e,t){if(e&&e.defaultProps){for(var s in t=V({},t),e=e.defaultProps)void 0===t[s]&&(t[s]=e[s]);return t}return t}function so(e,t,s,a){s=null==(s=s(a,t=e.memoizedState))?t:V({},t,s),e.memoizedState=s,0===e.lanes&&(e.updateQueue.baseState=s)}var ao={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,s){e=e._reactInternals;var a=ep(),r=tp(e),i=Vi(a,r);i.payload=t,null!=s&&(i.callback=s),null!==(t=$i(e,i,r))&&(sp(t,e,r,a),Ii(t,e,r))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var a=ep(),r=tp(e),i=Vi(a,r);i.tag=1,i.payload=t,null!=s&&(i.callback=s),null!==(t=$i(e,i,r))&&(sp(t,e,r,a),Ii(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=ep(),a=tp(e),r=Vi(s,a);r.tag=2,null!=t&&(r.callback=t),null!==(t=$i(e,r,a))&&(sp(t,e,a,s),Ii(t,e,a))}};function ro(e,t,s,a,r,i,n){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(a,i,n):!t.prototype||!t.prototype.isPureReactComponent||(!oa(s,a)||!oa(r,i))}function io(e,t,s){var a=!1,r=kr,i=t.contextType;return"object"==typeof i&&null!==i?i=Oi(i):(r=Fr(t)?Or:Sr.current,i=(a=null!=(a=t.contextTypes))?Dr(e,r):kr),t=new t(s,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ao,e.stateNode=t,t._reactInternals=e,a&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=i),t}function no(e,t,s,a){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(s,a),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(s,a),t.state!==e&&ao.enqueueReplaceState(t,t.state,null)}function oo(e,t,s,a){var r=e.stateNode;r.props=s,r.state=e.memoizedState,r.refs={},ji(e);var i=t.contextType;"object"==typeof i&&null!==i?r.context=Oi(i):(i=Fr(t)?Or:Sr.current,r.context=Dr(e,i)),r.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(so(e,t,i,s),r.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(t=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&ao.enqueueReplaceState(r,r.state,null),Li(e,s,r,a),r.state=e.memoizedState),"function"==typeof r.componentDidMount&&(e.flags|=4194308)}function lo(e,t){try{var s="",a=t;do{s+=L(a),a=a.return}while(a);var r=s}catch(e){r="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:r,digest:null}}function po(e,t,s){return{value:e,source:null,stack:null!=s?s:null,digest:null!=t?t:null}}function co(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var uo="function"==typeof WeakMap?WeakMap:Map;function mo(e,t,s){(s=Vi(-1,s)).tag=3,s.payload={element:null};var a=t.value;return s.callback=function(){Wl||(Wl=!0,Hl=a),co(0,t)},s}function ho(e,t,s){(s=Vi(-1,s)).tag=3;var a=e.type.getDerivedStateFromError;if("function"==typeof a){var r=t.value;s.payload=function(){return a(r)},s.callback=function(){co(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(s.callback=function(){co(0,t),"function"!=typeof a&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),s}function fo(e,t,s){var a=e.pingCache;if(null===a){a=e.pingCache=new uo;var r=new Set;a.set(t,r)}else void 0===(r=a.get(t))&&(r=new Set,a.set(t,r));r.has(s)||(r.add(s),e=Cp.bind(null,e,t,s),t.then(e,e))}function bo(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function go(e,t,s,a,r){return 1&e.mode?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,1===s.tag&&(null===s.alternate?s.tag=17:((t=Vi(-1,1)).tag=2,$i(s,t,1))),s.lanes|=1),e)}var yo=v.ReactCurrentOwner,Eo=!1;function vo(e,t,s,a){t.child=null===e?vi(t,null,s,a):Ei(t,e.child,s,a)}function _o(e,t,s,a,r){s=s.render;var i=t.ref;return Pi(t,r),a=fn(e,t,s,a,i,r),s=bn(),null===e||Eo?(ai&&s&&Xr(t),t.flags|=1,vo(e,t,a,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Wo(e,t,r))}function wo(e,t,s,a,r){if(null===e){var i=s.type;return"function"!=typeof i||Ap(i)||void 0!==i.defaultProps||null!==s.compare||void 0!==s.defaultProps?((e=Mp(s.type,null,a,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,xo(e,t,i,a,r))}if(i=e.child,0===(e.lanes&r)){var n=i.memoizedProps;if((s=null!==(s=s.compare)?s:oa)(n,a)&&e.ref===t.ref)return Wo(e,t,r)}return t.flags|=1,(e=Tp(i,a)).ref=t.ref,e.return=t,t.child=e}function xo(e,t,s,a,r){if(null!==e){var i=e.memoizedProps;if(oa(i,a)&&e.ref===t.ref){if(Eo=!1,t.pendingProps=a=i,0===(e.lanes&r))return t.lanes=e.lanes,Wo(e,t,r);131072&e.flags&&(Eo=!0)}}return ko(e,t,s,a,r)}function No(e,t,s){var a=t.pendingProps,r=a.children,i=null!==e?e.memoizedState:null;if("hidden"===a.mode)if(1&t.mode){if(!(1073741824&s))return e=null!==i?i.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Cr(Tl,Al),Al|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=null!==i?i.baseLanes:s,Cr(Tl,Al),Al|=a}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Cr(Tl,Al),Al|=s;else null!==i?(a=i.baseLanes|s,t.memoizedState=null):a=s,Cr(Tl,Al),Al|=a;return vo(e,t,r,s),t.child}function Co(e,t){var s=t.ref;(null===e&&null!==s||null!==e&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function ko(e,t,s,a,r){var i=Fr(s)?Or:Sr.current;return i=Dr(t,i),Pi(t,r),s=fn(e,t,s,a,i,r),a=bn(),null===e||Eo?(ai&&a&&Xr(t),t.flags|=1,vo(e,t,s,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Wo(e,t,r))}function So(e,t,s,a,r){if(Fr(s)){var i=!0;jr(t)}else i=!1;if(Pi(t,r),null===t.stateNode)zo(e,t),io(t,s,a),oo(t,s,a,r),a=!0;else if(null===e){var n=t.stateNode,o=t.memoizedProps;n.props=o;var l=n.context,p=s.contextType;"object"==typeof p&&null!==p?p=Oi(p):p=Dr(t,p=Fr(s)?Or:Sr.current);var c=s.getDerivedStateFromProps,u="function"==typeof c||"function"==typeof n.getSnapshotBeforeUpdate;u||"function"!=typeof n.UNSAFE_componentWillReceiveProps&&"function"!=typeof n.componentWillReceiveProps||(o!==a||l!==p)&&no(t,n,a,p),Mi=!1;var d=t.memoizedState;n.state=d,Li(t,a,n,r),l=t.memoizedState,o!==a||d!==l||Pr.current||Mi?("function"==typeof c&&(so(t,s,c,a),l=t.memoizedState),(o=Mi||ro(t,s,o,a,d,l,p))?(u||"function"!=typeof n.UNSAFE_componentWillMount&&"function"!=typeof n.componentWillMount||("function"==typeof n.componentWillMount&&n.componentWillMount(),"function"==typeof n.UNSAFE_componentWillMount&&n.UNSAFE_componentWillMount()),"function"==typeof n.componentDidMount&&(t.flags|=4194308)):("function"==typeof n.componentDidMount&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=l),n.props=a,n.state=l,n.context=p,a=o):("function"==typeof n.componentDidMount&&(t.flags|=4194308),a=!1)}else{n=t.stateNode,Ui(e,t),o=t.memoizedProps,p=t.type===t.elementType?o:to(t.type,o),n.props=p,u=t.pendingProps,d=n.context,"object"==typeof(l=s.contextType)&&null!==l?l=Oi(l):l=Dr(t,l=Fr(s)?Or:Sr.current);var m=s.getDerivedStateFromProps;(c="function"==typeof m||"function"==typeof n.getSnapshotBeforeUpdate)||"function"!=typeof n.UNSAFE_componentWillReceiveProps&&"function"!=typeof n.componentWillReceiveProps||(o!==u||d!==l)&&no(t,n,a,l),Mi=!1,d=t.memoizedState,n.state=d,Li(t,a,n,r);var h=t.memoizedState;o!==u||d!==h||Pr.current||Mi?("function"==typeof m&&(so(t,s,m,a),h=t.memoizedState),(p=Mi||ro(t,s,p,a,d,h,l)||!1)?(c||"function"!=typeof n.UNSAFE_componentWillUpdate&&"function"!=typeof n.componentWillUpdate||("function"==typeof n.componentWillUpdate&&n.componentWillUpdate(a,h,l),"function"==typeof n.UNSAFE_componentWillUpdate&&n.UNSAFE_componentWillUpdate(a,h,l)),"function"==typeof n.componentDidUpdate&&(t.flags|=4),"function"==typeof n.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof n.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof n.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=h),n.props=a,n.state=h,n.context=l,a=p):("function"!=typeof n.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof n.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),a=!1)}return Po(e,t,s,a,i,r)}function Po(e,t,s,a,r,i){Co(e,t);var n=!!(128&t.flags);if(!a&&!n)return r&&Ur(t,s,!1),Wo(e,t,i);a=t.stateNode,yo.current=t;var o=n&&"function"!=typeof s.getDerivedStateFromError?null:a.render();return t.flags|=1,null!==e&&n?(t.child=Ei(t,e.child,null,i),t.child=Ei(t,null,o,i)):vo(e,t,o,i),t.memoizedState=a.state,r&&Ur(t,s,!0),t.child}function Oo(e){var t=e.stateNode;t.pendingContext?Tr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Tr(0,t.context,!1),Yi(e,t.containerInfo)}function Do(e,t,s,a,r){return di(),mi(r),t.flags|=256,vo(e,t,s,a),t.child}var Fo,Ao,To,Mo,jo={dehydrated:null,treeContext:null,retryLane:0};function Uo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Vo(e,t,s){var a,r=t.pendingProps,n=Zi.current,o=!1,l=!!(128&t.flags);if((a=l)||(a=(null===e||null!==e.memoizedState)&&!!(2&n)),a?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(n|=1),Cr(Zi,1&n),null===e)return li(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},1&r||null===o?o=Up(l,r,0,null):(o.childLanes=0,o.pendingProps=l),e=jp(e,r,s,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Uo(s),t.memoizedState=jo,e):$o(t,l));if(null!==(n=e.memoizedState)&&null!==(a=n.dehydrated))return function(e,t,s,a,r,n,o){if(s)return 256&t.flags?(t.flags&=-257,Io(e,t,o,a=po(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(n=a.fallback,r=t.mode,a=Up({mode:"visible",children:a.children},r,0,null),(n=jp(n,r,o,null)).flags|=2,a.return=t,n.return=t,a.sibling=n,t.child=a,1&t.mode&&Ei(t,e.child,null,o),t.child.memoizedState=Uo(o),t.memoizedState=jo,n);if(!(1&t.mode))return Io(e,t,o,null);if("$!"===r.data){if(a=r.nextSibling&&r.nextSibling.dataset)var l=a.dgst;return a=l,Io(e,t,o,a=po(n=Error(i(419)),a,void 0))}if(l=0!==(o&e.childLanes),Eo||l){if(null!==(a=Ol)){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(a.suspendedLanes|o))?0:r)&&r!==n.retryLane&&(n.retryLane=r,Ti(e,r),sp(a,e,r,-1))}return fp(),Io(e,t,o,a=po(Error(i(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Sp.bind(null,e),r._reactRetry=t,null):(e=n.treeContext,si=lr(r.nextSibling),ti=t,ai=!0,ri=null,null!==e&&(qr[Qr++]=Gr,qr[Qr++]=Kr,qr[Qr++]=Yr,Gr=e.id,Kr=e.overflow,Yr=t),t=$o(t,a.children),t.flags|=4096,t)}(e,t,l,r,a,n,s);if(o){o=r.fallback,l=t.mode,a=(n=e.child).sibling;var p={mode:"hidden",children:r.children};return 1&l||t.child===n?(r=Tp(n,p)).subtreeFlags=14680064&n.subtreeFlags:((r=t.child).childLanes=0,r.pendingProps=p,t.deletions=null),null!==a?o=Tp(a,o):(o=jp(o,l,s,null)).flags|=2,o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=null===(l=e.child.memoizedState)?Uo(s):{baseLanes:l.baseLanes|s,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~s,t.memoizedState=jo,r}return e=(o=e.child).sibling,r=Tp(o,{mode:"visible",children:r.children}),!(1&t.mode)&&(r.lanes=s),r.return=t,r.sibling=null,null!==e&&(null===(s=t.deletions)?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=r,t.memoizedState=null,r}function $o(e,t){return(t=Up({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Io(e,t,s,a){return null!==a&&mi(a),Ei(t,e.child,null,s),(e=$o(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ro(e,t,s){e.lanes|=t;var a=e.alternate;null!==a&&(a.lanes|=t),Si(e.return,t,s)}function Lo(e,t,s,a,r){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=s,i.tailMode=r)}function Bo(e,t,s){var a=t.pendingProps,r=a.revealOrder,i=a.tail;if(vo(e,t,a.children,s),2&(a=Zi.current))a=1&a|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ro(e,s,t);else if(19===e.tag)Ro(e,s,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Cr(Zi,a),1&t.mode)switch(r){case"forwards":for(s=t.child,r=null;null!==s;)null!==(e=s.alternate)&&null===Xi(e)&&(r=s),s=s.sibling;null===(s=r)?(r=t.child,t.child=null):(r=s.sibling,s.sibling=null),Lo(t,!1,r,s,i);break;case"backwards":for(s=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===Xi(e)){t.child=r;break}e=r.sibling,r.sibling=s,s=r,r=e}Lo(t,!0,s,null,i);break;case"together":Lo(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function zo(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wo(e,t,s){if(null!==e&&(t.dependencies=e.dependencies),Ul|=t.lanes,0===(s&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(s=Tp(e=t.child,e.pendingProps),t.child=s,s.return=t;null!==e.sibling;)e=e.sibling,(s=s.sibling=Tp(e,e.pendingProps)).return=t;s.sibling=null}return t.child}function Ho(e,t){if(!ai)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;null!==t;)null!==t.alternate&&(s=t),t=t.sibling;null===s?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var a=null;null!==s;)null!==s.alternate&&(a=s),s=s.sibling;null===a?t||null===e.tail?e.tail=null:e.tail.sibling=null:a.sibling=null}}function qo(e){var t=null!==e.alternate&&e.alternate.child===e.child,s=0,a=0;if(t)for(var r=e.child;null!==r;)s|=r.lanes|r.childLanes,a|=14680064&r.subtreeFlags,a|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)s|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=s,t}function Qo(e,t,s){var a=t.pendingProps;switch(ei(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qo(t),null;case 1:case 17:return Fr(t.type)&&Ar(),qo(t),null;case 3:return a=t.stateNode,Gi(),Nr(Pr),Nr(Sr),tn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),null!==e&&null!==e.child||(ci(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ri&&(np(ri),ri=null))),Ao(e,t),qo(t),null;case 5:Ji(t);var r=Qi(qi.current);if(s=t.type,null!==e&&null!=t.stateNode)To(e,t,s,a,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!a){if(null===t.stateNode)throw Error(i(166));return qo(t),null}if(e=Qi(Wi.current),ci(t)){a=t.stateNode,s=t.type;var n=t.memoizedProps;switch(a[ur]=t,a[dr]=n,e=!!(1&t.mode),s){case"dialog":$a("cancel",a),$a("close",a);break;case"iframe":case"object":case"embed":$a("load",a);break;case"video":case"audio":for(r=0;r<Ma.length;r++)$a(Ma[r],a);break;case"source":$a("error",a);break;case"img":case"image":case"link":$a("error",a),$a("load",a);break;case"details":$a("toggle",a);break;case"input":K(a,n),$a("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!n.multiple},$a("invalid",a);break;case"textarea":re(a,n),$a("invalid",a)}for(var l in ye(s,n),r=null,n)if(n.hasOwnProperty(l)){var p=n[l];"children"===l?"string"==typeof p?a.textContent!==p&&(!0!==n.suppressHydrationWarning&&Ja(a.textContent,p,e),r=["children",p]):"number"==typeof p&&a.textContent!==""+p&&(!0!==n.suppressHydrationWarning&&Ja(a.textContent,p,e),r=["children",""+p]):o.hasOwnProperty(l)&&null!=p&&"onScroll"===l&&$a("scroll",a)}switch(s){case"input":q(a),X(a,n,!0);break;case"textarea":q(a),ne(a);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(a.onclick=Za)}a=r,t.updateQueue=a,null!==a&&(t.flags|=4)}else{l=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=oe(s)),"http://www.w3.org/1999/xhtml"===e?"script"===s?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof a.is?e=l.createElement(s,{is:a.is}):(e=l.createElement(s),"select"===s&&(l=e,a.multiple?l.multiple=!0:a.size&&(l.size=a.size))):e=l.createElementNS(e,s),e[ur]=t,e[dr]=a,Fo(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ee(s,a),s){case"dialog":$a("cancel",e),$a("close",e),r=a;break;case"iframe":case"object":case"embed":$a("load",e),r=a;break;case"video":case"audio":for(r=0;r<Ma.length;r++)$a(Ma[r],e);r=a;break;case"source":$a("error",e),r=a;break;case"img":case"image":case"link":$a("error",e),$a("load",e),r=a;break;case"details":$a("toggle",e),r=a;break;case"input":K(e,a),r=G(e,a),$a("invalid",e);break;case"option":default:r=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},r=V({},a,{value:void 0}),$a("invalid",e);break;case"textarea":re(e,a),r=ae(e,a),$a("invalid",e)}for(n in ye(s,r),p=r)if(p.hasOwnProperty(n)){var c=p[n];"style"===n?be(e,c):"dangerouslySetInnerHTML"===n?null!=(c=c?c.__html:void 0)&&ue(e,c):"children"===n?"string"==typeof c?("textarea"!==s||""!==c)&&de(e,c):"number"==typeof c&&de(e,""+c):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(o.hasOwnProperty(n)?null!=c&&"onScroll"===n&&$a("scroll",e):null!=c&&E(e,n,c,l))}switch(s){case"input":q(e),X(e,a,!1);break;case"textarea":q(e),ne(e);break;case"option":null!=a.value&&e.setAttribute("value",""+W(a.value));break;case"select":e.multiple=!!a.multiple,null!=(n=a.value)?se(e,!!a.multiple,n,!1):null!=a.defaultValue&&se(e,!!a.multiple,a.defaultValue,!0);break;default:"function"==typeof r.onClick&&(e.onclick=Za)}switch(s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return qo(t),null;case 6:if(e&&null!=t.stateNode)Mo(e,t,e.memoizedProps,a);else{if("string"!=typeof a&&null===t.stateNode)throw Error(i(166));if(s=Qi(qi.current),Qi(Wi.current),ci(t)){if(a=t.stateNode,s=t.memoizedProps,a[ur]=t,(n=a.nodeValue!==s)&&null!==(e=ti))switch(e.tag){case 3:Ja(a.nodeValue,s,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ja(a.nodeValue,s,!!(1&e.mode))}n&&(t.flags|=4)}else(a=(9===s.nodeType?s:s.ownerDocument).createTextNode(a))[ur]=t,t.stateNode=a}return qo(t),null;case 13:if(Nr(Zi),a=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ai&&null!==si&&1&t.mode&&!(128&t.flags))ui(),di(),t.flags|=98560,n=!1;else if(n=ci(t),null!==a&&null!==a.dehydrated){if(null===e){if(!n)throw Error(i(318));if(!(n=null!==(n=t.memoizedState)?n.dehydrated:null))throw Error(i(317));n[ur]=t}else di(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qo(t),n=!1}else null!==ri&&(np(ri),ri=null),n=!0;if(!n)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=s,t):((a=null!==a)!==(null!==e&&null!==e.memoizedState)&&a&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Zi.current?0===Ml&&(Ml=3):fp())),null!==t.updateQueue&&(t.flags|=4),qo(t),null);case 4:return Gi(),Ao(e,t),null===e&&La(t.stateNode.containerInfo),qo(t),null;case 10:return ki(t.type._context),qo(t),null;case 19:if(Nr(Zi),null===(n=t.memoizedState))return qo(t),null;if(a=!!(128&t.flags),null===(l=n.rendering))if(a)Ho(n,!1);else{if(0!==Ml||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=Xi(e))){for(t.flags|=128,Ho(n,!1),null!==(a=l.updateQueue)&&(t.updateQueue=a,t.flags|=4),t.subtreeFlags=0,a=s,s=t.child;null!==s;)e=a,(n=s).flags&=14680066,null===(l=n.alternate)?(n.childLanes=0,n.lanes=e,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,e=l.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Cr(Zi,1&Zi.current|2),t.child}e=e.sibling}null!==n.tail&&Je()>Bl&&(t.flags|=128,a=!0,Ho(n,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Xi(l))){if(t.flags|=128,a=!0,null!==(s=e.updateQueue)&&(t.updateQueue=s,t.flags|=4),Ho(n,!0),null===n.tail&&"hidden"===n.tailMode&&!l.alternate&&!ai)return qo(t),null}else 2*Je()-n.renderingStartTime>Bl&&1073741824!==s&&(t.flags|=128,a=!0,Ho(n,!1),t.lanes=4194304);n.isBackwards?(l.sibling=t.child,t.child=l):(null!==(s=n.last)?s.sibling=l:t.child=l,n.last=l)}return null!==n.tail?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=Je(),t.sibling=null,s=Zi.current,Cr(Zi,a?1&s|2:1&s),t):(qo(t),null);case 22:case 23:return up(),a=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==a&&(t.flags|=8192),a&&1&t.mode?!!(1073741824&Al)&&(qo(t),6&t.subtreeFlags&&(t.flags|=8192)):qo(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Yo(e,t){switch(ei(t),t.tag){case 1:return Fr(t.type)&&Ar(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Gi(),Nr(Pr),Nr(Sr),tn(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Ji(t),null;case 13:if(Nr(Zi),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));di()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Nr(Zi),null;case 4:return Gi(),null;case 10:return ki(t.type._context),null;case 22:case 23:return up(),null;default:return null}}Fo=function(e,t){for(var s=t.child;null!==s;){if(5===s.tag||6===s.tag)e.appendChild(s.stateNode);else if(4!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break;for(;null===s.sibling;){if(null===s.return||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Ao=function(){},To=function(e,t,s,a){var r=e.memoizedProps;if(r!==a){e=t.stateNode,Qi(Wi.current);var i,n=null;switch(s){case"input":r=G(e,r),a=G(e,a),n=[];break;case"select":r=V({},r,{value:void 0}),a=V({},a,{value:void 0}),n=[];break;case"textarea":r=ae(e,r),a=ae(e,a),n=[];break;default:"function"!=typeof r.onClick&&"function"==typeof a.onClick&&(e.onclick=Za)}for(c in ye(s,a),s=null,r)if(!a.hasOwnProperty(c)&&r.hasOwnProperty(c)&&null!=r[c])if("style"===c){var l=r[c];for(i in l)l.hasOwnProperty(i)&&(s||(s={}),s[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(o.hasOwnProperty(c)?n||(n=[]):(n=n||[]).push(c,null));for(c in a){var p=a[c];if(l=null!=r?r[c]:void 0,a.hasOwnProperty(c)&&p!==l&&(null!=p||null!=l))if("style"===c)if(l){for(i in l)!l.hasOwnProperty(i)||p&&p.hasOwnProperty(i)||(s||(s={}),s[i]="");for(i in p)p.hasOwnProperty(i)&&l[i]!==p[i]&&(s||(s={}),s[i]=p[i])}else s||(n||(n=[]),n.push(c,s)),s=p;else"dangerouslySetInnerHTML"===c?(p=p?p.__html:void 0,l=l?l.__html:void 0,null!=p&&l!==p&&(n=n||[]).push(c,p)):"children"===c?"string"!=typeof p&&"number"!=typeof p||(n=n||[]).push(c,""+p):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(o.hasOwnProperty(c)?(null!=p&&"onScroll"===c&&$a("scroll",e),n||l===p||(n=[])):(n=n||[]).push(c,p))}s&&(n=n||[]).push("style",s);var c=n;(t.updateQueue=c)&&(t.flags|=4)}},Mo=function(e,t,s,a){s!==a&&(t.flags|=4)};var Go=!1,Ko=!1,Jo="function"==typeof WeakSet?WeakSet:Set,Zo=null;function Xo(e,t){var s=e.ref;if(null!==s)if("function"==typeof s)try{s(null)}catch(s){Np(e,t,s)}else s.current=null}function el(e,t,s){try{s()}catch(s){Np(e,t,s)}}var tl=!1;function sl(e,t,s){var a=t.updateQueue;if(null!==(a=null!==a?a.lastEffect:null)){var r=a=a.next;do{if((r.tag&e)===e){var i=r.destroy;r.destroy=void 0,void 0!==i&&el(t,s,i)}r=r.next}while(r!==a)}}function al(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var s=t=t.next;do{if((s.tag&e)===e){var a=s.create;s.destroy=a()}s=s.next}while(s!==t)}}function rl(e){var t=e.ref;if(null!==t){var s=e.stateNode;e.tag,e=s,"function"==typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ur],delete t[dr],delete t[hr],delete t[fr],delete t[br])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nl(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,s){var a=e.tag;if(5===a||6===a)e=e.stateNode,t?8===s.nodeType?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(8===s.nodeType?(t=s.parentNode).insertBefore(e,s):(t=s).appendChild(e),null!=(s=s._reactRootContainer)||null!==t.onclick||(t.onclick=Za));else if(4!==a&&null!==(e=e.child))for(ll(e,t,s),e=e.sibling;null!==e;)ll(e,t,s),e=e.sibling}function pl(e,t,s){var a=e.tag;if(5===a||6===a)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(4!==a&&null!==(e=e.child))for(pl(e,t,s),e=e.sibling;null!==e;)pl(e,t,s),e=e.sibling}var cl=null,ul=!1;function dl(e,t,s){for(s=s.child;null!==s;)ml(e,t,s),s=s.sibling}function ml(e,t,s){if(it&&"function"==typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(rt,s)}catch(e){}switch(s.tag){case 5:Ko||Xo(s,t);case 6:var a=cl,r=ul;cl=null,dl(e,t,s),ul=r,null!==(cl=a)&&(ul?(e=cl,s=s.stateNode,8===e.nodeType?e.parentNode.removeChild(s):e.removeChild(s)):cl.removeChild(s.stateNode));break;case 18:null!==cl&&(ul?(e=cl,s=s.stateNode,8===e.nodeType?or(e.parentNode,s):1===e.nodeType&&or(e,s),Bt(e)):or(cl,s.stateNode));break;case 4:a=cl,r=ul,cl=s.stateNode.containerInfo,ul=!0,dl(e,t,s),cl=a,ul=r;break;case 0:case 11:case 14:case 15:if(!Ko&&(null!==(a=s.updateQueue)&&null!==(a=a.lastEffect))){r=a=a.next;do{var i=r,n=i.destroy;i=i.tag,void 0!==n&&(2&i||4&i)&&el(s,t,n),r=r.next}while(r!==a)}dl(e,t,s);break;case 1:if(!Ko&&(Xo(s,t),"function"==typeof(a=s.stateNode).componentWillUnmount))try{a.props=s.memoizedProps,a.state=s.memoizedState,a.componentWillUnmount()}catch(e){Np(s,t,e)}dl(e,t,s);break;case 21:dl(e,t,s);break;case 22:1&s.mode?(Ko=(a=Ko)||null!==s.memoizedState,dl(e,t,s),Ko=a):dl(e,t,s);break;default:dl(e,t,s)}}function hl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var s=e.stateNode;null===s&&(s=e.stateNode=new Jo),t.forEach(function(t){var a=Pp.bind(null,e,t);s.has(t)||(s.add(t),t.then(a,a))})}}function fl(e,t){var s=t.deletions;if(null!==s)for(var a=0;a<s.length;a++){var r=s[a];try{var n=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,ul=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===cl)throw Error(i(160));ml(n,o,r),cl=null,ul=!1;var p=r.alternate;null!==p&&(p.return=null),r.return=null}catch(e){Np(r,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)bl(t,e),t=t.sibling}function bl(e,t){var s=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),gl(e),4&a){try{sl(3,e,e.return),al(3,e)}catch(t){Np(e,e.return,t)}try{sl(5,e,e.return)}catch(t){Np(e,e.return,t)}}break;case 1:fl(t,e),gl(e),512&a&&null!==s&&Xo(s,s.return);break;case 5:if(fl(t,e),gl(e),512&a&&null!==s&&Xo(s,s.return),32&e.flags){var r=e.stateNode;try{de(r,"")}catch(t){Np(e,e.return,t)}}if(4&a&&null!=(r=e.stateNode)){var n=e.memoizedProps,o=null!==s?s.memoizedProps:n,l=e.type,p=e.updateQueue;if(e.updateQueue=null,null!==p)try{"input"===l&&"radio"===n.type&&null!=n.name&&J(r,n),Ee(l,o);var c=Ee(l,n);for(o=0;o<p.length;o+=2){var u=p[o],d=p[o+1];"style"===u?be(r,d):"dangerouslySetInnerHTML"===u?ue(r,d):"children"===u?de(r,d):E(r,u,d,c)}switch(l){case"input":Z(r,n);break;case"textarea":ie(r,n);break;case"select":var m=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!n.multiple;var h=n.value;null!=h?se(r,!!n.multiple,h,!1):m!==!!n.multiple&&(null!=n.defaultValue?se(r,!!n.multiple,n.defaultValue,!0):se(r,!!n.multiple,n.multiple?[]:"",!1))}r[dr]=n}catch(t){Np(e,e.return,t)}}break;case 6:if(fl(t,e),gl(e),4&a){if(null===e.stateNode)throw Error(i(162));r=e.stateNode,n=e.memoizedProps;try{r.nodeValue=n}catch(t){Np(e,e.return,t)}}break;case 3:if(fl(t,e),gl(e),4&a&&null!==s&&s.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(t){Np(e,e.return,t)}break;case 4:default:fl(t,e),gl(e);break;case 13:fl(t,e),gl(e),8192&(r=e.child).flags&&(n=null!==r.memoizedState,r.stateNode.isHidden=n,!n||null!==r.alternate&&null!==r.alternate.memoizedState||(Ll=Je())),4&a&&hl(e);break;case 22:if(u=null!==s&&null!==s.memoizedState,1&e.mode?(Ko=(c=Ko)||u,fl(t,e),Ko=c):fl(t,e),gl(e),8192&a){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Zo=e,u=e.child;null!==u;){for(d=Zo=u;null!==Zo;){switch(h=(m=Zo).child,m.tag){case 0:case 11:case 14:case 15:sl(4,m,m.return);break;case 1:Xo(m,m.return);var f=m.stateNode;if("function"==typeof f.componentWillUnmount){a=m,s=m.return;try{t=a,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(e){Np(a,s,e)}}break;case 5:Xo(m,m.return);break;case 22:if(null!==m.memoizedState){_l(d);continue}}null!==h?(h.return=m,Zo=h):_l(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{r=d.stateNode,c?"function"==typeof(n=r.style).setProperty?n.setProperty("display","none","important"):n.display="none":(l=d.stateNode,o=null!=(p=d.memoizedProps.style)&&p.hasOwnProperty("display")?p.display:null,l.style.display=fe("display",o))}catch(t){Np(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){Np(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:fl(t,e),gl(e),4&a&&hl(e);case 21:}}function gl(e){var t=e.flags;if(2&t){try{e:{for(var s=e.return;null!==s;){if(nl(s)){var a=s;break e}s=s.return}throw Error(i(160))}switch(a.tag){case 5:var r=a.stateNode;32&a.flags&&(de(r,""),a.flags&=-33),pl(e,ol(e),r);break;case 3:case 4:var n=a.stateNode.containerInfo;ll(e,ol(e),n);break;default:throw Error(i(161))}}catch(t){Np(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,s){Zo=e,El(e,t,s)}function El(e,t,s){for(var a=!!(1&e.mode);null!==Zo;){var r=Zo,i=r.child;if(22===r.tag&&a){var n=null!==r.memoizedState||Go;if(!n){var o=r.alternate,l=null!==o&&null!==o.memoizedState||Ko;o=Go;var p=Ko;if(Go=n,(Ko=l)&&!p)for(Zo=r;null!==Zo;)l=(n=Zo).child,22===n.tag&&null!==n.memoizedState?wl(r):null!==l?(l.return=n,Zo=l):wl(r);for(;null!==i;)Zo=i,El(i,t,s),i=i.sibling;Zo=r,Go=o,Ko=p}vl(e)}else 8772&r.subtreeFlags&&null!==i?(i.return=r,Zo=i):vl(e)}}function vl(e){for(;null!==Zo;){var t=Zo;if(8772&t.flags){var s=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ko||al(5,t);break;case 1:var a=t.stateNode;if(4&t.flags&&!Ko)if(null===s)a.componentDidMount();else{var r=t.elementType===t.type?s.memoizedProps:to(t.type,s.memoizedProps);a.componentDidUpdate(r,s.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var n=t.updateQueue;null!==n&&Bi(t,n,a);break;case 3:var o=t.updateQueue;if(null!==o){if(s=null,null!==t.child)switch(t.child.tag){case 5:case 1:s=t.child.stateNode}Bi(t,o,s)}break;case 5:var l=t.stateNode;if(null===s&&4&t.flags){s=l;var p=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":p.autoFocus&&s.focus();break;case"img":p.src&&(s.src=p.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Bt(d)}}}break;default:throw Error(i(163))}Ko||512&t.flags&&rl(t)}catch(e){Np(t,t.return,e)}}if(t===e){Zo=null;break}if(null!==(s=t.sibling)){s.return=t.return,Zo=s;break}Zo=t.return}}function _l(e){for(;null!==Zo;){var t=Zo;if(t===e){Zo=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Zo=s;break}Zo=t.return}}function wl(e){for(;null!==Zo;){var t=Zo;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{al(4,t)}catch(e){Np(t,s,e)}break;case 1:var a=t.stateNode;if("function"==typeof a.componentDidMount){var r=t.return;try{a.componentDidMount()}catch(e){Np(t,r,e)}}var i=t.return;try{rl(t)}catch(e){Np(t,i,e)}break;case 5:var n=t.return;try{rl(t)}catch(e){Np(t,n,e)}}}catch(e){Np(t,t.return,e)}if(t===e){Zo=null;break}var o=t.sibling;if(null!==o){o.return=t.return,Zo=o;break}Zo=t.return}}var xl,Nl=Math.ceil,Cl=v.ReactCurrentDispatcher,kl=v.ReactCurrentOwner,Sl=v.ReactCurrentBatchConfig,Pl=0,Ol=null,Dl=null,Fl=0,Al=0,Tl=xr(0),Ml=0,jl=null,Ul=0,Vl=0,$l=0,Il=null,Rl=null,Ll=0,Bl=1/0,zl=null,Wl=!1,Hl=null,ql=null,Ql=!1,Yl=null,Gl=0,Kl=0,Jl=null,Zl=-1,Xl=0;function ep(){return 6&Pl?Je():-1!==Zl?Zl:Zl=Je()}function tp(e){return 1&e.mode?2&Pl&&0!==Fl?Fl&-Fl:null!==hi.transition?(0===Xl&&(Xl=ft()),Xl):0!==(e=Et)?e:e=void 0===(e=window.event)?16:Kt(e.type):1}function sp(e,t,s,a){if(50<Kl)throw Kl=0,Jl=null,Error(i(185));gt(e,s,a),2&Pl&&e===Ol||(e===Ol&&(!(2&Pl)&&(Vl|=s),4===Ml&&op(e,Fl)),ap(e,a),1===s&&0===Pl&&!(1&t.mode)&&(Bl=Je()+500,$r&&Lr()))}function ap(e,t){var s=e.callbackNode;!function(e,t){for(var s=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes;0<i;){var n=31-nt(i),o=1<<n,l=r[n];-1===l?0!==(o&s)&&0===(o&a)||(r[n]=mt(o,t)):l<=t&&(e.expiredLanes|=o),i&=~o}}(e,t);var a=dt(e,e===Ol?Fl:0);if(0===a)null!==s&&Ye(s),e.callbackNode=null,e.callbackPriority=0;else if(t=a&-a,e.callbackPriority!==t){if(null!=s&&Ye(s),1===t)0===e.tag?function(e){$r=!0,Rr(e)}(lp.bind(null,e)):Rr(lp.bind(null,e)),ir(function(){!(6&Pl)&&Lr()}),s=null;else{switch(vt(a)){case 1:s=Xe;break;case 4:s=et;break;case 16:default:s=tt;break;case 536870912:s=at}s=Op(s,rp.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function rp(e,t){if(Zl=-1,Xl=0,6&Pl)throw Error(i(327));var s=e.callbackNode;if(wp()&&e.callbackNode!==s)return null;var a=dt(e,e===Ol?Fl:0);if(0===a)return null;if(30&a||0!==(a&e.expiredLanes)||t)t=bp(e,a);else{t=a;var r=Pl;Pl|=2;var n=hp();for(Ol===e&&Fl===t||(zl=null,Bl=Je()+500,dp(e,t));;)try{yp();break}catch(t){mp(e,t)}Ci(),Cl.current=n,Pl=r,null!==Dl?t=0:(Ol=null,Fl=0,t=Ml)}if(0!==t){if(2===t&&(0!==(r=ht(e))&&(a=r,t=ip(e,r))),1===t)throw s=jl,dp(e,0),op(e,a),ap(e,Je()),s;if(6===t)op(e,a);else{if(r=e.current.alternate,!(30&a||function(e){for(var t=e;;){if(16384&t.flags){var s=t.updateQueue;if(null!==s&&null!==(s=s.stores))for(var a=0;a<s.length;a++){var r=s[a],i=r.getSnapshot;r=r.value;try{if(!na(i(),r))return!1}catch(e){return!1}}}if(s=t.child,16384&t.subtreeFlags&&null!==s)s.return=t,t=s;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(r)||(t=bp(e,a),2===t&&(n=ht(e),0!==n&&(a=n,t=ip(e,n))),1!==t)))throw s=jl,dp(e,0),op(e,a),ap(e,Je()),s;switch(e.finishedWork=r,e.finishedLanes=a,t){case 0:case 1:throw Error(i(345));case 2:case 5:_p(e,Rl,zl);break;case 3:if(op(e,a),(130023424&a)===a&&10<(t=Ll+500-Je())){if(0!==dt(e,0))break;if(((r=e.suspendedLanes)&a)!==a){ep(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=sr(_p.bind(null,e,Rl,zl),t);break}_p(e,Rl,zl);break;case 4:if(op(e,a),(4194240&a)===a)break;for(t=e.eventTimes,r=-1;0<a;){var o=31-nt(a);n=1<<o,(o=t[o])>r&&(r=o),a&=~n}if(a=r,10<(a=(120>(a=Je()-a)?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Nl(a/1960))-a)){e.timeoutHandle=sr(_p.bind(null,e,Rl,zl),a);break}_p(e,Rl,zl);break;default:throw Error(i(329))}}}return ap(e,Je()),e.callbackNode===s?rp.bind(null,e):null}function ip(e,t){var s=Il;return e.current.memoizedState.isDehydrated&&(dp(e,t).flags|=256),2!==(e=bp(e,t))&&(t=Rl,Rl=s,null!==t&&np(t)),e}function np(e){null===Rl?Rl=e:Rl.push.apply(Rl,e)}function op(e,t){for(t&=~$l,t&=~Vl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-nt(t),a=1<<s;e[s]=-1,t&=~a}}function lp(e){if(6&Pl)throw Error(i(327));wp();var t=dt(e,0);if(!(1&t))return ap(e,Je()),null;var s=bp(e,t);if(0!==e.tag&&2===s){var a=ht(e);0!==a&&(t=a,s=ip(e,a))}if(1===s)throw s=jl,dp(e,0),op(e,t),ap(e,Je()),s;if(6===s)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_p(e,Rl,zl),ap(e,Je()),null}function pp(e,t){var s=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=s)&&(Bl=Je()+500,$r&&Lr())}}function cp(e){null!==Yl&&0===Yl.tag&&!(6&Pl)&&wp();var t=Pl;Pl|=1;var s=Sl.transition,a=Et;try{if(Sl.transition=null,Et=1,e)return e()}finally{Et=a,Sl.transition=s,!(6&(Pl=t))&&Lr()}}function up(){Al=Tl.current,Nr(Tl)}function dp(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(-1!==s&&(e.timeoutHandle=-1,ar(s)),null!==Dl)for(s=Dl.return;null!==s;){var a=s;switch(ei(a),a.tag){case 1:null!=(a=a.type.childContextTypes)&&Ar();break;case 3:Gi(),Nr(Pr),Nr(Sr),tn();break;case 5:Ji(a);break;case 4:Gi();break;case 13:case 19:Nr(Zi);break;case 10:ki(a.type._context);break;case 22:case 23:up()}s=s.return}if(Ol=e,Dl=e=Tp(e.current,null),Fl=Al=t,Ml=0,jl=null,$l=Vl=Ul=0,Rl=Il=null,null!==Di){for(t=0;t<Di.length;t++)if(null!==(a=(s=Di[t]).interleaved)){s.interleaved=null;var r=a.next,i=s.pending;if(null!==i){var n=i.next;i.next=r,a.next=n}s.pending=a}Di=null}return e}function mp(e,t){for(;;){var s=Dl;try{if(Ci(),sn.current=Jn,pn){for(var a=nn.memoizedState;null!==a;){var r=a.queue;null!==r&&(r.pending=null),a=a.next}pn=!1}if(rn=0,ln=on=nn=null,cn=!1,un=0,kl.current=null,null===s||null===s.return){Ml=1,jl=t,Dl=null;break}e:{var n=e,o=s.return,l=s,p=t;if(t=Fl,l.flags|=32768,null!==p&&"object"==typeof p&&"function"==typeof p.then){var c=p,u=l,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var m=u.alternate;m?(u.updateQueue=m.updateQueue,u.memoizedState=m.memoizedState,u.lanes=m.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=bo(o);if(null!==h){h.flags&=-257,go(h,o,l,0,t),1&h.mode&&fo(n,c,t),p=c;var f=(t=h).updateQueue;if(null===f){var b=new Set;b.add(p),t.updateQueue=b}else f.add(p);break e}if(!(1&t)){fo(n,c,t),fp();break e}p=Error(i(426))}else if(ai&&1&l.mode){var g=bo(o);if(null!==g){!(65536&g.flags)&&(g.flags|=256),go(g,o,l,0,t),mi(lo(p,l));break e}}n=p=lo(p,l),4!==Ml&&(Ml=2),null===Il?Il=[n]:Il.push(n),n=o;do{switch(n.tag){case 3:n.flags|=65536,t&=-t,n.lanes|=t,Ri(n,mo(0,p,t));break e;case 1:l=p;var y=n.type,E=n.stateNode;if(!(128&n.flags||"function"!=typeof y.getDerivedStateFromError&&(null===E||"function"!=typeof E.componentDidCatch||null!==ql&&ql.has(E)))){n.flags|=65536,t&=-t,n.lanes|=t,Ri(n,ho(n,l,t));break e}}n=n.return}while(null!==n)}vp(s)}catch(e){t=e,Dl===s&&null!==s&&(Dl=s=s.return);continue}break}}function hp(){var e=Cl.current;return Cl.current=Jn,null===e?Jn:e}function fp(){0!==Ml&&3!==Ml&&2!==Ml||(Ml=4),null===Ol||!(268435455&Ul)&&!(268435455&Vl)||op(Ol,Fl)}function bp(e,t){var s=Pl;Pl|=2;var a=hp();for(Ol===e&&Fl===t||(zl=null,dp(e,t));;)try{gp();break}catch(t){mp(e,t)}if(Ci(),Pl=s,Cl.current=a,null!==Dl)throw Error(i(261));return Ol=null,Fl=0,Ml}function gp(){for(;null!==Dl;)Ep(Dl)}function yp(){for(;null!==Dl&&!Ge();)Ep(Dl)}function Ep(e){var t=xl(e.alternate,e,Al);e.memoizedProps=e.pendingProps,null===t?vp(e):Dl=t,kl.current=null}function vp(e){var t=e;do{var s=t.alternate;if(e=t.return,32768&t.flags){if(null!==(s=Yo(s,t)))return s.flags&=32767,void(Dl=s);if(null===e)return Ml=6,void(Dl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(s=Qo(s,t,Al)))return void(Dl=s);if(null!==(t=t.sibling))return void(Dl=t);Dl=t=e}while(null!==t);0===Ml&&(Ml=5)}function _p(e,t,s){var a=Et,r=Sl.transition;try{Sl.transition=null,Et=1,function(e,t,s,a){do{wp()}while(null!==Yl);if(6&Pl)throw Error(i(327));s=e.finishedWork;var r=e.finishedLanes;if(null===s)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var n=s.lanes|s.childLanes;if(function(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0<s;){var r=31-nt(s),i=1<<r;t[r]=0,a[r]=-1,e[r]=-1,s&=~i}}(e,n),e===Ol&&(Dl=Ol=null,Fl=0),!(2064&s.subtreeFlags)&&!(2064&s.flags)||Ql||(Ql=!0,Op(tt,function(){return wp(),null})),n=!!(15990&s.flags),!!(15990&s.subtreeFlags)||n){n=Sl.transition,Sl.transition=null;var o=Et;Et=1;var l=Pl;Pl|=4,kl.current=null,function(e,t){if(Xa=Wt,da(e=ua())){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{var a=(s=(s=e.ownerDocument)&&s.defaultView||window).getSelection&&s.getSelection();if(a&&0!==a.rangeCount){s=a.anchorNode;var r=a.anchorOffset,n=a.focusNode;a=a.focusOffset;try{s.nodeType,n.nodeType}catch(e){s=null;break e}var o=0,l=-1,p=-1,c=0,u=0,d=e,m=null;t:for(;;){for(var h;d!==s||0!==r&&3!==d.nodeType||(l=o+r),d!==n||0!==a&&3!==d.nodeType||(p=o+a),3===d.nodeType&&(o+=d.nodeValue.length),null!==(h=d.firstChild);)m=d,d=h;for(;;){if(d===e)break t;if(m===s&&++c===r&&(l=o),m===n&&++u===a&&(p=o),null!==(h=d.nextSibling))break;m=(d=m).parentNode}d=h}s=-1===l||-1===p?null:{start:l,end:p}}else s=null}s=s||{start:0,end:0}}else s=null;for(er={focusedElem:e,selectionRange:s},Wt=!1,Zo=t;null!==Zo;)if(e=(t=Zo).child,1028&t.subtreeFlags&&null!==e)e.return=t,Zo=e;else for(;null!==Zo;){t=Zo;try{var f=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var b=f.memoizedProps,g=f.memoizedState,y=t.stateNode,E=y.getSnapshotBeforeUpdate(t.elementType===t.type?b:to(t.type,b),g);y.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var v=t.stateNode.containerInfo;1===v.nodeType?v.textContent="":9===v.nodeType&&v.documentElement&&v.removeChild(v.documentElement);break;default:throw Error(i(163))}}catch(e){Np(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Zo=e;break}Zo=t.return}f=tl,tl=!1}(e,s),bl(s,e),ma(er),Wt=!!Xa,er=Xa=null,e.current=s,yl(s,e,r),Ke(),Pl=l,Et=o,Sl.transition=n}else e.current=s;if(Ql&&(Ql=!1,Yl=e,Gl=r),n=e.pendingLanes,0===n&&(ql=null),function(e){if(it&&"function"==typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(rt,e,void 0,!(128&~e.current.flags))}catch(e){}}(s.stateNode),ap(e,Je()),null!==t)for(a=e.onRecoverableError,s=0;s<t.length;s++)r=t[s],a(r.value,{componentStack:r.stack,digest:r.digest});if(Wl)throw Wl=!1,e=Hl,Hl=null,e;!!(1&Gl)&&0!==e.tag&&wp(),n=e.pendingLanes,1&n?e===Jl?Kl++:(Kl=0,Jl=e):Kl=0,Lr()}(e,t,s,a)}finally{Sl.transition=r,Et=a}return null}function wp(){if(null!==Yl){var e=vt(Gl),t=Sl.transition,s=Et;try{if(Sl.transition=null,Et=16>e?16:e,null===Yl)var a=!1;else{if(e=Yl,Yl=null,Gl=0,6&Pl)throw Error(i(331));var r=Pl;for(Pl|=4,Zo=e.current;null!==Zo;){var n=Zo,o=n.child;if(16&Zo.flags){var l=n.deletions;if(null!==l){for(var p=0;p<l.length;p++){var c=l[p];for(Zo=c;null!==Zo;){var u=Zo;switch(u.tag){case 0:case 11:case 15:sl(8,u,n)}var d=u.child;if(null!==d)d.return=u,Zo=d;else for(;null!==Zo;){var m=(u=Zo).sibling,h=u.return;if(il(u),u===c){Zo=null;break}if(null!==m){m.return=h,Zo=m;break}Zo=h}}}var f=n.alternate;if(null!==f){var b=f.child;if(null!==b){f.child=null;do{var g=b.sibling;b.sibling=null,b=g}while(null!==b)}}Zo=n}}if(2064&n.subtreeFlags&&null!==o)o.return=n,Zo=o;else e:for(;null!==Zo;){if(2048&(n=Zo).flags)switch(n.tag){case 0:case 11:case 15:sl(9,n,n.return)}var y=n.sibling;if(null!==y){y.return=n.return,Zo=y;break e}Zo=n.return}}var E=e.current;for(Zo=E;null!==Zo;){var v=(o=Zo).child;if(2064&o.subtreeFlags&&null!==v)v.return=o,Zo=v;else e:for(o=E;null!==Zo;){if(2048&(l=Zo).flags)try{switch(l.tag){case 0:case 11:case 15:al(9,l)}}catch(e){Np(l,l.return,e)}if(l===o){Zo=null;break e}var _=l.sibling;if(null!==_){_.return=l.return,Zo=_;break e}Zo=l.return}}if(Pl=r,Lr(),it&&"function"==typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(rt,e)}catch(e){}a=!0}return a}finally{Et=s,Sl.transition=t}}return!1}function xp(e,t,s){e=$i(e,t=mo(0,t=lo(s,t),1),1),t=ep(),null!==e&&(gt(e,1,t),ap(e,t))}function Np(e,t,s){if(3===e.tag)xp(e,e,s);else for(;null!==t;){if(3===t.tag){xp(t,e,s);break}if(1===t.tag){var a=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof a.componentDidCatch&&(null===ql||!ql.has(a))){t=$i(t,e=ho(t,e=lo(s,e),1),1),e=ep(),null!==t&&(gt(t,1,e),ap(t,e));break}}t=t.return}}function Cp(e,t,s){var a=e.pingCache;null!==a&&a.delete(t),t=ep(),e.pingedLanes|=e.suspendedLanes&s,Ol===e&&(Fl&s)===s&&(4===Ml||3===Ml&&(130023424&Fl)===Fl&&500>Je()-Ll?dp(e,0):$l|=s),ap(e,t)}function kp(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var s=ep();null!==(e=Ti(e,t))&&(gt(e,t,s),ap(e,s))}function Sp(e){var t=e.memoizedState,s=0;null!==t&&(s=t.retryLane),kp(e,s)}function Pp(e,t){var s=0;switch(e.tag){case 13:var a=e.stateNode,r=e.memoizedState;null!==r&&(s=r.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(i(314))}null!==a&&a.delete(t),kp(e,s)}function Op(e,t){return Qe(e,t)}function Dp(e,t,s,a){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fp(e,t,s,a){return new Dp(e,t,s,a)}function Ap(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Tp(e,t){var s=e.alternate;return null===s?((s=Fp(e.tag,t,e.key,e.mode)).elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=14680064&e.flags,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function Mp(e,t,s,a,r,n){var o=2;if(a=e,"function"==typeof e)Ap(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case x:return jp(s.children,r,n,t);case N:o=8,r|=8;break;case C:return(e=Fp(12,s,t,2|r)).elementType=C,e.lanes=n,e;case O:return(e=Fp(13,s,t,r)).elementType=O,e.lanes=n,e;case D:return(e=Fp(19,s,t,r)).elementType=D,e.lanes=n,e;case T:return Up(s,r,n,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case k:o=10;break e;case S:o=9;break e;case P:o=11;break e;case F:o=14;break e;case A:o=16,a=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Fp(o,s,t,r)).elementType=e,t.type=a,t.lanes=n,t}function jp(e,t,s,a){return(e=Fp(7,e,a,t)).lanes=s,e}function Up(e,t,s,a){return(e=Fp(22,e,a,t)).elementType=T,e.lanes=s,e.stateNode={isHidden:!1},e}function Vp(e,t,s){return(e=Fp(6,e,null,t)).lanes=s,e}function $p(e,t,s){return(t=Fp(4,null!==e.children?e.children:[],e.key,t)).lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ip(e,t,s,a,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bt(0),this.expirationTimes=bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bt(0),this.identifierPrefix=a,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Rp(e,t,s,a,r,i,n,o,l){return e=new Ip(e,t,s,o,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Fp(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:a,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},ji(i),e}function Lp(e){if(!e)return kr;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Fr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var s=e.type;if(Fr(s))return Mr(e,s,t)}return t}function Bp(e,t,s,a,r,i,n,o,l){return(e=Rp(s,a,!0,e,0,i,0,o,l)).context=Lp(null),s=e.current,(i=Vi(a=ep(),r=tp(s))).callback=null!=t?t:null,$i(s,i,r),e.current.lanes=r,gt(e,r,a),ap(e,a),e}function zp(e,t,s,a){var r=t.current,i=ep(),n=tp(r);return s=Lp(s),null===t.context?t.context=s:t.pendingContext=s,(t=Vi(i,n)).payload={element:e},null!==(a=void 0===a?null:a)&&(t.callback=a),null!==(e=$i(r,t,n))&&(sp(e,r,n,i),Ii(e,r,n)),n}function Wp(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Hp(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var s=e.retryLane;e.retryLane=0!==s&&s<t?s:t}}function qp(e,t){Hp(e,t),(e=e.alternate)&&Hp(e,t)}xl=function(e,t,s){if(null!==e)if(e.memoizedProps!==t.pendingProps||Pr.current)Eo=!0;else{if(0===(e.lanes&s)&&!(128&t.flags))return Eo=!1,function(e,t,s){switch(t.tag){case 3:Oo(t),di();break;case 5:Ki(t);break;case 1:Fr(t.type)&&jr(t);break;case 4:Yi(t,t.stateNode.containerInfo);break;case 10:var a=t.type._context,r=t.memoizedProps.value;Cr(_i,a._currentValue),a._currentValue=r;break;case 13:if(null!==(a=t.memoizedState))return null!==a.dehydrated?(Cr(Zi,1&Zi.current),t.flags|=128,null):0!==(s&t.child.childLanes)?Vo(e,t,s):(Cr(Zi,1&Zi.current),null!==(e=Wo(e,t,s))?e.sibling:null);Cr(Zi,1&Zi.current);break;case 19:if(a=0!==(s&t.childLanes),128&e.flags){if(a)return Bo(e,t,s);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),Cr(Zi,Zi.current),a)break;return null;case 22:case 23:return t.lanes=0,No(e,t,s)}return Wo(e,t,s)}(e,t,s);Eo=!!(131072&e.flags)}else Eo=!1,ai&&1048576&t.flags&&Zr(t,Hr,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;zo(e,t),e=t.pendingProps;var r=Dr(t,Sr.current);Pi(t,s),r=fn(null,t,a,e,r,s);var n=bn();return t.flags|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Fr(a)?(n=!0,jr(t)):n=!1,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,ji(t),r.updater=ao,t.stateNode=r,r._reactInternals=t,oo(t,a,e,s),t=Po(null,t,a,!0,n,s)):(t.tag=0,ai&&n&&Xr(t),vo(null,t,r,s),t=t.child),t;case 16:a=t.elementType;e:{switch(zo(e,t),e=t.pendingProps,a=(r=a._init)(a._payload),t.type=a,r=t.tag=function(e){if("function"==typeof e)return Ap(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===F)return 14}return 2}(a),e=to(a,e),r){case 0:t=ko(null,t,a,e,s);break e;case 1:t=So(null,t,a,e,s);break e;case 11:t=_o(null,t,a,e,s);break e;case 14:t=wo(null,t,a,to(a.type,e),s);break e}throw Error(i(306,a,""))}return t;case 0:return a=t.type,r=t.pendingProps,ko(e,t,a,r=t.elementType===a?r:to(a,r),s);case 1:return a=t.type,r=t.pendingProps,So(e,t,a,r=t.elementType===a?r:to(a,r),s);case 3:e:{if(Oo(t),null===e)throw Error(i(387));a=t.pendingProps,r=(n=t.memoizedState).element,Ui(e,t),Li(t,a,null,s);var o=t.memoizedState;if(a=o.element,n.isDehydrated){if(n={element:a,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=n,t.memoizedState=n,256&t.flags){t=Do(e,t,a,s,r=lo(Error(i(423)),t));break e}if(a!==r){t=Do(e,t,a,s,r=lo(Error(i(424)),t));break e}for(si=lr(t.stateNode.containerInfo.firstChild),ti=t,ai=!0,ri=null,s=vi(t,null,a,s),t.child=s;s;)s.flags=-3&s.flags|4096,s=s.sibling}else{if(di(),a===r){t=Wo(e,t,s);break e}vo(e,t,a,s)}t=t.child}return t;case 5:return Ki(t),null===e&&li(t),a=t.type,r=t.pendingProps,n=null!==e?e.memoizedProps:null,o=r.children,tr(a,r)?o=null:null!==n&&tr(a,n)&&(t.flags|=32),Co(e,t),vo(e,t,o,s),t.child;case 6:return null===e&&li(t),null;case 13:return Vo(e,t,s);case 4:return Yi(t,t.stateNode.containerInfo),a=t.pendingProps,null===e?t.child=Ei(t,null,a,s):vo(e,t,a,s),t.child;case 11:return a=t.type,r=t.pendingProps,_o(e,t,a,r=t.elementType===a?r:to(a,r),s);case 7:return vo(e,t,t.pendingProps,s),t.child;case 8:case 12:return vo(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(a=t.type._context,r=t.pendingProps,n=t.memoizedProps,o=r.value,Cr(_i,a._currentValue),a._currentValue=o,null!==n)if(na(n.value,o)){if(n.children===r.children&&!Pr.current){t=Wo(e,t,s);break e}}else for(null!==(n=t.child)&&(n.return=t);null!==n;){var l=n.dependencies;if(null!==l){o=n.child;for(var p=l.firstContext;null!==p;){if(p.context===a){if(1===n.tag){(p=Vi(-1,s&-s)).tag=2;var c=n.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?p.next=p:(p.next=u.next,u.next=p),c.pending=p}}n.lanes|=s,null!==(p=n.alternate)&&(p.lanes|=s),Si(n.return,s,t),l.lanes|=s;break}p=p.next}}else if(10===n.tag)o=n.type===t.type?null:n.child;else if(18===n.tag){if(null===(o=n.return))throw Error(i(341));o.lanes|=s,null!==(l=o.alternate)&&(l.lanes|=s),Si(o,s,t),o=n.sibling}else o=n.child;if(null!==o)o.return=n;else for(o=n;null!==o;){if(o===t){o=null;break}if(null!==(n=o.sibling)){n.return=o.return,o=n;break}o=o.return}n=o}vo(e,t,r.children,s),t=t.child}return t;case 9:return r=t.type,a=t.pendingProps.children,Pi(t,s),a=a(r=Oi(r)),t.flags|=1,vo(e,t,a,s),t.child;case 14:return r=to(a=t.type,t.pendingProps),wo(e,t,a,r=to(a.type,r),s);case 15:return xo(e,t,t.type,t.pendingProps,s);case 17:return a=t.type,r=t.pendingProps,r=t.elementType===a?r:to(a,r),zo(e,t),t.tag=1,Fr(a)?(e=!0,jr(t)):e=!1,Pi(t,s),io(t,a,r),oo(t,a,r,s),Po(null,t,a,!0,e,s);case 19:return Bo(e,t,s);case 22:return No(e,t,s)}throw Error(i(156,t.tag))};var Qp="function"==typeof reportError?reportError:function(e){console.error(e)};function Yp(e){this._internalRoot=e}function Gp(e){this._internalRoot=e}function Kp(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jp(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zp(){}function Xp(e,t,s,a,r){var i=s._reactRootContainer;if(i){var n=i;if("function"==typeof r){var o=r;r=function(){var e=Wp(n);o.call(e)}}zp(t,n,e,r)}else n=function(e,t,s,a,r){if(r){if("function"==typeof a){var i=a;a=function(){var e=Wp(n);i.call(e)}}var n=Bp(t,a,e,0,null,!1,0,"",Zp);return e._reactRootContainer=n,e[mr]=n.current,La(8===e.nodeType?e.parentNode:e),cp(),n}for(;r=e.lastChild;)e.removeChild(r);if("function"==typeof a){var o=a;a=function(){var e=Wp(l);o.call(e)}}var l=Rp(e,0,!1,null,0,!1,0,"",Zp);return e._reactRootContainer=l,e[mr]=l.current,La(8===e.nodeType?e.parentNode:e),cp(function(){zp(t,l,s,a)}),l}(s,t,e,r,a);return Wp(n)}Gp.prototype.render=Yp.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));zp(e,t,null,null)},Gp.prototype.unmount=Yp.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cp(function(){zp(null,e,null,null)}),t[mr]=null}},Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nt();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Tt.length&&0!==t&&t<Tt[s].priority;s++);Tt.splice(s,0,e),0===s&&Vt(e)}},_t=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=ut(t.pendingLanes);0!==s&&(yt(t,1|s),ap(t,Je()),!(6&Pl)&&(Bl=Je()+500,Lr()))}break;case 13:cp(function(){var t=Ti(e,1);if(null!==t){var s=ep();sp(t,e,1,s)}}),qp(e,1)}},wt=function(e){if(13===e.tag){var t=Ti(e,134217728);if(null!==t)sp(t,e,134217728,ep());qp(e,134217728)}},xt=function(e){if(13===e.tag){var t=tp(e),s=Ti(e,t);if(null!==s)sp(s,e,t,ep());qp(e,t)}},Nt=function(){return Et},Ct=function(e,t){var s=Et;try{return Et=e,t()}finally{Et=s}},we=function(e,t,s){switch(t){case"input":if(Z(e,s),t=s.name,"radio"===s.type&&null!=t){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var a=s[t];if(a!==e&&a.form===e.form){var r=vr(a);if(!r)throw Error(i(90));Q(a),Z(a,r)}}}break;case"textarea":ie(e,s);break;case"select":null!=(t=s.value)&&se(e,!!s.multiple,t,!1)}},Pe=pp,Oe=cp;var ec={usingClientEntryPoint:!1,Events:[yr,Er,vr,ke,Se,pp]},tc={findFiberByHostInstance:gr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sc={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:v.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=He(e))?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ac=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ac.isDisabled&&ac.supportsFiber)try{rt=ac.inject(sc),it=ac}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ec,t.createPortal=function(e,t){var s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kp(t))throw Error(i(200));return function(e,t,s){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==a?null:""+a,children:e,containerInfo:t,implementation:s}}(e,t,null,s)},t.createRoot=function(e,t){if(!Kp(e))throw Error(i(299));var s=!1,a="",r=Qp;return null!=t&&(!0===t.unstable_strictMode&&(s=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onRecoverableError&&(r=t.onRecoverableError)),t=Rp(e,1,!1,null,0,s,0,a,r),e[mr]=t.current,La(8===e.nodeType?e.parentNode:e),new Yp(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=He(t))?null:e.stateNode},t.flushSync=function(e){return cp(e)},t.hydrate=function(e,t,s){if(!Jp(t))throw Error(i(200));return Xp(null,e,t,!0,s)},t.hydrateRoot=function(e,t,s){if(!Kp(e))throw Error(i(405));var a=null!=s&&s.hydratedSources||null,r=!1,n="",o=Qp;if(null!=s&&(!0===s.unstable_strictMode&&(r=!0),void 0!==s.identifierPrefix&&(n=s.identifierPrefix),void 0!==s.onRecoverableError&&(o=s.onRecoverableError)),t=Bp(t,null,e,1,null!=s?s:null,r,0,n,o),e[mr]=t.current,La(e),a)for(e=0;e<a.length;e++)r=(r=(s=a[e])._getVersion)(s._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[s,r]:t.mutableSourceEagerHydrationData.push(s,r);return new Gp(t)},t.render=function(e,t,s){if(!Jp(t))throw Error(i(200));return Xp(null,e,t,!1,s)},t.unmountComponentAtNode=function(e){if(!Jp(e))throw Error(i(40));return!!e._reactRootContainer&&(cp(function(){Xp(null,null,e,!1,function(){e._reactRootContainer=null,e[mr]=null})}),!0)},t.unstable_batchedUpdates=pp,t.unstable_renderSubtreeIntoContainer=function(e,t,s,a){if(!Jp(s))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return Xp(e,t,s,!1,a)},t.version="18.3.1-next-f1338f8080-20240426"},2552:function(e,t,s){var a=s(1873),r=s(659),i=s(9350),n=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":n&&n in Object(e)?r(e):i(e)}},2634:function(){},2642:function(e,t,s){"use strict";var a=s(7720),r=Object.prototype.hasOwnProperty,i=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:a.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},l=function(e,t,s){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&s>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},p=function(e,t,s,i){if(e){var n=function(e,t){var s=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&r.call(Object.prototype,s)&&!t.allowPrototypes)return;return[s]}var a=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(s),n=i?s.slice(0,i.index):s,o=[];if(n){if(!t.plainObjects&&r.call(Object.prototype,n)&&!t.allowPrototypes)return;o.push(n)}for(var l=0;null!==(i=a.exec(s))&&l<t.depth;){l+=1;var p=i[1].slice(1,-1);if(!t.plainObjects&&r.call(Object.prototype,p)&&!t.allowPrototypes)return;o.push(i[1])}if(i){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");o.push("["+s.slice(i.index)+"]")}return o}(e,s);if(n)return function(e,t,s,r){var i=0;if(e.length>0&&"[]"===e[e.length-1]){var n=e.slice(0,-1).join("");i=Array.isArray(t)&&t[n]?t[n].length:0}for(var o=r?t:l(t,s,i),p=e.length-1;p>=0;--p){var c,u=e[p];if("[]"===u&&s.parseArrays)c=a.isOverflow(o)?o:s.allowEmptyArrays&&(""===o||s.strictNullHandling&&null===o)?[]:a.combine([],o,s.arrayLimit,s.plainObjects);else{c=s.plainObjects?{__proto__:null}:{};var d="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,m=s.decodeDotInKeys?d.replace(/%2E/g,"."):d,h=parseInt(m,10);s.parseArrays||""!==m?!isNaN(h)&&u!==m&&String(h)===m&&h>=0&&s.parseArrays&&h<=s.arrayLimit?(c=[])[h]=o:"__proto__"!==m&&(c[m]=o):c={0:o}}o=c}return o}(n,t,s,i)}};e.exports=function(e,t){var s=function(e){if(!e)return n;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?n.charset:e.charset,s=void 0===e.duplicates?n.duplicates:e.duplicates;if("combine"!==s&&"first"!==s&&"last"!==s)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||n.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:n.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:n.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:n.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:n.decoder,delimiter:"string"==typeof e.delimiter||a.isRegExp(e.delimiter)?e.delimiter:n.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:n.depth,duplicates:s,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:n.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:n.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return s.plainObjects?{__proto__:null}:{};for(var c="string"==typeof e?function(e,t){var s={__proto__:null},p=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var c=t.parameterLimit===1/0?void 0:t.parameterLimit,u=p.split(t.delimiter,t.throwOnLimitExceeded?c+1:c);if(t.throwOnLimitExceeded&&u.length>c)throw new RangeError("Parameter limit exceeded. Only "+c+" parameter"+(1===c?"":"s")+" allowed.");var d,m=-1,h=t.charset;if(t.charsetSentinel)for(d=0;d<u.length;++d)0===u[d].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[d]?h="utf-8":"utf8=%26%2310003%3B"===u[d]&&(h="iso-8859-1"),m=d,d=u.length);for(d=0;d<u.length;++d)if(d!==m){var f,b,g=u[d],y=g.indexOf("]="),E=-1===y?g.indexOf("="):y+1;if(-1===E?(f=t.decoder(g,n.decoder,h,"key"),b=t.strictNullHandling?null:""):null!==(f=t.decoder(g.slice(0,E),n.decoder,h,"key"))&&(b=a.maybeMap(l(g.slice(E+1),t,i(s[f])?s[f].length:0),function(e){return t.decoder(e,n.decoder,h,"value")})),b&&t.interpretNumericEntities&&"iso-8859-1"===h&&(b=o(String(b))),g.indexOf("[]=")>-1&&(b=i(b)?[b]:b),null!==f){var v=r.call(s,f);v&&"combine"===t.duplicates?s[f]=a.combine(s[f],b,t.arrayLimit,t.plainObjects):v&&"last"!==t.duplicates||(s[f]=b)}}return s}(e,s):e,u=s.plainObjects?{__proto__:null}:{},d=Object.keys(c),m=0;m<d.length;++m){var h=d[m],f=p(h,c[h],s,"string"==typeof e);u=a.merge(u,f,s)}return!0===s.allowSparse?u:a.compact(u)}},2651:function(e,t,s){var a=s(4218);e.exports=function(e,t){var s=e.__data__;return a(t)?s["string"==typeof t?"string":"hash"]:s.map}},2749:function(e,t,s){var a=s(1042),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return a?void 0!==t[e]:r.call(t,e)}},2804:function(e,t,s){var a=s(6110)(s(9325),"Promise");e.exports=a},2903:function(e,t,s){var a=s(3805),r=s(5527),i=s(181),n=Object.prototype.hasOwnProperty;e.exports=function(e){if(!a(e))return i(e);var t=r(e),s=[];for(var o in e)("constructor"!=o||!t&&n.call(e,o))&&s.push(o);return s}},2949:function(e,t,s){var a=s(2651);e.exports=function(e,t){var s=a(this,e),r=s.size;return s.set(e,t),this.size+=s.size==r?0:1,this}},3007:function(e){e.exports=function(e,t){var s=-1,a=e.length;for(t||(t=Array(a));++s<a;)t[s]=e[s];return t}},3040:function(e,t,s){var a=s(1549),r=s(79),i=s(8223);e.exports=function(){this.size=0,this.__data__={hash:new a,map:new(i||r),string:new a}}},3093:function(e,t,s){"use strict";var a=s(4459);e.exports=function(e){return a(e)||0===e?e:e<0?-1:1}},3126:function(e,t,s){"use strict";var a=s(6743),r=s(9675),i=s(76),n=s(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new r("a function is required");return n(a,i,e)}},3144:function(e,t,s){"use strict";var a=s(6743),r=s(1002),i=s(76),n=s(7119);e.exports=n||a.call(i,r)},3201:function(e){var t=/\w*$/;e.exports=function(e){var s=new e.constructor(e.source,t.exec(e));return s.lastIndex=e.lastIndex,s}},3243:function(e,t,s){var a=s(6110),r=function(){try{var e=a(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},3290:function(e,t,s){e=s.nmd(e);var a=s(9325),r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,n=i&&i.exports===r?a.Buffer:void 0,o=n?n.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var s=e.length,a=o?o(s):new e.constructor(s);return e.copy(a),a}},3345:function(e){e.exports=function(){return[]}},3349:function(e,t,s){var a=s(2199),r=s(6375),i=s(7241);e.exports=function(e){return a(e,i,r)}},3360:function(e,t,s){var a=s(3243);e.exports=function(e,t,s){"__proto__"==t&&a?a(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}},3605:function(e){e.exports=function(e){return this.__data__.get(e)}},3628:function(e,t,s){"use strict";var a=s(8648),r=s(1064),i=s(7176);e.exports=a?function(e){return a(e)}:r?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return r(e)}:i?function(e){return i(e)}:null},3650:function(e,t,s){var a=s(4335)(Object.keys,Object);e.exports=a},3656:function(e,t,s){e=s.nmd(e);var a=s(9325),r=s(9935),i=t&&!t.nodeType&&t,n=i&&e&&!e.nodeType&&e,o=n&&n.exports===i?a.Buffer:void 0,l=(o?o.isBuffer:void 0)||r;e.exports=l},3661:function(e,t,s){var a=s(3040),r=s(7670),i=s(289),n=s(4509),o=s(2949);function l(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var a=e[t];this.set(a[0],a[1])}}l.prototype.clear=a,l.prototype.delete=r,l.prototype.get=i,l.prototype.has=n,l.prototype.set=o,e.exports=l},3702:function(e){e.exports=function(){this.__data__=[],this.size=0}},3729:function(e){e.exports=function(e,t){for(var s=-1,a=null==e?0:e.length;++s<a&&!1!==t(e[s],s,e););return e}},3736:function(e,t,s){var a=s(1873),r=a?a.prototype:void 0,i=r?r.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},3805:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3838:function(e,t,s){var a=s(1791),r=s(7241);e.exports=function(e,t){return e&&a(t,r(t),e)}},3862:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},4039:function(e,t,s){"use strict";var a="undefined"!=typeof Symbol&&Symbol,r=s(1333);e.exports=function(){return"function"==typeof a&&("function"==typeof Symbol&&("symbol"==typeof a("foo")&&("symbol"==typeof Symbol("bar")&&r())))}},4218:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4335:function(e){e.exports=function(e,t){return function(s){return e(t(s))}}},4459:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4509:function(e,t,s){var a=s(2651);e.exports=function(e){return a(this,e).has(e)}},4528:function(e){e.exports=function(e,t){for(var s=-1,a=t.length,r=e.length;++s<a;)e[r+s]=t[s];return e}},4652:function(e,t,s){"use strict";var a=s(453),r=s(6556),i=s(8859),n=s(507),o=s(9675),l=a("%WeakMap%",!0),p=r("WeakMap.prototype.get",!0),c=r("WeakMap.prototype.set",!0),u=r("WeakMap.prototype.has",!0),d=r("WeakMap.prototype.delete",!0);e.exports=l?function(){var e,t,s={assert:function(e){if(!s.has(e))throw new o("Side channel does not contain "+i(e))},delete:function(s){if(l&&s&&("object"==typeof s||"function"==typeof s)){if(e)return d(e,s)}else if(n&&t)return t.delete(s);return!1},get:function(s){return l&&s&&("object"==typeof s||"function"==typeof s)&&e?p(e,s):t&&t.get(s)},has:function(s){return l&&s&&("object"==typeof s||"function"==typeof s)&&e?u(e,s):!!t&&t.has(s)},set:function(s,a){l&&s&&("object"==typeof s||"function"==typeof s)?(e||(e=new l),c(e,s,a)):n&&(t||(t=n()),t.set(s,a))}};return s}:n},4664:function(e,t,s){var a=s(9770),r=s(3345),i=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols,o=n?function(e){return null==e?[]:(e=Object(e),a(n(e),function(t){return i.call(e,t)}))}:r;e.exports=o},4733:function(e,t,s){var a=s(1791),r=s(5950);e.exports=function(e,t){return e&&a(t,r(t),e)}},4739:function(e,t,s){var a=s(6025);e.exports=function(e){var t=this.__data__,s=a(t,e);return s<0?void 0:t[s][1]}},4765:function(e){"use strict";var t=String.prototype.replace,s=/%20/g,a="RFC1738",r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,s,"+")},RFC3986:function(e){return String(e)}},RFC1738:a,RFC3986:r}},4803:function(e,t,s){"use strict";var a=s(8859),r=s(9675),i=function(e,t,s){for(var a,r=e;null!=(a=r.next);r=a)if(a.key===t)return r.next=a.next,s||(a.next=e.next,e.next=a),a};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r("Side channel does not contain "+a(e))},delete:function(t){var s=e&&e.next,a=function(e,t){if(e)return i(e,t,!0)}(e,t);return a&&s&&s===a&&(e=void 0),!!a},get:function(t){return function(e,t){if(e){var s=i(e,t);return s&&s.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!i(e,t)}(e,t)},set:function(t,s){e||(e={next:void 0}),function(e,t,s){var a=i(e,t);a?a.value=s:e.next={key:t,next:e.next,value:s}}(e,t,s)}};return t}},4840:function(e,t,s){var a="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g;e.exports=a},4894:function(e,t,s){var a=s(1882),r=s(294);e.exports=function(e){return null!=e&&r(e.length)&&!a(e)}},4901:function(e,t,s){var a=s(2552),r=s(294),i=s(346),n={};n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&r(e.length)&&!!n[a(e)]}},5083:function(e,t,s){var a=s(1882),r=s(7296),i=s(3805),n=s(7473),o=/^\[object .+?Constructor\]$/,l=Function.prototype,p=Object.prototype,c=l.toString,u=p.hasOwnProperty,d=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||r(e))&&(a(e)?d:o).test(n(e))}},5160:function(e,t,s){"use strict";var a=s(1594);var r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=a.useSyncExternalStore,n=a.useRef,o=a.useEffect,l=a.useMemo,p=a.useDebugValue},5288:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5338:function(e,t,s){"use strict";var a=s(961);t.H=a.createRoot,a.hydrateRoot},5345:function(e){"use strict";e.exports=URIError},5373:function(e,t,s){"use strict";var a=s(8636),r=s(2642),i=s(4765);e.exports={formats:i,parse:r,stringify:a}},5481:function(e,t,s){var a=s(9325)["__core-js_shared__"];e.exports=a},5527:function(e){var t=Object.prototype;e.exports=function(e){var s=e&&e.constructor;return e===("function"==typeof s&&s.prototype||t)}},5529:function(e,t,s){var a=s(9344),r=s(8879),i=s(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:a(r(e))}},5580:function(e,t,s){var a=s(6110)(s(9325),"DataView");e.exports=a},5749:function(e,t,s){var a=s(1042);e.exports=function(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=a&&void 0===t?"__lodash_hash_undefined__":t,this}},5795:function(e,t,s){"use strict";var a=s(6549);if(a)try{a([],"length")}catch(e){a=null}e.exports=a},5861:function(e,t,s){var a=s(5580),r=s(8223),i=s(2804),n=s(6545),o=s(8303),l=s(2552),p=s(7473),c="[object Map]",u="[object Promise]",d="[object Set]",m="[object WeakMap]",h="[object DataView]",f=p(a),b=p(r),g=p(i),y=p(n),E=p(o),v=l;(a&&v(new a(new ArrayBuffer(1)))!=h||r&&v(new r)!=c||i&&v(i.resolve())!=u||n&&v(new n)!=d||o&&v(new o)!=m)&&(v=function(e){var t=l(e),s="[object Object]"==t?e.constructor:void 0,a=s?p(s):"";if(a)switch(a){case f:return h;case b:return c;case g:return u;case y:return d;case E:return m}return t}),e.exports=v},5880:function(e){"use strict";e.exports=Math.pow},5950:function(e,t,s){var a=s(695),r=s(8984),i=s(4894);e.exports=function(e){return i(e)?a(e):r(e)}},6009:function(e,t,s){e=s.nmd(e);var a=s(4840),r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,n=i&&i.exports===r&&a.process,o=function(){try{var e=i&&i.require&&i.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}();e.exports=o},6025:function(e,t,s){var a=s(5288);e.exports=function(e,t){for(var s=e.length;s--;)if(a(e[s][0],t))return s;return-1}},6038:function(e,t,s){var a=s(5861),r=s(346);e.exports=function(e){return r(e)&&"[object Set]"==a(e)}},6110:function(e,t,s){var a=s(5083),r=s(392);e.exports=function(e,t){var s=r(e,t);return a(s)?s:void 0}},6169:function(e,t,s){var a=s(9653);e.exports=function(e,t){var s=t?a(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}},6188:function(e){"use strict";e.exports=Math.max},6189:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var s=e.length,a=new e.constructor(s);return s&&"string"==typeof e[0]&&t.call(e,"index")&&(a.index=e.index,a.input=e.input),a}},6375:function(e,t,s){var a=s(4528),r=s(8879),i=s(4664),n=s(3345),o=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)a(t,i(e)),e=r(e);return t}:n;e.exports=o},6449:function(e){var t=Array.isArray;e.exports=t},6545:function(e,t,s){var a=s(6110)(s(9325),"Set");e.exports=a},6547:function(e,t,s){var a=s(3360),r=s(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,s){var n=e[t];i.call(e,t)&&r(n,s)&&(void 0!==s||t in e)||a(e,t,s)}},6549:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},6556:function(e,t,s){"use strict";var a=s(453),r=s(3126),i=r([a("%String.prototype.indexOf%")]);e.exports=function(e,t){var s=a(e,!!t);return"function"==typeof s&&i(e,".prototype.")>-1?r([s]):s}},6721:function(e,t,s){var a=s(1042),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(a){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return r.call(t,e)?t[e]:void 0}},6743:function(e,t,s){"use strict";var a=s(9353);e.exports=Function.prototype.bind||a},7119:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},7167:function(e,t,s){var a=s(4901),r=s(7301),i=s(6009),n=i&&i.isTypedArray,o=n?r(n):a;e.exports=o},7176:function(e,t,s){"use strict";var a,r=s(3126),i=s(5795);try{a=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var n=!!a&&i&&i(Object.prototype,"__proto__"),o=Object,l=o.getPrototypeOf;e.exports=n&&"function"==typeof n.get?r([n.get]):"function"==typeof l&&function(e){return l(null==e?e:o(e))}},7199:function(e,t,s){var a=s(9653),r=s(6169),i=s(3201),n=s(3736),o=s(1961);e.exports=function(e,t,s){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return a(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return r(e,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(e,s);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return n(e)}}},7217:function(e,t,s){var a=s(79),r=s(1420),i=s(938),n=s(3605),o=s(9817),l=s(945);function p(e){var t=this.__data__=new a(e);this.size=t.size}p.prototype.clear=r,p.prototype.delete=i,p.prototype.get=n,p.prototype.has=o,p.prototype.set=l,e.exports=p},7241:function(e,t,s){var a=s(695),r=s(2903),i=s(4894);e.exports=function(e){return i(e)?a(e,!0):r(e)}},7296:function(e,t,s){var a,r=s(5481),i=(a=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";e.exports=function(e){return!!i&&i in e}},7301:function(e){e.exports=function(e){return function(t){return e(t)}}},7337:function(e,t,s){var a,r,i=s(818),n=s(7510),o=(r=[],{activateTrap:function(e){if(r.length>0){var t=r[r.length-1];t!==e&&t.pause()}var s=r.indexOf(e);-1===s||r.splice(s,1),r.push(e)},deactivateTrap:function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1),r.length>0&&r[r.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var s=document,r="string"==typeof e?s.querySelector(e):e,p=n({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),c={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},u={activate:function(e){if(c.active)return;_(),c.active=!0,c.paused=!1,c.nodeFocusedBeforeActivation=s.activeElement;var t=e&&e.onActivate?e.onActivate:p.onActivate;t&&t();return m(),u},deactivate:d,pause:function(){if(c.paused||!c.active)return;c.paused=!0,h()},unpause:function(){if(!c.paused||!c.active)return;c.paused=!1,_(),m()}};return u;function d(e){if(c.active){clearTimeout(a),h(),c.active=!1,c.paused=!1,o.deactivateTrap(u);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:p.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:p.returnFocusOnDeactivate)&&l(function(){var e;w((e=c.nodeFocusedBeforeActivation,f("setReturnFocus")||e))}),u}}function m(){if(c.active)return o.activateTrap(u),a=l(function(){w(b())}),s.addEventListener("focusin",y,!0),s.addEventListener("mousedown",g,{capture:!0,passive:!1}),s.addEventListener("touchstart",g,{capture:!0,passive:!1}),s.addEventListener("click",v,{capture:!0,passive:!1}),s.addEventListener("keydown",E,{capture:!0,passive:!1}),u}function h(){if(c.active)return s.removeEventListener("focusin",y,!0),s.removeEventListener("mousedown",g,!0),s.removeEventListener("touchstart",g,!0),s.removeEventListener("click",v,!0),s.removeEventListener("keydown",E,!0),u}function f(e){var t=p[e],a=t;if(!t)return null;if("string"==typeof t&&!(a=s.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(a=t()))throw new Error("`"+e+"` did not return a node");return a}function b(){var e;if(!(e=null!==f("initialFocus")?f("initialFocus"):r.contains(s.activeElement)?s.activeElement:c.firstTabbableNode||f("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function g(e){r.contains(e.target)||(p.clickOutsideDeactivates?d({returnFocus:!i.isFocusable(e.target)}):p.allowOutsideClick&&p.allowOutsideClick(e)||e.preventDefault())}function y(e){r.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(c.mostRecentlyFocusedNode||b()))}function E(e){if(!1!==p.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void d();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(_(),e.shiftKey&&e.target===c.firstTabbableNode)return e.preventDefault(),void w(c.lastTabbableNode);if(!e.shiftKey&&e.target===c.lastTabbableNode)e.preventDefault(),w(c.firstTabbableNode)}(e)}function v(e){p.clickOutsideDeactivates||r.contains(e.target)||p.allowOutsideClick&&p.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function _(){var e=i(r);c.firstTabbableNode=e[0]||b(),c.lastTabbableNode=e[e.length-1]||b()}function w(e){e!==s.activeElement&&(e&&e.focus?(e.focus(),c.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(b()))}}},7463:function(e,t){"use strict";function s(e,t){var s=e.length;e.push(t);e:for(;0<s;){var a=s-1>>>1,r=e[a];if(!(0<i(r,t)))break e;e[a]=t,e[s]=r,s=a}}function a(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],s=e.pop();if(s!==t){e[0]=s;e:for(var a=0,r=e.length,n=r>>>1;a<n;){var o=2*(a+1)-1,l=e[o],p=o+1,c=e[p];if(0>i(l,s))p<r&&0>i(c,l)?(e[a]=c,e[p]=s,a=p):(e[a]=l,e[o]=s,a=o);else{if(!(p<r&&0>i(c,s)))break e;e[a]=c,e[p]=s,a=p}}}return t}function i(e,t){var s=e.sortIndex-t.sortIndex;return 0!==s?s:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var n=performance;t.unstable_now=function(){return n.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var p=[],c=[],u=1,d=null,m=3,h=!1,f=!1,b=!1,g="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,E="undefined"!=typeof setImmediate?setImmediate:null;function v(e){for(var t=a(c);null!==t;){if(null===t.callback)r(c);else{if(!(t.startTime<=e))break;r(c),t.sortIndex=t.expirationTime,s(p,t)}t=a(c)}}function _(e){if(b=!1,v(e),!f)if(null!==a(p))f=!0,T(w);else{var t=a(c);null!==t&&M(_,t.startTime-e)}}function w(e,s){f=!1,b&&(b=!1,y(k),k=-1),h=!0;var i=m;try{for(v(s),d=a(p);null!==d&&(!(d.expirationTime>s)||e&&!O());){var n=d.callback;if("function"==typeof n){d.callback=null,m=d.priorityLevel;var o=n(d.expirationTime<=s);s=t.unstable_now(),"function"==typeof o?d.callback=o:d===a(p)&&r(p),v(s)}else r(p);d=a(p)}if(null!==d)var l=!0;else{var u=a(c);null!==u&&M(_,u.startTime-s),l=!1}return l}finally{d=null,m=i,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,N=!1,C=null,k=-1,S=5,P=-1;function O(){return!(t.unstable_now()-P<S)}function D(){if(null!==C){var e=t.unstable_now();P=e;var s=!0;try{s=C(!0,e)}finally{s?x():(N=!1,C=null)}}else N=!1}if("function"==typeof E)x=function(){E(D)};else if("undefined"!=typeof MessageChannel){var F=new MessageChannel,A=F.port2;F.port1.onmessage=D,x=function(){A.postMessage(null)}}else x=function(){g(D,0)};function T(e){C=e,N||(N=!0,x())}function M(e,s){k=g(function(){e(t.unstable_now())},s)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||h||(f=!0,T(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return a(p)},t.unstable_next=function(e){switch(m){case 1:case 2:case 3:var t=3;break;default:t=m}var s=m;m=t;try{return e()}finally{m=s}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var s=m;m=e;try{return t()}finally{m=s}},t.unstable_scheduleCallback=function(e,r,i){var n=t.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?n+i:n:i=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:u++,callback:r,priorityLevel:e,startTime:i,expirationTime:o=i+o,sortIndex:-1},i>n?(e.sortIndex=i,s(c,e),null===a(p)&&e===a(c)&&(b?(y(k),k=-1):b=!0,M(_,i-n))):(e.sortIndex=o,s(p,e),f||h||(f=!0,T(w))),e},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(e){var t=m;return function(){var s=m;m=t;try{return e.apply(this,arguments)}finally{m=s}}}},7473:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7510:function(e){e.exports=function(){for(var e={},s=0;s<arguments.length;s++){var a=arguments[s];for(var r in a)t.call(a,r)&&(e[r]=a[r])}return e};var t=Object.prototype.hasOwnProperty},7534:function(e,t,s){var a=s(2552),r=s(346);e.exports=function(e){return r(e)&&"[object Arguments]"==a(e)}},7670:function(e,t,s){var a=s(2651);e.exports=function(e){var t=a(this,e).delete(e);return this.size-=t?1:0,t}},7720:function(e,t,s){"use strict";var a=s(4765),r=s(920),i=Object.prototype.hasOwnProperty,n=Array.isArray,o=r(),l=function(e,t){return o.set(e,t),e},p=function(e){return o.has(e)},c=function(e){return o.get(e)},u=function(e,t){o.set(e,t)},d=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),m=function(e,t){for(var s=t&&t.plainObjects?{__proto__:null}:{},a=0;a<e.length;++a)void 0!==e[a]&&(s[a]=e[a]);return s},h=1024;e.exports={arrayToObject:m,assign:function(e,t){return Object.keys(t).reduce(function(e,s){return e[s]=t[s],e},e)},combine:function(e,t,s,a){if(p(e)){var r=c(e)+1;return e[r]=t,u(e,r),e}var i=[].concat(e,t);return i.length>s?l(m(i,{plainObjects:a}),i.length-1):i},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],s=[],a=0;a<t.length;++a)for(var r=t[a],i=r.obj[r.prop],o=Object.keys(i),l=0;l<o.length;++l){var p=o[l],c=i[p];"object"==typeof c&&null!==c&&-1===s.indexOf(c)&&(t.push({obj:i,prop:p}),s.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),s=t.obj[t.prop];if(n(s)){for(var a=[],r=0;r<s.length;++r)void 0!==s[r]&&a.push(s[r]);t.obj[t.prop]=a}}}(t),e},decode:function(e,t,s){var a=e.replace(/\+/g," ");if("iso-8859-1"===s)return a.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(a)}catch(e){return a}},encode:function(e,t,s,r,i){if(0===e.length)return e;var n=e;if("symbol"==typeof e?n=Symbol.prototype.toString.call(e):"string"!=typeof e&&(n=String(e)),"iso-8859-1"===s)return escape(n).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var o="",l=0;l<n.length;l+=h){for(var p=n.length>=h?n.slice(l,l+h):n,c=[],u=0;u<p.length;++u){var m=p.charCodeAt(u);45===m||46===m||95===m||126===m||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===a.RFC1738&&(40===m||41===m)?c[c.length]=p.charAt(u):m<128?c[c.length]=d[m]:m<2048?c[c.length]=d[192|m>>6]+d[128|63&m]:m<55296||m>=57344?c[c.length]=d[224|m>>12]+d[128|m>>6&63]+d[128|63&m]:(u+=1,m=65536+((1023&m)<<10|1023&p.charCodeAt(u)),c[c.length]=d[240|m>>18]+d[128|m>>12&63]+d[128|m>>6&63]+d[128|63&m])}o+=c.join("")}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:p,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(n(e)){for(var s=[],a=0;a<e.length;a+=1)s.push(t(e[a]));return s}return t(e)},merge:function e(t,s,a){if(!s)return t;if("object"!=typeof s&&"function"!=typeof s){if(n(t))t.push(s);else{if(!t||"object"!=typeof t)return[t,s];if(p(t)){var r=c(t)+1;t[r]=s,u(t,r)}else(a&&(a.plainObjects||a.allowPrototypes)||!i.call(Object.prototype,s))&&(t[s]=!0)}return t}if(!t||"object"!=typeof t){if(p(s)){for(var o=Object.keys(s),d=a&&a.plainObjects?{__proto__:null,0:t}:{0:t},h=0;h<o.length;h++){d[parseInt(o[h],10)+1]=s[o[h]]}return l(d,c(s)+1)}return[t].concat(s)}var f=t;return n(t)&&!n(s)&&(f=m(t,a)),n(t)&&n(s)?(s.forEach(function(s,r){if(i.call(t,r)){var n=t[r];n&&"object"==typeof n&&s&&"object"==typeof s?t[r]=e(n,s,a):t.push(s)}else t[r]=s}),t):Object.keys(s).reduce(function(t,r){var n=s[r];return i.call(t,r)?t[r]=e(t[r],n,a):t[r]=n,t},f)}}},7730:function(e,t,s){var a=s(9172),r=s(7301),i=s(6009),n=i&&i.isMap,o=n?r(n):a;e.exports=o},7828:function(e,t,s){var a=s(9325).Uint8Array;e.exports=a},8002:function(e){"use strict";e.exports=Math.min},8055:function(e,t,s){var a=s(9999);e.exports=function(e){return a(e,5)}},8068:function(e){"use strict";e.exports=SyntaxError},8096:function(e){e.exports=function(e,t){for(var s=-1,a=Array(e);++s<e;)a[s]=t(s);return a}},8223:function(e,t,s){var a=s(6110)(s(9325),"Map");e.exports=a},8303:function(e,t,s){var a=s(6110)(s(9325),"WeakMap");e.exports=a},8418:function(e,t,s){"use strict";s(5160)},8440:function(e,t,s){var a=s(6038),r=s(7301),i=s(6009),n=i&&i.isSet,o=n?r(n):a;e.exports=o},8636:function(e,t,s){"use strict";var a=s(920),r=s(7720),i=s(4765),n=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,p=Array.prototype.push,c=function(e,t){p.apply(e,l(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},h={},f=function e(t,s,i,n,o,p,u,d,f,b,g,y,E,v,_,w,x,N){for(var C,k=t,S=N,P=0,O=!1;void 0!==(S=S.get(h))&&!O;){var D=S.get(t);if(P+=1,void 0!==D){if(D===P)throw new RangeError("Cyclic object value");O=!0}void 0===S.get(h)&&(P=0)}if("function"==typeof b?k=b(s,k):k instanceof Date?k=E(k):"comma"===i&&l(k)&&(k=r.maybeMap(k,function(e){return e instanceof Date?E(e):e})),null===k){if(p)return f&&!w?f(s,m.encoder,x,"key",v):s;k=""}if("string"==typeof(C=k)||"number"==typeof C||"boolean"==typeof C||"symbol"==typeof C||"bigint"==typeof C||r.isBuffer(k))return f?[_(w?s:f(s,m.encoder,x,"key",v))+"="+_(f(k,m.encoder,x,"value",v))]:[_(s)+"="+_(String(k))];var F,A=[];if(void 0===k)return A;if("comma"===i&&l(k))w&&f&&(k=r.maybeMap(k,f)),F=[{value:k.length>0?k.join(",")||null:void 0}];else if(l(b))F=b;else{var T=Object.keys(k);F=g?T.sort(g):T}var M=d?String(s).replace(/\./g,"%2E"):String(s),j=n&&l(k)&&1===k.length?M+"[]":M;if(o&&l(k)&&0===k.length)return j+"[]";for(var U=0;U<F.length;++U){var V=F[U],$="object"==typeof V&&V&&void 0!==V.value?V.value:k[V];if(!u||null!==$){var I=y&&d?String(V).replace(/\./g,"%2E"):String(V),R=l(k)?"function"==typeof i?i(j,I):j:j+(y?"."+I:"["+I+"]");N.set(t,P);var L=a();L.set(h,N),c(A,e($,R,i,n,o,p,u,d,"comma"===i&&w&&l(k)?null:f,b,g,y,E,v,_,w,x,L))}}return A};e.exports=function(e,t){var s,r=e,p=function(e){if(!e)return m;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var s=i.default;if(void 0!==e.format){if(!n.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");s=e.format}var a,r=i.formatters[s],p=m.filter;if(("function"==typeof e.filter||l(e.filter))&&(p=e.filter),a=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":m.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=void 0===e.allowDots?!0===e.encodeDotInKeys||m.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:c,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:m.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:p,format:s,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof p.filter?r=(0,p.filter)("",r):l(p.filter)&&(s=p.filter);var u=[];if("object"!=typeof r||null===r)return"";var d=o[p.arrayFormat],h="comma"===d&&p.commaRoundTrip;s||(s=Object.keys(r)),p.sort&&s.sort(p.sort);for(var b=a(),g=0;g<s.length;++g){var y=s[g],E=r[y];p.skipNulls&&null===E||c(u,f(E,y,d,h,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,b))}var v=u.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),v.length>0?_+v:""}},8648:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},8655:function(e,t,s){var a=s(6025);e.exports=function(e){return a(this.__data__,e)>-1}},8859:function(e,t,s){var a="function"==typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=a&&r&&"function"==typeof r.get?r.get:null,n=a&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=o&&l&&"function"==typeof l.get?l.get:null,c=o&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,m="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,f=Object.prototype.toString,b=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,E=String.prototype.replace,v=String.prototype.toUpperCase,_=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,N=Array.prototype.join,C=Array.prototype.slice,k=Math.floor,S="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,F="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D||"symbol")?Symbol.toStringTag:null,A=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var s=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var a=e<0?-k(-e):k(e);if(a!==e){var r=String(a),i=y.call(t,r.length+1);return E.call(r,s,"$&_")+"."+E.call(E.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(t,s,"$&_")}var j=s(2634),U=j.custom,V=H(U)?U:null,$={__proto__:null,double:'"',single:"'"},I={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function R(e,t,s){var a=s.quoteStyle||t,r=$[a];return r+e+r}function L(e){return E.call(String(e),/"/g,"&quot;")}function B(e){return!F||!("object"==typeof e&&(F in e||void 0!==e[F]))}function z(e){return"[object Array]"===Y(e)&&B(e)}function W(e){return"[object RegExp]"===Y(e)&&B(e)}function H(e){if(D)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}e.exports=function e(t,a,r,o){var l=a||{};if(Q(l,"quoteStyle")&&!Q($,l.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=!Q(l,"customInspect")||l.customInspect;if("boolean"!=typeof f&&"symbol"!==f)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Q(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Q(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return v?M(t,w):w}if("bigint"==typeof t){var k=String(t)+"n";return v?M(t,k):k}var P=void 0===l.depth?5:l.depth;if(void 0===r&&(r=0),r>=P&&P>0&&"object"==typeof t)return z(t)?"[Array]":"[Object]";var U=function(e,t){var s;if("\t"===e.indent)s="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;s=N.call(Array(e.indent+1)," ")}return{base:s,prev:N.call(Array(t+1),s)}}(l,r);if(void 0===o)o=[];else if(G(o,t)>=0)return"[Circular]";function I(t,s,a){if(s&&(o=C.call(o)).push(s),a){var i={depth:l.depth};return Q(l,"quoteStyle")&&(i.quoteStyle=l.quoteStyle),e(t,i,r+1,o)}return e(t,l,r+1,o)}if("function"==typeof t&&!W(t)){var q=function(e){if(e.name)return e.name;var t=g.call(b.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),J=se(t,I);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(J.length>0?" { "+N.call(J,", ")+" }":"")}if(H(t)){var ae=D?E.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(t);return"object"!=typeof t||D?ae:Z(ae)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var re="<"+_.call(String(t.nodeName)),ie=t.attributes||[],ne=0;ne<ie.length;ne++)re+=" "+ie[ne].name+"="+R(L(ie[ne].value),"double",l);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+="</"+_.call(String(t.nodeName))+">"}if(z(t)){if(0===t.length)return"[]";var oe=se(t,I);return U&&!function(e){for(var t=0;t<e.length;t++)if(G(e[t],"\n")>=0)return!1;return!0}(oe)?"["+te(oe,U)+"]":"[ "+N.call(oe,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&B(e)}(t)){var le=se(t,I);return"cause"in Error.prototype||!("cause"in t)||A.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+N.call(le,", ")+" }":"{ ["+String(t)+"] "+N.call(x.call("[cause]: "+I(t.cause),le),", ")+" }"}if("object"==typeof t&&f){if(V&&"function"==typeof t[V]&&j)return j(t,{depth:P-r});if("symbol"!==f&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{p.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var pe=[];return n&&n.call(t,function(e,s){pe.push(I(s,t,!0)+" => "+I(e,t))}),ee("Map",i.call(t),pe,U)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return c&&c.call(t,function(e){ce.push(I(e,t))}),ee("Set",p.call(t),ce,U)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!m||!e||"object"!=typeof e)return!1;try{return m.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if(function(e){return"[object Number]"===Y(e)&&B(e)}(t))return Z(I(Number(t)));if(function(e){if(!e||"object"!=typeof e||!S)return!1;try{return S.call(e),!0}catch(e){}return!1}(t))return Z(I(S.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&B(e)}(t))return Z(h.call(t));if(function(e){return"[object String]"===Y(e)&&B(e)}(t))return Z(I(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==s.g&&t===s.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Y(e)&&B(e)}(t)&&!W(t)){var ue=se(t,I),de=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,me=t instanceof Object?"":"null prototype",he=!de&&F&&Object(t)===t&&F in t?y.call(Y(t),8,-1):me?"Object":"",fe=(de||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||me?"["+N.call(x.call([],he||[],me||[]),": ")+"] ":"");return 0===ue.length?fe+"{}":U?fe+"{"+te(ue,U)+"}":fe+"{ "+N.call(ue,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function Q(e,t){return q.call(e,t)}function Y(e){return f.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,a=e.length;s<a;s++)if(e[s]===t)return s;return-1}function K(e,t){if(e.length>t.maxStringLength){var s=e.length-t.maxStringLength,a="... "+s+" more character"+(s>1?"s":"");return K(y.call(e,0,t.maxStringLength),t)+a}var r=I[t.quoteStyle||"single"];return r.lastIndex=0,R(E.call(E.call(e,r,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),s={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return s?"\\"+s:"\\x"+(t<16?"0":"")+v.call(t.toString(16))}function Z(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function ee(e,t,s,a){return e+" ("+t+") {"+(a?te(s,a):N.call(s,", "))+"}"}function te(e,t){if(0===e.length)return"";var s="\n"+t.prev+t.base;return s+N.call(e,","+s)+"\n"+t.prev}function se(e,t){var s=z(e),a=[];if(s){a.length=e.length;for(var r=0;r<e.length;r++)a[r]=Q(e,r)?t(e[r],e):""}var i,n="function"==typeof P?P(e):[];if(D){i={};for(var o=0;o<n.length;o++)i["$"+n[o]]=n[o]}for(var l in e)Q(e,l)&&(s&&String(Number(l))===l&&l<e.length||D&&i["$"+l]instanceof Symbol||(w.call(/[^\w$]/,l)?a.push(t(l,e)+": "+t(e[l],e)):a.push(l+": "+t(e[l],e))));if("function"==typeof P)for(var p=0;p<n.length;p++)A.call(e,n[p])&&a.push("["+t(n[p])+"]: "+t(e[n[p]],e));return a}},8879:function(e,t,s){var a=s(4335)(Object.getPrototypeOf,Object);e.exports=a},8948:function(e,t,s){var a=s(1791),r=s(6375);e.exports=function(e,t){return a(e,r(e),t)}},8968:function(e){"use strict";e.exports=Math.floor},8984:function(e,t,s){var a=s(5527),r=s(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!a(e))return r(e);var t=[];for(var s in Object(e))i.call(e,s)&&"constructor"!=s&&t.push(s);return t}},9172:function(e,t,s){var a=s(5861),r=s(346);e.exports=function(e){return r(e)&&"[object Map]"==a(e)}},9290:function(e){"use strict";e.exports=RangeError},9325:function(e,t,s){var a=s(4840),r="object"==typeof self&&self&&self.Object===Object&&self,i=a||r||Function("return this")();e.exports=i},9344:function(e,t,s){var a=s(3805),r=Object.create,i=function(){function e(){}return function(t){if(!a(t))return{};if(r)return r(t);e.prototype=t;var s=new e;return e.prototype=void 0,s}}();e.exports=i},9350:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9353:function(e){"use strict";var t=Object.prototype.toString,s=Math.max,a=function(e,t){for(var s=[],a=0;a<e.length;a+=1)s[a]=e[a];for(var r=0;r<t.length;r+=1)s[r+e.length]=t[r];return s};e.exports=function(e){var r=this;if("function"!=typeof r||"[object Function]"!==t.apply(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var i,n=function(e,t){for(var s=[],a=t||0,r=0;a<e.length;a+=1,r+=1)s[r]=e[a];return s}(arguments,1),o=s(0,r.length-n.length),l=[],p=0;p<o;p++)l[p]="$"+p;if(i=Function("binder","return function ("+function(e,t){for(var s="",a=0;a<e.length;a+=1)s+=e[a],a+1<e.length&&(s+=t);return s}(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=r.apply(this,a(n,arguments));return Object(t)===t?t:this}return r.apply(e,a(n,arguments))}),r.prototype){var c=function(){};c.prototype=r.prototype,i.prototype=new c,c.prototype=null}return i}},9383:function(e){"use strict";e.exports=Error},9538:function(e){"use strict";e.exports=ReferenceError},9612:function(e){"use strict";e.exports=Object},9653:function(e,t,s){var a=s(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new a(t).set(new a(e)),t}},9675:function(e){"use strict";e.exports=TypeError},9770:function(e){e.exports=function(e,t){for(var s=-1,a=null==e?0:e.length,r=0,i=[];++s<a;){var n=e[s];t(n,s,e)&&(i[r++]=n)}return i}},9817:function(e){e.exports=function(e){return this.__data__.has(e)}},9935:function(e){e.exports=function(){return!1}},9957:function(e,t,s){"use strict";var a=Function.prototype.call,r=Object.prototype.hasOwnProperty,i=s(6743);e.exports=i.call(a,r)},9982:function(e,t,s){"use strict";e.exports=s(7463)},9999:function(e,t,s){var a=s(7217),r=s(3729),i=s(6547),n=s(4733),o=s(3838),l=s(3290),p=s(3007),c=s(2271),u=s(8948),d=s(2),m=s(3349),h=s(5861),f=s(6189),b=s(7199),g=s(5529),y=s(6449),E=s(3656),v=s(7730),_=s(3805),w=s(8440),x=s(5950),N=s(7241),C="[object Arguments]",k="[object Function]",S="[object Object]",P={};P[C]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[S]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[k]=P["[object WeakMap]"]=!1,e.exports=function e(t,s,O,D,F,A){var T,M=1&s,j=2&s,U=4&s;if(O&&(T=F?O(t,D,F,A):O(t)),void 0!==T)return T;if(!_(t))return t;var V=y(t);if(V){if(T=f(t),!M)return p(t,T)}else{var $=h(t),I=$==k||"[object GeneratorFunction]"==$;if(E(t))return l(t,M);if($==S||$==C||I&&!F){if(T=j||I?{}:g(t),!M)return j?u(t,o(T,t)):c(t,n(T,t))}else{if(!P[$])return F?t:{};T=b(t,$,M)}}A||(A=new a);var R=A.get(t);if(R)return R;A.set(t,T),w(t)?t.forEach(function(a){T.add(e(a,s,O,a,t,A))}):v(t)&&t.forEach(function(a,r){T.set(r,e(a,s,O,r,t,A))});var L=V?void 0:(U?j?m:d:j?N:x)(t);return r(L||t,function(a,r){L&&(a=t[r=a]),i(T,r,e(a,s,O,r,t,A))}),T}}},a={};function r(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={id:e,loaded:!1,exports:{}};return s[e](i,i.exports,r),i.loaded=!0,i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(s,a){if(1&a&&(s=this(s)),8&a)return s;if("object"==typeof s&&s){if(4&a&&s.__esModule)return s;if(16&a&&"function"==typeof s.then)return s}var i=Object.create(null);r.r(i);var n={};e=e||[null,t({}),t([]),t(t)];for(var o=2&a&&s;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(function(e){n[e]=function(){return s[e]}});return n.default=function(){return s},r.d(i,n),i},r.d=function(e,t){for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e={};r.r(e),r.d(e,{resetSettings:function(){return ir},saveBuilder:function(){return nr},updateSetting:function(){return ar},updateSettings:function(){return rr}});var t={};r.r(t),r.d(t,{hideModal:function(){return pr},showModal:function(){return lr}});var s={};r.r(s),r.d(s,{UPDATE_TITLE:function(){return cr},updateTitle:function(){return ur}});var a={};r.r(a),r.d(a,{updateField:function(){return Vr},updateFieldSettings:function(){return $r},updateFields:function(){return Ur}});var i={};r.r(i),r.d(i,{updateNotification:function(){return Rr},updateNotifications:function(){return Ir}});var n={};r.r(n),r.d(n,{updateBehavior:function(){return Br},updateBehaviorArray:function(){return Lr}});var o={};r.r(o),r.d(o,{updateIntegrationConditions:function(){return zr}});var l={};r.r(l),r.d(l,{revertAllChanges:function(){return qr}});var p={};r.r(p),r.d(p,{hasBrowserEnv:function(){return en},hasStandardBrowserEnv:function(){return sn},hasStandardBrowserWebWorkerEnv:function(){return an},navigator:function(){return tn},origin:function(){return rn}});var c={};r.r(c),r.d(c,{updatePdfs:function(){return Gd}});var u=r(1594),d=r.n(u),m=r(5338);r(8418);var h=u.version.startsWith("19"),f=Symbol.for(h?"react.transitional.element":"react.element"),b=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),w=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),P=x,O=k;function D(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case f:switch(e=e.type){case g:case E:case y:case N:case C:return e;default:switch(e=e&&e.$$typeof){case w:case x:case S:case k:case v:return e;default:return t}}case b:return t}}}function F(e,t,s,a,{areStatesEqual:r,areOwnPropsEqual:i,areStatePropsEqual:n}){let o,l,p,c,u,d=!1;function m(d,m){const h=!i(m,l),f=!r(d,o,m,l);return o=d,l=m,h&&f?(p=e(o,l),t.dependsOnOwnProps&&(c=t(a,l)),u=s(p,c,l),u):h?(e.dependsOnOwnProps&&(p=e(o,l)),t.dependsOnOwnProps&&(c=t(a,l)),u=s(p,c,l),u):f?function(){const t=e(o,l),a=!n(t,p);return p=t,a&&(u=s(p,c,l)),u}():u}return function(r,i){return d?m(r,i):(o=r,l=i,p=e(o,l),c=t(a,l),u=s(p,c,l),d=!0,u)}}function A(e){return function(t){const s=e(t);function a(){return s}return a.dependsOnOwnProps=!1,a}}function T(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function M(e,t){return function(t,{displayName:s}){const a=function(e,t){return a.dependsOnOwnProps?a.mapToProps(e,t):a.mapToProps(e,void 0)};return a.dependsOnOwnProps=!0,a.mapToProps=function(t,s){a.mapToProps=e,a.dependsOnOwnProps=T(e);let r=a(t,s);return"function"==typeof r&&(a.mapToProps=r,a.dependsOnOwnProps=T(r),r=a(t,s)),r},a}}function j(e,t){return(s,a)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${a.wrappedComponentName}.`)}}function U(e,t,s){return{...s,...e,...t}}function V(e){e()}var $={notify(){},get:()=>[]};function I(e,t){let s,a=$,r=0,i=!1;function n(){p.onStateChange&&p.onStateChange()}function o(){r++,s||(s=t?t.addNestedSub(n):e.subscribe(n),a=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){V(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){const t=[];let s=e;for(;s;)t.push(s),s=s.next;return t},subscribe(s){let a=!0;const r=t={callback:s,next:null,prev:t};return r.prev?r.prev.next=r:e=r,function(){a&&null!==e&&(a=!1,r.next?r.next.prev=r.prev:t=r.prev,r.prev?r.prev.next=r.next:e=r.next)}}}}())}function l(){r--,s&&0===r&&(s(),s=void 0,a.clear(),a=$)}const p={addNestedSub:function(e){o();const t=a.subscribe(e);let s=!1;return()=>{s||(s=!0,t(),l())}},notifyNestedSubs:function(){a.notify()},handleChangeWrapper:n,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,o())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>a};return p}var R=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),L=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),B=(()=>R||L?u.useLayoutEffect:u.useEffect)();function z(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function W(e,t){if(z(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(let a=0;a<s.length;a++)if(!Object.prototype.hasOwnProperty.call(t,s[a])||!z(e[s[a]],t[s[a]]))return!1;return!0}var H={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},q={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Q={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Y={[P]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[O]:Q};function G(e){return D(e)===k?Q:Y[e.$$typeof]||H}var K=Object.defineProperty,J=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,ee=Object.getPrototypeOf,te=Object.prototype;function se(e,t){if("string"!=typeof t){if(te){const s=ee(t);s&&s!==te&&se(e,s)}let s=J(t);Z&&(s=s.concat(Z(t)));const a=G(e),r=G(t);for(let i=0;i<s.length;++i){const n=s[i];if(!(q[n]||r&&r[n]||a&&a[n])){const s=X(t,n);try{K(e,n,s)}catch(e){}}}}return e}var ae=Symbol.for("react-redux-context"),re="undefined"!=typeof globalThis?globalThis:{};function ie(){if(!u.createContext)return{};const e=re[ae]??=new Map;let t=e.get(u.createContext);return t||(t=u.createContext(null),e.set(u.createContext,t)),t}var ne=ie(),oe=[null,null];function le(e,t,s,a,r,i){e.current=a,s.current=!1,r.current&&(r.current=null,i())}function pe(e,t){return e===t}var ce=function(e,t,s,{pure:a,areStatesEqual:r=pe,areOwnPropsEqual:i=W,areStatePropsEqual:n=W,areMergedPropsEqual:o=W,forwardRef:l=!1,context:p=ne}={}){const c=p,d=function(e){return e?"function"==typeof e?M(e):j(e,"mapStateToProps"):A(()=>({}))}(e),m=function(e){return e&&"object"==typeof e?A(t=>function(e,t){const s={};for(const a in e){const r=e[a];"function"==typeof r&&(s[a]=(...e)=>t(r(...e)))}return s}(e,t)):e?"function"==typeof e?M(e):j(e,"mapDispatchToProps"):A(e=>({dispatch:e}))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:s,areMergedPropsEqual:a}){let r,i=!1;return function(t,s,n){const o=e(t,s,n);return i?a(o,r)||(r=o):(i=!0,r=o),r}}}(e):j(e,"mergeProps"):()=>U}(s),f=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",s=`Connect(${t})`,a={shouldHandleStateChanges:f,displayName:s,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:d,initMapDispatchToProps:m,initMergeProps:h,areStatesEqual:r,areStatePropsEqual:n,areOwnPropsEqual:i,areMergedPropsEqual:o};function p(t){const[s,r,i]=u.useMemo(()=>{const{reactReduxForwardedRef:e,...s}=t;return[t.context,e,s]},[t]),n=u.useMemo(()=>c,[s,c]),o=u.useContext(n),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),p=Boolean(o)&&Boolean(o.store);const d=l?t.store:o.store,m=p?o.getServerState:d.getState,h=u.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:s,initMergeProps:a,...r}){return F(t(e,r),s(e,r),a(e,r),e,r)}(d.dispatch,a),[d]),[b,g]=u.useMemo(()=>{if(!f)return oe;const e=I(d,l?void 0:o.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[d,l,o]),y=u.useMemo(()=>l?o:{...o,subscription:b},[l,o,b]),E=u.useRef(void 0),v=u.useRef(i),_=u.useRef(void 0),w=u.useRef(!1),x=u.useRef(!1),N=u.useRef(void 0);B(()=>(x.current=!0,()=>{x.current=!1}),[]);const C=u.useMemo(()=>()=>_.current&&i===v.current?_.current:h(d.getState(),i),[d,i]),k=u.useMemo(()=>e=>b?function(e,t,s,a,r,i,n,o,l,p,c){if(!e)return()=>{};let u=!1,d=null;const m=()=>{if(u||!o.current)return;const e=t.getState();let s,m;try{s=a(e,r.current)}catch(e){m=e,d=e}m||(d=null),s===i.current?n.current||p():(i.current=s,l.current=s,n.current=!0,c())};return s.onStateChange=m,s.trySubscribe(),m(),()=>{if(u=!0,s.tryUnsubscribe(),s.onStateChange=null,d)throw d}}(f,d,b,h,v,E,w,x,_,g,e):()=>{},[b]);var S,P,O;let D;S=le,P=[v,E,w,i,_,g],B(()=>S(...P),O);try{D=u.useSyncExternalStore(k,C,m?()=>h(m(),i):C)}catch(e){throw N.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${N.current.stack}\n\n`),e}B(()=>{N.current=void 0,_.current=void 0,E.current=D});const A=u.useMemo(()=>u.createElement(e,{...D,ref:r}),[r,e,D]);return u.useMemo(()=>f?u.createElement(n.Provider,{value:y},A):A,[n,A,y])}const b=u.memo(p);if(b.WrappedComponent=e,b.displayName=p.displayName=s,l){const t=u.forwardRef(function(e,t){return u.createElement(b,{...e,reactReduxForwardedRef:t})});return t.displayName=s,t.WrappedComponent=e,se(t,e)}return se(b,e)}};var ue=function(e){const{children:t,context:s,serverState:a,store:r}=e,i=u.useMemo(()=>{const e=I(r);return{store:r,subscription:e,getServerState:a?()=>a:void 0}},[r,a]),n=u.useMemo(()=>r.getState(),[r]);B(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),n!==r.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,n]);const o=s||ne;return u.createElement(o.Provider,{value:i},t)};var de;function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},me.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(de||(de={}));function he(e,t){if(!1===e||null==e)throw new Error(t)}function fe(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function be(e,t,s,a){return void 0===s&&(s=null),me({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?ye(t):t,{state:s,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function ge(e){let{pathname:t="/",search:s="",hash:a=""}=e;return s&&"?"!==s&&(t+="?"===s.charAt(0)?s:"?"+s),a&&"#"!==a&&(t+="#"===a.charAt(0)?a:"#"+a),t}function ye(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}var Ee;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Ee||(Ee={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function ve(e,t,s){return void 0===s&&(s="/"),_e(e,t,s,!1)}function _e(e,t,s,a){let r=je(("string"==typeof t?ye(t):t).pathname||"/",s);if(null==r)return null;let i=we(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let s=e.length===t.length&&e.slice(0,-1).every((e,s)=>e===t[s]);return s?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(i);let n=null;for(let e=0;null==n&&e<i.length;++e){let t=Me(r);n=Ae(i[e],t,a)}return n}function we(e,t,s,a){void 0===t&&(t=[]),void 0===s&&(s=[]),void 0===a&&(a="");let r=(e,r,i)=>{let n={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};n.relativePath.startsWith("/")&&(he(n.relativePath.startsWith(a),'Absolute route path "'+n.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),n.relativePath=n.relativePath.slice(a.length));let o=ze([a,n.relativePath]),l=s.concat(n);e.children&&e.children.length>0&&(he(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),we(e.children,t,l,o)),(null!=e.path||e.index)&&t.push({path:o,score:Fe(o,e.index),routesMeta:l})};return e.forEach((e,t)=>{var s;if(""!==e.path&&null!=(s=e.path)&&s.includes("?"))for(let s of xe(e.path))r(e,t,s);else r(e,t)}),t}function xe(e){let t=e.split("/");if(0===t.length)return[];let[s,...a]=t,r=s.endsWith("?"),i=s.replace(/\?$/,"");if(0===a.length)return r?[i,""]:[i];let n=xe(a.join("/")),o=[];return o.push(...n.map(e=>""===e?i:[i,e].join("/"))),r&&o.push(...n),o.map(t=>e.startsWith("/")&&""===t?"/":t)}const Ne=/^:[\w-]+$/,Ce=3,ke=2,Se=1,Pe=10,Oe=-2,De=e=>"*"===e;function Fe(e,t){let s=e.split("/"),a=s.length;return s.some(De)&&(a+=Oe),t&&(a+=ke),s.filter(e=>!De(e)).reduce((e,t)=>e+(Ne.test(t)?Ce:""===t?Se:Pe),a)}function Ae(e,t,s){void 0===s&&(s=!1);let{routesMeta:a}=e,r={},i="/",n=[];for(let e=0;e<a.length;++e){let o=a[e],l=e===a.length-1,p="/"===i?t:t.slice(i.length)||"/",c=Te({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},p),u=o.route;if(!c&&l&&s&&!a[a.length-1].route.index&&(c=Te({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},p)),!c)return null;Object.assign(r,c.params),n.push({params:r,pathname:ze([i,c.pathname]),pathnameBase:We(ze([i,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(i=ze([i,c.pathnameBase]))}return n}function Te(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[s,a]=function(e,t,s){void 0===t&&(t=!1);void 0===s&&(s=!0);fe("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let a=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,s)=>(a.push({paramName:t,isOptional:null!=s}),s?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(a.push({paramName:"*"}),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))");let i=new RegExp(r,t?void 0:"i");return[i,a]}(e.path,e.caseSensitive,e.end),r=t.match(s);if(!r)return null;let i=r[0],n=i.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:a.reduce((e,t,s)=>{let{paramName:a,isOptional:r}=t;if("*"===a){let e=o[s]||"";n=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=o[s];return e[a]=r&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:i,pathnameBase:n,pattern:e}}function Me(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return fe(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function je(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,a=e.charAt(s);return a&&"/"!==a?null:e.slice(s)||"/"}const Ue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ve(e,t){void 0===t&&(t="/");let s,{pathname:a,search:r="",hash:i=""}="string"==typeof e?ye(e):e;if(a)if(n=a,Ue.test(n))s=a;else{if(a.includes("//")){let e=a;a=a.replace(/\/\/+/g,"/"),fe(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+a)}s=a.startsWith("/")?$e(a.substring(1),"/"):$e(a,t)}else s=t;var n;return{pathname:s,search:He(r),hash:qe(i)}}function $e(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?s.length>1&&s.pop():"."!==e&&s.push(e)}),s.length>1?s.join("/"):"/"}function Ie(e,t,s,a){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(a)+"].  Please separate it out to the `to."+s+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Re(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function Le(e,t){let s=Re(e);return t?s.map((e,t)=>t===s.length-1?e.pathname:e.pathnameBase):s.map(e=>e.pathnameBase)}function Be(e,t,s,a){let r;void 0===a&&(a=!1),"string"==typeof e?r=ye(e):(r=me({},e),he(!r.pathname||!r.pathname.includes("?"),Ie("?","pathname","search",r)),he(!r.pathname||!r.pathname.includes("#"),Ie("#","pathname","hash",r)),he(!r.search||!r.search.includes("#"),Ie("#","search","hash",r)));let i,n=""===e||""===r.pathname,o=n?"/":r.pathname;if(null==o)i=s;else{let e=t.length-1;if(!a&&o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=Ve(r,i),p=o&&"/"!==o&&o.endsWith("/"),c=(n||"."===o)&&s.endsWith("/");return l.pathname.endsWith("/")||!p&&!c||(l.pathname+="/"),l}const ze=e=>e.join("/").replace(/\/\/+/g,"/"),We=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),He=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",qe=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Qe(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const Ye=["post","put","patch","delete"],Ge=(new Set(Ye),["get",...Ye]);new Set(Ge),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ke.apply(this,arguments)}const Je=u.createContext(null);const Ze=u.createContext(null);const Xe=u.createContext(null);const et=u.createContext(null);const tt=u.createContext({outlet:null,matches:[],isDataRoute:!1});const st=u.createContext(null);function at(){return null!=u.useContext(et)}function rt(){return at()||he(!1),u.useContext(et).location}function it(e){u.useContext(Xe).static||u.useLayoutEffect(e)}function nt(){let{isDataRoute:e}=u.useContext(tt);return e?function(){let{router:e}=bt(ht.UseNavigateStable),t=yt(ft.UseNavigateStable),s=u.useRef(!1);return it(()=>{s.current=!0}),u.useCallback(function(a,r){void 0===r&&(r={}),s.current&&("number"==typeof a?e.navigate(a):e.navigate(a,Ke({fromRouteId:t},r)))},[e,t])}():function(){at()||he(!1);let e=u.useContext(Je),{basename:t,future:s,navigator:a}=u.useContext(Xe),{matches:r}=u.useContext(tt),{pathname:i}=rt(),n=JSON.stringify(Le(r,s.v7_relativeSplatPath)),o=u.useRef(!1);return it(()=>{o.current=!0}),u.useCallback(function(s,r){if(void 0===r&&(r={}),!o.current)return;if("number"==typeof s)return void a.go(s);let l=Be(s,JSON.parse(n),i,"path"===r.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:ze([t,l.pathname])),(r.replace?a.replace:a.push)(l,r.state,r)},[t,a,n,i,e])}()}function ot(e,t){let{relative:s}=void 0===t?{}:t,{future:a}=u.useContext(Xe),{matches:r}=u.useContext(tt),{pathname:i}=rt(),n=JSON.stringify(Le(r,a.v7_relativeSplatPath));return u.useMemo(()=>Be(e,JSON.parse(n),i,"path"===s),[e,n,i,s])}function lt(e,t,s,a){at()||he(!1);let{navigator:r}=u.useContext(Xe),{matches:i}=u.useContext(tt),n=i[i.length-1],o=n?n.params:{},l=(n&&n.pathname,n?n.pathnameBase:"/");n&&n.route;let p,c=rt();if(t){var d;let e="string"==typeof t?ye(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||he(!1),p=e}else p=c;let m=p.pathname||"/",h=m;if("/"!==l){let e=l.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=ve(e,{pathname:h});let b=mt(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ze([l,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:ze([l,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),i,s,a);return t&&b?u.createElement(et.Provider,{value:{location:Ke({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:de.Pop}},b):b}function pt(){let e=function(){var e;let t=u.useContext(st),s=gt(ft.UseRouteError),a=yt(ft.UseRouteError);if(void 0!==t)return t;return null==(e=s.errors)?void 0:e[a]}(),t=Qe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:a};return u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},t),s?u.createElement("pre",{style:r},s):null,null)}const ct=u.createElement(pt,null);class ut extends u.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?u.createElement(tt.Provider,{value:this.props.routeContext},u.createElement(st.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dt(e){let{routeContext:t,match:s,children:a}=e,r=u.useContext(Je);return r&&r.static&&r.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=s.route.id),u.createElement(tt.Provider,{value:t},a)}function mt(e,t,s,a){var r;if(void 0===t&&(t=[]),void 0===s&&(s=null),void 0===a&&(a=null),null==e){var i;if(!s)return null;if(s.errors)e=s.matches;else{if(!(null!=(i=a)&&i.v7_partialHydration&&0===t.length&&!s.initialized&&s.matches.length>0))return null;e=s.matches}}let n=e,o=null==(r=s)?void 0:r.errors;if(null!=o){let e=n.findIndex(e=>e.route.id&&void 0!==(null==o?void 0:o[e.route.id]));e>=0||he(!1),n=n.slice(0,Math.min(n.length,e+1))}let l=!1,p=-1;if(s&&a&&a.v7_partialHydration)for(let e=0;e<n.length;e++){let t=n[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(p=e),t.route.id){let{loaderData:e,errors:a}=s,r=t.route.loader&&void 0===e[t.route.id]&&(!a||void 0===a[t.route.id]);if(t.route.lazy||r){l=!0,n=p>=0?n.slice(0,p+1):[n[0]];break}}}return n.reduceRight((e,a,r)=>{let i,c=!1,d=null,m=null;var h;s&&(i=o&&a.route.id?o[a.route.id]:void 0,d=a.route.errorElement||ct,l&&(p<0&&0===r?(h="route-fallback",!1||Et[h]||(Et[h]=!0),c=!0,m=null):p===r&&(c=!0,m=a.route.hydrateFallbackElement||null)));let f=t.concat(n.slice(0,r+1)),b=()=>{let t;return t=i?d:c?m:a.route.Component?u.createElement(a.route.Component,null):a.route.element?a.route.element:e,u.createElement(dt,{match:a,routeContext:{outlet:e,matches:f,isDataRoute:null!=s},children:t})};return s&&(a.route.ErrorBoundary||a.route.errorElement||0===r)?u.createElement(ut,{location:s.location,revalidation:s.revalidation,component:d,error:i,children:b(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):b()},null)}var ht=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ht||{}),ft=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ft||{});function bt(e){let t=u.useContext(Je);return t||he(!1),t}function gt(e){let t=u.useContext(Ze);return t||he(!1),t}function yt(e){let t=function(){let e=u.useContext(tt);return e||he(!1),e}(),s=t.matches[t.matches.length-1];return s.route.id||he(!1),s.route.id}const Et={};function vt(e,t){null==e||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}const _t=u.startTransition;function wt(e){let{basename:t,children:s,initialEntries:a,initialIndex:r,future:i}=e,n=u.useRef();null==n.current&&(n.current=function(e){void 0===e&&(e={});let t,{initialEntries:s=["/"],initialIndex:a,v5Compat:r=!1}=e;t=s.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let i=l(null==a?t.length-1:a),n=de.Pop,o=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function p(){return t[i]}function c(e,s,a){void 0===s&&(s=null);let r=be(t?p().pathname:"/",e,s,a);return fe("/"===r.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),r}function u(e){return"string"==typeof e?e:ge(e)}return{get index(){return i},get action(){return n},get location(){return p()},createHref:u,createURL(e){return new URL(u(e),"http://localhost")},encodeLocation(e){let t="string"==typeof e?ye(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,s){n=de.Push;let a=c(e,s);i+=1,t.splice(i,t.length,a),r&&o&&o({action:n,location:a,delta:1})},replace(e,s){n=de.Replace;let a=c(e,s);t[i]=a,r&&o&&o({action:n,location:a,delta:0})},go(e){n=de.Pop;let s=l(i+e),a=t[s];i=s,o&&o({action:n,location:a,delta:e})},listen(e){return o=e,()=>{o=null}}}}({initialEntries:a,initialIndex:r,v5Compat:!0}));let o=n.current,[l,p]=u.useState({action:o.action,location:o.location}),{v7_startTransition:c}=i||{},d=u.useCallback(e=>{c&&_t?_t(()=>p(e)):p(e)},[p,c]);return u.useLayoutEffect(()=>o.listen(d),[o,d]),u.useEffect(()=>vt(i),[i]),u.createElement(Ct,{basename:t,children:s,location:l.location,navigationType:l.action,navigator:o,future:i})}function xt(e){let{to:t,replace:s,state:a,relative:r}=e;at()||he(!1);let{future:i,static:n}=u.useContext(Xe),{matches:o}=u.useContext(tt),{pathname:l}=rt(),p=nt(),c=Be(t,Le(o,i.v7_relativeSplatPath),l,"path"===r),d=JSON.stringify(c);return u.useEffect(()=>p(JSON.parse(d),{replace:s,state:a,relative:r}),[p,d,r,s,a]),null}function Nt(e){he(!1)}function Ct(e){let{basename:t="/",children:s=null,location:a,navigationType:r=de.Pop,navigator:i,static:n=!1,future:o}=e;at()&&he(!1);let l=t.replace(/^\/*/,"/"),p=u.useMemo(()=>({basename:l,navigator:i,static:n,future:Ke({v7_relativeSplatPath:!1},o)}),[l,o,i,n]);"string"==typeof a&&(a=ye(a));let{pathname:c="/",search:d="",hash:m="",state:h=null,key:f="default"}=a,b=u.useMemo(()=>{let e=je(c,l);return null==e?null:{location:{pathname:e,search:d,hash:m,state:h,key:f},navigationType:r}},[l,c,d,m,h,f,r]);return null==b?null:u.createElement(Xe.Provider,{value:p},u.createElement(et.Provider,{children:s,value:b}))}function kt(e){let{children:t,location:s}=e;return lt(St(t),s)}new Promise(()=>{});u.Component;function St(e,t){void 0===t&&(t=[]);let s=[];return u.Children.forEach(e,(e,a)=>{if(!u.isValidElement(e))return;let r=[...t,a];if(e.type===u.Fragment)return void s.push.apply(s,St(e.props.children,r));e.type!==Nt&&he(!1),e.props.index&&e.props.children&&he(!1);let i={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=St(e.props.children,r)),s.push(i)}),s}function Pt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ot=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Dt=()=>Math.random().toString(36).substring(7).split("").join("."),Ft={INIT:`@@redux/INIT${Dt()}`,REPLACE:`@@redux/REPLACE${Dt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Dt()}`};function At(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function Tt(e,t,s){if("function"!=typeof e)throw new Error(Pt(2));if("function"==typeof t&&"function"==typeof s||"function"==typeof s&&"function"==typeof arguments[3])throw new Error(Pt(0));if("function"==typeof t&&void 0===s&&(s=t,t=void 0),void 0!==s){if("function"!=typeof s)throw new Error(Pt(1));return s(Tt)(e,t)}let a=e,r=t,i=new Map,n=i,o=0,l=!1;function p(){n===i&&(n=new Map,i.forEach((e,t)=>{n.set(t,e)}))}function c(){if(l)throw new Error(Pt(3));return r}function u(e){if("function"!=typeof e)throw new Error(Pt(4));if(l)throw new Error(Pt(5));let t=!0;p();const s=o++;return n.set(s,e),function(){if(t){if(l)throw new Error(Pt(6));t=!1,p(),n.delete(s),i=null}}}function d(e){if(!At(e))throw new Error(Pt(7));if(void 0===e.type)throw new Error(Pt(8));if("string"!=typeof e.type)throw new Error(Pt(17));if(l)throw new Error(Pt(9));try{l=!0,r=a(r,e)}finally{l=!1}return(i=n).forEach(e=>{e()}),e}d({type:Ft.INIT});return{dispatch:d,subscribe:u,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Pt(10));a=e,d({type:Ft.REPLACE})},[Ot]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Pt(11));function s(){const e=t;e.next&&e.next(c())}s();return{unsubscribe:e(s)}},[Ot](){return this}}}}}function Mt(e){const t=Object.keys(e),s={};for(let a=0;a<t.length;a++){const r=t[a];0,"function"==typeof e[r]&&(s[r]=e[r])}const a=Object.keys(s);let r;try{!function(e){Object.keys(e).forEach(t=>{const s=e[t];if(void 0===s(void 0,{type:Ft.INIT}))throw new Error(Pt(12));if(void 0===s(void 0,{type:Ft.PROBE_UNKNOWN_ACTION()}))throw new Error(Pt(13))})}(s)}catch(e){r=e}return function(e={},t){if(r)throw r;let i=!1;const n={};for(let r=0;r<a.length;r++){const o=a[r],l=s[o],p=e[o],c=l(p,t);if(void 0===c){t&&t.type;throw new Error(Pt(14))}n[o]=c,i=i||c!==p}return i=i||a.length!==Object.keys(e).length,i?n:e}}function jt(e,t){return function(...s){return t(e.apply(this,s))}}function Ut(e,t){if("function"==typeof e)return jt(e,t);if("object"!=typeof e||null===e)throw new Error(Pt(16));const s={};for(const a in e){const r=e[a];"function"==typeof r&&(s[a]=jt(r,t))}return s}function Vt(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...s)=>e(t(...s)))}function $t(e){return({dispatch:t,getState:s})=>a=>r=>"function"==typeof r?r(t,s,e):a(r)}var It=$t(),Rt=$t,Lt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Vt:Vt.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Bt=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};var zt="RTK_autoBatch",Wt=e=>t=>{setTimeout(t,e)},Ht=e=>function(t){const{autoBatch:s=!0}=t??{};let a=new Bt(e);return s&&a.push(((e={type:"raf"})=>t=>(...s)=>{const a=t(...s);let r=!0,i=!1,n=!1;const o=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Wt(10):"callback"===e.type?e.queueNotification:Wt(e.timeout),p=()=>{n=!1,i&&(i=!1,o.forEach(e=>e()))};return Object.assign({},a,{subscribe(e){const t=a.subscribe(()=>r&&e());return o.add(e),()=>{t(),o.delete(e)}},dispatch(e){try{return r=!e?.meta?.[zt],i=!r,i&&(n||(n=!0,l(p))),a.dispatch(e)}finally{r=!0}}})})("object"==typeof s?s:void 0)),a};function qt(e){const t=function(e){const{thunk:t=!0,immutableCheck:s=!0,serializableCheck:a=!0,actionCreatorCheck:r=!0}=e??{};let i=new Bt;return t&&("boolean"==typeof t?i.push(It):i.push(Rt(t.extraArgument))),i},{reducer:s,middleware:a,devTools:r=!0,duplicateMiddlewareCheck:i=!0,preloadedState:n,enhancers:o}=e||{};let l,p;if("function"==typeof s)l=s;else{if(!At(s))throw new Error(Yt(1));l=Mt(s)}p="function"==typeof a?a(t):t();let c=Vt;r&&(c=Lt({trace:!1,..."object"==typeof r&&r}));const u=function(...e){return t=>(s,a)=>{const r=t(s,a);let i=()=>{throw new Error(Pt(15))};const n={getState:r.getState,dispatch:(e,...t)=>i(e,...t)},o=e.map(e=>e(n));return i=Vt(...o)(r.dispatch),{...r,dispatch:i}}}(...p),d=Ht(u);return Tt(l,n,c(..."function"==typeof o?o(d):d()))}var{assign:Qt}=Object;Symbol.for("rtk-state-proxy-original");function Yt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const{entries:Gt,setPrototypeOf:Kt,isFrozen:Jt,getPrototypeOf:Zt,getOwnPropertyDescriptor:Xt}=Object;let{freeze:es,seal:ts,create:ss}=Object,{apply:as,construct:rs}="undefined"!=typeof Reflect&&Reflect;es||(es=function(e){return e}),ts||(ts=function(e){return e}),as||(as=function(e,t){for(var s=arguments.length,a=new Array(s>2?s-2:0),r=2;r<s;r++)a[r-2]=arguments[r];return e.apply(t,a)}),rs||(rs=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];return new e(...s)});const is=vs(Array.prototype.forEach),ns=vs(Array.prototype.lastIndexOf),os=vs(Array.prototype.pop),ls=vs(Array.prototype.push),ps=vs(Array.prototype.splice),cs=vs(String.prototype.toLowerCase),us=vs(String.prototype.toString),ds=vs(String.prototype.match),ms=vs(String.prototype.replace),hs=vs(String.prototype.indexOf),fs=vs(String.prototype.trim),bs=vs(Object.prototype.hasOwnProperty),gs=vs(RegExp.prototype.test),ys=(Es=TypeError,function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return rs(Es,t)});var Es;function vs(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var s=arguments.length,a=new Array(s>1?s-1:0),r=1;r<s;r++)a[r-1]=arguments[r];return as(e,t,a)}}function _s(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cs;Kt&&Kt(e,null);let a=t.length;for(;a--;){let r=t[a];if("string"==typeof r){const e=s(r);e!==r&&(Jt(t)||(t[a]=e),r=e)}e[r]=!0}return e}function ws(e){for(let t=0;t<e.length;t++){bs(e,t)||(e[t]=null)}return e}function xs(e){const t=ss(null);for(const[s,a]of Gt(e)){bs(e,s)&&(Array.isArray(a)?t[s]=ws(a):a&&"object"==typeof a&&a.constructor===Object?t[s]=xs(a):t[s]=a)}return t}function Ns(e,t){for(;null!==e;){const s=Xt(e,t);if(s){if(s.get)return vs(s.get);if("function"==typeof s.value)return vs(s.value)}e=Zt(e)}return function(){return null}}const Cs=es(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ks=es(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ss=es(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ps=es(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Os=es(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ds=es(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fs=es(["#text"]),As=es(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ts=es(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ms=es(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),js=es(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Us=ts(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Vs=ts(/<%[\w\W]*|[\w\W]*%>/gm),$s=ts(/\$\{[\w\W]*/gm),Is=ts(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rs=ts(/^aria-[\-\w]+$/),Ls=ts(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Bs=ts(/^(?:\w+script|data):/i),zs=ts(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ws=ts(/^html$/i),Hs=ts(/^[a-z][.\w]*(-[.\w]+)+$/i);var qs=Object.freeze({__proto__:null,ARIA_ATTR:Rs,ATTR_WHITESPACE:zs,CUSTOM_ELEMENT:Hs,DATA_ATTR:Is,DOCTYPE_NAME:Ws,ERB_EXPR:Vs,IS_ALLOWED_URI:Ls,IS_SCRIPT_OR_DATA:Bs,MUSTACHE_EXPR:Us,TMPLIT_EXPR:$s});const Qs=1,Ys=3,Gs=7,Ks=8,Js=9,Zs=function(){return"undefined"==typeof window?null:window};var Xs=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zs();const s=t=>e(t);if(s.version="3.3.1",s.removed=[],!t||!t.document||t.document.nodeType!==Js||!t.Element)return s.isSupported=!1,s;let{document:a}=t;const r=a,i=r.currentScript,{DocumentFragment:n,HTMLTemplateElement:o,Node:l,Element:p,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:m,trustedTypes:h}=t,f=p.prototype,b=Ns(f,"cloneNode"),g=Ns(f,"remove"),y=Ns(f,"nextSibling"),E=Ns(f,"childNodes"),v=Ns(f,"parentNode");if("function"==typeof o){const e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let _,w="";const{implementation:x,createNodeIterator:N,createDocumentFragment:C,getElementsByTagName:k}=a,{importNode:S}=r;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};s.isSupported="function"==typeof Gt&&"function"==typeof v&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:O,ERB_EXPR:D,TMPLIT_EXPR:F,DATA_ATTR:A,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:j,CUSTOM_ELEMENT:U}=qs;let{IS_ALLOWED_URI:V}=qs,$=null;const I=_s({},[...Cs,...ks,...Ss,...Os,...Fs]);let R=null;const L=_s({},[...As,...Ts,...Ms,...js]);let B=Object.seal(ss(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,W=null;const H=Object.seal(ss(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let q=!0,Q=!0,Y=!1,G=!0,K=!1,J=!0,Z=!1,X=!1,ee=!1,te=!1,se=!1,ae=!1,re=!0,ie=!1,ne=!0,oe=!1,le={},pe=null;const ce=_s({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const de=_s({},["audio","video","img","source","image","track"]);let me=null;const he=_s({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let ye=ge,Ee=!1,ve=null;const _e=_s({},[fe,be,ge],us);let we=_s({},["mi","mo","mn","ms","mtext"]),xe=_s({},["annotation-xml"]);const Ne=_s({},["title","style","font","a","script"]);let Ce=null;const ke=["application/xhtml+xml","text/html"];let Se=null,Pe=null;const Oe=a.createElement("form"),De=function(e){return e instanceof RegExp||e instanceof Function},Fe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Pe||Pe!==e){if(e&&"object"==typeof e||(e={}),e=xs(e),Ce=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Se="application/xhtml+xml"===Ce?us:cs,$=bs(e,"ALLOWED_TAGS")?_s({},e.ALLOWED_TAGS,Se):I,R=bs(e,"ALLOWED_ATTR")?_s({},e.ALLOWED_ATTR,Se):L,ve=bs(e,"ALLOWED_NAMESPACES")?_s({},e.ALLOWED_NAMESPACES,us):_e,me=bs(e,"ADD_URI_SAFE_ATTR")?_s(xs(he),e.ADD_URI_SAFE_ATTR,Se):he,ue=bs(e,"ADD_DATA_URI_TAGS")?_s(xs(de),e.ADD_DATA_URI_TAGS,Se):de,pe=bs(e,"FORBID_CONTENTS")?_s({},e.FORBID_CONTENTS,Se):ce,z=bs(e,"FORBID_TAGS")?_s({},e.FORBID_TAGS,Se):xs({}),W=bs(e,"FORBID_ATTR")?_s({},e.FORBID_ATTR,Se):xs({}),le=!!bs(e,"USE_PROFILES")&&e.USE_PROFILES,q=!1!==e.ALLOW_ARIA_ATTR,Q=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,K=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,se=e.RETURN_DOM_FRAGMENT||!1,ae=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,V=e.ALLOWED_URI_REGEXP||Ls,ye=e.NAMESPACE||ge,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,xe=e.HTML_INTEGRATION_POINTS||xe,B=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&De(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&De(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(B.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(B.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(Q=!1),se&&(te=!0),le&&($=_s({},Fs),R=[],!0===le.html&&(_s($,Cs),_s(R,As)),!0===le.svg&&(_s($,ks),_s(R,Ts),_s(R,js)),!0===le.svgFilters&&(_s($,Ss),_s(R,Ts),_s(R,js)),!0===le.mathMl&&(_s($,Os),_s(R,Ms),_s(R,js))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?H.tagCheck=e.ADD_TAGS:($===I&&($=xs($)),_s($,e.ADD_TAGS,Se))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?H.attributeCheck=e.ADD_ATTR:(R===L&&(R=xs(R)),_s(R,e.ADD_ATTR,Se))),e.ADD_URI_SAFE_ATTR&&_s(me,e.ADD_URI_SAFE_ATTR,Se),e.FORBID_CONTENTS&&(pe===ce&&(pe=xs(pe)),_s(pe,e.FORBID_CONTENTS,Se)),e.ADD_FORBID_CONTENTS&&(pe===ce&&(pe=xs(pe)),_s(pe,e.ADD_FORBID_CONTENTS,Se)),ne&&($["#text"]=!0),Z&&_s($,["html","head","body"]),$.table&&(_s($,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ys('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ys('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,w=_.createHTML("")}else void 0===_&&(_=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let s=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(s=t.getAttribute(a));const r="dompurify"+(s?"#"+s:"");try{return e.createPolicy(r,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(h,i)),null!==_&&"string"==typeof w&&(w=_.createHTML(""));es&&es(e),Pe=e}},Ae=_s({},[...ks,...Ss,...Ps]),Te=_s({},[...Os,...Ds]),Me=function(e){ls(s.removed,{element:e});try{v(e).removeChild(e)}catch(t){g(e)}},je=function(e,t){try{ls(s.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){ls(s.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||se)try{Me(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ue=function(e){let t=null,s=null;if(ee)e="<remove></remove>"+e;else{const t=ds(e,/^[\r\n\t ]+/);s=t&&t[0]}"application/xhtml+xml"===Ce&&ye===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=_?_.createHTML(e):e;if(ye===ge)try{t=(new m).parseFromString(r,Ce)}catch(e){}if(!t||!t.documentElement){t=x.createDocument(ye,"template",null);try{t.documentElement.innerHTML=Ee?w:r}catch(e){}}const i=t.body||t.documentElement;return e&&s&&i.insertBefore(a.createTextNode(s),i.childNodes[0]||null),ye===ge?k.call(t,Z?"html":"body")[0]:Z?t.documentElement:i},Ve=function(e){return N.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},$e=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ie=function(e){return"function"==typeof l&&e instanceof l};function Re(e,t,a){is(e,e=>{e.call(s,t,a,Pe)})}const Le=function(e){let t=null;if(Re(P.beforeSanitizeElements,e,null),$e(e))return Me(e),!0;const a=Se(e.nodeName);if(Re(P.uponSanitizeElement,e,{tagName:a,allowedTags:$}),J&&e.hasChildNodes()&&!Ie(e.firstElementChild)&&gs(/<[/\w!]/g,e.innerHTML)&&gs(/<[/\w!]/g,e.textContent))return Me(e),!0;if(e.nodeType===Gs)return Me(e),!0;if(J&&e.nodeType===Ks&&gs(/<[/\w]/g,e.data))return Me(e),!0;if(!(H.tagCheck instanceof Function&&H.tagCheck(a))&&(!$[a]||z[a])){if(!z[a]&&ze(a)){if(B.tagNameCheck instanceof RegExp&&gs(B.tagNameCheck,a))return!1;if(B.tagNameCheck instanceof Function&&B.tagNameCheck(a))return!1}if(ne&&!pe[a]){const t=v(e)||e.parentNode,s=E(e)||e.childNodes;if(s&&t){for(let a=s.length-1;a>=0;--a){const r=b(s[a],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,y(e))}}}return Me(e),!0}return e instanceof p&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const s=cs(e.tagName),a=cs(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===be?t.namespaceURI===ge?"svg"===s:t.namespaceURI===fe?"svg"===s&&("annotation-xml"===a||we[a]):Boolean(Ae[s]):e.namespaceURI===fe?t.namespaceURI===ge?"math"===s:t.namespaceURI===be?"math"===s&&xe[a]:Boolean(Te[s]):e.namespaceURI===ge?!(t.namespaceURI===be&&!xe[a])&&!(t.namespaceURI===fe&&!we[a])&&!Te[s]&&(Ne[s]||!Ae[s]):!("application/xhtml+xml"!==Ce||!ve[e.namespaceURI]))}(e)?(Me(e),!0):"noscript"!==a&&"noembed"!==a&&"noframes"!==a||!gs(/<\/no(script|embed|frames)/i,e.innerHTML)?(K&&e.nodeType===Ys&&(t=e.textContent,is([O,D,F],e=>{t=ms(t,e," ")}),e.textContent!==t&&(ls(s.removed,{element:e.cloneNode()}),e.textContent=t)),Re(P.afterSanitizeElements,e,null),!1):(Me(e),!0)},Be=function(e,t,s){if(re&&("id"===t||"name"===t)&&(s in a||s in Oe))return!1;if(Q&&!W[t]&&gs(A,t));else if(q&&gs(T,t));else if(H.attributeCheck instanceof Function&&H.attributeCheck(t,e));else if(!R[t]||W[t]){if(!(ze(e)&&(B.tagNameCheck instanceof RegExp&&gs(B.tagNameCheck,e)||B.tagNameCheck instanceof Function&&B.tagNameCheck(e))&&(B.attributeNameCheck instanceof RegExp&&gs(B.attributeNameCheck,t)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(t,e))||"is"===t&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&gs(B.tagNameCheck,s)||B.tagNameCheck instanceof Function&&B.tagNameCheck(s))))return!1}else if(me[t]);else if(gs(V,ms(s,j,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==hs(s,"data:")||!ue[e]){if(Y&&!gs(M,ms(s,j,"")));else if(s)return!1}else;return!0},ze=function(e){return"annotation-xml"!==e&&ds(e,U)},We=function(e){Re(P.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||$e(e))return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:n,namespaceURI:o,value:l}=i,p=Se(n),c=l;let u="value"===n?c:fs(c);if(a.attrName=p,a.attrValue=u,a.keepAttr=!0,a.forceKeepAttr=void 0,Re(P.uponSanitizeAttribute,e,a),u=a.attrValue,!ie||"id"!==p&&"name"!==p||(je(n,e),u="user-content-"+u),J&&gs(/((--!?|])>)|<\/(style|title|textarea)/i,u)){je(n,e);continue}if("attributename"===p&&ds(u,"href")){je(n,e);continue}if(a.forceKeepAttr)continue;if(!a.keepAttr){je(n,e);continue}if(!G&&gs(/\/>/i,u)){je(n,e);continue}K&&is([O,D,F],e=>{u=ms(u,e," ")});const d=Se(e.nodeName);if(Be(d,p,u)){if(_&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(o);else switch(h.getAttributeType(d,p)){case"TrustedHTML":u=_.createHTML(u);break;case"TrustedScriptURL":u=_.createScriptURL(u)}if(u!==c)try{o?e.setAttributeNS(o,n,u):e.setAttribute(n,u),$e(e)?Me(e):os(s.removed)}catch(t){je(n,e)}}else je(n,e)}Re(P.afterSanitizeAttributes,e,null)},He=function e(t){let s=null;const a=Ve(t);for(Re(P.beforeSanitizeShadowDOM,t,null);s=a.nextNode();)Re(P.uponSanitizeShadowNode,s,null),Le(s),We(s),s.content instanceof n&&e(s.content);Re(P.afterSanitizeShadowDOM,t,null)};return s.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null,i=null,o=null,p=null;if(Ee=!e,Ee&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ie(e)){if("function"!=typeof e.toString)throw ys("toString is not a function");if("string"!=typeof(e=e.toString()))throw ys("dirty is not a string, aborting")}if(!s.isSupported)return e;if(X||Fe(t),s.removed=[],"string"==typeof e&&(oe=!1),oe){if(e.nodeName){const t=Se(e.nodeName);if(!$[t]||z[t])throw ys("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)a=Ue("\x3c!----\x3e"),i=a.ownerDocument.importNode(e,!0),i.nodeType===Qs&&"BODY"===i.nodeName||"HTML"===i.nodeName?a=i:a.appendChild(i);else{if(!te&&!K&&!Z&&-1===e.indexOf("<"))return _&&ae?_.createHTML(e):e;if(a=Ue(e),!a)return te?null:ae?w:""}a&&ee&&Me(a.firstChild);const c=Ve(oe?e:a);for(;o=c.nextNode();)Le(o),We(o),o.content instanceof n&&He(o.content);if(oe)return e;if(te){if(se)for(p=C.call(a.ownerDocument);a.firstChild;)p.appendChild(a.firstChild);else p=a;return(R.shadowroot||R.shadowrootmode)&&(p=S.call(r,p,!0)),p}let u=Z?a.outerHTML:a.innerHTML;return Z&&$["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&gs(Ws,a.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+u),K&&is([O,D,F],e=>{u=ms(u,e," ")}),_&&ae?_.createHTML(u):u},s.setConfig=function(){Fe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),X=!0},s.clearConfig=function(){Pe=null,X=!1},s.isValidAttribute=function(e,t,s){Pe||Fe({});const a=Se(e),r=Se(t);return Be(a,r,s)},s.addHook=function(e,t){"function"==typeof t&&ls(P[e],t)},s.removeHook=function(e,t){if(void 0!==t){const s=ns(P[e],t);return-1===s?void 0:ps(P[e],s,1)[0]}return os(P[e])},s.removeHooks=function(e){P[e]=[]},s.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},s}(),ea=wp.element;class ta extends ea.Component{constructor(e){super(e)}initialize(){jQuery(".sui-floating-notices").length||jQuery("main.sui-wrap").prepend('<div class="sui-floating-notices"></div>'),jQuery("#forminator-notification").length?(jQuery("#forminator-notification").remove(),this.initialize()):jQuery(".sui-floating-notices").append('<div role="alert" id="forminator-notification" class="sui-notice" aria-live="assertive"></div>'),this.$notification=jQuery("#forminator-notification")}open(){this.initialize();const e="<p>"+this.props.text+"</p>",t={type:this.props.type||"default",autoclose:{timeout:this.props.time||5e3},dismiss:{show:this.props.dismiss||!1}};SUI.openNotice("forminator-notification",e,t)}close(){SUI.closeNotice("forminator-notification")}}function sa(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function aa(e,t){let s,a,r=[];for(let i=0;i<e.length;i++){const n=e[i];if("string"!==n.type){if(void 0===t[n.value])throw new Error(`Invalid interpolation, missing component node: \`${n.value}\``);if("object"!=typeof t[n.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${n.value}\``);if("componentClose"===n.type)throw new Error(`Missing opening component token: \`${n.value}\``);if("componentOpen"===n.type){s=t[n.value],a=i;break}r.push(t[n.value])}else r.push(n.value)}if(s){const i=function(e,t){const s=t[e];let a=0;for(let r=e+1;r<t.length;r++){const e=t[r];if(e.value===s.value){if("componentOpen"===e.type){a++;continue}if("componentClose"===e.type){if(0===a)return r;a--}}}throw new Error("Missing closing component token `"+s.value+"`")}(a,e),n=aa(e.slice(a+1,i),t),o=(0,u.cloneElement)(s,{},n);if(r.push(o),i<e.length-1){const s=aa(e.slice(i+1),t);r=r.concat(s)}}return r=r.filter(Boolean),0===r.length?null:1===r.length?r[0]:(0,u.createElement)(u.Fragment,null,...r)}function ra(e){const{mixedString:t,components:s,throwErrors:a}=e;if(!s)return t;if("object"!=typeof s){if(a)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const r=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(sa)}(t);try{return aa(r,s)}catch(e){if(a)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}function ia(){var e=Math.ceil(1e3),t=Math.floor(9999);return Math.floor(Math.random()*(t-e)+e)}function na(){return"wrapper-"+ia()+"-"+ia()}function oa(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const a=ca(e),r=_.isUndefined(e.settings["cform-color-option"])?"forminator":e.settings["cform-color-option"];return s||"basic"!==a&&"theme"!==r?t:""}function la(e,t){return"basic"!==ca(e)?t:""}function pa(e){return"basic"===ca(e)?"basic-":""}function ca(e){return void 0!==e.formDesign?e.formDesign:void 0!==e.settings&&void 0!==e.settings["forminator-poll-design"]?e.settings["forminator-poll-design"]:void 0!==e.quizDesign?e.quizDesign:""}function ua(){return{"behaviour-thankyou":Na("Inline Message"),"behaviour-redirect":Na("Redirect user to a URL"),"behaviour-hide":Na("Hide form")}}function da(e,t){let s=0;return t.map(t=>{t.fields.map(t=>{t.type===e&&s++})}),s}function ma(e,t){const s=[];t.map(t=>{t.fields.map(t=>{if(t.type===e){const e=t.element_id.split("-");switch(t.type){case"page-break":case"rich-text":s.push(parseInt(e[2]));break;case"all-form-data":case"pdf-page-break":s.push(parseInt(e[3]));break;default:s.push(parseInt(e[1]))}}})});let a=0;return _.isEmpty(s)||(a=_.max(s)),parseInt(a)+1}function ha(e){return e=e.trim().replace(/\s+|\//g,"-")}function fa(e){return null===e}function ba(e,t){let s=0;return!!fa(t)||(t.map(t=>{t.fields.map(t=>{t.type===e&&s++})}),s>0)}function ga(e,t){const s=[];return"stripe"===e&&(t.map(e=>{e.fields.map(e=>{if("stripe-ocs"===e.type){let t=_.clone(e);_.isEmpty(e.field_label)&&(t.field_label=e.element_id),s.push(t)}})}),s.length)||t.map(t=>{t.fields.map(t=>{if(t.type===e){let e=_.clone(t);("address"===t.type||_.isEmpty(t.field_label))&&(e.field_label=t.element_id),s.push(e)}})}),s}function ya(e,t){const s=[];return ga(e,t).map(t=>{let a=t.field_label;"address"===e&&(a=t.element_id),s.push({value:t.element_id,label:a,element_id:t.element_id})}),s}function Ea(e,t){let s="";return t.map(t=>{t.fields.map(t=>{t.element_id===e&&(s=t.field_label)})}),s}function va(e,t){let s=0;return t.map(t=>{t.fields.map(t=>{t.element_id===e&&s++})}),s>0}function _a(e,t,s){const a=forminatorData.fields.find(t=>t.slug===e),r=ma(a.type,t),i={element_id:a.type+"-"+r,type:a.type,options:a.options,cols:12,conditions:{},wrapper_id:s};return _.includes(["calculation","number","slider","radio","currency","select","checkbox"],a.type)&&(i.hidden_behavior="zero"),Object.assign(i,JSON.parse(JSON.stringify(a.defaults)))}function wa(e){return forminatorData.fields.find(t=>t.type===e.type)}function xa(e,t,s){return[...e.slice(0,t),s,...e.slice(t+1)]}function Na(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{args:s,components:a,context:r}=t;let i=e;if(forminatorl10n?.locale)if(r){const t=`${e}|${r}`;i=forminatorl10n.locale[t]?.[1]||i}else i=forminatorl10n.locale[e]?.[1]||i;if(i=i.replace(/%%/g,"\0"),Array.isArray(s)){let e=0;i=i.replace(/%[sd]/g,()=>s[e++]??"")}return s&&!Array.isArray(s)&&"object"==typeof s&&(i=i.replace(/\{\%\(([^)]+)\)s\}/g,(e,t)=>s[t]??"")),i=i.replace(/\0/g,"%"),a?ra({mixedString:i,components:a}):i}function Ca(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ka(e,t){const s=t.value;let a;if(!_.isUndefined(t.rule)&&_.includes(["is_final_result","is_not_final_result","is_correct","is_incorrect"],t.rule))return"";if(e.hasOptions&&e.values.length>0){let t;if(t=_.filter(e.values,{value:s})[0],t||(t=_.filter(e.values,{label:s})[0]),!t)return;a=t.label}else a="date"===e.field_type&&["is_before","is_after"].includes(t.rule)?Sa(s):s;return _.isEmpty(a)?Na("null"):a}function Sa(e){if(!isNaN(Number(e))){const t={day:"numeric",month:"numeric",year:"numeric"};e=new Date(1*e).toLocaleDateString("en-US",t)}return e}function Pa(e,t,s,a,r){let i=[];_.isUndefined(t)&&(t=["page-break","postdata","total","product","captcha"]),Array.isArray(t)&&!Ia(r)&&t.push("group");let n=!1;return _.isUndefined(s)||_.isUndefined(s.main_date_field)||!0!==s.main_date_field||(n=!0),e.map(e=>{const s=e.fields,o=e.parent_group;s.map(e=>{if(_.isUndefined(a)){if(_.includes(t,e.type))return}else if(!_.includes(a,e.type))return;let s;_.isUndefined(e.field_label)||_.isEmpty(e.field_label)?(s=e.type,s=Ca(s)):s=e.field_label,"name"!==e.type||Ia(r)?"address"!==e.type||Ia(r)?"slider"===e.type&&"range"===e.slider_type?i=i.concat(function(e,t,s){const a=[];return[{suffix:"min"},{suffix:"max"}].map(r=>{a.push({element_id:e.element_id+"-"+r.suffix,parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-"+r.suffix,label:t+" - "+r.suffix,isNumber:!0,hasCalcs:Da(e)})}),a}(e,s,o)):"time"!==e.type||Ia(r)?"date"===e.type&&"picker"!==e.field_type&&!1===n||i.push({element_id:e.element_id,parent_group:o,required:e.required,field_type:e.type,field_slug:e.type,label:s,values:Ta(e),hasOptions:Aa(e),hasCalcs:Da(e),formula:Fa(e),isNumber:Oa(e),fieldData:e}):i=i.concat(function(e,t,s){const a=[];let r,i;r=_.isUndefined(e.hh_label)||_.isEmpty(e.hh_label)?t+" - "+Na("Hour"):t+" - "+e.hh_label;i=_.isUndefined(e.mm_label)||_.isEmpty(e.mm_label)?t+" - "+Na("Minute"):t+" - "+e.mm_label;a.push({element_id:e.element_id+"-hours",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-hours",label:r,values:!1,hasOptions:!1,isNumber:!0},{element_id:e.element_id+"-minutes",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-minutes",label:i,values:!1,hasOptions:!1,isNumber:!0}),"twelve"===e.time_type&&a.push({element_id:e.element_id+"-ampm",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-ampm",label:t+"-AM/PM",values:[{label:"AM",value:"am"},{label:"PM",value:"pm"}],hasOptions:!0,isNumber:!1});return a}(e,s,o)):i=i.concat(function(e,t,s){const a=[];return[{attr:"street_address",label:"street_address_label",element_suffix:"street_address",hasOptions:!1,values:!1,isNumber:!1},{attr:"address_line",label:"address_line_label",element_suffix:"address_line",hasOptions:!1,values:!1,isNumber:!1},{attr:"address_city",label:"address_city_label",element_suffix:"city",hasOptions:!1,values:!1,isNumber:!1},{attr:"address_state",label:"address_state_label",element_suffix:"state",hasOptions:!1,values:!1,isNumber:!1},{attr:"address_zip",label:"address_zip_label",element_suffix:"zip",hasOptions:!1,values:!1,isNumber:!1},{attr:"address_country",label:"address_country_label",element_suffix:"country",hasOptions:!1,values:!1,isNumber:!1}].map(r=>{if(Ia(e[r.attr])){let i;i=_.isUndefined(e[r.label])||_.isEmpty(e[r.label])?t+" - ":t+" - "+e[r.label],a.push({element_id:e.element_id+"-"+r.element_suffix,parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-"+r.element_suffix,label:i,values:r.values,hasOptions:r.hasOptions,isNumber:r.isNumber})}}),a}(e,s,o)):i=i.concat(function(e,t,s){const a=[];"true"===e.multiple_name||!0===e.multiple_name?[{attr:"prefix",label:"prefix_label",element_suffix:"prefix",hasOptions:!0,values:[{label:"Mr.",value:"Mr"},{label:"Mrs.",value:"Mrs"},{label:"Ms.",value:"Ms"},{label:"Mx.",value:"Mx"},{label:"Miss",value:"Miss"},{label:"Dr.",value:"Dr"},{label:"Prof.",value:"Prof"}],isNumber:!1},{attr:"fname",label:"fname_label",element_suffix:"first-name",hasOptions:!1,values:!1,isNumber:!1},{attr:"mname",label:"mname_label",element_suffix:"middle-name",hasOptions:!1,values:!1,isNumber:!1},{attr:"lname",label:"lname_label",element_suffix:"last-name",hasOptions:!1,values:!1,isNumber:!1}].map(r=>{if(Ia(e[r.attr])){let i;i=_.isUndefined(e[r.label])||_.isEmpty(e[r.label])?t+" - ":t+" - "+e[r.label],a.push({element_id:e.element_id+"-"+r.element_suffix,parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-"+r.element_suffix,label:i,values:r.values,hasOptions:r.hasOptions,isNumber:r.isNumber})}}):a.push({element_id:e.element_id,parent_group:s,required:e.required,field_type:e.type,field_slug:e.type,label:t,values:Ta(e),hasOptions:Aa(e),isNumber:Oa(e)});return a}(e,s,o)),"date"!==e.type||"picker"===e.field_type||Ia(r)||(i=i.concat(function(e,t,s){const a=[];let r,i,n;r=_.isUndefined(e.day_label)||_.isEmpty(e.day_label)?t+" - "+Na("Day"):t+" - "+e.day_label;i=_.isUndefined(e.month_label)||_.isEmpty(e.month_label)?t+" - "+Na("Month"):t+" - "+e.month_label;n=_.isUndefined(e.year_label)||_.isEmpty(e.year_label)?t+" - "+Na("Year"):t+" - "+e.year_label;"input"===e.field_type?a.push({element_id:e.element_id+"-day",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-day",label:r,values:!1,hasOptions:!1,isNumber:!0},{element_id:e.element_id+"-month",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-month",label:i,values:!1,hasOptions:!1,isNumber:!0},{element_id:e.element_id+"-year",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-year",label:n,values:!1,hasOptions:!1,isNumber:!0}):a.push({element_id:e.element_id+"-day",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-day",label:r,values:Ta(e),hasOptions:Aa(e),isNumber:Oa(e)},{element_id:e.element_id+"-month",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-month",label:i,values:Ta(e),hasOptions:Aa(e),isNumber:Oa(e)},{element_id:e.element_id+"-year",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-year",label:n,values:Ta(e),hasOptions:Aa(e),isNumber:Oa(e)});return a}(e,s,o)))})}),i.map(e=>{e.label=function(e){if(!e)return"";e=Xs.sanitize(e,{ALLOWED_TAGS:[],ALLOWED_ATTR:[]});const t=document.createElement("div");t.innerHTML=e;const s=t.textContent||t.innerText||"";return Xs.sanitize(s,{ALLOWED_TAGS:[],ALLOWED_ATTR:[]})}(e.label)}),i}function Oa(e){return!!_.includes(["calculation","number","slider","phone","currency"],e.type)}function Da(e){return"true"===e.calculations||!0===e.calculations}function Fa(e){return!!e.formula&&e.formula}function Aa(e){return"select"===e.type||"checkbox"===e.type||"radio"===e.type}function Ta(e){const t=e.type;return("select"===t||"checkbox"===t||"radio"===t)&&e.options}function Ma(e,t,s){let a=_.isUndefined(s)?"":s;switch(e){case"is":return Na("is");case"is_not":return Na("is not");case"day_is":return Na("day is");case"day_is_not":return Na("day is not");case"month_is_not":return Na("month is not");case"month_is":return Na("month is");case"is_before":return Na("is before");case"is_after":return Na("is after");case"is_before_n_or_more_days":return Na("is before %s or more days from current date").replace("%s",a);case"is_before_less_than_n_days":return Na("is before less than %s days from current date").replace("%s",a);case"is_after_n_or_more_days":return Na("is after %s or more days from current date").replace("%s",a);case"is_after_less_than_n_days":return Na("is after less than %s days from current date").replace("%s",a);case"is_great":return Na("is greater than");case"is_less":return Na("is less than");case"contains":return Na("contains");case"does_not_contain":return Na("does not contain");case"starts":return Na("starts with");case"ends":return Na("ends with");case"is_correct":return Na("is correct");case"is_incorrect":return Na("is incorrect");case"is_final_result":return Na("is final result");case"is_not_final_result":return Na("is not final result");default:return"-"}}function ja(e){const t=[];return _.each(forminatorData.fields,e=>{"calculation"!==e.type&&t.push(e.type)}),Pa(e,t)}function Ua(e){return"name"!==e.type||"true"!==e.multiple_name&&!0!==e.multiple_name?"address"===e.type?!!(e.street_address_required||e.address_line_required||e.address_city_required||e.address_state_required||e.address_zip_required||e.address_country_required):e.required:!!(e.prefix_required||e.fname_required||e.mname_required||e.lname_required)}function Va(e,t,s,a){let r=0;return!!fa(e)||(e.map(e=>{e.fields.map(e=>{t===e.type&&a===e[s]&&r++})}),r>0)}function $a(e,t){let s=[];return _.each(t,function(t,a){if(t.amount_type&&t.plan_name||(e.error=Na("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(a)),"single"===t.payment_method&&("fixed"===t.amount_type&&_.isEmpty(t.amount)||"variable"===t.amount_type&&_.isEmpty(t.variable)))e.error=Na("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(a);else if("subscription"===t.payment_method){forminatorData.hasStripePro||(e.error=Na("Stripe Subscription Add-on is required."),e.isValid=!1,s.push(a));const r=_.isUndefined(t.subscription_amount_type)?"fixed":t.subscription_amount_type,i=_.isUndefined(t.quantity_type)?"fixed":t.quantity_type,n=_.isUndefined(t.quantity)?1:t.quantity,o=_.isUndefined(t.bill_input)?1:t.bill_input;("fixed"===r&&_.isEmpty(t.subscription_amount)||"variable"===r&&_.isEmpty(t.subscription_variable))&&(e.error=Na("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(a)),("fixed"===i&&!n||"variable"===i&&_.isEmpty(t.variable_quantity))&&(e.error=Na("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(a)),o?o<=0&&(e.error=Na("Billing frequency should be greater than or equal to 1"),e.isValid=!1,s.push(a)):(e.error=Na("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(a))}}),s.length>0&&(e.paymentKey=s),e}function Ia(e){if(void 0===e)return!1;switch("string"==typeof e&&(e=e.trim().toLowerCase()),e){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;default:return!1}}function Ra(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank";window.open(e,t)}function La(e){forminatorData.hasSavedChanges=e,window.dispatchEvent(new Event("hasSavedChangesUpdated"))}function Ba(e){window.forminatorChanges||(window.forminatorChanges={}),window.forminatorChanges.saveAttempted=e}function za(e){return"autosave"===e?0:forminatorData.saveDelay||1500}function Wa(e){return!_.isUndefined(e.descriptionExist)&&e.descriptionExist||!_.isUndefined(e.state.type)&&_.includes(["address","postdata"],e.state.type)}function Ha(e){if(!e||"string"!=typeof e)return"";const t=[/(?<=^|\s)`(\S(?:.*?\S)?)`(?=\s|$)/gu,/(?<=^|\s)~(\S(?:.*?\S)?)~(?=\s|$)/gu,/(?<=^|\s)_(\S(?:.*?\S)?)_(?=\s|$)/gu,/(?<=^|\s)\*(\S(?:.*?\S)?)\*(?=\s|$)/gu];for(const s of t)e=e.replace(s,"$1");return e}function qa(e,t){if(!e||!t||!Array.isArray(t))return 1;const s=Pa(t,[],{},["page-break"]);if(0===s.length)return 1;const a=s.findIndex(t=>t.element_id===e);return-1===a?1:a===s.length-1?"last":a+2}function Qa(e){let t,s="";if("page-break"===e.field.type){const a=function(e,t){const s=Pa(t,[],{},["page-break"]),a=s.findIndex(t=>t.element_id===e);return _.isUndefined(s[a+1])?null:s[a+1].element_id}(e.field.element_id,e.wrappers);if(t=a?a+"-steps":"last-steps",_.isUndefined(e.settings)||_.isUndefined(e.settings.paginationData)||_.isUndefined(e.settings.paginationData[t]))if("last-steps"===t)s="Finish";else{s="Page "+qa(e.field.element_id,e.wrappers)}else s=e.settings.paginationData[t]}return s}function Ya(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,a)}return s}function Ga(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?Ya(Object(s),!0).forEach(function(t){Ka(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Ya(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}function Ka(e,t,s){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var a=s.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const Ja={modalType:null,modalProps:{}};const Za=Mt({wrappers:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_FIELDS":return t.wrappers;case"UPDATE_FIELD":return function(e,t){const{wrapper:s}=t,a=e.findIndex(e=>e.wrapper_id===s.wrapper_id);return xa(e,a,s)}([...e],t);default:return e}},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;const s=Object.assign({},e);switch(t.type){case"UPDATE_SETTINGS":return function(e,t){const{settings:s}=t;return Ga(Ga({},e),s)}(s,t);case"RESET_SETTINGS":return function(e,t){const{settings:s}=t;return Ga(Ga({},s),{},{_resetTimestamp:Date.now()})}(0,t);case"UPDATE_SETTING":return function(e,t){const{setting:s,value:a}=t;return e[s]=a,e}(s,t);case"UPDATE_TITLE":return function(e,t){const{title:s}=t;return e.formName=s,e}(s,t);default:return e}},modal:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ja,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_MODAL":return{modalProps:t.modalProps,modalType:t.modalType,type:t.type};case"HIDE_MODAL":return Ja;default:return e}},integrationConditions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"UPDATE_INTEGRATION_CONDITIONS"===t.type?t.conditions:e},behaviorArray:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_BEHAVIORS":return t.behaviors;case"UPDATE_BEHAVIOR":return function(e,t){const{behavior:s}=t,a=e.findIndex(e=>e.slug===s.slug);return xa(e,a,s)}([...e],t);default:return e}},notifications:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_NOTIFICATIONS":return t.notifications;case"UPDATE_NOTIFICATION":return function(e,t){const{notification:s}=t,a=e.findIndex(e=>e.slug===s.slug);return xa(e,a,s)}([...e],t);default:return e}},pdfs:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"UPDATE_PDFS"===t.type?t.pdfs:e}});var Xa=Za;function er(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,a)}return s}function tr(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?er(Object(s),!0).forEach(function(t){sr(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):er(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}function sr(e,t,s){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var a=s.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const ar=(e,t)=>s=>{window.forminatorChanges.settings=!0,Ba(!1),s({type:"UPDATE_SETTING",setting:e,value:t})},rr=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"UPDATE_SETTINGS",settings:e})},ir=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"RESET_SETTINGS",settings:e})},nr=(or="fields",(e,t)=>s=>{let a="temp"===t,r={[or]:[],settings:!1,hasSavedChanges:a};a?t="publish":r.saved=!0,window.forminatorChanges=tr(tr({},r),{},{saveAttempted:!1}),s({type:"UPDATE_SETTING",setting:e,value:t})});var or;const lr=(e,t)=>s=>{s({type:"SHOW_MODAL",modalProps:e,modalType:t})},pr=()=>e=>{e({type:"HIDE_MODAL"})},cr="UPDATE_TITLE";function ur(e){return window.forminatorChanges.settings=!0,Ba(!1),{type:cr,title:e}}var dr=r(961),mr=r.t(dr,2);function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},hr.apply(this,arguments)}function fr(e,t){if(null==e)return{};var s,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)s=i[a],t.indexOf(s)>=0||(r[s]=e[s]);return r}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const br=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gr=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(e){}const yr=u.createContext({isTransitioning:!1});new Map;u.startTransition,mr.flushSync,u.useId;const Er="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,vr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_r=u.forwardRef(function(e,t){let s,{onClick:a,relative:r,reloadDocument:i,replace:n,state:o,target:l,to:p,preventScrollReset:c,viewTransition:d}=e,m=fr(e,br),{basename:h}=u.useContext(Xe),f=!1;if("string"==typeof p&&vr.test(p)&&(s=p,Er))try{let e=new URL(window.location.href),t=p.startsWith("//")?new URL(e.protocol+p):new URL(p),s=je(t.pathname,h);t.origin===e.origin&&null!=s?p=s+t.search+t.hash:f=!0}catch(e){}let b=function(e,t){let{relative:s}=void 0===t?{}:t;at()||he(!1);let{basename:a,navigator:r}=u.useContext(Xe),{hash:i,pathname:n,search:o}=ot(e,{relative:s}),l=n;return"/"!==a&&(l="/"===n?a:ze([a,n])),r.createHref({pathname:l,search:o,hash:i})}(p,{relative:r}),g=function(e,t){let{target:s,replace:a,state:r,preventScrollReset:i,relative:n,viewTransition:o}=void 0===t?{}:t,l=nt(),p=rt(),c=ot(e,{relative:n});return u.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,s)){t.preventDefault();let s=void 0!==a?a:ge(p)===ge(c);l(e,{replace:s,state:r,preventScrollReset:i,relative:n,viewTransition:o})}},[p,l,c,a,r,s,e,i,n,o])}(p,{replace:n,state:o,target:l,preventScrollReset:c,relative:r,viewTransition:d});return u.createElement("a",hr({},m,{href:s||b,onClick:f||i?a:function(e){a&&a(e),e.defaultPrevented||g(e)},ref:t,target:l}))});const wr=u.forwardRef(function(e,t){let{"aria-current":s="page",caseSensitive:a=!1,className:r="",end:i=!1,style:n,to:o,viewTransition:l,children:p}=e,c=fr(e,gr),d=ot(o,{relative:c.relative}),m=rt(),h=u.useContext(Ze),{navigator:f,basename:b}=u.useContext(Xe),g=null!=h&&function(e,t){void 0===t&&(t={});let s=u.useContext(yr);null==s&&he(!1);let{basename:a}=Cr(xr.useViewTransitionState),r=ot(e,{relative:t.relative});if(!s.isTransitioning)return!1;let i=je(s.currentLocation.pathname,a)||s.currentLocation.pathname,n=je(s.nextLocation.pathname,a)||s.nextLocation.pathname;return null!=Te(r.pathname,n)||null!=Te(r.pathname,i)}(d)&&!0===l,y=f.encodeLocation?f.encodeLocation(d).pathname:d.pathname,E=m.pathname,v=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;a||(E=E.toLowerCase(),v=v?v.toLowerCase():null,y=y.toLowerCase()),v&&b&&(v=je(v,b)||v);const _="/"!==y&&y.endsWith("/")?y.length-1:y.length;let w,x=E===y||!i&&E.startsWith(y)&&"/"===E.charAt(_),N=null!=v&&(v===y||!i&&v.startsWith(y)&&"/"===v.charAt(y.length)),C={isActive:x,isPending:N,isTransitioning:g},k=x?s:void 0;w="function"==typeof r?r(C):[r,x?"active":null,N?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let S="function"==typeof n?n(C):n;return u.createElement(_r,hr({},c,{"aria-current":k,className:w,ref:t,style:S,to:o,viewTransition:l}),"function"==typeof p?p(C):p)});var xr,Nr;function Cr(e){let t=u.useContext(Je);return t||he(!1),t}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xr||(xr={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Nr||(Nr={}));function kr(e){return d().createElement(d().Fragment,null,(()=>{let t=!1,s=forminatorData.adminUrl+"options-general.php#users_can_register";return"registration"===e.formType&&"manual"!==e.settings["activation-method"]&&(forminatorData.isUserRegistrationEnabled||(t=!0),forminatorData.isMainSite&&"enable"===e.settings["site-registration"]&&!forminatorData.isSiteRegistrationEnabled&&(t=!0),forminatorData.isMultisite&&(s=forminatorData.networkAdminUrl+"settings.php#registration1")),t?d().createElement("div",{className:"sui-notice sui-notice-yellow"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,forminatorData.isMainSite?Na("{{b}}Notice!{{/b}} User/Site registration is disabled in your WordPress network settings. Visitors can still submit this form, but no new sites or user accounts will be created. To enable registration, go to {{link}}Network Admin → Settings → Allow new registrations{{/link}} or use the manual activation method in the {{settings}}User Registration tab{{/settings}}.",{components:{b:d().createElement("strong",null),link:d().createElement("a",{href:s,target:"_blank",rel:"noreferrer"}),settings:d().createElement(wr,{to:"/registration"})}}):Na("{{b}}Notice!{{/b}} User registration is disabled in your WordPress settings. Visitors can still submit this form, but no new user accounts will be created. To enable registration, go to {{link}}Settings → General → Membership{{/link}} or use the manual activation method in the {{settings}}User Registration tab{{/settings}}.",{components:{b:d().createElement("strong",null),link:d().createElement("a",{href:s,target:"_blank",rel:"noreferrer"}),settings:d().createElement(wr,{to:"/registration"})}}))))):""})())}function Sr(){return Sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Sr.apply(null,arguments)}var Pr=ce(function(e){return{id:e.settings.form_id,title:e.settings.formName||"",formType:e.settings["form-type"]||"",settings:e.settings}},function(a){return{actions:{navigationActions:Ut(s,a),modalActions:Ut(t,a),settingsActions:Ut(e,a)}}})(function(e){return d().createElement(kr,Sr({moduleType:"forms",formType:e.formType},e))});function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Or.apply(null,arguments)}const Dr=e=>function(t){const s=rt(),a=nt(),r=function(){let{matches:e}=u.useContext(tt),t=e[e.length-1];return t?t.params:{}}();return d().createElement(e,Or({},t,{router:{location:s,navigate:a,params:r}}))};class Fr extends ea.Component{constructor(e){super(e)}render(){switch(this.props.icon){case"fields":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M22.7812 7.84375C22.5 7.5625 22.0312 7.5625 21.7188 7.84375L21.0625 8.5L22.5 9.9375L23.1562 9.28125C23.4688 9 23.4688 8.5 23.1562 8.21875L22.7812 7.84375ZM16.25 13.4062C16.1562 13.5 16.0938 13.625 16.0625 13.7812L15.7188 15.3125L17.2812 15C17.4062 14.9688 17.5312 14.9062 17.6562 14.8125L21.4375 11L20.0312 9.59375L16.25 13.4062ZM20.6562 6.78125C21.5312 5.90625 22.9688 5.90625 23.8438 6.78125L24.2188 7.15625C25.0938 8.03125 25.0938 9.46875 24.2188 10.3438L18.7188 15.875C18.4062 16.1562 18 16.375 17.5938 16.4688L14.9062 17.0312C14.6562 17.0938 14.4062 17 14.2188 16.8438C14.0625 16.6562 13.9688 16.4062 14.0312 16.1562L14.5938 13.4688C14.6875 13.0312 14.875 12.6562 15.1875 12.3438L20.6562 6.78125ZM7 12.25C7 11 8 10 9.25 10H13.25C13.6562 10 14 10.3438 14 10.75C14 11.1562 13.6562 11.5 13.25 11.5H9.25C8.84375 11.5 8.5 11.8438 8.5 12.25V19.75C8.5 20.1562 8.84375 20.5 9.25 20.5H20.75C21.1562 20.5 21.5 20.1562 21.5 19.75V15.75C21.5 15.3438 21.8438 15 22.25 15C22.6562 15 23 15.3438 23 15.75V19.75C23 21 22 22 20.75 22H9.25C8 22 7 21 7 19.75V12.25ZM10.5 16C10.5 15.4375 10.9375 15 11.5 15C12.0625 15 12.5 15.4375 12.5 16C12.5 16.5625 12.0625 17 11.5 17C10.9375 17 10.5 16.5625 10.5 16Z"})));case"appearance":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M21.5 15.0938C21.5 15.0625 21.5 15.0312 21.5 15C21.5 11.4375 18.5625 8.5 15 8.5C11.4062 8.5 8.5 11.4375 8.5 15C8.5 18.5938 11.4062 21.5 15 21.5C15.0625 21.5 15.1562 21.5 15.25 21.5C15.2812 21.5 15.2812 21.5 15.3125 21.5C15.3125 21.5 15.3438 21.4688 15.375 21.4375C15.4375 21.375 15.5 21.25 15.5 21.0625C15.5 21.0312 15.4688 20.9062 15.3125 20.5312C15.2812 20.5 15.2812 20.4375 15.25 20.4062C15.125 20.0938 14.9062 19.625 14.8125 19.125C14.75 18.9375 14.75 18.7188 14.75 18.5C14.75 16.8438 16.0938 15.5 17.75 15.5H20.8125C21.0312 15.5 21.25 15.4375 21.3438 15.3438C21.4688 15.25 21.5 15.1562 21.5 15.0938ZM23 15.0938C22.9688 16.25 21.9375 17 20.8125 17H17.75C16.9062 17 16.25 17.6875 16.25 18.5C16.25 18.625 16.25 18.7188 16.2812 18.8125C16.3438 19.1562 16.4688 19.4375 16.5938 19.75C16.7812 20.1875 17 20.625 17 21.0625C17 22.0625 16.3125 22.9688 15.3125 23C15.2188 23 15.0938 23 15 23C10.5625 23 7 19.4375 7 15C7 10.5938 10.5625 7 15 7C19.4062 7 23 10.5938 23 15C23 15.0312 23 15.0625 23 15.0938ZM12 15C12 15.5625 11.5312 16 11 16C10.4375 16 10 15.5625 10 15C10 14.4688 10.4375 14 11 14C11.5312 14 12 14.4688 12 15ZM12 13C11.4375 13 11 12.5625 11 12C11 11.4688 11.4375 11 12 11C12.5312 11 13 11.4688 13 12C13 12.5625 12.5312 13 12 13ZM16 11C16 11.5625 15.5312 12 15 12C14.4375 12 14 11.5625 14 11C14 10.4688 14.4375 10 15 10C15.5312 10 16 10.4688 16 11ZM18 13C17.4375 13 17 12.5625 17 12C17 11.4688 17.4375 11 18 11C18.5312 11 19 11.4688 19 12C19 12.5625 18.5312 13 18 13Z"})));case"behavior":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M21.75 9C21.75 8.59375 21.4062 8.25 21 8.25C20.5625 8.25 20.25 8.59375 20.25 9C20.25 9.4375 20.5625 9.75 21 9.75C21.4062 9.75 21.75 9.4375 21.75 9ZM19 9C19 8.3125 19.375 7.65625 20 7.28125C20.5938 6.9375 21.375 6.9375 22 7.28125C22.5938 7.65625 23 8.3125 23 9C23 9.71875 22.5938 10.375 22 10.75C21.375 11.0938 20.5938 11.0938 20 10.75C19.375 10.375 19 9.71875 19 9ZM7 12C7 9.9375 8.65625 8.25 10.75 8.25H15V7.5625C15 7.25 15.25 7 15.5312 7C15.6562 7 15.7812 7.0625 15.875 7.125L17.7812 8.625C17.9062 8.71875 18 8.84375 18 9C18 9.15625 17.9062 9.3125 17.7812 9.40625L15.875 10.9062C15.7812 10.9688 15.6562 11 15.5312 11C15.25 11 15 10.75 15 10.4688V9.75H10.75C9.5 9.75 8.5 10.7812 8.5 12C8.5 13.25 9.5 14.25 10.75 14.25H19.25C21.3125 14.25 23 15.9375 23 18C23 19.875 21.625 21.4062 19.875 21.7188C19.5625 22.4688 18.8438 23 18 23C16.875 23 16 22.125 16 21C16 19.9062 16.875 19 18 19C18.7812 19 19.5 19.5 19.8125 20.1875C20.7812 19.9375 21.5 19.0625 21.5 18C21.5 16.7812 20.4688 15.75 19.25 15.75H10.75C8.65625 15.75 7 14.0938 7 12ZM10.8438 20.25H12V19.5625C12 19.25 12.25 19 12.5312 19C12.6562 19 12.7812 19.0625 12.875 19.125L14.7812 20.625C14.9062 20.7188 15 20.8438 15 21C15 21.1562 14.9062 21.3125 14.7812 21.4062L12.875 22.9062C12.7812 22.9688 12.6562 23 12.5312 23C12.25 23 12 22.75 12 22.4688V21.75H10.8438C10.5312 22.5 9.8125 23 9 23C7.875 23 7 22.125 7 21C7 19.9062 7.875 19 9 19C9.8125 19 10.5312 19.5312 10.8438 20.25ZM9.75 21C9.75 20.5938 9.40625 20.25 9 20.25C8.5625 20.25 8.25 20.5938 8.25 21C8.25 21.4375 8.5625 21.75 9 21.75C9.40625 21.75 9.75 21.4375 9.75 21ZM18 21.75C18.4062 21.75 18.75 21.4375 18.75 21C18.75 20.5938 18.4062 20.25 18 20.25C17.5625 20.25 17.25 20.5938 17.25 21C17.25 21.4375 17.5625 21.75 18 21.75Z"})));case"pdf":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M9 21.5H10.5V23H9C7.875 23 7 22.125 7 21V9C7 7.90625 7.875 7 9 7H14.1562C14.6875 7 15.1875 7.21875 15.5625 7.59375L18.4062 10.4375C18.7812 10.8125 19 11.3125 19 11.8438V16.5H17.5V12H15C14.4375 12 14 11.5625 14 11V8.5H9C8.71875 8.5 8.5 8.75 8.5 9V21C8.5 21.2812 8.71875 21.5 9 21.5ZM12.5 18H13.5C14.4375 18 15.25 18.8125 15.25 19.75C15.25 20.7188 14.4375 21.5 13.5 21.5H13V22.5C13 22.7812 12.75 23 12.5 23C12.2188 23 12 22.7812 12 22.5V21V18.5C12 18.25 12.2188 18 12.5 18ZM13.5 20.5C13.9062 20.5 14.25 20.1875 14.25 19.75C14.25 19.3438 13.9062 19 13.5 19H13V20.5H13.5ZM16.5 18H17.5C18.3125 18 19 18.6875 19 19.5V21.5C19 22.3438 18.3125 23 17.5 23H16.5C16.2188 23 16 22.7812 16 22.5V18.5C16 18.25 16.2188 18 16.5 18ZM17.5 22C17.75 22 18 21.7812 18 21.5V19.5C18 19.25 17.75 19 17.5 19H17V22H17.5ZM20 18.5C20 18.25 20.2188 18 20.5 18H22C22.25 18 22.5 18.25 22.5 18.5C22.5 18.7812 22.25 19 22 19H21V20H22C22.25 20 22.5 20.25 22.5 20.5C22.5 20.7812 22.25 21 22 21H21V22.5C21 22.7812 20.75 23 20.5 23C20.2188 23 20 22.7812 20 22.5V20.5V18.5Z"})));case"notifications":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M7 11C7 9.90625 7.875 9 9 9H21C22.0938 9 23 9.90625 23 11V19C23 20.125 22.0938 21 21 21H9C7.875 21 7 20.125 7 19V11ZM8.5 11V11.7188L13.875 16.125C14.5312 16.6562 15.4375 16.6562 16.0938 16.125L21.5 11.7188V11C21.5 10.75 21.25 10.5 21 10.5H9C8.71875 10.5 8.5 10.75 8.5 11ZM8.5 13.6562V19C8.5 19.2812 8.71875 19.5 9 19.5H21C21.25 19.5 21.5 19.2812 21.5 19V13.6562L17.0625 17.2812C15.8438 18.2812 14.125 18.2812 12.9062 17.2812L8.5 13.6562Z"})));case"integrations":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M12.5 9.5H9.5V12.5H12.5V9.5ZM9.5 8H12.5C13.3125 8 14 8.6875 14 9.5V12.5C14 13.3438 13.3125 14 12.5 14H9.5C8.65625 14 8 13.3438 8 12.5V9.5C8 8.6875 8.65625 8 9.5 8ZM12.5 17.5H9.5V20.5H12.5V17.5ZM9.5 16H12.5C13.3125 16 14 16.6875 14 17.5V20.5C14 21.3438 13.3125 22 12.5 22H9.5C8.65625 22 8 21.3438 8 20.5V17.5C8 16.6875 8.65625 16 9.5 16ZM17.5 9.5V12.5H20.5V9.5H17.5ZM16 9.5C16 8.6875 16.6562 8 17.5 8H20.5C21.3125 8 22 8.6875 22 9.5V12.5C22 13.3438 21.3125 14 20.5 14H17.5C16.6562 14 16 13.3438 16 12.5V9.5ZM19 15.5C19.4062 15.5 19.75 15.8438 19.75 16.25V18.25H21.75C22.1562 18.25 22.5 18.5938 22.5 19C22.5 19.4375 22.1562 19.75 21.75 19.75H19.75V21.75C19.75 22.1875 19.4062 22.5 19 22.5C18.5625 22.5 18.25 22.1875 18.25 21.75V19.75H16.25C15.8125 19.75 15.5 19.4375 15.5 19C15.5 18.5938 15.8125 18.25 16.25 18.25H18.25V16.25C18.25 15.8438 18.5625 15.5 19 15.5Z"})));case"settings":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M15 7C15.5312 7 16.0312 7.0625 16.5312 7.15625C16.7812 7.21875 17.2188 7.34375 17.4688 7.78125C17.5312 7.90625 17.5625 8.03125 17.5938 8.15625L17.9062 9.375C17.9375 9.53125 18.25 9.71875 18.4375 9.65625L19.625 9.3125C19.75 9.28125 19.875 9.25 20 9.25C20.5 9.25 20.8438 9.5625 21 9.75C21.6875 10.5312 22.2188 11.4375 22.5625 12.4375C22.6562 12.6875 22.75 13.125 22.4688 13.5312C22.4062 13.6562 22.3125 13.75 22.2188 13.8438L21.3438 14.7188C21.1875 14.8438 21.1875 15.1875 21.3438 15.3125L22.2188 16.1875C22.3125 16.2812 22.4062 16.375 22.4688 16.5C22.7188 16.9062 22.625 17.3438 22.5625 17.5938C22.2188 18.5938 21.6875 19.5 21 20.2812C20.8438 20.4688 20.5 20.7812 20 20.7812C19.875 20.7812 19.75 20.75 19.625 20.7188L18.4375 20.3438C18.25 20.3125 17.9375 20.4688 17.9062 20.6562L17.5938 21.875C17.5625 22 17.5312 22.125 17.4688 22.25C17.2188 22.6875 16.7812 22.8125 16.5312 22.875C16.0312 22.9688 15.5312 23 15 23C14.4688 23 13.9375 22.9688 13.4375 22.875C13.1875 22.8125 12.75 22.6875 12.5 22.25C12.4375 22.125 12.4062 22 12.375 21.875L12.0625 20.6562C12.0312 20.4688 11.7188 20.3125 11.5625 20.3438L10.375 20.7188C10.25 20.75 10.0938 20.75 9.96875 20.7812C9.46875 20.7812 9.125 20.4688 8.96875 20.2812C8.28125 19.5 7.75 18.5938 7.40625 17.5938C7.34375 17.3438 7.25 16.9062 7.5 16.4688C7.5625 16.375 7.65625 16.25 7.75 16.1562L8.65625 15.3125C8.78125 15.1875 8.78125 14.8438 8.65625 14.7188L7.75 13.8438C7.65625 13.75 7.5625 13.6562 7.5 13.5312C7.25 13.125 7.34375 12.6875 7.40625 12.4375C7.75 11.4375 8.28125 10.5312 8.96875 9.75C9.125 9.5625 9.46875 9.25 9.96875 9.25C10.0938 9.25 10.25 9.28125 10.375 9.3125L11.5625 9.65625C11.7188 9.71875 12.0312 9.53125 12.0625 9.375L12.375 8.15625C12.4062 8.03125 12.4375 7.90625 12.5 7.78125C12.75 7.34375 13.1875 7.21875 13.4375 7.15625C13.9375 7.0625 14.4688 7 15 7ZM13.8125 8.625L13.5312 9.71875C13.2812 10.7188 12.125 11.4062 11.125 11.125L10.0312 10.7812C9.53125 11.4062 9.125 12.0938 8.84375 12.8438L9.6875 13.625C10.4375 14.3438 10.4375 15.6875 9.6875 16.4062L8.84375 17.1875C9.125 17.9375 9.53125 18.625 10.0312 19.25L11.125 18.9062C12.125 18.625 13.2812 19.3125 13.5312 20.3125L13.8125 21.4062C14.5625 21.5625 15.4062 21.5625 16.1875 21.4062L16.4375 20.3125C16.6875 19.3125 17.8438 18.625 18.8438 18.9062L19.9375 19.25C20.4375 18.625 20.8438 17.9375 21.125 17.1875L20.3125 16.4062C19.5625 15.6875 19.5625 14.3438 20.3125 13.625L21.125 12.8438C20.8438 12.0938 20.4375 11.4062 19.9375 10.7812L18.8438 11.125C17.875 11.4062 16.6875 10.7188 16.4375 9.71875L16.1875 8.625C15.4062 8.46875 14.5625 8.46875 13.8125 8.625ZM13.5 15C13.5 15.5625 13.7812 16.0312 14.25 16.3125C14.6875 16.5938 15.2812 16.5938 15.75 16.3125C16.1875 16.0312 16.5 15.5625 16.5 15C16.5 14.4688 16.1875 14 15.75 13.7188C15.2812 13.4375 14.6875 13.4375 14.25 13.7188C13.7812 14 13.5 14.4688 13.5 15ZM15 18C13.9062 18 12.9375 17.4375 12.375 16.5C11.8438 15.5938 11.8438 14.4375 12.375 13.5C12.9375 12.5938 13.9062 12 15 12C16.0625 12 17.0312 12.5938 17.5938 13.5C18.125 14.4375 18.125 15.5938 17.5938 16.5C17.0312 17.4375 16.0625 18 15 18Z"})));case"abandonment":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M6 8.3125C6 7.59375 6.5625 7 7.28125 7H20.6562C21.4062 7 22 7.59375 22 8.34375C22 8.59375 21.9062 8.875 21.7188 9.09375L18.8438 13.0625C17.875 13.1562 17 13.5312 16.25 14.0625L20.3125 8.5H7.71875L12.8125 14.7812C12.9375 14.9375 13 15.0938 13 15.25V17.4062L14 18.1875C14 18.3125 14 18.4062 14 18.5C14 19.1562 14.0938 19.7812 14.3125 20.375L11.9688 18.5C11.6562 18.25 11.5 17.9062 11.5 17.5312V15.5312L6.28125 9.125C6.09375 8.90625 6 8.625 6 8.3125ZM19.5 14C21.0938 14 22.5625 14.875 23.375 16.25C24.1875 17.6562 24.1875 19.375 23.375 20.75C22.5625 22.1562 21.0938 23 19.5 23C17.875 23 16.4062 22.1562 15.5938 20.75C14.7812 19.375 14.7812 17.6562 15.5938 16.25C16.4062 14.875 17.875 14 19.5 14ZM21.3438 17.375C21.5312 17.1875 21.5312 16.8438 21.3438 16.6562C21.1562 16.4688 20.8125 16.4688 20.625 16.6562L19.5 17.8125L18.3438 16.6562C18.1562 16.4688 17.8125 16.4688 17.625 16.6562C17.4375 16.8438 17.4375 17.1875 17.625 17.375L18.7812 18.5L17.625 19.6562C17.4375 19.8438 17.4375 20.1875 17.625 20.375C17.8125 20.5625 18.1562 20.5625 18.3438 20.375L19.5 19.2188L20.625 20.375C20.8125 20.5625 21.1562 20.5625 21.3438 20.375C21.5312 20.1875 21.5312 19.8438 21.3438 19.6562L20.1875 18.5L21.3438 17.375Z"})));case"leads":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M7 9.9375C7 9.40625 7.40625 9 7.9375 9H22.0625C22.5938 9 23 9.40625 23 9.9375C23 10.1875 22.9062 10.4062 22.7188 10.5938L17.5 15.8125V22.0625C17.5 22.5938 17.0938 23 16.5625 23C16.3125 23 16.0938 22.9062 15.9062 22.7188L12.7188 19.5312C12.5938 19.4062 12.5 19.1875 12.5 19V15.8125L7.28125 10.5938C7.09375 10.4062 7 10.1875 7 9.9375ZM9.3125 10.5L13.7812 14.9688C13.9375 15.125 14 15.3125 14 15.5V18.6875L16 20.6875V15.5C16 15.3125 16.0938 15.125 16.2188 14.9688L20.6875 10.5H9.3125Z"})));case"questions":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M21.5 15C21.5 11.4062 18.5938 8.5 15 8.5C11.4062 8.5 8.5 11.4062 8.5 15C8.5 18.5938 11.4062 21.5 15 21.5C18.5938 21.5 21.5 18.5938 21.5 15ZM7 15C7 10.5938 10.5938 7 15 7C19.4062 7 23 10.5938 23 15C23 19.4062 19.4062 23 15 23C10.5938 23 7 19.4062 7 15ZM15 12.5C14.4375 12.5 14 12.9375 14 13.5C14 13.9062 13.6562 14.25 13.25 14.25C12.8438 14.25 12.5 13.9062 12.5 13.5C12.5 12.125 13.625 11 15 11C16.375 11 17.5 12.125 17.5 13.5C17.5 14.9688 16.375 15.5938 15.75 15.8438V15.9375C15.75 16.375 15.4062 16.6875 15 16.6875C14.5938 16.6875 14.25 16.375 14.25 15.9375V15.6875C14.25 15.0625 14.7188 14.5938 15.1875 14.4375C15.4062 14.375 15.5938 14.2812 15.75 14.125C15.9062 14 16 13.8125 16 13.5C16 12.9375 15.5625 12.5 15 12.5ZM14 18.5C14 17.9375 14.4375 17.5 15 17.5C15.5625 17.5 16 17.9375 16 18.5C16 19.0625 15.5625 19.5 15 19.5C14.4375 19.5 14 19.0625 14 18.5Z"})));case"personalities":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M14.5938 18.5H13C11.7812 18.5 10.7812 19.375 10.5625 20.5C11.5625 21.1562 12.75 21.5 14 21.5C14.2812 21.5 14.5625 21.5 14.8125 21.4375C15 21.9688 15.25 22.4375 15.5312 22.8438C15.0312 22.9375 14.5312 23 14 23C9.59375 23 6 19.4062 6 15C6 10.5938 9.59375 7 14 7C17.9688 7 21.25 9.875 21.9062 13.6562C21.4375 13.5625 20.9688 13.5 20.5 13.5C20.4375 13.5 20.375 13.5 20.3438 13.5C19.6562 10.625 17.0938 8.5 14 8.5C10.4062 8.5 7.5 11.4062 7.5 15C7.5 16.75 8.1875 18.3125 9.3125 19.5C9.90625 18.0312 11.3438 17 13 17H15H15.0625C14.8438 17.4688 14.6875 17.9688 14.5938 18.5ZM14 14.5C14.6875 14.5 15.25 13.9375 15.25 13.25C15.25 12.5625 14.6875 12 14 12C13.3125 12 12.75 12.5625 12.75 13.25C12.75 13.9375 13.3125 14.5 14 14.5ZM11.25 13.25C11.25 11.7188 12.4688 10.5 14 10.5C15.5312 10.5 16.75 11.7188 16.75 13.25C16.75 14.7812 15.5312 16 14 16C12.4688 16 11.25 14.7812 11.25 13.25ZM20.5 24C18 24 16 22 16 19.5C16 17 18 15 20.5 15C23 15 25 17 25 19.5C25 22 23 24 20.5 24ZM20.5 20.875C20.1562 20.875 19.875 21.1562 19.875 21.5C19.875 21.8438 20.1562 22.125 20.5 22.125C20.8438 22.125 21.125 21.8438 21.125 21.5C21.125 21.1562 20.8438 20.875 20.5 20.875ZM20.5 17.75C20.9062 17.75 21.25 18.0938 21.25 18.5C21.25 18.7188 21.125 18.9375 20.9062 19.0312L20.5312 19.1875C20.2188 19.3438 20 19.6562 20 20C20 20.2812 20.2188 20.5 20.5 20.5C20.75 20.5 20.9688 20.3125 21 20.0938L21.3125 19.9375C21.875 19.6875 22.25 19.125 22.25 18.5C22.25 17.5312 21.4688 16.75 20.5 16.75C19.6562 16.75 18.9375 17.3438 18.7812 18.1562C18.7188 18.4375 18.9062 18.6875 19.1875 18.75C19.4375 18.8125 19.7188 18.625 19.7812 18.3438C19.8438 18 20.125 17.75 20.5 17.75Z"})));case"registration":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M14.5938 18.5H13C11.7812 18.5 10.7812 19.375 10.5625 20.5C11.5625 21.1562 12.75 21.5 14 21.5C14.2812 21.5 14.5625 21.5 14.8125 21.4375C15 21.9688 15.25 22.4375 15.5312 22.8438C15.0312 22.9375 14.5312 23 14 23C9.59375 23 6 19.4062 6 15C6 10.5938 9.59375 7 14 7C17.9688 7 21.25 9.875 21.9062 13.6562C21.4375 13.5625 20.9688 13.5 20.5 13.5C20.4375 13.5 20.375 13.5 20.3438 13.5C19.6562 10.625 17.0938 8.5 14 8.5C10.4062 8.5 7.5 11.4062 7.5 15C7.5 16.75 8.1875 18.3125 9.3125 19.5C9.90625 18.0312 11.3438 17 13 17H15H15.0625C14.8438 17.4688 14.6875 17.9688 14.5938 18.5ZM14 14.5C14.6875 14.5 15.25 13.9375 15.25 13.25C15.25 12.5625 14.6875 12 14 12C13.3125 12 12.75 12.5625 12.75 13.25C12.75 13.9375 13.3125 14.5 14 14.5ZM11.25 13.25C11.25 11.7188 12.4688 10.5 14 10.5C15.5312 10.5 16.75 11.7188 16.75 13.25C16.75 14.7812 15.5312 16 14 16C12.4688 16 11.25 14.7812 11.25 13.25ZM20.5 24C18 24 16 22 16 19.5C16 17 18 15 20.5 15C23 15 25 17 25 19.5C25 22 23 24 20.5 24ZM21 17.5C21 17.2188 20.7812 17 20.5 17C20.2188 17 20 17.2188 20 17.5V19H18.5C18.2188 19 18 19.2188 18 19.5C18 19.7812 18.2188 20 18.5 20H20V21.5C20 21.7812 20.2188 22 20.5 22C20.7812 22 21 21.7812 21 21.5V20H22.5C22.7812 20 23 19.7812 23 19.5C23 19.2188 22.7812 19 22.5 19H21V17.5Z"})));case"login":return d().createElement("span",{className:"forminator-navigation-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#666666",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M13.5312 19.7812C13.25 20.0625 12.7812 20.0625 12.4688 19.7812C12.1875 19.5 12.1875 19 12.4688 18.7188L15.4375 15.75H7.75C7.34375 15.75 7 15.4062 7 15C7 14.5938 7.34375 14.25 7.75 14.25H15.4375L12.4688 11.2812C12.1875 11 12.1875 10.5 12.4688 10.2188C12.75 9.9375 13.25 9.9375 13.5312 10.2188L17.7812 14.4688C18.0625 14.75 18.0625 15.25 17.7812 15.5312L13.5312 19.7812ZM17.75 9.5C17.3438 9.5 17 9.15625 17 8.75C17 8.34375 17.3438 8 17.75 8H20C21.6562 8 23 9.34375 23 11V19C23 20.6562 21.6562 22 20 22H17.75C17.3438 22 17 21.6562 17 21.25C17 20.8438 17.3438 20.5 17.75 20.5H20C20.8438 20.5 21.5 19.8438 21.5 19V11C21.5 10.1875 20.8438 9.5 20 9.5H17.75Z"})));default:return d().createElement("span",{className:"forminator-navigation-icon"})}}}class Ar extends ea.Component{constructor(e){super(e)}render(){return d().createElement("span",{className:"forminator-lock-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#9C9C9C",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M12.5 10V12H17.5V10C17.5 8.625 16.375 7.5 15 7.5C13.625 7.5 12.5 8.625 12.5 10ZM11 12V10C11 7.78125 12.7812 6 15 6C17.2188 6 19 7.78125 19 10V12C20.0938 12 21 12.9062 21 14V21C21 22.0938 20.0938 23 19 23H11C9.90625 23 9 22.0938 9 21V14C9 12.9062 9.90625 12 11 12ZM17.5 13.5H12.5H11C10.7188 13.5 10.5 13.7188 10.5 14V21C10.5 21.2812 10.7188 21.5 11 21.5H19C19.2812 21.5 19.5 21.2812 19.5 21V14C19.5 13.7188 19.2812 13.5 19 13.5H17.5Z"})))}}class Tr extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement("ul",{className:"sui-vertical-tabs sui-sidenav-sticky fui-sidenav"},d().createElement("li",{className:"sui-vertical-tab"},d().createElement(wr,{to:"/builder",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-fields"},d().createElement(Fr,{icon:"fields"}),d().createElement("span",{className:"forminator-navigation-title"},Na("Form Fields")))),d().createElement("li",{className:"sui-vertical-tab"},d().createElement(wr,{to:"/appearance",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-appearance"},d().createElement(Fr,{icon:"appearance"}),d().createElement("span",{className:"forminator-navigation-title"},Na("Appearance")),"pdf-form"!==this.props.formType&&d().createElement("span",{class:"forminator-navigation-right-arrow"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#888888",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M11.8281 8.60938C11.8698 8.56771 11.9115 8.53125 11.9531 8.5C12.0052 8.46875 12.0573 8.4375 12.1094 8.40625C12.1719 8.38542 12.2344 8.36979 12.2969 8.35938C12.3594 8.33854 12.4219 8.32812 12.4844 8.32812C12.5573 8.32812 12.625 8.33854 12.6875 8.35938C12.75 8.36979 12.8073 8.38542 12.8594 8.40625C12.9115 8.4375 12.9635 8.46875 13.0156 8.5C13.0677 8.53125 13.1146 8.56771 13.1562 8.60938L18.8594 14.3438C18.901 14.3854 18.9375 14.4323 18.9688 14.4844C19.0104 14.5365 19.0417 14.5885 19.0625 14.6406C19.0938 14.6927 19.1146 14.7552 19.125 14.8281C19.1354 14.8906 19.1406 14.9531 19.1406 15.0156C19.1406 15.0885 19.1354 15.1562 19.125 15.2188C19.1146 15.2812 19.0938 15.3385 19.0625 15.3906C19.0417 15.4531 19.0104 15.5104 18.9688 15.5625C18.9375 15.6042 18.901 15.6458 18.8594 15.6875L13.1406 21.4062C13.0573 21.4896 12.9583 21.5573 12.8438 21.6094C12.7396 21.651 12.625 21.6719 12.5 21.6719C12.4896 21.6719 12.4844 21.6719 12.4844 21.6719C12.4115 21.6719 12.3438 21.6667 12.2812 21.6562C12.2188 21.6354 12.1562 21.6146 12.0938 21.5938C12.0417 21.5729 11.9896 21.5469 11.9375 21.5156C11.8958 21.4844 11.8542 21.4479 11.8125 21.4062L11.125 20.7344C11.0833 20.6927 11.0469 20.6458 11.0156 20.5938C10.9844 20.5417 10.9583 20.4896 10.9375 20.4375C10.9062 20.3854 10.8854 20.3281 10.875 20.2656C10.8646 20.2031 10.8594 20.1354 10.8594 20.0625C10.8594 20 10.8646 19.9375 10.875 19.875C10.8854 19.8125 10.9062 19.7552 10.9375 19.7031C10.9583 19.6406 10.9844 19.5885 11.0156 19.5469C11.0469 19.4948 11.0833 19.4479 11.125 19.4062L15.5156 15L11.1406 10.625C11.099 10.5833 11.0625 10.5365 11.0312 10.4844C11 10.4323 10.974 10.3802 10.9531 10.3281C10.9219 10.2656 10.8958 10.2083 10.875 10.1562C10.8646 10.0938 10.8594 10.026 10.8594 9.95312C10.8594 9.88021 10.8646 9.8125 10.875 9.75C10.8854 9.6875 10.9062 9.63021 10.9375 9.57812C10.9583 9.52604 10.9844 9.47396 11.0156 9.42188C11.0469 9.36979 11.0885 9.32292 11.1406 9.28125L11.8125 8.60938H11.8281Z"}))))),"registration"===this.props.formType&&d().createElement("li",{className:"sui-vertical-tab"},d().createElement(wr,{to:"/registration",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-registration"},d().createElement(Fr,{icon:"registration"}),d().createElement("span",{className:"forminator-navigation-title"},Na("User Registration")))),"login"===this.props.formType&&d().createElement("li",{className:"sui-vertical-tab"},d().createElement(wr,{to:"/login",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-login"},d().createElement(Fr,{icon:"login"}),d().createElement("span",{className:"forminator-navigation-title"},Na("User Login")))),"pdf-form"!==this.props.formType&&d().createElement("li",{className:"sui-vertical-tab"},d().createElement(wr,{to:"/behaviour",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-behavior"},d().createElement(Fr,{icon:"behavior"}),d().createElement("span",{className:"forminator-navigation-title"},Na("Behavior")))),!forminatorData.addonsDisabled&&"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&d().createElement("li",{className:"sui-vertical-tab"},d().createElement(wr,{to:"/pdf",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-pdf"},d().createElement(Fr,{icon:"pdf"}),d().createElement("span",{className:"forminator-navigation-title"},Na("PDF")))),d().createElement("li",{className:"sui-vertical-tab"},"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&d().createElement(wr,{to:"/notifications",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-notifications"},d().createElement(Fr,{icon:"notifications"}),d().createElement("span",{className:"forminator-navigation-title"},Na("Email Notifications"))),"leads"===this.props.formType&&d().createElement(wr,{to:"#",className:e=>{let{isActive:t}=e;return(t?"current ":"")+"sui-tooltip sui-tooltip-top sui-tooltip-constrained forminator-disabled-menu-item"},style:{"--tooltip-width":"235px"},"data-tooltip":Na("You can configure email notifications on the parent quiz as it is shared between this form and the parent quiz."),id:"forminator-navigation-notifications"},d().createElement(Fr,{icon:"notifications"}),d().createElement("span",{className:"forminator-navigation-title"}," ",Na("Email Notifications")," "),d().createElement(Ar,null))),"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&!forminatorData.abandonmentDisabled&&d().createElement("li",{className:"sui-vertical-tab"},d().createElement(wr,{to:"/abandonment",className:e=>{let{isActive:t}=e;return t?"current":""}},d().createElement(Fr,{icon:"abandonment"}),d().createElement("span",{className:"forminator-navigation-title"},Na("Form Abandonment")))),d().createElement("li",{className:"sui-vertical-tab"},"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&d().createElement(wr,{to:"/integrations",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-integrations"},d().createElement(Fr,{icon:"integrations"}),d().createElement("span",{className:"forminator-navigation-title"},Na("Integrations"))),"leads"===this.props.formType&&d().createElement(wr,{to:"#",className:e=>{let{isActive:t}=e;return(t?"current ":"")+"sui-tooltip sui-tooltip-top sui-tooltip-constrained forminator-disabled-menu-item"},style:{"--tooltip-width":"235px"},"data-tooltip":Na("You can configure integrations on the parent quiz as it is shared between this form and the parent quiz."),id:"forminator-navigation-integrations"},d().createElement(Fr,{icon:"integrations"}),d().createElement("span",{className:"forminator-navigation-title"}," ",Na("Integrations")," "),d().createElement(Ar,null))),d().createElement("li",{className:"sui-vertical-tab"},"pdf-form"!==this.props.formType&&d().createElement(wr,{to:"/settings",className:e=>{let{isActive:t}=e;return t?"current":""},id:"forminator-navigation-settings"},d().createElement(Fr,{icon:"settings"}),d().createElement("span",{className:"forminator-navigation-title"},Na("Settings"))))))}}var Mr=Dr(Tr);var jr=ce(function(e){return{id:e.settings.form_id,title:e.settings.formName||"",formType:e.settings["form-type"]||"default"}},function(e){return{actions:{navigationActions:Ut(s,e),modalActions:Ut(t,e)}}})(function(e){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"forminator-sidenav-title sui-box-title"},Na("Customize Form")),d().createElement(Mr,e))});const Ur=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"UPDATE_FIELDS",wrappers:e})},Vr=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"UPDATE_FIELD",wrapper:e})},$r=(e,t)=>s=>{window.forminatorChanges.fields.push(t),window.forminatorChanges.settings=!0,Ba(!1),s({type:"UPDATE_FIELD",wrapper:e})},Ir=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"UPDATE_NOTIFICATIONS",notifications:e})},Rr=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"UPDATE_NOTIFICATION",notification:e})},Lr=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"UPDATE_BEHAVIORS",behaviors:e})},Br=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"UPDATE_BEHAVIOR",behavior:e})},zr=e=>t=>{window.forminatorChanges.settings=!0,Ba(!1),t({type:"UPDATE_INTEGRATION_CONDITIONS",conditions:e})};var Wr=r(8055),Hr=r.n(Wr);const qr=e=>t=>{var s,a,r;void 0!==(e=Hr()(e)).wrappers&&t(Ur(e.wrappers)),void 0!==e.settings&&t(ir(e.settings)),void 0!==e.notifications&&t(Ir(e.notifications)),void 0!==e.behaviorArray&&t(Lr(e.behaviorArray)),void 0!==e.integrationConditions&&t(zr(e.integrationConditions)),void 0!==e.answers&&t((s=e.answers,e=>{window.forminatorChanges.settings=!0,Ba(!1),e({type:"UPDATE_ANSWERS",answers:s})})),void 0!==e.questions&&t((a=e.questions,e=>{window.forminatorChanges.settings=!0,Ba(!1),e({type:"UPDATE_QUESTIONS",questions:a})})),void 0!==e.results&&t((r=e.results,e=>{window.forminatorChanges.settings=!0,Ba(!1),e({type:"UPDATE_RESULTS",results:r})})),window.forminatorChanges.settings=!1};function Qr(e,t){return function(){return e.apply(t,arguments)}}const{toString:Yr}=Object.prototype,{getPrototypeOf:Gr}=Object,{iterator:Kr,toStringTag:Jr}=Symbol,Zr=(Xr=Object.create(null),e=>{const t=Yr.call(e);return Xr[t]||(Xr[t]=t.slice(8,-1).toLowerCase())});var Xr;const ei=e=>(e=e.toLowerCase(),t=>Zr(t)===e),ti=e=>t=>typeof t===e,{isArray:si}=Array,ai=ti("undefined");function ri(e){return null!==e&&!ai(e)&&null!==e.constructor&&!ai(e.constructor)&&oi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ii=ei("ArrayBuffer");const ni=ti("string"),oi=ti("function"),li=ti("number"),pi=e=>null!==e&&"object"==typeof e,ci=e=>{if("object"!==Zr(e))return!1;const t=Gr(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Jr in e||Kr in e)},ui=ei("Date"),di=ei("File"),mi=ei("Blob"),hi=ei("FileList"),fi=ei("URLSearchParams"),[bi,gi,yi,Ei]=["ReadableStream","Request","Response","Headers"].map(ei);function vi(e,t,{allOwnKeys:s=!1}={}){if(null==e)return;let a,r;if("object"!=typeof e&&(e=[e]),si(e))for(a=0,r=e.length;a<r;a++)t.call(null,e[a],a,e);else{if(ri(e))return;const r=s?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let n;for(a=0;a<i;a++)n=r[a],t.call(null,e[n],n,e)}}function _i(e,t){if(ri(e))return null;t=t.toLowerCase();const s=Object.keys(e);let a,r=s.length;for(;r-- >0;)if(a=s[r],t===a.toLowerCase())return a;return null}const wi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,xi=e=>!ai(e)&&e!==wi;const Ni=(Ci="undefined"!=typeof Uint8Array&&Gr(Uint8Array),e=>Ci&&e instanceof Ci);var Ci;const ki=ei("HTMLFormElement"),Si=(({hasOwnProperty:e})=>(t,s)=>e.call(t,s))(Object.prototype),Pi=ei("RegExp"),Oi=(e,t)=>{const s=Object.getOwnPropertyDescriptors(e),a={};vi(s,(s,r)=>{let i;!1!==(i=t(s,r,e))&&(a[r]=i||s)}),Object.defineProperties(e,a)};const Di=ei("AsyncFunction"),Fi=(Ai="function"==typeof setImmediate,Ti=oi(wi.postMessage),Ai?setImmediate:Ti?(Mi=`axios@${Math.random()}`,ji=[],wi.addEventListener("message",({source:e,data:t})=>{e===wi&&t===Mi&&ji.length&&ji.shift()()},!1),e=>{ji.push(e),wi.postMessage(Mi,"*")}):e=>setTimeout(e));var Ai,Ti,Mi,ji;const Ui="undefined"!=typeof queueMicrotask?queueMicrotask.bind(wi):"undefined"!=typeof process&&process.nextTick||Fi;var Vi={isArray:si,isArrayBuffer:ii,isBuffer:ri,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||oi(e.append)&&("formdata"===(t=Zr(e))||"object"===t&&oi(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ii(e.buffer),t},isString:ni,isNumber:li,isBoolean:e=>!0===e||!1===e,isObject:pi,isPlainObject:ci,isEmptyObject:e=>{if(!pi(e)||ri(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:bi,isRequest:gi,isResponse:yi,isHeaders:Ei,isUndefined:ai,isDate:ui,isFile:di,isBlob:mi,isRegExp:Pi,isFunction:oi,isStream:e=>pi(e)&&oi(e.pipe),isURLSearchParams:fi,isTypedArray:Ni,isFileList:hi,forEach:vi,merge:function e(){const{caseless:t,skipUndefined:s}=xi(this)&&this||{},a={},r=(r,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const n=t&&_i(a,i)||i;ci(a[n])&&ci(r)?a[n]=e(a[n],r):ci(r)?a[n]=e({},r):si(r)?a[n]=r.slice():s&&ai(r)||(a[n]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&vi(arguments[e],r);return a},extend:(e,t,s,{allOwnKeys:a}={})=>(vi(t,(t,a)=>{s&&oi(t)?Object.defineProperty(e,a,{value:Qr(t,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,s,a)=>{e.prototype=Object.create(t.prototype,a),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),s&&Object.assign(e.prototype,s)},toFlatObject:(e,t,s,a)=>{let r,i,n;const o={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)n=r[i],a&&!a(n,e,t)||o[n]||(t[n]=e[n],o[n]=!0);e=!1!==s&&Gr(e)}while(e&&(!s||s(e,t))&&e!==Object.prototype);return t},kindOf:Zr,kindOfTest:ei,endsWith:(e,t,s)=>{e=String(e),(void 0===s||s>e.length)&&(s=e.length),s-=t.length;const a=e.indexOf(t,s);return-1!==a&&a===s},toArray:e=>{if(!e)return null;if(si(e))return e;let t=e.length;if(!li(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=e[t];return s},forEachEntry:(e,t)=>{const s=(e&&e[Kr]).call(e);let a;for(;(a=s.next())&&!a.done;){const s=a.value;t.call(e,s[0],s[1])}},matchAll:(e,t)=>{let s;const a=[];for(;null!==(s=e.exec(t));)a.push(s);return a},isHTMLForm:ki,hasOwnProperty:Si,hasOwnProp:Si,reduceDescriptors:Oi,freezeMethods:e=>{Oi(e,(t,s)=>{if(oi(e)&&-1!==["arguments","caller","callee"].indexOf(s))return!1;const a=e[s];oi(a)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")}))})},toObjectSet:(e,t)=>{const s={},a=e=>{e.forEach(e=>{s[e]=!0})};return si(e)?a(e):a(String(e).split(t)),s},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,s){return t.toUpperCase()+s}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_i,global:wi,isContextDefined:xi,isSpecCompliantForm:function(e){return!!(e&&oi(e.append)&&"FormData"===e[Jr]&&e[Kr])},toJSONObject:e=>{const t=new Array(10),s=(e,a)=>{if(pi(e)){if(t.indexOf(e)>=0)return;if(ri(e))return e;if(!("toJSON"in e)){t[a]=e;const r=si(e)?[]:{};return vi(e,(e,t)=>{const i=s(e,a+1);!ai(i)&&(r[t]=i)}),t[a]=void 0,r}}return e};return s(e,0)},isAsyncFn:Di,isThenable:e=>e&&(pi(e)||oi(e))&&oi(e.then)&&oi(e.catch),setImmediate:Fi,asap:Ui,isIterable:e=>null!=e&&oi(e[Kr])};class $i extends Error{static from(e,t,s,a,r,i){const n=new $i(e.message,t||e.code,s,a,r);return n.cause=e,n.name=e.name,i&&Object.assign(n,i),n}constructor(e,t,s,a,r){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),s&&(this.config=s),a&&(this.request=a),r&&(this.response=r,this.status=r.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Vi.toJSONObject(this.config),code:this.code,status:this.status}}}$i.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",$i.ERR_BAD_OPTION="ERR_BAD_OPTION",$i.ECONNABORTED="ECONNABORTED",$i.ETIMEDOUT="ETIMEDOUT",$i.ERR_NETWORK="ERR_NETWORK",$i.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",$i.ERR_DEPRECATED="ERR_DEPRECATED",$i.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",$i.ERR_BAD_REQUEST="ERR_BAD_REQUEST",$i.ERR_CANCELED="ERR_CANCELED",$i.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",$i.ERR_INVALID_URL="ERR_INVALID_URL";var Ii=$i;function Ri(e){return Vi.isPlainObject(e)||Vi.isArray(e)}function Li(e){return Vi.endsWith(e,"[]")?e.slice(0,-2):e}function Bi(e,t,s){return e?e.concat(t).map(function(e,t){return e=Li(e),!s&&t?"["+e+"]":e}).join(s?".":""):t}const zi=Vi.toFlatObject(Vi,{},null,function(e){return/^is[A-Z]/.test(e)});var Wi=function(e,t,s){if(!Vi.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const a=(s=Vi.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Vi.isUndefined(t[e])})).metaTokens,r=s.visitor||p,i=s.dots,n=s.indexes,o=(s.Blob||"undefined"!=typeof Blob&&Blob)&&Vi.isSpecCompliantForm(t);if(!Vi.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Vi.isDate(e))return e.toISOString();if(Vi.isBoolean(e))return e.toString();if(!o&&Vi.isBlob(e))throw new Ii("Blob is not supported. Use a Buffer instead.");return Vi.isArrayBuffer(e)||Vi.isTypedArray(e)?o&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function p(e,s,r){let o=e;if(e&&!r&&"object"==typeof e)if(Vi.endsWith(s,"{}"))s=a?s:s.slice(0,-2),e=JSON.stringify(e);else if(Vi.isArray(e)&&function(e){return Vi.isArray(e)&&!e.some(Ri)}(e)||(Vi.isFileList(e)||Vi.endsWith(s,"[]"))&&(o=Vi.toArray(e)))return s=Li(s),o.forEach(function(e,a){!Vi.isUndefined(e)&&null!==e&&t.append(!0===n?Bi([s],a,i):null===n?s:s+"[]",l(e))}),!1;return!!Ri(e)||(t.append(Bi(r,s,i),l(e)),!1)}const c=[],u=Object.assign(zi,{defaultVisitor:p,convertValue:l,isVisitable:Ri});if(!Vi.isObject(e))throw new TypeError("data must be an object");return function e(s,a){if(!Vi.isUndefined(s)){if(-1!==c.indexOf(s))throw Error("Circular reference detected in "+a.join("."));c.push(s),Vi.forEach(s,function(s,i){!0===(!(Vi.isUndefined(s)||null===s)&&r.call(t,s,Vi.isString(i)?i.trim():i,a,u))&&e(s,a?a.concat(i):[i])}),c.pop()}}(e),t};function Hi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function qi(e,t){this._pairs=[],e&&Wi(e,this,t)}const Qi=qi.prototype;Qi.append=function(e,t){this._pairs.push([e,t])},Qi.toString=function(e){const t=e?function(t){return e.call(this,t,Hi)}:Hi;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Yi=qi;function Gi(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ki(e,t,s){if(!t)return e;const a=s&&s.encode||Gi,r=Vi.isFunction(s)?{serialize:s}:s,i=r&&r.serialize;let n;if(n=i?i(t,r):Vi.isURLSearchParams(t)?t.toString():new Yi(t,r).toString(a),n){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}var Ji=class{constructor(){this.handlers=[]}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!s&&s.synchronous,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Vi.forEach(this.handlers,function(t){null!==t&&e(t)})}},Zi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Xi={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Yi,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const en="undefined"!=typeof window&&"undefined"!=typeof document,tn="object"==typeof navigator&&navigator||void 0,sn=en&&(!tn||["ReactNative","NativeScript","NS"].indexOf(tn.product)<0),an="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,rn=en&&window.location.href||"http://localhost";var nn={...p,...Xi};var on=function(e){function t(e,s,a,r){let i=e[r++];if("__proto__"===i)return!0;const n=Number.isFinite(+i),o=r>=e.length;if(i=!i&&Vi.isArray(a)?a.length:i,o)return Vi.hasOwnProp(a,i)?a[i]=[a[i],s]:a[i]=s,!n;a[i]&&Vi.isObject(a[i])||(a[i]=[]);return t(e,s,a[i],r)&&Vi.isArray(a[i])&&(a[i]=function(e){const t={},s=Object.keys(e);let a;const r=s.length;let i;for(a=0;a<r;a++)i=s[a],t[i]=e[i];return t}(a[i])),!n}if(Vi.isFormData(e)&&Vi.isFunction(e.entries)){const s={};return Vi.forEachEntry(e,(e,a)=>{t(function(e){return Vi.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),a,s,0)}),s}return null};const ln={transitional:Zi,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const s=t.getContentType()||"",a=s.indexOf("application/json")>-1,r=Vi.isObject(e);r&&Vi.isHTMLForm(e)&&(e=new FormData(e));if(Vi.isFormData(e))return a?JSON.stringify(on(e)):e;if(Vi.isArrayBuffer(e)||Vi.isBuffer(e)||Vi.isStream(e)||Vi.isFile(e)||Vi.isBlob(e)||Vi.isReadableStream(e))return e;if(Vi.isArrayBufferView(e))return e.buffer;if(Vi.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Wi(e,new nn.classes.URLSearchParams,{visitor:function(e,t,s,a){return nn.isNode&&Vi.isBuffer(e)?(this.append(t,e.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Vi.isFileList(e))||s.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Wi(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||a?(t.setContentType("application/json",!1),function(e,t,s){if(Vi.isString(e))try{return(t||JSON.parse)(e),Vi.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(s||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ln.transitional,s=t&&t.forcedJSONParsing,a="json"===this.responseType;if(Vi.isResponse(e)||Vi.isReadableStream(e))return e;if(e&&Vi.isString(e)&&(s&&!this.responseType||a)){const s=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e,this.parseReviver)}catch(e){if(s){if("SyntaxError"===e.name)throw Ii.from(e,Ii.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Vi.forEach(["delete","get","head","post","put","patch"],e=>{ln.headers[e]={}});var pn=ln;const cn=Vi.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const un=Symbol("internals");function dn(e){return e&&String(e).trim().toLowerCase()}function mn(e){return!1===e||null==e?e:Vi.isArray(e)?e.map(mn):String(e)}function hn(e,t,s,a,r){return Vi.isFunction(a)?a.call(this,t,s):(r&&(t=s),Vi.isString(t)?Vi.isString(a)?-1!==t.indexOf(a):Vi.isRegExp(a)?a.test(t):void 0:void 0)}class fn{constructor(e){e&&this.set(e)}set(e,t,s){const a=this;function r(e,t,s){const r=dn(t);if(!r)throw new Error("header name must be a non-empty string");const i=Vi.findKey(a,r);(!i||void 0===a[i]||!0===s||void 0===s&&!1!==a[i])&&(a[i||t]=mn(e))}const i=(e,t)=>Vi.forEach(e,(e,s)=>r(e,s,t));if(Vi.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Vi.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let s,a,r;return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),s=e.substring(0,r).trim().toLowerCase(),a=e.substring(r+1).trim(),!s||t[s]&&cn[s]||("set-cookie"===s?t[s]?t[s].push(a):t[s]=[a]:t[s]=t[s]?t[s]+", "+a:a)}),t})(e),t);else if(Vi.isObject(e)&&Vi.isIterable(e)){let s,a,r={};for(const t of e){if(!Vi.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[a=t[0]]=(s=r[a])?Vi.isArray(s)?[...s,t[1]]:[s,t[1]]:t[1]}i(r,t)}else null!=e&&r(t,e,s);return this}get(e,t){if(e=dn(e)){const s=Vi.findKey(this,e);if(s){const e=this[s];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=s.exec(e);)t[a[1]]=a[2];return t}(e);if(Vi.isFunction(t))return t.call(this,e,s);if(Vi.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=dn(e)){const s=Vi.findKey(this,e);return!(!s||void 0===this[s]||t&&!hn(0,this[s],s,t))}return!1}delete(e,t){const s=this;let a=!1;function r(e){if(e=dn(e)){const r=Vi.findKey(s,e);!r||t&&!hn(0,s[r],r,t)||(delete s[r],a=!0)}}return Vi.isArray(e)?e.forEach(r):r(e),a}clear(e){const t=Object.keys(this);let s=t.length,a=!1;for(;s--;){const r=t[s];e&&!hn(0,this[r],r,e,!0)||(delete this[r],a=!0)}return a}normalize(e){const t=this,s={};return Vi.forEach(this,(a,r)=>{const i=Vi.findKey(s,r);if(i)return t[i]=mn(a),void delete t[r];const n=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}(r):String(r).trim();n!==r&&delete t[r],t[n]=mn(a),s[n]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Vi.forEach(this,(s,a)=>{null!=s&&!1!==s&&(t[a]=e&&Vi.isArray(s)?s.join(", "):s)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const s=new this(e);return t.forEach(e=>s.set(e)),s}static accessor(e){const t=(this[un]=this[un]={accessors:{}}).accessors,s=this.prototype;function a(e){const a=dn(e);t[a]||(!function(e,t){const s=Vi.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+s,{value:function(e,s,r){return this[a].call(this,t,e,s,r)},configurable:!0})})}(s,e),t[a]=!0)}return Vi.isArray(e)?e.forEach(a):a(e),this}}fn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Vi.reduceDescriptors(fn.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[s]=e}}}),Vi.freezeMethods(fn);var bn=fn;function gn(e,t){const s=this||pn,a=t||s,r=bn.from(a.headers);let i=a.data;return Vi.forEach(e,function(e){i=e.call(s,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function yn(e){return!(!e||!e.__CANCEL__)}var En=class extends Ii{constructor(e,t,s){super(null==e?"canceled":e,Ii.ERR_CANCELED,t,s),this.name="CanceledError",this.__CANCEL__=!0}};function vn(e,t,s){const a=s.config.validateStatus;s.status&&a&&!a(s.status)?t(new Ii("Request failed with status code "+s.status,[Ii.ERR_BAD_REQUEST,Ii.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s)):e(s)}var _n=function(e,t){e=e||10;const s=new Array(e),a=new Array(e);let r,i=0,n=0;return t=void 0!==t?t:1e3,function(o){const l=Date.now(),p=a[n];r||(r=l),s[i]=o,a[i]=l;let c=n,u=0;for(;c!==i;)u+=s[c++],c%=e;if(i=(i+1)%e,i===n&&(n=(n+1)%e),l-r<t)return;const d=p&&l-p;return d?Math.round(1e3*u/d):void 0}};var wn=function(e,t){let s,a,r=0,i=1e3/t;const n=(t,i=Date.now())=>{r=i,s=null,a&&(clearTimeout(a),a=null),e(...t)};return[(...e)=>{const t=Date.now(),o=t-r;o>=i?n(e,t):(s=e,a||(a=setTimeout(()=>{a=null,n(s)},i-o)))},()=>s&&n(s)]};const xn=(e,t,s=3)=>{let a=0;const r=_n(50,250);return wn(s=>{const i=s.loaded,n=s.lengthComputable?s.total:void 0,o=i-a,l=r(o);a=i;e({loaded:i,total:n,progress:n?i/n:void 0,bytes:o,rate:l||void 0,estimated:l&&n&&i<=n?(n-i)/l:void 0,event:s,lengthComputable:null!=n,[t?"download":"upload"]:!0})},s)},Nn=(e,t)=>{const s=null!=e;return[a=>t[0]({lengthComputable:s,total:e,loaded:a}),t[1]]},Cn=e=>(...t)=>Vi.asap(()=>e(...t));var kn=nn.hasStandardBrowserEnv?((e,t)=>s=>(s=new URL(s,nn.origin),e.protocol===s.protocol&&e.host===s.host&&(t||e.port===s.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,Sn=nn.hasStandardBrowserEnv?{write(e,t,s,a,r,i,n){if("undefined"==typeof document)return;const o=[`${e}=${encodeURIComponent(t)}`];Vi.isNumber(s)&&o.push(`expires=${new Date(s).toUTCString()}`),Vi.isString(a)&&o.push(`path=${a}`),Vi.isString(r)&&o.push(`domain=${r}`),!0===i&&o.push("secure"),Vi.isString(n)&&o.push(`SameSite=${n}`),document.cookie=o.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Pn(e,t,s){let a=!("string"==typeof(r=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r));var r;return e&&(a||0==s)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const On=e=>e instanceof bn?{...e}:e;function Dn(e,t){t=t||{};const s={};function a(e,t,s,a){return Vi.isPlainObject(e)&&Vi.isPlainObject(t)?Vi.merge.call({caseless:a},e,t):Vi.isPlainObject(t)?Vi.merge({},t):Vi.isArray(t)?t.slice():t}function r(e,t,s,r){return Vi.isUndefined(t)?Vi.isUndefined(e)?void 0:a(void 0,e,0,r):a(e,t,0,r)}function i(e,t){if(!Vi.isUndefined(t))return a(void 0,t)}function n(e,t){return Vi.isUndefined(t)?Vi.isUndefined(e)?void 0:a(void 0,e):a(void 0,t)}function o(s,r,i){return i in t?a(s,r):i in e?a(void 0,s):void 0}const l={url:i,method:i,data:i,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:o,headers:(e,t,s)=>r(On(e),On(t),0,!0)};return Vi.forEach(Object.keys({...e,...t}),function(a){if("__proto__"===a||"constructor"===a||"prototype"===a)return;const i=Vi.hasOwnProp(l,a)?l[a]:r,n=i(e[a],t[a],a);Vi.isUndefined(n)&&i!==o||(s[a]=n)}),s}var Fn=e=>{const t=Dn({},e);let{data:s,withXSRFToken:a,xsrfHeaderName:r,xsrfCookieName:i,headers:n,auth:o}=t;if(t.headers=n=bn.from(n),t.url=Ki(Pn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&n.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),Vi.isFormData(s))if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if(Vi.isFunction(s.getHeaders)){const e=s.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,s])=>{t.includes(e.toLowerCase())&&n.set(e,s)})}if(nn.hasStandardBrowserEnv&&(a&&Vi.isFunction(a)&&(a=a(t)),a||!1!==a&&kn(t.url))){const e=r&&i&&Sn.read(i);e&&n.set(r,e)}return t};var An="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,s){const a=Fn(e);let r=a.data;const i=bn.from(a.headers).normalize();let n,o,l,p,c,{responseType:u,onUploadProgress:d,onDownloadProgress:m}=a;function h(){p&&p(),c&&c(),a.cancelToken&&a.cancelToken.unsubscribe(n),a.signal&&a.signal.removeEventListener("abort",n)}let f=new XMLHttpRequest;function b(){if(!f)return;const a=bn.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());vn(function(e){t(e),h()},function(e){s(e),h()},{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:a,config:e,request:f}),f=null}f.open(a.method.toUpperCase(),a.url,!0),f.timeout=a.timeout,"onloadend"in f?f.onloadend=b:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(b)},f.onabort=function(){f&&(s(new Ii("Request aborted",Ii.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const a=t&&t.message?t.message:"Network Error",r=new Ii(a,Ii.ERR_NETWORK,e,f);r.event=t||null,s(r),f=null},f.ontimeout=function(){let t=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const r=a.transitional||Zi;a.timeoutErrorMessage&&(t=a.timeoutErrorMessage),s(new Ii(t,r.clarifyTimeoutError?Ii.ETIMEDOUT:Ii.ECONNABORTED,e,f)),f=null},void 0===r&&i.setContentType(null),"setRequestHeader"in f&&Vi.forEach(i.toJSON(),function(e,t){f.setRequestHeader(t,e)}),Vi.isUndefined(a.withCredentials)||(f.withCredentials=!!a.withCredentials),u&&"json"!==u&&(f.responseType=a.responseType),m&&([l,c]=xn(m,!0),f.addEventListener("progress",l)),d&&f.upload&&([o,p]=xn(d),f.upload.addEventListener("progress",o),f.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(n=t=>{f&&(s(!t||t.type?new En(null,e,f):t),f.abort(),f=null)},a.cancelToken&&a.cancelToken.subscribe(n),a.signal&&(a.signal.aborted?n():a.signal.addEventListener("abort",n)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(a.url);g&&-1===nn.protocols.indexOf(g)?s(new Ii("Unsupported protocol "+g+":",Ii.ERR_BAD_REQUEST,e)):f.send(r||null)})};var Tn=(e,t)=>{const{length:s}=e=e?e.filter(Boolean):[];if(t||s){let s,a=new AbortController;const r=function(e){if(!s){s=!0,n();const t=e instanceof Error?e:this.reason;a.abort(t instanceof Ii?t:new En(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,r(new Ii(`timeout of ${t}ms exceeded`,Ii.ETIMEDOUT))},t);const n=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));const{signal:o}=a;return o.unsubscribe=()=>Vi.asap(n),o}};const Mn=function*(e,t){let s=e.byteLength;if(!t||s<t)return void(yield e);let a,r=0;for(;r<s;)a=r+t,yield e.slice(r,a),r=a},jn=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}},Un=(e,t,s,a)=>{const r=async function*(e,t){for await(const s of jn(e))yield*Mn(s,t)}(e,t);let i,n=0,o=e=>{i||(i=!0,a&&a(e))};return new ReadableStream({async pull(e){try{const{done:t,value:a}=await r.next();if(t)return o(),void e.close();let i=a.byteLength;if(s){let e=n+=i;s(e)}e.enqueue(new Uint8Array(a))}catch(e){throw o(e),e}},cancel(e){return o(e),r.return()}},{highWaterMark:2})},{isFunction:Vn}=Vi,$n=(({Request:e,Response:t})=>({Request:e,Response:t}))(Vi.global),{ReadableStream:In,TextEncoder:Rn}=Vi.global,Ln=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Bn=e=>{e=Vi.merge.call({skipUndefined:!0},$n,e);const{fetch:t,Request:s,Response:a}=e,r=t?Vn(t):"function"==typeof fetch,i=Vn(s),n=Vn(a);if(!r)return!1;const o=r&&Vn(In),l=r&&("function"==typeof Rn?(p=new Rn,e=>p.encode(e)):async e=>new Uint8Array(await new s(e).arrayBuffer()));var p;const c=i&&o&&Ln(()=>{let e=!1;const t=new s(nn.origin,{body:new In,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=n&&o&&Ln(()=>Vi.isReadableStream(new a("").body)),d={stream:u&&(e=>e.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,s)=>{let a=t&&t[e];if(a)return a.call(t);throw new Ii(`Response type '${e}' is not supported`,Ii.ERR_NOT_SUPPORT,s)})});const m=async(e,t)=>{const a=Vi.toFiniteNumber(e.getContentLength());return null==a?(async e=>{if(null==e)return 0;if(Vi.isBlob(e))return e.size;if(Vi.isSpecCompliantForm(e)){const t=new s(nn.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Vi.isArrayBufferView(e)||Vi.isArrayBuffer(e)?e.byteLength:(Vi.isURLSearchParams(e)&&(e+=""),Vi.isString(e)?(await l(e)).byteLength:void 0)})(t):a};return async e=>{let{url:r,method:n,data:o,signal:l,cancelToken:p,timeout:h,onDownloadProgress:f,onUploadProgress:b,responseType:g,headers:y,withCredentials:E="same-origin",fetchOptions:v}=Fn(e),_=t||fetch;g=g?(g+"").toLowerCase():"text";let w=Tn([l,p&&p.toAbortSignal()],h),x=null;const N=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let C;try{if(b&&c&&"get"!==n&&"head"!==n&&0!==(C=await m(y,o))){let e,t=new s(r,{method:"POST",body:o,duplex:"half"});if(Vi.isFormData(o)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,s]=Nn(C,xn(Cn(b)));o=Un(t.body,65536,e,s)}}Vi.isString(E)||(E=E?"include":"omit");const t=i&&"credentials"in s.prototype,l={...v,signal:w,method:n.toUpperCase(),headers:y.normalize().toJSON(),body:o,duplex:"half",credentials:t?E:void 0};x=i&&new s(r,l);let p=await(i?_(x,v):_(r,l));const h=u&&("stream"===g||"response"===g);if(u&&(f||h&&N)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=Vi.toFiniteNumber(p.headers.get("content-length")),[s,r]=f&&Nn(t,xn(Cn(f),!0))||[];p=new a(Un(p.body,65536,s,()=>{r&&r(),N&&N()}),e)}g=g||"text";let k=await d[Vi.findKey(d,g)||"text"](p,e);return!h&&N&&N(),await new Promise((t,s)=>{vn(t,s,{data:k,headers:bn.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:x})})}catch(t){if(N&&N(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Ii("Network Error",Ii.ERR_NETWORK,e,x,t&&t.response),{cause:t.cause||t});throw Ii.from(t,t&&t.code,e,x,t&&t.response)}}},zn=new Map,Wn=e=>{let t=e&&e.env||{};const{fetch:s,Request:a,Response:r}=t,i=[a,r,s];let n,o,l=i.length,p=zn;for(;l--;)n=i[l],o=p.get(n),void 0===o&&p.set(n,o=l?new Map:Bn(t)),p=o;return o};Wn();const Hn={http:null,xhr:An,fetch:{get:Wn}};Vi.forEach(Hn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const qn=e=>`- ${e}`,Qn=e=>Vi.isFunction(e)||null===e||!1===e;var Yn={getAdapter:function(e,t){e=Vi.isArray(e)?e:[e];const{length:s}=e;let a,r;const i={};for(let n=0;n<s;n++){let s;if(a=e[n],r=a,!Qn(a)&&(r=Hn[(s=String(a)).toLowerCase()],void 0===r))throw new Ii(`Unknown adapter '${s}'`);if(r&&(Vi.isFunction(r)||(r=r.get(t))))break;i[s||"#"+n]=r}if(!r){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=s?e.length>1?"since :\n"+e.map(qn).join("\n"):" "+qn(e[0]):"as no adapter specified";throw new Ii("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r},adapters:Hn};function Gn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new En(null,e)}function Kn(e){Gn(e),e.headers=bn.from(e.headers),e.data=gn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Yn.getAdapter(e.adapter||pn.adapter,e)(e).then(function(t){return Gn(e),t.data=gn.call(e,e.transformResponse,t),t.headers=bn.from(t.headers),t},function(t){return yn(t)||(Gn(e),t&&t.response&&(t.response.data=gn.call(e,e.transformResponse,t.response),t.response.headers=bn.from(t.response.headers))),Promise.reject(t)})}const Jn="1.13.5",Zn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Zn[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Xn={};Zn.transitional=function(e,t,s){function a(e,t){return"[Axios v"+Jn+"] Transitional option '"+e+"'"+t+(s?". "+s:"")}return(s,r,i)=>{if(!1===e)throw new Ii(a(r," has been removed"+(t?" in "+t:"")),Ii.ERR_DEPRECATED);return t&&!Xn[r]&&(Xn[r]=!0,console.warn(a(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(s,r,i)}},Zn.spelling=function(e){return(t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};var eo={assertOptions:function(e,t,s){if("object"!=typeof e)throw new Ii("options must be an object",Ii.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let r=a.length;for(;r-- >0;){const i=a[r],n=t[i];if(n){const t=e[i],s=void 0===t||n(t,i,e);if(!0!==s)throw new Ii("option "+i+" must be "+s,Ii.ERR_BAD_OPTION_VALUE);continue}if(!0!==s)throw new Ii("Unknown option "+i,Ii.ERR_BAD_OPTION)}},validators:Zn};const to=eo.validators;class so{constructor(e){this.defaults=e||{},this.interceptors={request:new Ji,response:new Ji}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const s=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?s&&!String(e.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+s):e.stack=s}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Dn(this.defaults,t);const{transitional:s,paramsSerializer:a,headers:r}=t;void 0!==s&&eo.assertOptions(s,{silentJSONParsing:to.transitional(to.boolean),forcedJSONParsing:to.transitional(to.boolean),clarifyTimeoutError:to.transitional(to.boolean),legacyInterceptorReqResOrdering:to.transitional(to.boolean)},!1),null!=a&&(Vi.isFunction(a)?t.paramsSerializer={serialize:a}:eo.assertOptions(a,{encode:to.function,serialize:to.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),eo.assertOptions(t,{baseUrl:to.spelling("baseURL"),withXsrfToken:to.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=r&&Vi.merge(r.common,r[t.method]);r&&Vi.forEach(["delete","get","head","post","put","patch","common"],e=>{delete r[e]}),t.headers=bn.concat(i,r);const n=[];let o=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;o=o&&e.synchronous;const s=t.transitional||Zi;s&&s.legacyInterceptorReqResOrdering?n.unshift(e.fulfilled,e.rejected):n.push(e.fulfilled,e.rejected)});const l=[];let p;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,u=0;if(!o){const e=[Kn.bind(this),void 0];for(e.unshift(...n),e.push(...l),c=e.length,p=Promise.resolve(t);u<c;)p=p.then(e[u++],e[u++]);return p}c=n.length;let d=t;for(;u<c;){const e=n[u++],t=n[u++];try{d=e(d)}catch(e){t.call(this,e);break}}try{p=Kn.call(this,d)}catch(e){return Promise.reject(e)}for(u=0,c=l.length;u<c;)p=p.then(l[u++],l[u++]);return p}getUri(e){return Ki(Pn((e=Dn(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Vi.forEach(["delete","get","head","options"],function(e){so.prototype[e]=function(t,s){return this.request(Dn(s||{},{method:e,url:t,data:(s||{}).data}))}}),Vi.forEach(["post","put","patch"],function(e){function t(t){return function(s,a,r){return this.request(Dn(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}so.prototype[e]=t(),so.prototype[e+"Form"]=t(!0)});var ao=so;class ro{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const s=this;this.promise.then(e=>{if(!s._listeners)return;let t=s._listeners.length;for(;t-- >0;)s._listeners[t](e);s._listeners=null}),this.promise.then=e=>{let t;const a=new Promise(e=>{s.subscribe(e),t=e}).then(e);return a.cancel=function(){s.unsubscribe(t)},a},e(function(e,a,r){s.reason||(s.reason=new En(e,a,r),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ro(function(t){e=t}),cancel:e}}}var io=ro;const no={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(no).forEach(([e,t])=>{no[t]=e});var oo=no;const lo=function e(t){const s=new ao(t),a=Qr(ao.prototype.request,s);return Vi.extend(a,ao.prototype,s,{allOwnKeys:!0}),Vi.extend(a,s,null,{allOwnKeys:!0}),a.create=function(s){return e(Dn(t,s))},a}(pn);lo.Axios=ao,lo.CanceledError=En,lo.CancelToken=io,lo.isCancel=yn,lo.VERSION=Jn,lo.toFormData=Wi,lo.AxiosError=Ii,lo.Cancel=lo.CanceledError,lo.all=function(e){return Promise.all(e)},lo.spread=function(e){return function(t){return e.apply(null,t)}},lo.isAxiosError=function(e){return Vi.isObject(e)&&!0===e.isAxiosError},lo.mergeConfig=Dn,lo.AxiosHeaders=bn,lo.formToJSON=e=>on(Vi.isHTMLForm(e)?new FormData(e):e),lo.getAdapter=Yn.getAdapter,lo.HttpStatusCode=oo,lo.default=lo;var po=lo,co=r(5373),uo=r.n(co);class mo extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.openModal=this.openModal.bind(this),this.isPDF="pdf-form"===this.props.formType}closeModal(e){this.props.actions.modalActions.showModal({open:!1,title:Na("Preview")},"preview")}openModal(e){this.isPDF?Ra(window.location.href+"&form_type=pdf-form&forminator_action=pdf-preview&preview_nonce="+forminatorData.previewNonce):this.props.actions.modalActions.showModal({open:!0,title:"Preview",closeModal:this.closeModal},"preview")}render(){let e=this.props.disabled;return this.isPDF&&!Ia(forminatorData.pdfExtensionsEnabled)&&(e=!0),d().createElement("button",{id:"forminator-preview-button",className:"sui-button sui-button-ghost",accessKey:"p",onClick:this.openModal,disabled:e},d().createElement("i",{className:"sui-icon-eye","aria-hidden":"true"})," ",Na("Preview"))}}class ho extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.openModal=this.openModal.bind(this),this.groupId=_.isUndefined(this.props.group)?"":this.props.group,this.APIconnected=forminatorData.isHubConnected}closeModal(){this.props.actions.modalActions.showModal({open:!1},this.APIconnected?"savedTemplateModal":"savedTemplateProModal")}openModal(){this.props.actions.modalActions.showModal({open:!0,title:this.actionText,closeModal:this.closeModal,id:"save-template",activeElement:jQuery(document.activeElement),focusFirst:".modal-close-button"},this.APIconnected?"savedTemplateModal":"savedTemplateProModal")}render(){return d().createElement("button",{className:"forminator-save-to-cloud",onClick:this.openModal},d().createElement("span",{className:"sui-icon-upload-cloud"}),Na("Save to Cloud"))}}class fo extends ea.Component{constructor(e){super(e),this.isPDF="pdf-form"===this.props.formType,this.isModule="leads"!==this.props.formType&&!this.isPDF;const t={form:{shortcode:"forminator_form",type:"form",processAction:forminatorData.adminUrl+"admin.php?page=forminator-cform",processNonce:forminatorData.formProcessNonce,exportNonce:forminatorData.formExportNonce,submissions:forminatorData.adminUrl+"admin.php?page=forminator-entries&form_type=forminator_forms&form_id="+this.props.id,reports:forminatorData.adminUrl+"admin.php?page=forminator-reports&form_type=forminator_forms&form_id="+this.props.id,dropdownLabel:Na("Open form options"),documentation:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#forms"},poll:{shortcode:"forminator_poll",type:"poll",processAction:forminatorData.adminUrl+"admin.php?page=forminator-poll",processNonce:forminatorData.pollProcessNonce,exportNonce:forminatorData.pollExportNonce,submissions:forminatorData.adminUrl+"admin.php?page=forminator-entries&form_type=forminator_polls&form_id="+this.props.id,reports:forminatorData.adminUrl+"admin.php?page=forminator-reports&form_type=forminator_polls&form_id="+this.props.id,dropdownLabel:Na("Open poll options"),documentation:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#polls"},quiz:{shortcode:"forminator_quiz",type:"quiz",processAction:forminatorData.adminUrl+"admin.php?page=forminator-quiz",processNonce:forminatorData.quizProcessNonce,exportNonce:forminatorData.quizExportNonce,submissions:forminatorData.adminUrl+"admin.php?page=forminator-entries&form_type=forminator_quizzes&form_id="+this.props.id,reports:forminatorData.adminUrl+"admin.php?page=forminator-reports&form_type=forminator_quizzes&form_id="+this.props.id,dropdownLabel:Na("Open quiz options"),documentation:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#quizzes"}};this.copyToClipboard=this.copyToClipboard.bind(this),this.resetTrackingData=this.resetTrackingData.bind(this),this.data=t[this.props.moduleType]}copyToClipboard(){this.input.select(),document.execCommand("copy");new ta({type:"success",text:Na("Shortcode has been copied successfully."),time:4e3}).open()}resetTrackingData(){const e={action:"forminator_reset_tracking_data",_ajax_nonce:forminatorData.resetTrackingDataNonce,id:this.props.id};this.ajax=jQuery.post({url:forminatorData.ajaxUrl,type:"post",data:e}).done(function(e){if(e){const t=e.success?"success":"error",s=e.data||Na("Something went wrong.");new ta({type:t,text:s,time:4e3}).open()}})}closeModal(){this.props.actions.modalActions.showModal({open:!1},"publish")}render(){const{status:e,formType:t}=this.props,s="publish"===e,{saveLoading:a}=this.props.state,r=a&&"autosave"!==a,i=this.data.processAction+"&export=true&module_id="+this.props.id+"&exportnonce="+this.data.exportNonce+"&module_type="+this.data.type,n=this.data.processAction+"&delete=true&module_id="+this.props.id+"&nonce="+this.data.processNonce+"&module_type="+this.data.type,o="form"===this.data.type&&!forminatorData.cloudDisabled;return d().createElement(ea.Fragment,null,d().createElement("input",{type:"text",defaultValue:`[${this.data.shortcode} id="${this.props.id}"]`,id:"forminator-form-shortcode",style:{position:"absolute",top:"-1500px"},"aria-hidden":"true",ref:e=>this.input=e}),d().createElement("div",{className:this.props.hasLead?"sui-dropdown fui-dropdown-soon":"sui-dropdown"},d().createElement("button",{id:"forminator-more-option-dropdown",className:"sui-button sui-button-ghost sui-dropdown-anchor","aria-expanded":"false","aria-label":Na("More options")},d().createElement("i",{className:"sui-icon-more","aria-hidden":"true"})),d().createElement("ul",null,d().createElement("li",{id:"forminator-dropdown-create-new"},d().createElement("a",{className:"forminator-field-new",href:forminatorData.dashboardUrl+"&createnew="+this.props.moduleType},d().createElement("span",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Create New"))),d().createElement("li",{id:"forminator-dropdown-copy-shortcode",className:o?"":"forminator-more-option-group-ends"},d().createElement("button",{className:"forminator-field-edit",onClick:this.copyToClipboard},d().createElement("span",{className:"sui-icon-code","aria-hidden":"true"}),Na("Copy Shortcode"))),o&&d().createElement("li",{id:"forminator-dropdown-save-to-cloud",className:"forminator-more-option-group-ends"},d().createElement(ho,this.props)),d().createElement("li",{id:"forminator-dropdown-view-submission"},d().createElement("a",{className:"forminator-field-edit",href:this.data.submissions},d().createElement("span",{className:"sui-icon-community-people","aria-hidden":"true"}),Na("View Submissions"))),d().createElement("li",{id:"forminator-dropdown-view-report"},d().createElement("a",{className:"forminator-field-edit",href:this.data.reports},d().createElement("span",{className:"sui-icon-graph-line","aria-hidden":"true"}),Na("View Report"))),d().createElement("li",{id:"forminator-dropdown-reset-tracking",className:"forminator-more-option-group-ends"},d().createElement("a",{className:"forminator-field-edit",onClick:this.resetTrackingData},d().createElement("span",{className:"sui-icon-update","aria-hidden":"true"}),Na("Reset Tracking Data"))),s&&d().createElement("li",{id:"forminator-dropdown-unpublish"},d().createElement("button",{id:"forminator-module-draft",disabled:r,onClick:()=>{this.props.saveModule("draft")}},d().createElement("span",{className:"sui-icon-unpublish","aria-hidden":"true"}),Na("Unpublish"))),d().createElement("li",{id:"forminator-dropdown-duplicate"},d().createElement("form",{method:"post",action:this.data.processAction},d().createElement("input",{type:"hidden",name:"forminator_action",value:"clone"}),d().createElement("input",{type:"hidden",name:"id",value:this.props.id}),d().createElement("input",{type:"hidden",id:"forminatorNonce",name:"forminatorNonce",value:forminatorData.cloneNonce}),d().createElement("input",{type:"hidden",name:"forminatorRedirect",value:"false"}),this.props.hasLead&&d().createElement("button",{type:"submit",disabled:"disabled",className:"fui-button-with-tag sui-tooltip sui-tooltip-left sui-constrained","data-tooltip":Na("Duplicate isn't supported at the moment for the quizzes with lead capturing enabled.")},d().createElement("span",{className:"sui-icon-page-multiple","aria-hidden":"true"}),d().createElement("span",{className:"fui-button-label"},Na("Duplicate")),d().createElement("span",{className:"sui-tag sui-tag-blue sui-tag-sm"},Na("Coming soon"))),!this.props.hasLead&&d().createElement("button",{type:"submit"},d().createElement("span",{className:"sui-icon-page-multiple","aria-hidden":"true"}),Na("Duplicate")))),d().createElement("li",{id:"forminator-dropdown-export",className:"forminator-more-option-group-ends"},this.props.hasLead&&d().createElement("a",{href:"#",className:"fui-button-with-tag sui-tooltip sui-tooltip-left","data-tooltip":Na("Export isn't supported at the moment for the quizzes with lead capturing enabled.")},d().createElement("span",{className:"sui-icon-cloud-migration","aria-hidden":"true"}),d().createElement("span",{className:"fui-button-label"},Na("Export")),d().createElement("span",{className:"sui-tag sui-tag-blue sui-tag-sm"},Na("Coming soon"))),!this.props.hasLead&&d().createElement("a",{className:"forminator-field-edit",href:i},d().createElement("span",{className:"sui-icon-cloud-migration","aria-hidden":"true"}),Na("Export"))),forminatorData.showDocLink&&d().createElement("li",{id:"forminator-dropdown-documentation",className:"forminator-more-option-group-ends"},d().createElement("a",{className:"forminator-field-new",href:this.data.documentation,target:"_blank",rel:"noreferrer"},d().createElement("span",{className:"sui-icon-academy","aria-hidden":"true"}),Na("Documentation"))),d().createElement("li",{id:"forminator-dropdown-delete"},d().createElement("a",{className:"forminator-field-edit sui-option-red",href:n},d().createElement("span",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete"))))))}}function bo(){return bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},bo.apply(null,arguments)}class go extends ea.Component{constructor(e){super(e),this.saveModule=this.saveModule.bind(this),this.isPDF="pdf-form"===this.props.formType,this.isModule="leads"!==this.props.formType&&!this.isPDF}closeModal(){this.props.actions.modalActions.showModal({open:!1},"publish")}saveModule(e){const{status:t,title:s}=this.props;"temp"!==e&&_.isEmpty(s.trim())||(this.props.saveModule(e),this.isModule&&"publish"===e&&(_.isEmpty(t)||"draft"===t)&&this.props.actions.modalActions.showModal({open:!0,closeModal:this.closeModal},"publish"))}render(){const{status:e,formType:t}=this.props,s="publish"===e,a=s?"sui-tag-published":"sui-tag-draft",r=this.props.moduleType||"form",{saveLoading:i}=this.props.state,n=forminatorData.hasSavedChanges,o=forminatorData.autoSave&&"autosave"===i,l=i&&"autosave"!==i,p=this.props.changed.settings&&!o;let c="";switch(r){case"poll":c=Na("Poll Editor");break;case"quiz":c=Na("Quiz Editor");break;default:c=this.isPDF?Na("PDF Editor"):Na("Form Editor")}return d().createElement("div",{className:"sui-box-status"},d().createElement("div",{className:"forminator-header-title"},this.isPDF&&d().createElement("a",{id:"forminator-button-back-to-form",href:forminatorData.adminUrl+"admin.php?page=forminator-cform-wizard&id="+forminatorData.parent_form_id+"&gotosection=pdf",className:"sui-button sui-button-ghost sui-tooltip sui-tooltip-bottom","data-tooltip":Na("Back to form")},d().createElement(ea.Fragment,null,d().createElement("span",{className:"sui-icon-arrow-left","aria-hidden":"true"}))),forminatorData.showBranding?d().createElement("a",{className:"forminator-header-logo"+forminatorData.statusBarLogoClass,href:forminatorData.adminUrl+"admin.php?page=forminator"}):d().createElement("h1",{className:"sui-header-title"},c),d().createElement("div",{className:"sui-actions-left"},this.props.Title&&d().createElement(this.props.Title,this.props))),d().createElement("div",{className:"sui-status"},!this.isPDF&&d().createElement("div",{className:"sui-status-module"},d().createElement("span",{className:`sui-tag ${a}`},Na("publish"===e?"Live":"Draft"))),o&&d().createElement("div",{className:"sui-status-changes"},d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}),Na(s?"Auto-saving changes...":"Auto-saving...")),p&&d().createElement("div",{className:"sui-status-changes"},d().createElement("i",{className:"sui-icon-unpublish","aria-hidden":"true"}),l&&Na(s?"Saving changes...":"Saving..."),!l&&d().createElement("dfn",{className:"sui-tooltip sui-tooltip-constrained sui-tooltip-bottom","data-tooltip":Na("You’ve made changes that haven’t been saved yet. Click the Save icon to keep them.")},Na("Unsaved changes")),d().createElement("button",{id:"forminator-module-save",className:"sui-button sui-button-ghost sui-tooltip sui-tooltip-bottom"+(l?" sui-button-onload":""),"data-tooltip":Na("Save changes"),disabled:l,onClick:()=>{this.saveModule(s||!this.isModule?"temp":"draft")}},d().createElement("span",{className:"sui-loading-text"},d().createElement("span",{className:"sui-icon-save","aria-hidden":"true"})),d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))),!l&&!this.props.changed.settings&&!s&&this.props.changed.saved&&d().createElement("div",{className:"sui-status-changes"},d().createElement("i",{className:"sui-icon-check-tick","aria-hidden":"true"}),forminatorData.autoSave?Na("Autosaved"):Na("Saved")),!i&&n&&!p&&d().createElement("div",{className:"sui-status-changes"},d().createElement("i",{className:"sui-icon-check-tick","aria-hidden":"true"}),d().createElement("dfn",{className:"sui-tooltip sui-tooltip-constrained sui-tooltip-bottom","data-tooltip":`${Na("These changes are saved but not yet published.")}\n\t\t\t\t\t\t\t\t\t\t\t${Na("Click '%s' to make them live.",{args:[Na("Publish Changes")]})}`},forminatorData.autoSave?Na("Changes autosaved"):Na("Changes saved")),d().createElement("button",{id:"forminator-module-revert",className:"sui-button sui-button-ghost sui-tooltip sui-tooltip-bottom"+(l?" sui-button-onload":""),"data-tooltip":Na("Discard changes"),disabled:l,onClick:this.props.revertChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("span",{className:"sui-icon-undo","aria-hidden":"true"})),d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))),d().createElement("div",{className:"sui-actions"},d().createElement(mo,bo({},this.props,{disabled:l,formType:t})),d().createElement("button",{id:"forminator-module-publish",className:"sui-button sui-button-blue",disabled:l,onClick:()=>{this.saveModule("publish")}},d().createElement("span",{className:"sui-loading-text"},d().createElement("span",{className:"sui-icon-web-globe-world","aria-hidden":"true"}),d().createElement("span",{className:"button-text"},(()=>this.isModule?Na("publish"===e?"Publish Changes":"Publish"):Na("Publish Changes"))())),d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),"leads"!==t&&!this.isPDF&&d().createElement(fo,bo({},this.props,{moduleType:r,saveModule:this.saveModule}))))}}class yo extends ea.Component{constructor(e){super(e)}updateTitle(e){let t=e.currentTarget.value;this.props.actions.navigationActions.updateTitle(t)}render(){const{title:e}=this.props,t=_.isEmpty(e.trim()),s=t?"sui-form-field-error":"";let a={};return"leads"===this.props.formType&&(a={borderColor:"#ddd",backgroundColor:"#fafafa",color:"#666"}),d().createElement(ea.Fragment,null,d().createElement("div",{className:`sui-form-field ${s}`},d().createElement("label",{htmlFor:"forminator-set-title",id:"forminator-set-title-label",className:"sui-screen-reader-text"},Na("Name your form")),d().createElement("input",{type:"text",value:e,placeholder:Na("Give your form a name"),id:"forminator-set-title",className:"sui-form-control",style:a,"aria-labelledby":"forminator-set-title-label","aria-describedby":"forminator-set-title-message","aria-required":"true",accessKey:"t",onChange:e=>this.updateTitle(e),disabled:"leads"===this.props.formType}),d().createElement("p",{role:"alert",id:"forminator-set-title-message",className:"sui-error-message",style:{display:t?"block":"none",marginBottom:0}},t&&Na("Please, enter a valid name."))))}}function Eo(){return Eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Eo.apply(null,arguments)}function vo(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,a)}return s}function _o(e,t,s){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var a=s.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}class wo extends ea.Component{constructor(e){super(e),this.state={saveLoading:!1},this.saveModule=this.saveModule.bind(this),this.revertChanges=this.revertChanges.bind(this),this.openRevertModal=this.openRevertModal.bind(this),this.closeRevertModal=this.closeRevertModal.bind(this),this.autosaveModule=this.autosaveModule.bind(this)}componentDidMount(){const e=new URL(window.location.href),t=e.searchParams.get("ready-to-go");_.isUndefined(t)||"show"!==t||(e.searchParams.delete("ready-to-go"),window.history.replaceState(null,"",e.toString()),this.showReadyToGoModel())}componentDidUpdate(){forminatorData.autoSave&&this.props.changed.settings&&!this.state.saveLoading&&!window.forminatorChanges.saveAttempted&&this.autosaveModule()}saveModule(e){const{state:t}=this.props,{form_id:s,formName:a}=t.settings,r=_.isUndefined(a)?"":a,i=_.isUndefined(s)?-1:s;Ba(!0),this.setState({saveLoading:e});let n=e;"autosave"===e&&(n="publish"===this.props.status?"temp":"draft","pdf-form"===this.props.state.settings["form-type"]&&(n="temp"));const o=function(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?vo(Object(s),!0).forEach(function(t){_o(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):vo(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}({},t);delete o.modal;const l={action:"forminator_save_builder",_wpnonce:forminatorData.formNonce,formName:r,form_id:i,status:n,version:forminatorData.version,data:JSON.stringify(o)},p=za(e);setTimeout(()=>{this.save(l,n)},p)}revertChanges(){const{form_id:e}=this.props.state.settings;this.setState({saveLoading:"revert"});const t={action:"forminator_revert_builder",_wpnonce:forminatorData.formNonce,module_id:e,module_type:"form"};setTimeout(()=>{this.revert(t)},za())}openRevertModal(){this.props.actions.modalActions.showModal({open:!0,closeModal:this.closeRevertModal,confirmCallback:this.revertChanges,id:"revert-changes",activeElement:jQuery(document.activeElement),focusFirst:".sui-button-ghost"},"revert")}closeRevertModal(){this.props.actions.modalActions.showModal({open:!1},"revert")}autosaveModule(){this.saveModule("autosave")}showReadyToGoModel(){const e=this;e.props.actions.modalActions.showModal({open:!0,closeModal:t=>{e.props.actions.modalActions.showModal({open:!1},"shortcode")}},"shortcode")}revert(e){const t=this;po.post(forminatorData.ajaxUrl,uo().stringify(e)).then(e=>{if(e.data.success)forminatorData.originalSettings?(t.props.actions.moduleActions.revertAllChanges(forminatorData.originalSettings),forminatorData.currentForm=Hr()(forminatorData.originalSettings)):t.props.actions.settingsActions.saveBuilder("form_status",t.props.status),La(!1),Ba(!1);else{new ta({type:"error",text:Na("Something went wrong while reverting your form. Please try again.")}).open()}t.setState({saveLoading:!1})}).catch(e=>{new ta({type:"error",text:Na("Something went wrong while reverting your form. Please try again.")}).open(),console.log(e),t.setState({saveLoading:!1})})}save(e,t){const s=this,{status:a,state:r}=this.props;po.post(forminatorData.ajaxUrl,uo().stringify(e)).then(i=>{const n=ga("stripe",r.wrappers),o=!["pdf-form","leads"].includes(this.props.state?.settings?.["form-type"])&&"publish"===t&&(void 0===a||"draft"===a),l="temp"===t;if(i.data.success){if(this.reloadPageForSubscriptionPlans(n)){if(o){let e=window.location.href;return e+="&ready-to-go=show",void(window.location.href=e)}location.reload()}if(!l){const e=Hr()(s.props.state);e.settings.form_status=t,forminatorData.originalSettings=e}-1===e.form_id&&(this.props.actions.settingsActions.updateSetting("form_id",i.data.data),forminatorData.currentForm.settings.form_id=i.data.data,window.history.pushState({},"Edit Form",forminatorData.formEditUrl+"&id="+i.data.data)),this.props.actions.settingsActions.saveBuilder("form_status",t),o&&this.showReadyToGoModel(),La(l),Ba(!1)}else{o&&s.props.actions.modalActions.showModal({open:!1,closeModal:this.closeModal},"publish");let e=!1,t=Na("Something went wrong while saving your form. Please try again.");_.isUndefined(i.data.data)||"string"!=typeof i.data.data?_.isUndefined(i.data.data)||"object"!=typeof i.data.data||(_.isUndefined(i.data.data[0].code)||"forminator_stripe_authentication_error"!==i.data.data[0].code||(e=!0),_.isUndefined(i.data.data[0].message)||(t=i.data.data[0].message)):t=i.data.data;new ta({type:"error",text:t,dismiss:e}).open()}this.setState({saveLoading:!1})}).catch(e=>{new ta({type:"error",text:Na("Something went wrong while saving your form. Please try again.")}).open(),console.log(e),this.setState({savingLoading:!1})})}reloadPageForSubscriptionPlans(e){let t=!1;return e.map(e=>{const s="live"===(_.isUndefined(e.mode)?"test":e.mode)?"live_plan_id":"test_plan_id";_.isUndefined(e.payments)||e.payments.map(e=>{_.isUndefined(e.payment_method)||"subscription"!==e.payment_method||(_.isUndefined(e[s])||_.isEmpty(e[s]))&&(t=!0)})}),t&&(window.forminatorChanges={fields:[],settings:!1,saved:!0,saveAttempted:!1}),t}render(){return d().createElement(go,Eo({},this.props,{moduleType:"form",saveModule:this.saveModule,revertChanges:this.openRevertModal,state:this.state,formType:this.props.state.settings["form-type"],Title:yo}))}}var xo=ce(function(e){return{id:e.settings.form_id,status:e.settings.form_status,state:e,title:e.settings.formName||"",changed:window.forminatorChanges}},function(a){return{actions:{navigationActions:Ut(s,a),settingsActions:Ut(e,a),modalActions:Ut(t,a),moduleActions:Ut(l,a)}}})(wo);class No extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.openModal=this.openModal.bind(this),this.groupId=_.isUndefined(this.props.group)?"":this.props.group,this.actionText=this.groupId?Na("Add fields to group"):Na("Insert Form Fields")}closeModal(){this.props.actions.modalActions.showModal({open:!1,title:this.actionText,groupId:this.groupId},"insert-fields")}openModal(){this.props.actions.modalActions.showModal({open:!0,title:this.actionText,closeModal:this.closeModal,id:"insert-fields",groupId:this.groupId,activeElement:jQuery(document.activeElement),focusFirst:".modal-close-button"},"insert-fields")}render(){if("true"===this.props.header)return d().createElement("div",{className:"sui-box-header fui-builder-section--insert","data-testid":"forminator-insert-fields"},d().createElement("button",{className:"sui-button sui-button-blue forminator-open-insert-fields",onClick:this.openModal},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.actionText));let e;return 0!==this.props.wrappers.length||this.groupId||"pdf-form"===this.props.formType||(e=d().createElement(ea.Fragment,null,d().createElement("img",{src:forminatorData.pluginUrl+"assets/images/empty-state-icon.png",srcSet:forminatorData.pluginUrl+"assets/images/empty-state-icon.png 1x, "+forminatorData.pluginUrl+"assets/images/empty-state-icon@2x.png 2x",className:"sui-image sui-image-center fui-image"}),d().createElement("p",{className:"sui-block-content-center"},Na("You haven’t added any fields yet. Add form fields to get started.")))),d().createElement("div",{"data-testid":"forminator-insert-fields",className:"fui-builder-fields--footer"},e,d().createElement("button",{className:"sui-button sui-button-dashed forminator-open-insert-fields",onClick:this.openModal},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.actionText))}}function Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Co.apply(null,arguments)}class ko extends ea.Component{constructor(e){super(e),this.el=d().createRef(),this.cloneField=this.cloneField.bind(this),this.trashField=this.trashField.bind(this),this.deleteField=this.deleteField.bind(this),this.closeModal=this.closeModal.bind(this),this.closeDeleteField=this.closeDeleteField.bind(this),this.editSettings=this.editSettings.bind(this)}componentDidMount(){this.drops=[],this.drop=!1,this.lonerFields=["pdf-page-break","all-form-data","page-break"],this.$el=jQuery(this.el.current),this.$main=this.$el.closest("#forminator-builder-fields"),this.startDragDrop()}closeMenu(){jQuery(".sui-dropdown").removeClass("open")}deleteField(){if(this.closeMenu(),"page-break"===this.props.field.type)return this.trashField(),!1;this.props.actions.modalActions.showModal({open:!0,field:this.props.field,wrapper:this.props.wrapper,closeModal:this.closeDeleteField,trashField:this.trashField,id:"field-delete",activeElement:jQuery(document.activeElement).closest("ul").siblings(".sui-dropdown-anchor"),focusFirst:".sui-button-ghost.modal-close-button"},"delete")}closeDeleteField(){this.props.actions.modalActions.showModal({open:!1,field:this.props.field,wrapper:this.props.wrapper,closeModal:this.closeDeleteField,trashField:this.trashField},"delete")}trashFieldRecursively(e,t){let s=this.getWrappersWithoutCurrentField(t,e.element_id);return"group"===e.type&&s.filter(t=>t.parent_group===e.element_id).map(e=>{e.fields.map(e=>{s=this.trashFieldRecursively(e,s)})}),s}trashField(){const e=[...this.props.wrappers];let t=this.trashFieldRecursively(this.props.field,e).filter(e=>!_.isEmpty(e.fields));if(t=this.getWrappersFilterCondition(t),t=this.getPaymentFilterCondition(t),t=this.updateCols(t),this.closeMenu(),this.updateState(t),!_.isUndefined(this.props.notifications)&&!_.isEmpty(this.props.notifications)){const e=this.getNotificationFilterCondition(this.props.notifications);this.updateNotificationState(e)}}duplicateFieldRecursively(e,t,s){const a=na();_.isUndefined(s)&&(s="");let r=[],i=[...t];e.map(t=>{const n=(t=JSON.parse(JSON.stringify(t))).element_id,o=1===e.length?12:t.cols,l=function(e,t,s,a,r){const i=[...a,{fields:r=r||[]}],n=ma(e.type,i);return Object.assign(e,{element_id:e.type+"-"+n,formID:t,cols:s})}(t,a,o,i,r),p=l.element_id;s&&(l.parent_group=s),r=[...r,l],"group"===t.type&&this.props.wrappers.filter(e=>e.parent_group===n).reverse().map(e=>{i=this.duplicateFieldRecursively(e.fields,i,p)})});const n={wrapper_id:a,parent_group:s,fields:r},o=t.findIndex(e=>e.wrapper_id===this.props.wrapper.wrapper_id);return i=this.insertInPosition(i,o+1,n),i}cloneField(e){const t=jQuery(e.target).closest(".fui-builder-fields").closest(".ui-draggable").data("id"),s=this.duplicateFieldRecursively([this.props.field],[...this.props.wrappers],t);this.closeMenu(),this.updateState(s)}closeModal(e){this.props.actions.modalActions.showModal({open:!1,field:this.props.field,wrapper:this.props.wrapper},"field-settings")}editSettings(){if(this.closeMenu(),"pdf-page-break"===this.props.field.type)return!1;const e="page-break"===this.props.field.type?Qa(this.props):"{"+this.props.field.element_id+"}";this.props.actions.modalActions.showModal({labelledBy:"modal-title-field-settings",describedBy:"modal-desc-field-settings",open:!0,field:this.props.field,wrapper:this.props.wrapper,wrappers:this.props.wrappers,tag:e,closeModal:this.closeModal,isValid:!0,id:"field-settings",activeElement:jQuery(document.activeElement).closest("ul").siblings(".sui-dropdown-anchor"),focusFirst:".modal-close-button"},"field-settings")}startDragDrop(){this.$el.draggable({revert:!0,revertDuration:0,zIndex:100,helper:"clone",cancel:"",distance:10,appendTo:this.$main,start:jQuery.proxy(this.onDragStart,this),drag:jQuery.proxy(this.onDrag,this),stop:jQuery.proxy(this.onDragStop,this)})}onDragStart(e){this.setClasses(),this.createDropPoints(e.target.id)}onDrag(e){const t=[...this.drops].reduce((t,s)=>this.distToCenter(t,e)<this.distToCenter(s,e)?t:s);t?this.selectDropZone(t):(this.drop=!1,jQuery(".fui-drop-use").removeClass("fui-drop-use"))}distToCenter(e,t){return Math.abs(e.center.x-t.pageX)+Math.abs(e.center.y-t.pageY)}onDragStop(){this.updateOnDrop(),this.resetZones(),this.resetClasses()}setClasses(){this.$helper=jQuery(".ui-draggable-dragging"),this.$el.addClass("fui-drop-shadow"),this.$main.addClass("fui-form-builder--dragging"),this.$helper.css("width",this.$el.width()),jQuery(".fui-builder-form").each(function(){const e=jQuery(this);e.children().length||e.append(jQuery('<div class="fui-end-group fui-row"></div>'))})}resetClasses(){this.$el.removeClass("fui-drop-shadow"),this.$main.removeClass("fui-form-builder--dragging")}resetZones(){this.drops=[],this.drop=!1,jQuery(".fui-drop-view").remove(),jQuery(".fui-form-builder--drop-zone").remove(),jQuery(".fui-end-group").remove()}isPayPalWrapper(e){if(e.fields.length>1)return!1;if(1===e.fields.length){if("paypal"===e.fields[0].type)return!0}return!1}generateRandomID(e,t,s,a){const r=s+"-"+a+"-"+t;let i=!1,n=null;return"before"===a?(i=e.prev().hasClass("fui-drop"),n=e.prev(),e.prev().prev().hasClass("fui-drop")&&e.prev().prev().remove()):(i=e.next().hasClass("fui-drop"),n=e.next(),e.next().next().hasClass("fui-drop")&&e.next().next().remove()),i&&n.attr("id","forminator-drop-"+r),r}createDropPoints(e){let t,s,a=!1;this.lonerFields.forEach(t=>{e.includes(t)&&(a=!0)}),this.props.wrappers.forEach(t=>{let r=!1;if(["page-break","paypal","stripe","stripe-ocs","signature","captcha","postdata","group"].forEach(t=>{e.includes(t)&&(r=!0)}),t.parent_group&&r)return;const i=this.getEl(t.wrapper_id);if(!i.length)return;const n=this.getPosition(i);if(this.drops.push({id:this.generateRandomID(i,t.wrapper_id,"full","before"),top:n.top-50,bottom:n.center.y,left:n.left,right:n.right,type:"full",parent:t.parent_group,insert:["before",i],wrapper:t,is_me:!1}),_.size(t.fields)<4){if(a)return;t.fields.map(e=>{const a=this.getEl("field-"+e.element_id);if(!a.length)return;const i=this.getPosition(a),n=a.attr("id")===this.$el.attr("id");if(this.drops.push({id:this.generateRandomID(a,"field-"+e.element_id,"side-before","before"),top:i.top,bottom:i.bottom,left:i.left,right:i.left+i.width,type:"side-before",insert:["before",a],wrapper:t,field:e,is_me:n}),s=e,"group"===e.type&&!r){const s=jQuery("#field-"+e.element_id+" > div > div > div > .fui-builder-form").children().last(),a=this.getPosition(s);this.drops.push({id:this.generateRandomID(s,"field-"+e.element_id,"full","after"),top:a.center.y,bottom:a.bottom+65,left:a.left,right:a.right,type:"full",parent:e.element_id,insert:["after",s],wrapper:t,is_me:!1})}});const e=this.getEl("field-"+s.element_id),i=this.getPosition(e),n=e.attr("id")===this.$el.attr("id");this.drops.push({id:this.generateRandomID(e,"field-"+s.element_id,"side-after","after"),top:i.top,bottom:i.bottom,left:i.center.x,right:i.right+20,type:"side-after",insert:["after",e],wrapper:t,field:s,is_me:n})}}),this.drops=this.drops.filter(t=>_.isUndefined(t.wrapper.wrapper_id)||!this.getEl(t.wrapper.wrapper_id).closest("#"+e).length),t=this.props.wrappers.filter(e=>!e.parent_group).pop();const r=this.getEl(t.wrapper_id),i=this.getPosition(r);this.drops.push({id:this.generateRandomID(r,t.wrapper_id,"full","after"),top:i.center.y,bottom:i.bottom+65,left:i.left,right:i.right,type:"full",insert:["after",r],wrapper:t,is_me:!1}),this.renderDropPoints()}getCenterXY(e,t,s){const a=Math.round(e.top+s/2);return{x:Math.round(e.left+t/2),y:a}}renderDropPoints(){let e;this.drops.forEach(t=>{if(jQuery("#forminator-drop-"+t.id).length)e=jQuery("#forminator-drop-"+t.id);else switch(e=jQuery('<div id="forminator-drop-'+t.id+'" class="fui-drop fui-drop-'+t.type+'"></div>'),t.insert[0]){case"before":e.insertBefore(t.insert[1]);break;case"after":e.insertAfter(t.insert[1])}"full"===t.type||"inside"===t.type?e.css("width",t.right-t.left-20):"side-before"!==t.type&&"side-after"!==t.type||e.css("height",t.bottom-t.top-10),t.center=this.getCenterXY(e.offset(),parseFloat(e.css("width")),parseFloat(e.css("height")))})}getPosition(e){const t=e,s=t.offset();let a,r=parseFloat(t.css("width")),i=parseFloat(t.css("height"))-10,n=s.top,o=s.left-10,l=t.prev();const p=n+i,c=o+r,u=Math.round(n+i/2),d=Math.round(o+r/2);return this.isRow(t)?l.length>0&&(a=this.getPosition(l),n=a.center.y+20,i=u-n):l.length>0?(a=this.getPosition(l),o=a.center.x):r/=2,{width:r,height:i,top:n,bottom:p,left:o,right:c,center:{y:u,x:d}}}isRow(e){return!!e.hasClass("fui-row")}getEl(e){return jQuery("#"+e)}showDropsDebug(){{const e=Math.floor(Math.random()*(this.drops.length-1)),t=this.drops[e],s="2px solid #"+Math.floor(16777215*Math.random()).toString(16),a=jQuery('<div class="fui-drop-view"><span className="fui-drop-view-pos"></span></div>');a.css({top:t.top,left:t.left,width:t.right-t.left,height:t.bottom-t.top,border:s}),this.$main.append(a);const r=jQuery('<div class="fui-drop-view"><span className="fui-drop-view-pos"></span></div>');r.css({top:t.center.y,left:t.center.x,width:15,height:15,border:s,"background-color":"red"}),this.$main.append(r)}}selectDropZone(e){if(!_.isUndefined(e.field)&&_.includes(this.lonerFields,e.field.type))return;this.drop=e;const t=jQuery("#forminator-drop-"+e.id);jQuery(".fui-drop-use").removeClass("fui-drop-use"),t.addClass("fui-drop-use")}updateOnDrop(){if(_.isUndefined(this.drop.insert))return;if(_.includes(["page-break","paypal","stripe","stripe-ocs","signature","captcha","postdata","group"],this.props.field.type)&&(this.isWrapperDrop()&&!_.isUndefined(this.drop.parent)&&this.drop.parent.startsWith("group-")||!this.isWrapperDrop()&&this.drop.wrapper.parent_group))return;const e=this.drop.insert[0],t=this.drop.insert[1],s=[...this.props.wrappers],a=Object.assign({},this.props.field);if(a.parent_group=_.isUndefined(this.drop.parent)?_.isUndefined(this.drop.wrapper.parent_group)?"":this.drop.wrapper.parent_group:this.drop.parent,this.isWrapperDrop()){const r={wrapper_id:na(),parent_group:this.drop.parent,fields:[a]};let i=s.findIndex(e=>e.wrapper_id===t.attr("id"));"after"===e&&i++;let n=this.getWrappersWithoutCurrentField(s);n=this.insertInPosition(n,i,r).filter(e=>!_.isEmpty(e.fields)),n=this.updateCols(n),this.updateState(n)}else{const r=s.findIndex(e=>e.wrapper_id===this.drop.wrapper.wrapper_id);let i=this.getWrappersWithoutCurrentField(s),n=this.drop.wrapper.fields.findIndex(e=>e.element_id===t.data("id"));"after"===e&&n++;const o=this.drop.wrapper,l=this.insertInPosition(o.fields,n,a);o.fields=l,i=this.replaceInPosition(i,r,o).filter(e=>!_.isEmpty(e.fields)),i=this.updateCols(i),this.updateState(i)}}updateState(e){this.props.actions.builderActions.updateFields(e)}updateNotificationState(e){this.props.actions.notificationsActions.updateNotifications(e)}updateCols(e){return e.map(e=>{const t=12/e.fields.length;e.fields.map(e=>{e.cols=t})}),e}getWrappersWithoutCurrentField(e,t){return _.isUndefined(t)&&(t=this.props.field.element_id),e.map(e=>(e.fields=e.fields.filter(e=>e.element_id!==t),e))}getWrappersFilterCondition(e){return e.map(e=>(e.fields.map(e=>(e.conditions=_.filter(e.conditions,e=>e.element_id!==this.props.field.element_id),e)),e))}getNotificationFilterCondition(e){const t=e.map(e=>(e.conditions=_.filter(e.conditions,e=>e.element_id!==this.props.field.element_id),e));return t}getPaymentFilterCondition(e){return e.map(e=>(e.fields.map(e=>(_.isEmpty(e.payments)||e.payments.map(e=>(e.conditions=_.filter(e.conditions,e=>e.element_id!==this.props.field.element_id),e)),e)),e))}insertInPosition(e,t,s){return[...e.slice(0,t),s,...e.slice(t)]}replaceInPosition(e,t,s){return[...e.slice(0,t),s,...e.slice(t+1)]}isWrapperDrop(){return!!_.isUndefined(this.drop.field)}conditionMarkup(){const e=Pa(this.props.wrappers,null,{main_date_field:!0}),t="hide"===this.props.field.condition_action?Na("Hide"):Na("Show");if(_.isUndefined(this.props.field.conditions))return;const s=this.props.field.conditions[0];if(_.isUndefined(s))return;const a=_.filter(e,e=>e.element_id===s.element_id);if(_.isUndefined(a))return;if(_.isUndefined(a[0]))return;const r=a[0].label,i=Ma(s.rule,a.field_type),n=ka(a[0],s),o=this.props.field.conditions.length;let l="";return o-1>0&&(l="+ "+(o-1)+" "+Na("more condition(s)")),d().createElement("span",{className:"fui-builder-field-block-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${t} ${Na("if")} ${r} ${i} ${n} ${l}`},d().createElement("i",{className:"sui-icon-link","aria-hidden":"true"}))}draggableArea(e){const t=_.filter(this.props.wrappers,t=>t.parent_group===e),s=_.last(t);return d().createElement("div",{className:"fui-builder-fields"},d().createElement("div",{className:"fui-builder-form--wrap"},d().createElement("span",{className:"fui-swipe"},Na("Swipe"),d().createElement("i",{className:"sui-icon-finger-point","aria-hidden":"true"})),d().createElement("div",{className:"fui-builder-form"},t.map(t=>d().createElement(Po,Co({},this.props,{key:t.wrapper_id,wrapper:t,group:e,isLastItem:t.wrapper_id===s.wrapper_id}))))),d().createElement(No,Co({},this.props,{header:"false",group:e})))}isDeleteEnabled(){return!("login"===this.props.formType&&"password"===this.props.field.type&&da("password",this.props.wrappers)<2)&&("registration"!==this.props.formType&&"leads"!==this.props.formType||"email"!==this.props.field.type||!(da("email",this.props.wrappers)<2))}hasNewStripeType(){return this.props.wrappers.some(e=>e.fields&&e.fields.some(e=>"stripe-ocs"===e.type))}render(){const e=forminatorData.fields.find(e=>e.type===this.props.field.type),t=_.includes(this.props.changed.fields,this.props.field.element_id)?"fui-unsaved":"",s=this.conditionMarkup();let a;if("group"===this.props.field.type&&(a=this.draggableArea(this.props.field.element_id)),_.isUndefined(e))return d().createElement("div",null);const r="stripe"===this.props.field.type&&this.hasNewStripeType(),i="page-break"===this.props.field.type,n=Qa(this.props);return d().createElement("div",{id:`field-${this.props.field.element_id}`,className:`fui-col-${this.props.field.cols}`,ref:this.el,"data-id":this.props.field.element_id},d().createElement("div",Co({className:`fui-builder-field-block ${t}`},r&&{style:{backgroundColor:"unset"}},{"data-field":this.props.field.type}),d().createElement("div",Co({className:"fui-field--info"},!r&&{onClick:this.editSettings}),d().createElement("span",{className:"fui-field--move"},d().createElement("i",{className:"sui-icon-drag","aria-hidden":"true"})),!i&&d().createElement("span",{className:"fui-field--icon"},d().createElement("i",{className:e.icon,"aria-hidden":"true"})),d().createElement("span",{className:"fui-field--name"},i&&d().createElement("span",{className:"fui-field--border"},d().createElement("span",null)),this.props.field.field_label&&d().createElement(ea.Fragment,null,d().createElement("span",{className:"fui-field--label"},i?d().createElement("span",{className:"sui-tag"},Ha(this.props.field.field_label)):Ha(this.props.field.field_label),(Ua(this.props.field)||"stripe"===this.props.field.type||"stripe-ocs"===this.props.field.type)&&d().createElement("span",{className:"sui-error"},"*"),"stripe"===this.props.field.type&&d().createElement("span",Co({className:"sui-tag sui-tag-yellow sui-tag-sm "+(r?"sui-tooltip sui-tooltip-constrained":"")},r&&{style:{position:"absolute","--tooltip-width":"164px"}},{"data-tooltip":Na("Old Stripe field is being deprecated and only available for backward compatibility. You can delete this field if your form is working properly.")}),Na("Legacy")))),!this.props.field.field_label&&d().createElement(ea.Fragment,null,d().createElement("span",{className:"fui-field--label"},i?d().createElement("span",{className:"sui-tag"},n):this.props.field.field_name||e.name,Ua(this.props.field)&&d().createElement("span",{className:"sui-error"},"*"))),i&&d().createElement("span",{className:"fui-field--border"},d().createElement("span",null)))),d().createElement("div",{className:"fui-field--actions"},d().createElement("button",{onClick:this.deleteField,className:"sui-button-icon forminator-field-delete sui-tooltip","data-tooltip":Na("Delete field")},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Delete field"))),d().createElement("span",{className:"forminator-field-action-divider"}),d().createElement("div",{className:"sui-dropdown"},d().createElement("button",{className:"sui-button-icon sui-dropdown-anchor"},d().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Field options"))),d().createElement("ul",null,"pdf-page-break"!==this.props.field.type&&!r&&d().createElement("li",null,d().createElement("button",{className:"forminator-field-edit",onClick:this.editSettings},d().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}),Na("Edit Field"))),"stripe"!==this.props.field.type&&"stripe-ocs"!==this.props.field.type&&"paypal"!==this.props.field.type&&"password"!==this.props.field.type&&"captcha"!==this.props.field.type&&d().createElement("li",null,d().createElement("button",{className:"forminator-field-clone",onClick:this.cloneField},d().createElement("i",{className:"sui-icon-copy","aria-hidden":"true"}),Na("Duplicate"))),this.isDeleteEnabled()&&d().createElement("li",null,d().createElement("button",{className:"forminator-field-remove sui-option-red",onClick:this.deleteField},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")))))),!_.isUndefined(this.props.field.conditions)&&this.props.field.conditions.length>0&&d().createElement(ea.Fragment,null,s),!_.isUndefined(a)&&d().createElement(ea.Fragment,null,a)))}}function So(){return So=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},So.apply(null,arguments)}class Po extends ea.Component{constructor(e){super(e),this.state={hovered:!1},this.closeModal=this.closeModal.bind(this),this.openModal=this.openModal.bind(this),this.groupId=_.isUndefined(this.props.group)?"":this.props.group}closeModal(){this.props.actions.modalActions.showModal({open:!1},"insert-fields")}openModal(){this.props.actions.modalActions.showModal({open:!0,closeModal:this.closeModal,id:"insert-fields",groupId:this.groupId,activeElement:jQuery(`#${this.props.wrapper.wrapper_id}`),focusFirst:".modal-close-button",insertAfter:this.props.wrapper.wrapper_id},"insert-fields")}isPayPalWrapper(){if(this.props.wrapper.fields.length>1)return!1;if(1===this.props.wrapper.fields.length){if("paypal"===this.props.wrapper.fields[0].type)return!0}return!1}handleMouseEnter=()=>{this.setState({hovered:!0})};handleMouseLeave=()=>{this.setState({hovered:!1})};render(){const{hovered:e}=this.state;return d().createElement(ea.Fragment,null,d().createElement("div",{className:"fui-drop fui-drop-full"}),d().createElement("div",{id:`${this.props.wrapper.wrapper_id}`,className:"fui-row"+(this.props.isLastItem?" forminator-last-field":"")},this.props.wrapper.fields.map(e=>d().createElement(ko,So({key:e.element_id},this.props,{field:e})))),!this.props.isLastItem&&d().createElement("div",{className:"forminator-insert-field",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onClick:this.openModal},e&&d().createElement("span",{"data-tooltip":Na("Insert new field"),className:"sui-tooltip sui-tooltip-top"},d().createElement("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"#17A8E3",xmlns:"http://www.w3.org/2000/svg"},d().createElement("g",{filter:"url(#filter0_d_19453_4813)"},d().createElement("rect",{x:"7",y:"5",width:"20",height:"20",rx:"10"}),d().createElement("rect",{x:"7.5",y:"5.5",width:"19",height:"19",rx:"9.5"}),d().createElement("path",{d:"M17.9375 13.8125H20.5625C20.8203 13.8125 21.0391 13.9062 21.2188 14.0938C21.4062 14.2734 21.5 14.4922 21.5 14.75C21.5 15.0078 21.4062 15.2305 21.2188 15.418C21.0391 15.5977 20.8203 15.6875 20.5625 15.6875H17.9375V18.3125C17.9375 18.5703 17.8438 18.793 17.6562 18.9805C17.4766 19.1602 17.2578 19.25 17 19.25C16.7422 19.25 16.5195 19.1602 16.332 18.9805C16.1523 18.793 16.0625 18.5703 16.0625 18.3125V15.6875H13.4375C13.1797 15.6875 12.957 15.5977 12.7695 15.418C12.5898 15.2305 12.5 15.0078 12.5 14.75C12.5 14.4922 12.5898 14.2734 12.7695 14.0938C12.957 13.9062 13.1797 13.8125 13.4375 13.8125H16.0625V11.1875C16.0625 10.9297 16.1523 10.7109 16.332 10.5312C16.5195 10.3438 16.7422 10.25 17 10.25C17.2578 10.25 17.4766 10.3438 17.6562 10.5312C17.8438 10.7109 17.9375 10.9297 17.9375 11.1875V13.8125Z",fill:"white"})),d().createElement("defs",null,d().createElement("filter",{id:"filter0_d_19453_4813",x:"0",y:"0",width:"34",height:"34",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},d().createElement("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),d().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),d().createElement("feOffset",{dy:"2"}),d().createElement("feGaussianBlur",{stdDeviation:"3.5"}),d().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),d().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_19453_4813"}),d().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_19453_4813",result:"shape"})))))))}}function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Oo.apply(null,arguments)}class Do extends ea.Component{constructor(e){super(e)}render(){const e=_.filter(this.props.wrappers,e=>!e.parent_group),t=_.last(e);return d().createElement("div",{id:"forminator-builder-fields","data-testid":"forminator-builder-fields",className:"fui-builder-fields"},d().createElement("div",{className:"fui-builder-form--wrap"},d().createElement("span",{className:"fui-swipe"},Na("Swipe"),d().createElement("i",{className:"sui-icon-finger-point","aria-hidden":"true"})),d().createElement("div",{className:"fui-builder-form"},e.map(e=>d().createElement(Po,Oo({},this.props,{key:e.wrapper_id,wrapper:e,isLastItem:e.wrapper_id===t.wrapper_id}))))),d().createElement(No,Oo({},this.props,{header:"false"})))}}class Fo extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.editSettings=this.editSettings.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"pagination")}editSettings(){this.props.actions.modalActions.showModal({open:!0,closeModal:this.closeModal,id:"pagination-settings",activeElement:jQuery(document.activeElement),focusFirst:".modal-close-button"},"pagination")}render(){return d().createElement("div",{className:"sui-box-body fui-builder-section--pagination"},d().createElement("div",{className:"fui-builder-field-block fui-has-info","data-field":"pagination"},d().createElement("span",{className:"fui-info sui-tooltip sui-tooltip-top-left sui-tooltip-constrained",style:{"--tooltip-width":"275px"},"data-tooltip":Na("Since you are using Page Break field(s) to divide your form into multiple pages, use the pagination settings to customize the page label, progress indicator, and the buttons on each page.")},d().createElement("i",{className:"sui-icon-info","aria-hidden":"true"})),d().createElement("div",{className:"fui-field--info",onClick:this.editSettings},d().createElement("span",{className:"fui-field--icon"},d().createElement("i",{className:"sui-icon forminator-icon-pagination","aria-hidden":"true"})),d().createElement("span",{className:"fui-field--name"},d().createElement("span",{className:"fui-field--label"},Na("Pagination")))),d().createElement("div",{className:"fui-field--actions"},d().createElement("button",{className:"sui-button-icon sui-tooltip","data-tooltip":Na("Edit field"),onClick:this.editSettings},d().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"})))))}}class Ao extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.editSettings=this.editSettings.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"submit")}editSettings(){this.props.actions.modalActions.showModal({open:!0,closeModal:this.closeModal},"submit")}conditionMarkup(){const e=Pa(this.props.wrappers),t="hide"===this.props.submitData.condition_action?Na("Hide"):Na("Show");if(_.isUndefined(this.props.submitData.conditions))return;const s=this.props.submitData.conditions[0];if(_.isUndefined(s))return;const a=_.filter(e,e=>e.element_id===s.element_id);if(_.isUndefined(a)||_.isEmpty(a))return;const r=a[0].label,i=Ma(s.rule,a.field_type),n=ka(a[0],s),o=this.props.submitData.conditions.length;let l="";return o-1>0&&(l="+ "+(o-1)+" "+Na("more condition(s)")),d().createElement("span",{className:"fui-builder-field-block-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${t} ${Na("if")} ${r} ${i} ${n} ${l}`},d().createElement("i",{className:"sui-icon-link","aria-hidden":"true"}))}render(){const e=_.isUndefined(this.props.submitData["custom-submit-text"])?Na("Submit"):this.props.submitData["custom-submit-text"];return d().createElement("div",{className:"sui-box-body","data-testid":"forminator-submit"},d().createElement("div",{className:"fui-builder-field-block","data-field":"submit"},d().createElement("div",{className:"fui-field--info",onClick:this.editSettings},d().createElement("span",{className:"fui-field--icon"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"})),d().createElement("span",{className:"fui-field--name"},d().createElement("span",{className:"fui-field--label"},e))),d().createElement("div",{className:"fui-field--actions"},d().createElement("button",{className:"sui-button-icon sui-tooltip","aria-label":Na("Edit field"),"data-tooltip":Na("Edit field"),onClick:this.editSettings},d().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}))),!_.isUndefined(this.props.submitData)&&!_.isUndefined(this.props.submitData.conditions)&&this.props.submitData.conditions.length>0&&d().createElement(ea.Fragment,null,this.conditionMarkup())))}}class To extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.editSettings=this.editSettings.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"pageHeader")}editSettings(){this.props.actions.modalActions.showModal({open:!0,closeModal:this.closeModal},"pageHeader")}render(){const e=Na("Page Header");return d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"fui-builder-field-block","data-field":"submit"},d().createElement("div",{className:"fui-field--info",onClick:this.editSettings},d().createElement("span",{className:"fui-field--icon"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"})),d().createElement("span",{className:"fui-field--name"},d().createElement("span",{className:"fui-field--label"},e))),d().createElement("div",{className:"fui-field--actions"},d().createElement("button",{className:"sui-button-icon sui-tooltip","aria-label":Na("Edit field"),"data-tooltip":Na("Edit field"),onClick:this.editSettings},d().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"})))))}}class Mo extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.editSettings=this.editSettings.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"pageFooter")}editSettings(){this.props.actions.modalActions.showModal({open:!0,closeModal:this.closeModal},"pageFooter")}render(){const e=Na("Page Footer");return d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"fui-builder-field-block","data-field":"submit"},d().createElement("div",{className:"fui-field--info",onClick:this.editSettings},d().createElement("span",{className:"fui-field--icon"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"})),d().createElement("span",{className:"fui-field--name"},d().createElement("span",{className:"fui-field--label"},e))),d().createElement("div",{className:"fui-field--actions"},d().createElement("button",{className:"sui-button-icon sui-tooltip","aria-label":Na("Edit field"),"data-tooltip":Na("Edit field"),onClick:this.editSettings},d().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"})))))}}function jo(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,a)}return s}function Uo(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Vo(e,t){if(null==e)return{};var s,a,r=function(e,t){if(null==e)return{};var s,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)s=i[a],t.indexOf(s)>=0||(r[s]=e[s]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}var $o=["label","icon","iconRight","design","color","className","loading"],Io=function(e){var t=e.label,s=e.icon,a=e.iconRight,r=e.design,i=void 0===r?"solid":r,n=e.color,o=e.className,l=e.loading,p=Vo(e,$o),c=d().createElement("span",{className:"sui-icon-loader sui-loading",style:{position:"relative"},"aria-hidden":"true"}),u=d().createElement(d().Fragment,null,s&&!a&&""!==s&&d().createElement("span",{className:"sui-icon-"+s,"aria-hidden":"true"}),t,s&&a&&""!==s&&d().createElement("span",{className:"sui-icon-"+s,"aria-hidden":"true"}));switch(o="sui-button".concat(a?" sui-button-icon-right":"").concat(o?" "+o:""),n){case"blue":case"green":case"red":case"orange":case"purple":case"yellow":case"white":o+=" sui-button-"+n;break;default:o+=""}switch(i){case"ghost":case"outlined":o+=" sui-button-"+i;break;default:o+=""}l&&(o+=" sui-button-onload");var m="button";return p.href?m="a":p.htmlFor&&(m="label"),d().createElement(m,function(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?jo(Object(s),!0).forEach(function(t){Uo(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):jo(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}({className:o,disabled:p.disabled||l},p),l?c:u)};class Ro extends ea.Component{constructor(e){super(e),this.state={previousPage:{},nextPage:{}}}componentDidMount(){const e=jQuery("div.forminator-side-navigation a.current").not(".forminator-disabled-menu-item"),t=a(e,"prev");t&&this.setState({previousPage:{title:t.text(),url:t.attr("href")}});const s=a(e,"next");function a(e,t){let s="prev"===t?e.parent().prev():e.parent().next();for(;s.length;){if(!s.find("a.forminator-disabled-menu-item").length)return s.find("a").not(".forminator-disabled-menu-item");s="prev"===t?s.prev():s.next()}return null}s&&this.setState({nextPage:{title:s.text(),url:s.attr("href")}})}render(){const e=e=>{this.props.router.navigate(e)};return d().createElement("div",{className:"sui-box-footer"},!_.isUndefined(this.state.previousPage.url)&&d().createElement("button",{className:"sui-button",onClick:()=>e(this.state.previousPage.url)},d().createElement("span",{className:"sui-icon-arrow-left","aria-hidden":"true"}),this.state.previousPage.title),!_.isUndefined(this.state.nextPage.url)&&d().createElement("div",{className:"sui-actions-right"},d().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e(this.state.nextPage.url)},this.state.nextPage.title,d().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"}))))}}function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Lo.apply(null,arguments)}class Bo extends ea.Component{constructor(e){super(e),this.props.wrappers.map(e=>{""===e.parent_group||_.isEmpty(_.intersection(["page-break","paypal","stripe","stripe-ocs","signature","captcha","postdata","group"],_.map(e.fields,"type")))||(e.parent_group="")}),this.migrateStripe=this.migrateStripe.bind(this)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast");const e=()=>{document.body.classList.toggle("folded",window.innerWidth<=1250)};e(),window.addEventListener("resize",e)}migrateStripe(){window.location.href=window.location.href+"&migrate_stripe=true"}getStripeNotification(){const e=new URL(window.location.href);if(e.searchParams.get("migrate_stripe")){e.searchParams.delete("migrate_stripe"),window.history.replaceState(null,"",e.toString());new ta({type:"success",text:`<strong>${Na("Stripe field has been migrated successfully.")}</strong>\n\t\t\t\t${Na("Please review the updated settings of the new Stripe field below. If everything works fine, feel free to remove the old Stripe field.")}`,dismiss:!0}).open()}const t=this.props.wrappers.some(e=>e.fields&&e.fields.some(e=>"stripe"===e.type)),s=this.props.wrappers.some(e=>e.fields&&e.fields.some(e=>"stripe-ocs"===e.type));return t&&!s?d().createElement("div",{className:"sui-notice sui-notice-yellow"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("{{b}}Warning!{{/b}} You are using the Stripe simple Card Element which is being deprecated. To ensure seamless transaction, migrate to the new Stripe Payment Element field.",{components:{b:d().createElement("strong",null)}})),d().createElement("p",null,d().createElement(Io,{label:Na("Migrate to new Stripe field"),onClick:this.migrateStripe}))))):""}getPaymentMethodNotification(){const e=ga("stripe",this.props.wrappers),t=ga("paypal",this.props.wrappers),s=this;let a=!1;e.map(e=>{const t="live"===(_.isUndefined(e.mode)?"test":e.mode)?"live_plan_id":"test_plan_id",r=_.includes(s.props.changed.fields,e.element_id);_.isUndefined(e.payments)||r||e.payments.map(e=>{_.isUndefined(e.payment_method)||"subscription"!==e.payment_method||(_.isUndefined(e[t])||_.isEmpty(e[t]))&&(a=!0)})});const r=[];return e.length&&!forminatorData.hasStripe||t.length&&!forminatorData.hasPayPal?r.push(d().createElement(d().Fragment,null,d().createElement("p",null,Na("This form includes a Stripe or PayPal field that needs to be configured if you wish to accept payments through this form. To set it up, click the button below, or remove the payment field from the form.")),d().createElement("p",null,d().createElement("a",{className:"sui-button",href:forminatorData.settingsUrl+"&section=payments",target:"_blank",rel:"noreferrer"},Na("Set API keys"))))):e.length&&forminatorData.hasStripePro&&a&&r.push(d().createElement("p",null,Na("Product ID for the subscription plan on Stripe has not been created. {{link}}Verify your Stripe keys{{/link}} and click the {{b}}Update{{/b}} button on this form.",{components:{b:d().createElement("strong",null),link:d().createElement("a",{href:forminatorData.settingsUrl+"&section=payments",target:"_blank",rel:"noreferrer"})}}))),r.length?r.map(e=>d().createElement("div",{className:"sui-notice sui-notice-yellow"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),e)))):""}open_hub_connected(){let e="forminator-hub-connected-successfully-modal";jQuery("#"+e).length&&setTimeout(function(){SUI.openModal(e,this),jQuery("#"+e).removeAttr("id")},100)}render(){const e=ba("page-break",this.props.wrappers),t=this.getStripeNotification(),s=this.getPaymentMethodNotification();return this.open_hub_connected(),"pdf-form"!==this.props.formType&&function(e){const t=new URL(window.location.href);"success"===t.searchParams.get("create-status")&&(t.searchParams.delete("create-status"),window.history.replaceState(null,"",t.toString()),new ta({type:"success",text:e,time:4e3}).open())}(Na("Form created successfully.")),d().createElement(ea.Fragment,null,t,s,d().createElement("div",{id:"forminator-form-fields",className:"sui-box"},d().createElement(No,Lo({},this.props,{header:"true"})),e&&d().createElement(Fo,this.props),"pdf-form"===this.props.formType&&d().createElement(To,this.props),d().createElement(Do,this.props),"pdf-form"===this.props.formType&&d().createElement(Mo,this.props),"pdf-form"!==this.props.formType&&0!==this.props.wrappers.length&&d().createElement(Ao,this.props),d().createElement(Ro,this.props)))}}var zo=Dr(Bo);var Wo=ce(function(e){return{wrappers:e.wrappers,notifications:e.notifications,settings:e.settings,submitData:e.settings.submitData||{},changed:window.forminatorChanges,formType:e.settings["form-type"]||"",footerData:e.settings.footerData||{},settings:e.settings}},function(e){return{actions:{builderActions:Ut(a,e),modalActions:Ut(t,e),integrationActions:Ut(o,e),behaviorsActions:Ut(n,e),notificationsActions:Ut(i,e)}}})(zo);class Ho extends ea.Component{constructor(e){super(e),this.closeModal=this.props.closeModal.bind(this)}render(){const e=_.isUndefined(this.props.label)||""===this.props.label?Na("Close this dialog"):this.props.label,t=_.isUndefined(this.props.color)||""===this.props.color?"":this.props.color,s=!_.isUndefined(this.props.type)&&"icon"===this.props.type,a=!_.isUndefined(this.props.sronly)&&!0===this.props.sronly,r=!_.isUndefined(this.props.icon)&&""!==this.props.icon,i=!_.isUndefined(this.props.float)&&"left"===this.props.float,n=!_.isUndefined(this.props.float)&&"right"===this.props.float,o=!_.isUndefined(this.props.customClass)&&""!==this.props.customClass;let l="sui-button";return!0===a?l="sui-screen-reader-text":!1===a&&!0===s&&(l="sui-button-icon"),!1===a&&""!==t&&(l+=" sui-button-"+t),!1!==a||!0!==i&&!0!==n||(l+=" sui-button-float--"+this.props.float),!0===o&&(l+=" "+this.props.customClass),l+=" modal-close-button",d().createElement("button",{className:l,onClick:this.closeModal},!0===s&&d().createElement("i",{className:"sui-icon-close sui-md","aria-hidden":"true"}),!0===r&&d().createElement("i",{className:"sui-icon-"+this.props.icon,"aria-hidden":"true"}),!0===s?d().createElement("span",{className:"sui-screen-reader-text"},e):e)}}class qo extends ea.Component{constructor(e){super(e)}render(){const e=this.props.filename?this.props.filename:"";let t="sui-box-banner",s=Na("Forminator image");return _.isUndefined(this.props.logo)||!0!==this.props.logo||(t="sui-box-logo"),_.isUndefined(this.props.alt)||""===this.props.alt||(s=this.props.alt),d().createElement("figure",{className:t,"aria-hidden":"true"},d().createElement("img",{src:forminatorData.imagesUrl+"/"+e+".png",srcSet:`${forminatorData.imagesUrl}/${e}.png 1x,\n\t\t\t\t\t${forminatorData.imagesUrl}/${e}@2x.png 2x`,alt:s}))}}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Qo.apply(null,arguments)}class Yo extends ea.Component{constructor(e){super(e),this.closeModal=this.props.closeModal.bind(this)}render(){const e=d().Children.map(this.props.children,e=>e),t=_.isUndefined(this.props.alignment)||""===this.props.alignment?"":this.props.alignment,s=!_.isUndefined(this.props.flatten)&&!0===this.props.flatten,a=!(!_.isUndefined(this.props.canClose)&&!1===this.props.canClose),r=_.isUndefined(this.props.closeType)||""===this.props.closeType?"":this.props.closeType,i=_.isUndefined(this.props.closeColor)||""===this.props.closeColor?"default":this.props.closeColor,n=!_.isUndefined(this.props.imageName)&&""!==this.props.imageName,o=!_.isUndefined(this.props.imageLogo)&&!0===this.props.imageLogo,l=_.isUndefined(this.props.imageAlt)||!0!==this.props.imageAlt?"":this.props.imageAlt;let p="sui-box-header";""!==t&&(p+=" sui-content-"+t),!0===s&&(p+=" sui-flatten"),!0===n&&(p+=" sui-spacing-top--60"),!0===(!_.isUndefined(this.props.customClass)&&""!==this.props.customClass)&&(p+=" "+this.props.customClass);let c=d().createElement("div",{className:p},!0===a&&d().createElement(Ho,Qo({type:r,float:"right",color:i},a&&{closeModal:this.closeModal})),!0===n&&d().createElement(qo,{logo:o,filename:this.props.imageName,alt:l}),e);return"center"!==t&&(c=d().createElement(ea.Fragment,null,!0===a&&d().createElement(Ho,Qo({sronly:!0},a&&{closeModal:this.closeModal})),d().createElement("div",{className:p},!0===n&&d().createElement(qo,{logo:o,filename:this.props.imageName,alt:l}),e,!0===a&&d().createElement("div",{className:"sui-actions-right"},d().createElement(Ho,{type:r,color:i,closeModal:this.closeModal}))))),c}}class Go extends ea.Component{constructor(e){super(e)}render(){const e=d().Children.map(this.props.children,e=>e),t=_.isUndefined(this.props.alignment)||""===this.props.alignment?"":this.props.alignment;let s="sui-box-footer";return!0===(!_.isUndefined(this.props.flatten)&&!0===this.props.flatten)&&(s+=" sui-flatten"),""!==t&&(s+=" sui-content-"+t),!0===(!_.isUndefined(this.props.customClass)&&""!==this.props.customClass)&&(s+=" "+this.props.customClass),d().createElement("div",{className:s},e)}}function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ko.apply(null,arguments)}class Jo extends ea.Component{constructor(e){super(e)}render(){const e=this.props.id?"modal-"+this.props.id+"--title":"unique-id-required",t=this.props.label?this.props.label:"A title is required for your modals",s=_.isUndefined(this.props.tag)||""===this.props.tag?"":this.props.tag,a=_.isUndefined(this.props.tagColor)||""===this.props.tagColor?"":" sui-tag-"+this.props.tagColor,r=_.isUndefined(this.props.tagSize)||""===this.props.tagSize?"":" sui-tag-"+this.props.tagSize;let i="sui-box-title";"lg"===this.props.size&&(i+=" sui-lg"),_.isUndefined(this.props.customClass)||""===this.props.customClass||(i+=" "+this.props.customClass);let n="sui-tag"+a+r;return this.props.disableTooltip||(n+=" sui-tooltip sui-tooltip-constrained sui-tooltip-bottom"),d().createElement("h3",{id:e,className:i},!_.isUndefined(this.props.icon)&&d().createElement("span",{className:"fui-field--icon"},d().createElement("i",{className:this.props.icon,"aria-hidden":"true",style:{marginTop:"-2px"}})),!_.isUndefined(this.props.avatar)&&""!==this.props.avatar&&d().createElement("span",{className:"fui-field--icon fp-role-img"},d().createElement("img",{src:this.props.avatar,width:"30",height:"30"})),t,""!==s&&d().createElement("span",Ko({className:n,style:{marginTop:"-2px",marginLeft:"10px","--tooltip-width":"170px"}},!this.props.disableTooltip&&{"data-tooltip":Na("Use this merge tag to dynamically include this field’s value in email notification, success messages, and other text elements.")}),s))}}function Zo(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,a)}return s}function Xo(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function el(e,t){if(null==e)return{};var s,a,r=function(e,t){if(null==e)return{};var s,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)s=i[a],t.indexOf(s)>=0||(r[s]=e[s]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}var tl=["label","icon","iconSize","design","color","className","loading"],sl=function(e){var t=e.label,s=e.icon,a=e.iconSize,r=e.design,i=void 0===r?"solid":r,n=e.color,o=e.className,l=e.loading,p=el(e,tl),c=d().createElement("span",{className:"sui-icon-loader sui-loading",style:{position:"relative"},"aria-hidden":"true"}),u=d().createElement(d().Fragment,null,d().createElement("span",{className:"sui-icon-".concat(s).concat(a?" sui-"+a:""),"aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},t));switch(o="sui-button-icon ".concat(o||""),n){case"blue":case"green":case"red":case"orange":case"purple":case"yellow":case"white":o+=" sui-button-"+n;break;default:o+=""}switch(i){case"ghost":case"outlined":o+=" sui-button-"+i;break;default:o+=""}l&&(o+=" sui-button-onload");var m=p.href?"a":"button";return d().createElement(m,function(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?Zo(Object(s),!0).forEach(function(t){Xo(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Zo(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}({className:o,disabled:p.disabled||l},p),l?c:u)};class al extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.closeSettingsModal=this.closeSettingsModal.bind(this),this.insertFields=this.insertFields.bind(this),this.skipProNotice=this.skipProNotice.bind(this),this.state={fields:[]},this.hasCaptcha=!1,this.hasStripe=!1,this.hasStripeOCS=!1,this.hasPayPal=!1,this.missingPaymentField=!1}closeSettingsModal(e){this.props.actions.modalActions.showModal({open:!1,field:[],wrapper:[]},"field-settings");const t=ba("stripe",this.props.wrappers),s=ba("stripe-ocs",this.props.wrappers),a=ba("paypal",this.props.wrappers);(_.includes(this.state.fields,"stripe")&&a||_.includes(this.state.fields,"stripe-ocs")&&a||_.includes(this.state.fields,"paypal")&&s||_.includes(this.state.fields,"paypal")&&t)&&this.showPaymentNotice()}insertFields(){if(!this.state.fields.length)return;if(this.hasStripe||this.hasStripeOCS||this.hasCaptcha||this.hasPayPal)return!1;const e=this.props.modal.modalProps.groupId,t=[...this.props.wrappers],s=this.state.fields.map(s=>{const a=na();return{wrapper_id:a,parent_group:e,fields:[_a(s,t,a)]}});if(forminatorData.showFieldSettings&&1===this.state.fields.length){const e=this,t=void 0!==s[0]&&s[0],a=void 0!==s[0].fields[0]&&s[0].fields[0];t&&a&&("page-break"!==a.type&&"pdf-page-break"!==a.type&&setTimeout(function(){e.props.actions.modalActions.showModal({open:!0,field:a,wrapper:t,closeModal:e.closeSettingsModal,isValid:!0},"field-settings")},500),"stripe"!==a.type&&"stripe-ocs"!==a.type||(this.props.settings["enable-ajax"]="true"))}if(_.isUndefined(this.props.modal.modalProps.insertAfter))this.props.actions.builderActions.updateFields([...t,...s]);else{const e=this.props.modal.modalProps.insertAfter,a=_.findIndex(t,{wrapper_id:e}),r=_.clone(t);r.splice(a+1,0,...s),this.props.actions.builderActions.updateFields(r)}this.closeFields()}closeFields(){this.closeModal(),(_.includes(this.state.fields,"stripe")||_.includes(this.state.fields,"stripe-ocs"))&&_.includes(this.state.fields,"paypal")&&this.showPaymentNotice()}skipProNotice(e){const t=this;jQuery.post(forminatorData.ajaxUrl,{action:"forminator_dismiss_notification",prop:"forminator_skip_pro_notice",_ajax_nonce:forminatorData.dismissNonce}).always(function(){t.props.actions.settingsActions.updateSetting("skipProNotice",!0)})}toggleField(e,t){let s;const a=ba("stripe",this.props.wrappers),r=ba("stripe-ocs",this.props.wrappers),i=ba("captcha",this.props.wrappers),n=ba("paypal",this.props.wrappers);if(!0!==t.target.checked){const t=this.state.fields;t.splice(t.indexOf(e),1),s={fields:t}}else s={fields:[...this.state.fields,e]};if(this.setState(s),_.includes(s.fields,"stripe")&&a?this.hasStripe=!0:this.hasStripe=!1,this.hasStripeOCS=_.includes(s.fields,"stripe-ocs")&&r,_.includes(s.fields,"paypal")&&n?this.hasPayPal=!0:this.hasPayPal=!1,_.includes(s.fields,"captcha")&&i?this.hasCaptcha=!0:this.hasCaptcha=!1,"pdf-form"===this.props.formType){const e=_.isUndefined(forminatorData.parentFormFields)?[]:forminatorData.parentFormFields,t=ba("stripe",e)||ba("stripe-ocs",e),a=ba("paypal",e);this.missingPaymentField=_.includes(s.fields,"payment")&&!t&&!a}}showPaymentNotice(){new ta({type:"info",text:`<strong>${Na("Collect payments like a pro")}</strong></p>\n\t<p style="margin-top: -10px; margin-bottom: 5px;">${Na("You have added both Stripe and PayPal fields to your form. We recommend that you use the visibility conditions, so only one of them is visible at a time. For example:")}</p>\n\t<p style="margin-top: 0; margin-bottom: 5px;">1. ${Na("Add an option to your form using a Radio (or Select) field that allows visitors to choose the payment method.")}</p>\n\t<p style="margin-top: 0;">2. ${Na("Apply visibility conditions to both Stripe and PayPal fields so only one is visible based on the visitor's selection in the Radio (or Select) field.")}`,dismiss:!0}).open()}render(){let e=forminatorData.fields.filter(e=>e.category),t={},s={};const a=forminatorData.fieldsPro||[],r=ba("password",this.props.wrappers),i=this.props.modal.modalProps.groupId;e=_.filter(e,function(e){return"gdprcheckbox"!==e.slug&&"stripe"!==e.slug}),("registration"!==this.props.formType&&"login"!==this.props.formType||r&&"registration"===this.props.formType)&&(e=_.filter(e,function(e){return"password"!==e.slug})),i&&(e=_.filter(e,function(e){return!_.includes(["page-break","paypal","stripe","stripe-ocs","signature","captcha","postdata","group"],e.slug)}));const n=_.sortBy(e,"position");(this.hasStripe||this.hasStripeOCS||this.hasCaptcha||this.hasPayPal)&&(t={display:"block"}),forminatorData.isPro||this.props.skipProNotice||(s={display:"block"});const o=this.props.formType;let l,p;return"pdf-form"===o?(l=Na("PDF file"),p="blue"):(l=Na("form"),p="red"),d().createElement(ea.Fragment,null,d().createElement(Yo,{closeType:"icon",closeModal:this.closeModal},d().createElement(Jo,{id:this.props.modal.modalProps.id,label:Na("Insert Fields")})),d().createElement("div",{className:"sui-box-body"},d().createElement("p",null,Na("Select one or more fields below to include in your %s.",{args:l})),(this.hasStripe||this.hasCaptcha||this.hasStripeOCS||this.hasPayPal||"pdf-form"===o)&&d().createElement("div",{role:"alert",className:`sui-notice sui-notice-${p} sui-active`,"aria-live":"assertive",style:{display:"block"}},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),(this.hasStripe||this.hasStripeOCS)&&d().createElement("p",null,Na("You can have only one Stripe field in your form for Stripe to work accurately. Please delete the existing Stripe field to add a new one.")),this.hasPayPal&&d().createElement("p",null,Na("You can have only one PayPal field in your form for PayPal to work accurately. Please delete the existing PayPal field to add a new one.")),this.hasCaptcha&&d().createElement("p",null,Na("You can have only one captcha field in your form for captcha to work accurately. Please delete the existing captcha field to add a new one.")),"pdf-form"===o&&d().createElement("p",null,Na("{{b}}Note{{/b}}: You can use the {{b}}Rich Text{{/b}} field to add form fields and custom text to your PDF.",{components:{b:d().createElement("b",null)}})))))),d().createElement("div",{className:"sui-box-selectors sui-box-selectors-col-5",style:{margin:0}},d().createElement("ul",{id:"forminator-form-fields-to-insert",className:`sui-spacing-slim ${o}-field-selectors`},n.map(e=>d().createElement("li",{key:e.slug},d().createElement("label",{htmlFor:`forminator-form-field-${e.slug}`,className:"sui-box-selector sui-box-selector-vertical"},d().createElement("input",{type:"checkbox",id:`forminator-form-field-${e.slug}`,"data-field":e.slug,onChange:t=>this.toggleField(e.slug,t)}),d().createElement("span",null,d().createElement("i",{className:e.icon,"aria-hidden":"true"}),e.name)))),!forminatorData.isPro&&a.map(e=>{if("signature"!==e.field_type||"signature"===e.field_type&&_.isEmpty(i))return d().createElement("li",{key:e.slug},d().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},d().createElement("input",{type:"radio",disabled:!0}),d().createElement("span",null,d().createElement("span",{className:e.icon,"aria-hidden":"true"}),e.name,d().createElement("span",{className:"sui-tag sui-tag-pro"},"Pro"))))}),_.isEmpty(i)&&!forminatorData.isPro&&_.isEmpty(a)&&"pdf-form"!==o&&d().createElement("li",null,d().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},d().createElement("input",{type:"radio",disabled:!0}),d().createElement("span",null,d().createElement("span",{className:"sui-icon-pencil","aria-hidden":"true"}),Na("E-Signature"),d().createElement("span",{className:"sui-tag sui-tag-pro"},"Pro")))),"pdf-form"===o&&d().createElement(ea.Fragment,null,d().createElement("li",{className:"pdf-field-coming-soon sui-tooltip","data-tooltip":Na("Coming soon")},d().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},d().createElement("input",{type:"radio",disabled:!0}),d().createElement("span",null,d().createElement("span",{className:"sui-icon-code","aria-hidden":"true"}),Na("Quotation")))))),"pdf-form"!==o&&d().createElement("div",{role:"alert",id:"fui-notice-pro-fields",className:`sui-notice sui-notice-purple ${!forminatorData.isPro&&!this.props.skipProNotice&&" sui-active"}`,style:s,"aria-live":"assertive"},_.isEmpty(i)&&!forminatorData.isPro&&!this.props.skipProNotice&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Need access to pro form fields? {{link}}Upgrade to Pro{{/link}}",{components:{link:d().createElement("a",{href:"https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_forms_insertfields_upsell_notice",target:"_blank",style:{color:"#8d00b1"}})}}))),d().createElement("div",{className:"sui-notice-actions"},d().createElement(sl,{icon:"check",iconSize:"sm",label:Na("Dismiss"),onClick:this.skipProNotice})))),"pdf-form"===o&&this.missingPaymentField&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block",marginTop:"15px"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("This PDF is linked to a form without a payment field. To include payment information in your PDF, please add either a PayPal or Stripe field to your form.")))))),d().createElement(Go,{alignment:"separated"},d().createElement(Ho,{label:Na("Cancel"),customClass:"sui-button-ghost forminator-builder-fields-close",closeModal:this.closeModal}),d().createElement("button",{id:"forminator-builder-insert-fields",className:"sui-button sui-button-blue",disabled:!this.state.fields.length||this.hasStripe||this.hasStripeOCS||this.hasCaptcha||this.hasPayPal||this.missingPaymentField,onClick:this.insertFields},d().createElement("span",{className:"sui-loading-text"},Na("Insert Fields")),d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class rl extends ea.Component{constructor(e){super(e)}render(){const e=d().Children.map(this.props.children,e=>e);return d().createElement("div",{className:"sui-row"+(_.isUndefined(this.props.class)?"":" "+this.props.class)},e)}}class il extends ea.Component{constructor(e){super(e)}render(){const e=d().Children.map(this.props.children,e=>e),t=this.props.customClass?this.props.customClass:"";return d().createElement("div",{className:`sui-col-md-${this.props.cols} ${t}`},e)}}function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},nl.apply(null,arguments)}class ol extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}isValid(e){return this.props.isRequired?this.props.isRequired&&!_.isEmpty(e):!!_.isUndefined(this.props.isPositive)||(_.isEmpty(e)||e>=0)}isMaxValid(e){return!!_.isUndefined(this.props.maxValid)||!_.isNull(e)&&e<=this.props.maxValid}render(){const e=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property],t=_.isUndefined(this.props.type)?"text":this.props.type,s=_.isUndefined(this.props.requiredError)?Na("This field is required!"):this.props.requiredError,a=this.isValid(e)&&this.isMaxValid(e)?"":"sui-form-field-error",r=_.isUndefined(this.props.maxValidError)?Na("Please enter valid number."):this.props.maxValidError,i=_.isUndefined(this.props.fieldClass)?"sui-form-field":"sui-form-field "+this.props.fieldClass;let n="sui-form-control";_.isUndefined(this.props.inputClass)||""===this.props.inputClass||(n+=" "+this.props.inputClass),_.isUndefined(this.props.prefix)||""===this.props.prefix||(n+=" sui-field-has-prefix"),_.isUndefined(this.props.suffix)||""===this.props.suffix||(n+=" sui-field-has-suffix");const o=_.isUndefined(this.props.inputId)?this.props.property:this.props.inputId;let l;if(this.props.label){const e=!1;l=d().createElement("label",{htmlFor:`forminator-field-${o}`,className:this.props.darkLabel?"sui-settings-label sui-dark":"sui-label"},this.props.label,this.props.isRequired&&d().createElement(ea.Fragment,null," ",d().createElement("span",{className:"sui-error"},"*")),this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note),e&&(this.props.property.endsWith("_label")||this.props.property.endsWith("-label")||this.props.property.endsWith("description"))&&!["poll","sc_email_button_label"].some(e=>this.props.property.includes(e))&&d().createElement("span",{className:"sui-label-note sui-tooltip sui-tooltip-left sui-tooltip-constrained cursor-help",style:{"--tooltip-width":"190px",cursor:"help"},"data-tooltip":Na("Use the following formats to style your text: *bold*, _italic_, ~strikethrough~, `monospace`")},d().createElement("span",{className:"sui-icon-lightbulb","aria-hidden":"true"})," ",d().createElement("dfn",null,Na("Text styles"))))}const p=d().createElement("input",nl({type:t,placeholder:this.props.placeholder,value:e||"",id:`forminator-field-${o}`,className:n},this.props.notWritable&&{readonly:""},this.props.minValue&&{min:this.props.minValue},this.props.maxValue&&{max:this.props.maxValue},this.props.step&&{step:this.props.step},this.props.maxLength&&{maxLength:this.props.maxLength},this.props.inputStyles&&{style:this.props.inputStyles},this.props.labelledBy&&{"aria-labelledby":this.props.labelledBy},this.props.ariaLabel&&{"aria-label":this.props.ariaLabel},{disabled:!!this.props.disabled,onBlur:e=>{let t=parseFloat(e.target.value);!_.isUndefined(this.props.minValue)&&t<parseFloat(this.props.minValue)&&(t=this.props.minValue,this.updateValue(t)),!_.isUndefined(this.props.maxValue)&&t>parseFloat(this.props.maxValue)&&(t=this.props.maxValue,this.updateValue(t))},onChange:e=>{this.updateValue(e.target.value)}})),c=d().createElement("div",{className:`${i} ${a}`},l,!_.isUndefined(this.props.prefix)&&""!==this.props.prefix&&d().createElement("span",{className:"sui-field-prefix"},this.props.prefix),this.props.canTrash?d().createElement("div",{className:"sui-with-button sui-with-button-icon"},p,d().createElement("button",{className:"sui-button-icon sui-tooltip sui-tooltip-top-right","data-tooltip":Na("Delete")},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}))):p,this.props.suffix&&d().createElement("span",{className:"sui-field-suffix"},this.props.suffix),this.props.isRequired&&!this.isValid(e)&&d().createElement("span",{className:"sui-error-message"},s),!_.isUndefined(this.props.isPositive)&&!this.isValid(e)&&d().createElement("span",{className:"sui-error-message"},Na("Please enter valid number.")),!this.isMaxValid(e)&&d().createElement("span",{className:"sui-error-message"},r),this.props.description&&d().createElement("span",{className:"sui-description"},this.props.description));return this.props.simple?p:c}}class ll extends ea.Component{constructor(e){super(e),this.state={open:!1},this.updateValue=this.updateValue.bind(this),this.toggleState=this.toggleState.bind(this)}toggleState(){this.setState({open:!this.state.open})}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}render(){const{label:e}=this.props;let t="";const{open:s}=this.state,a=_.isUndefined(this.props.settings[this.props.property])?"":this.props.settings[this.props.property];a||(t="sui-accordion-item--disabled"),a&&s&&(t="sui-accordion-item--open");const r=d().Children.map(this.props.children,e=>e);let i=s&&r;return this.props.noBoxBody||(i=d().createElement("div",{className:"sui-box"},d().createElement("div",{className:"sui-box-body"},s&&r))),d().createElement("div",{className:"sui-accordion-item "+t},d().createElement("div",{className:"sui-accordion-item-header",onClick:()=>this.toggleState()},d().createElement("div",{className:"sui-accordion-item-title"},d().createElement("label",{htmlFor:"forminator-"+this.props.property,className:"sui-toggle"},d().createElement("input",{type:"checkbox",id:"forminator-"+this.props.property,onChange:e=>{this.updateValue(e.target.checked)},checked:a?"checked":""}),d().createElement("span",{className:"sui-toggle-slider"}),d().createElement("span",{className:"sui-toggle-label"},e,this.props.required&&d().createElement("span",{className:"sui-error"}," *")))),d().createElement("div",{className:"sui-accordion-col-auto"},d().createElement("button",{className:"sui-button-icon sui-accordion-open-indicator","aria-label":!1===this.state.open?Na("Open item"):Na("Close item"),onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-chevron-down","aria-hidden":"true"})))),d().createElement("div",{className:"sui-accordion-item-body"},i))}}function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},pl.apply(null,arguments)}class cl extends ea.Component{constructor(e){super(e)}render(){const e="email"===this.props.state.type;return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,pl({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,pl({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,pl({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),e&&d().createElement("div",{className:"sui-accordion sui-accordion-flushed",value:"multiple",style:{marginBottom:"-30px",border:"none"}},d().createElement(ll,pl({},this.props,{label:Na("Confirm Email"),property:"confirm-email",settings:this.props.state}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,pl({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"confirm-email-label",defaultValue:Na("Confirm Email Address")}))),d().createElement(il,{cols:"6"},d().createElement(ol,pl({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"confirm-email-placeholder",defaultValue:Na("Re-type Email Address")})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,pl({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"confirm-email-description"}))))))))}}function ul(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&amp;")}function dl(e){return e.replace(/</g,"&lt;")}function ml(e){return dl(ul(e))}function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},hl.apply(null,arguments)}class fl extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}componentDidMount(){this.$el=jQuery(this.el),this.updateValue=this.updateValue.bind(this),this.$el.on("change",this.updateValue)}componentDidUpdate(e){const t=_.isUndefined(e.settings[this.props.property])?e.defaultValue:e.settings[this.props.property],s=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property];t!==s&&this.el&&(this.el.value=s)}updateValue(e){const t=e.target.value;"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,t):this.props.actions.settingsActions.updateSetting(this.props.property,t)}componentWillUnmount(){this.$el.off("change",this.updateValue),this.$el.unbind().removeData()}render(){let e=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property];const t=_.isUndefined(this.props.fieldClass)?"sui-form-field":"sui-form-field "+this.props.fieldClass,s=_.isUndefined(this.props.elementClass)?"":this.props.elementClass,a=_.isUndefined(this.props.elementId)?this.props.property:this.props.elementId;let r="";this.props.label&&(r=d().createElement("label",{htmlFor:`forminator-field-${a}`,id:`forminator-field-${a}-label`,className:"sui-label"},this.props.label," ",this.props.required&&d().createElement("span",{className:"sui-error"}," *"),this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note))),_.isUndefined(e)||"phone_national_country"!==this.props.property&&"phone_international_country"!==this.props.property||(e=e.toLowerCase());const i=d().createElement("select",hl({defaultValue:e,id:`forminator-field-${a}`,className:s},this.props.label&&{"aria-labelledby":`forminator-field-${a}-label`},this.props.ariaLabel&&{"aria-label":this.props.ariaLabel},{ref:e=>this.el=e,style:{maxWidth:"none"}}),this.props.children);let n=i;"md"===this.props.fieldsize||"medium"===this.props.fieldsize?n=d().createElement("div",{className:"sui-form-field sui-input-md"},i):"sm"===this.props.fieldsize||"small"===this.props.fieldsize?n=d().createElement("div",{className:"sui-form-field sui-input-sm"},i):""!==this.props.fieldsize&&(n=d().createElement("div",{style:{width:"100%",maxWidth:this.props.fieldsize+"px"}},i));let o=n;return this.props.simple||(o=d().createElement("div",{className:t},r,n,this.props.description&&d().createElement("span",{className:"sui-description",style:{marginTop:"10px"}},this.props.description))),o}}function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},bl.apply(null,arguments)}class gl extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this),this.hasWordFormat=!_.isUndefined(this.props.hasWordFormat)&&this.props.hasWordFormat}componentDidMount(){this.$el=jQuery(this.el);const e=this;let t=!1,s=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property];const a=this.props.dateFormat?this.props.dateFormat:"d MM yy",r=_.isUndefined(this.props.id)?`forminator-field-${this.props.property}`:`forminator-field-${this.props.id}`;this.hasWordFormat||this.$el.val(s),this.$el.datepicker({beforeShow:(e,t)=>{jQuery("#ui-datepicker-div").addClass("sui-calendar"),"forminator-field-date"===this.$el.attr("id")&&("disable"===this.props.state.past_dates?this.$el.datepicker("option","minDate",this.$el.datepicker("getDate")):"enable"===this.props.state.past_dates&&this.$el.datepicker("option","minDate",null))},dateFormat:a,dayNamesMin:forminatorl10n.calendar.day_names_min,monthNames:forminatorl10n.calendar.month_names,onSelect:e=>{this.updateValue(e),t=!0},onClose:s=>{if(t)return void(t=!1);try{jQuery.datepicker.parseDate(a,s,{dayNamesMin:forminatorl10n.calendar.day_names_min,monthNames:forminatorl10n.calendar.month_names})}catch(e){return}const r=_.isUndefined(e.props.settings[e.props.property])?e.props.defaultValue:e.props.settings[e.props.property];let i=s;this.hasWordFormat&&!_.isUndefined(s)&&isNaN(s)&&(i=new Date(s).getTime()),(_.isUndefined(r)||i.toString()!==r.toString())&&this.updateValue(s)}}),this.hasWordFormat&&(this.$el.datepicker("option","altField","#"+r+"-altfield"),this.$el.datepicker("option","altFormat","@"),_.isUndefined(s)||(isNaN(s)&&(s=new Date(s).getTime()),jQuery("#"+r+"-altfield").val(s),this.$el.datepicker("setDate",new Date(parseInt(s))))),this.updateValue=this.updateValue.bind(this)}replaceMonthsInEnglish(e){const t=forminatorl10n.calendar.month_names,s=["January","February","March","April","May","June","July","August","September","October","November","December"];for(let a=0;a<t.length;a++)e=e.replace(t[a],s[a]);return e}updateValue(e){if(this.hasWordFormat)if(!_.isUndefined(this.props.rule)&&["is_before","is_after"].includes(this.props.rule.rule)){e=this.replaceMonthsInEnglish(e);e=new Date(`${e} UTC`).getTime().toString()}else e=jQuery(this.$el.datepicker("option","altField")).val();"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}componentWillUnmount(){this.$el.datepicker("destroy"),this.$el.unbind().removeData()}render(){const e=_.isUndefined(this.props.customClass)?"sui-form-control":this.props.customClass,t=_.isUndefined(this.props.calendarIcon)?"right":this.props.calendarIcon;let s,a,r="sui-form-field";_.isUndefined(this.props.fieldClass)||(r+=" "+this.props.fieldClass),this.props.mediumSize&&(r+=" sui-input-md"),this.props.label&&(s=d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note))),this.props.canTrash&&(a=d().createElement("button",{className:"sui-button-icon"},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Remove this date range")))),this.props.canAdd&&(a=d().createElement("button",{className:"sui-button-icon"},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Add selected date"))));const i=_.isUndefined(this.props.id)?`forminator-field-${this.props.property}`:`forminator-field-${this.props.id}`,n=d().createElement(ea.Fragment,null,d().createElement("input",bl({ref:e=>this.el=e,id:i,className:e,placeholder:this.props.placeholder,type:"text",autoComplete:"off"},this.props.onlyRead&&{'readonly="readonly"':""})),this.hasWordFormat&&d().createElement("input",{id:i+"-altfield",style:{display:"none"}}));let o=d().createElement("div",{className:r},s,this.props.noCalendar?n:d().createElement("div",{className:"sui-date"},"left"===t&&d().createElement("i",{className:"sui-icon-calendar","aria-hidden":"true"}),n,"right"===t&&d().createElement("i",{className:"sui-icon-calendar","aria-hidden":"true"})),d().createElement("div",{id:i+"-calendar",className:"sui-date-calendar"}),this.props.description&&d().createElement("span",{className:"sui-description"},this.props.description));return this.props.multiDate&&(o=d().createElement("div",{className:"sui-multi-date"},d().createElement("div",{className:r},s,this.props.noCalendar?n:d().createElement("div",{className:"sui-date"},n,d().createElement("i",{className:"sui-icon-calendar","aria-hidden":"true"})),this.props.description&&d().createElement("span",{className:"sui-description"},this.props.description)),a)),o}}function yl(){return yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},yl.apply(null,arguments)}class El extends ea.Component{constructor(e){super(e),this.toggleState=this.toggleState.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.state={open:!1},this.fields=this.props.fields}removeRule(){this.props.removeRule(this.props.counter)}updateField(e,t){this.props.updateField(this.props.counter,t)}updateRule(e,t){this.props.updateRule(this.props.counter,t)}updateValue(e){this.props.updateValue(this.props.counter,e.target.value)}updateInputValue(e,t){this.props.updateInputValue(this.props.counter,t)}toggleState(){this.setState({open:!this.state.open})}disableSearch(){return{minimumResultsForSearch:-1}}getRuleValue(){if(_.isEmpty(this.props.rule.value))return Na("null");let e=this.props.rule.value;return["is_before","is_after"].includes(this.props.rule.rule)&&(e=Sa(e)),e}render(){const e="condition-"+this.props.counter,t=_.filter(this.fields,{element_id:this.props.rule.element_id})[0]||{},s="consent"===t.field_type;s&&(this.props.rule.value=Na("checked"));const a=this.getRuleValue();return Object.keys(t).length>0&&d().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},d().createElement("h4",{className:"fui-visibility-rule-header"},d().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-link fui-visibility-rule-icon","aria-hidden":"true"}),d().createElement("span",{className:"fui-visibility-rule-text"},d().createElement("strong",null,ml(t.label))," ",("is_before_n_or_more_days"===this.props.rule.rule||"is_before_less_than_n_days"===this.props.rule.rule||"is_after_n_or_more_days"===this.props.rule.rule||"is_after_less_than_n_days"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,Ma(this.props.rule.rule,t.field_type,a)),!("is_before_n_or_more_days"===this.props.rule.rule||"is_before_less_than_n_days"===this.props.rule.rule||"is_after_n_or_more_days"===this.props.rule.rule||"is_after_less_than_n_days"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,Ma(this.props.rule.rule,t.field_type)," ",d().createElement("strong",null,a))),d().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),d().createElement("div",{role:"region",id:"forminator-field-"+e+"-content",className:"sui-box-body fui-visibility-rule-body","aria-labelledby":"forminator-field-"+e,"aria-hidden":!0!==this.state.open},d().createElement(fl,yl({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:Na("Field")}),_.map(this.fields,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(fl,yl({key:"visibility-condition-"+ia()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,label:Na("Condition (required)"),options:this.disableSearch()}),d().createElement("option",{value:""},Na("Select rule")),"signature"===t.field_type&&!s&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is null")),d().createElement("option",{value:"is_not"},Na("Is not null"))),"signature"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is")),d().createElement("option",{value:"is_not"},Na("Is not"))),(t.isNumber||"rating"===t.field_type)&&!s&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is_great"},Na("Is greater than")),d().createElement("option",{value:"is_less"},Na("Is less than"))),!t.isNumber&&!t.hasOptions&&!s&&"signature"!==t.field_type&&"rating"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"contains"},Na("Contains")),d().createElement("option",{value:"does_not_contain"},Na("Does not contain")),d().createElement("option",{value:"starts"},Na("Starts with")),d().createElement("option",{value:"ends"},Na("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&!s&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"day_is"},Na("Day is")),d().createElement("option",{value:"day_is_not"},Na("Day is not"))),"date"===t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&!s&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"month_is"},Na("Month is")),d().createElement("option",{value:"month_is_not"},Na("Month is not"))),"date"===t.field_type&&"date"===t.field_slug&&!s&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is_before"},Na("Is before")),d().createElement("option",{value:"is_after"},Na("Is after")),d().createElement("option",{value:"is_before_n_or_more_days"},Na("Is before n or more days")),d().createElement("option",{value:"is_before_less_than_n_days"},Na("Is before less than n days")),d().createElement("option",{value:"is_after_n_or_more_days"},Na("Is after n or more days")),d().createElement("option",{value:"is_after_less_than_n_days"},Na("Is after less than n days"))))),d().createElement(il,{cols:"6"},d().createElement(ea.Fragment,null,t.hasOptions&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select option")),_.map(t.values,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label))))),!t.hasOptions&&s&&d().createElement(ol,yl({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Status"),disabled:!0})),!t.hasOptions&&"signature"!==t.field_type&&!s&&(!["day_is","day_is_not","month_is","month_is_not","is_before","is_after","is_before_n_or_more_days","is_before_less_than_n_days","is_after_n_or_more_days","is_after_less_than_n_days"].includes(this.props.rule.rule)||"date"!==t.field_type)&&d().createElement(ol,yl({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule||"month_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=>d().createElement("option",{value:e,key:e},e)))),!t.hasOptions&&"date"===t.field_type&&("day_is"===this.props.rule.rule||"day_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],e=>d().createElement("option",{value:e,key:e},e)))),!t.hasOptions&&"date"===t.field_type&&("is_before"===this.props.rule.rule||"is_after"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"},Na("Select date")),d().createElement(gl,yl({},this.props,{settings:this.props.rule,property:"value",hasWordFormat:!0,id:e+"-value",placeholder:Na("20 April 2018"),updateProperty:this.updateInputValue}))),!t.hasOptions&&"date"===t.field_type&&("is_before_n_or_more_days"===this.props.rule.rule||"is_before_less_than_n_days"===this.props.rule.rule||"is_after_n_or_more_days"===this.props.rule.rule||"is_after_less_than_n_days"===this.props.rule.rule)&&d().createElement(ol,yl({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Number of days"),placeholder:Na("E.g. 10"),type:"number",minValue:"0"}))))),d().createElement("div",{className:"fui-visibility-rule-footer"},d().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},Na("Done")))))}}function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},vl.apply(null,arguments)}class _l extends ea.Component{constructor(e){super(e),this.radioContainer=d().createRef()}componentDidMount(){const e=this;this.$radioContainer=jQuery(this.radioContainer),this.$radioContainer.hasClass("time_type")&&this.$radioContainer.on("click",".forminator-toggle:not(.active)",t=>{e.props.timeType(jQuery(t.currentTarget).data("val"))})}componentWillUnmount(){this.$radioContainer.off("click",this.updateValue).removeData()}updateValue(e){if("function"==typeof this.props.updateProperty){if(this.props.updateProperty(this.props.property,e),"true"===this.props.clearOptions&&"single"===e){const e=[];_.each(this.props.state.options,t=>{t.default=!1,e.push(t)}),this.props.updateProperty("options",e)}}else this.props.actions.settingsActions.updateSetting(this.props.property,e)}render(){const e=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property],t=d().Children.map(this.props.children,t=>d().createElement("button",vl({id:"tab-option-"+t.props.value,role:"tab",className:"forminator-toggle sui-tab-item "+(t.props.value===e?"active":""),"aria-selected":t.props.value===e?"true":"false"},t.props.value!==e&&{tabIndex:"-1"},{"data-val":t.props.value,onClick:this.updateValue.bind(this,t.props.value)}),t.props.children));let s="";this.props.label&&""!==this.props.label&&(s=d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note)));let a="";this.props.description&&""!==this.props.description&&(a=d().createElement("span",{className:"sui-description"},this.props.description));let r="";!this.props.label&&this.props.settingsLabel&&(r=d().createElement("label",{className:"sui-settings-label"},this.props.settingsLabel));let i="";!this.props.label&&this.props.settingsDesc&&(i=d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},this.props.settingsDesc));const n=d().createElement("div",{className:`sui-side-tabs ${this.props.property}`,style:this.props.description&&{marginBottom:"5px"},ref:e=>this.radioContainer=e},d().createElement("div",{className:"sui-tabs-menu",role:"tablist"},t));let o=d().createElement(ea.Fragment,null,s,n);return this.props.noWrapper||(o=d().createElement("div",{className:"sui-form-field"},s,r,i,n,a)),o}}function wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},wl.apply(null,arguments)}class xl extends ea.Component{constructor(e){super(e),this.addRule=this.addRule.bind(this),this.removeRule=this.removeRule.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.isPageBreak="page-break"===this.props.state.type;let t=["stripe","stripe-ocs","paypal","page-break","pagination","section","html"];this.isPageBreak&&t.push("calculation"),this.fields=Pa(this.props.wrappers,t,{main_date_field:!0}),this.fields=_.filter(this.fields,e=>e.element_id!==this.props.state.element_id),_.includes(["address","date","time","slider","name"],this.props.state.type)&&(this.fields=_.filter(this.fields,e=>!e.element_id.startsWith(this.props.state.element_id+"-"))),this.validateConditions()}updateState(e){this.props.isPayment?this.props.updatePayment(this.props.counter,"conditions",e):this.props.updateProperty("conditions",e)}getPropState(){const e=[];return _.each(this.props.state.conditions,t=>{const s=Object.assign({},t);e.push(s)}),e}updateField(e,t){const s=this.getPropState();s[e].element_id=t,s[e].rule="is",s[e].value="",this.updateState(s)}updateRule(e,t){const s=this.getPropState();s[e].rule=t,this.updateState(s)}updateValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}updateInputValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}removeRule(e){const t=this.getPropState();t.splice(e,1),this.updateState(t)}addRule(){const e=this.getPropState(),t=_.isUndefined(this.fields[0])?"":this.fields[0].element_id;e.push({element_id:t,rule:"is",value:""}),this.updateState(e)}validateConditions(){const e=_.map(this.props.state.conditions,"element_id"),t=_.map(this.fields,"element_id"),s=_.difference(e,t);_.isUndefined(s)||this.removeCondition(s)}removeCondition(e){const t=this.getPropState(),s=_.filter(t,function(t){return!_.includes(e,t.element_id)});this.updateState(s)}render(){let e=null,t=d().createElement("div",{className:"fui-visibility-options"},d().createElement("div",{className:"fui-visibility-option"},d().createElement(_l,wl({},this.props,{settings:this.props.state,property:"condition_action",defaultValue:"show",noWrapper:!0}),d().createElement("span",{value:"show"},Na("Show")),d().createElement("span",{value:"hide"},Na("Hide"))),d().createElement("span",{className:"sui-description"},this.isPageBreak?Na("this page when"):Na("this field if"))),!this.isPageBreak&&d().createElement("div",{className:"fui-visibility-option"},d().createElement(_l,wl({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),d().createElement("span",{value:"all"},Na("All")),d().createElement("span",{value:"any"},Na("Any"))),d().createElement("span",{className:"sui-description"},Na("of the following rules match:"))));this.props.isPayment&&(t=d().createElement("div",{className:"fui-visibility-options"},d().createElement("div",{className:"fui-visibility-option"},d().createElement("span",{className:"sui-description"},Na("Process this plan if"))),d().createElement("div",{className:"fui-visibility-option"},d().createElement(_l,wl({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),d().createElement("span",{value:"all"},Na("All")),d().createElement("span",{value:"any"},Na("Any"))),d().createElement("span",{className:"sui-description"},Na("of the following conditions match:")))));let s=!1;if(this.isPageBreak){if(s="last"===qa(this.props.state.element_id,this.props.wrappers),s){t=null;e=!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0?d().createElement("div",{role:"alert",className:"sui-notice sui-notice-yellow sui-active fui-visibility-notice",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note: The conditions on this page will be ignored as the last page will always be visible."))))):d().createElement("div",{role:"alert",className:"sui-notice sui-active fui-visibility-notice",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You can't apply visibility rules to the last page. It will always be visible.")))))}}const a=!this.isPageBreak&&d().createElement("label",{className:"sui-label"},this.props.isPayment?Na("Conditions"):Na("Rules")),r=d().createElement("p",null,this.isPageBreak?Na("Set a condition to display this page and its fields only when specific criteria are met—like selecting a checkbox or entering a certain value."):Na("Set conditions to display this field only when specific criteria are met—like selecting a checkbox or entering a certain value.")," ",forminatorData.showDocLink&&Na("{{link}}Learn more{{/link}}",{components:{link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#Forminator-Conditional-Logic",target:"_blank",rel:"noreferrer"})}}));let i="";i=this.isPageBreak?Na("By default, this page is always visible.")+"<br />"+Na("Add a rule to control when it should be hidden or shown."):this.props.isPayment?Na("Add conditions for how this plan will be processed based on your form field data."):Na("By default, this field is always visible.")+"<br />"+Na("Add rules to control when it should appear based on user input.");const n=d().createElement("div",{className:"fui-visibility-group"},this.props.wrappers.length<2&&this.fields.length<2&&_.isEmpty(this.fields)&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active fui-visibility-notice",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You need more than one field to configure visibility conditions. Add more fields!"))))),(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&d().createElement("div",{className:"fui-visibility-header"},!this.props.isPayment&&d().createElement("div",wl({className:"fui-visibility-header-message"},s&&{style:{marginBottom:0}}),r,e),t,a),d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-empty-message forminator-visibility-field-empty-message"},d().createElement("p",{dangerouslySetInnerHTML:{__html:i}}),(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&!s&&d().createElement("button",{accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.props.isPayment?Na("Add conditions"):Na("Add Rule")))));return(_.isUndefined(this.props.state.conditions)||0===this.props.state.conditions.length)&&ea.Fragment,!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0&&!_.isEmpty(this.fields)?d().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>0)&&d().createElement("div",{className:"fui-visibility-header"},!this.props.isPayment&&d().createElement("div",wl({className:"fui-visibility-header-message has-conditions"},s&&{style:{marginBottom:0}}),r,e),t,a),d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,(e,t)=>d().createElement(El,wl({},this.props,{rule:e,key:t,counter:t,removeRule:this.removeRule,updateField:this.updateField,updateRule:this.updateRule,updateValue:this.updateValue,updateInputValue:this.updateInputValue,fields:this.fields}))))),!this.isPageBreak&&d().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.props.isPayment?Na("Add conditions"):Na("Add Rule"))):d().createElement(ea.Fragment,null,n)}}const Nl=["formType","updateProperty","noWrapper","fieldClass","staticContext","formDesign","fieldSize"];function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Cl.apply(null,arguments)}class kl extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this),this.afterSave=this.afterSave.bind(this)}componentDidMount(){this.$el=jQuery(this.el);const e=this.$el.closest(".sui-modal-content"),t=e.attr("id"),s=this.props.hasSearch?0:-1,a=Object.assign({dropdownParent:e.length?jQuery("#"+t):jQuery('body[class*="sui-"]'),minimumResultsForSearch:s,dropdownCssClass:this.$el.hasClass("sui-select-sm")?"sui-select-dropdown-sm":"",width:"100%"},this.props.options);if(this.props.data&&(a.data=this.props.data),this.props.loading&&(a.dropdownCssClass="sui-select-dropdown-sm sui-select-dropdown-loading"),this.props.placeholder&&(a.placeholder=this.props.placeholder),"function"==typeof this.$el.SUIselect2)this.$el.SUIselect2(a);else{if("function"!=typeof this.$el.FUIselect2)throw Error("SUI Select2 not initiated");this.$el.FUIselect2(a)}this.updateValue=this.updateValue.bind(this),this.$el.on("change",this.updateValue),this.props.triggerChange&&this.$el.trigger("change"),this.props.fetchOptions&&this.$el.on("select2:open",this.props.fetchOptions())}componentDidUpdate(e){if(this.$el=jQuery(this.el),e.data!==this.props.data){const e=[{id:"",text:""},...this.props.data],t=0;if("function"==typeof this.$el.SUIselect2)this.$el.empty().SUIselect2({data:e,placeholder:this.props.placeholder,minimumResultsForSearch:t}),this.$el.SUIselect2("open");else{if("function"!=typeof this.$el.FUIselect2)throw Error("SUI Select2 not initiated");this.$el.empty().FUIselect2({data:e,placeholder:this.props.placeholder,minimumResultsForSearch:t}),this.$el.FUIselect2("open")}}const t=_.isUndefined(e.settings[this.props.property])?e.defaultValue:e.settings[this.props.property],s=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property];t!==s&&this.$el.val(s).trigger("change.select2")}updateValue(e){const t=jQuery(e.target).val();"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,t):this.props.actions.settingsActions.updateSetting(this.props.property,t),this.afterSave(t)}afterSave(){return!1}componentWillUnmount(){this.$el.off("change",this.updateValue),this.$el.unbind().removeData()}render(){const e=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property],t=_.isUndefined(this.props.fieldClass)?"sui-form-field":"sui-form-field "+this.props.fieldClass,s=_.isUndefined(this.props.elementId)?this.props.property:this.props.elementId;let a;this.props.label&&(a=d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label," ",this.props.required&&d().createElement("span",{className:"sui-error"}," *"),this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note)));const r=this.props.multiple,i=this.props,{formType:n,updateProperty:o,noWrapper:l,fieldClass:p,staticContext:c,formDesign:u,fieldSize:m}=i,h=function(e,t){if(null==e)return{};var s,a,r=function(e,t){if(null==e)return{};var s={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;s[a]=e[a]}return s}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],-1===t.indexOf(s)&&{}.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}(i,Nl),f=d().createElement("select",Cl({id:`forminator-field-${s}`,className:"sui-select",ref:e=>this.el=e,value:e,multiple:r},h),this.props.children);let b=d().createElement("select",{id:`forminator-field-${s}`,className:"sui-select",ref:e=>this.el=e,defaultValue:e,multiple:r},this.props.children);return"md"===this.props.fieldsize||"medium"===this.props.fieldsize?b=d().createElement("div",{className:"sui-form-field sui-input-md"},f):"sm"===this.props.fieldsize||"small"===this.props.fieldsize?b=d().createElement("div",{className:"sui-form-field sui-input-sm"},f):_.isUndefined(this.props.fieldsize)||""===this.props.fieldsize||(b=d().createElement("div",{style:{width:"100%",maxWidth:this.props.fieldsize+"px"}},f)),this.props.noWrapper?f:d().createElement("div",{className:t},a,b,this.props.description&&d().createElement("span",{className:"sui-description",style:{marginTop:"10px"}},this.props.description))}}function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Sl.apply(null,arguments)}class Pl extends ea.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.state.type)||"group"!==this.props.state.type?"default":"above";return d().createElement(kl,Sl({},this.props,{settings:this.props.state,property:"description-position",defaultValue:e}),d().createElement("option",{value:"default"},(t=this.props,_.isUndefined(t.descriptionPosition)||"above"!==t.descriptionPosition?Na("Use form settings (Below inputs)"):Na("Use form settings (Above inputs)"))),d().createElement("option",{value:"above"},Na("Above Inputs")),d().createElement("option",{value:"below"},Na("Below Inputs")));var t}}class Ol extends ea.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.property)?"custom-class":this.props.property;let t="";"footer-custom-class"!==e||"receipt"!=this.props.state["form-template"]||_.isUndefined(this.props.state["custom-class"])||(t=this.props.state["custom-class"]);const s=_.isUndefined(this.props.state[e])?t:this.props.state[e];return d().createElement(u.Fragment,null,d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Additional CSS Classes")),d().createElement("span",{className:"sui-description"},Na("Add custom CSS classes to style this field’s container—great for adjusting spacing, colors, or layout.")," ",forminatorData.showDocLink&&Na("{{link}}Learn more{{/link}}",{components:{link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#additional-css-classes",target:"_blank",rel:"noreferrer"})}}))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("input",{type:"text",placeholder:Na("E.g. form-field"),className:"sui-form-control",value:s,onChange:t=>{this.props.updateProperty(e,t.target.value)}}),d().createElement("span",{className:"sui-description"},Na("Add one or more class names, separated by spaces. These apply to the field container.")))),Wa(this.props)&&d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Field Description Placement")),d().createElement("span",{className:"sui-description"},Na("Select where the description of this field should appear."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(Pl,this.props))))}}function Dl(){return Dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Dl.apply(null,arguments)}class Fl extends ea.Component{constructor(e){super(e)}render(){const e=d().Children.map(this.props.children,e=>e);let t="";this.props.label&&""!==this.props.label&&(t=d().createElement("span",{className:"sui-settings-label"+(!0===this.props.labelDark?" sui-dark":"")},this.props.label));let s="",a=10;_.isUndefined(this.props.descriptionSpacing)||""===this.props.descriptionSpacing||(a=this.props.descriptionSpacing),_.isUndefined(this.props.description)||""===this.props.description||(s=!1===this.props.sidebar?d().createElement("span",{className:"sui-description",style:{marginBottom:a+"px"}},this.props.description):d().createElement("span",{className:"sui-description"},this.props.description));let r="";(this.props.label&&""!==this.props.label||this.props.description&&""!==this.props.description)&&(r=d().createElement("div",{className:"sui-box-settings-col-1"},t,s));const i=this.props.lastChild?{marginBottom:0,borderBottom:"unset"}:{},n=_.isUndefined(this.props.id)?{}:{id:this.props.id};return d().createElement("div",Dl({},n,{className:"sui-box-settings-row",style:i}),(_.isUndefined(this.props.sidebar)||!1!==this.props.sidebar)&&r,d().createElement("div",{className:"sui-box-settings-col-2"},!_.isUndefined(this.props.sidebar)&&!1===this.props.sidebar&&t,!_.isUndefined(this.props.sidebar)&&!1===this.props.sidebar&&s,e))}}function Al(){return Al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Al.apply(null,arguments)}class Tl extends ea.Component{constructor(e){super(e),this.prefix=_.isUndefined(this.props.prefix)?"":this.props.prefix+"_",this.requiredProp=this.prefix+"required",this.requiredValProp=this.prefix+"required_message",this.requiredCValProp=this.prefix+"required_confirm_message",this.requiredCustomValue=this.prefix+"custom_value_error_message"}toggleValue(e){this.props.updateProperty(this.requiredProp,e)}render(){const e=!_.isUndefined(this.props.state[this.requiredProp])&&this.props.state[this.requiredProp],t=_.isUndefined(this.props.state[this.requiredValProp])?"":this.props.state[this.requiredValProp],s=_.isUndefined(this.props.state[this.requiredCValProp])?"":this.props.state[this.requiredCValProp],a=_.isUndefined(this.props.state.type)?"":this.props.state.type,r=_.isUndefined(forminatorData.default_required_messages[this.prefix+a])?Na("Enter required message"):forminatorData.default_required_messages[this.prefix+a],i="password"===a&&!_.isUndefined(this.props.state["confirm-password"])&&this.props.state["confirm-password"],n=_.includes(["select","checkbox","radio"],a)&&!_.isUndefined(this.props.state.enable_custom_option)&&this.props.state.enable_custom_option,o=_.isUndefined(this.props.state[this.requiredCustomValue])?"":this.props.state[this.requiredCustomValue];return d().createElement(Fl,{label:Na("Required"),labelDark:!0,description:Na("Force users to fill out this field, otherwise it will be optional."),descriptionSpacing:20,sidebar:!1},d().createElement("div",{className:"sui-tabs sui-side-tabs",style:{marginTop:"10px"}},d().createElement("div",{className:"sui-tabs-menu"},d().createElement("div",{className:"sui-tab-item"+(e?"":" active"),onClick:this.toggleValue.bind(this,!1)},Na("Optional")),d().createElement("div",{className:"sui-tab-item"+(e?" active":""),onClick:this.toggleValue.bind(this,!0)},Na("Required"))),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-boxed"+(e?" active":"")},d().createElement("div",Al({className:"sui-form-field"},!i&&!(e&&"select"===a)&&{style:{marginBottom:0}}),"password"===a&&d().createElement("label",{htmlFor:"forminator-field-name-error-msg",className:"sui-label"},Na("Password error message")),"password"!==a&&d().createElement("label",{htmlFor:"forminator-field-name-error-msg",className:"sui-label"},Na("Error message")),d().createElement("input",{type:"text",value:t,placeholder:r,id:"forminator-field-name-error-msg",className:"sui-form-control",onChange:e=>{this.props.updateProperty(this.requiredValProp,e.target.value)}})),n&&d().createElement("div",{style:{marginTop:"30px"}},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{htmlFor:"forminator-field-name-error-msg",className:"sui-label"},Na("‘Other’ Field validation message")),d().createElement("input",{type:"text",value:o,placeholder:Na("Please, enter a custom value"),id:"forminator-field-name-error-msg",className:"sui-form-control",onChange:e=>{this.props.updateProperty(this.requiredCustomValue,e.target.value)}}))),i&&d().createElement("div",{className:"sui-form-field",style:{marginBottom:0}},d().createElement("label",{htmlFor:"forminator-confirm-error-msg",className:"sui-label"},Na("Confirm Password error message")),d().createElement("input",{type:"text",value:s,placeholder:Na("Enter confirm password message"),id:"forminator-confirm-error-msg",className:"sui-form-control",onChange:e=>{this.props.updateProperty(this.requiredCValProp,e.target.value)}})),d().createElement("div",Al({role:"alert",className:"sui-notice sui-notice-warning "+(e&&"select"===a?" sui-active":""),"aria-live":"assertive"},e&&"select"===a&&{style:{display:"block"}}))))))}}class Ml extends ea.Component{constructor(e){super(e);const t=_.isUndefined(this.props.prefix)?"":this.props.prefix+"_";this.validProp=t+"validation",this.validTextProp=t+"validation_message"}toggleValue(e){this.props.updateProperty(this.validProp,e)}render(){const e=!_.isUndefined(this.props.state[this.validProp])&&this.props.state[this.validProp],t=_.isUndefined(this.props.state[this.validTextProp])?"":this.props.state[this.validTextProp];return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Validate")),d().createElement("span",{className:"sui-description"},Na("Make sure the user has filled out this field correctly and warn them when they haven't.")),d().createElement("div",{className:"sui-side-tabs",style:{marginTop:"10px"}},d().createElement("div",{className:"sui-tabs-menu"},d().createElement("div",{className:"sui-tab-item"+(e?"":" active"),onClick:this.toggleValue.bind(this,!1)},Na("None")),d().createElement("div",{className:"sui-tab-item"+(e?" active":""),onClick:this.toggleValue.bind(this,!0)},Na("Validate Field"))),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content sui-tab-boxed"+(e?" active":"")},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{htmlFor:"forminator-field-name-error-msg",className:"sui-label"},Na("Validation message")),d().createElement("input",{type:"text",id:"forminator-field-name-error-msg",className:"sui-form-control",placeholder:Na("Enter validation message"),value:t,onChange:e=>{this.props.updateProperty(this.validTextProp,e.target.value)}})))))))}}function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},jl.apply(null,arguments)}class Ul extends ea.Component{constructor(e){super(e)}render(){const e=!_.isUndefined(this.props.state.required)&&this.props.state.required;return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Confirm Email error messages")),d().createElement("span",{className:"sui-description"},Na("Use this option to customize error messages for the Confirm Email field, ensuring users enter a matching email address.")),d().createElement("div",{className:"sui-side-tabs",style:{marginTop:"10px"}},d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content sui-tab-boxed active"},e&&d().createElement(ol,jl({},this.props,{settings:this.props.state,label:Na("Error message for empty Confirm Email field"),placeholder:Na("You must confirm your email address"),property:"required_confirm_message"})),d().createElement(ol,jl({},this.props,{settings:this.props.state,label:Na("Email mis-match error message"),placeholder:Na("Enter validation message"),property:"confirm-email-mismatch"})))))))}}function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Vl.apply(null,arguments)}class $l extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}componentDidMount(){this.props.characterLimit&&(this.$textarea=jQuery(this.textarea),this.$textarea.on("input",e=>{const t=this.$textarea.val().length;this.$textarea.siblings(".forminator-character-limit").find(".forminator-character-count").text(t)}))}render(){const e=_.isUndefined(this.props.settings[this.props.property])?"":this.props.settings[this.props.property],t={minHeight:this.props.height?this.props.height:"auto"};let s="";return this.props.label&&(s=d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note))),d().createElement("div",{className:"sui-form-field"},s,this.props.topDescription&&d().createElement("span",{className:"sui-description"},this.props.topDescription),d().createElement("textarea",Vl({id:`forminator-field-${this.props.property}`,className:"sui-form-control",style:t,placeholder:this.props.placeholder,defaultValue:e,onChange:e=>{this.updateValue(e.target.value)},ref:e=>this.textarea=e,onBlur:this.props.onBlur??null},this.props.characterLimit&&{maxlength:this.props.characterLimit})),this.props.characterLimit&&d().createElement("span",{className:"forminator-character-limit"},Na("{{span}}0{{/span}} / {{limit/}} characters",{components:{span:d().createElement("span",{className:"forminator-character-count"}),limit:d().createElement(d().Fragment,null,this.props.characterLimit)}})),this.props.description&&d().createElement("span",{className:"sui-description"},this.props.description))}}function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Il.apply(null,arguments)}class Rl extends ea.Component{constructor(e){super(e)}toggleValue(e){this.props.updateProperty("filter_type",e)}validateEmails(e,t){let s=e.target.value;s&&(s=s.replace(/  /g," ").replace(/\\n\\n/g,"\n"),s=s.split(",").map(e=>e.replace(/^ +| $/g,"").replace(/ /g,", ").replace(/([^ ][^,])\n/g,"$1, \n")).filter(e=>e).join(", "),e.target.value=s,this.props.updateProperty(t,s))}render(){const e=_.isUndefined(this.props.state.filter_type)||!["allow","deny"].includes(this.props.state.filter_type)?"none":this.props.state.filter_type,t=d().createElement("div",{className:"sui-form-field"},d().createElement(ol,Il({},this.props,{settings:this.props.state,label:Na("Error message"),property:"filter-error",placeholder:Na("Enter error message"),defaultValue:Na("This email is not allowed. Please use a different one.")}))),s=d().createElement(d().Fragment,null,Na("Enter email addresses and domains to block, separated by commas. Use * for advanced filtering. E.g., user@example.com, @example.com, *.com, *no-reply*")," ",forminatorData.showDocLink&&Na("{{link}}learn more{{/link}}",{components:{link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#filter-email-providers",target:"_blank"})}})),a=d().createElement(d().Fragment,null,Na("Enter email addresses and domains to allow, separated by commas. Use * for advanced filtering. E.g., user@example.com, @example.com, *.com, admin@*, hr@*.com")," ",forminatorData.showDocLink&&Na("{{link}}learn more{{/link}}",{components:{link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#filter-email-providers",target:"_blank"})}}));return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Filter email providers")),d().createElement("span",{className:"sui-description"},Na("Use this option to allow or prevent email providers or domains from submitting this form.")),d().createElement("div",{className:"sui-side-tabs",style:{marginTop:"10px"}},d().createElement("div",{className:"sui-tabs-menu"},d().createElement("div",{className:"sui-tab-item"+("none"===e?" active":""),onClick:this.toggleValue.bind(this,"none")},Na("None")),d().createElement("div",{className:"sui-tab-item"+("deny"===e?" active":""),onClick:this.toggleValue.bind(this,"deny")},Na("Deny-list")),d().createElement("div",{className:"sui-tab-item"+("allow"===e?" active":""),onClick:this.toggleValue.bind(this,"allow")},Na("Allow-list"))),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content sui-tab-boxed"+("deny"===e?" active":"")},d().createElement($l,Il({},this.props,{settings:this.props.state,placeholder:Na("E.g., user@example.com"),property:"denylist",height:100,topDescription:s,onBlur:e=>{this.validateEmails(e,"denylist")}})),"deny"===e&&t),d().createElement("div",{className:"sui-tab-content sui-tab-boxed"+("allow"===e?" active":"")},d().createElement($l,Il({},this.props,{settings:this.props.state,placeholder:Na("E.g., user@example.com"),property:"allowlist",height:100,topDescription:a,onBlur:e=>{this.validateEmails(e,"allowlist")}})),"allow"===e&&t)))))}}function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ll.apply(null,arguments)}class Bl extends ea.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.prefix)?"":this.props.prefix+"_",t=_.isUndefined(this.props.notice)||""===this.props.notice?Na("{{b}}Note:{{/b}} Using WordPress Reserved Terms as query parameters may cause unexpected form behavior. Find the complete list of {{link}}{{icon/}} WordPress Reserved Terms here{{/link}}.",{components:{b:d().createElement("b",null),link:d().createElement("a",{href:"https://codex.wordpress.org/Reserved_Terms",target:"_blank"}),icon:d().createElement("span",{className:"sui-icon-open-new-window","aria-hidden":"true"})}}):this.props.notice,s=d().createElement(d().Fragment,null,Na("Automatically fill this field using a value passed through your form URL. Enter the query parameter key used in your URL—for example, email in ?email=value. When the form loads, the field will be filled with the matching value.")," ",forminatorData.showDocLink&&Na("{{link}}Learn more{{/link}}",{components:{link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#pre-populate-form-field-values",target:"_blank",rel:"noreferrer"})}}));return d().createElement(Fl,{label:Na("Pre-populate"),labelDark:!0,description:s,descriptionSpacing:20,sidebar:!1},d().createElement(ol,Ll({},this.props,{settings:this.props.state,label:Na("Query parameter (optional)"),description:t,placeholder:Na("E.g. query_parameter_key"),property:`${e}prefill`,inputStyles:{maxWidth:"240px"}})))}}class zl extends ea.Component{constructor(e){super(e)}toggleValue(e,t){this.props.updateProperty(e,t)}render(){const e=(_.isUndefined(this.props.prefix)?"":this.props.prefix+"_")+"browser_autofill",t=_.isUndefined(this.props.default)?"enabled":this.props.default,s=_.isUndefined(this.props.state[e])?t:this.props.state[e];return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Enable browser autofill")),d().createElement("span",{className:"sui-description"},Na("Allow browsers to automatically fill this field when the form loads.")),d().createElement("div",{className:"sui-side-tabs",style:{marginTop:"10px"}},d().createElement("div",{className:"sui-tabs-menu"},d().createElement("div",{className:"sui-tab-item"+("enabled"===s?" active":""),onClick:this.toggleValue.bind(this,e,"enabled")},Na("Enable")),d().createElement("div",{className:"sui-tab-item"+("disabled"===s?" active":""),onClick:this.toggleValue.bind(this,e,"disabled")},Na("Disable"))))))}}class Wl extends ea.Component{constructor(e){super(e)}render(){const e=!_.isUndefined(this.props.state["confirm-email"])&&this.props.state["confirm-email"],{type:t}=this.props;switch(t){case"labels":return d().createElement(cl,this.props);case"settings":return d().createElement("div",null,d().createElement(Tl,this.props),d().createElement(Ml,this.props),e&&d().createElement(Ul,this.props),d().createElement(Rl,this.props),d().createElement(Bl,this.props),d().createElement(zl,this.props));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null,Na("Wrong field type!"))}}}function Hl(){return Hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Hl.apply(null,arguments)}class ql extends ea.Component{constructor(e){super(e)}toggleValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e),"function"==typeof this.props.onChange&&this.props.onChange(e)}getDefaultValue(){const e=this.props.default?this.props.default:"";return _.isUndefined(this.props.settings[this.props.property])?e:this.props.settings[this.props.property]}render(){const e=this.getDefaultValue(),t=d().Children.map(this.props.children,t=>{if(!t)return d().createElement(ea.Fragment,null);const s=_.isUndefined(t.props.label)?t.props.children:t.props.label,a=_.isUndefined(this.props.tooltip)?"":this.props.tooltip,r=_.isUndefined(t.props.id)?{}:{id:t.props.id+"-tab"};return this.props.disabled?a?d().createElement("div",{className:"sui-tooltip","data-tooltip":a},d().createElement("div",Hl({},r,{className:"sui-tab-item"+(t.props.value===e?" active":""),style:{opacity:.5,cursor:"not-allowed"}}),s)):d().createElement("div",Hl({},r,{className:"sui-tab-item"+(t.props.value===e?" active":""),style:{opacity:.5,cursor:"not-allowed"}}),s):this.props.disabled?void 0:d().createElement("div",Hl({},r,{className:"sui-tab-item"+(t.props.value===e?" active":"")+(a?" sui-tooltip":""),onClick:this.toggleValue.bind(this,t.props.value),"data-tooltip":a}),s)}),s=_.isUndefined(this.props.divClass)?"sui-tabs-content":"sui-tabs-content "+this.props.divClass,a=d().Children.map(this.props.children,t=>{if(!t)return d().createElement(ea.Fragment,null);const s=_.isUndefined(t.props.boxClass)?"":t.props.boxClass,a=_.isUndefined(t.props.id)?{}:{id:t.props.id+"-content"};if("Empty"!==t.type.name){let r="";return t.props.hasImage&&(t.props.image1x&&t.props.image2x&&(r=d().createElement("img",{src:`${forminatorData.imagesUrl}/${t.props.image1x}`,srcSet:`${forminatorData.imagesUrl}/${t.props.image1x} 1x,\n\t\t\t\t\t\t\t${forminatorData.imagesUrl}/${t.props.image2x} 2x`,"aria-hidden":"true"})),t.props.image1x&&!t.props.image2x&&(r=d().createElement("img",{src:`${forminatorData.imagesUrl}/${t.props.image1x}`,"aria-hidden":"true"})),t.props.image2x&&!t.props.image1x&&(r=d().createElement("img",{src:`${forminatorData.imagesUrl}/${t.props.image2x}`,srcSet:`${forminatorData.imagesUrl}/${t.props.image2x} 2x`}))),d().createElement("div",Hl({},a,{className:s+" sui-tab-content"+(t.props.value===e?" active":"")}),r,t.props.value===e&&t)}return d().createElement(ea.Fragment,null)});let r="";this.props.label&&""!==this.props.label&&(r=d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"}," ",this.props.note)));let i="";if(this.props.settingsLabel&&""!==this.props.settingsLabel){const e=this.props.labelClass?this.props.labelClass:"sui-settings-label";i=d().createElement("label",{className:e},this.props.settingsLabel,this.props.tooltipDescription&&d().createElement("span",Hl({class:"fui-tooltip-description sui-tooltip sui-tooltip-constrained"},this.props.tooltipWidth&&{style:{"--tooltip-width":this.props.tooltipWidth}},{"data-tooltip":this.props.tooltipDescription,"aria-hidden":"true"}),d().createElement("i",{className:"sui-icon-info","aria-hidden":"true"})))}let n="";this.props.description&&""!==this.props.description&&(n=d().createElement("span",{className:"sui-description",style:{marginBottom:10}},this.props.description));let o=_.isUndefined(this.props.wrapperClass)?"":this.props.wrapperClass;o=this.props.basicTabs?`sui-tabs sui-tabs-overflow ${o}`:`sui-side-tabs ${o}`;let l=d().createElement("div",{className:o},d().createElement("div",{className:"sui-tabs-menu"},t),d().createElement("div",{className:s},a));return this.props.simple||(l=d().createElement("div",{className:"sui-form-field"},i,r,n,d().createElement("div",{className:o},d().createElement("div",{className:"sui-tabs-menu"},t),d().createElement("div",{className:s},a)))),l}}class Ql extends ea.Component{constructor(e){super(e)}render(){const e=d().Children.map(this.props.children,e=>e);return d().createElement("div",null,e)}}function Yl(){return""}function Gl(){return Gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Gl.apply(null,arguments)}class Kl extends ea.Component{constructor(e){super(e)}render(){const e={action:"forminator_geolocation_check_api",_ajax_nonce:forminatorData.geolocation.nonce};po.post(forminatorData.ajaxUrl,uo().stringify(e)).then(e=>{e.data.success||jQuery("#forminator-geolocation-api-invalid").show()});Pa(this.props.wrappers);const t=Ia(forminatorData.userPermissions.manage_forminator_settings)||Ia(forminatorData.userPermissions.manage_options);return d().createElement(ea.Fragment,null,d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",id:"forminator-geolocation-api-invalid","aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Failed to connect to the Google Maps API. Please ensure you have entered a valid API key in the {{link}}Settings page{{/link}}.",{components:{link:t?d().createElement("a",{href:forminatorData.settingsUrl+"&section=geolocation",target:"_blank"}):d().createElement("b",null)}}))))),d().createElement(Fl,{label:Na("Autocomplete"),labelDark:!0,description:Na("Enable this option to integrate Google Maps' address auto-completion service into your addresses field. This powerful feature will simplify the address entry process for users by providing real-time suggestions as they type."),descriptionSpacing:20,sidebar:!1},d().createElement(ql,Gl({},this.props,{property:"auto_suggest",settings:this.props.state,default:"disable",simple:!0}),d().createElement(Yl,{value:"enable"},Na("Enable")),d().createElement(Yl,{value:"disable"},Na("Disable")))),d().createElement(Fl,{label:Na("Display address on Map"),labelDark:!0,description:Na("Use this option to display a Google Map next to your address field(s), showing the entered address. Users will be able to see their selected address on the map."),descriptionSpacing:20,sidebar:!1},d().createElement(ql,Gl({},this.props,{property:"show_map",settings:this.props.state,default:"hide",simple:!0}),d().createElement(Ql,Gl({},this.props,{label:Na("Show"),settings:this.props.state,value:"show",boxClass:"sui-tab-boxed"}),d().createElement(Fl,{label:Na("Map position"),labelDark:!0,description:Na("The map is displayed at the bottom of the address field by default. You can also set it to be displayed above the address field below."),descriptionSpacing:20,sidebar:!1},d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(kl,Gl({},this.props,{settings:this.props.state,property:"map_placement",defaultValue:"after"}),d().createElement("option",{value:"before"},Na("Above Address field(s)")),d().createElement("option",{value:"after"},Na("Below Address field(s)")))))),d().createElement(Fl,{label:Na("Map Size"),labelDark:!0,description:Na("Set the size of your map."),descriptionSpacing:20,sidebar:!1},d().createElement(ql,Gl({},this.props,{property:"map_size",settings:this.props.state,default:"responsive",simple:!0}),d().createElement(Yl,{value:"responsive"},Na("Responsive")),d().createElement(Ql,Gl({},this.props,{label:Na("Custom Size"),settings:this.props.state,value:"custom",boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Gl({},this.props,{settings:this.props.state,label:Na("Height"),note:"px",type:"number",isPositive:"true",placeholder:Na("Enter Height"),property:"map_height",defaultValue:"300"}))),d().createElement(il,{cols:"6"},d().createElement(ol,Gl({},this.props,{settings:this.props.state,label:Na("Width"),note:"px",type:"number",isPositive:"true",placeholder:Na("Enter Width"),property:"map_width",defaultValue:"300"}))))))),d().createElement(Fl,{label:Na("Default map location"),labelDark:!0,description:Na("By default we show a 0.0 latitude and longitude on the map, you can use the option below to specify a default geolocation to display on the Map."),descriptionSpacing:20,sidebar:!1},d().createElement(ql,Gl({},this.props,{property:"map_location",settings:this.props.state,default:"default",simple:!0}),d().createElement(Yl,{value:"default"},Na("Default location")),d().createElement(Ql,Gl({},this.props,{label:Na("Custom location"),settings:this.props.state,value:"custom",boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Gl({},this.props,{settings:this.props.state,property:"default_coordinates",label:Na("Enter coordinates"),placeholder:Na("E.g., 1.234567, 9.876543"),description:Na("To get coordinates, visit {{link}}https://map.google.com{{/link}} navigate to your preferred location, and right-click on any point and click on the first option with digits.",{components:{link:d().createElement("a",{href:"https://map.google.com",target:"_blank"})}})})))))))),d().createElement(Yl,{value:"hide"},Na("Hide")))))}}class Jl extends ea.Component{constructor(e){super(e)}render(){const e=forminatorData.isPro?`${forminatorData.pluginUrl}/assets/images/forminator-disabled.png`:this.props.addonImg,t=forminatorData.isPro?`${forminatorData.pluginUrl}/assets/images/forminator-disabled@2x.png`:this.props.addonImg;return d().createElement(ea.Fragment,null,d().createElement(rl,null,forminatorData.showBranding&&d().createElement(il,{cols:"12"},d().createElement("p",{className:"sui-block-content-center"},d().createElement("img",{src:e,srcSet:`${e} 1x, ${t} 2x`,className:"sui-image sui-image-center",style:{borderRadius:"50%",width:forminatorData.isPro?"auto":"60px"}}))),d().createElement(il,{cols:"12"},d().createElement("p",{className:"sui-block-content-center",style:{maxWidth:"600px",margin:"15px auto"}},d().createElement("small",null,this.props.text))),d().createElement(il,{cols:"12"},d().createElement("p",{className:"sui-block-content-center"},forminatorData.isPro&&d().createElement("a",{href:forminatorData.adminUrl+"admin.php?page=forminator-addons",target:"_blank",className:"sui-button sui-button-blue"},Na("Get the Add-on")),!forminatorData.isPro&&d().createElement("a",{href:this.props.addonUrl,target:"_blank",className:"sui-button sui-button-purple"},Na("Upgrade to PRO{{icon/}}",{components:{icon:d().createElement("span",{className:"sui-icon-open-new-window sui-sm","aria-hidden":"true",style:{margin:0}})}}))))))}}class Zl extends ea.Component{constructor(e){super(e),this.state={active:this.props.default?this.props.default:"",type:this.props.type?this.props.type:"side-tabs"}}toggleValue(e){this.setState({active:e})}componentDidMount(){"tabs"===this.state.type&&SUI.tabsOverflow(jQuery(this.el))}render(){let e=this.props.extraClass?this.props.extraClass:"";"tabs"===this.state.type&&(e+=" sui-tabs-overflow");const t=d().Children.map(this.props.children,e=>{if(!_.isUndefined(e)&&!_.isNull(e))return d().createElement("div",{className:"forminator-toggle sui-tab-item"+(e.props.value===this.state.active?" active":""),onClick:this.toggleValue.bind(this,e.props.value)},e.props.label," ",e.props.required&&d().createElement("span",{className:"sui-error"},"*"))}),s=d().Children.map(this.props.children,e=>{if(_.isUndefined(e)||_.isNull(e))return;const t=_.isUndefined(e.props.boxClass)?"sui-tab-content":e.props.boxClass;return d().createElement("div",{className:t+(e.props.value===this.state.active?" active":"")},e.props.value===this.state.active&&e)});return d().createElement("div",{className:`sui-${this.state.type} ${e}`,ref:e=>this.el=e},"tabs"===this.state.type&&d().createElement("div",{tabindex:"-1",class:"sui-tabs-navigation","aria-hidden":"true"},d().createElement("button",{type:"button",class:"sui-button-icon sui-tabs-navigation--left sui-tabs-navigation--hidden"},d().createElement("span",{class:"sui-icon-chevron-left"})),d().createElement("button",{type:"button",class:"sui-button-icon sui-tabs-navigation--right sui-tabs-navigation--hidden"},d().createElement("span",{class:"sui-icon-chevron-right"}))),d().createElement("div",{role:"tablist",className:"sui-tabs-menu"},t),d().createElement("div",{className:"sui-tabs-content"},s))}}function Xl(){return Xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Xl.apply(null,arguments)}class ep extends ea.Component{constructor(e){super(e),this.multiFields=[{slug:"street_address",label:Na("Address")},{slug:"address_line",label:Na("Apartment, suite, etc.")},{slug:"address_city",label:Na("City")},{slug:"address_state",label:Na("State / Province")},{slug:"address_zip",label:Na("ZIP / Postal code")},{slug:"address_country",label:Na("Country")}]}hasChildrens(e){const t=_.filter(e,e=>!_.isUndefined(e));return!_.isEmpty(t)}render(){const{type:e}=this.props;Na("Note: The query parameter's value passed in URL should match with the {{link}}alpha-2 country code{{/link}} of the country you want to pre-populate dynamically.",{components:{link:d().createElement("a",{href:"https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes",target:"_blank"})}});switch(e){case"labels":return d().createElement("div",{className:"sui-accordion sui-accordion-flushed",value:"multiple"},this.multiFields.map((e,t)=>"address_country"===e.slug?d().createElement(ll,Xl({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Xl({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:e.slug+"_label"}))),d().createElement(il,{cols:"6"},d().createElement(fl,Xl({},this.props,{settings:this.props.state,label:Na("Default Value (optional)"),"data-placeholder":Na("Enter placeholder"),property:e.slug+"_placeholder"}),d().createElement("option",null),_.map(forminatorData.countries,(e,t)=>d().createElement("option",{value:e,key:t},e))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Xl({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:e.slug+"_description"})))))):"address_country"!==e.slug?d().createElement(ll,Xl({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Xl({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:e.slug+"_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,Xl({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:e.slug+"_placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Xl({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:e.slug+"_description"})))))):void 0));case"settings":let e;const t=this.multiFields.map((t,s)=>{if(!_.isUndefined(this.props.state[t.slug])&&this.props.state[t.slug])return _.isEmpty(e)&&(e=t.slug),d().createElement(il,{cols:"12",label:ml(t.label),settings:this.props.state,value:t.slug,required:this.props.state[t.slug+"_required"],boxClass:"sui-tab-boxed",key:s},d().createElement(Tl,Xl({},this.props,{prefix:t.slug})),d().createElement(Bl,Xl({},this.props,{prefix:t.slug})),d().createElement(zl,Xl({},this.props,{prefix:t.slug})))});return this.hasChildrens(t)?d().createElement(Zl,{default:e},t):d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"none"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("At least one field must be enabled")))));case"geolocation":return forminatorData.geolocation?d().createElement(Kl,this.props):d().createElement(Jl,Xl({},this.props,{text:forminatorData.isPro?Na("The Autocomplete feature simplifies entering addresses by offering real-time suggestions as you type. This feature requires the Forminator Geolocation Add-on."):Na("Collect your form submitters' location information, and provide address auto-completion using Google Maps API."),addonUrl:"https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-builder_geolocation-addon",addonImg:"https://wpmudev.com/wp-content/uploads/2023/08/Geolocation-logo.png"}));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}class tp extends ea.Component{constructor(e){super(e)}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}render(){const e=_.isUndefined(this.props.radioClass)?"sui-radio":"sui-radio "+this.props.radioClass,t=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property],s=d().Children.map(this.props.children,s=>{let a="";const r=_.isUndefined(s.props.label)?s.props.children:s.props.label;return s.props.image1x&&s.props.image2x&&(a=d().createElement("img",{src:`${forminatorData.imagesUrl}/${s.props.image1x}`,srcSet:`${forminatorData.imagesUrl}/${s.props.image1x} 1x,\n\t\t\t\t\t\t\t${forminatorData.imagesUrl}/${s.props.image2x} 2x`,"aria-hidden":"true"})),s.props.image1x&&!s.props.image2x&&(a=d().createElement("img",{src:`${forminatorData.imagesUrl}/${s.props.image1x}`,"aria-hidden":"true"})),s.props.image2x&&!s.props.image1x&&(a=d().createElement("img",{src:`${forminatorData.imagesUrl}/${s.props.image2x}`,srcSet:`${forminatorData.imagesUrl}/${s.props.image2x} 2x`,"aria-hidden":"true"})),s.props.hasImage?d().createElement("label",{htmlFor:`forminator-field-${s.props.value}`,className:"sui-radio-image"},a,d().createElement("span",{className:e},d().createElement("input",{type:"radio",name:`forminator-${this.props.property}`,value:s.props.value,id:`forminator-field-${s.props.value}`,checked:t===s.props.value,onChange:this.updateValue.bind(this,s.props.value)}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",null,r))):s.props.hasImage?void 0:d().createElement("label",{htmlFor:`forminator-field-${s.props.value}`,className:e},d().createElement("input",{type:"radio",name:`forminator-${this.props.property}`,id:`forminator-field-${s.props.value}`,value:s.props.value,checked:t===s.props.value,onChange:this.updateValue.bind(this,s.props.value)}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",null,r))}),a=d().Children.map(this.props.children,e=>"true"!==this.props.radioContent||_.isUndefined(e.props.children)?d().createElement(ea.Fragment,null):d().createElement("div",{className:"sui-border-frame"+(e.props.value===t?"":" sui-hidden"),style:{marginLeft:"0"}},e.props.value===t&&e));let r="";this.props.label&&""!==this.props.label&&(r=d().createElement("label",{className:"sui-label"},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note)));let i="";this.props.description&&""!==this.props.description&&(i=d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},this.props.description));let n="";this.props.settingsLabel&&""!==this.props.settingsLabel&&(n=d().createElement("label",{className:"sui-settings-label"},this.props.settingsLabel));let o="";return this.props.settingsDesc&&""!==this.props.settingsDesc&&(o=d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},this.props.settingsDesc)),this.props.noWrapper?s:d().createElement(ea.Fragment,null,d().createElement("div",{role:"radiogroup",className:"sui-form-field"},r,n,i,o,s,a))}}function sp(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,a)}return s}function ap(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?sp(Object(s),!0).forEach(function(t){rp(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):sp(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}function rp(e,t,s){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var a=s.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}class ip extends ea.Component{constructor(e){super(e),this.textEditor=d().createRef(),this.updateValue=this.updateValue.bind(this),this.updateEditor=this.updateEditor.bind(this),this.toggleOptions=this.toggleOptions.bind(this),this.state={editorOptionsOpen:!1}}componentDidMount(){this.$el=jQuery(this.el),_.isUndefined(this.props.defaultValue)||this.updateValue(this.props.defaultValue),setTimeout(()=>{this.initEditor()},50)}initEditor(){if(_.isUndefined(wp.editor)||"undefined"==typeof tinyMCE)return void setTimeout(()=>{this.initEditor()},50);let e={};_.isUndefined(this.props.allowButtonOnclick)||(e.extended_valid_elements="button[onclick|accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|style|tabindex|title|type|value]"),_.isUndefined(this.props.cutomTinymce)||(e.toolbar1=this.props.cutomTinymce),_.isEmpty(e)&&(e=!0),wp.editor.initialize(`forminator-field-${this.props.property+(_.isUndefined(this.props.extraId)?"":this.props.extraId)}`,{tinymce:e,quicktags:!0}),this.bindEvents()}bindEvents(){this.editor=tinyMCE.get(`forminator-field-${this.props.property+(_.isUndefined(this.props.extraId)?"":this.props.extraId)}`),null!==this.editor?(this.editor.on("keyup",this.updateEditor),this.editor.on("change",this.updateEditor)):setTimeout(()=>{this.bindEvents()},50)}componentWillUnmount(){this.$el.off("change",this.updateEditor),wp.editor.remove(`forminator-field-${this.props.property+(_.isUndefined(this.props.extraId)?"":this.props.extraId)}`),this.$el.unbind().removeData()}updateEditor(){const e=this.editor.getContent();this.updateValue(e)}updateValue(e){let t={ADD_ATTR:["target"]};"variations"===this.props.property&&(t=ap(ap({},t),{ADD_TAGS:["iframe"]})),"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,Xs.sanitize(e,t)):this.props.actions.settingsActions.updateSetting(this.props.property,Xs.sanitize(e,t))}toggleOptions(){this.state.editorOptionsOpen?this.setState({editorOptionsOpen:!1}):this.setState({editorOptionsOpen:!0})}insertContent(e){if(this.editor.hidden){const t=jQuery(this.textEditor),s=t.prop("selectionStart"),a=t.prop("selectionEnd"),r=t.val();t.val(r.substring(0,s)+"{"+e+"}"+r.substring(a,r.length)),t.trigger("change")}else this.editor.insertContent("{"+e+"}");this.toggleOptions()}getDisabledFields(){let e=["captcha","product","hidden","page-break","postdata","total","upload","stripe","stripe-ocs","paypal","password"];return!_.isUndefined(this.props.enablePostData)&&this.props.enablePostData&&!_.isUndefined(this.props.enableUpload)&&this.props.enableUpload&&(e=["captcha","product","hidden","page-break","total","stripe","stripe-ocs","paypal","password"]),e}getFields(){const e=this.getDisabledFields(),t=!_.isUndefined(this.props.excludeSubFields)&&this.props.excludeSubFields;let s=this.props.wrappers;return _.isUndefined(this.props.enableParentForm)||_.isUndefined(forminatorData.parentFormFields)||(s=forminatorData.parentFormFields),Pa(s,e,void 0,void 0,t)}getFormData(){const e=this.getFields(),t=!!_.isUndefined(this.props.allowRepeater)||this.props.allowRepeater,s=_.map(e,(e,s)=>{if(e.required&&(t||!t&&_.isEmpty(e.parent_group)))return d().createElement("li",{className:"wpmudev-dropdown--option",key:s},d().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,e.element_id)},ml(e.label)))}),a=_.isUndefined(this.props.settings.type)?"":this.props.settings.type,r=_.map(e,(e,s)=>{if(!e.required&&a!==e.field_type&&(t||!t&&_.isEmpty(e.parent_group)))return d().createElement("li",{className:"wpmudev-dropdown--option",key:s},d().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,e.element_id)},ml(e.label)))});return d().createElement(ea.Fragment,null,s&&s.some(function(e){return void 0!==e})&&d().createElement(ea.Fragment,null,d().createElement("li",{className:"wpmudev-dropdown--option"},d().createElement("strong",null,Na("Required Fields"))),d().createElement(ea.Fragment,null,s)),r&&r.some(function(e){return void 0!==e})&&d().createElement(ea.Fragment,null,d().createElement("li",{className:"wpmudev-dropdown--option"},d().createElement("strong",null,Na("Optional Fields"))),d().createElement(ea.Fragment,null,r)))}getMiscData(){const e=_.isEmpty(this.props.editorOptions)?[]:this.props.editorOptions;return d().createElement(ea.Fragment,null,d().createElement("li",{className:"wpmudev-dropdown--option"},d().createElement("strong",null,Na("Misc Data"))),_.map(e,(e,t)=>d().createElement("li",{className:"wpmudev-dropdown--option",key:t},d().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,t)},e))))}hasSubscriptionPlans(e){let t=!1;return e.map(e=>{_.isUndefined(e.payments)||e.payments.map(e=>{_.isUndefined(e.payment_method)||"subscription"!==e.payment_method||(t=!0)})}),t}getPaymentData(){let e=this.props.wrappers;_.isUndefined(this.props.enableParentForm)||_.isUndefined(forminatorData.parentFormFields)||(e=forminatorData.parentFormFields);const t=ga("paypal",e),s=ga("stripe",e),a=_.isEmpty(this.props.paymentOptions)?[]:this.props.paymentOptions,r=_.isEmpty(this.props.stripeSubscriptionOptions)?[]:this.props.stripeSubscriptionOptions;if(!_.isEmpty(t)||!_.isEmpty(s))return d().createElement(ea.Fragment,null,this.props.paymentOptions&&d().createElement("li",{className:"wpmudev-dropdown--option"},d().createElement("strong",null,Na("Payment Data"))),_.map(a,(e,t)=>d().createElement("li",{className:"wpmudev-dropdown--option",key:t},d().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,t)},e))),!_.isEmpty(s)&&this.hasSubscriptionPlans(s)&&_.map(r,(e,t)=>d().createElement("li",{className:"wpmudev-dropdown--option",key:t},d().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,t)},e))))}getEditorOptions(){if(this.props.hideEditorOptions)return"";const e=this.props.disableMiscData?"":this.getMiscData(),t=this.props.enableFormData?this.getPaymentData():"",s=this.props.enableFormData?this.getFormData():"",a=this.props.mainOptions?this.props.mainOptions:{form_name:Na("Form Name")};return d().createElement("ul",{className:this.state.editorOptionsOpen?"sui-active":""},this.props.enableAllFormFields&&d().createElement("li",{className:"wpmudev-dropdown--option"},d().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,"all_fields")},Na("All Form Fields"))),this.props.enableAllNonFormFields&&d().createElement("li",{className:"wpmudev-dropdown--option"},d().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,"all_non_empty_fields")},Na("All Non Empty Fields"))),s,d().createElement(ea.Fragment,null,this.props.mainOptionsLabel&&d().createElement("li",{className:"wpmudev-dropdown--option"},d().createElement("strong",null,this.props.mainOptionsLabel)),_.map(a,(e,t)=>d().createElement("li",{className:"wpmudev-dropdown--option",key:t},d().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,t)},e)))),e,t)}isValid(e){return this.props.isRequired?this.props.isRequired&&!_.isEmpty(e):!!_.isUndefined(this.props.isPositive)||(_.isEmpty(e)||e>=0)}render(){const e=this.props.settings[this.props.property]||this.props.defaultValue||"",t=this.getEditorOptions(),s=_.isUndefined(this.props.requiredError)?Na("This field is required!"):this.props.requiredError,a=this.isValid(e)?"":"sui-form-field-error";let r;_.isEmpty(t)||(r=d().createElement("div",{className:"sui-editor-options"},d().createElement("button",{className:this.state.editorOptionsOpen?"sui-tooltip sui-active":"sui-tooltip","data-tooltip":_.isUndefined(this.props.tooltipLabel)?Na("Add form data"):this.props.tooltipLabel,onClick:this.toggleOptions},d().createElement("i",{className:"sui-icon-plus sui-sm","aria-hidden":"true"}),_.isUndefined(this.props.selectLabel)?Na("Insert form fields"):this.props.selectLabel),t));let i="";this.props.label?i=d().createElement("label",{htmlFor:`forminator-field-${this.props.property+(_.isUndefined(this.props.extraId)?"":this.props.extraId)}`,className:"sui-label"},this.props.label," ",this.props.isRequired&&d().createElement("span",{className:"sui-error"}," *"),this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note)):this.props.ariaLabel&&(i=d().createElement("label",{htmlFor:`forminator-field-${this.props.property+(_.isUndefined(this.props.extraId)?"":this.props.extraId)}`,className:"sui-screen-reader-text"},this.props.ariaLabel));const n=`forminator-field-${this.props.property+(_.isUndefined(this.props.extraId)?"":this.props.extraId)}-description`;return d().createElement("div",{className:`sui-form-field ${a}`},i,this.props.descriptionTop&&d().createElement("span",{id:n,className:"sui-description",style:{marginBottom:"20px"}},this.props.descriptionTop),d().createElement("div",{className:"sui-editor"+(_.isEmpty(t)?"":" sui-editor-with-options")},r,d().createElement("textarea",{id:`forminator-field-${this.props.property+(_.isUndefined(this.props.extraId)?"":this.props.extraId)}`,placeholder:this.props.placeholder,defaultValue:e,onChange:e=>{this.updateValue(e.target.value)},ref:e=>this.textEditor=e})),this.props.isRequired&&!this.isValid(e)&&d().createElement("span",{className:"sui-error-message"},s),this.props.description&&d().createElement("span",{id:n,className:"sui-description"},this.props.description))}}function np(){return np=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},np.apply(null,arguments)}class op extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t=_.isUndefined(this.props.state.captcha_provider)?"recaptcha":this.props.state.captcha_provider,s=_.isUndefined(this.props.state.hcaptcha_error_message)?Na("hCaptcha verification failed. Please try again."):this.props.state.hcaptcha_error_message,a=_.isUndefined(this.props.state.turnstile_error_message)?Na("Cloudflare Turnstile verification failed. Please try again."):this.props.state.turnstile_error_message,r=Ia(forminatorData.userPermissions.manage_forminator_settings)||Ia(forminatorData.userPermissions.manage_options)?Na("Add your API keys {{link}}here{{/link}} and then come back to configure this field.",{components:{link:d().createElement("a",{href:forminatorData.settingsUrl+"&section=captcha",target:"_blank"})}}):"",i=Na("You haven't added hCaptcha API keys in your global settings."),n=Na("You haven't added any Cloudflare Turnstile API keys in your global settings."),o=Na("You haven't added API keys for this reCAPTCHA type in your global settings.");switch(e){case"labels":case"visibility":default:return d().createElement("div",null);case"settings":return d().createElement(ea.Fragment,null,d().createElement(Fl,{label:Na("Captcha Provider"),labelDark:!0,description:Na("Select your preferred CAPTCHA provider below."),sidebar:!1},d().createElement(ql,np({},this.props,{settings:this.props.state,property:"captcha_provider",default:"recaptcha"}),d().createElement(Ql,{value:"recaptcha",label:Na("reCAPTCHA")}),d().createElement(Ql,np({settings:this.props.state,value:"hcaptcha",label:Na("hCaptcha")},this.props),!forminatorData.hasHCaptcha&&d().createElement("div",{role:"alert",className:`sui-notice sui-notice-red ${!forminatorData.hasHCaptcha&&"sui-active"}`,style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,i," ",r))))),d().createElement(Ql,np({settings:this.props.state,value:"turnstile",label:Na("Cloudflare Turnstile")},this.props),!forminatorData.hasTurnstile&&d().createElement("div",{role:"alert",className:`sui-notice sui-notice-red ${!forminatorData.hasTurnstile&&"sui-active"}`,style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,n," ",r))))))),d().createElement(Fl,{label:Na("Alignment"),labelDark:!0,description:Na("Select the alignment of CAPTCHA."),sidebar:!1},d().createElement(_l,np({},this.props,{settings:this.props.state,property:"captcha_alignment",defaultValue:"left"}),d().createElement("span",{value:"left"},Na("Left")),d().createElement("span",{value:"center"},Na("Center")),d().createElement("span",{value:"right"},Na("Right")))),"recaptcha"===t&&d().createElement(Fl,{label:Na("reCAPTCHA type"),labelDark:!0,description:Na("Choose the reCAPTCHA type you want to use on your form. You can read more about the different reCAPTCHA types {{link}}here{{/link}} and then choose the one which suits you the best.",{components:{link:d().createElement("a",{href:"https://developers.google.com/recaptcha/docs/versions",target:"_blank"})}}),sidebar:!1},d().createElement(ql,np({},this.props,{property:"captcha_type",settings:this.props.state,default:"v2_checkbox",label:""}),d().createElement(Ql,np({settings:this.props.state},this.props,{value:"v2_checkbox",label:Na("V2 Checkbox"),boxClass:forminatorData.hasV2Captcha?"sui-tab-boxed":""}),!forminatorData.hasV2Captcha&&d().createElement("div",{role:"alert",className:`sui-notice sui-notice-red ${!forminatorData.hasV2Captcha&&" sui-active"}`,style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,o," ",r)))),forminatorData.hasV2Captcha&&d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,np({},this.props,{settings:this.props.state,label:Na("Size"),property:"captcha_size",fieldClass:"sui-input-md"}),d().createElement("option",{value:"normal"},Na("Normal")),d().createElement("option",{value:"compact"},Na("Compact")))),d().createElement(il,{cols:"6"},d().createElement(kl,np({},this.props,{settings:this.props.state,label:Na("Theme"),property:"captcha_theme",fieldClass:"sui-input-md"}),d().createElement("option",{value:"light"},Na("Light")),d().createElement("option",{value:"dark"},Na("Dark")))))),d().createElement(Ql,np({settings:this.props.state},this.props,{value:"v2_invisible",label:Na("V2 Invisible"),boxClass:forminatorData.hasV2InvisibleCaptcha?"sui-tab-boxed":""}),!forminatorData.hasV2InvisibleCaptcha&&d().createElement("div",{role:"alert",className:`sui-notice sui-notice-red${!forminatorData.hasV2InvisibleCaptcha&&" sui-acitve"}`,style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,o," ",r)))),forminatorData.hasV2InvisibleCaptcha&&d().createElement(kl,np({},this.props,{settings:this.props.state,label:Na("Theme"),property:"captcha_theme",fieldClass:"sui-input-md"}),d().createElement("option",{value:"light"},Na("Light")),d().createElement("option",{value:"dark"},Na("Dark")))),d().createElement(Ql,np({settings:this.props.state},this.props,{value:"v3_recaptcha",label:Na("reCAPTCHA V3"),boxClass:forminatorData.hasV3Captcha?"sui-tab-boxed":""}),!forminatorData.hasV3Captcha&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,o," ",r)))),forminatorData.hasV3Captcha&&d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("span",{className:"sui-description"},Na("reCAPTCHA V3 returns a score (1 is very likely a good interaction, 0 is very likely a bot) based on user interaction. Choose the score below which the verification should fail.")),d().createElement(kl,np({},this.props,{settings:this.props.state,label:Na("Score Threshold"),property:"score_threshold",fieldClass:"sui-input-md"}),d().createElement("option",{value:"0.0"},Na("0.0")),d().createElement("option",{value:"0.1"},Na("0.1")),d().createElement("option",{value:"0.2"},Na("0.2")),d().createElement("option",{value:"0.3"},Na("0.3")),d().createElement("option",{value:"0.4"},Na("0.4")),d().createElement("option",{value:"0.5"},Na("0.5")),d().createElement("option",{value:"0.6"},Na("0.6")),d().createElement("option",{value:"0.7"},Na("0.7")),d().createElement("option",{value:"0.8"},Na("0.8")),d().createElement("option",{value:"0.9"},Na("0.9")),d().createElement("option",{value:"1.0"},Na("1.0")))))))),"hcaptcha"===t&&forminatorData.hasHCaptcha&&d().createElement(Fl,{label:Na("hCaptcha type"),labelDark:!0,description:Na("hCaptcha offers two different types of CAPTCHA challenges, a Checkbox and an Invisible type. Choose the hCaptcha type you want to use in your form."),sidebar:!1},d().createElement(ql,np({},this.props,{property:"hcaptcha_type",settings:this.props.state,default:"hc_checkbox",label:""}),d().createElement(Ql,np({settings:this.props.state},this.props,{value:"hc_checkbox",label:Na("Checkbox"),boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,np({},this.props,{settings:this.props.state,label:Na("Size"),property:"hcaptcha_size",fieldClass:"sui-input-md"}),d().createElement("option",{value:"normal"},Na("Normal")),d().createElement("option",{value:"compact"},Na("Compact")))),d().createElement(il,{cols:"6"},d().createElement(kl,np({},this.props,{settings:this.props.state,label:Na("Theme"),property:"hcaptcha_theme",fieldClass:"sui-input-md"}),d().createElement("option",{value:"light"},Na("Light")),d().createElement("option",{value:"dark"},Na("Dark")))))),d().createElement(Ql,np({settings:this.props.state},this.props,{value:"hc_invisible",label:Na("Invisible"),boxClass:"sui-tab-boxed"}),d().createElement(ip,np({},this.props,{settings:this.props.state,property:"hc_invisible_notice",hideEditorOptions:"true",descriptionTop:Na("To comply with online privacy laws, users should be informed that this form includes an invisible CAPTCHA field.")}))))),"turnstile"===t&&forminatorData.hasTurnstile&&d().createElement(ea.Fragment,null,d().createElement(Fl,{label:Na("Widget size"),labelDark:!0,description:Na("Select the size of the CAPTCHA widget. {{link}}Learn more{{/link}}",{components:{link:d().createElement("a",{href:"https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#widget-size",target:"_blank"})}}),sidebar:!1},d().createElement(_l,np({},this.props,{settings:this.props.state,property:"turnstile_size",defaultValue:"normal"}),d().createElement("span",{value:"normal"},Na("Normal")),d().createElement("span",{value:"flexible"},Na("Flexible")),d().createElement("span",{value:"compact"},Na("Compact")))),d().createElement(Fl,{label:Na("Widget theme"),labelDark:!0,description:Na("The default is auto, which uses the visitor’s browser preference. You can also force the widget to use light or dark mode."),sidebar:!1},d().createElement(_l,np({},this.props,{settings:this.props.state,property:"turnstile_theme",defaultValue:"auto"}),d().createElement("span",{value:"auto"},Na("Auto")),d().createElement("span",{value:"light"},Na("Light")),d().createElement("span",{value:"dark"},Na("Dark"))))),d().createElement(Fl,{label:Na("Language"),labelDark:!0,description:Na("By default, the global CAPTCHA language setting will be used. However, you can manually select a different language here."),sidebar:!1},d().createElement(kl,np({},this.props,{settings:this.props.state,property:"language",fieldClass:"sui-input-md","data-placeholder":Na("Automatic"),hasSearch:!0}),d().createElement("option",{value:""},Na("Automatic")),_.map(forminatorData.captchaLangs,(e,t)=>d().createElement("option",{value:t,key:t},e)))),"recaptcha"===t&&"v3_recaptcha"===this.props.state.captcha_type&&forminatorData.hasV3Captcha&&d().createElement(Fl,{label:Na("Theme"),labelDark:!0,description:Na("Select the theme for the captcha."),sidebar:!1},d().createElement(kl,np({},this.props,{settings:this.props.state,label:Na("Theme"),property:"captcha_theme",fieldClass:"sui-input-md"}),d().createElement("option",{value:"light"},Na("Light")),d().createElement("option",{value:"dark"},Na("Dark")))),"recaptcha"===t&&("v2_invisible"===this.props.state.captcha_type&&forminatorData.hasV2InvisibleCaptcha||"v3_recaptcha"===this.props.state.captcha_type&&forminatorData.hasV3Captcha)&&d().createElement(Fl,{label:Na("Badge Position"),labelDark:!0,description:Na("Select where the reCAPTCHA badge will be displayed on your page."),sidebar:!1},d().createElement(tp,np({},this.props,{settings:this.props.state,property:"captcha_badge",defaultValue:"inline",radioClass:"sui-radio-sm"}),d().createElement(Yl,{value:"bottomright",hasImage:!0,image1x:"recaptcha-bottomright.png",image2x:"recaptcha-bottomright@2x.png",label:Na("Bottom Right")}),d().createElement(Yl,{value:"bottomleft",hasImage:!0,image1x:"recaptcha-bottomleft.png",image2x:"recaptcha-bottomleft@2x.png",label:Na("Bottom Left")}),d().createElement(Yl,{value:"inline",hasImage:!0,image1x:"recaptcha-inline.png",image2x:"recaptcha-inline@2x.png",label:Na("Inline in Form")}))),d().createElement(Fl,{label:Na("Error Message"),labelDark:!0,sidebar:!1},"recaptcha"===t&&d().createElement(ea.Fragment,null,d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose the error message you want to display on your form when reCAPTCHA verification fails.")),d().createElement(ol,np({},this.props,{type:"text",property:"recaptcha_error_message",settings:this.props.state,ariaLabel:Na("reCAPTCHA error message")}))),"hcaptcha"===t&&d().createElement(ea.Fragment,null,d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose the error message you want to display on your form when hCaptcha verification fails.")),d().createElement(ol,np({},this.props,{type:"text",property:"hcaptcha_error_message",settings:this.props.state,defaultValue:s,ariaLabel:Na("hCaptcha error message")}))),"turnstile"===t&&d().createElement(ea.Fragment,null,d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose the error message you want to display on your form when Turnstile verification fails.")),d().createElement(ol,np({},this.props,{type:"text",property:"turnstile_error_message",settings:this.props.state,defaultValue:a,ariaLabel:Na("Cloudflare Turnstile error message")})))));case"styling":return d().createElement(Ol,this.props)}}}class lp extends ea.Component{constructor(e){super(e),this.state={open:e.expanded||!1},this.toggleState=this.toggleState.bind(this)}toggleState(){this.setState({open:!this.state.open})}render(){const{label:e}=this.props,{open:t}=this.state;let s="";t&&(s="sui-accordion-item--open");const a=!(!_.isUndefined(this.props.boxedContent)&&""!==this.props.boxedContent)||this.props.boxedContent,r=!_.isUndefined(this.props.defaultContentRender)&&this.props.defaultContentRender,i=d().Children.map(this.props.children,e=>e);return d().createElement("div",{className:"sui-accordion-item "+s},d().createElement("span",{className:"sui-accordion-item-header",onClick:()=>this.toggleState()},d().createElement("div",{className:"sui-accordion-item-title"},d().createElement("span",null,e),d().createElement("button",{className:"sui-button-icon sui-accordion-open-indicator",onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-chevron-down","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},!1===this.state.open?"Open":"Close")))),d().createElement("div",{className:"sui-accordion-item-body"},!1===a?(r||t)&&i:d().createElement("div",{className:"sui-box"},d().createElement("div",{className:"sui-box-body"},(r||t)&&i),a)))}}class pp extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}render(){const e=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property],t=_.isUndefined(this.props.fieldId)?this.props.property:this.props.fieldId,s=!(_.isUndefined(this.props.disabled)||!this.props.disabled);let a="";return this.props.itemClass&&""!==this.props.itemClass&&(a=" "+this.props.itemClass),d().createElement("label",{htmlFor:`forminator-field-${t}`,className:`sui-checkbox${a}`},d().createElement("input",{type:"checkbox",id:`forminator-field-${t}`,value:"true",checked:e?"checked":"",disabled:s,onChange:e=>{this.updateValue(e.target.checked)}}),d().createElement("span",{"aria-hidden":"true"}),this.props.ariaLabel&&d().createElement("span",{className:"sui-screen-reader-text"},this.props.ariaLabel),this.props.label&&d().createElement("span",null,this.props.label,!_.isUndefined(this.props.tooltip)&&""!==this.props.tooltip&&d().createElement("span",{className:"sui-tooltip sui-tooltip-constrained",style:{marginLeft:10,verticalAlign:"middle","--tooltip-width":"165px"},"data-tooltip":this.props.tooltip},d().createElement("span",{className:"sui-icon-info","aria-hidden":"true",style:{pointerEvents:"none"}}))))}}class cp extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}componentDidMount(){const e=this,t=this.props.dateFormat?this.props.dateFormat:"mm-dd-yy",s=_.isUndefined(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];this.$el=jQuery(this.el),this.$elDate=jQuery(this.elDate);const a=Object.assign({allowClear:!0,dropdownCssClass:"sui-select-dropdown",placeholder:Na("Click here to add a date…")},this.props.options);"function"==typeof this.$el.SUIselect2?this.$el.SUIselect2(a):"function"==typeof this.$el.FUIselect2?this.$el.FUIselect2(a):console.log("select2 not intiated"),this.$elDate.datepicker({beforeShow:(e,t)=>{jQuery("body").append(jQuery("#ui-datepicker-div")),jQuery("#ui-datepicker-div").addClass("sui-calendar"),"forminator-field-date"===this.$el.attr("id")&&("disable"===this.props.state.past_dates?this.$el.datepicker("option","minDate",this.$el.datepicker("getDate")):"enable"===this.props.state.past_dates&&this.$el.datepicker("option","minDate",null))},dateFormat:t,autoclose:!0,dayNamesMin:forminatorl10n.calendar.day_names_min,monthNames:forminatorl10n.calendar.month_names,onSelect:t=>{const s=_.isUndefined(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];s.push(t),e.updateValue(s),e.$el.html(""),_.each(s,function(t){e.$el.append(jQuery('<option value="'+t+'">'+t+"</option>"))}),e.$el.val(s).trigger("change")}}),this.$el.on("select2:opening",function(t){t.preventDefault(),(_.isUndefined(e.props.settings[e.props.property])?[]:e.props.settings[e.props.property]).length===t.currentTarget.selectedOptions.length&&e.$elDate.datepicker("show")}),this.$el.on("select2:unselect",function(t){t.preventDefault();let s=_.isUndefined(e.props.settings[e.props.property])?[]:e.props.settings[e.props.property];s=s.filter(e=>e!==t.params.data.id),e.updateValue(s)}),_.each(s,function(t){e.$el.append(jQuery('<option value="'+t+'">'+t+"</option>"))}),this.$el.val(s).trigger("change.select2")}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}componentWillUnmount(){this.$el.unbind().removeData(),this.$elDate.unbind().removeData()}render(){const e=_.isUndefined(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];let t="",s="";return this.props.label&&""!==this.props.label&&(t=this.props.hasSettingsLabel?d().createElement("label",{id:`forminator-field-${this.props.property}-label`,htmlFor:`forminator-field-${this.props.property}`,className:"sui-settings-label"+("dark"===this.props.hasSettingsLabel?" sui-dark":"")},this.props.label):d().createElement("label",{id:`forminator-field-${this.props.property}-label`,htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note))),this.props.description&&""!==this.props.description&&(s=d().createElement("p",{className:"sui-description",style:{marginBottom:10}},this.props.description)),d().createElement("div",{className:"sui-form-field"},t,s,d().createElement("div",{className:"fui-datepicker-tags"},d().createElement("select",{id:`forminator-field-${this.props.property}`,ref:e=>this.el=e,className:"sui-select sui-select-lg",defaultValue:e,multiple:"multiple"},this.props.children),d().createElement("input",{ref:e=>this.elDate=e,className:"sui-input","aria-labelledby":`forminator-field-${this.props.property}-label`})))}}class up extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}componentDidMount(){const e=this,t=this.props.dateFormat?this.props.dateFormat:"MM/DD/YYYY",s=_.isUndefined(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];this.$el=jQuery(this.el),this.$elDate=jQuery(this.elDate);const a=Object.assign({allowClear:!0,dropdownCssClass:"sui-select-dropdown",placeholder:Na("Click here to add a date range...")},this.props.options);"function"==typeof this.$el.SUIselect2?this.$el.SUIselect2(a):"function"==typeof this.$el.FUIselect2?this.$el.FUIselect2(a):console.log("select2 not intiated"),this.$elDate.daterangepicker({autoApply:!0,locale:{format:"MMMM DD, YYYY",separator:" - ",customRangeLabel:"Custom",daysOfWeek:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"]},alwaysShowCalendars:!0,parentEl:".fui-daterange-calendar"}),this.$elDate.on("apply.daterangepicker",function(s,a){const r=_.isUndefined(e.props.settings[e.props.property])?[]:e.props.settings[e.props.property];r.push(a.startDate.format(t)+" - "+a.endDate.format(t)),e.updateValue(r),e.$el.html(""),_.each(r,function(t){e.$el.append(jQuery('<option value="'+t+'">'+t+"</option>"))}),e.$el.val(r).trigger("change")}),this.$el.on("select2:opening",function(t){t.preventDefault(),(_.isUndefined(e.props.settings[e.props.property])?[]:e.props.settings[e.props.property]).length===t.currentTarget.selectedOptions.length&&e.$elDate.trigger("click"),jQuery(".daterangepicker").css("zIndex","3001")}),this.$el.on("select2:unselect",function(t){t.preventDefault();let s=_.isUndefined(e.props.settings[e.props.property])?[]:e.props.settings[e.props.property];s=s.filter(e=>e!==t.params.data.id),setTimeout(function(){e.updateValue(s)},20)}),_.each(s,function(t){e.$el.append(jQuery('<option value="'+t+'">'+t+"</option>"))}),this.$el.val(s).trigger("change.select2")}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}componentWillUnmount(){this.$el.unbind().removeData(),this.$elDate.unbind().removeData()}render(){const e=_.isUndefined(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];let t="",s="";return this.props.label&&""!==this.props.label&&(t=this.props.hasSettingsLabel?d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-settings-label"+("dark"===this.props.hasSettingsLabel?" sui-dark":"")},this.props.label):d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note))),this.props.description&&""!==this.props.description&&(s=d().createElement("p",{className:"sui-description",style:{marginBottom:10}},this.props.description)),d().createElement("div",{className:"sui-form-field"},t,s,d().createElement("div",{className:"fui-datepicker-tags"},d().createElement("select",{id:`forminator-field-${this.props.property}`,ref:e=>this.el=e,className:"sui-select sui-select-lg",defaultValue:e,multiple:"multiple"},this.props.children),d().createElement("div",{className:"fui-daterange-calendar"}),d().createElement("input",{id:`forminator-field-${this.props.property}`,style:{visibility:"hidden"},ref:e=>this.elDate=e,className:"sui-input",autoComplete:"off"})))}}function dp(){return dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},dp.apply(null,arguments)}class mp extends ea.Component{constructor(e){super(e)}getDateFields(){const e=[];return ga("date",this.props.wrappers).map(t=>{this.props.state.element_id!==t.element_id&&e.push({value:t.element_id,label:t.field_label})}),e}disableSearch(){return{minimumResultsForSearch:-1}}render(){let e=_.isUndefined(this.props.state["start-date"])?"":this.props.state["start-date"],t=_.isUndefined(this.props.state["end-date"])?"":this.props.state["end-date"];return!_.isEmpty(this.props.state.min_year)&&_.isUndefined(this.props.state["start-date"])&&(e="specific",this.props.state["start-date"]=e,this.props.state["start-specific-date"]="Jan 1 "+this.props.state.min_year),!_.isEmpty(this.props.state.max_year)&&_.isUndefined(this.props.state["end-date"])&&(t="specific",this.props.state["end-date"]=t,this.props.state["end-specific-date"]="Dec 31 "+this.props.state.max_year),d().createElement(ea.Fragment,null,d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Start & End date")),d().createElement("span",{className:"sui-description"},Na("Choose a start and end date limit for the calendar to restrict the date selection between a specific date range. Note that we will use the timezone set in your {{a}}WordPress Settings{{/a}}.",{components:{a:d().createElement("a",{href:forminatorData.adminUrl+"options-general.php",target:"_blank"})}})),d().createElement("div",{className:"fui-form-field--row"},d().createElement("div",{className:"fui-form-field--col",style:{maxWidth:240}},d().createElement(kl,dp({},this.props,{label:Na("Start Date"),settings:this.props.state,property:"start-date",options:this.disableSearch()}),d().createElement("option",{value:""},Na("No limit")),d().createElement("option",{value:"specific"},Na("Specific date")),d().createElement("option",{value:"today"},Na("Today")),this.getDateFields().length>0&&d().createElement("optgroup",{label:Na("Date fields")},_.map(this.getDateFields(),(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label)))))),"specific"===e&&d().createElement("div",{className:"fui-form-field--col"},d().createElement(gl,dp({},this.props,{label:" ",settings:this.props.state,property:"start-specific-date",dateFormat:"mm/dd/yy",placeholder:Na("Pick a date"),calendarIcon:"left"}))),""!==e&&"specific"!==e&&d().createElement("div",{className:"fui-form-field--col"},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Offset (optional)")),d().createElement("div",{className:"sui-form-field-inline"},d().createElement(kl,dp({},this.props,{settings:this.props.state,property:"start-offset-operator",fieldClass:"sui-input-sm",defaultValue:"+",options:this.disableSearch()}),d().createElement("option",{value:"+"},Na("+")),d().createElement("option",{value:"-"},Na("-"))),d().createElement(ol,dp({},this.props,{settings:this.props.state,placeholder:Na("0"),property:"start-offset-value",fieldClass:"sui-input-sm",defaultValue:"0"})),d().createElement(kl,dp({},this.props,{settings:this.props.state,property:"start-offset-duration",fieldClass:"fui-field-full",defaultValue:"days",options:this.disableSearch()}),d().createElement("option",{value:"days"},Na("days")),d().createElement("option",{value:"weeks"},Na("weeks")),d().createElement("option",{value:"months"},Na("months")),d().createElement("option",{value:"years"},Na("years"))))))),d().createElement("div",{className:"fui-form-field--row"},d().createElement("div",{className:"fui-form-field--col",style:{maxWidth:240}},d().createElement(kl,dp({},this.props,{label:Na("End Date"),settings:this.props.state,property:"end-date",options:this.disableSearch()}),d().createElement("option",{value:""},Na("No limit")),d().createElement("option",{value:"specific"},Na("Specific date")),d().createElement("option",{value:"today"},Na("Today")),this.getDateFields().length>0&&d().createElement("optgroup",{label:Na("Date fields")},_.map(this.getDateFields(),(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label)))))),"specific"===t&&d().createElement("div",{className:"fui-form-field--col"},d().createElement(gl,dp({},this.props,{settings:this.props.state,property:"end-specific-date",dateFormat:"mm/dd/yy",placeholder:Na("Pick a date"),calendarIcon:"left"}))),""!==t&&"specific"!==t&&d().createElement("div",{className:"fui-form-field--col"},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Offset (optional)")),d().createElement("div",{className:"sui-form-field-inline"},d().createElement(kl,dp({},this.props,{settings:this.props.state,property:"end-offset-operator",fieldClass:"sui-input-sm",defaultValue:"+",options:this.disableSearch()}),d().createElement("option",{value:"+"},Na("+")),d().createElement("option",{value:"-"},Na("-"))),d().createElement(ol,dp({},this.props,{settings:this.props.state,placeholder:Na("0"),property:"end-offset-value",fieldClass:"sui-input-sm",defaultValue:"0"})),d().createElement(kl,dp({},this.props,{settings:this.props.state,property:"end-offset-duration",fieldClass:"fui-field-full",defaultValue:"days",options:this.disableSearch()}),d().createElement("option",{value:"days"},Na("days")),d().createElement("option",{value:"weeks"},Na("weeks")),d().createElement("option",{value:"months"},Na("months")),d().createElement("option",{value:"years"},Na("years")))))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Days of the week")),d().createElement("span",{className:"sui-description"},Na("Choose which days of the week should be available on the calendar.")),d().createElement(ql,dp({},this.props,{property:"howto-restrict",settings:this.props.state,default:"all"}),d().createElement(Yl,{value:"all"},Na("All days")),d().createElement(Ql,dp({},this.props,{settings:this.props.state,value:"week",label:Na("Selected days"),boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"4"},d().createElement(pp,dp({},this.props,{settings:this.props.state,property:"sunday",label:Na("Sunday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,dp({},this.props,{settings:this.props.state,property:"wednesday",label:Na("Wednesday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,dp({},this.props,{settings:this.props.state,property:"saturday",label:Na("Saturday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),d().createElement(il,{cols:"4"},d().createElement(pp,dp({},this.props,{settings:this.props.state,property:"monday",label:Na("Monday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,dp({},this.props,{settings:this.props.state,property:"thursday",label:Na("Thursday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),d().createElement(il,{cols:"4"},d().createElement(pp,dp({},this.props,{settings:this.props.state,property:"tuesday",label:Na("Tuesday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,dp({},this.props,{settings:this.props.state,property:"friday",label:Na("Friday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))))))),d().createElement(Fl,null,d().createElement(cp,dp({},this.props,{label:Na("Disable dates"),hasSettingsLabel:"dark",description:Na("Use this setting to disable specific dates on the calendar."),settings:this.props.state,property:"disabled-dates",dateFormat:"mm/dd/yy",placeholder:Na("Pick a date")}))),d().createElement(Fl,null,d().createElement(up,dp({},this.props,{label:Na("Disable date ranges"),hasSettingsLabel:"dark",description:Na("Use this setting to disable specific dates ranges on the calendar."),settings:this.props.state,property:"disable-date-range",dateFormat:"MM/DD/YYYY",placeholder:Na("Pick a date")}))),d().createElement(Fl,null,d().createElement("label",{id:"forminator-settings-field-restrict_message-label",className:"sui-settings-label sui-dark"},Na("Error Message")),d().createElement("span",{className:"sui-description"},Na("Choose an error message to be used when visitor enters a date that is disabled.")),d().createElement(ol,dp({},this.props,{settings:this.props.state,property:"restrict_message",labelledBy:"forminator-settings-field-restrict_message-label"}))))}}function hp(){return hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},hp.apply(null,arguments)}class fp extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,{field_type:t}=this.props.state,s=Na("Note: The query parameter's value passed in URL should match with the selected date format.");switch(e){case"labels":return d().createElement(ql,hp({},this.props,{property:"field_type",settings:this.props.state,default:"picker",label:Na("Type"),divClass:"sui-tabs-content-lg"}),d().createElement(Ql,hp({settings:this.props.state},this.props,{value:"picker",label:Na("Calendar")}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(kl,hp({},this.props,{settings:this.props.state,label:Na("Date Format"),placeholder:Na("Date Format"),property:"date_format"}),d().createElement("option",{value:"yy-mm-dd"},Na("Y-m-d")),d().createElement("option",{value:"mm-dd-yy"},Na("m-d-Y")),d().createElement("option",{value:"dd-mm-yy"},Na("d-m-Y")),d().createElement("option",{value:"yy/mm/dd"},Na("Y/m/d")),d().createElement("option",{value:"mm/dd/yy"},Na("m/d/Y")),d().createElement("option",{value:"dd/mm/yy"},Na("d/m/Y")),d().createElement("option",{value:"yy.mm.dd"},Na("Y.m.d")),d().createElement("option",{value:"mm.dd.yy"},Na("m.d.Y")),d().createElement("option",{value:"dd.mm.yy"},Na("d.m.Y"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(_l,hp({property:"icon",settings:this.props.state},this.props,{label:Na("Calendar Icon")}),d().createElement("span",{value:"true"},Na("Show")),d().createElement("span",{value:"false"},Na("Hide")))))),d().createElement(Ql,hp({settings:this.props.state},this.props,{value:"select",label:Na("Dropdowns")}),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(kl,hp({},this.props,{settings:this.props.state,label:Na("Date Format"),placeholder:Na("Date Format"),property:"date_format"}),d().createElement("option",{value:"yy-mm-dd"},Na("Y-m-d")),d().createElement("option",{value:"mm-dd-yy"},Na("m-d-Y")),d().createElement("option",{value:"dd-mm-yy"},Na("d-m-Y")),d().createElement("option",{value:"yy/mm/dd"},Na("Y/m/d")),d().createElement("option",{value:"mm/dd/yy"},Na("m/d/Y")),d().createElement("option",{value:"dd/mm/yy"},Na("d/m/Y")),d().createElement("option",{value:"yy.mm.dd"},Na("Y.m.d")),d().createElement("option",{value:"mm.dd.yy"},Na("m.d.Y")),d().createElement("option",{value:"dd.mm.yy"},Na("d.m.Y"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),d().createElement("label",{className:"sui-label"},Na("Fields")),d().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginTop:"10px"}},d().createElement(lp,hp({},this.props,{label:Na("Month")}),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"month_label"}))))),d().createElement(lp,hp({},this.props,{label:Na("Day")}),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"day_label"}))))),d().createElement(lp,hp({},this.props,{label:Na("Year")}),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"year_label"}))))))),d().createElement(Ql,hp({settings:this.props.state},this.props,{value:"input",label:Na("Text inputs")}),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(kl,hp({},this.props,{settings:this.props.state,label:Na("Date Format"),placeholder:Na("Date Format"),property:"date_format"}),d().createElement("option",{value:"yy-mm-dd"},Na("Y-m-d")),d().createElement("option",{value:"mm-dd-yy"},Na("m-d-Y")),d().createElement("option",{value:"dd-mm-yy"},Na("d-m-Y")),d().createElement("option",{value:"yy/mm/dd"},Na("Y/m/d")),d().createElement("option",{value:"mm/dd/yy"},Na("m/d/Y")),d().createElement("option",{value:"dd/mm/yy"},Na("d/m/Y")),d().createElement("option",{value:"yy.mm.dd"},Na("Y.m.d")),d().createElement("option",{value:"mm.dd.yy"},Na("m.d.Y")),d().createElement("option",{value:"dd.mm.yy"},Na("d.m.Y"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),d().createElement("label",{className:"sui-label"},Na("Fields")),d().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginTop:"10px"}},d().createElement(lp,hp({},this.props,{label:Na("Month")}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"month_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"month_placeholder"}))))),d().createElement(lp,hp({},this.props,{label:Na("Day")}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"day_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"day_placeholder"}))))),d().createElement(lp,hp({},this.props,{label:Na("Year")}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"year_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"year_placeholder"}))))))));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),"input"!==t&&d().createElement(Fl,{label:Na("Default Date"),labelDark:!0,description:Na("Use this feature to specify a default selected date."),sidebar:!1},d().createElement(ql,hp({},this.props,{property:"default_date",settings:this.props.state,default:"none",label:""}),d().createElement(Yl,{value:"none"},Na("None")),d().createElement(Yl,{value:"today"},Na("Today")),d().createElement(Ql,hp({},this.props,{settings:this.props.state,value:"custom",label:Na("Future Date"),boxClass:"sui-tab-boxed"}),d().createElement(gl,hp({},this.props,{settings:this.props.state,property:"date",dateFormat:this.props.state.date_format||"",placeholder:Na("20 April 2018")}))))),"select"===t&&d().createElement(Fl,{label:Na("Year Range"),labelDark:!0,description:Na("By default, we select 100 years in the past, and 100 years in the future for the year dropdown field. You can set a custom year range to display in the year dropdown below."),sidebar:!1},d().createElement("div",{className:"fui-form-field--row"},d().createElement(rl,null,d().createElement(il,{cols:"4"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("From"),placeholder:Na("1920"),property:"min_year",type:"number"}))),d().createElement(il,{cols:"4"},d().createElement(ol,hp({},this.props,{settings:this.props.state,label:Na("To"),placeholder:Na("2030"),property:"max_year",type:"number"})))))),d().createElement(Bl,hp({},this.props,{notice:s})));case"limits":return d().createElement(mp,this.props);case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function bp(){return bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},bp.apply(null,arguments)}class gp extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(cl,this.props);case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement(Fl,{label:Na("Signature Filetype"),labelDark:!0,description:Na("Choose the filetype to save your users' signature in."),descriptionSpacing:20,sidebar:!1},d().createElement("div",{className:"sui-form-field-inline"},d().createElement(kl,bp({},this.props,{property:"filetype",settings:this.props.state,"data-width":"100",fieldsize:"100"}),d().createElement("option",{value:"png"},Na("PNG")),d().createElement("option",{value:"jpg"},Na("JPG"))))),d().createElement(Fl,{label:Na("Height"),labelDark:!0,description:Na("Choose the height of your signature field. The default value is 180px."),descriptionSpacing:20,sidebar:!1},d().createElement(ol,bp({},this.props,{type:"number",settings:this.props.state,placeholder:"180",property:"height",suffix:"px"}))),d().createElement(Fl,{label:Na("Stroke Thickness"),labelDark:!0,description:Na("Choose the thickness in pixels for signature strokes. The default value is 2px."),descriptionSpacing:20,sidebar:!1},d().createElement(ol,bp({},this.props,{type:"number",settings:this.props.state,placeholder:"2",property:"thickness",suffix:"px"}))));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function yp(){return yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},yp.apply(null,arguments)}class Ep extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t={};switch(_.assign(t,forminatorData.variables),delete t.submission_id,e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(ol,yp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("E.g. Consent"),property:"field_label"})),d().createElement(ip,yp({},this.props,{settings:this.props.state,boxClass:"sui-tab-boxed",property:"consent_description",editorOptions:t,description:Na("Describe what your users should consent to.")})));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function vp(){return vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},vp.apply(null,arguments)}class _p extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("The {{strong}}GDPR Field{{/strong}} has been deprecated and replaced by the new {{strong}}Consent Field{{/strong}}. Your existing fields should continue to work as expected, but please consider using the {{strong}}Consent Field{{/strong}} in the future.",{components:{strong:d().createElement("strong",null)}}))))),d().createElement(ol,vp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})),d().createElement(ip,vp({},this.props,{settings:this.props.state,boxClass:"sui-tab-boxed",property:"gdpr_description",editorOptions:forminatorData.variables,description:Na("Note, the form will not submit until the user has accepted the terms.")})));case"settings":return d().createElement(ea.Fragment,null,d().createElement(ol,vp({},this.props,{settings:this.props.state,label:Na("Error message"),placeholder:Na("Enter required message"),property:"required_message",id:"forminator-field-name-error-msg"})));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function xp(){return xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},xp.apply(null,arguments)}class Np extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,xp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"}))),d().createElement(il,{cols:"6"},d().createElement(kl,xp({},this.props,{settings:this.props.state,label:Na("Default Value (optional)"),placeholder:Na("Enter default value"),property:"default_value"}),_.map(forminatorData.variablesForHiddenField,(e,t)=>d().createElement("option",{value:t,key:t},e))))),"custom_value"===this.props.state.default_value&&d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,xp({},this.props,{settings:this.props.state,label:Na("Custom Value"),placeholder:Na("Enter custom value"),property:"custom_value"})))),"query"===this.props.state.default_value&&d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,xp({},this.props,{settings:this.props.state,label:Na("Query parameter"),placeholder:Na("E.g. query_parameter_key"),property:"prefill"})))));case"settings":case"visibility":default:return d().createElement("div",null);case"styling":return d().createElement(Ol,this.props)}}}function Cp(){return Cp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Cp.apply(null,arguments)}class kp extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t={};switch(_.assign(t,forminatorData.variables),delete t.submission_id,e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(ol,Cp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})),d().createElement(ip,Cp({},this.props,{extraId:"html-type",settings:this.props.state,boxClass:"sui-tab-boxed",property:"variations",editorOptions:t,enableFormData:"true",enablePostData:"false",enableUpload:"true",allowButtonOnclick:"true",mainOptions:[]})));case"settings":default:return d().createElement("div",null);case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props)}}}function Sp(){return Sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Sp.apply(null,arguments)}class Pp extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement("span",{className:"sui-description"},Na("Use this field to group Forminator fields together and collect repeating data in your form.")," ",forminatorData.showDocLink&&Na("Learn more about grouping and repeating use cases in {{link}}this tutorial. {{icon/}}{{/link}}",{components:{strong:d().createElement("strong",null),link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#field-group",target:"_blank"}),icon:d().createElement("span",{className:"sui-icon-open-new-window sui-sm","aria-hidden":"true"})}})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Sp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Sp({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))))}}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Op.apply(null,arguments)}class Dp extends ea.Component{constructor(e){super(e)}getVariables(){return Pa(this.props.wrappers,[],{},["calculation","currency","number","slider"])}render(){const e=this.getVariables();return d().createElement(ql,Op({},this.props,{property:"is_repeater",settings:this.props.state,default:"true",label:Na("Field Repeater"),description:Na("Allow fields in this group to be repeated.")}),d().createElement(Ql,Op({},this.props,{settings:this.props.state,value:"true",label:Na("Enable"),boxClass:"sui-tab-boxed"}),d().createElement(ql,Op({},this.props,{property:"min_limit_type",settings:this.props.state,default:"custom",label:Na("Minimum repeater limit"),wrapperClass:"forminator-float",description:Na("Enter the minimum number of times this group field will be repeated by default, or select a variable from your form fields. If left empty, the minimum will default to 1.")}),d().createElement(Ql,Op({},this.props,{settings:this.props.state,value:"custom",label:Na("Custom"),boxClass:""}),d().createElement(ol,Op({},this.props,{settings:this.props.state,defaultValue:"",minValue:"1",property:"min_limit",placeholder:Na("Enter minimum limit"),type:"number"}))),d().createElement(Ql,Op({},this.props,{settings:this.props.state,value:"variable",label:Na("Variable"),boxClass:""}),d().createElement(kl,Op({},this.props,{settings:this.props.state,property:"min_limit_field",noWrapper:!0}),d().createElement("option",{value:""},Na("Choose form field")),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label+" {"+e.element_id+"}")))))),d().createElement(ql,Op({},this.props,{property:"max_limit_type",settings:this.props.state,default:"custom",label:Na("Maximum repeater limit"),wrapperClass:"forminator-float",description:Na("Enter the maximum number of times this group field can be repeated, or select a variable from your form fields. If left empty, the maximum will be unlimited.")}),d().createElement(Ql,Op({},this.props,{settings:this.props.state,value:"custom",label:Na("Custom"),boxClass:""}),d().createElement(ol,Op({},this.props,{settings:this.props.state,defaultValue:"",minValue:"1",property:"max_limit",placeholder:Na("Enter maximum limit"),type:"number"}))),d().createElement(Ql,Op({},this.props,{settings:this.props.state,value:"variable",label:Na("Variable"),boxClass:""}),d().createElement(kl,Op({},this.props,{settings:this.props.state,property:"max_limit_field",noWrapper:!0}),d().createElement("option",{value:""},Na("Choose form field")),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label+" {"+e.element_id+"}")))))),d().createElement(ql,Op({},this.props,{property:"action_element_type",settings:this.props.state,default:"button",label:Na("Repeater Element Type"),description:Na("Choose the element type and label text for your repeater actions.")}),d().createElement(Ql,Op({},this.props,{settings:this.props.state,value:"button",label:Na("Buttons"),boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Op({},this.props,{settings:this.props.state,label:Na("Add Button Text (optional)"),placeholder:Na("Add item"),defaultValue:Na("Add item"),property:"add_action_text"}))),d().createElement(il,{cols:"6"},d().createElement(ol,Op({},this.props,{settings:this.props.state,label:Na("Remove Button Text (optional)"),placeholder:Na("Remove item"),defaultValue:Na("Remove item"),property:"remove_action_text"}))))),d().createElement(Yl,Op({},this.props,{settings:this.props.state,value:"icon",label:Na("Icons")})),d().createElement(Ql,Op({},this.props,{settings:this.props.state,value:"link",label:Na("Text links"),boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Op({},this.props,{settings:this.props.state,label:Na("Add Link Text (optional)"),placeholder:Na("Add item"),defaultValue:Na("Add item"),property:"add_action_text"}))),d().createElement(il,{cols:"6"},d().createElement(ol,Op({},this.props,{settings:this.props.state,label:Na("Add Link Text (optional)"),placeholder:Na("Remove item"),defaultValue:Na("Remove item"),property:"remove_action_text"}))))))),d().createElement(Yl,Op({},this.props,{settings:this.props.state,value:"false",label:Na("Disable")})))}}function Fp(){return Fp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Fp.apply(null,arguments)}class Ap extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement(Ol,this.props),d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Group Field Styling")),d().createElement("span",{className:"sui-description"},Na("By default, the Group Field will apply the styles you have set in the Appearance settings, but you can remove those styles with this option."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(ql,Fp({},this.props,{property:"group_styles",settings:this.props.state,default:"default"}),d().createElement(Yl,Fp({},this.props,{settings:this.props.state,value:"default",label:Na("Apply")})),d().createElement(Yl,Fp({},this.props,{settings:this.props.state,value:"custom",label:Na("Remove")}))))))}}class Tp extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(Pp,this.props);case"settings":return d().createElement(Dp,this.props);case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ap,this.props);default:return d().createElement("div",null)}}}function Mp(){return Mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Mp.apply(null,arguments)}class jp extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(tp,Mp({},this.props,{settings:this.props.state,property:"slider_type",label:Na("Type"),defaultValue:"single",radioClass:"sui-radio-sm"}),d().createElement(Yl,{value:"single",hasImage:!0,image1x:"slider-single.png",image2x:"slider-single@2x.png",label:Na("Single Slider")}),d().createElement(Yl,{value:"range",hasImage:!0,image1x:"slider-range.png",image2x:"slider-range@2x.png",label:Na("Range Slider")})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Mp({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Mp({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))))}}class Up extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}render(){const e=_.isUndefined(this.props.settings[this.props.property])?"":this.props.settings[this.props.property],t=_.isUndefined(this.props.customClass)?"sui-form-control":this.props.customClass,s=!_.isUndefined(this.props.disabled)&&this.props.disabled,a=e&&!s,r=d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-toggle"},d().createElement("input",{type:"checkbox",value:"true",id:`forminator-field-${this.props.property}`,className:t,disabled:s?"disabled":"",checked:a?"checked":"",onChange:e=>{this.updateValue(e.target.checked)}}),d().createElement("span",{className:"sui-toggle-slider"}),this.props.label&&d().createElement(ea.Fragment,null,d().createElement("span",{className:"sui-toggle-label"},this.props.label)),this.props.description&&d().createElement("span",{className:"sui-description sui-toggle-description"},this.props.description));let i="";return this.props.children&&this.props.settings[this.props.property]&&(i=d().createElement(ea.Fragment,null,d().createElement("div",{tabIndex:"0",className:"sui-toggle-content sui-border-frame","aria-label":this.props.label},this.props.children))),this.props.unWrap?d().createElement(ea.Fragment,null,r,i):this.props.unWrap?void 0:d().createElement("div",{className:"sui-form-field"},r,i)}}function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Vp.apply(null,arguments)}class $p extends ea.Component{constructor(e){super(e)}render(){let e=parseFloat(this.props.state.slider_min||1),t=parseFloat(this.props.state.slider_max||10),s=parseFloat(this.props.state.slider_step||1),a="range"===this.props.state.slider_type,r=this.props.state.slider_min_label||Na("Bad"),i=this.props.state.slider_man_label||Na("Excellent");const n="basic"===this.props.formDesign;if(t<e&&(t=e),t!==this.props.state.slider_max&&this.props.updateProperty("slider_max",t),_.isUndefined(this.props.state.display_selected_value)&&this.props.updateProperty("display_selected_value",!0),_.isUndefined(this.props.state.display_step_value)){let e=!0;_.isUndefined(this.props.state.slider_limits)||"hide"!==this.props.state.slider_limits||(e=!1),this.props.updateProperty("display_step_value",e)}const o=d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(_l,Vp({},this.props,{settings:this.props.state,property:"slider_width",defaultValue:"full",settingsLabel:Na("Slider width"),settingsDesc:Na("The Slider takes the full-width of its container by default, but you can select a different size below.")}),d().createElement("div",{value:"small"},Na("Small")),d().createElement("div",{value:"medium"},Na("Medium")),d().createElement("div",{value:"large"},Na("Large")),d().createElement("div",{value:"full"},Na("Full width"))))),!n&&d().createElement(d().Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(_l,Vp({},this.props,{settings:this.props.state,property:"slider_scale",defaultValue:"small",settingsLabel:Na("Slider scale"),settingsDesc:Na("Adjust the slider base and the height of the draggable thumb/handle.")}),d().createElement("div",{value:"small"},Na("Small")),d().createElement("div",{value:"large"},Na("Large"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(_l,Vp({},this.props,{settings:this.props.state,property:"show_slider_handle",defaultValue:"true",settingsLabel:Na("Slider Handle icon"),settingsDesc:Na("Choose whether to show an icon on the slider handle.")}),d().createElement("div",{value:"true"},Na("Show")),d().createElement("div",{value:"false"},Na("Hide"))))))),l=d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,null,d().createElement(Up,Vp({},this.props,{settings:this.props.state,label:Na("Display selected value"),property:"display_selected_value",unWrap:!0}),d().createElement(rl,{boxClass:"sui-tab-boxed"},d().createElement(il,null,d().createElement(kl,Vp({},this.props,{settings:this.props.state,label:Na("Selected value position"),property:"value_position",defaultValue:"bottom"}),d().createElement(ea.Fragment,null,d().createElement("option",{value:"top"},Na("Above slider track")),d().createElement("option",{value:"bottom"},Na("Below slider track"))))))))),d().createElement(rl,null,d().createElement(il,null,d().createElement(Up,Vp({},this.props,{settings:this.props.state,label:Na("Display step values"),property:"display_step_value",unWrap:!0}),d().createElement(rl,{boxClass:"sui-tab-boxed"},d().createElement(il,null,d().createElement(kl,Vp({},this.props,{settings:this.props.state,label:Na("Display type"),property:"display_step_type",defaultValue:"min_max"}),d().createElement(ea.Fragment,null,d().createElement("option",{value:"min_max"},Na("Min & Max values only")),d().createElement("option",{value:"all"},Na("All values")))),d().createElement(pp,Vp({},this.props,{settings:this.props.state,label:Na("Use custom labels"),tooltip:Na("Add custom labels to the minimum and maximum values on the slider"),property:"use_custom_labels",itemClass:"sui-checkbox-sm sui-checkbox-stacked"})),this.props.state.use_custom_labels&&d().createElement(ea.Fragment,null,d().createElement(rl,{class:"sui-spacing-10"},d().createElement(il,{cols:"3",customClass:"sui-padding-right-5"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"text",disabled:!0,property:"slider_min",defaultValue:e,inputStyles:{backgroundColor:"#fafafa",color:"#666666"}}))),d().createElement(il,{cols:"9",customClass:"sui-padding-left-5"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"text",property:"slider_min_label",defaultValue:r,placeholder:Na("e.g., Poor")})))),d().createElement(rl,{class:"sui-spacing-10"},d().createElement(il,{cols:"3",customClass:"sui-padding-right-5"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"text",disabled:!0,property:"slider_max",defaultValue:t,inputStyles:{backgroundColor:"#fafafa",color:"#666666"}}))),d().createElement(il,{cols:"9",customClass:"sui-padding-left-5"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"text",property:"slider_max_label",defaultValue:i,placeholder:Na("e.g., Great")})))))))))),d().createElement(Fl,{label:Na("Prefix and Suffix"),labelDark:!1,description:Na("Use these fields to display texts (e.g., currency symbols or units of measure) before and after the slider values."),descriptionSpacing:20,sidebar:!1},d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,label:Na("Prefix"),placeholder:Na('E.g. "$"'),property:"prefix"}))),d().createElement(il,{cols:"6"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,label:Na("Suffix"),placeholder:Na('E.g. "%"'),property:"suffix"})))))),p=d().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginBottom:"-30px"}},d().createElement(lp,Vp({},this.props,{label:Na("Advanced settings")}),d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",{role:"tablist",className:"sui-tabs-menu"},d().createElement(wr,{to:"/builder/settings/slider/labels",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Display and Labels")),d().createElement(wr,{to:"/builder/settings/slider/appearance",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Appearance"))),d().createElement(kt,null,d().createElement(Nt,{path:"/",element:d().createElement(xt,{to:"/builder/settings/slider/labels",replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content forminator-modal-body active",role:"tabpanel"},d().createElement(kt,null,d().createElement(Nt,{path:"/slider/labels",element:l}),d().createElement(Nt,{path:"/slider/appearance",element:o}))))))),c=d().createElement(Fl,{label:Na("Values"),labelDark:!0,sidebar:!1,lastChild:!0},d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"number",maxValue:t,step:s,label:Na("Minimum value"),placeholder:Na("Enter value"),property:"slider_min",defaultValue:e}))),d().createElement(il,{cols:"6"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"number",minValue:e,value:t,step:s,label:Na("Maximum value"),placeholder:Na("Enter value"),property:"slider_max"})))),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"number",label:Na("Step (Increment between values)"),minValue:"0",placeholder:Na("Enter value"),property:"slider_step",defaultValue:s}))),d().createElement(il,{cols:"6"},d().createElement(rl,null,d().createElement(il,a&&{cols:"6"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"number",minValue:e,maxValue:_.min([t,this.props.state.slider_default_2]),step:s,label:Na(a?"Start value":"Default selected value"),placeholder:Na("Enter value"),property:"slider_default",defaultValue:e}))),a&&d().createElement(il,{cols:"6"},d().createElement(ol,Vp({},this.props,{settings:this.props.state,type:"number",minValue:_.max([e,this.props.state.slider_default]),maxValue:t,step:s,label:Na("End value"),placeholder:Na("Enter value"),property:"slider_default_2",defaultValue:t})))))));return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),c,p)}}function Ip(){return Ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ip.apply(null,arguments)}class Rp extends ea.Component{constructor(e){super(e)}render(){return d().createElement(_l,Ip({},this.props,{settings:this.props.state,property:"hidden_behavior",defaultValue:"ignore",label:Na("When this field is hidden, should its value be null (zero), or should the field be ignored in calculations?"),noWrapper:!0}),d().createElement("span",{value:"zero"},Na("Null (zero)")),d().createElement("span",{value:"ignore"},Na("Ignore this field")))}}class Lp extends ea.Component{constructor(e){super(e),this.updateField=this.updateField.bind(this),this.updateState=this.updateState.bind(this)}updateField(e,t){this.updateState(t,e.target.value)}updateState(e,t){const s=this.props.state.options;s[e].calculation=t,this.props.updateProperty("options",s)}render(){return 0===this.props.state.options.length?d().createElement("div",null):d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-form-field"},d().createElement("span",{className:"sui-description"},Na("Assign a calculation value to each option. These values will not be shown on the form. You can assign only a numeric value."))),_.map(this.props.state.options,(e,t)=>{const s=_.isEmpty(e.calculation)?"sui-form-field-error":"";return d().createElement("div",{key:t,className:`sui-form-field ${s}`},d().createElement("label",{htmlFor:`calculation-option-${t}`,className:"sui-label"},ml(e.label)),d().createElement("input",{type:"number",placeholder:Na("Calculation value"),id:`calculation-option-${t}`,className:"sui-form-control sui-input-md",onChange:e=>this.updateField(e,t),defaultValue:e.calculation}),_.isEmpty(e.calculation)&&d().createElement("span",{className:"sui-error-message"},Na("Calculation value is required!")))}),d().createElement(Rp,this.props))}}function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Bp.apply(null,arguments)}class zp extends ea.Component{constructor(e){super(e)}isElementUsedInCalculationFields(){let e=!1;const t=this,s=ja(this.props.wrappers);return _.some(s,function(s){if(e=t.elementExistsInFormula(s.formula),!0===e)return e}),e}elementExistsInFormula(e){let t=!1;if(e){const s=this.props.state.element_id,a=new RegExp(`\\{${s}\\}|\\{${s}\\-\\*\\}`,"g");null!==e.match(a)&&(t=!0)}return t}getUsedCalculationFieldNames(){const e=this,t=ja(this.props.wrappers);let s="";return _.forEach(t,function(t){!0===e.elementExistsInFormula(t.formula)&&(s+=""===s?t.element_id:", "+t.element_id)}),s}render(){const e=_.isUndefined(this.props.state.options)?[]:this.props.state.options,t=e.length>0?"sui-tab-boxed":"",s=this.isElementUsedInCalculationFields()&&(!0===this.props.state.calculations||"true"===this.props.state.calculations);let a="";if(s){a=`${Na("It is impossible to disable calculation for this field because it is in use in %(names)s field(s).",{args:{names:this.getUsedCalculationFieldNames()}})}`}let r=d().createElement("span",{className:"sui-description"},Na("Choose whether to allow this field to be used in calculations or not. The value used in calculations is the same as the input value of this field."));return this.props.description&&(r=d().createElement("span",{className:"sui-description"},this.props.description)),d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Calculations")),r,e.length>0&&d().createElement(ql,Bp({},this.props,{settings:this.props.state,disabled:s,property:"calculations",description:"",default:"false",noWrapper:!0,tooltip:a}),d().createElement(Lp,Bp({},this.props,{value:"true",boxClass:t,label:Na("Enable")})),d().createElement(Yl,{value:"false",label:Na("Disable")})),0===e.length&&d().createElement(ql,Bp({},this.props,{settings:this.props.state,disabled:s,property:"calculations",default:"false",noWrapper:!0,tooltip:a}),d().createElement(Ql,Bp({},this.props,{value:"true",label:Na("Enable"),settings:this.props.state,boxClass:"sui-tab-boxed"}),d().createElement(Rp,this.props)),d().createElement(Yl,{value:"false",label:Na("Disable")}))))}}class Wp extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(jp,this.props);case"settings":return d().createElement($p,this.props);case"calculations":return d().createElement(zp,this.props);case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}class Hp extends ea.Component{constructor(e){super(e)}clearImage(){if("answer_image"===this.props.property){const e=Object.assign({},this.props.answer),t=this.props.property;e[t]="",e[t+"_filename"]="",e[t+"_alt"]="",this.props.actions.builderActions.updateAnswer(e)}else"function"==typeof this.props.updateProperty?(this.props.updateProperty(this.props.property,""),this.props.updateProperty(this.props.property+"_filename",""),this.props.updateProperty(this.props.property+"_alt","")):(this.props.actions.settingsActions.updateSetting(this.props.property,""),this.props.actions.settingsActions.updateSetting(this.props.property+"_filename",""),this.props.actions.settingsActions.updateSetting(this.props.property+"_alt",""))}openMedia(){const e=this,t=wp.media({title:Na("Select image"),button:{text:Na("Select")},multiple:!1}).on("select",function(){let s;const a=t.state().get("selection").first().toJSON();s=_.isUndefined(e.props.imageSize)?a.url:"thumbnail"===e.props.imageSize?a.sizes.thumbnail.url:"medium"===e.props.imageSize?_.isUndefined(a.sizes.medium)?a.sizes.full.url:a.sizes.medium.url:"large"===e.props.imageSize?_.isUndefined(a.sizes.large)?a.sizes.full.url:a.sizes.large.url:a.sizes.full.url,"function"==typeof e.props.updateProperty?(e.props.updateProperty(e.props.property,s),e.props.updateProperty(e.props.property+"_filename",a.filename),e.props.updateProperty(e.props.property+"_alt",a.alt)):(e.props.actions.settingsActions.updateSetting(e.props.property,s),e.props.actions.settingsActions.updateSetting(e.props.property+"_filename",a.filename),e.props.actions.settingsActions.updateSetting(e.props.property+"_alt",a.alt))});t.open()}render(){const e=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property],t=_.isEmpty(e)?"":"sui-has_file",s=_.isUndefined(this.props.settings[this.props.property+"_filename"])?e:_.isEmpty(this.props.settings[this.props.property+"_filename"])&&!_.isNull(e)?e.replace(/^.*[\\\/]/,""):this.props.settings[this.props.property+"_filename"];let a="";this.props.label&&(a=d().createElement("label",{className:"sui-label"},this.props.label));let r="";this.props.description&&(r=d().createElement("span",{className:"sui-description"},this.props.description));let i="";if("image"===this.props.type){let t="";e&&(t="url("+e+")"),i=d().createElement("div",{className:"sui-upload-image","aria-hidden":"true"},d().createElement("div",{className:"sui-image-mask"}),d().createElement("div",{role:"button",onClick:this.openMedia.bind(this),className:"sui-image-preview",style:{backgroundImage:t}}))}const n=this.props.fieldClass?" "+this.props.fieldClass:"",o="image"===this.props.type?`${Na("Upload image")}`:`${Na("Upload file")}`;return d().createElement("div",{className:`sui-form-field${n}`},a,d().createElement("div",{className:`sui-upload ${t}`},d().createElement("input",{type:"file",title:o,value:"",readOnly:"readonly"}),i,d().createElement("button",{className:"sui-upload-button",onClick:this.openMedia.bind(this)},d().createElement("i",{className:"sui-icon-upload-cloud","aria-hidden":"true"}),o),d().createElement("div",{className:"sui-upload-file"},d().createElement("span",{title:s},s),d().createElement("button",{className:"sui-upload-button--remove",onClick:this.clearImage.bind(this)},d().createElement("i",{className:"sui-icon-close","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},"image"===this.props.type?`${Na("Remove uploaded image")}`:`${Na("Remove uploaded file")}`)))),r)}}function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},qp.apply(null,arguments)}class Qp extends ea.Component{constructor(e){super(e),this.labelInput=d().createRef(),this.valueInput=d().createRef(),this.focusLabel=this.focusLabel.bind(this),this.focusValue=this.focusValue.bind(this),this.toggleState=this.toggleState.bind(this),this.updateImage=this.updateImage.bind(this),this.state={focus:!1,open:this.props.state.options_expanded}}removeOption(){this.props.removeOption(this.props.counter)}updateLabel(e){this.props.updateLabel(this.props.counter,e.target.value)}updateLimit(e){this.props.updateLimit(this.props.counter,e.target.value)}updateValue(e){this.props.updateValue(this.props.counter,e.target.value)}updateDefault(e){this.props.updateDefault(this.props.counter,e.target.checked)}updateImage(e,t){this.props.updateImage(this.props.counter,t,e)}onFocus(){this.setState({focus:!0})}onBlurValue(){this.onBlur()}onBlurLabel(e){this.onBlur();const t=ha(e.target.value);_.isEmpty(this.props.option.value)&&this.props.updateValue(this.props.counter,t)}onBlur(){this.state.focus&&this.setState({focus:!1})}focusLabel(){this.labelInput.current.focus()}focusValue(){this.valueInput.current.focus()}toggleState(){this.setState({open:!this.state.open});const e=this,t=jQuery(".fui-option");let s,a,r=0,i=0;clearTimeout(s),s=setTimeout(function(){t.each(function(){jQuery(this).find(".sui-accordion-item").hasClass("sui-accordion-item--open")?r++:i++}),clearTimeout(a),a=setTimeout(function(){0===r?e.props.updateProperty("options_expanded",!1):0===i&&e.props.updateProperty("options_expanded",!0)},50)},50)}componentDidMount(){this.$opt=jQuery(this.opt);const e=jQuery("#forminator-modal");let t=e.scrollTop();e.on("scroll",function(){t=jQuery(this).scrollTop()}),this.$opt.on("change",".sui-checkbox > input",function(s){s.preventDefault(),s.stopPropagation(),e.scrollTop(t)})}componentDidUpdate(e){this.props.state.options_expanded!==e.state.options_expanded&&this.setState({open:this.props.state.options_expanded})}headerImage(){const{open:e}=this.state,t=this.props.state.enable_images,s=void 0!==this.props.option.image?"url("+this.props.option.image+")":"";return!e&&t?d().createElement("div",{className:"sui-upload"},d().createElement("div",{className:"sui-upload-image","aria-hidden":"true"},d().createElement("div",{className:"sui-image-mask"}),d().createElement("div",{role:"button",className:"sui-image-preview",style:{display:"block",backgroundImage:s}}))):null}renderLabelField(){const e=_.isEmpty(this.props.option.label)||this.props.option.error?"sui-form-field-error":"";return d().createElement("div",{className:`sui-form-field ${e}`},d().createElement("input",{type:"text",size:"1",placeholder:Na("Label"),value:this.props.option.label,className:"sui-form-control",onChange:this.updateLabel.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlurLabel.bind(this),ref:this.labelInput,onClick:this.focusLabel,title:Na("Label")}))}renderAccordionIndicator(){return d().createElement("button",{className:"sui-button-icon sui-accordion-open-indicator",title:Na("Toggle"),"aria-label":Na("Open item"),onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-chevron-down","aria-hidden":"true"}))}renderImageUploadField(){return this.props.state.enable_images?d().createElement("div",{className:"fui-option-settings--extra"},d().createElement(Hp,qp({},this.props,{settings:this.props.option,type:"image",fieldClass:"sui-auto",property:"image",updateProperty:this.updateImage}))):null}render(){const e=this.state.focus?"fui-on_focus":"",{open:t}=this.state;let s="";return s=t?"sui-accordion-item--open":"",d().createElement("div",{className:`fui-option ${e}`,ref:e=>this.opt=e},d().createElement("div",{className:"fui-option-settings"},d().createElement("div",{className:"sui-accordion-item "+s,style:{boxShadow:"none"}},d().createElement("div",{className:"sui-accordion-item-header",style:{minHeight:"0",padding:"0"}},d().createElement("div",{className:"fui-option-settings--main",style:{padding:"0"}},this.headerImage(),this.renderLabelField(),!t&&d().createElement("label",{htmlFor:`option-selected-${this.props.counter}`,className:"sui-checkbox",title:Na("Selected"),style:{marginLeft:"15px"}},d().createElement("input",{type:"checkbox",checked:this.props.option.default?"checked":"",name:"demo-field-radio--option-selected",id:`option-selected-${this.props.counter}`,onChange:this.updateDefault.bind(this)}),d().createElement("span",{"aria-hidden":"true"})),d().createElement("button",{className:"sui-button-icon sui-button-red fui-option-remove",title:Na("Delete option"),"aria-label":Na("Delete option"),onClick:this.removeOption.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"})),d().createElement("div",{style:{borderLeft:"1px solid #E6E6E6",width:"1px",height:"30px"}}),this.renderAccordionIndicator())),d().createElement("div",{className:"sui-accordion-item-body",style:{padding:"10px 10px 0 0"}},d().createElement("div",{className:"fui-option-settings--extra"},d().createElement("input",{type:"text",value:this.props.option.value,title:Na("Value"),placeholder:Na("Value"),className:"sui-form-control",onChange:this.updateValue.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlurValue.bind(this),ref:this.valueInput,onClick:this.focusValue}),this.props.state.type&&"select"===this.props.state.type&&this.props.isLimit&&"true"===this.props.isLimit&&d().createElement("input",{type:"text",value:this.props.option.limit,placeholder:Na("Submission limit"),className:"sui-form-control",onChange:this.updateLimit.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)}),t&&d().createElement("label",{htmlFor:`option-selected-${this.props.counter}`,className:"sui-checkbox"},d().createElement("input",{type:"checkbox",checked:this.props.option.default?"checked":"",name:"demo-field-radio--option-selected",id:`option-selected-${this.props.counter}`,onChange:this.updateDefault.bind(this)}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",{className:"sui-description sui-description-sm"},Na("Selected")))),this.renderImageUploadField()))))}}class Yp extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this);const t=_.isUndefined(this.props.defaultValue)?"":this.props.defaultValue,s=_.isUndefined(this.props.settings[this.props.property])?t:this.props.settings[this.props.property];this.state={value:s}}componentDidMount(){const e=this;this.$el=jQuery(this.el),this.$addPredefined=jQuery(this.addPredefined),SUI.select.initVars(this.$el),this.updateValue=this.updateValue.bind(this),this.$el.on("change",t=>{const s=e.state.value;let a=t.target.value;0!==s.length&&(a=s+"\n"+a),this.updateValue(a),this.predefinedSelector(),this.scrollToNewOpt()}),this.predefinedSelector()}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e),"function"==typeof this.props.updateValue&&this.props.updateValue(this.props.counter,e),this.setState({value:e})}componentWillUnmount(){this.$el.off("change",this.updateValue),this.$el.unbind().removeData()}getSnapshotBeforeUpdate(e,t){return this.props.value!==e.value&&this.updateValue(this.props.value),null}componentDidUpdate(e,t){this.props.state.enable_images!==e.state.enable_images&&(SUI.select.initVars(this.$el),this.predefinedSelector())}isValid(e){return this.props.isRequired?this.props.isRequired&&!_.isEmpty(e):!!_.isUndefined(this.props.isPositive)||(_.isEmpty(e)||e>=0)}scrollToNewOpt(){const e=jQuery("#bulk-edit-textarea");let t;clearTimeout(t),t=setTimeout(function(){e.animate({scrollTop:e.prop("scrollHeight")},300)},20)}predefinedSelector(){this.$el.next(".select2-container").find(".select2-selection").html(Na("+ Predefined options"))}render(){const e=_.isUndefined(this.props.defaultValue)?"":this.props.defaultValue,t=_.isUndefined(this.props.settings[this.props.property])?e:this.props.settings[this.props.property],s=_.isUndefined(this.props.requiredError)?Na("This field is required!"):this.props.requiredError,a=this.isValid(t)?"":"sui-form-field-error",r=!_.isUndefined(this.props.state.enable_images)&&this.props.state.enable_images,i=Na("My Label; my-value; 0; https://mysite.com/my-image-url.jpg"),n=Na("My Label; my-value; 0");return d().createElement("div",{className:`sui-form-field ${a}`},d().createElement("div",{className:"sui-row"},d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-col-sm-6 sui-label"},this.props.label," ",(this.props.isRequired||this.props.required)&&d().createElement("span",{className:"sui-error"}," *")),d().createElement("div",{id:"add-predefined",className:"sui-col-sm-6 sui-insert-variables",ref:e=>this.addPredefined=e},d().createElement("select",{className:"predefined-options sui-variables",ref:e=>this.el=e},d().createElement("option",{value:n},Na("New option")),r&&d().createElement("option",{value:i},Na("New option with image")),d().createElement("option",{value:Na("Under 1 year\n1-17\n18-24\n25-34\n35-44\n45-54\n55-64\n65 and Above")},Na("Age")),d().createElement("option",{value:Na("Male\nFemale\nNon-binary\nOther")},Na("Gender")),d().createElement("option",{value:Na("Primary School\nHigh School\nSome College\nAssociate's Degree\nBachelor's Degree\nMaster's degree\nProfessional degree\nDoctoral degree\nOther")},Na("Educational Attainment")),d().createElement("option",{value:Na("Full-time employed\nPart-time employed\nSelf-employed\nContract Worker\nHomemaker\nRetired\nStudent\nUnemployed")},Na("Employment Status")),d().createElement("option",{value:Na("Architecture and Engineering\nArts, Design, Entertainment, Sports, and Media\nBuilding and Grounds Cleaning and Maintenance\nBusiness and Financial Operations\nCommunity and Social Services\nComputer and Mathematical\nConstruction and Extraction\nEducational Instruction and Library\nFarming, Fishing, and Forestry\nFood Preparation and Serving Related\nHealthcare Practitioners and Technical\nHealthcare Support\nInstallation, Maintenance, and Repair\nLegal\nLife, Physical, and Social Science\nManagement\nOffice and Administrative Support\nPersonal Care and Services\nProduction/Manufacturing\nProtective Service\nSales and Related\nTransportation and Material Moving")},Na("Occupation")),d().createElement("option",{value:Na("Single\nMarried\nDivorced\nSeparated\nWidowed")},Na("Marital Status")),d().createElement("option",{value:Na("Africa\nAntarctica\nAsia\nAustralia\nEurope\nNorth America\nSouth America")},Na("Continents")),d().createElement("option",{value:Na("Afghanistan\nÅland Islands\nAlbania\nAlgeria\nAmerican Samoa\nAndorra\nAngola\nAnguilla\nAntarctica\nAntigua and Barbuda\nArgentina\nArmenia\nAruba\nAustralia\nAustria\nAzerbaijan\nBahamas\nBahrain\nBangladesh\nBarbados\nBelarus\nBelgium\nBelize\nBenin\nBermuda\nBhutan\nBolivia\nBonaire, Sint Eustatius and Saba\nBosnia and Herzegovina\nBotswana\nBouvet Island\nBrazil\nBritish Indian Ocean Territory\nBrunei Darussalam\nBulgaria\nBurkina Faso\nBurundi\nCabo Verde\nCambodia\nCameroon\nCanada\nCayman Islands\nCentral African Republic\nChad\nChile\nChina\nChristmas Island\nCocos Islands\nColombia\nComoros\nCongo, Democratic Republic of the\nCongo, Republic of the\nCook Islands\nCosta Rica\nCôte d'Ivoire\nCroatia\nCuba\nCuraçao\nCyprus\nCzech Republic\nDenmark\nDjibouti\nDominica\nDominican Republic\nEcuador\nEgypt\nEl Salvador\nEquatorial Guinea\nEritrea\nEstonia\nEswatini\nEthiopia\nFalkland Islands\nFaroe Islands\nFiji\nFinland\nFrance\nFrench Guiana\nFrench Polynesia\nFrench Southern Territories\nGabon\nGambia\nGeorgia\nGermany\nGhana\nGibraltar\nGreece\nGreenland\nGrenada\nGuadeloupe\nGuam\nGuatemala\nGuernsey\nGuinea\nGuinea-Bissau\nGuyana\nHaiti\nHeard and McDonald Islands\nHoly See\nHonduras\nHong Kong\nHungary\nIceland\nIndia\nIndonesia\nIran\nIraq\nIreland\nIsle of Man\nIsrael\nItaly\nJamaica\nJapan\nJersey\nJordan\nKazakhstan\nKenya\nKiribati\nKuwait\nKyrgyzstan\nLao People's Democratic Republic\nLatvia\nLebanon\nLesotho\nLiberia\nLibya\nLiechtenstein\nLithuania\nLuxembourg\nMacau\nMadagascar\nMalawi\nMalaysia\nMaldives\nMali\nMalta\nMarshall Islands\nMartinique\nMauritania\nMauritius\nMayotte\nMexico\nMicronesia\nMoldova\nMonaco\nMongolia\nMontenegro\nMontserrat\nMorocco\nMozambique\nMyanmar\nNamibia\nNauru\nNepal\nNetherlands\nNew Caledonia\nNew Zealand\nNicaragua\nNiger\nNigeria\nNiue\nNorfolk Island\nNorth Korea\nNorth Macedonia\nNorthern Mariana Islands\nNorway\nOman\nPakistan\nPalau\nPalestine, State of\nPanama\nPapua New Guinea\nParaguay\nPeru\nPhilippines\nPitcairn\nPoland\nPortugal\nPuerto Rico\nQatar\nRéunion\nRomania\nRussia\nRwanda\nSaint Barthélemy\nSaint Helena, Ascension and Tristan da Cunha\nSaint Kitts and Nevis\nSaint Lucia\nSaint Martin\nSaint Pierre and Miquelon\nSaint Vincent and the Grenadines\nSamoa\nSan Marino\nSao Tome and Principe\nSaudi Arabia\nSenegal\nSerbia\nSeychelles\nSierra Leone\nSingapore\nSint Maarten\nSlovakia\nSlovenia\nSolomon Islands\nSomalia\nSouth Africa\nSouth Georgia and the South Sandwich Islands\nSouth Korea\nSouth Sudan\nSpain\nSri Lanka\nSudan\nSuriname\nSvalbard and Jan Mayen Islands\nSweden\nSwitzerland\nSyria\nTaiwan\nTajikistan\nTanzania\nThailand\nTimor-Leste\nTogo\nTokelau\nTonga\nTrinidad and Tobago\nTunisia\nTurkey\nTurkmenistan\nTurks and Caicos Islands\nTuvalu\nUganda\nUkraine\nUnited Arab Emirates\nUnited Kingdom\nUnited States\nUruguay\nUS Minor Outlying Islands\nUzbekistan\nVanuatu\nVenezuela\nVietnam\nVirgin Islands, British\nVirgin Islands, U.S.\nWallis and Futuna\nWestern Sahara\nYemen\nZambia\nZimbabwe")},Na("Countries")),d().createElement("option",{value:Na("Alabama\nAlaska\nArizona\nArkansas\nCalifornia\nColorado\nConnecticut\nDelaware\nDistrict of Columbia\nFlorida\nGeorgia\nHawaii\nIdaho\nIllinois\nIndiana\nIowa\nKansas\nKentucky\nLouisiana\nMaine\nMaryland\nMassachusetts\nMichigan\nMinnesota\nMississippi\nMissouri\nMontana\nNebraska\nNevada\nNew Hampshire\nNew Jersey\nNew Mexico\nNew York\nNorth Carolina\nNorth Dakota\nOhio\nOklahoma\nOregon\nPennsylvania\nRhode Island\nSouth Carolina\nSouth Dakota\nTennessee\nTexas\nUtah\nVermont\nVirginia\nWashington\nWest Virginia\nWisconsin\nWyoming")},Na("American States")),d().createElement("option",{value:Na("Alberta\nBritish Columbia\nManitoba\nNew Brunswick\nNewfoundland and Labrador\nNorthwest Territories\nNova Scotia\nNunavut\nOntario\nPrince Edward Island\nQuebec\nSaskatchewan\nYukon")},Na("Canadian Provinces"))))),d().createElement("div",{className:"sui-insert-variables"},d().createElement("textarea",{id:"bulk-edit-textarea",value:this.state.value,placeholder:this.props.placeholder,className:"sui-form-control",onChange:e=>{this.updateValue(e.target.value)},rows:"8"}),this.props.isRequired&&!this.isValid(t)&&d().createElement("span",{className:"sui-error-message"},s),this.props.description&&d().createElement("span",{className:"sui-description bulk-editor-description"},this.props.description)))}}class Gp extends Qp{constructor(e){super(e),this.updateImage=this.updateImage.bind(this),this.updateLabel=this.updateLabel.bind(this)}updateLabel(e){this.props.updateLabel(e.target.value)}updatePlaceHolder(e){this.props.updatePlaceHolder(e.target.value)}updateImage(e,t){this.props.updateImage(t,e)}onBlurLabel(e){this.onBlur();const t=ha(e.target.value);_.isEmpty(this.props.option.value)&&this.props.updatePlaceHolder(t)}render(){const e=this.state.focus?"fui-on_focus":"",{open:t}=this.state;let s="";return s=t?"sui-accordion-item--open":"",d().createElement("div",{className:`fui-option ${e}`,ref:e=>this.opt=e},d().createElement("div",{className:"fui-option-settings"},d().createElement("div",{className:"sui-accordion-item "+s,style:{boxShadow:"none"}},d().createElement("div",{className:"sui-accordion-item-header",style:{minHeight:"0",padding:"0"}},d().createElement("div",{className:"fui-option-settings--main",style:{padding:"0"}},this.headerImage(),this.renderLabelField(),this.renderAccordionIndicator())),d().createElement("div",{className:"sui-accordion-item-body",style:{padding:"10px 10px 0 0"}},d().createElement("div",{className:"fui-option-settings--extra",style:{"margin-right":"30px"}},d().createElement("input",{type:"text",value:this.props.option.placeholder,title:Na("Other option placeholder"),placeholder:Na("Other option placeholder"),className:"sui-form-control",onChange:this.updatePlaceHolder.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlurValue.bind(this),ref:this.valueInput,onClick:this.focusValue})),this.renderImageUploadField()))))}}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Kp.apply(null,arguments)}class Jp extends ea.Component{constructor(e){super(e),this.addOption=this.addOption.bind(this),this.removeOption=this.removeOption.bind(this),this.updateLabel=this.updateLabel.bind(this),this.updateValue=this.updateValue.bind(this),this.updateLimit=this.updateLimit.bind(this),this.updateDefault=this.updateDefault.bind(this),this.updateImage=this.updateImage.bind(this),this.updateBulkValue=this.updateBulkValue.bind(this),this.updateCustomOptionPlaceHolder=this.updateCustomOptionPlaceHolder.bind(this),this.updateCustomOptionLabel=this.updateCustomOptionLabel.bind(this),this.updateCustomOptionImage=this.updateCustomOptionImage.bind(this),this.updateEnableCustomOption=this.updateEnableCustomOption.bind(this);const t=!_.isUndefined(this.props.state.bulk_edit)&&this.props.state.bulk_edit,s=_.isUndefined(this.props.state.options)?[]:[...this.props.state.options];let a={label:Na("Other"),key:"custom_option",value:"custom_option",placeholder:""};if(s.length){const e=_.findKey(s,{key:"custom_option"});_.isUndefined(e)||(a=s[e])}this.state={options:s,options_bulk_editor:_.isUndefined(this.props.state.options_bulk_editor)?"":this.props.state.options_bulk_editor,options_calcs:this.props.state.calculations?[...this.props.state.options]:[],csv_file:null,is_loading:!t,show_standard:!1,custom_option:a}}componentDidMount(){const e=this,t=this.props.state.limit_status;this.runEditorFunctions(),this.props.state.bulk_edit||0!==this.state.options_bulk_editor.length&&"enable"!==t?this.props.state.bulk_edit&&"enable"===t&&!this.props.state.calculations&&this.convertToStandard():this.convertToBulk(),this.state.is_loading&&setTimeout(function(){e.setState({is_loading:!1,show_standard:!0}),e.addOptionClassToggle()},400)}getSnapshotBeforeUpdate(e,t){const s=this,a=this.state.options,r=this.props.state.bulk_edit,i=this.state.is_loading;let n,o;if(r||!e.state.bulk_edit||i||this.setState({is_loading:!0}),!r&&i){const e=a.length<50?400:700;clearTimeout(o),o=setTimeout(function(){s.setState({is_loading:!1,show_standard:!0})},e)}return clearTimeout(n),r&&this.props.state.options_bulk_editor!==e.state.options_bulk_editor?n=setTimeout(function(){s.convertToStandard()},500):r||this.props.state.options===e.state.options||(n=setTimeout(function(){s.convertToBulk()},500)),null}componentDidUpdate(e,t){this.props.state.bulk_edit===e.state.bulk_edit&&(this.state.is_loading||this.props.state.bulk_edit)||(this.runEditorFunctions(),this.addOptionClassToggle()),this.state.options_bulk_editor===t.options_bulk_editor&&this.props.state.options_expanded===e.state.options_expanded||this.addOptionClassToggle()}runEditorFunctions(){const e=this,t=this.props.state.bulk_edit,s=this.state.is_loading;if(this.$el=jQuery(this.el),this.$importError=this.$el.find(".importer-error"),!t&&!s){this.moveOption=this.moveOption.bind(this);let t=!0;this.$el.find(".fui-multi-options").sortable({helper:"clone",start:function(s,a){t&&(e.$el.find(".fui-multi-options").sortable("refreshPositions"),t=!1)},stop:function(t,s){const a=s.item.index();e.$el.find(".fui-multi-options").sortable("cancel");const r=s.item.index();e.moveOption(r,a)}}),this.$el.find(".fui-multi-options.custom-option").sortable("disable")}if(t){e.setState({show_standard:!1}),window.File&&window.FileReader&&window.FileList&&window.Blob||this.showError(Na("The File APIs are not fully supported in this browser. You may copy and paste your options on the text area above or switch to a modern browser to use the importer."));const t=this.$el.find(".upload-csv-btn"),s=this.$el.find(".import-csv-btn"),a=this.$el.find(".uploaded-csv-file"),r=a.find(".remove-file"),i=this.$el.find("#upload-csv-input");this.$el.find(".upload-csv-btn, .uploaded-csv-file > span").on("click",function(){i.trigger("click"),e.hideError()}),r.on("click",function(){i.val("").trigger("change")}),i.on("change",function(){const n=i.val();if(n.length>0){e.setState({csv_file:i.get(0).files[0]});"csv"!==n.slice((n.lastIndexOf(".")-1>>>0)+2)?(r.trigger("click"),e.showError(Na("Whoops, only .csv filetype is allowed."))):(s.prop("disabled",!1),t.hide(),a.show(),a.find("> span").html(n.replace(/^.*[\\\/]/,"")),0!==e.props.state.options_bulk_editor.length&&e.showError(Na("Importing this will replace your current options. Click import to continue."),"warning"))}else s.prop("disabled",!0),t.show(),a.hide(),a.find("> span").html(""),e.hideError()}),s.on("click",function(){e.importCsv()})}}importCsv(){if(!(window.File&&window.FileReader&&window.FileList&&window.Blob))return;const e=this,t=this.$el.find("#upload-csv-input"),s=this.state.csv_file;if(t.get(0).files){const a=s,r=new FileReader;this.setState({options_bulk_editor:""}),r.onload=function(){let t=r.result;-1!==t.indexOf("Option label; Option value")&&(t=t.substring(t.indexOf("\n")+1)),e.props.updateProperty("options_bulk_editor",t),e.setState({options_bulk_editor:t}),e.convertToStandard()},r.readAsText(a),this.setState({csv_file:null}),t.trigger("change")}else e.showError(Na("This browser doesn't seem to support the `files` property of file inputs."))}showError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error";"error"!==t?this.$importError.removeClass("sui-notice-error").addClass("sui-notice-"+t):this.$importError.removeClass().addClass("importer-error sui-notice sui-notice-error"),this.$importError.find("p").text(e),this.$importError.addClass("sui-active"),this.$importError.show()}hideError(){this.$importError.find("p").text(""),this.$importError.removeClass("sui-active"),this.$importError.hide()}componentWillUnmount(){jQuery("#forminator-modal").off("scroll"),this.$el.off().removeData()}updateState(e){const t=_.findKey(e,{key:"custom_option"});_.isUndefined(t)||e.push(e.splice(t,1)[0]),this.setState({options:e}),this.props.updateProperty("options",e),this.convertToBulk()}updateCustomOptionState(e){this.setState({custom_option:e});const t=this.state.options,s=_.findKey(t,{key:"custom_option"});_.isUndefined(s)?t.push(e):t[s]=e,this.updateState(t)}updateEnableCustomOption(e,t){if(this.props.updateProperty(e,t),!1===t){const e=this.state.options,t=_.findIndex(e,{key:"custom_option"});-1!==t&&this.removeOption(t)}else this.updateCustomOptionState(this.state.custom_option)}updateCustomOptionPlaceHolder(e){const t=this.state.custom_option;t.placeholder=e,this.updateCustomOptionState(t)}updateCustomOptionLabel(e){const t=this.state.custom_option;t.label=e,this.updateCustomOptionState(t)}updateCustomOptionImage(e,t){const s=this.state.custom_option;"image"===t&&(s.image=e),"image"!==t&&(s.image_filename=e),this.updateCustomOptionState(s)}updateLabel(e,t){const s=this.state.options;s[e].label=t,this.updateState(s)}updateLimit(e,t){const s=this.state.options;s[e].limit=t,this.updateState(s)}updateValue(e,t){const s=this.state.options;s[e].value=t,this.updateState(s)}moveOption(e,t){const s=this.state.options;s.splice(t,0,s.splice(e,1)[0]),this.updateState(s)}updateDefault(e,t){const s=this.state.options;this.props.isRadio&&"true"===this.props.isRadio&&_.map(s,(e,t)=>{s[t].default=!1}),s[e].default=t,this.updateState(s)}removeOption(e){const t=this.state.options;t.splice(e,1),this.updateState(t)}updateImage(e,t,s){const a=this.state.options;"image"===s&&(a[e].image=t),"image"!==s&&(a[e].image_filename=t),this.updateState(a)}addOption(){const e=this.state.options,t=ia()+"-"+ia();e.push({label:"",value:"",limit:"",default:!1,key:t}),this.updateState(e),this.scrollToNewOpt()}scrollToNewOpt(){const e=jQuery(".standard-editor");let t;clearTimeout(t),t=setTimeout(function(){e.animate({scrollTop:e.prop("scrollHeight")},300)},200)}addOptionClassToggle(){let e;clearTimeout(e),e=setTimeout(function(){const e=jQuery(".standard-editor").not(".custom-option").next(".fui-multi-options"),t=jQuery(".standard-editor").next(".fui-multi-options.custom-option");jQuery(".standard-editor").outerHeight()>460?(jQuery(".standard-editor").next(".fui-multi-options").removeClass("add-option-box"),e.addClass("add-option-box"),t.css("padding-top","15px")):(e.removeClass("add-option-box"),t.css("padding-top","0"))},50)}generateUniqId(){return ia()+"-"+ia()}updateBulkValue(){const e=this.state.options_bulk_editor;return this.setState({options_bulk_editor:e}),e}convertToBulk(){const e=this.state.options,t=this.props.state.type,s=this.props.state.value_type;let a="",r=!1;_.map(e,(e,i)=>{if("custom_option"===e.key)return;i>0&&(a+="\n");const n=e.label,o=e.value;a+=n,a+=";",_.isUndefined(o)?_.isUndefined(n)?a+="":a+=n:a+=o,_.isUndefined(e.default)||!e.default||("radio"===t||"select"===t&&"single"===s)&&r?(a+="; ",a+="0"):e.default&&(a+="; ",a+="1",r=!0),"select"===t?_.isUndefined(e.limit)||_.isEmpty(e.limit)||(a+="; ",a+=e.limit):_.isUndefined(e.image)||_.isEmpty(e.image)||(a+="; ",a+=e.image)}),this.setState({options_bulk_editor:a}),this.props.updateProperty("options_bulk_editor",a)}convertToStandard(){const e=this.props.state.type,t=this.props.state.value_type,s=[];let a=this.props.state.options_bulk_editor;if(!_.isUndefined(a)&&a.length>0){let r=0,i=!1;a=a.split(/\r\n|\r|\n/),_.map(a,(a,n)=>{if(Boolean(a)){const n=a.split(";"),o=!_.isUndefined(n[2])&&1==n[2],l=_.isEmpty(n[0])?Na("Option ")+(r+1):n[0];let p=_.isUndefined(n[1])?"":n[1];if(_.isEmpty(p)&&(p=l),s[r]={key:this.generateUniqId(),label:l,value:p},s[r].default=("radio"!==e&&("select"!==e||"single"!==t)||!i)&&o,o&&(i=!0),_.isEmpty(n[3])||("select"===e?"enable"===this.props.state.limit_status&&(s[r].limit=n[3]):(s[r].image=n[3],s[r].image_filename=n[3].replace(/^.*[\\\/]/,""))),this.props.state.calculations){const e=_.find(this.state.options_calcs,function(e){return e.label===l});s[r].calculation=_.isUndefined(e)?"":e.calculation}r++}})}this.setState({options:s}),this.props.updateProperty("options",s)}findDuplicateOptions(e){let t=null;return _.map(e,s=>{const a=_.filter(e,{label:s.label}).length,r=_.filter(e,{value:s.value}).length;switch(!0){case _.isEmpty(s.value):t="Warning! Option value is empty it won't appear in the dropdown.",s.error=!0;break;case a>1&&r>1:t="Warning! You've added options with same label and value.",s.error=!0;break;case a>1:t="Warning! You've added options with same label.",s.error=!0;break;case r>1:t="Warning! You've added options with same value.",s.error=!0;break;default:s.error=!1}}),[e,t]}render(){const e=_.isUndefined(this.props.state.options_expanded)||!this.props.state.options_expanded?Na("Expand All"):Na("Collapse All"),t=!_.isUndefined(this.props.state.bulk_edit)&&this.props.state.bulk_edit,s=this.props.state.type,a="select"!==s?"checkbox_radio_bulk_template.csv":"select_bulk_template.csv",[r,i]=this.findDuplicateOptions(this.state.options),n=this.state.options_bulk_editor,o=this.state.is_loading,l=this.state.show_standard,p=r.length>1e3,c=0===r.length?"no-option":"";let u="";switch(s){case"select":u=Na("Select");break;case"radio":u=Na("Radio");break;case"checkbox":u=Na("Checkbox")}let m=Na("Label; value; selection (0 or 1); image-url");"select"===s&&(m="enable"===this.props.state.limit_status?Na("Label; value; selection (0 or 1); submission limit"):Na("Label; value; selection (0 or 1)"));const h=forminatorData.pluginUrl+"assets/csv/"+a,f=!_.isUndefined(this.props.state.enable_custom_option)&&this.props.state.enable_custom_option;return d().createElement("div",{id:"demo-multi-options--radio",className:"sui-form-field multi-options-bulk",ref:e=>this.el=e},p&&t||i&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-yellow sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na(i||"Warning! You've added more than 1000 options. Switching back to the standard (non-bulk) editor could make your browser slow or unresponsive. Proceed with caution."))))),d().createElement(rl,null,d().createElement(il,{cols:"4"},d().createElement("div",{style:{"padding-top":"5px"}},d().createElement(Up,Kp({},this.props,{settings:this.props.state,property:"enable_custom_option",label:Na("Other option"),unWrap:!0,updateProperty:this.updateEnableCustomOption})))),d().createElement(il,{cols:"8"},d().createElement("div",{className:"switch-box"},!t&&d().createElement(pp,Kp({},this.props,{settings:this.props.state,label:e,property:"options_expanded",itemClass:"sui-checkbox sui-checkbox-sm collapse-options"})),"select"!==s&&d().createElement(pp,Kp({},this.props,{settings:this.props.state,label:Na("Enable Images"),property:"enable_images",itemClass:"sui-checkbox-sm "})),d().createElement("span",{className:"bulk-edit-toggle "},d().createElement(Up,Kp({},this.props,{settings:this.props.state,property:"bulk_edit",label:Na("Bulk Edit"),unWrap:!0})))))),o&&d().createElement("div",{className:"multi-opts-preloader"},d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}," ",Na("Loading"),"...")),!t&&l&&d().createElement("div",{className:"sui-accordion sui-accordion-block"},d().createElement("div",{className:`fui-multi-options standard-editor ${c}`},_.map(r,(e,t)=>"custom_option"!==e.key&&d().createElement(Qp,Kp({key:t,counter:t,option:e,removeOption:this.removeOption,updateValue:this.updateValue,updateLabel:this.updateLabel,updateLimit:this.updateLimit,updateDefault:this.updateDefault,updateImage:this.updateImage},this.props)))),f&&d().createElement("div",{className:"fui-multi-options custom-option standard-editor"},d().createElement(Gp,Kp({option:this.state.custom_option,updatePlaceHolder:this.updateCustomOptionPlaceHolder,updateLabel:this.updateCustomOptionLabel,updateImage:this.updateCustomOptionImage},this.props))),d().createElement("div",{className:"fui-multi-options"},d().createElement("button",{className:"fui-add-option",onClick:this.addOption},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Option")))),t&&d().createElement("div",{className:"fui-multi-options"},d().createElement("div",{className:"sui-box sui-message sui-message-lg fui-multi-options-bulk"},d().createElement(Yp,Kp({},this.props,{settings:this.props.state,property:"options_bulk_editor",defaultValue:n,value:n,updateValue:this.updateBulkValue,label:Na("Enter field options (one per line)"),description:Na('Type or paste options above (one per line and separated by semicolons) or click \n {{b}}"+ Predefined options"{{/b}} link to select an option. Example: {{b}}'+m+"{{/b}}",{components:{b:d().createElement("b",null)}})})),d().createElement("div",{className:"sui-form-field bulk-importer"},d().createElement("label",{className:"sui-label"},Na("Import options from CSV")),d().createElement("div",{className:"sui-upload"},d().createElement("input",{id:"upload-csv-input",type:"file",value:"",readOnly:"readonly",accept:".csv"}),d().createElement("button",{className:"sui-upload-button upload-csv-btn"},d().createElement("span",{className:"sui-icon-upload-cloud","aria-hidden":"true"}),Na("Upload file")),d().createElement("div",{className:"sui-upload-file uploaded-csv-file"},d().createElement("span",null),d().createElement("button",{className:"remove-file","aria-label":"Remove file"},d().createElement("span",{className:"sui-icon-close","aria-hidden":"true"}))),d().createElement("button",{role:"button",className:"sui-button sui-button-blue import-csv-btn",disabled:!0},d().createElement("span",{className:"sui-icon-download-cloud","aria-hidden":"true"}),Na("Import"))),d().createElement("div",{role:"alert",className:"sui-notice sui-notice-error","aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null)))),d().createElement("span",{className:"sui-description"},Na("Choose a CSV (.csv) file to import field options and values.")+" ",h&&d().createElement("a",{className:"blue",href:h,target:"_blank",download:a},Na("Download csv template")))))))}}function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Zp.apply(null,arguments)}class Xp extends ea.Component{constructor(e){super(e)}toggleValue(e){this.props.updateProperty(this.requiredProp,e)}render(){const e=Na("radio"===(_.isUndefined(this.props.state.type)?"radio":this.props.state.type)?"radio button":"checkbox"),t=e.charAt(0).toUpperCase()+e.slice(1);return d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},t+" "+Na("visibility")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na(`When using image options, you can hide or show the ${e} element and its label in frontend. If no image is uploaded, the ${e} and label will remain visible.`)),d().createElement(_l,Zp({},this.props,{settings:this.props.state,property:"input_visibility",defaultValue:"true",noWrapper:!0}),d().createElement("div",{value:"true"},Na("Show")),d().createElement("div",{value:"false"},Na("Hide"))))}}function ec(){return ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},ec.apply(null,arguments)}class tc extends ea.Component{constructor(e){super(e)}toggleValue(e){this.props.updateProperty(this.requiredProp,e)}render(){const e=_.isUndefined(this.props.state.type)?"radio":this.props.state.type,t=e.charAt(0).toUpperCase()+e.slice(1);return d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},t+" "+Na("options display order")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na(`By default, ${e} options are displayed orderly to users. However, you can use the below option to display them randomly upon refreshing the page.`)),d().createElement(_l,ec({},this.props,{settings:this.props.state,property:"options_order",defaultValue:"orderly",noWrapper:!0}),d().createElement("div",{value:"orderly"},Na("Orderly")),d().createElement("div",{value:"random"},Na("Random"))))}}function sc(){return sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},sc.apply(null,arguments)}class ac extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t=!_.isUndefined(this.props.state.enable_images)&&this.props.state.enable_images;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,sc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,sc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),d().createElement(Jp,this.props));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Layout")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("By default, we stack the options vertically. However, you can change the options layout below.")),d().createElement(_l,sc({},this.props,{settings:this.props.state,property:"layout",defaultValue:"vertical",noWrapper:!0}),d().createElement("div",{value:"vertical"},Na("Vertical")),d().createElement("div",{value:"horizontal"},Na("Horizontal")))),t&&d().createElement(Xp,this.props),d().createElement(tc,this.props),d().createElement(Bl,this.props));case"calculations":return d().createElement(zp,sc({},this.props,{description:Na("Choose whether to allow this field to be used in calculations or not.")}));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function rc(){return rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},rc.apply(null,arguments)}class ic extends ea.Component{constructor(e){super(e)}render(){const e=[{slug:"fname",label:Na("First Name")},{slug:"mname",label:Na("Middle Name")},{slug:"lname",label:Na("Last Name")}];return d().createElement("div",{className:"sui-accordion sui-accordion-flushed",value:"multiple"},d().createElement(ll,rc({},this.props,{label:Na("Prefix"),property:"prefix",required:this.props.state.prefix_required,settings:this.props.state}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,rc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"prefix_label"}))),d().createElement(il,{cols:"6"},d().createElement(fl,rc({property:"prefix_placeholder",label:Na("Default value"),settings:this.props.state},this.props),d().createElement("option",{value:"Mr"},Na("Mr.")),d().createElement("option",{value:"Mrs"},Na("Mrs.")),d().createElement("option",{value:"Ms"},Na("Ms.")),d().createElement("option",{value:"Mx"},Na("Mx.")),d().createElement("option",{value:"Miss"},Na("Miss")),d().createElement("option",{value:"Dr"},Na("Dr.")),d().createElement("option",{value:"Prof"},Na("Prof."))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,rc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"prefix_description"})))))),e.map((e,t)=>d().createElement(ll,rc({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,rc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:e.slug+"_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,rc({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:e.slug+"_placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,rc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:e.slug+"_description"}))))))))}}function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},nc.apply(null,arguments)}class oc extends ea.Component{constructor(e){super(e),this.multiFields=[{slug:"prefix",label:Na("Prefix")},{slug:"fname",label:Na("First Name")},{slug:"mname",label:Na("Middle Name")},{slug:"lname",label:Na("Last Name")}]}hasChildrens(e){const t=_.filter(e,e=>!_.isUndefined(e));return!_.isEmpty(t)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(ql,nc({},this.props,{property:"multiple_name",settings:this.props.state,default:"false",divClass:"sui-tabs-content-lg"}),d().createElement(cl,nc({settings:this.props.state},this.props,{value:"false"}),Na("Single")),d().createElement(ic,nc({settings:this.props.state},this.props,{value:"true"}),Na("Expanded")));case"settings":if("true"===this.props.state.multiple_name){let e;const t=this.multiFields.map((t,s)=>{if(!_.isUndefined(this.props.state[t.slug])&&this.props.state[t.slug]){if(_.isEmpty(e)&&(e=t.slug),"prefix"===t.slug)return d().createElement(il,{cols:"12",label:ml(t.label),value:t.slug,settings:this.props.state,boxClass:"sui-tab-boxed",key:s},d().createElement(Bl,nc({},this.props,{prefix:t.slug})),d().createElement(zl,nc({},this.props,{prefix:t.slug})));if("prefix"!==t.slug)return d().createElement(il,{cols:"12",label:ml(t.label),settings:this.props.state,value:t.slug,required:this.props.state[t.slug+"_required"],boxClass:"sui-tab-boxed",key:s},d().createElement(Tl,nc({},this.props,{prefix:t.slug})),d().createElement(Bl,nc({},this.props,{prefix:t.slug})),d().createElement(zl,nc({},this.props,{prefix:t.slug})))}});return this.hasChildrens(t)?d().createElement("div",null,d().createElement(Zl,{default:e},t),d().createElement(Fl,{label:Na("Layout"),labelDark:!0,description:Na('By default, the "Prefix" and "First Name" fields are added to the first row, and the rest of the name fields are added to the second row. Under the Custom tab, you can choose the number of columns for displaying the name fields.'),sidebar:!1},d().createElement(ql,nc({},this.props,{property:"default_layout",settings:this.props.state,default:"default",label:""}),d().createElement(Yl,{value:"default"},Na("Default")),d().createElement(Ql,nc({},this.props,{settings:this.props.state,value:"custom",label:Na("Custom"),boxClass:"sui-tab-boxed"}),d().createElement("div",{className:"fui-form-field--row"},d().createElement("div",{className:"fui-form-field--col",style:{maxWidth:160}},d().createElement(kl,nc({},this.props,{settings:this.props.state,label:Na("Number of columns"),placeholder:"1",property:"layout_columns"}),d().createElement("option",{value:"1"},"1"),d().createElement("option",{value:"2"},"2"),d().createElement("option",{value:"3"},"3"),d().createElement("option",{value:"4"},"4")))))))):d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("At least one field must be enabled")))))}if("true"!==this.props.state.multiple_name)return d().createElement("div",null,d().createElement(Tl,this.props),d().createElement(Bl,this.props),d().createElement(zl,this.props));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},lc.apply(null,arguments)}class pc extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t=_.isUndefined(this.props.state.separators)?"":this.props.state.separators;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,lc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,lc({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,lc({},this.props,{settings:this.props.state,label:Na("Default Value (optional)"),placeholder:Na("Enter default value"),property:"default_value"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,lc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement(Fl,{label:Na("Limits"),labelDark:!0,description:Na("Set the minimum and maximum values the user can choose. Leave the fields blank to allow any number including negatives."),descriptionSpacing:20,sidebar:!1},d().createElement("div",{className:"sui-form-field-inline"},d().createElement(ol,lc({type:"number"},this.props,{settings:this.props.state,placeholder:"0",property:"limit_min",label:Na("Minimum"),fieldClass:"sui-input-md"})),d().createElement(ol,lc({type:"number"},this.props,{settings:this.props.state,placeholder:"0",property:"limit_max",label:Na("Maximum"),fieldClass:"sui-input-md"}))),d().createElement(ql,lc({},this.props,{property:"limit_message",settings:this.props.state,default:"false",label:Na("Error Messages"),divClass:"sui-tabs-content-lg"}),d().createElement(Yl,{value:"false",label:Na("Default")}),d().createElement(Ql,{value:"true",label:Na("Custom"),boxClass:"sui-tab-boxed"},d().createElement(ol,lc({},this.props,{settings:this.props.state,type:"text",property:"limit_min_message",label:Na("When number is smaller than the min limit"),placeholder:Na("E.g. Please enter a number greater than 0.")})),d().createElement(ol,lc({},this.props,{settings:this.props.state,type:"text",property:"limit_max_message",label:Na("When number is greater than the max limit"),placeholder:Na("E.g. Please enter a number lower than 1000.")}))))),d().createElement(Fl,{label:Na("Formatting"),labelDark:!0,description:Na("Choose how do you want to format the value of this field."),descriptionSpacing:20,sidebar:!1},d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,lc({},this.props,{property:"separators",settings:this.props.state,defaultValue:"1234567.89",label:Na("Separators"),fieldClass:"sui-input-md"}),d().createElement("option",{value:"blank"},Na("1234567.89")),d().createElement("option",{value:"comma_dot"},Na("1,234,567.89")),d().createElement("option",{value:"dot_comma"},Na("1.234.567,89")),d().createElement("option",{value:"space_comma"},Na("1 234 567,89")))),"custom"!==t&&d().createElement(il,{cols:"6"},d().createElement(kl,lc({},this.props,{property:"precision",settings:this.props.state,defaultValue:"0",label:Na("Round To"),fieldClass:"sui-input-md"}),d().createElement("option",{value:"0"},Na("0 decimals")),d().createElement("option",{value:"1"},Na("1 decimals")),d().createElement("option",{value:"2"},Na("2 decimals")),d().createElement("option",{value:"3"},Na("3 decimals")),d().createElement("option",{value:"4"},Na("4 decimals"))))),"custom"===t&&d().createElement("div",{className:"sui-form-field-inline sui-border-frame",style:{marginBottom:"5px"}},d().createElement(ol,lc({type:"text"},this.props,{settings:this.props.state,placeholder:Na("E.g. $"),property:"thousand-separators",defaultValue:",",label:Na("Thousand Separator"),fieldClass:"sui-input-md"})),d().createElement(ol,lc({type:"text"},this.props,{settings:this.props.state,placeholder:Na("E.g. $"),property:"decimal-separators",defaultValue:".",label:Na("Decimal Separator"),fieldClass:"sui-input-md"}))),"custom"===t&&d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,lc({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:Na("Round To"),fieldClass:"sui-input-md"}),d().createElement("option",{value:"0"},Na("0 decimals")),d().createElement("option",{value:"1"},Na("1 decimals")),d().createElement("option",{value:"2"},Na("2 decimals")),d().createElement("option",{value:"3"},Na("3 decimals")),d().createElement("option",{value:"4"},Na("4 decimals")))))),d().createElement(Bl,this.props));case"calculations":return d().createElement(zp,this.props);case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function cc(){return cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},cc.apply(null,arguments)}class uc extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;return"labels"===e?d().createElement(ea.Fragment,null,d().createElement(ol,cc({},this.props,{settings:this.props.state,label:Na("Step label"),placeholder:Na("Enter step label"),property:"pagination-label"})),d().createElement(ql,cc({},this.props,{property:"pagination-labels",settings:this.props.state,settingsLabel:Na("Buttons Text"),default:"none",description:Na("Choose whether you want to use default text for the Previous and Next button or use custom text.")}),d().createElement(Yl,{value:"none"},Na("Default")),d().createElement(Ql,cc({},this.props,{value:"custom",boxClass:"sui-tab-boxed",label:Na("Custom")}),d().createElement(ol,cc({},this.props,{settings:this.props.state,label:Na("Previous Button"),placeholder:Na("Enter text"),property:"pagination-footer-button-text"})),d().createElement(ol,cc({},this.props,{settings:this.props.state,label:Na("Next Button"),placeholder:Na("Enter text"),property:"pagination-right-button-text"}))))):d().createElement("div",null)}}function dc(){return dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},dc.apply(null,arguments)}class mc extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t=window.intlTelInput.getCountryData(),s=new Object;for(let e=0;e<t.length;e++)s[t[e].iso2]=t[e].name;switch(e){case"labels":return d().createElement(cl,this.props);case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Validation")),d().createElement("span",{className:"sui-description"},Na("Make sure the users fill this field as per the selected validation and warn them when they haven't")),d().createElement(ql,dc({},this.props,{property:"validation",settings:this.props.state,default:"none",label:Na("Type"),divClass:"sui-tabs-content-lg"}),d().createElement(Yl,{value:"none",label:Na("None")}),d().createElement(Ql,{value:"standard",label:Na("National"),boxClass:"sui-tab-boxed"},d().createElement(fl,dc({},this.props,{settings:this.props.state,label:Na("Select the country to validate phone number for"),property:"phone_national_country"}),_.map(s,(e,t)=>d().createElement("option",{value:t,key:t},e))),d().createElement(ol,dc({},this.props,{settings:this.props.state,label:Na("Validation message"),type:"text",placeholder:Na("Enter validation message"),property:"validation_message"}))),d().createElement(Ql,{value:"international",label:Na("International"),boxClass:"sui-tab-boxed"},d().createElement(fl,dc({},this.props,{settings:this.props.state,label:Na("Default country"),property:"phone_international_country",defaultValue:"US"}),_.map(s,(e,t)=>d().createElement("option",{value:t,key:t},e))),d().createElement(ol,dc({},this.props,{settings:this.props.state,label:Na("Validation message"),type:"text",placeholder:Na("Enter validation message"),property:"validation_message"}))),d().createElement(Ql,{value:"character_limit",label:Na("Character Limit"),boxClass:"sui-tab-boxed"},d().createElement(ol,dc({},this.props,{settings:this.props.state,label:Na("Limit field to"),type:"text",placeholder:Na("10"),property:"limit",suffix:Na("Characters"),inputClass:"sui-field-has-suffix"})),d().createElement(ol,dc({},this.props,{settings:this.props.state,label:Na("Validation message"),type:"text",placeholder:Na("Enter validation message"),property:"validation_message"})))))),d().createElement(Bl,this.props),d().createElement(zl,dc({},this.props,{default:"disabled"})));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}class hc extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this),this.clearValue=this.clearValue.bind(this);const t=_.isUndefined(this.props.defaultValue)?"":this.props.defaultValue,s=_.isUndefined(this.props.settings[this.props.property])?t:this.props.settings[this.props.property];this.state={value:s}}componentDidMount(){this.$el=jQuery(this.el),SUI.select.initVars(this.$el),this.updateValue=this.updateValue.bind(this);const e=this.$el.closest(".sui-form-field").hasClass("redirect-url");this.clearValue(this.$el),this.$el.on("change",t=>{const s=this.state.value+(e?"":" ")+t.target.value;this.updateValue(s.trim())}),this.$el.closest(".sui-form-field").hasClass("sui-variables-select-text")&&this.insertFormFields()}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e),"function"==typeof this.props.updateValue&&this.props.updateValue(this.props.counter,e),this.setState({value:e})}clearValue(e){e.val(null).trigger("change")}componentWillUnmount(){this.$el.off("change",this.updateValue),this.$el.unbind().removeData()}isValid(e){return this.props.isRequired?this.props.isRequired&&!_.isEmpty(e):!!_.isUndefined(this.props.isPositive)||(_.isEmpty(e)||e>=0)}insertFormFields(){this.$el.next(".select2-container").find(".select2-selection").html(Na("+ Insert form fields"))}render(){const e=_.isUndefined(this.props.defaultValue)?"":this.props.defaultValue,t=_.isUndefined(this.props.settings[this.props.property])?e:this.props.settings[this.props.property],s=_.isUndefined(this.props.requiredError)?Na("This field is required!"):this.props.requiredError,a=this.isValid(t)?"":" sui-form-field-error",r=_.isUndefined(this.props.customClass)?"":" "+this.props.customClass;let i="",n="input",o="";"textarea"===this.props.type&&(n="textarea",o="textarea-type"),this.props.label&&(i=d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label," ",(this.props.isRequired||this.props.required)&&d().createElement("span",{className:"sui-error"}," *"),this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note)));const l=d().createElement(ea.Fragment,null,"input"===n&&d().createElement("input",{id:`forminator-field-${this.props.property}`,type:"text",value:t,placeholder:this.props.placeholder,className:"sui-form-control",onChange:e=>{this.updateValue(e.target.value)}}),"textarea"===n&&d().createElement("textarea",{id:`forminator-field-${this.props.property}`,value:t,placeholder:this.props.placeholder,className:"sui-form-control",onChange:e=>{this.updateValue(e.target.value)},rows:this.props.rows}));return d().createElement("div",{className:`sui-form-field${r}${a}`},i,d().createElement("div",{className:`sui-insert-variables ${o}`},l,d().createElement("select",{"aria-label":Na("Insert form data"),className:"sui-variables",ref:e=>this.el=e},this.props.children.length<=0&&d().createElement("optgroup",{label:Na("No available options")}),this.props.children),this.props.isRequired&&!this.isValid(t)&&d().createElement("span",{className:"sui-error-message"},s),this.props.description&&d().createElement("span",{className:"sui-description"},this.props.description)))}}function fc(){return fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},fc.apply(null,arguments)}class bc extends ea.Component{constructor(e){super(e),this.state={focus:!1}}getNameOptions(){const e=[];return Pa(this.props.wrappers,["page-break","postdata","captcha","consent","gdprcheckbox","stripe","stripe-ocs","paypal","password"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}removeOption(){this.props.removeOption(this.props.counter)}updateLabel(e){this.props.updateLabel(this.props.counter,e.target.value)}updateValue(e){this.props.updateValue(this.props.counter,e.target.value)}onFocus(){this.setState({focus:!0})}onBlur(){this.state.focus&&this.setState({focus:!1})}render(){const e=_.isEmpty(this.props.option.label)?"sui-form-field-error":"";return d().createElement("div",{className:`sui-builder-field sui-can_move sui-react ${e}`},d().createElement("div",{className:"sui-field-info",style:{overflow:"inherit"}},d().createElement("i",{className:"sui-icon-drag sui-align_top","aria-hidden":"true"}),d().createElement("div",{className:"sui-builder-field-form"},d().createElement("div",{className:"sui-form-field-row"},d().createElement("input",{type:"text",placeholder:Na("Label"),value:this.props.option.label,className:"sui-form-control",onChange:this.updateLabel.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)})),d().createElement("div",{className:"sui-form-field-row"},d().createElement(hc,fc({},this.props,{settings:this.props.option,property:"value",placeholder:Na("Value"),className:"sui-form-control",onChange:this.updateValue.bind(this)}),this.getNameOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label))))))),d().createElement("div",{className:"sui-field-actions sui-align_top"},d().createElement("button",{className:"sui-button-icon sui-button-red",onClick:this.removeOption.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Delete meta")))))}}function gc(){return gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},gc.apply(null,arguments)}class yc extends ea.Component{constructor(e){super(e),this.addOption=this.addOption.bind(this),this.removeOption=this.removeOption.bind(this),this.updateLabel=this.updateLabel.bind(this),this.updateValue=this.updateValue.bind(this)}componentDidMount(){const e=this;this.$el=jQuery(this.el),this.moveOption=this.moveOption.bind(this);let t=!0;this.$el.find(".sui-builder-fields").sortable({start:function(s,a){t&&(e.$el.find(".sui-builder-fields").sortable("refreshPositions"),t=!1)},stop:function(t,s){const a=s.item.index();e.$el.find(".sui-builder-fields").sortable("cancel");const r=s.item.index();e.moveOption(r,a)}})}componentWillUnmount(){this.$el.unbind().removeData()}updateState(e){this.setState({options:e}),this.props.updateProperty("options",e),_.isUndefined(this.props.actions)||this.props.actions.settingsActions.updateSetting("options",e)}getPropState(){const e=[];return _.each(this.props.state.options,t=>{const s=Object.assign({},t);e.push(s)}),e}updateLabel(e,t){const s=this.getPropState();s[e].label=t,this.updateState(s)}updateValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}moveOption(e,t){const s=this.getPropState();s.splice(t,0,s.splice(e,1)[0]),this.updateState(s)}removeOption(e){const t=this.getPropState();t.splice(e,1),this.updateState(t)}addOption(){const e=this.getPropState();e.push({label:"",value:""}),this.updateState(e)}render(){const e=this.props.state.options;return d().createElement("div",{className:"sui-box-builder"},d().createElement("div",{className:"sui-box-builder-body",ref:e=>this.el=e},d().createElement("div",{className:"sui-builder-fields"},_.map(e,(e,t)=>d().createElement(bc,gc({key:t,counter:t,option:e,removeOption:this.removeOption,updateValue:this.updateValue,updateLabel:this.updateLabel},this.props)))),d().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addOption},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Custom User Meta")),this.props.metaDescription&&e.length<=0&&d().createElement("span",{className:"sui-description",style:{marginTop:"30px"}},this.props.metaDescription)))}}function Ec(){return Ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ec.apply(null,arguments)}class vc extends ea.Component{constructor(e){super(e),this.multiFields=[{slug:"post_title",label:Na("Title"),placeholder:!1},{slug:"post_content",label:Na("Content"),placeholder:!0},{slug:"post_excerpt",label:Na("Excerpt"),placeholder:!1},{slug:"post_image",label:Na("Featured Image"),placeholder:!0}],this.post_type=this.props.state.post_type,this.post_categories=[],_.isUndefined(forminatorData.postCategories[this.post_type])||_.isEmpty(forminatorData.postCategories[this.post_type])||(this.post_categories=forminatorData.postCategories[this.post_type],this.post_categories.map(e=>{this.multiFields.push({slug:e.value,label:e.label,placeholder:!0})})),this.multiFields.push({slug:"post_custom_fields",label:Na("Custom Fields"),placeholder:!1})}render(){const{type:e}=this.props,t=_.isUndefined(forminatorData.postCategories[this.props.state.post_type])?[]:forminatorData.postCategories[this.props.state.post_type];switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement("p",{className:"sui-description"},Na("Allow users to submit post data with this field. By default, this will create new posts, but you can assign it to any post type in the {{strong}}Settings{{/strong}} tab.",{components:{strong:d().createElement("strong",null)}})),d().createElement("div",{value:"multiple",className:"sui-accordion sui-accordion-flushed fui-modal-accordion"},this.multiFields.map((e,t)=>!1===e.placeholder&&"post_custom_fields"!==e.slug?d().createElement(ll,Ec({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Ec({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:e.slug+"_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,Ec({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:e.slug+"_placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Ec({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:e.slug+"_description"})))))):!0===e.placeholder&&"post_custom_fields"!==e.slug?d().createElement(ll,Ec({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Ec({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:e.slug+"_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Ec({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:e.slug+"_description"})))))):"post_custom_fields"===e.slug?d().createElement(ll,Ec({},this.props,{label:e.label,property:e.slug,settings:this.props.state,key:t,noBoxBody:!0}),d().createElement(ea.Fragment,null,d().createElement(yc,Ec({wrappers:this.props.wrappers},this.props)))):void 0)));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement(Fl,null,d().createElement("p",{className:"sui-settings-label sui-dark"},Na("Post type")),d().createElement("p",{className:"sui-description"},Na("Choose the post type associated with this field.")),d().createElement(fl,Ec({},this.props,{settings:this.props.state,label:Na("Assigned post type"),placeholder:Na("post"),property:"post_type",fieldClass:"sui-input-md"}),_.map(forminatorData.postTypeList,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label))))),d().createElement(Fl,null,d().createElement("p",{className:"sui-settings-label sui-dark"},Na("Default status")),d().createElement("p",{className:"sui-description"},Na("When a user submits this form, choose what status this post data is.")),d().createElement(fl,Ec({},this.props,{settings:this.props.state,label:Na("Status"),placeholder:Na("pending"),property:"data_status",fieldClass:"sui-input-md"}),d().createElement("option",{value:"draft"},Na("Draft")),d().createElement("option",{value:"pending"},Na("Pending Review")),d().createElement("option",{value:"publish"},Na("Published")))),d().createElement(Fl,null,d().createElement("p",{className:"sui-settings-label sui-dark"},Na("Default author")),d().createElement("p",{className:"sui-description"},Na("By default we'll assign posts to users if they're logged in, and fall back to the user specified below if you're allowing visitors to make posts. You can also override this to always assign posts to a specified user.")),d().createElement(fl,Ec({},this.props,{settings:this.props.state,label:Na("Default author"),property:"select_author",fieldClass:"sui-input-md fui-reduce-spacing"}),_.map(forminatorData.userList,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label)))),d().createElement(pp,Ec({},this.props,{settings:this.props.state,property:"default_author",label:Na("Always assign posts to this user"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),t.length>0&&d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Taxonomies limits")),d().createElement("span",{className:"sui-description"},Na("Choose whether to allow single or multiple categories or tags on this post.")),d().createElement("div",{className:"sui-form-field"},d().createElement(rl,null,_.map(t,(e,t)=>d().createElement(il,{cols:"6",key:t},d().createElement(_l,Ec({},this.props,{settings:this.props.state,property:e.value+"_multiple",defaultValue:"0",label:e.label}),d().createElement("div",{value:"0"},Na("Single")),d().createElement("div",{value:"1"},Na("Multiple"))))))))));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}class _c extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}componentDidMount(){this.$el=jQuery(this.el),this.$el.wpColorPicker({change:function(e,t){jQuery(this).val(t.color.toCSS()).trigger("change")},palettes:["#333333","#FFFFFF","#097BAA","#E1F6FF","#666666","#AAAAAA","#E6E6E6"]});const e=this.$el,t=e.closest(".sui-colorpicker-wrap"),s=t.find(".sui-colorpicker-value span[role=button]"),a=t.find(".sui-colorpicker-value"),r=a.find("button"),i=e.closest(".wp-picker-container"),n=i.find(".wp-color-result"),o=n.find(".color-alpha"),l=i.find(".wp-picker-clear");let p=o;p=!0===e.data("alpha")?o:n,e.bind("change",function(){s.find("span").css({"background-color":p.css("background-color")}),a.find("input").val(e.val())}),t.find(".sui-button, span[role=button]").on("click",function(e){e.preventDefault(),e.stopPropagation(),n.click()}),r.on("click",function(e){e.preventDefault(),e.stopPropagation(),l.click(),a.find("input").val(""),s.find("span").css({"background-color":""})}),this.updateValue=this.updateValue.bind(this),this.$el.on("change",this.updateValue)}updateValue(e){const t=e.target.value;"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,t):this.props.actions.settingsActions.updateSetting(this.props.property,t)}componentWillUnmount(){const e=this.$el.data("wpWpColorPicker")&&jQuery(".wp-picker-active .wp-picker-input-wrap:visible");e&&e.length&&this.$el.wpColorPicker("close"),this.$el.off("change",this.updateValue),this.$el.unbind().removeData()}render(){const e=_.isUndefined(this.props.settings[this.props.property])||null===this.props.settings[this.props.property]?this.props.defaultValue:this.props.settings[this.props.property];let t="";return this.props.label&&(t=d().createElement("label",{className:"sui-label",htmlFor:`forminator-color-${this.props.property}`},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"}," ",this.props.note))),d().createElement("div",{className:"sui-form-field"},t,d().createElement("div",{className:"sui-colorpicker-wrap"},d().createElement("div",{className:"sui-colorpicker sui-colorpicker-"+(this.props.isAlpha?"rgba":"hex"),"aria-hidden":"true"},d().createElement("div",{className:"sui-colorpicker-value"},d().createElement("span",{role:"button"},d().createElement("span",{style:{backgroundColor:e}})),d().createElement("input",{type:"text",defaultValue:e,readOnly:"readonly"}),d().createElement("button",null,d().createElement("i",{className:"sui-icon-close","aria-hidden":"true"}))),d().createElement("button",{className:"sui-button"},Na("Select"))),d().createElement("input",{ref:e=>this.el=e,defaultValue:e,id:`forminator-color-${this.props.property}`,className:"sui-colorpicker-input","data-alpha":this.props.isAlpha?"true":"false"})),this.props.description&&""!==this.props.description&&d().createElement("span",{className:"sui-description"},this.props.description))}}function wc(){return wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},wc.apply(null,arguments)}class xc extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,wc({},this.props,{settings:this.props.state,label:Na("Title"),placeholder:Na("Enter title"),property:"section_title"}))),d().createElement(il,{cols:"6"},d().createElement(ol,wc({},this.props,{settings:this.props.state,label:Na("Subtitle (optional)"),placeholder:Na("Enter subtitle"),property:"section_subtitle"}))));case"settings":return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Border")),d().createElement("span",{className:"sui-description"},Na("Add a border to this section.")),d().createElement(ql,wc({},this.props,{property:"section_border",settings:this.props.state,default:"none"}),d().createElement(Yl,{value:"none"},Na("None")),d().createElement(Ql,wc({settings:this.props.state},this.props,{value:"solid",label:Na("Solid"),boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"3"},d().createElement(ol,wc({},this.props,{type:"number",settings:this.props.state,label:Na("Width"),note:"px",placeholder:"0",property:"cform-section-border-width"}))),d().createElement(il,{cols:"9"},d().createElement(_c,wc({},this.props,{settings:this.props.state,label:Na("Color"),property:"cform-section-border-color",defaultValue:"rgba(233,233,233,1)",isAlpha:!0}))))),d().createElement(Ql,wc({settings:this.props.state},this.props,{value:"dashed",label:Na("Dashed"),boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"3"},d().createElement(ol,wc({},this.props,{type:"number",settings:this.props.state,label:Na("Width"),note:"px",placeholder:"0",property:"cform-section-border-width"}))),d().createElement(il,{cols:"9"},d().createElement(_c,wc({},this.props,{settings:this.props.state,label:Na("Color"),property:"cform-section-border-color",defaultValue:"rgba(233,233,233,1)",isAlpha:!0}))))))));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Nc.apply(null,arguments)}class Cc extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,{value_type:t}=this.props.state,s="multiselect"===t?"false":"true",{limit_status:a}=this.props.state,r="enable"===a?"true":"false",{required:i}=this.props.state,{multiselect_style:n}=this.props.state,o="multiselect"!==t||"multiselect"===t&&"modern"===n,l=Na("Note: Pass comma-separated values for this query parameter to pre-populate multiple options.");switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(_l,Nc({},this.props,{settings:this.props.state,defaultValue:"single",label:Na("Type"),property:"value_type",clearOptions:"true"}),d().createElement("span",{value:"single"},Na("Single")),d().createElement("span",{value:"multiselect"},Na("Multiple"))))),o&&d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Nc({},this.props,{settings:this.props.state,label:Na("Placeholder"),placeholder:Na("Enter placeholder"),property:"placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Nc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Nc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),d().createElement(Jp,Nc({},this.props,{isRadio:s,isLimit:r})));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),"multiselect"===t&&d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Multi Select Style")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose whether you want to use the Standard or Modern style.")),d().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},d().createElement(tp,Nc({},this.props,{settings:this.props.state,radioClass:"sui-radio-sm",defaultValue:"standard",property:"multiselect_style"}),d().createElement("div",{value:"standard",hasImage:!0,image1x:"multiselect-standard.png",image2x:"multiselect-standard@2x.png"},Na("Standard")),d().createElement("div",{value:"modern",hasImage:!0,image1x:"multiselect-modern.png",image2x:"multiselect-modern@2x.png"},Na("Modern"))))),("multiselect"!==t||"multiselect"===t&&"modern"===n)&&d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Search")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Display the search box in a dropdown")),d().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},d().createElement(_l,Nc({},this.props,{settings:this.props.state,defaultValue:"disable",property:"search_status",clearOptions:"true",noWrapper:!0}),d().createElement("span",{value:"enable"},Na("Enable")),d().createElement("span",{value:"disable"},Na("Disable"))))),"multiselect"===t&&"modern"===n&&d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Checkbox In Dropdown Options")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Select if you want to show or hide checkboxes in the Multi Select dropdown options")),d().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},d().createElement(_l,Nc({},this.props,{settings:this.props.state,defaultValue:"hide",property:"checkbox_in_dropdown",clearOptions:"true",noWrapper:!0}),d().createElement("span",{value:"hide"},Na("Hide")),d().createElement("span",{value:"show"},Na("Show"))))),d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Limit Submission")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("You can limit submissions of each option to a certain number, and once an option reaches the submission limit, we'll hide that option from the dropdown list.")),d().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},d().createElement(ql,Nc({},this.props,{settings:this.props.state,default:"disable",property:"limit_status",simple:!0}),d().createElement(Yl,{value:"disable",label:Na("Disable")}),d().createElement(rl,Nc({},this.props,{settings:this.props.state,value:"enable",label:Na("Enable")}),d().createElement(il,{cols:"12"},d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You can set a limit for your options in the LABELS tab. Options for which limit field is left empty can have unlimited submissions."))))))))),d().createElement(tc,this.props),d().createElement(Bl,Nc({},this.props,{notice:"multiselect"===t&&l})));case"calculations":return d().createElement(zp,this.props);case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function kc(){return kc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},kc.apply(null,arguments)}class Sc extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,kc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,kc({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,kc({},this.props,{settings:this.props.state,label:Na("Default Value (optional)"),placeholder:Na("Enter default value"),property:"default"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,kc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Max characters")),d().createElement("span",{className:"sui-description"},Na("By default the user can enter as many characters as they want. Use this setting to limit the number of characters the user can enter. Leave field blank to allow unlimited characters.")),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Character limit")),d().createElement("div",{className:"sui-form-field-inline"},d().createElement(ol,kc({},this.props,{settings:this.props.state,placeholder:Na("E.g. 100"),property:"limit",fieldClass:"sui-input-sm"})),d().createElement(fl,kc({property:"limit_type",settings:this.props.state},this.props),d().createElement("option",{value:"characters"},Na("Characters")),d().createElement("option",{value:"words"},Na("Words"))))))),d().createElement(Bl,this.props));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Pc.apply(null,arguments)}class Oc extends ea.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this)}updateProperty(e,t){this.props.state[e]=t}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(ol,Pc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})),!Ia(this.props.state["editor-type"])&&d().createElement($l,Pc({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:`${Na("Enter placeholder")}\n${Na("You can add new line")}`,property:"placeholder"})),d().createElement($l,Pc({},this.props,{settings:this.props.state,label:Na("Default Value (optional)"),placeholder:Na("Enter default value"),property:"default"})),d().createElement(ol,Pc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Rich-Text editor")),d().createElement("span",{className:"sui-description"},Na("Enable TinyMCE editor to allow the formatted text.")),d().createElement(_l,Pc({},this.props,{settings:this.props.state,property:"editor-type",defaultValue:"false"}),d().createElement("div",{value:"false"},Na("Disable")),d().createElement("div",{value:"true"},Na("Enable"))))),d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Max characters")),d().createElement("span",{className:"sui-description"},Na("By default the user can enter as many characters as they want. Use this setting to limit the number of characters the user can enter. Leave field blank to allow unlimited characters.")),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Character limit")),d().createElement("div",{className:"sui-form-field-inline"},d().createElement(ol,Pc({},this.props,{settings:this.props.state,placeholder:Na("E.g. 100"),property:"limit",inputClass:"sui-input-sm"})),d().createElement(fl,Pc({},this.props,{property:"limit_type",settings:this.props.state}),d().createElement("option",{value:"characters"},Na("Characters")),d().createElement("option",{value:"words"},Na("Words"))))))),d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Default height")),d().createElement("span",{className:"sui-description"},Na("Choose the default minimum height of your textarea field.")),d().createElement("div",{className:"sui-form-field-inline"},d().createElement(ol,Pc({},this.props,{settings:this.props.state,defaultValue:"140",property:"default-height",inputClass:"sui-input-sm"})),d().createElement("span",{className:"sui-description"},Na("px"))))),d().createElement(Bl,this.props));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function Dc(){return Dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Dc.apply(null,arguments)}class Fc extends ea.Component{constructor(e){super(e),this.timeTypeChanged=!1,this.checkTimeTypeChange=this.checkTimeTypeChange.bind(this)}isTimeValid(e){let t=!0;const s="twelve"===e?"h:mma":"H:mm";if(!_.isUndefined(this.props.state.restrict_time)&&"specific"===this.props.state.restrict_time){const a=_.isUndefined(this.props.state.restrict_start_hour)?0:this.props.state.restrict_start_hour,r=_.isUndefined(this.props.state.restrict_start_minute)?0:this.props.state.restrict_start_minute,i=_.isUndefined(this.props.state.restrict_start_ampm)?"AM":this.props.state.restrict_start_ampm,n=_.isUndefined(this.props.state.restrict_end_hour)?0:this.props.state.restrict_end_hour,o=_.isUndefined(this.props.state.restrict_end_minute)?0:this.props.state.restrict_end_minute,l=_.isUndefined(this.props.state.restrict_end_ampm)?"AM":this.props.state.restrict_end_ampm,p=_.isUndefined(this.props.state.default_time)?"none":this.props.state.default_time,c=_.isUndefined(this.props.state.default_time_hour)?0:this.props.state.default_time_hour,u=_.isUndefined(this.props.state.default_time_minute)?0:this.props.state.default_time_minute,d=_.isUndefined(this.props.state.default_time_ampm)?"AM":this.props.state.default_time_ampm,m="twelve"===e?l:"",h="twelve"===e?d:"",f=moment(a+":"+r+("twelve"===e?i:""),s),b=moment(n+":"+o+m,s),g=moment(c+":"+u+h,s);"default"===p&&(g.isBefore(f)||b.isBefore(g))&&(t=!1)}return t}checkTimeTypeChange(e){_.isUndefined(this.props.state.restrict_time)||"none"===this.props.state.restrict_time||(this.props.state.time_type!==e?(this.timeTypeChanged=!0,this.convertTime()):this.timeTypeChanged=!1)}convertTime(){const e=this.props.state,t=_.isUndefined(e.restrict_start_minute)?"00":e.restrict_start_minute,s=_.isUndefined(e.restrict_end_minute)?"00":e.restrict_end_minute;let a=parseInt(e.restrict_start_hour),r=_.isUndefined(e.restrict_start_ampm)?"":e.restrict_start_ampm,i=parseInt(e.restrict_end_hour),n=_.isUndefined(e.restrict_end_ampm)?"":e.restrict_end_ampm;"twelve"===e.time_type?("pm"===r&&(a+=12,r=""),"pm"===n&&(i+=12,n=""),this.updateProperty("restrict_start_hour",a),this.updateProperty("restrict_start_minute",t),this.updateProperty("restrict_start_ampm",r),this.updateProperty("restrict_end_hour",i),this.updateProperty("restrict_end_minute",s),this.updateProperty("restrict_end_ampm",n)):(a>12?(a-=12,r="pm"):r="am",i>12?(i-=12,n="pm"):n="am",this.updateProperty("restrict_start_hour",a),this.updateProperty("restrict_start_minute",t),this.updateProperty("restrict_start_ampm",r),this.updateProperty("restrict_end_hour",i),this.updateProperty("restrict_end_minute",s),this.updateProperty("restrict_end_ampm",n))}updateProperty(e,t){this.props.updateProperty(e,t)}render(){const{type:e}=this.props,t=_.isUndefined(this.props.state.time_type)?"twelve":this.props.state.time_type,s=_.isUndefined(this.props.state.field_type)?"input":this.props.state.field_type,a="twelve"===t?12:24,r=Na("{{strong}}Note:{{/strong}} The query parameter's value passed in URL should match with the selected time format.",{components:{strong:d().createElement("strong",null)}}),i=this.isTimeValid(t),n="twelve"===t?"h:mma":"H:mm",o=this.props.state,l=o.restrict_start_hour,p=_.isUndefined(o.restrict_start_minute)?"0":o.restrict_start_minute,c=_.isUndefined(o.restrict_start_ampm)?"":o.restrict_start_ampm,u=o.restrict_end_hour,m=_.isUndefined(o.restrict_end_minute)?"0":o.restrict_end_minute,h=_.isUndefined(o.restrict_end_ampm)?"":o.restrict_end_ampm,f=moment(l+":"+p+c,n).format(n),b=moment(u+":"+m+h,n).format(n);switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(_l,Dc({},this.props,{settings:this.props.state,property:"field_type",label:Na("Type")}),d().createElement("span",{value:"select"},Na("Dropdowns")),d().createElement("span",{value:"input"},Na("Number inputs")))),d().createElement(il,{cols:"6"},d().createElement(_l,Dc({},this.props,{settings:this.props.state,property:"time_type",label:Na("Format"),timeType:this.checkTimeTypeChange}),d().createElement("span",{value:"twelve"},Na("12 hour")),d().createElement("span",{value:"twentyfour"},Na("24 hour"))))),this.timeTypeChanged&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-grey sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na(`We have mapped the time limit you have set to match the new time format you have chosen. The current time limit is set between ${f} and ${b}. You can adjust this limit under the Settings tab.`))))),d().createElement(ol,Dc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})),d().createElement(ol,Dc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})),d().createElement("label",{className:"sui-label"},Na("Fields")),d().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginTop:"10px"}},d().createElement(lp,Dc({},this.props,{label:Na("Hours")}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Dc({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"hh_label"}))),"select"!==s&&d().createElement(il,{cols:"6"},d().createElement(ol,Dc({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"hh_placeholder"}))))),d().createElement(lp,Dc({},this.props,{label:Na("Minutes")}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Dc({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"mm_label"}))),"select"!==s&&d().createElement(il,{cols:"6"},d().createElement(ol,Dc({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"mm_placeholder"}))))),"twelve"===t&&d().createElement(lp,Dc({},this.props,{label:Na("AM/PM")}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Dc({},this.props,{settings:this.props.state,label:Na("Label (optional)"),placeholder:Na("Enter label"),property:"am_pm_label"})))))));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement(Fl,{label:Na("Increments"),labelDark:!0,description:Na("Choose what time increments you want to use for the hour and minute timepickers."),descriptionSpacing:20,sidebar:!1},d().createElement("div",{className:"sui-form-field-inline"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,label:Na("Hour"),property:"increment_hour","data-width":"86"}),[...Array(a)].map((e,t)=>d().createElement("option",{value:t,key:t},t))),d().createElement(kl,Dc({},this.props,{settings:this.props.state,label:Na("Minute"),property:"increment_minute","data-width":"86"}),[...Array(60)].map((e,t)=>d().createElement("option",{value:t,key:t},t))))),d().createElement(Fl,{label:Na("Limits"),labelDark:!0,description:Na("Choose a time limit for the time picker field to restrict the time selection between specific hours."),descriptionSpacing:20,sidebar:!1},d().createElement(ql,Dc({},this.props,{property:"restrict_time",settings:this.props.state,default:"none",simple:!0}),d().createElement(Ql,Dc({settings:this.props.state},this.props,{value:"specific",label:Na("Specific Hours"),boxClass:"sui-tab-boxed"}),d().createElement("label",{className:"sui-label"},Na("Start Time")),d().createElement(rl,null,d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,placeholder:"1",property:"restrict_start_hour"}),[...Array(a)].map((e,t)=>d().createElement("option",{value:t,key:t},t)))),d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,placeholder:"0",property:"restrict_start_minute"}),[...Array(60)].map((e,t)=>d().createElement("option",{value:t,key:t},t)))),"twelve"===t&&d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,property:"restrict_start_ampm"}),d().createElement("option",{value:"am"},Na("AM")),d().createElement("option",{value:"pm"},Na("PM"))))),d().createElement("label",{className:"sui-label"},Na("End Time")),d().createElement(rl,null,d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,placeholder:"1",property:"restrict_end_hour"}),[...Array(a)].map((e,t)=>d().createElement("option",{value:t,key:t},t)))),d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,placeholder:"0",property:"restrict_end_minute"}),[...Array(60)].map((e,t)=>d().createElement("option",{value:t,key:t},t)))),"twelve"===t&&d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,property:"restrict_end_ampm"}),d().createElement("option",{value:"am"},Na("AM")),d().createElement("option",{value:"pm"},Na("PM"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Dc({},this.props,{settings:this.props.state,label:Na("Error Message"),property:"restrict_message",description:Na("This error message will be used when time entered is out of the set limits.")}))))),d().createElement(Yl,{value:"none"},Na("None")))),d().createElement(Fl,{label:Na("Default Time"),labelDark:!0,description:Na("Use this feature to specify a default selected time."),descriptionSpacing:20,sidebar:!1},d().createElement(ql,Dc({},this.props,{property:"default_time",settings:this.props.state,default:"none",simple:!0}),d().createElement(Ql,Dc({},this.props,{label:Na("Default"),settings:this.props.state,value:"default",boxClass:"sui-tab-boxed"}),d().createElement(rl,null,d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,label:Na("Hour"),placeholder:"1",property:"default_time_hour"}),[...Array(a)].map((e,t)=>d().createElement("option",{value:t,key:t},t)))),d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,label:Na("Minute"),placeholder:"0",property:"default_time_minute"}),[...Array(60)].map((e,t)=>d().createElement("option",{value:t,key:t},t)))),"twelve"===t&&d().createElement(il,{cols:"3"},d().createElement(kl,Dc({},this.props,{settings:this.props.state,label:" ",property:"default_time_ampm"}),d().createElement("option",{value:"am"},Na("AM")),d().createElement("option",{value:"pm"},Na("PM"))))),!i&&d().createElement("span",{className:"sui-error-message"},Na("Default time can't be outside the allowed time limit."))),d().createElement(Yl,{value:"none"},Na("None")))),d().createElement(Bl,Dc({},this.props,{notice:r})));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}class Ac extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this),this.updateCheckboxItem=this.updateCheckboxItem.bind(this),this.onSelectAllCheckboxes=this.onSelectAllCheckboxes.bind(this)}updateValue(e){"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}onSelectAllCheckboxes(e,t,s){let a=_.isUndefined(this.props.settings[this.props.property])||!_.isArray(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];s.map(s=>{t?(a=a.concat(e),a.indexOf(s.value)<0&&(a=a.concat(s.value))):(a=a.filter(t=>t!==e),a.indexOf(s.value)>=0&&(a=a.filter(e=>e!==s.value)))}),this.updateValue(a)}updateCheckboxItem(e,t,s){let a=_.isUndefined(this.props.settings[this.props.property])||!_.isArray(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];if(t?a.indexOf(e)<0&&(a=a.concat(e)):!t&&a.indexOf(e)>=0&&(a=a.filter(t=>t!==e)),!_.isUndefined(this.props.fileType)){let e=s.filter(e=>a.includes(e.value));a=e.length===s.length?a.concat(this.props.fileType):a.filter(e=>e!==this.props.fileType)}this.updateValue(a)}render(){const e=_.isUndefined(this.props.settings[this.props.property])||!_.isArray(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property],t=this.props.checkboxes;return d().createElement(ea.Fragment,null,d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label),d().createElement("label",{htmlFor:`forminator-field-${this.props.property}-${this.props.fileType}`,className:"sui-checkbox sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"},d().createElement("input",{type:"checkbox",id:`forminator-field-${this.props.property}-${this.props.fileType}`,value:this.props.fileType,checked:e.indexOf(this.props.fileType)>=0?"checked":"",onChange:e=>{this.onSelectAllCheckboxes(this.props.fileType,e.target.checked,t)}}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",null,Na("All"))),t.map((s,a)=>d().createElement("label",{key:a,htmlFor:`forminator-field-${this.props.property}-${s.value}`,className:"sui-checkbox "+s.itemClass},d().createElement("input",{type:"checkbox",id:`forminator-field-${this.props.property}-${s.value}`,value:s.value,checked:e.indexOf(s.value)>=0?"checked":"",onChange:e=>{this.updateCheckboxItem(s.value,e.target.checked,t)}}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",null,ml(s.label)))))}}function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Tc.apply(null,arguments)}class Mc extends ea.Component{constructor(e){super(e)}toggleValue(e){this.props.updateProperty("custom-files",e)}render(){const e=!_.isUndefined(this.props.state["custom-files"])&&this.props.state["custom-files"],t=[],s=[],a=[],r=[],i=[],n=[],o=[],l=[];_.isUndefined(forminatorData.fileExts.audio)||forminatorData.fileExts.audio.map(e=>{t.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})}),_.isUndefined(forminatorData.fileExts.document)||forminatorData.fileExts.document.map(e=>{s.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})}),_.isUndefined(forminatorData.fileExts.image)||forminatorData.fileExts.image.map(e=>{a.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})}),_.isUndefined(forminatorData.fileExts.video)||forminatorData.fileExts.video.map(e=>{r.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})}),_.isUndefined(forminatorData.fileExts.archive)||forminatorData.fileExts.archive.map(e=>{i.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})}),_.isUndefined(forminatorData.fileExts.text)||forminatorData.fileExts.text.map(e=>{n.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})}),_.isUndefined(forminatorData.fileExts.spreadsheet)||forminatorData.fileExts.spreadsheet.map(e=>{o.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})}),_.isUndefined(forminatorData.fileExts.interactive)||forminatorData.fileExts.interactive.map(e=>{l.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})});const p=d().createElement(d().Fragment,null,Na("Add a comma-separated list of additional file types along with their MIME types separated by “ | ”.")," ",forminatorData.showDocLink&&Na("{{link}}Learn more{{/link}}",{components:{link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#upload-field-additional-filetypes",target:"_blank"})}}));return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Allowed filetypes")),d().createElement("span",{className:"sui-description"},Na("We use WordPress' {{a}}default allowed mime types{{/a}} to determine which file types can be uploaded. If you want to allow or restrict specific file types from being upload, you can do so by choosing the Specific filetypes option below.",{components:{a:d().createElement("a",{href:"https://developer.wordpress.org/reference/functions/get_allowed_mime_types",target:"_blank"})}})),d().createElement("div",{className:"sui-tabs sui-side-tabs",style:{marginTop:"10px"}},d().createElement("div",{className:"sui-tabs-menu"},d().createElement("div",{className:"sui-tab-item "+(e?"":"active"),onClick:this.toggleValue.bind(this,!1)},Na("Default")),d().createElement("div",{className:"sui-tab-item "+(e?"active":""),onClick:this.toggleValue.bind(this,!0)},Na("Specific filetypes"))),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-boxed "+(e?"active":"")},d().createElement(rl,null,d().createElement(il,{cols:"3"},d().createElement(Ac,Tc({},this.props,{label:Na("Images"),settings:this.props.state,fileType:"all-image",property:"filetypes",checkboxes:a}))),d().createElement(il,{cols:"3"},d().createElement(Ac,Tc({},this.props,{label:Na("Documents"),settings:this.props.state,fileType:"all-document",property:"filetypes",checkboxes:s}))),d().createElement(il,{cols:"3"},d().createElement(Ac,Tc({},this.props,{label:Na("Audio"),settings:this.props.state,fileType:"all-audio",property:"filetypes",checkboxes:t}))),d().createElement(il,{cols:"3"},d().createElement(Ac,Tc({},this.props,{label:Na("Video"),settings:this.props.state,fileType:"all-video",property:"filetypes",checkboxes:r})))),d().createElement(rl,null,d().createElement(il,{cols:"3"},d().createElement(Ac,Tc({},this.props,{label:Na("Archive"),settings:this.props.state,fileType:"all-archive",property:"filetypes",checkboxes:i}))),d().createElement(il,{cols:"3"},d().createElement(Ac,Tc({},this.props,{label:Na("Text"),settings:this.props.state,fileType:"all-text",property:"filetypes",checkboxes:n}))),d().createElement(il,{cols:"3"},d().createElement(Ac,Tc({},this.props,{label:Na("Spreadsheet"),settings:this.props.state,fileType:"all-spreadsheet",property:"filetypes",checkboxes:o}))),d().createElement(il,{cols:"3"},d().createElement(Ac,Tc({},this.props,{label:Na("Interactive"),settings:this.props.state,fileType:"all-interactive",property:"filetypes",checkboxes:l})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement($l,Tc({},this.props,{settings:this.props.state,label:Na("Additional filetypes"),placeholder:Na("E.g. .dts|audio/vnd.dts, .ai|application/postscript"),property:"additional-type",description:p})),d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note that if you're having trouble uploading one of the enabled filetypes, that filetype may be restricted by your hosting provider.")))))))))),d().createElement("div",{role:"alert",className:"sui-notice sui-notice-warning",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-warning-alert","aria-hidden":"true"}),d().createElement("p",null,Na("For security reasons, the following file types are disabled by default: .htm, .html, .shtml, .phtml, .jse, .jar, .xml, .css, .asp, .aspx, .jsp, .sql, .hta, .dll, .bat, .com, .sh, .bash, .py, .pl, .js, .php, .svg, .swf, .dfxp, .rar and .exe. The above file types could potentially allow malicious files to be uploaded, which could be used to gain access to your site.")))))))}}function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},jc.apply(null,arguments)}class Uc extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t=_.isUndefined(this.props.state["upload-limit"])?0:this.props.state["upload-limit"],s=_.isUndefined(this.props.state.filesize)?"MB":this.props.state.filesize,a="KB"===s?1e3*parseInt(forminatorData.maxUpload):"B"===s?1e6*parseInt(forminatorData.maxUpload):parseInt(forminatorData.maxUpload),r=_.isUndefined(this.props.state["file-type"])?0:this.props.state["file-type"];switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(_l,jc({},this.props,{settings:this.props.state,defaultValue:"single",label:Na("Type"),property:"file-type",clearOptions:"true"}),d().createElement("span",{value:"single"},Na("Single")),d().createElement("span",{value:"multiple"},Na("Multiple"))),d().createElement(ol,jc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})),d().createElement(ol,jc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement(Mc,this.props),"multiple"===r&&d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Limit number of files")),d().createElement("span",{className:"sui-description"},Na("Choose the maximum number of files that can be uploaded using this field.")),d().createElement(ql,jc({},this.props,{settings:this.props.state,property:"file-limit",defaultValue:"unlimited"}),d().createElement(Yl,{value:"unlimited",label:Na("Unlimited")}),d().createElement(Ql,{value:"custom",label:Na("Custom"),boxClass:"sui-tab-boxed"},d().createElement(ol,jc({},this.props,{type:"number",placeholder:"5",defaultValue:"5",property:"file-limit-input",inputClass:"sui-input-sm",label:Na("File upload limit"),settings:this.props.state}))))),d().createElement(Fl,null,d().createElement("label",{id:"forminator-field-filesize-label",className:"sui-settings-label sui-dark"},Na("multiple"===r?"Filesize limit per file":"Filesize limit")),d().createElement("span",{className:"sui-description"},Na("We've detected your server will allow uploads up to %(maxUpload)sMB in size currently. You can set a lower limit than this using the input below, however if you want uploads of more than %(maxUpload)sMB you'll need to adjust this in your server's PHP.ini settings.",{args:{maxUpload:forminatorData.maxUpload}})),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{id:"forminator-field-upload-limit-label",className:"sui-label"},Na("Upload limit per file")),d().createElement("div",{className:"sui-form-field-inline"},d().createElement(ol,jc({},this.props,{settings:this.props.state,defaultValue:"8",property:"upload-limit",labelledBy:"forminator-field-upload-limit-label",fieldClass:"sui-input-sm"+(parseInt(t)>a?" sui-form-field-error":"")})),d().createElement(fl,jc({},this.props,{property:"filesize",settings:this.props.state,defaultValue:"MB",elementClass:"sui-select-inline",simple:!0,ariaLabel:Na("Select upload size unit (KB or MB)")}),d().createElement("option",{value:"MB"},Na("MB")),d().createElement("option",{value:"KB"},Na("KB")),d().createElement("option",{value:"B"},Na("B")))),d().createElement("div",{role:"alert",className:`sui-notice${parseInt(t)>a&&" sui-active"}`,style:{display:parseInt(t)>a?"block":"none"},"aria-live":"assertive"},parseInt(t)>a&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("The file size you have entered exceeds what your current hosting settings are capped to. You need to increase your max filesize limit at the server level first."))))))),"multiple"===r&&d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Upload method")),d().createElement("span",{className:"sui-description"},Na("Choose whether you want to use AJAX to upload individual files as they are selected or use the traditional method of uploading all files together on form submission. We recommend using the AJAX method to avoid server timeouts.")),d().createElement("div",{className:"sui-form-field-inline"},d().createElement(_l,jc({},this.props,{settings:this.props.state,property:"upload-method",defaultValue:"ajax"}),d().createElement("div",{value:"ajax"},Na("AJAX")),d().createElement("div",{value:"submission"},Na("On form submission"))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Show files in media library")),d().createElement("span",{className:"sui-description"},Na("Choose whether you want to show the files uploaded by your visitors using this field in your media library.")),d().createElement("div",{className:"sui-form-field-inline"},d().createElement(_l,jc({},this.props,{settings:this.props.state,property:"use_library",defaultValue:""}),d().createElement("div",{value:"true"},Na("Enable")),d().createElement("div",{value:""},Na("Disable"))))));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Vc.apply(null,arguments)}class $c extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Vc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,Vc({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Vc({},this.props,{settings:this.props.state,label:Na("Default Value (optional)"),placeholder:Na("Enter default value"),property:"default"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Vc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))));case"settings":return d().createElement("div",null,d().createElement(Tl,this.props),d().createElement(Ml,this.props),d().createElement(Bl,this.props));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ic.apply(null,arguments)}class Rc extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t=!_.isUndefined(this.props.state.enable_images)&&this.props.state.enable_images;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Ic({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Ic({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),d().createElement(Jp,Ic({},this.props,{isRadio:"true"})));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Layout")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("By default, we stack the options vertically. However, you can change the options layout below.")),d().createElement(_l,Ic({},this.props,{settings:this.props.state,property:"layout",defaultValue:"vertical",noWrapper:!0}),d().createElement("div",{value:"vertical"},Na("Vertical")),d().createElement("div",{value:"horizontal"},Na("Horizontal")))),t&&d().createElement(Xp,this.props),d().createElement(tc,this.props),d().createElement(Bl,this.props));case"calculations":return d().createElement(zp,Ic({},this.props,{description:Na("Choose whether to allow this field to be used in calculations or not.")}));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}class Lc extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this),this.insertChar=this.insertChar.bind(this),this.deleteChar=this.deleteChar.bind(this),this.insert=this.insert.bind(this)}componentDidMount(){this.$el=jQuery(this.el)}componentWillUnmount(){this.$el.unbind().removeData()}updateValue(e){this.validateFormula(e),"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,e):this.props.actions.settingsActions.updateSetting(this.props.property,e)}insert(e,t){e.preventDefault();const s=_.isUndefined(this.props.settings[this.props.property])?"":this.props.settings[this.props.property],a=this.$el.find("textarea"),r=a.prop("selectionStart"),i=s.slice(0,r)+t+s.slice(r);this.updateValue(i),a.val(i),a.focus(),a.prop("selectionStart",r+t.length),a.prop("selectionEnd",r+t.length)}deleteChar(e){if(8===e.which){const t=this.$el.find("textarea"),s=t.prop("selectionStart"),a=t.val(),r=s-1;if("}"===a.substr(r,1)&&-1!==r){e.preventDefault();let r=s;const i=s;for(;"{"!==a.substr(r-1,1)&&r-1>=0;)r-=1;const n=a.slice(0,r-1)+a.slice(i,a.length);this.updateValue(n),t.val(n),t.prop("selectionStart",r-1),t.prop("selectionEnd",r-1)}}}insertChar(e){_.includes([32,34,37,40,41,42,43,44,45,47,46,48,49,50,51,52,53,54,55,56,57,94],e.charCode)||e.preventDefault()}getDisabledFields(){const e=["number","slider","radio","select","checkbox","calculation","currency"],t=[];return _.each(forminatorData.fields,s=>{_.includes(e,s.type)||t.push(s.type)}),t}getFields(){const e=this.getDisabledFields();return Pa(this.props.wrappers,e)}isCalculationEnabled(e){let t=!0;return _.each(this.props.wrappers,s=>{_.each(s.fields,s=>{s.element_id!==e||"false"!==s.calculations&&!1!==s.calculations||(t=!1)})}),t}maybeReplaceFields(e){let t,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a=_.map(forminatorData.fields,e=>e.type).join("|"),r=new RegExp("\\{("+("("+a+")-\\d+")+")(\\-[A-Za-z-_]+)?(\\-[0-9\\*]+)?\\}","g");let i=ml(e);for(;t=r.exec(e);){const e=t[0];if(_.isUndefined(e))continue;if(!this.isCalculationEnabled(t[1]))return{error:Na("%s is disabled for calculations. Please insert a valid field from the merged tags option.",{args:[e]}),result:!1};if(!va(t[1],this.props.wrappers))return{error:Na("%s does not exist in your form. Please insert a valid field from the merged tags option.",{args:[e]}),result:!1};if(s){const s=Ea(t[1],this.props.wrappers),a=t[3]||"";i=i.replace(e,'<span className="forminator-preview-label">'+ml(s)+ml(a)+"</span>")}else i=ml(i.replace(e,"(1)"))}return i}previewFormula(e){return this.maybeReplaceFields(e,!0)}validateFormula(e){const t=this.maybeReplaceFields(e,!1);if(!_.isUndefined(t.error))return this.props.modal.isValid=!1,this.props.modal.validationError=Na("Calculation formula is required!"),t;const s=window.forminatorCalculator(t),a={};let r;try{if(r=s.calculate(),!isFinite(r))return a.error=Na("Infinity calculation result."),a.result=!1,this.props.modal.isValid=!1,this.props.modal.validationError=a.error,a;a.result=Number(r.toFixed(2)),this.props.modal.isValid=!0}catch(e){a.error=e,a.result=!1,this.props.modal.isValid=!1,this.props.modal.validationError=a.error}return a}render(){const e=this.getFields(),t=_.indexBy(this.props.wrappers,"wrapper_id")[(this.props.modal.wrapper?this.props.modal.wrapper.wrapper_id:null)||this.props.state.wrapper_id].parent_group,s=_.map(e,(e,s)=>{if(e.element_id!==this.props.state.element_id||"slider"===e.field_type)return e.hasCalcs||"calculation"===e.field_type?d().createElement(ea.Fragment,null,d().createElement("li",{className:"wpmudev-dropdown--option",key:s},d().createElement("button",{onClick:t=>this.insert(t,"{"+e.element_id+"}")},ml(e.label))),e.parent_group&&!t&&d().createElement("li",{className:"wpmudev-dropdown--option",key:s},d().createElement("button",{onClick:t=>this.insert(t,"{"+e.element_id+"-*}")},e.label+Na(" (all)")))):void 0}),a=_.map(["abs","avg","ceil","floor","max","min","round"],e=>d().createElement("li",{className:"wpmudev-dropdown--option",key:e},d().createElement("button",{onClick:t=>this.insert(t,e+"()")},e+"()"))),r=_.isUndefined(this.props.settings[this.props.property])?"":this.props.settings[this.props.property],i=this.validateFormula(r),n=this.previewFormula(r),o=!1===i.result?" fui-error":"";return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Calculation Formula")),d().createElement("div",{className:`fui-calculations${o}`,ref:e=>this.el=e},d().createElement("div",{className:"fui-calcs-bar"},d().createElement("div",{className:"sui-dropdown sui-dropdown-right"},d().createElement("button",{className:"sui-button-icon sui-button-blue sui-tooltip sui-tooltip-top-left sui-dropdown-anchor","data-tooltip":Na("Add Form Fields")},d().createElement("i",{className:"sui-icon-layout","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Open list of fields"))),d().createElement("ul",null,s)),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"+")},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Sum"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"-")},d().createElement("b",{"aria-hidden":"true"},"-"),d().createElement("span",{className:"sui-screen-reader-text"},Na("Minus"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"*")},d().createElement("b",{"aria-hidden":"true"},"*"),d().createElement("span",{className:"sui-screen-reader-text"},Na("Multiply"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"/")},d().createElement("b",{"aria-hidden":"true"},"/"),d().createElement("span",{className:"sui-screen-reader-text"},Na("Divide"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"^")},d().createElement("b",{"aria-hidden":"true"},"^"),d().createElement("span",{className:"sui-screen-reader-text"},Na("Exponentiate"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"%")},d().createElement("b",{"aria-hidden":"true"},"%"),d().createElement("span",{className:"sui-screen-reader-text"},Na("Modulus"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"(")},d().createElement("b",{"aria-hidden":"true"},"("),d().createElement("span",{className:"sui-screen-reader-text"},Na("Open parenthesis"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,")")},d().createElement("b",{"aria-hidden":"true"},")"),d().createElement("span",{className:"sui-screen-reader-text"},Na("Close parenthesis"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,",")},d().createElement("b",{"aria-hidden":"true"},","),d().createElement("span",{className:"sui-screen-reader-text"},Na("Comma"))),d().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"PI")},d().createElement("b",{"aria-hidden":"true"},"PI"),d().createElement("span",{className:"sui-screen-reader-text"},Na("PI constant"))),d().createElement("div",{className:"sui-dropdown sui-dropdown-right"},d().createElement("button",{className:"sui-button-icon sui-tooltip sui-tooltip-top-left sui-dropdown-anchor","data-tooltip":Na("Add Function")},d().createElement("i",{className:"sui-icon-more","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Open function list"))),d().createElement("ul",null,a))),d().createElement("div",{className:"fui-calcs-editor"},d().createElement("textarea",{autoFocus:!0,onKeyPress:e=>this.insertChar(e),onKeyDown:e=>this.deleteChar(e),defaultValue:r,onChange:e=>{this.updateValue(e.target.value)}}))),!1===i.result&&d().createElement("span",{className:"sui-error-message"},i.error),d().createElement("span",{className:"sui-description"},Na("You can preview your form and check if the formula is generating expected results."))),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Formula Preview")),d().createElement("div",{className:"fui-calculations-preview",dangerouslySetInnerHTML:{__html:n}})),d().createElement(Rp,this.props))}}function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Bc.apply(null,arguments)}class zc extends ea.Component{constructor(e){super(e),this.updateHidden=this.updateHidden.bind(this)}updateHidden(e,t){this.props.updateProperty("hidden",t),this.removeConditions()}removeConditions(){Ia(this.props.state.hidden)&&!_.isEmpty(this.props.state.conditions)&&(this.props.state.conditions={},this.props.updateProperty("conditions",this.props.state.conditions))}render(){const{type:e}=this.props,{hidden:t,conditions:s}=this.props.state,a=_.isUndefined(this.props.state.separators)?"":this.props.state.separators;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Bc({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Bc({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Fl,null,d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Field Type")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("By default, the calculation field is read-only. You can also hide the field if you don't want to show the calculated result on the form.")),d().createElement(pp,Bc({},this.props,{property:"read-only",settings:this.props.state,label:Na("Read-only"),disabled:"true",defaultValue:"true",itemClass:"sui-checkbox-sm sui-checkbox-stacked"})),d().createElement(pp,Bc({},this.props,{property:"hidden",settings:this.props.state,label:Na("Hidden"),itemClass:"sui-checkbox-sm sui-checkbox-stacked",updateProperty:this.updateHidden.bind(this)})),!t&&!_.isEmpty(s)&&d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Visibility rules have been added for this field. Enabling the Hidden option will remove the existing visibility rules."))))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Formatting")),d().createElement("span",{className:"sui-description",style:{marginBottom:"20px"}},Na("Choose how do you want to format the value of this field.")),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Bc({type:"text"},this.props,{settings:this.props.state,placeholder:Na("E.g., $"),property:"prefix",label:Na("Prefix")}))),d().createElement(il,{cols:"6"},d().createElement(ol,Bc({type:"text"},this.props,{settings:this.props.state,placeholder:Na("E.g., Kg"),property:"suffix",label:Na("Suffix")})))),"custom"===a&&d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement("div",{className:"sui-form-field sui-input-md",style:{marginBottom:"5px"}},d().createElement("label",{className:"sui-label"},Na("Separators")),d().createElement(kl,Bc({},this.props,{property:"separators",settings:this.props.state,defaultValue:"blank",simple:!0}),d().createElement("option",{value:"blank"},Na("1234567.89")),d().createElement("option",{value:"comma_dot"},Na("1,234,567.89")),d().createElement("option",{value:"dot_comma"},Na("1.234.567,89")),d().createElement("option",{value:"space_comma"},Na("1 234 567,89")))),d().createElement("div",{className:"sui-border-frame"},d().createElement("div",{className:"sui-form-field-inline"},d().createElement(ol,Bc({type:"text"},this.props,{settings:this.props.state,placeholder:Na("E.g. $"),property:"thousand-separators",defaultValue:",",label:Na("Thousand Separator")})),d().createElement(ol,Bc({type:"text"},this.props,{settings:this.props.state,placeholder:Na("E.g. $"),property:"decimal-separators",defaultValue:".",label:Na("Decimal Separator")})))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(kl,Bc({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:Na("Round To"),fieldClass:"sui-input-md"}),d().createElement("option",{value:"0"},Na("0 decimals")),d().createElement("option",{value:"1"},Na("1 decimals")),d().createElement("option",{value:"2"},Na("2 decimals")),d().createElement("option",{value:"3"},Na("3 decimals")),d().createElement("option",{value:"4"},Na("4 decimals")))))),"custom"!==a&&d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,Bc({},this.props,{property:"separators",settings:this.props.state,defaultValue:"blank",label:Na("Separators")}),d().createElement("option",{value:"blank"},Na("1234567.89")),d().createElement("option",{value:"comma_dot"},Na("1,234,567.89")),d().createElement("option",{value:"dot_comma"},Na("1.234.567,89")),d().createElement("option",{value:"space_comma"},Na("1 234 567,89")))),d().createElement(il,{cols:"6"},d().createElement(kl,Bc({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:Na("Round To")}),d().createElement("option",{value:"0"},Na("0 decimals")),d().createElement("option",{value:"1"},Na("1 decimals")),d().createElement("option",{value:"2"},Na("2 decimals")),d().createElement("option",{value:"3"},Na("3 decimals")),d().createElement("option",{value:"4"},Na("4 decimals")))))));case"calculations":return d().createElement(Lc,Bc({property:"formula",settings:this.props.state},this.props));case"visibility":return d().createElement(ea.Fragment,null,t&&d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You can't set visibility conditions for a hidden field. Uncheck the Hidden option in the settings tab and come back here to define visibility rules."))))),!t&&d().createElement(xl,this.props));case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}class Wc extends ea.Component{constructor(e){super(e),this.state={focus:!1}}removeOption(){this.props.removeOption(this.props.counter)}updateLabel(e){this.props.updateLabel(this.props.counter,e.target.value)}updateValue(e){this.props.updateValue(this.props.counter,e.target.value)}onFocus(){this.setState({focus:!0})}onBlur(){this.state.focus&&this.setState({focus:!1})}render(){const e=this.state.focus?"fui-on_focus":"",t=(_.isEmpty(this.props.option.label),Pa(this.props.wrappers,["stripe-ocs","stripe","paypal","upload","section","html"]));return d().createElement("div",{className:`sui-builder-field sui-can_move sui-react ${e}`},d().createElement("div",{className:"sui-field-info"},d().createElement("i",{className:"sui-icon-drag sui-align_top","aria-hidden":"true"}),d().createElement("div",{className:"sui-builder-field-form"},d().createElement("div",{className:"sui-form-field-row"},d().createElement("div",{className:"sui-form-field"},d().createElement("input",{type:"text",size:"1",placeholder:Na("Label"),value:ml(this.props.option.label),className:"sui-form-control",onChange:this.updateLabel.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)})),d().createElement("select",{className:"fui-select",value:this.props.option.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select a Field")),_.map(t,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id)))))),d().createElement("div",{className:"sui-field-actions sui-align_top"},d().createElement("button",{className:"sui-button-icon sui-button-red",onClick:this.removeOption.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Delete MetaData")))))}}function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Hc.apply(null,arguments)}class qc extends ea.Component{constructor(e){super(e),this.addOption=this.addOption.bind(this),this.removeOption=this.removeOption.bind(this),this.updateLabel=this.updateLabel.bind(this),this.updateValue=this.updateValue.bind(this),this.state={options:[...this.props.state.options]}}componentDidMount(){const e=this;this.$el=jQuery(this.el),this.moveOption=this.moveOption.bind(this);let t=!0;this.$el.find(".sui-builder-fields").sortable({start:function(s,a){t&&(e.$el.find(".sui-builder-fields").sortable("refreshPositions"),t=!1)},stop:function(t,s){const a=s.item.index();e.$el.find(".sui-builder-fields").sortable("cancel");const r=s.item.index();e.moveOption(r,a)}})}componentWillUnmount(){this.$el.unbind().removeData()}updateState(e){this.setState({options:e}),this.props.updateProperty("options",e)}updateLabel(e,t){const s=this.state.options;s[e].label=t,this.updateState(s)}updateValue(e,t){const s=this.state.options;s[e].value=t,this.updateState(s)}moveOption(e,t){const s=this.state.options;s.splice(t,0,s.splice(e,1)[0]),this.updateState(s)}removeOption(e){const t=this.state.options;t.splice(e,1),this.updateState(t)}addOption(){const e=this.state.options;e.push({label:"",value:"",default:!1}),this.updateState(e)}render(){const e=this.state.options;return d().createElement("div",{className:"sui-box-builder sui-flushed",ref:e=>this.el=e},d().createElement("div",{className:"sui-box-builder-body"},d().createElement("div",{className:"sui-builder-fields"},_.map(e,(e,t)=>d().createElement(Wc,Hc({key:t,counter:t,option:e,removeOption:this.removeOption,updateValue:this.updateValue,updateLabel:this.updateLabel},this.props))),d().createElement("div",{className:"sui-form-field"},d().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addOption},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Custom Meta"))),0===e.length&&d().createElement("div",{className:"sui-form-field sui-block-content-center"},d().createElement("span",{className:"sui-description"},Na('No custom meta data created yet. Click on "+ Add Custom to create custom meta and map form fields to it.'))))))}}function Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Qc.apply(null,arguments)}class Yc extends ea.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this),this.updatePayment=this.updatePayment.bind(this)}updateProperty(e,t){this.props.state.payments[this.props.counter][e]=t,this.forceUpdate()}updatePayment(e,t){this.props.updatePayment(e,t)}getDisabledFields(){const e=["calculation","currency","number","slider"],t=[];return _.each(forminatorData.fields,s=>{_.includes(e,s.type)||t.push(s.type)}),t}getFields(){const e=this.getDisabledFields();return Pa(this.props.wrappers,e)}render(){const e=Na("In %s",{args:[this.props.state.currency]}),t=this.getFields();return d().createElement(ql,Qc({},this.props,{property:"amount_type",settings:this.props.payment,updateProperty:this.updatePayment,defaultValue:"fixed",wrapperClass:"fui-plan-amount",label:Na("Plan amount"),description:Na("Enter an amount or select a value from a form field in the Variable tab.")}),d().createElement(Ql,Qc({},this.props,{value:"fixed",label:Na("Fixed")}),d().createElement(ol,Qc({},this.props,{type:"number",property:"amount",settings:this.props.payment,updateProperty:this.updatePayment,fieldClass:"fui-fixed-plan",inputClass:"sui-field-has-suffix",suffix:this.props.state.currency,placeholder:Na("E.g., 20.00"),isRequired:"true",requiredError:Na("Enter an amount or choose a form field.")}))),d().createElement(Ql,Qc({},this.props,{value:"variable",label:Na("Variable"),boxClass:""}),d().createElement(kl,Qc({},this.props,{settings:this.props.payment,updateProperty:this.updatePayment,property:"variable",note:e}),d().createElement("option",{value:""},Na("Select field")),_.map(t,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label))))))}}function Gc(){return Gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Gc.apply(null,arguments)}class Kc extends ea.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this),this.updatePayment=this.updatePayment.bind(this)}updateProperty(e,t){this.props.state.payments[this.props.counter][e]=t,this.forceUpdate()}updatePayment(e,t){this.props.updatePayment(e,t)}getDisabledFields(){const e=["calculation","currency","number","slider"],t=[];return _.each(forminatorData.fields,s=>{_.includes(e,s.type)||t.push(s.type)}),t}getFields(){const e=this.getDisabledFields();return Pa(this.props.wrappers,e)}render(){const e=Na("In %s",{args:[this.props.state.currency]}),t=this.getFields(),s=_.isUndefined(this.props.payment.bill_input)?1:this.props.payment.bill_input;return d().createElement(ea.Fragment,null,d().createElement(ql,Gc({},this.props,{property:"subscription_amount_type",settings:this.props.payment,updateProperty:this.updatePayment,wrapperClass:"fui-plan-amount",default:"fixed",label:Na("Plan amount"),description:Na("Enter an amount or select a value from a form field in the Variable tab.")}),d().createElement(Ql,Gc({},this.props,{value:"fixed",label:Na("Fixed"),boxClass:"sui-border-frame"}),d().createElement(ol,Gc({},this.props,{property:"subscription_amount",settings:this.props.payment,updateProperty:this.updatePayment,type:"number",placeholder:Na("E.g. 20.00"),suffix:this.props.state.currency,fieldClass:"fui-fixed-plan",inputClass:"sui-field-has-suffix",label:Na("Amount"),isRequired:"true",requiredError:Na("Enter an amount or choose a form field.")}))),d().createElement(Ql,Gc({},this.props,{value:"variable",label:Na("Variable"),boxClass:"sui-border-frame"}),d().createElement(kl,Gc({},this.props,{settings:this.props.payment,updateProperty:this.updatePayment,property:"subscription_variable",label:Na("Choose form field"),note:e}),d().createElement("option",{value:""},Na("Select field")),_.map(t,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)))))),d().createElement(ql,Gc({},this.props,{property:"quantity_type",settings:this.props.payment,updateProperty:this.updatePayment,default:"fixed",label:Na("Quantity"),description:Na("Enter the quantity or let your users set the quantity in a form field.")}),d().createElement(Ql,Gc({},this.props,{value:"fixed",label:Na("Fixed"),boxClass:"sui-border-frame"}),d().createElement(ol,Gc({},this.props,{property:"quantity",settings:this.props.payment,updateProperty:this.updatePayment,type:"number",defaultValue:"1",placeholder:Na("E.g., 1"),fieldClass:"sui-input-md",label:Na("Quantity"),isRequired:"true",requiredError:Na("Please enter a quantity or select a form field.")}))),d().createElement(Ql,Gc({},this.props,{value:"variable",label:Na("Variable"),boxClass:"sui-border-frame"}),d().createElement(kl,Gc({},this.props,{settings:this.props.payment,updateProperty:this.updatePayment,property:"variable_quantity",label:Na("Choose form field"),note:e}),d().createElement("option",{value:""},Na("Select field")),_.map(t,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)))))),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Bill every")," ",d().createElement("span",{className:"sui-error","aria-hidden":"true"},"*")),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Gc({},this.props,{property:"bill_input",settings:this.props.payment,updateProperty:this.updatePayment,type:"number",defaultValue:"1",placeholder:Na("E.g., 1"),isRequired:"true",requiredError:Na("Duration cannot be empty."),fieldClass:parseInt(s)<=0?" sui-form-field-error":""}))),d().createElement(il,{cols:"6"},d().createElement(kl,Gc({},this.props,{property:"bill_period",settings:this.props.payment,updateProperty:this.updatePayment,defaultValue:"years"}),d().createElement("option",{value:"day"},Na("Day(s)")),d().createElement("option",{value:"week"},Na("Week(s)")),d().createElement("option",{value:"month"},Na("Month(s)")),d().createElement("option",{value:"year"},Na("Year(s)")))))),d().createElement("div",{style:{marginBottom:this.props.payment.allow_trial?20:0}},d().createElement(pp,Gc({},this.props,{property:"allow_trial",settings:this.props.payment,fieldId:"allow-trial"+this.props.counter,updateProperty:this.updatePayment,label:Na("Allow Trial Period"),tooltip:Na("Check this option to offer a limited-time free trial for this plan"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),this.props.payment.allow_trial&&d().createElement(ol,Gc({},this.props,{property:"trial_days",settings:this.props.payment,updateProperty:this.updatePayment,inputClass:"sui-field-has-suffix",label:Na("Trial Duration"),description:Na("Enter the number of days that users will try your product for free before they start paying."),type:"number",defaultValue:"14",placeholder:Na("E.g., 14"),suffix:Na("Days")})))}}function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Jc.apply(null,arguments)}class Zc extends ea.Component{constructor(e){super(e),this.updatePayment=this.updatePayment.bind(this)}updatePayment(e,t){this.props.updatePayment(this.props.counter,e,t)}updateState(e){this.props.updateProperty("payments",e)}render(){const e=forminatorData.isPro?Na("Stripe Subscription Add-on is required to use this feature. Install it from the Add-ons page."):Na("Collect recurring/subscription Stripe payments with Forminator Pro on your WordPress sites."),t=forminatorData.isPro?Na("Subscription"):Na("Subscription {{span}}Pro{{/span}}",{components:{span:d().createElement("span",{className:"sui-tag sui-tag-pro"})}});return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Jc({},this.props,{settings:this.props.payment,label:Na("Plan name"),placeholder:Na("Plan"),description:Na("This will be displayed on the submissions as well as the Stripe dashboard."),property:"plan_name",isRequired:"true",requiredError:Na("Plan Name is required."),updateProperty:this.updatePayment})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ql,Jc({},this.props,{settings:this.props.payment,property:"payment_method",default:"single",label:Na("Payment type"),updateProperty:this.updatePayment}),d().createElement(Ql,Jc({},this.props,{value:"single",label:Na("One Time"),boxClass:"sui-tab-boxed"}),d().createElement(Yc,Jc({},this.props,{payment:this.props.payment,updatePayment:this.updatePayment}))),!forminatorData.addonsDisabled&&d().createElement(Ql,Jc({},this.props,{value:"subscription",label:t,boxClass:"sui-tab-boxed"}),forminatorData.hasStripePro&&forminatorData.isPro&&d().createElement(Kc,Jc({},this.props,{payment:this.props.payment,updatePayment:this.updatePayment})),(!forminatorData.hasStripePro||!forminatorData.isPro)&&d().createElement(Jl,Jc({},this.props,{text:e,addonUrl:"https://wpmudev.com/project/forminator-pro/?coupon=FORMINATOR-SUBSCRIPTIONS&checkout=0&utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-builder_stripe-addon",addonImg:"https://wpmudev.com/wp-content/uploads/2021/08/forminator-stripe-logo.png"})))))))}}function Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Xc.apply(null,arguments)}class eu extends ea.Component{constructor(e){super(e),this.toggleState=this.toggleState.bind(this),this.removePayment=this.removePayment.bind(this),this.updatePayment=this.updatePayment.bind(this),this.updateProperty=this.updateProperty.bind(this),this.route=e.isOCS?"/builder/products/stripe/":"/builder/settings/stripe/"}updatePayment(e,t,s){this.props.updatePayment(e,t,s)}updateProperty(e,t){this.props.payment[e]=t,this.forceUpdate()}toggleState(){this.props.router.navigate(this.route+"plan");let e=this.props.counter;this.props.activePayment===this.props.counter&&(e=-1),this.props.updateActivePayment(e)}removePayment(){this.props.removePayment(this.props.counter)}showPlanLabel(){if("single"===this.props.payment.payment_method){let e=Na("Fixed");return"variable"===this.props.payment.amount_type&&(e=Na("Variable")),Na("One Time")+" ("+e+")"}if("subscription"===this.props.payment.payment_method)return Na("Subscription")}conditionMarkup(){const e=Pa(this.props.wrappers),t="hide"===this.props.payment.condition_action?Na("Hide"):Na("Show");if(_.isUndefined(this.props.payment.conditions))return;const s=this.props.payment.conditions[0];if(_.isUndefined(s))return;const a=_.filter(e,e=>e.element_id===s.element_id);if(_.isUndefined(a)||_.isEmpty(a))return;const r=a[0].label,i=Ma(s.rule,a.field_type),n=ka(a[0],s),o=this.props.payment.conditions.length;let l="";return o-1>0&&(l="+ "+(o-1)+" "+Na("more condition(s)")),d().createElement("span",{className:"fui-has_conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${t} ${Na("if")} ${r} ${i} ${n} ${l}`},d().createElement("span",{className:"sui-icon-link sui-sm","aria-hidden":"true"}))}render(){const e="plan-"+this.props.counter,t=this.conditionMarkup();return d().createElement("div",{className:"sui-accordion-item"+(this.props.counter===this.props.activePayment?" sui-accordion-item--open":"")+(this.props.errorStateClass?" validation-error":"")},d().createElement("div",{className:"sui-accordion-item-header",onClick:()=>this.toggleState()},d().createElement("div",{className:"sui-accordion-item-title sui-trim-title"},d().createElement("span",{className:"sui-trim-text"},this.props.payment.plan_name)),d().createElement("div",{className:"sui-accordion-item-tag sui-trim-title"},d().createElement("span",{className:"sui-tag sui-tag-sm"},this.showPlanLabel())),d().createElement("div",{className:"sui-accordion-col-auto"},this.props.state.payments.length>1&&d().createElement("button",{className:"sui-button-icon sui-button-red",onClick:()=>this.removePayment()},d().createElement("span",{className:"sui-icon-trash","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Remove This Plan"))),d().createElement("button",{id:"forminator-field-"+e,className:"sui-button-icon sui-accordion-open-indicator","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.props.counter===this.props.activePayment,onClick:()=>this.toggleState()},d().createElement("span",{className:"sui-icon-chevron-down","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Open Plan Settings"))),!_.isUndefined(this.props.payment.conditions)&&this.props.payment.conditions.length>0&&d().createElement(ea.Fragment,null,t))),d().createElement("div",{role:"region",id:"forminator-field-"+e+"-content",className:"sui-accordion-item-body","aria-labelledby":"forminator-field-"+e,"aria-hidden":this.props.counter!==this.props.activePayment},d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",{role:"tablist",className:"sui-tabs-menu"},d().createElement(wr,{to:this.route+"plan",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Plan setup")),d().createElement(wr,{to:this.route+"conditions",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Conditions"))),d().createElement(kt,null,d().createElement(Nt,{path:"/",element:d().createElement(xt,{to:this.route+"plan",replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content active",role:"tabpanel"},d().createElement(kt,null,d().createElement(Nt,{path:"/stripe/plan",element:d().createElement(Zc,Xc({},this.props,{payment:this.props.payment,updatePayment:this.updatePayment}))}),d().createElement(Nt,{path:"/stripe/conditions",element:d().createElement(xl,Xc({},this.props,{state:this.props.payment,updateProperty:this.updateProperty,updatePayment:this.updatePayment,isPayment:!0}))})))))))}}var tu=Dr(eu);function su(){return su=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},su.apply(null,arguments)}class au extends ea.Component{constructor(e){super(e),this.addPayment=this.addPayment.bind(this),this.removePayment=this.removePayment.bind(this),this.updatePayment=this.updatePayment.bind(this),this.updateActivePayment=this.updateActivePayment.bind(this),this.state={activePayment:0}}updateState(e){this.props.updateProperty("payments",e)}updateActivePayment(e){this.setState({activePayment:e})}getPropState(){const e=[];return _.each(this.props.state.payments,t=>{const s=Object.assign({},t);e.push(s)}),e}updatePayment(e,t,s){const a=this.getPropState();a[e][t]=s,this.updateState(a)}removePayment(e){const t=this.getPropState();t.splice(e,1),this.updateState(t)}addPayment(){const e=this.getPropState(),t=void 0!==this.props.state.payments?this.props.state.payments.length:0,s=t+1;e.push({plan_name:Na("Plan")+" "+s,payment_method:"single",amount_type:"fixed",subscription_amount_type:"fixed",quantity_type:"fixed",quantity:"1",bill_input:"1"}),this.updateState(e),this.props.router.navigate("/builder/"+(this.props.isOCS?"products":"settings")+"/stripe/plan"),this.updateActivePayment(t)}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-box-builder sui-flushed",style:{marginTop:30}},d().createElement("div",{className:"sui-box-builder-body"},d().createElement("div",{id:"fui-stripe-plans",className:"sui-accordion sui-accordion-block"},_.map(this.props.state.payments,(e,t)=>d().createElement(tu,su({},this.props,{key:t,counter:t,payment:e,removePayment:this.removePayment,updatePayment:this.updatePayment,activePayment:this.state.activePayment,updateActivePayment:this.updateActivePayment,errorStateClass:this.props.errorState.indexOf(t)>-1})))))),d().createElement("button",{className:"sui-button sui-button-ghost",accessKey:"a",onClick:this.addPayment},d().createElement("span",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Another Plan")))}}var ru=Dr(au);function iu(){return iu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},iu.apply(null,arguments)}class nu extends ea.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this)}updateProperty(e,t){this.props.state[e]=t}getNameOptions(){const e=[];return Pa(this.props.wrappers,["page-break","postdata","upload","captcha","date","time","consent","gdprcheckbox","html"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}getDisabledFields(){const e=["calculation","currency"],t=[];return _.each(forminatorData.fields,s=>{_.includes(e,s.type)||t.push(s.type)}),t}requireErrorState(){let e={isValid:!0,error:!1,paymentKey:[]};return e=$a(e,this.props.state.payments),e}getEmailFields(){const e=[];return ga("email",this.props.wrappers).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.field_label})}),e}getFields(){const e=this.getDisabledFields();return Pa(this.props.wrappers,e)}getZipFields(){return Pa(this.props.wrappers,["calculation","currency","paypal","stripe","stripe-ocs","postdata","pagination","upload","time","section","captcha","hidden"])}conditionNotes(){let e=!0,t=[];return _.isUndefined(this.props.state.payments)||_.isEmpty(this.props.state.payments)||_.each(this.props.state.payments,e=>{_.isEmpty(e.conditions)||t.push(e)}),this.props.state.payments.length<=t.length&&(e=!1),e}render(){const{type:e}=this.props,t=this.getZipFields(),s=this.requireErrorState(),a=this.conditionNotes(),r=Ia(forminatorData.userPermissions.manage_forminator_settings)||Ia(forminatorData.userPermissions.manage_options);switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,iu({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),defaulValue:Na("Credit / Debit Card"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,iu({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(fl,iu({},this.props,{settings:this.props.state,property:"language",label:Na("Language"),description:Na("Choose your preferred language for the Stripe field. This will affect the placeholders language, and the card validation errors returned by the Stripe.")}),d().createElement("option",{value:"auto"},Na("Auto")),d().createElement("option",{value:"en"},Na("English (en)")),d().createElement("option",{value:"zh"},Na("Simplified Chinese (zh)")),d().createElement("option",{value:"da"},Na("Danish (da)")),d().createElement("option",{value:"nl"},Na("Dutch (nl)")),d().createElement("option",{value:"fi"},Na("Finnish (fi)")),d().createElement("option",{value:"fr"},Na("French (fr)")),d().createElement("option",{value:"de"},Na("German (de)")),d().createElement("option",{value:"it"},Na("Italian (it)")),d().createElement("option",{value:"ja"},Na("Japanese (ja)")),d().createElement("option",{value:"no"},Na("Norwegian (no)")),d().createElement("option",{value:"es"},Na("Spanish (es)")),d().createElement("option",{value:"sv"},Na("Swedish (sv)"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(_l,iu({},this.props,{settings:this.props.state,property:"card_icon",defaultValue:"true",label:Na("Card icon"),description:Na("Choose whether you want to show the card icon on the Stripe field.")}),d().createElement("div",{value:"true"},Na("Show")),d().createElement("div",{value:"false"},Na("Hide"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ql,iu({},this.props,{property:"verify_zip",settings:this.props.state,default:"false",label:Na("Postal code"),description:Na("Choose whether you want to collect the postal code on the Stripe field.")}),d().createElement(Ql,iu({},this.props,{settings:this.props.state,value:"true",label:Na("Enable"),boxClass:"sui-tab-boxed"}),d().createElement("div",{className:"sui-form-field sui-input-md",style:{marginBottom:"10px"}},d().createElement("label",{className:"sui-label"},Na("Prefill (optional)")),d().createElement(kl,iu({},this.props,{settings:this.props.state,property:"zip_field",noWrapper:!0}),d().createElement("option",{value:""},Na("Select field")),_.map(t,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label))))),d().createElement("span",{className:"sui-description"},Na("If you are already collecting ZIP code on your form, you can pre-fill it on the Stripe field."))),d().createElement(Yl,iu({},this.props,{settings:this.props.state,value:"false",label:Na("Disable")}))))));case"settings":return d().createElement(ea.Fragment,null,d().createElement("div",{role:"alert",className:`sui-notice sui-notice-red${!forminatorData.hasStripe&&" sui-active"}`,style:{display:forminatorData.hasStripe?"none":"block"},"aria-live":"assertive"},!forminatorData.hasStripe&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You have not connected your Stripe account with Forminator. ")," ",r&&Na("Connect your Stripe account {{link}}here{{/link}} and then come back to configure this field.",{components:{link:d().createElement("a",{href:forminatorData.settingsUrl+"&section=payments",target:"_blank"})}}))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Payment Mode")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("We recommend using Test mode to ensure the payments are working as expected and when you are ready to start collecting live payments, switch to Live payments mode. ")),d().createElement(_l,iu({},this.props,{settings:this.props.state,defaultValue:"test",property:"mode",clearOptions:"true"}),d().createElement("span",{value:"test"},Na("Test")),d().createElement("span",{value:"live"},Na("Live"))),d().createElement(kl,iu({},this.props,{settings:this.props.state,label:Na("Charge currency"),property:"currency",description:Na("Choose the currency your users will be charged in."),fieldsize:"240"}),_.map(forminatorData.currencies,(e,t)=>d().createElement("option",{value:t,key:t},t)))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Payment Plan")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Payment plans let you set up options for accepting payments on your site. You can add multiple plans and conditionally process them based on your form data.")),d().createElement("div",{role:"alert",className:`sui-notice sui-notice-blue ${this.props.state.payments.length>1&&a&&" sui-active"}`,style:{display:this.props.state.payments.length>1&&a?"block":"none"},"aria-live":"assertive"},this.props.state.payments.length>1&&a&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note: You'll need to configure conditions on each plan to let Forminator know when to process each of the payment plans below."))))),d().createElement("div",{role:"alert",className:`sui-notice sui-notice-error${!s.isValid&&" sui-active"}`,style:{display:s.isValid?"none":"block"},"aria-live":"assertive"},!s.isValid&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("There is an error in one or more of your payment plans. Please review the error and try again."))))),d().createElement(ru,iu({},this.props,{errorState:s.paymentKey}))));case"advanced-settings":return d().createElement(ea.Fragment,null,d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Payment Receipt")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose whether you want Stripe to email a receipt to your customers on successful payment. Note that Stripe sends the email receipt only for live payments. {{link}}Customize email template{{/link}}.",{components:{link:d().createElement("a",{href:"https://dashboard.stripe.com/account/branding",target:"_blank"})}})),d().createElement(ql,iu({},this.props,{property:"receipt",settings:this.props.state,defaultValue:"true"}),d().createElement(Ql,iu({},this.props,{settings:this.props.state,value:"true",label:Na("Enable"),boxClass:"sui-tab-boxed"}),d().createElement(kl,iu({},this.props,{property:"customer_email",settings:this.props.state,label:Na("Email address"),defaultValue:"",placeholder:Na("E.g. john@doe.com")}),d().createElement("option",{selected:!0,value:""},Na("Select an email field")),_.map(this.getEmailFields(),(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label)," ",e.value)))),d().createElement(Yl,iu({},this.props,{settings:this.props.state,value:"false",label:Na("Disable")})))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Payment Details (optional)")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("You can add a statement decipher and a description to help you and your customers recognise the transactions made on this form.")),d().createElement(ol,iu({},this.props,{settings:this.props.state,label:Na("Statement decipher"),type:"text",maxLength:"22",placeholder:Na("E.g. Company Name"),property:"company_name",description:Na("This is the business name your customers will see on their card statement."),note:Na("Up to 22 characters only")})),d().createElement(hc,iu({},this.props,{settings:this.props.state,property:"product_description",placeholder:Na("Enter your payment description here"),description:Na("This appears on your Stripe account and on the payment receipt sent to your customers."),label:Na("Payment description"),updateProperty:this.updateProperty}),this.getNameOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Card Validation")),d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note: Stripe field automatically validates the card as the user fills the card details regardless of the validation behavior set on the Behaviours tab.")))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Billing Details")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("If you are collecting billing details on your forms, you can send that data to Stripe. The billing details will appear on your Stripe dashboard for each payment.")),d().createElement(ql,iu({},this.props,{settings:this.props.state,property:"billing",default:"false"}),d().createElement(Ql,iu({},this.props,{settings:this.props.state,value:"true",label:Na("Enable"),boxClass:"sui-tab-boxed"}),d().createElement(kl,iu({},this.props,{settings:this.props.state,property:"billing_name",label:Na("Customer name (optional)")}),d().createElement("option",{value:""},Na("Select a name field")),_.map(ga("name",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label)))),d().createElement(kl,iu({},this.props,{settings:this.props.state,property:"billing_email",label:Na("Customer email address (optional)")}),d().createElement("option",{value:""},Na("Select an email field")),_.map(ga("email",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label)))),d().createElement(kl,iu({},this.props,{settings:this.props.state,property:"billing_address",label:Na("Billing address (optional)")}),d().createElement("option",{value:""},Na("Select an address field")),_.map(ga("address",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label))))),d().createElement(Yl,iu({},this.props,{value:"false",label:Na("Disable")})))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Meta Data")),d().createElement("span",{className:"sui-description",style:{marginBottom:"55px"}},Na("You can send custom meta data to Stripe. This would appear under the MetaData section of every payment. A maximum of 20 meta keys can be sent. The key name must be 20 characters or less, and the mapped data will be truncated to 500 characters as Stripe's requirements.")),d().createElement(qc,iu({},this.props,{settings:this.props.state}))));case"meta":return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label"},Na("Meta Data")),d().createElement("span",{className:"sui-description"},Na("You can send custom meta data to Stripe. This would appear under the MetaData section of every payment. A maximum of 20 meta keys can be sent. The key name must be 20 characters or less, and the mapped data will be truncated to 500 characters as Stripe's requirements."))),d().createElement("div",{className:"sui-form-field"},d().createElement("span",{className:"sui-label"},Na("MetaData"))),d().createElement(qc,iu({},this.props,{settings:this.props.state})));case"styling":return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Additional CSS Classes")),d().createElement("span",{className:"sui-description"},Na("Stripe automatically adds classes to the container DOM element based on the field state. However, you can customize them here. {{link}}Read more{{/link}}",{components:{link:d().createElement("a",{href:"https://stripe.com/docs/stripe-js/reference#element-options",target:"_blank"})}}))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(ol,iu({},this.props,{property:"base_class",defaultValue:"StripeElement",settings:this.props.state,label:Na("Base class")})),d().createElement(ol,iu({},this.props,{property:"complete_class",defaultValue:"StripeElement--complete",settings:this.props.state,label:Na("Complete")})),d().createElement(ol,iu({},this.props,{property:"empty_class",defaultValue:"StripeElement--empty",settings:this.props.state,label:Na("Empty")})),d().createElement(ol,iu({},this.props,{property:"focused_class",defaultValue:"StripeElement--focus",settings:this.props.state,label:Na("Focused")})),d().createElement(ol,iu({},this.props,{property:"invalid_class",defaultValue:"StripeElement--invalid",settings:this.props.state,label:Na("Invalid")})),d().createElement(ol,iu({},this.props,{property:"autofilled_class",defaultValue:"StripeElement--webkit-autofill",settings:this.props.state,label:Na("Autofilled (Chrome and Safari only)")}))));case"visibility":return d().createElement(xl,this.props);default:return d().createElement("div",null)}}}function ou(){return ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},ou.apply(null,arguments)}class lu extends u.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this)}updateProperty(e,t){this.props.state[e]=t}getNameOptions(){const e=[];return Pa(this.props.wrappers,["page-break","postdata","upload","captcha","date","time","consent","gdprcheckbox","paypal","stripe","stripe-ocs","html"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}getDisabledFields(){const e=["calculation","currency"],t=[];return _.each(forminatorData.fields,s=>{_.includes(e,s.type)||t.push(s.type)}),t}requireErrorState(){let e={isValid:!0,error:!1,paymentKey:[]};return e=$a(e,this.props.state.payments),e}getEmailFields(){const e=[];return ga("email",this.props.wrappers).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.field_label})}),e}getFields(){const e=this.getDisabledFields();return Pa(this.props.wrappers,e)}conditionNotes(){let e=!0,t=[];return _.isUndefined(this.props.state.payments)||_.isEmpty(this.props.state.payments)||_.each(this.props.state.payments,e=>{_.isEmpty(e.conditions)||t.push(e)}),this.props.state.payments.length<=t.length&&(e=!1),e}render(){const{type:e}=this.props,t=this.requireErrorState(),s=this.conditionNotes(),a=Ia(forminatorData.userPermissions.manage_forminator_settings)||Ia(forminatorData.userPermissions.manage_options);switch(e){case"labels":return d().createElement(d().Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,ou({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),defaulValue:Na("Credit / Debit Card"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,ou({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(fl,ou({},this.props,{settings:this.props.state,property:"language",label:Na("Language"),description:Na("Choose your preferred language for the Stripe field. This will affect the placeholders language, and the card validation errors returned by the Stripe.")}),d().createElement("option",{value:"auto"},Na("Auto")),d().createElement("option",{value:"en"},Na("English (en)")),d().createElement("option",{value:"zh"},Na("Simplified Chinese (zh)")),d().createElement("option",{value:"da"},Na("Danish (da)")),d().createElement("option",{value:"nl"},Na("Dutch (nl)")),d().createElement("option",{value:"fi"},Na("Finnish (fi)")),d().createElement("option",{value:"fr"},Na("French (fr)")),d().createElement("option",{value:"de"},Na("German (de)")),d().createElement("option",{value:"it"},Na("Italian (it)")),d().createElement("option",{value:"ja"},Na("Japanese (ja)")),d().createElement("option",{value:"no"},Na("Norwegian (no)")),d().createElement("option",{value:"es"},Na("Spanish (es)")),d().createElement("option",{value:"sv"},Na("Swedish (sv)"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(kl,ou({},this.props,{settings:this.props.state,label:Na("Charge currency"),property:"currency",description:Na("Choose the currency your users will be charged in.")}),_.map(forminatorData.currencies,(e,t)=>d().createElement("option",{value:t,key:t},t))))));case"products":return d().createElement(d().Fragment,null,d().createElement("div",{role:"alert",className:`sui-notice sui-notice-red${!forminatorData.hasStripe&&" sui-active"}`,style:{display:forminatorData.hasStripe?"none":"block"},"aria-live":"assertive"},!forminatorData.hasStripe&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You have not connected your Stripe account with Forminator. ")," ",a&&Na("Connect your Stripe account {{link}}here{{/link}} and then come back to configure this field.",{components:{link:d().createElement("a",{href:forminatorData.settingsUrl+"&section=payments",target:"_blank"})}}))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Payment Mode")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("We recommend using Test mode to ensure the payments are working as expected and when you are ready to start collecting live payments, switch to Live payments mode. ")),d().createElement(_l,ou({},this.props,{settings:this.props.state,defaultValue:"test",property:"mode",clearOptions:"true"}),d().createElement("span",{value:"test"},Na("Test")),d().createElement("span",{value:"live"},Na("Live")))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Payment Plan")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Add your products, services and plans below. You can add multiple products and conditionally process each one based on your form data.")),d().createElement("div",{role:"alert",className:`sui-notice sui-notice-blue ${this.props.state.payments.length>1&&s&&" sui-active"}`,style:{display:this.props.state.payments.length>1&&s?"block":"none"},"aria-live":"assertive"},this.props.state.payments.length>1&&s&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note: You'll need to configure conditions on each product to let Forminator know when to process each of the products below."))))),d().createElement("div",{role:"alert",className:`sui-notice sui-notice-error${!t.isValid&&" sui-active"}`,style:{display:t.isValid?"none":"block"},"aria-live":"assertive"},!t.isValid&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("There is an error in one or more of your products. Please review the error and try again."))))),d().createElement(ru,ou({},this.props,{isOCS:!0,errorState:t.paymentKey}))));case"settings":return d().createElement(d().Fragment,null,d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Payment Methods")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose how customers can pay. The default option allows card payments only. To allow other payment methods like Venmo, Google Pay, or AliPay, select the Dynamic Payment Methods option below.")),d().createElement(ql,ou({},this.props,{settings:this.props.state,default:"true",property:"automatic_payment_methods"}),d().createElement(Ql,ou({},this.props,{settings:this.props.state,value:"true",label:Na("Dynamic Payment Methods"),boxClass:"sui-tab-boxed"}),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("You’ve selected dynamic payment methods. Please configure accepted payment methods on your {{link}}Stripe Dashboard{{/link}}.",{components:{link:d().createElement("a",{href:"https://dashboard.stripe.com/settings/payment_methods",target:"_blank"})}})),d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note: Only payment methods with immediate confirmation are supported.")," ",forminatorData.showDocLink&&Na("{{link}}Learn more{{/link}}.",{components:{link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#stripe",target:"_blank"})}})))))),d().createElement(Yl,ou({},this.props,{settings:this.props.state,value:"false",label:Na("Cards Only")})))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Payment Details (optional)")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("You can add a statement decipher and a description to help you and your customers recognise the transactions made on this form.")),d().createElement(ol,ou({},this.props,{settings:this.props.state,label:Na("Statement decipher"),type:"text",maxLength:"22",placeholder:Na("E.g. Company Name"),property:"company_name",description:Na("This is the business name your customers will see on their card statement."),note:Na("Up to 22 characters only")})),d().createElement(hc,ou({},this.props,{settings:this.props.state,property:"product_description",placeholder:Na("Enter your payment description here"),description:Na("This appears on your Stripe account and on the payment receipt sent to your customers."),label:Na("Payment description"),updateProperty:this.updateProperty}),this.getNameOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Additional Settings")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Use these below options to enable and configure additional options for your Stripe payment.")),d().createElement(Up,ou({},this.props,{label:Na("Send Payment Receipt"),description:Na("Enable Stripe to email a receipt to your customers upon successful payment. Note that Stripe sends the email receipt only for live payments. {{link}}Customize email template{{/link}}.",{components:{link:d().createElement("a",{href:"https://dashboard.stripe.com/account/branding",target:"_blank"})}}),property:"receipt",settings:this.props.state}),d().createElement(kl,ou({},this.props,{property:"customer_email",settings:this.props.state,label:Na("Email address"),defaultValue:"",placeholder:Na("E.g. john@doe.com")}),d().createElement("option",{value:""},Na("Select an email field")),_.map(this.getEmailFields(),(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label)," ",e.value)))),d().createElement(Up,ou({},this.props,{label:Na("Enable Billing Details"),description:Na("If you are collecting billing details on your forms, you can send that data to Stripe. The billing details will appear on your Stripe dashboard for each payment."),property:"billing",settings:this.props.state}),d().createElement(kl,ou({},this.props,{settings:this.props.state,property:"billing_name",label:Na("Customer name (optional)")}),d().createElement("option",{value:""},Na("Select a name field")),_.map(ga("name",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label)))),d().createElement(kl,ou({},this.props,{settings:this.props.state,property:"billing_email",label:Na("Customer email address (optional)")}),d().createElement("option",{value:""},Na("Select an email field")),_.map(ga("email",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label)))),d().createElement(kl,ou({},this.props,{settings:this.props.state,property:"billing_phone",label:Na("Customer phone number (optional)")}),d().createElement("option",{value:""},Na("Select a phone field")),_.map(ga("phone",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label)))),d().createElement(kl,ou({},this.props,{settings:this.props.state,property:"billing_address",label:Na("Billing address (optional)")}),d().createElement("option",{value:""},Na("Select an address field")),_.map(ga("address",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label)))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Meta Data")),d().createElement("span",{className:"sui-description",style:{marginBottom:"55px"}},Na("You can send custom meta data to Stripe. This would appear under the MetaData section of every payment. A maximum of 20 meta keys can be sent. The key name must be 20 characters or less, and the mapped data will be truncated to 500 characters as Stripe's requirements.")),d().createElement(qc,ou({},this.props,{settings:this.props.state}))));case"meta":return d().createElement(d().Fragment,null,d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label"},Na("Meta Data")),d().createElement("span",{className:"sui-description"},Na("You can send custom meta data to Stripe. This would appear under the MetaData section of every payment. A maximum of 20 meta keys can be sent. The key name must be 20 characters or less, and the mapped data will be truncated to 500 characters as Stripe's requirements."))),d().createElement("div",{className:"sui-form-field"},d().createElement("span",{className:"sui-label"},Na("MetaData"))),d().createElement(qc,ou({},this.props,{settings:this.props.state})));case"customize":return d().createElement(d().Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement("label",{className:"sui-settings-label"},Na("Payment Element Layout")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose the Payment Element’s layout that fits your checkout flow.")),d().createElement(ql,ou({},this.props,{settings:this.props.state,property:"layout",default:"tabs"}),d().createElement(Ql,ou({},this.props,{settings:this.props.state,value:"tabs",label:Na("Tabs"),hasImage:!0,image1x:"stripe-tabs.png",image2x:"stripe-tabs@2x.png"})),d().createElement(Ql,ou({},this.props,{settings:this.props.state,value:"accordion+radio",label:Na("Accordion with radio buttons"),hasImage:!0,image1x:"stripe-radios.png",image2x:"stripe-radios@2x.png"})),d().createElement(Ql,ou({},this.props,{settings:this.props.state,value:"accordion",label:Na("Accordion without radio buttons"),hasImage:!0,image1x:"stripe-accordions.png",image2x:"stripe-accordions@2x.png"}))))),Wa(this.props)&&d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement("label",{className:"sui-settings-label"},Na("Field Description Placement")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Select where the description of this field should appear.")),d().createElement(Pl,this.props))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement("label",{className:"sui-settings-label"},Na("Appearance")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Select a theme from the Stripe Appearance API to control the style of all elements.")),d().createElement(kl,ou({},this.props,{settings:this.props.state,property:"theme"}),d().createElement("option",{value:"stripe"},Na("Default")),d().createElement("option",{value:"night"},Na("Night")),d().createElement("option",{value:"flat"},Na("Flat"))))),d().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginBottom:"-30px"}},d().createElement(ll,ou({},this.props,{label:Na("Customize Appearance"),property:"custom_appearance",settings:this.props.state}),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Customize Colors")),d().createElement(_c,ou({},this.props,{label:Na("Primary color"),property:"primary_color",defaultValue:"#0570DE",settings:this.props.state})),d().createElement(_c,ou({},this.props,{label:Na("Background color"),property:"background_color",defaultValue:"#FFFFFF",settings:this.props.state})),d().createElement(_c,ou({},this.props,{label:Na("Text color"),property:"text_color",defaultValue:"#30313D",settings:this.props.state})),d().createElement(_c,ou({},this.props,{label:Na("Error"),property:"error",defaultValue:"#DF1B41",settings:this.props.state}))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Other options")),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Spacing")),d().createElement("div",{style:{width:"100%",maxWidth:"100px",display:"inline-block"}},d().createElement(ol,ou({},this.props,{type:"number",property:"spacing_unit",minValue:"0",defaultValue:"2",settings:this.props.state,simple:!0}))),d().createElement("span",{className:"sui-field-suffix"},Na("px"))),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Border radius")),d().createElement("div",{style:{width:"100%",maxWidth:"100px",display:"inline-block"}},d().createElement(ol,ou({},this.props,{type:"number",property:"border_radius",minValue:"0",defaultValue:"4",settings:this.props.state,simple:!0}))),d().createElement("span",{className:"sui-field-suffix"},Na("px")))))));case"visibility":return d().createElement(xl,this.props);default:return d().createElement("div",null)}}}function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},pu.apply(null,arguments)}class cu extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t=_.isUndefined(this.props.state.limit_min)?1:this.props.state.limit_min,s=_.isUndefined(this.props.state.limit_max)?150:this.props.state.limit_max,a=_.isUndefined(this.props.state.separators)?"":this.props.state.separators;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,pu({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,pu({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,pu({},this.props,{settings:this.props.state,label:Na("Default Value (optional)"),placeholder:Na("Enter default value"),property:"default_value"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,pu({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))));case"settings":return d().createElement(ea.Fragment,null,d().createElement(Tl,this.props),d().createElement(Fl,{label:Na("Currency"),labelDark:!0,description:Na("Choose the currency to display on the field. If you are going to collect payments based on this field, it is recommended to keep this currency same as your charge currency to avoid any confusions."),sidebar:!1},d().createElement(kl,pu({},this.props,{settings:this.props.state,property:"currency",hasSearch:!0}),_.map(forminatorData.currencies,(e,t)=>d().createElement("option",{value:t,key:t},e[0])))),d().createElement(Fl,{label:Na("Limit"),labelDark:!0,description:Na("Restrict the value that your users can enter in this field within a custom range."),descriptionSpacing:20,sidebar:!1},d().createElement("div",{className:"sui-form-field-inline"},d().createElement(ol,pu({type:"number"},this.props,{settings:this.props.state,placeholder:"0",property:"limit_min",label:Na("Min"),fieldClass:"sui-input-sm"+(parseInt(t)>=parseInt(s)?" sui-form-field-error":"")})),d().createElement(ol,pu({type:"number"},this.props,{settings:this.props.state,placeholder:"0",property:"limit_max",label:Na("Max"),fieldClass:"sui-input-sm"+(parseInt(t)>=parseInt(s)?" sui-form-field-error":"")}))),d().createElement("div",{className:"sui-form-field"},d().createElement(ql,pu({},this.props,{property:"limit_message",settings:this.props.state,default:"false",label:Na("Error Messages")}),d().createElement(Yl,{value:"false",label:Na("Default")}),d().createElement(Ql,{value:"true",label:Na("Custom"),boxClass:"sui-tab-boxed"},d().createElement(ol,pu({},this.props,{settings:this.props.state,property:"limit_min_message",type:"text",label:Na("When number is smaller than the min limit"),placeholder:Na("E.g. Please enter a number greater than 0.")})),d().createElement(ol,pu({},this.props,{settings:this.props.state,type:"text",property:"limit_max_message",label:Na("When number is greater than the max limit"),placeholder:Na("E.g. Please enter a number lower than 1000.")})))))),d().createElement(Fl,{label:Na("Formatting"),labelDark:!0,description:Na("Choose how do you want to format the value of this field."),descriptionSpacing:20,sidebar:!1},d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,pu({},this.props,{property:"separators",settings:this.props.state,defaultValue:"1234567.89",label:Na("Separators"),fieldClass:"sui-input-md"}),d().createElement("option",{value:"blank"},Na("1234567.89")),d().createElement("option",{value:"comma_dot"},Na("1,234,567.89")),d().createElement("option",{value:"dot_comma"},Na("1.234.567,89")),d().createElement("option",{value:"space_comma"},Na("1 234 567,89")))),"custom"!==a&&d().createElement(il,{cols:"6"},d().createElement(kl,pu({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:Na("Round To"),fieldClass:"sui-input-md"}),d().createElement("option",{value:"0"},Na("0 decimals")),d().createElement("option",{value:"1"},Na("1 decimals")),d().createElement("option",{value:"2"},Na("2 decimals")),d().createElement("option",{value:"3"},Na("3 decimals")),d().createElement("option",{value:"4"},Na("4 decimals"))))),"custom"===a&&d().createElement("div",{className:"sui-border-frame"},d().createElement("div",{className:"sui-form-field-inline",style:{marginBottom:"5px"}},d().createElement(ol,pu({type:"text"},this.props,{settings:this.props.state,placeholder:Na("E.g. $"),property:"thousand-separators",defaultValue:",",label:Na("Thousand Separator"),fieldClass:"sui-input-md"})),d().createElement(ol,pu({type:"text"},this.props,{settings:this.props.state,placeholder:Na("E.g. $"),property:"decimal-separators",defaultValue:".",label:Na("Decimal Separator"),fieldClass:"sui-input-md"})))),"custom"===a&&d().createElement("div",{className:"sui-form-field"},d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,pu({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:Na("Round To"),fieldClass:"sui-input-md"}),d().createElement("option",{value:"0"},Na("0 decimals")),d().createElement("option",{value:"1"},Na("1 decimals")),d().createElement("option",{value:"2"},Na("2 decimals")),d().createElement("option",{value:"3"},Na("3 decimals")),d().createElement("option",{value:"4"},Na("4 decimals"))))))),d().createElement(Bl,this.props));case"calculations":return d().createElement(zp,this.props);case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function uu(){return uu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},uu.apply(null,arguments)}class du extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,uu({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,uu({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Enter placeholder"),property:"placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ip,uu({},this.props,{settings:this.props.state,extraId:"password",label:Na("Description (optional)"),property:"description",hideEditorOptions:"true",cutomTinymce:"bold,italic,underline,link,alignleft,aligncenter,alignright"})))),"registration"===this.props.formType&&d().createElement("div",{className:"sui-accordion sui-accordion-flushed",value:"multiple"},d().createElement(ll,uu({},this.props,{label:Na("Confirm Password"),property:"confirm-password",settings:this.props.state}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,uu({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Confirm password"),property:"confirm-password-label"}))),d().createElement(il,{cols:"6"},d().createElement(ol,uu({},this.props,{settings:this.props.state,label:Na("Placeholder (optional)"),placeholder:Na("Confirm new password"),property:"confirm-password-placeholder"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ip,uu({},this.props,{settings:this.props.state,extraId:"confirm-password",label:Na("Description (optional)"),property:"confirm-password-description",hideEditorOptions:"true",cutomTinymce:"bold,italic,underline,link,alignleft,aligncenter,alignright"}))))))));case"settings":return d().createElement(ea.Fragment,null,"registration"===this.props.formType&&d().createElement(Fl,{label:Na("Minimum password strength"),labelDark:!0,description:Na("Choose a minimum password strength required to force your users to sign up with a password stronger than the minimum requirement."),sidebar:!1},d().createElement("div",{style:{marginTop:"10px",marginBottom:"0"}},d().createElement(kl,uu({property:"strength",settings:this.props.state},this.props,{defaultValue:"none",fieldClass:"sui-input-md"}),d().createElement("option",{value:"none"},Na("None")),d().createElement("option",{value:"short"},Na("Short")),d().createElement("option",{value:"bad"},Na("Bad")),d().createElement("option",{value:"good"},Na("Good")),d().createElement("option",{value:"strong"},Na("Strong")))),"none"!==this.props.state.strength&&d().createElement("div",{className:"sui-border-frame"},d().createElement(ol,uu({},this.props,{settings:this.props.state,label:Na("Error message"),type:"text",className:"sui-form-control",property:"strength_validation_message",description:Na("This is displayed when the user's password is weaker than the minimum requirement.")})))),d().createElement(Tl,this.props),Ia(this.props.state["confirm-password"])&&d().createElement(Fl,{label:Na("Password validation error message"),labelDark:!0,description:Na("Enter an error message to be displayed when the passwords do not match."),sidebar:!1},d().createElement(ol,uu({},this.props,{settings:this.props.state,type:"text",placeholder:Na("Passwords do not match. Please try again."),property:"validation_message"}))));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},mu.apply(null,arguments)}class hu extends ea.Component{constructor(e){super(e)}getDisabledFields(){const e=["calculation","currency","number","slider"],t=[];return _.each(forminatorData.fields,s=>{_.includes(e,s.type)||t.push(s.type)}),t}getFields(){const e=this.getDisabledFields();return Pa(this.props.wrappers,e)}isCountryRequired(e){let t;return this.props.wrappers.map(s=>{s.fields.map(s=>{s.element_id===e&&(t=s.address_country_required)})}),Ia(t)}render(){const e=Ia(forminatorData.userPermissions.manage_forminator_settings)||Ia(forminatorData.userPermissions.manage_options),{type:t}=this.props,{layout:s}=this.props.state,{card:a}=this.props.state,r=Na("In %s",{args:[this.props.state.currency]}),i=this.getFields(),n=[];for(let e=25;e<56;e++)n.push(e);switch(t){case"settings":return d().createElement(ea.Fragment,null,!forminatorData.hasPayPal&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You have not connected your PayPal account with Forminator. ")," ",e&&Na("Connect your PayPal account {{link}}here{{/link}} and then come back to configure this field.",{components:{link:d().createElement("a",{href:forminatorData.settingsUrl+"&section=payments",target:"_blank"})}}))))),d().createElement(_l,mu({},this.props,{settings:this.props.state,defaultValue:"sandbox",label:Na("Mode of payment"),property:"mode",clearOptions:"true",description:Na("We recommend using sandbox mode to ensure the payments are working as expected and when you are ready to start collecting live payments, switch to the {{strong}}Live{{/strong}} payments mode.",{components:{strong:d().createElement("strong",null)}})}),d().createElement("span",{value:"sandbox"},Na("Sandbox")),d().createElement("span",{value:"live"},Na("Live"))),d().createElement(kl,mu({},this.props,{settings:this.props.state,label:Na("Charge currency"),property:"currency",description:Na("It's recommended to charge in your customers' currency to drive more sales and avoid foreign exchange fee to your customers."),fieldsize:"240"}),_.map(forminatorData.ppCurrencies,(e,t)=>d().createElement("option",{value:t,key:t},t))),d().createElement(ql,mu({},this.props,{property:"amount_type",settings:this.props.state,default:"fixed",label:Na("Payment amount")}),d().createElement(Ql,mu({},this.props,{settings:this.props.state,value:"fixed",label:Na("Fixed"),boxClass:"sui-tab-boxed"}),d().createElement(ol,mu({},this.props,{type:"number",property:"amount",settings:this.props.state,inputClass:"sui-field-has-suffix",label:Na("Fixed amount"),suffix:this.props.state.currency,placeholder:Na("E.g. 20.00"),isRequired:"true",requiredError:Na("Enter an amount or choose a form field.")}))),d().createElement(Ql,mu({},this.props,{settings:this.props.state,value:"variable",label:Na("Variable"),boxClass:"sui-tab-boxed"}),d().createElement("div",{className:"sui-form-field sui-input-md",style:{marginBottom:"10px"}},d().createElement("label",{className:"sui-label"},Na("Variable amount"),d().createElement("span",{className:"sui-label-note"},r)),d().createElement(kl,mu({},this.props,{settings:this.props.state,property:"variable",note:r,noWrapper:!0}),d().createElement("option",{value:""},Na("Select field")),_.map(i,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label))))),d().createElement("span",{className:"sui-description"},Na("A currency field can be used to take user-defined payments such as donations and calculation field can be used to charge a calculated value based on a formula.")))));case"customize":return d().createElement(ea.Fragment,null,d().createElement(kl,mu({},this.props,{settings:this.props.state,label:Na("Label"),property:"label",description:Na("Choose a label for your PayPal button. Note that PayPal checkout doesn't allow a custom label for the PayPal button. You can only choose from the pre-defined labels."),fieldsize:"240"}),d().createElement("option",{value:"checkout"},Na("PayPal Checkout")),d().createElement("option",{value:"pay"},Na("Pay with PayPal")),d().createElement("option",{value:"paypal"},Na("PayPal"))),d().createElement(fl,mu({},this.props,{settings:this.props.state,property:"color",elementClass:"sui-select-colors",fieldsize:"240",label:Na("Color"),description:Na("PayPal recommends using the Gold button since it is widely known as their brand color. However, if that does not suit your theme, you can choose a different color.")}),d().createElement("option",{value:"gold","data-color":"#FFC439"},Na("Gold")),d().createElement("option",{value:"blue","data-color":"#009CDE"},Na("Blue")),d().createElement("option",{value:"silver","data-color":"#EEEEEE"},Na("Silver")),d().createElement("option",{value:"white","data-color":"#FFFFFF"},Na("White")),d().createElement("option",{value:"black","data-color":"#2C2E2F"},Na("Black"))),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Width")),d().createElement("div",{style:{width:"100%",maxWidth:"100px",display:"inline-block"}},d().createElement(ol,mu({},this.props,{type:"number",property:"width",minValue:"150",maxValue:"750",settings:this.props.state,placeholder:Na("E.g. 250"),simple:!0}))),d().createElement("span",{className:"sui-field-suffix"},Na("px")),d().createElement("span",{className:"sui-description"},Na("Choose the width of PayPal Smart Buttons. It can be anywhere between 150px to 750px. Leave this empty if you want the buttons to take the full width of the form up to the 750px limit."))),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Height")),d().createElement("div",{style:{width:"100%",maxWidth:"100px",display:"inline-block",verticalAlign:"middle"}},d().createElement(kl,mu({},this.props,{settings:this.props.state,property:"height",noWrapper:!0}),n.map((e,t)=>d().createElement("option",{value:e,key:t},e)))),d().createElement("span",{className:"sui-field-suffix"},Na("px")),d().createElement("span",{className:"sui-description"},Na("Choose the height of PayPal Smart Buttons. It can be anywhere between 25px to 55px"))),d().createElement(_l,mu({},this.props,{settings:this.props.state,defaultValue:"rect",label:Na("Shape"),property:"shape",clearOptions:"true",description:Na("Choose your preferred shape from your PayPal Smart Buttons.")}),d().createElement("span",{value:"rect"},Na("Rectangular")),d().createElement("span",{value:"pill"},Na("Pill"))),d().createElement(_l,mu({},this.props,{settings:this.props.state,defaultValue:"vertical",label:Na("Layout"),property:"layout",clearOptions:"true",description:Na("We recommend the vertical layout as it allows additional payment methods such as Credit Cards. You can read about the layout options {{link}}here{{/link}}.",{components:{link:d().createElement("a",{href:"https://developer.paypal.com/docs/checkout/integration-features/customize-button/#layout",target:"_blank"})}})}),d().createElement("span",{value:"vertical"},Na("Vertical")),d().createElement("span",{value:"horizontal"},Na("Horizontal"))),"vertical"!==s&&d().createElement(_l,mu({},this.props,{settings:this.props.state,defaultValue:"true",label:Na("Tagline"),property:"tagline",clearOptions:"true",description:Na('Choose whether to show the default PayPal tagline {{strong}}"The safer, easier way to pay"{{/strong}} below your PayPal button.',{components:{strong:d().createElement("strong",null)}})}),d().createElement("span",{value:"true"},Na("Show")),d().createElement("span",{value:"false"},Na("Hide"))));case"advanced-settings":return d().createElement(ea.Fragment,null,d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Disable Funding Sources")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("PayPal automatically adds additional funding sources to the PayPal checkout for visitors from supported countries. However, you can choose to disable funding sources which shouldn't be displayed to visitors.")),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(pp,mu({},this.props,{property:"card",settings:this.props.state,label:Na("Credit or debit cards"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"credit",settings:this.props.state,label:Na("PayPal Credit"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"bancontact",settings:this.props.state,label:Na("Bancontact"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"blik",settings:this.props.state,label:Na("BLIK"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"eps",settings:this.props.state,label:Na("eps"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"giropay",settings:this.props.state,label:Na("giropay"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"ideal",settings:this.props.state,label:Na("iDEAL"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),d().createElement(il,{cols:"6"},d().createElement(pp,mu({},this.props,{property:"mercadopago",settings:this.props.state,label:Na("Mercado Pago"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"mybank",settings:this.props.state,label:Na("MyBank"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"p24",settings:this.props.state,label:Na("Przelewy24"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"sepa",settings:this.props.state,label:Na("SEPA-Lastschrift"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"sofort",settings:this.props.state,label:Na("Sofort"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),d().createElement(pp,mu({},this.props,{property:"venmo",settings:this.props.state,label:Na("Venmo"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Pre-fill Billing Details")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Pre-fill the payer's billing info collected on your form on the Debit or Credit Card checkout, so the payer doesn't have to enter those details again.")),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ql,mu({},this.props,{property:"billing-details",settings:this.props.state,default:"false"}),d().createElement(Ql,mu({},this.props,{settings:this.props.state,value:"true",label:Na("Enable"),boxClass:"sui-tab-boxed"}),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Customer name (optional)")),d().createElement(kl,mu({},this.props,{settings:this.props.state,property:"billing-name",noWrapper:!0}),d().createElement("option",{value:""},Na("Select a name field")),_.map(ga("name",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label))))),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Customer email address (optional)")),d().createElement(kl,mu({},this.props,{settings:this.props.state,property:"billing-email",noWrapper:!0}),d().createElement("option",{value:""},Na("Select an email field")),_.map(ga("email",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label))))),d().createElement("div",{className:"sui-form-field",style:{marginBottom:"10px"}},d().createElement("label",{className:"sui-label"},Na("Billing address (optional)")),d().createElement(kl,mu({},this.props,{settings:this.props.state,property:"billing-address",noWrapper:!0}),d().createElement("option",{value:""},Na("Select an address field")),_.map(ga("address",this.props.wrappers),(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.field_label))))),!_.isEmpty(this.props.state["billing-address"])&&!this.isCountryRequired(this.props.state["billing-address"])&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Ensure the Country option is enabled and required for {{strong}}%(fieldName)s{{/strong}} to process Paypal’s transaction successfully.",{args:{fieldName:this.props.state["billing-address"]},components:{strong:d().createElement("strong",null)}})))))),d().createElement(Yl,mu({},this.props,{settings:this.props.state,value:"false",label:Na("Disable")})))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Shipping Address")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("If you are selling a product that doesn't need to be shipped, you can choose to disable and hide the shipping address fields from the PayPal payment page.")),d().createElement(_l,mu({},this.props,{settings:this.props.state,property:"shipping_address",defaultValue:"disable",noWrapper:!0}),d().createElement("div",{value:"enable"},Na("Enable")),d().createElement("div",{value:"disable"},Na("Disable")))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Language")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("By default, PayPal detects the language for the visitors based on their geolocation and browser preferences. It is recommended to pass this parameter only if you need the PayPal buttons to render in the same language as the rest of your site. {{link}}Supported locale codes.{{/link}}",{components:{link:d().createElement("a",{href:"https://developer.paypal.com/docs/api/reference/locale-codes/#supported-locale-codes",target:"_blank"})}})),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,mu({},this.props,{settings:this.props.state,placeholder:Na("Eg. en_US"),property:"locale"}))))),d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Debug Mode")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("PayPal debug mode helps troubleshoot any issues. However, it's recommended to disable this in production as it causes a significant increase in the script size and performance decrease.")),d().createElement(_l,mu({},this.props,{settings:this.props.state,property:"debug_mode",defaultValue:"disable",noWrapper:!0}),d().createElement("div",{value:"disable"},Na("Disable")),d().createElement("div",{value:"enable"},Na("Enable")))));case"visibility":return d().createElement(xl,this.props);default:return d().createElement("div",null)}}}function fu(){return fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},fu.apply(null,arguments)}class bu extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t={};switch(_.assign(t,forminatorData.variables),e){case"settings":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,fu({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})),d().createElement(Up,fu({},this.props,{settings:this.props.state,label:Na("Hide label"),property:"hide-label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ip,fu({},this.props,{extraId:"html-type",settings:this.props.state,boxClass:"sui-tab-boxed",property:"value",disableMiscData:!1,editorOptions:t,enableAllFormFields:!1,enableAllNonFormFields:!1,allowRepeater:!1,excludeSubFields:!0,enableFormData:!0,enablePostData:!1,enableUpload:"true",allowButtonOnclick:"true",enableParentForm:"true",mainOptionsLabel:Na("Site Information"),mainOptions:{site_title:Na("Site Title"),site_url:Na("Site URL"),date_dmy:Na("Date")},paymentOptions:forminatorData.payment_variables,stripeSubscriptionOptions:forminatorData.stripe_subscription_variables,label:Na("Value")})))));case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},gu.apply(null,arguments)}class yu extends ea.Component{constructor(e){super(e)}getDisabledFields(){let e=["captcha","product","page-break","total","paypal","password"];return!_.isUndefined(this.props.enablePostData)&&this.props.enablePostData&&!_.isUndefined(this.props.enableUpload)&&this.props.enableUpload&&(e=["captcha","product","page-break","total","stripe","stripe-ocs","paypal","password"]),e}getFields(){const e=this.getDisabledFields();return Pa(forminatorData.parentFormFields,e,void 0,void 0,!0)}render(){const{type:e}=this.props;switch(e){case"settings":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(_l,gu({},this.props,{settings:this.props.state,property:"input_label",label:Na("Hide or show input labels")}),d().createElement("span",{value:"true"},Na("Show")),d().createElement("span",{value:"false"},Na("Hide"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,gu({},this.props,{settings:this.props.state,property:"exclusion-field",type:"textarea",placeholder:Na("Enter form fields to remove from PDF."),boxClass:"sui-tab-boxed",label:Na("Form field exclusion"),description:Na("Use the input option to remove specific field(s) from your PDF file."),customClass:"sui-variables-select-text"}),_.map(this.getFields(),(e,t)=>d().createElement("option",{key:t,value:`{${e.element_id}}`,"data-content":e.element_id},ml(e.label)))))));case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function Eu(){return Eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Eu.apply(null,arguments)}class vu extends ea.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this),this.multiFields=[{slug:"payment_amount",label:Na("Price")},{slug:"quantity",label:Na("Quantity")},{slug:"payment_type",label:Na("Payment Type")},{slug:"payment_method",label:Na("Payment Method")},{slug:"transaction_id",label:Na("Transaction/Payment ID")},{slug:"payment_status",label:Na("Payment Status")},{slug:"subtotal",label:Na("Subtotal")},{slug:"tax",label:Na("Tax")},{slug:"total_amount",label:Na("Total Amount")}]}updateProperty(e,t){this.setState({[e]:t})}getNameOptions(){const e=[];return Pa(this.props.wrappers,["page-break","postdata","upload","captcha","date","time","email","consent","gdprcheckbox","password"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}render(){const{type:e}=this.props;switch(e){case"settings":return d().createElement(ea.Fragment,null,d().createElement("div",{id:"pdf-payment-modal",className:"sui-accordion sui-accordion-flushed fui-modal-accordion-flushed"},d().createElement(ll,Eu({},this.props,{label:Na("Product name"),property:"product_name",settings:this.props.state,required:this.props.state.product_name_required}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,Eu({},this.props,{settings:this.props.state,type:"input",property:"product_label",placeholder:Na("Enter label"),defaultValue:Na("Product Name"),label:Na("Label")}),this.getNameOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value},ml(e.label)))),d().createElement(Up,Eu({},this.props,{settings:this.props.state,label:Na("Hide label"),property:"hide-label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ip,Eu({},this.props,{extraId:"html-type",settings:this.props.state,boxClass:"sui-tab-boxed",property:"product_value",disableMiscData:!0,allowRepeater:!1,excludeSubFields:!0,enableFormData:!0,enablePostData:!1,enableUpload:"true",allowButtonOnclick:"true",enableParentForm:"true",mainOptions:[],label:Na("Value"),selectLabel:Na("Insert dynamic data"),tooltipLabel:Na("Add dynamic data")})))))),this.multiFields.map((e,t)=>d().createElement(ll,Eu({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Eu({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),defaultValue:e.label,property:e.slug+"_label"})))))))));case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null)}}}function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},_u.apply(null,arguments)}class wu extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props,{icon:t,size:s,suffix:a,max_rating:r}=this.props.state,i=Math.max(0,Math.min(Math.floor(Number(r)),50)),n=Math.ceil(i/2);switch(e){case"labels":return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,_u({},this.props,{settings:this.props.state,label:Na("Label"),placeholder:Na("Enter label"),property:"field_label"})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,_u({},this.props,{settings:this.props.state,label:Na("Description (optional)"),placeholder:Na("Enter description"),property:"description"})))));case"settings":return d().createElement("div",null,d().createElement(Tl,this.props),d().createElement(Fl,{label:Na("Maximum Rating"),labelDark:!0,description:Na("Specify the maximum rating number."),sidebar:!1},d().createElement(ol,_u({},this.props,{settings:this.props.state,type:"number",isPositive:!0,maxValid:50,maxValidError:Na("Max value should be 50."),placeholder:Na("Enter Maximum Rating"),property:"max_rating",minValue:"0",maxValue:"50",step:"1"}))),d().createElement(Fl,{sidebar:!1},d().createElement("div",{className:"sui-form-field"},d().createElement("div",{style:{display:"flex",justifyContent:"space-between"}},d().createElement("div",null,d().createElement("span",{className:"sui-settings-label sui-dark"},Na("Rating Icon")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Select the style and size of the rating icon."))),d().createElement(Up,_u({},this.props,{label:Na("Show suffix"),property:"suffix",settings:this.props.state,unWrap:!0}))),d().createElement("div",{style:{border:"1px solid #e6e6e6",padding:"30px",borderRadius:"4px"}},d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,_u({},this.props,{property:"icon",defaultValue:"star",settings:this.props.state}),d().createElement("option",{value:"star"},Na("Star")),d().createElement("option",{value:"heart"},Na("Heart")),d().createElement("option",{value:"like"},Na("Thumb")),d().createElement("option",{value:"smile"},Na("Smiley face")))),d().createElement(il,{cols:"6"},d().createElement(kl,_u({},this.props,{property:"size",defaultValue:"md",settings:this.props.state}),d().createElement("option",{value:"sm"},Na("Small - 16px")),d().createElement("option",{value:"md"},Na("Medium - 24px")),d().createElement("option",{value:"lg"},Na("Large - 32px"))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement("div",{className:`forminator-rating-field forminator-rating-preview forminator-rating-size--${s}`},d().createElement("div",{className:"forminator-rating-items"},[...Array(i)].map((e,s)=>d().createElement("span",{key:s,className:`forminator-icon-${t} ${s<n?"forminator-rating-active":""}`,"aria-hidden":"true"})),a&&d().createElement("span",{className:"forminator-rating-suffix"},`(${n}/${i})`)))))))));case"visibility":return d().createElement(xl,this.props);case"styling":return d().createElement(Ol,this.props);default:return d().createElement("div",null,Na("Wrong field type!"))}}}class xu extends ea.Component{constructor(e){super(e)}render(){const{type:e}=this.props;return d().createElement(xl,this.props)}}var Nu={emailSettings:Wl,addressSettings:ep,captchaSettings:op,dateSettings:fp,signatureSettings:gp,consentSettings:Ep,gdprcheckboxSettings:_p,hiddenSettings:Np,htmlSettings:kp,groupSettings:Tp,sliderSettings:Wp,multivalueSettings:ac,nameSettings:oc,numberSettings:pc,paginationSettings:uc,phoneSettings:mc,postdataSettings:vc,sectionSettings:xc,singlevaluesettings:Cc,textSettings:Sc,textareaSettings:Oc,timeSettings:Fc,uploadSettings:Uc,websiteSettings:$c,radioSettings:Rc,calculationSettings:zc,stripeSettings:nu,stripeOCSSettings:lu,currencySettings:cu,passwordSettings:du,paypalSettings:hu,richTextSettings:bu,allFormDataSettings:yu,paymentSettings:vu,ratingSettings:wu,pageBreakSettings:xu};function Cu(){return Cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Cu.apply(null,arguments)}class ku extends ea.Component{constructor(e){super(e);const t=wa(this.props.state);this.settings=t.settings}render(){const e=_.map(this.settings,(e,t)=>{switch(e.type){case"Toggle":return d().createElement(il,{cols:e.size,customClass:e.className,key:t},d().createElement(Up,Cu({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default})));case"Text":return d().createElement(il,{cols:e.size,key:t},d().createElement(ol,Cu({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default})));case"Color":return d().createElement(il,{cols:e.size,key:t},d().createElement(_c,Cu({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default})));case"Select":return d().createElement(il,{cols:e.size,key:t},d().createElement(fl,Cu({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default}),_.map(e.values,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label)))));case"Radio":return d().createElement(il,{cols:e.size,key:t},d().createElement(_l,Cu({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default}),_.map(e.values,(e,t)=>d().createElement(Ql,{value:e.value,key:t},ml(e.label)))));default:return d().createElement("div",null,Na("Unknown setting"))}});return d().createElement("div",{className:"forminator-advanced-settings"},d().createElement(rl,null,e))}}function Su(){return Su=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Su.apply(null,arguments)}const Pu={email:Nu.emailSettings,address:Nu.addressSettings,captcha:Nu.captchaSettings,date:Nu.dateSettings,signature:Nu.signatureSettings,consent:Nu.consentSettings,gdprcheckbox:Nu.gdprcheckboxSettings,hidden:Nu.hiddenSettings,html:Nu.htmlSettings,group:Nu.groupSettings,slider:Nu.sliderSettings,checkbox:Nu.multivalueSettings,radio:Nu.radioSettings,name:Nu.nameSettings,number:Nu.numberSettings,pagination:Nu.paginationSettings,phone:Nu.phoneSettings,postdata:Nu.postdataSettings,section:Nu.sectionSettings,select:Nu.singlevaluesettings,text:Nu.textSettings,textarea:Nu.textareaSettings,time:Nu.timeSettings,upload:Nu.uploadSettings,url:Nu.websiteSettings,calculation:Nu.calculationSettings,stripe:Nu.stripeSettings,"stripe-ocs":Nu.stripeOCSSettings,currency:Nu.currencySettings,password:Nu.passwordSettings,paypal:Nu.paypalSettings,"rich-text":Nu.richTextSettings,"all-form-data":Nu.allFormDataSettings,payment:Nu.paymentSettings,rating:Nu.ratingSettings,"page-break":Nu.pageBreakSettings};class Ou extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.updateProperty=this.updateProperty.bind(this),this.applyChanges=this.applyChanges.bind(this),this.cancelModal=this.cancelModal.bind(this),this.state=Hr()(this.props.modal.modalProps.field)}updateProperty(e,t){this.setState({[e]:t})}componentWillUnmount(){this.props.router.navigate("/builder/")}applyChanges(){const e=Object.assign({},this.props.modal.modalProps.wrapper),t=e.fields.findIndex(e=>e.element_id===this.state.element_id);e.fields=xa(e.fields,t,this.state),this.props.actions.builderActions.updateFieldSettings(e,this.state.element_id),this.closeModal()}getDateDuration(e,t,s,a){return"-"===e?moment().subtract(t,s).format(a):moment().add(t,s).format(a)}isValid(){let e={isValid:!0,error:!1};if("name"===this.state.type||"address"===this.state.type){let t=[];if("name"===this.state.type){if("true"!==this.state.multiple_name)return e.isValid=!0,e;t=["prefix","fname","mname","lname"]}"address"===this.state.type&&(t=["street_address","address_line","address_city","address_state","address_zip","address_country"]);const s=_.filter(t,e=>!!this.state[e]);if(!_.isEmpty(s))return e.isValid=!0,e;e.error=Na("At least one field must be enabled"),e.isValid=!1}if(this.props.modal.modalProps.isValid||(e.error=Na("Please fill required fields"),_.isUndefined(this.props.modal.modalProps.validationError)||_.isEmpty(this.props.modal.modalProps.validationError)||(e.error=this.props.modal.modalProps.validationError),e.isValid=!1),"radio"===this.state.type||"checkbox"===this.state.type||"select"===this.state.type||"postdata"===this.state.type&&!_.isUndefined(this.state.post_custom_fields)&&!0===this.state.post_custom_fields){_.some(this.state.options,function(e){return _.isEmpty(e.calculation)})&&"true"===this.state.calculations&&(e.error=Na("Calculation values are required!"),e.isValid=!1);_.some(this.state.options,function(e){return _.isEmpty(e.label)})&&(e.error=Na("Option labels are required!"),e.isValid=!1)}if("radio"!==this.state.type&&"checkbox"!==this.state.type&&"select"!==this.state.type||0===this.state.options.length&&(e.error=Na("Add one or more options to add this field."),e.isValid=!1),"select"===this.state.type){const t=_.some(this.state.options,function(e){return!_.isUndefined(e.default)&&e.default});this.state.required&&!t&&"single"===this.state.value_type&&_.isEmpty(this.state.placeholder)&&(e.error=Na("Please add a placeholder or select a default option."),e.isValid=!1)}if("postdata"===this.state.type&&(Ia(this.state.post_title)||Ia(this.state.post_content)||Ia(this.state.post_excerpt)||(e.error=Na("At least one of Title, Content, or Excerpt must be enabled for post data to be submitted."),e.isValid=!1)),"stripe"===this.state.type||"stripe-ocs"===this.state.type){forminatorData.hasStripe||(e.error=Na("Please, connect your Stripe account first!"),e.isValid=!1),_.isEmpty(this.state.payments)&&(e.error=Na("You need at least one payment plan!"),e.isValid=!1),"true"!==this.state.receipt||this.state.customer_email||(e.error=Na("Please select an email address for payment receipt."),e.isValid=!1);_.some(this.state.options,function(e){return _.isEmpty(e.label)})&&(e.error=Na("Empty labels are not allowed for meta values!"),e.isValid=!1)}e=$a(e,this.state.payments),"paypal"===this.state.type&&(forminatorData.hasPayPal||(e.error=Na("Please connect your PayPal account first!"),e.isValid=!1),"fixed"!==this.state.amount_type||this.state.amount||(e.error=Na("Please enter PayPal payment amount!"),e.isValid=!1),"variable"!==this.state.amount_type||this.state.variable||(e.error=Na("Please select PayPal payment variable field!"),e.isValid=!1)),"calculation"===this.state.type&&(_.isUndefined(this.state.formula)||_.isEmpty(this.state.formula))&&(e.error=Na("Calculation formula is required!"),e.isValid=!1),"currency"===this.state.type&&parseInt(this.state.limit_min)>=parseInt(this.state.limit_max)&&(e.error=Na("Limit Min value should be less than Max value."),e.isValid=!1),"number"===this.state.type&&parseInt(this.state.limit_min)>=parseInt(this.state.limit_max)&&(e.error=Na("Limit Min value should be less than Max value."),e.isValid=!1);const t=_.isUndefined(this.state.captcha_provider)?"recaptcha":this.state.captcha_provider;if("captcha"===this.state.type&&("recaptcha"===t&&(("v2_checkbox"!==this.state.captcha_type||forminatorData.hasV2Captcha)&&("v2_invisible"!==this.state.captcha_type||forminatorData.hasV2InvisibleCaptcha)&&("v3_recaptcha"!==this.state.captcha_type||forminatorData.hasV3Captcha)||(e.error=Na("Please enter API keys."),e.isValid=!1)),"hcaptcha"===t&&(forminatorData.hasHCaptcha||(e.error=Na("Please enter API keys."),e.isValid=!1)),"turnstile"===t&&(forminatorData.hasTurnstile||(e.error=Na("Please enter API keys."),e.isValid=!1))),"time"===this.state.type&&!_.isUndefined(this.state.restrict_time)&&"specific"===this.state.restrict_time){const t=_.isUndefined(this.state.time_type)?"":this.state.time_type,s="twelve"===t?"h:mma":"H:mm",a=_.isUndefined(this.state.restrict_start_hour)?0:this.state.restrict_start_hour,r=_.isUndefined(this.state.restrict_start_minute)?0:this.state.restrict_start_minute,i=_.isUndefined(this.state.restrict_start_ampm)?"AM":this.state.restrict_start_ampm,n=_.isUndefined(this.state.restrict_end_hour)?0:this.state.restrict_end_hour,o=_.isUndefined(this.state.restrict_end_minute)?0:this.state.restrict_end_minute,l=_.isUndefined(this.state.restrict_end_ampm)?"AM":this.state.restrict_end_ampm,p=_.isUndefined(this.state.default_time)?"none":this.state.default_time,c=_.isUndefined(this.state.default_time_hour)?0:this.state.default_time_hour,u=_.isUndefined(this.state.default_time_minute)?0:this.state.default_time_minute,d=_.isUndefined(this.state.default_time_ampm)?"AM":this.state.default_time_ampm,m="twelve"===t?l:"",h="twelve"===t?d:"",f=a+":"+r+("twelve"===t?i:"").toLowerCase(),b=moment(f,s),g=n+":"+o+m.toLowerCase(),y=moment(g,s),E=moment(c+":"+u+h,s);y.isBefore(b)?(e.error=Na("Please select a valid end time limit."),e.isValid=!1):"default"===p&&(E.isBefore(b)||y.isBefore(E))?(e.error=Na("Please fix the Default time error."),e.isValid=!1):("0:0am"===f&&"0:0pm"===g||"0:0pm"===f&&"0:0am"===g||f===g&&("0:0am"===f||"0:0pm"===f))&&(e.error=Na("Please fix the Start or End time."),e.isValid=!1)}if(_.isUndefined(this.state.conditions)||_.isEmpty(this.state.conditions)||_.isUndefined(this.state.hidden)||Ia(this.state.hidden)||_.each(this.state.conditions,t=>{_.isEmpty(t.rule)&&(e.error=Na("Please select rule"),e.isValid=!1)}),"date"===this.state.type&&!_.isUndefined(this.state["start-date"])&&!_.isUndefined(this.state["end-date"])){const t=this.state["start-date"],s=this.state["end-date"],a="MM/DD/YYYY";let r=!0;if("specific"!==t||"specific"!==s||_.isUndefined(this.state["start-specific-date"])||_.isUndefined(this.state["end-specific-date"])||!moment(this.state["end-specific-date"],a).isBefore(moment(this.state["start-specific-date"],a)))if("today"===t&&"today"===s){const e=_.isUndefined(this.state["start-offset-operator"])?"+":this.state["start-offset-operator"],t=_.isUndefined(this.state["start-offset-value"])?0:parseInt(this.state["start-offset-value"],10),s=_.isUndefined(this.state["start-offset-duration"])?"days":this.state["start-offset-duration"],i=this.getDateDuration(e,t,s,a),n=_.isUndefined(this.state["end-offset-operator"])?"+":this.state["end-offset-operator"],o=_.isUndefined(this.state["end-offset-value"])?0:parseInt(this.state["end-offset-value"],10),l=_.isUndefined(this.state["end-offset-duration"])?"days":this.state["end-offset-duration"],p=this.getDateDuration(n,o,l,a);moment(p,a).isBefore(moment(i,a))&&(r=!1)}else if("specific"!==t||"today"!==s||_.isUndefined(this.state["start-specific-date"])){if("today"===t&&"specific"===s&&!_.isUndefined(this.state["end-specific-date"])){const e=_.isUndefined(this.state["start-offset-operator"])?"+":this.state["start-offset-operator"],t=_.isUndefined(this.state["start-offset-value"])?0:parseInt(this.state["start-offset-value"],10),s=_.isUndefined(this.state["start-offset-duration"])?"days":this.state["start-offset-duration"],i=this.getDateDuration(e,t,s,a);moment(this.state["end-specific-date"],a).isBefore(moment(i,a))&&(r=!1)}}else{const e=_.isUndefined(this.state["end-offset-operator"])?"+":this.state["end-offset-operator"],t=_.isUndefined(this.state["end-offset-value"])?0:parseInt(this.state["end-offset-value"],10),s=_.isUndefined(this.state["end-offset-duration"])?"days":this.state["end-offset-duration"],i=this.getDateDuration(e,t,s,a);moment(i,a).isBefore(moment(this.state["start-specific-date"],a))&&(r=!1)}else r=!1;r||(e.error=Na("Please fix the limit Start or End date."),e.isValid=!1)}return"rating"===this.state.type&&(parseInt(this.state.max_rating)<0?(e.error=Na("Please enter valid number."),e.isValid=!1):parseInt(this.state.max_rating)>50&&(e.error=Na("Maximum Rating value should be less than 50."),e.isValid=!1)),e}cancelModal(){this.closeModal()}render(){const e=wa(this.state),t=Pu[e.type],s=!_.includes(["captcha","paypal","rich-text","all-form-data","payment","page-break"],e.type),a="address"===e.type,r="stripe-ocs"===e.type,i=!_.includes(["submit","hidden","html","page-break"],e.type),n=!_.includes(["captcha","hidden","rich-text","all-form-data","payment"],e.type),o=!_.includes(["page-break","paypal","stripe-ocs"],e.type),l=_.includes(["calculation","number","slider","radio","checkbox","select","currency"],e.type),p=_.includes(["stripe","paypal"],e.type),c=_.includes(["paypal","stripe-ocs"],e.type),u=_.includes(["date"],e.type),m=_.isUndefined(this.state.field_type)?"picker":this.state.field_type,h=this.isValid(),f=h.isValid,b=h.error||"";let g="/builder/labels";s||(g="/builder/settings/");const y=!_.isUndefined(this.state.description)&&!_.isEmpty(this.state.description),E=_.isUndefined(this.props.settings["description-position"])||"above"!==this.props.settings["description-position"]?"below":"above";let v=_.includes(["hidden","group"],e.type)?Na("Customize %s",{args:[e.name]}):Na("Customize %s Field",{args:[e.name]});const w="page-break"===e.type;w&&(v=Na("Customize Page Visibility"));const x=this.props.modal.modalProps.tag||"";return d().createElement(ea.Fragment,null,d().createElement(Yo,{closeType:"icon",closeModal:this.closeModal},d().createElement(Jo,Su({id:this.props.modal.modalProps.id,label:v,disableTooltip:w},"pdf-form"!==this.props.formType&&{tag:x},{icon:e.icon}))),d().createElement("div",{id:"forminator-modal-body--"+e.type,className:"sui-box-body"},d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",Su({role:"tablist",className:"sui-tabs-menu"},"page-break"===e.type?{style:{display:"none"}}:{}),s>0&&d().createElement(wr,{id:"forminator-edit-field-tab-labels",to:"/builder/labels",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Field Labels")),!forminatorData.addonsDisabled&&a&&d().createElement(wr,{id:"forminator-edit-field-tab-geolocation",to:"/builder/geolocation/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},forminatorData.isPro?Na("Geolocation"):Na("Geolocation {{span}}Pro{{/span}}",{components:{span:d().createElement("span",{className:"sui-tag sui-tag-pro"})}})),r&&d().createElement(wr,{id:"forminator-edit-field-tab-products",to:"/builder/products/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item "+(this.props.router.location.pathname.startsWith("/builder/products/stripe")?"active":"")},role:"tab"},Na("Products/Plans")),i>0&&d().createElement(wr,{id:"forminator-edit-field-tab-settings",to:"/builder/settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item "+(this.props.router.location.pathname.startsWith("/builder/settings/stripe")?"active":"")},role:"tab"},"group"===e.type?Na("Repeater"):Na("Settings")),u>0&&"picker"===m&&d().createElement(wr,{id:"forminator-edit-field-tab-limits",to:"/builder/limits/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Limits")),l>0&&d().createElement(wr,{id:"forminator-edit-field-tab-calculations",to:"/builder/calculations/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Calculations")),p&&d().createElement(wr,{id:"forminator-edit-field-tab-advanced-settings",to:"/builder/advanced-settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Advanced")),o>0&&d().createElement(wr,{id:"forminator-edit-field-tab-styling",to:"/builder/styling/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Styling")),c>0&&d().createElement(wr,{id:"forminator-edit-field-tab-customize",to:"/builder/customize/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Customize")),n>0&&d().createElement(wr,{id:"forminator-edit-field-tab-visibility",to:"/builder/visibility/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Visibility")),!_.isEmpty(e.settings)&&d().createElement(wr,{id:"forminator-edit-field-tab-advanced",to:"/builder/advanced/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},Na("Advanced"))),d().createElement(kt,null,d().createElement(Nt,{path:"/builder/",element:d().createElement(xt,{to:g,replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content forminator-modal-body--scrollable active",role:"tabpanel"},d().createElement(kt,null,d().createElement(Nt,{path:"/builder/labels",element:d().createElement(t,{type:"labels",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers,formType:this.props.formType||""})}),d().createElement(Nt,{path:"/builder/products/*",element:d().createElement(t,{type:"products",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),d().createElement(Nt,{path:"/builder/settings/*",element:d().createElement(t,{type:"settings",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers,formType:this.props.formType||"",formDesign:this.props.formDesign||"default"})}),"picker"===m&&d().createElement(Nt,{path:"/builder/limits",element:d().createElement(t,{type:"limits",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),d().createElement(Nt,{path:"/builder/advanced-settings",element:d().createElement(t,{type:"advanced-settings",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),d().createElement(Nt,{path:"/builder/calculations",element:d().createElement(t,{type:"calculations",updateProperty:this.updateProperty,modal:this.props.modal.modalProps,state:this.state,wrappers:this.props.wrappers})}),d().createElement(Nt,{path:"/builder/geolocation",element:d().createElement(t,{type:"geolocation",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),d().createElement(Nt,{path:"/builder/visibility",element:d().createElement(t,{type:"visibility",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),d().createElement(Nt,{path:"/builder/styling",element:d().createElement(t,{type:"styling",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers,descriptionPosition:E,descriptionExist:y})}),d().createElement(Nt,{path:"/builder/advanced",element:d().createElement(ku,Su({},this.props,{updateProperty:this.updateProperty,state:this.state}))}),d().createElement(Nt,{path:"/builder/customize",element:d().createElement(t,{type:"customize",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers,descriptionPosition:E,descriptionExist:y})})))))),d().createElement(Go,{customClass:"sui-content-separated"},d().createElement(Ho,{icon:"close",label:Na("Cancel"),customClass:"sui-button-ghost forminator-discard-field-settings",closeModal:this.closeModal}),f&&d().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Apply")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),!f&&d().createElement("div",{className:"sui-tooltip","data-tooltip":b},d().createElement("button",{className:"sui-button forminator-save-field-settings sui-tooltip",disabled:"disabled","data-tooltip":b},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Apply")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}var Du=Dr(Ou);function Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Fu.apply(null,arguments)}class Au extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.previewLoaded=this.previewLoaded.bind(this)}componentDidMount(){this.$el=jQuery(this.el),this.$body=jQuery(this.body),this.mounted=!0,this.load(),jQuery(document).off("after.load.forminator",this.previewLoaded),jQuery(document).on("after.load.forminator",this.previewLoaded)}componentWillUnmount(){this.mounted=!1,ba("postdata",this.props.wrappers)&&(window.jQuery=window.jQueryFormi)}previewLoaded(){this.$body.find(".sui-notice-loading").remove(),this.$body.find(".sui-notice-style-basic").show()}load(){const e={wrappers:this.props.wrappers,settings:this.props.settings},t={id:this.props.id,action:"forminator_load_form",type:"forminator_forms",nonce:forminatorData.previewNonce,render_id:0,is_preview:1,preview_data:e,last_submit_data:{}};this.$el.forminatorLoader(t)}render(){const e=this.props.settings["form-style"];return d().createElement(ea.Fragment,null,d().createElement(Yo,{canClose:!1,closeModal:this.closeModal},d().createElement(Jo,{label:Na("Preview")}),d().createElement("div",{className:"sui-actions-right"},d().createElement("span",{style:{marginRight:"20px"}},d().createElement(Up,Fu({},this.props,{property:"disable_validations",label:Na("Disable validations"),unWrap:!0}))),d().createElement("button",{className:"sui-button-icon forminator-popup-close","aria-label":Na("Close this dialog window"),onClick:this.closeModal},d().createElement("span",{className:"sui-icon-close sui-md","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Close this dialog window"))))),d().createElement("div",{className:"sui-box-body",ref:e=>this.body=e},d().createElement("div",{role:"alert",className:"sui-notice sui-notice-loading sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-loader sui-loading","aria-hidden":"true"}),d().createElement("p",null,Na("Loading preview…"))))),("basic"===e||"none"===e)&&d().createElement("div",{role:"alert","aria-live":"polite",className:"sui-notice sui-notice-style-basic sui-active","aria-hidden":"true"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"}),d().createElement("p",null,d().createElement("strong",null,Na("Note:"))," ",Na("The form preview doesn't reflect your theme's styles. For the most accurate view, check the form on the actual page or post."))))),d().createElement("form",{ref:e=>this.el=e,id:`forminator-module-${this.props.id}`,"data-forminator-render":"0",className:"sui-hidden"})))}}function Tu(){return Tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Tu.apply(null,arguments)}class Mu extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.updateProperty=this.updateProperty.bind(this),this.applyChanges=this.applyChanges.bind(this),this.state=this.props.settings.submitData||{}}updateProperty(e,t){this.setState({[e]:t})}componentWillUnmount(){this.props.router.navigate("/builder/")}applyChanges(){this.props.actions.settingsActions.updateSetting("submitData",this.state),this.closeModal()}render(){return d().createElement(ea.Fragment,null,d().createElement(Yo,{closeType:"icon",closeModal:this.closeModal},d().createElement(Jo,{label:Na("Customize Submit Button"),icon:"sui-icon-check"})),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",{className:"sui-tabs-menu"},d().createElement(wr,{to:"/builder/labels",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Field Labels")),d().createElement(wr,{to:"/builder/visibility/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Visibility")),d().createElement(wr,{to:"/builder/styling/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Styling"))),d().createElement(kt,null,d().createElement(Nt,{path:"/builder/",element:d().createElement(xt,{to:"/builder/labels",replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content active"},d().createElement(kt,null,d().createElement(Nt,{path:"/builder/labels",element:d().createElement("div",{key:"builder-labels"},d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Tu({},this.props,{settings:this.state,label:Na("Button text"),placeholder:Na("Enter text"),property:"custom-submit-text",updateProperty:this.updateProperty})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Tu({},this.props,{settings:this.state,label:Na("Error message"),placeholder:Na("Enter message"),property:"custom-invalid-form-message",updateProperty:this.updateProperty})))))}),d().createElement(Nt,{path:"/builder/visibility",element:d().createElement(xl,Tu({},this.props,{updateProperty:this.updateProperty,settings:this.state,state:this.state}))}),d().createElement(Nt,{path:"/builder/styling",element:d().createElement(Ol,Tu({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),d().createElement(Go,{alignment:"separated"},d().createElement(Ho,{icon:"close",label:Na("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),d().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Apply")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var ju=Dr(Mu);class Uu extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this)}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"+(forminatorData.showBranding?" sui-spacing-bottom--30":" sui-spacing-bottom--60")},d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}),d().createElement("h3",{className:"sui-box-title sui-lg",id:"dialogTitle"},Na("Publishing form…")),d().createElement("p",{className:"sui-description"},Na("Great work! Please hold tight a few moments while we publish your form to the world."))))}}class Vu extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.closeSettingModal=this.closeSettingModal.bind(this),this.trashField=this.trashField.bind(this)}trashField(){this.props.modal.modalProps.trashField(),this.closeModal(),this.closeNotice()}closeNotice(){const e=ba("stripe",this.props.wrappers)||ba("stripe-ocs",this.props.wrappers),t=ba("paypal",this.props.wrappers);if(e&&!t||t&&!e){jQuery("#forminator-notification").stop().slideUp("slow")}}editSettings(e){const t=JSON.stringify(this.props.wrappers),s=JSON.parse(t).map(t=>(t.fields=t.fields.filter(t=>t.element_id===e.id),t)).filter(e=>!_.isEmpty(e.fields));this.closeModal(),this.props.actions.modalActions.showModal({open:!0,field:e.field.fieldData,wrapper:s[0],closeModal:this.closeSettingModal,isValid:!0},"field-settings")}closeSettingModal(e){this.props.actions.modalActions.showModal({open:!1,field:this.props.field,wrapper:this.props.wrapper},"field-settings")}render(){const e=this,t=t=>{this.closeModal(),setTimeout(function(){e.props.router.navigate("/"+t)},800)},s=(_.isEmpty(this.props.modal.modalProps.field.field_label)?this.props.modal.modalProps.field.element_id:this.props.modal.modalProps.field.field_label,_.filter(this.props.settings,(e,t)=>0===t.indexOf("registration"))),a=ja(this.props.wrappers),r=Pa(this.props.wrappers,[],{},["stripe","stripe-ocs","paypal"]),i=[];if(_.each(a,e=>{(_.isUndefined(e.formula)||!1===e.formula)&&(e.formula=""),e.formula.indexOf("{"+this.props.modal.modalProps.field.element_id+"}")>=0&&i.push({id:e.element_id,label:e.label,field:e,type:e.field_type})}),_.each(r,e=>{let t=!1;"paypal"===e.field_type?"variable"===e.fieldData.amount_type&&e.fieldData.variable===this.props.modal.modalProps.field.element_id&&(t=!0):e.fieldData.payments.map(e=>{const s="subscription"===e.payment_method?e.subscription_amount_type:e.amount_type,a="subscription"===e.payment_method?e.subscription_variable:e.variable;("variable"===s&&a===this.props.modal.modalProps.field.element_id||"subscription"===e.payment_method&&"variable"===e.quantity_type&&e.variable_quantity===this.props.modal.modalProps.field.element_id)&&(t=!0)}),t&&i.push({id:e.element_id,label:e.label,field:e,type:e.field_type})}),_.isEmpty(i)){const e="group"===this.props.modal.modalProps.field.type?Na("Delete Field Group"):Na("Delete Field"),a="group"===this.props.modal.modalProps.field.type?Na("Are you sure you want to delete this group and all the fields it contains?"):Na("Deleting this field {%(name)s} will also remove associated values from existing submissions.",{args:{name:this.props.modal.modalProps.field.element_id}});return d().createElement(ea.Fragment,null,d().createElement(Yo,{flatten:!0,alignment:"center",closeType:"icon",closeModal:this.closeModal,customClass:"sui-spacing-top--60"},d().createElement(Jo,{id:this.props.modal.modalProps.id,label:e,size:"lg"}),d().createElement("p",{id:`modal-desc-${this.props.modal.modalProps.id}`,className:"sui-description"},a),s.length>0&&-1!==s.indexOf(this.props.modal.modalProps.field.element_id)&&d().createElement("p",{className:"sui-description"},Na("Note that this field is mapped in {{link}}Default Meta Keys{{/link}}. If deleted, you will need to remap meta keys {{link}}here{{/link}}.",{components:{link:d().createElement("a",{onClick:()=>t("registration"),style:{cursor:"pointer"}})}}))),d().createElement(Go,{customClass:"sui-flatten sui-content-center"},d().createElement(Ho,{label:Na("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost"}),d().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.trashField},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}if(!_.isEmpty(i)){const e=_.map(i,(e,t)=>{const s=wa(e);return d().createElement("li",{className:"wpmudev-dropdown--option",key:t},d().createElement("i",{className:"fui-list-icon "+s.icon,"aria-hidden":"true"}),d().createElement("span",{className:"fui-list-label"},ml(e.label)),d().createElement("button",{className:"sui-button-icon",onClick:this.editSettings.bind(this,e)},d().createElement("i",{className:"sui-icon-pencil","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Edit Field"))))});return d().createElement(ea.Fragment,null,d().createElement(Yo,{flatten:!0,alignment:"center",closeType:"icon",closeModal:this.closeModal,customClass:"sui-spacing-top--60"},d().createElement(Jo,{id:this.props.modal.modalProps.id,label:Na("Delete Field")}),d().createElement("p",{id:`modal-desc-${this.props.modal.modalProps.id}`,className:"sui-description"},Na("Please remove the references to this field from the following form fields first."))),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Form Fields")),d().createElement("ul",{className:"fui-list-fields"},e))),d().createElement(Go,{flatten:!0,alignment:"center"},d().createElement(Ho,{label:Na("Got It"),closeModal:this.closeModal})))}}}var $u=Dr(Vu);class Iu extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.copyToClipboard=this.copyToClipboard.bind(this)}copyToClipboard(){this.input.select(),document.execCommand("copy");new ta({type:"success",text:Na("Shortcode has been copied successfully."),time:4e3}).open()}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right forminator-cancel-create-form",onClick:this.closeModal}),d().createElement("span",{className:"sui-icon-check sui-lg","aria-hidden":"true"}),d().createElement("h3",{id:"dialogTitle",className:"sui-box-title sui-lg"},Na("Ready to go!")),d().createElement("p",{className:"sui-description"},Na("Your form is now ready to be embedded into a page or template of your choice. Simply copy and paste the shortcode below to display it!"))),d().createElement("div",{className:"sui-box-body"+(forminatorData.showBranding?"":" sui-spacing-bottom--60")},d().createElement("div",{id:"forminator-form-name-input",className:"sui-form-field"},d().createElement("label",{htmlFor:"forminator-form-name",className:"sui-label"},Na("Shortcode")),d().createElement("div",{className:"sui-with-button sui-with-button-icon"},d().createElement("input",{type:"text",defaultValue:`[forminator_form id="${this.props.id}"]`,id:"forminator-form-shortcode",className:"sui-form-control",ref:e=>this.input=e}),d().createElement(sl,{icon:"copy",iconSize:"sm",label:Na("Copy shortcode"),onClick:this.copyToClipboard})))))}}class Ru extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this)}applyPreset(){const{settings:e}=this.props,t=jQuery("#forminator-apply-preset"),s=[forminatorData.currentForm.settings.form_id],a=jQuery("#forminator-field-appearance_preset").val();e.appearance_preset="",t.addClass("sui-button-onload-text");const r={action:"forminator_apply_appearance_preset",_ajax_nonce:forminatorData.modules.ApplyPreset.nonce,edit_form:!0,settings:JSON.stringify(e),preset_id:a,ids:s};po.post(forminatorData.ajaxUrl,uo().stringify(r)).then(e=>{if(e.data.success){this.props.actions.settingsActions.resetSettings(e.data.data),jQuery(".sui-accordion-item--open .sui-accordion-item-header").trigger("click"),this.closeModal();new ta({type:"success",text:Na("Appearance preset successfully applied."),time:4e3}).open()}else{new ta({type:"error",text:e.data.data}).open()}}).catch(e=>{new ta({type:"error",text:Na("Something went wrong. Please try again.")}).open(),console.log(e)}).then(()=>{setTimeout(()=>{t.removeClass("sui-button-onload-text")},1e3)})}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60",style:{paddingBottom:"0"}},d().createElement("button",{className:"sui-button-icon sui-button-float--right forminator-popup-close forminator-cancel-create-form","aria-label":Na("Close this dialog window"),onClick:this.closeModal},d().createElement("span",{className:"sui-icon-close sui-md","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Close this dialog window"))),d().createElement("h3",{className:"sui-box-title sui-lg",id:"dialogTitle"},Na("Apply Appearance preset?")),d().createElement("span",{className:"sui-description",style:{marginTop:"15px"}},Na("Are you sure you want to apply the selected preset to your form? Your current appearance configurations will be overwritten."))),d().createElement("div",{className:"sui-box-footer sui-flatten sui-content-center"},d().createElement("button",{className:"sui-button sui-button-ghost",onClick:this.closeModal},Na("Cancel")),d().createElement("button",{id:"forminator-apply-preset",className:"sui-button sui-button-blue",onClick:()=>this.applyPreset()},d().createElement("span",{className:"sui-button-text-default"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"})," ",Na("Proceed")),d().createElement("span",{className:"sui-button-text-onload"},d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}),Na("Applying preset…")))))}}class Lu extends ea.Component{constructor(e){super(e)}render(){return d().createElement("table",{className:"sui-table fui-table--pagination"},d().createElement("thead",null,d().createElement("tr",null,d().createElement("th",null,Na("Page")),d().createElement("th",null,Na("Previous Button")),d().createElement("th",null,Na("Next Button")))),d().createElement("tbody",null,_.map(this.props.field,(e,t)=>d().createElement("tr",null,d().createElement("td",{className:"sui-table-item-title"},"Page "+(t+1)),d().createElement("td",null,t<=0&&d().createElement("strong",{style:{color:"#888888"}},Na("No Previous button")),t>0&&d().createElement("input",{type:"text",placeholder:Na("Previous"),className:"sui-form-control",value:_.isUndefined(this.props.state[e.element_id+"-previous"])?Na("Previous"):this.props.state[e.element_id+"-previous"],onChange:t=>{this.props.updateProperty(e.element_id+"-previous",t.target.value)}})),d().createElement("td",null,d().createElement("input",{type:"text",placeholder:Na("Next"),className:"sui-form-control",value:_.isUndefined(this.props.state[e.element_id+"-next"])?Na("Next"):this.props.state[e.element_id+"-next"],onChange:t=>{this.props.updateProperty(e.element_id+"-next",t.target.value)}})))),d().createElement("tr",null,d().createElement("td",{className:"sui-table-item-title"},"Page "+(this.props.length+1)),d().createElement("td",null,d().createElement("input",{type:"text",placeholder:Na("Previous"),className:"sui-form-control",value:_.isUndefined(this.props.state["last-previous"])?Na("Previous"):this.props.state["last-previous"],onChange:e=>{this.props.updateProperty("last-previous",e.target.value)}})),d().createElement("td",null,d().createElement("strong",{style:{color:"#888888"}},Na("No Next button"))))))}}function Bu(){return Bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Bu.apply(null,arguments)}class zu extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.updateProperty=this.updateProperty.bind(this),this.applyChanges=this.applyChanges.bind(this),this.state=this.props.settings.paginationData||{},this.fields=Pa(this.props.wrappers,[]),this.fields=_.filter(this.fields,e=>"page-break"===e.field_type)}updateProperty(e,t){this.setState({[e]:t})}componentWillUnmount(){this.props.router.navigate("/builder/")}applyChanges(){this.props.actions.settingsActions.updateSetting("paginationData",this.state),this.closeModal()}render(){const e=this.fields.length;return d().createElement(ea.Fragment,null,d().createElement(Yo,{closeType:"icon",closeModal:this.closeModal},d().createElement(Jo,{label:Na("Customize Pagination Field"),icon:"forminator-icon-pagination"})),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",{className:"sui-tabs-menu"},d().createElement(wr,{to:"/builder/labels",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Field Labels")),d().createElement(wr,{to:"/builder/settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Settings"))),d().createElement(kt,null,d().createElement(Nt,{path:"/builder/",element:d().createElement(xt,{to:"/builder/labels",replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content active"},d().createElement(kt,null,d().createElement(Nt,{path:"/builder/labels",element:d().createElement("div",{key:"builder-labels"},d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement("span",{className:"sui-description"},Na("Your form is divided into multiple pages by Page Break field(s), and you can customize the label of each page here. Page names appear on your form header along with the progress indicator.")))),_.map(this.fields,(e,t)=>d().createElement(rl,{key:e.element_id},d().createElement(il,{cols:"12"},d().createElement(ol,Bu({},this.props,{settings:this.state,label:"Page "+(t+1),defaultValue:"Page "+(t+1),property:e.element_id+"-steps",updateProperty:this.updateProperty}))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,Bu({},this.props,{settings:this.state,label:Na("Finish"),defaultValue:"Finish",property:"last-steps",updateProperty:this.updateProperty})))))}),d().createElement(Nt,{path:"/builder/settings",element:d().createElement("div",{key:"builder-settings"},d().createElement(Fl,null,d().createElement(ql,Bu({},this.props,{settings:this.state,property:"pagination-header-design",settingsLabel:Na("Progress Indicator"),default:"show",description:Na("Choose whether to show a progress indicator on top of your form, so your users know how far they are through your form."),updateProperty:this.updateProperty}),d().createElement(Ql,Bu({},this.props,{value:"show",boxClass:"sui-tab-boxed",label:Na("Show")}),d().createElement(Fl,null,d().createElement(tp,Bu({},this.props,{settings:this.state,defaultValue:"nav",radioClass:"sui-radio-sm",property:"pagination-header",updateProperty:this.updateProperty}),d().createElement("div",{value:"nav",hasImage:!0,image1x:"pagination-steps.png",image2x:"pagination-steps@2x.png"},Na("Steps")),d().createElement("div",{value:"bar",hasImage:!0,image1x:"pagination-progress-bar.png",image2x:"pagination-progress-bar@2x.png"},Na("Progress Bar")))),"bar"===this.state["pagination-header"]&&d().createElement(Fl,null,d().createElement("label",{className:"sui-settings-label"},Na("Progress type")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose how to display progress: as a percentage (e.g., 60%) or by page number (e.g., Page 2 of 5).")),d().createElement(_l,Bu({},this.props,{settings:this.state,property:"progress-bar-type",defaultValue:"progress",updateProperty:this.updateProperty,noWrapper:!0}),d().createElement("div",{value:"progress"},Na("Progress")),d().createElement("div",{value:"page-number"},Na("Page number"))))),d().createElement(Yl,{value:"off"},Na("Hide")))),d().createElement(Fl,null,d().createElement(ql,Bu({},this.props,{settings:this.state,property:"pagination-labels",settingsLabel:Na("Buttons Text"),default:"default",description:Na("Choose whether you want to use default text for the Previous and Next button or use custom text."),updateProperty:this.updateProperty}),d().createElement(Yl,{value:"default"},Na("Default")),d().createElement(Ql,Bu({},this.props,{value:"custom",label:Na("Custom")}),d().createElement(Lu,Bu({},this.props,{field:this.fields,length:e,updateProperty:this.updateProperty,state:this.state}))))))})))))),d().createElement(Go,{alignment:"separated"},d().createElement(Ho,{icon:"close",label:Na("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),d().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Apply")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var Wu=Dr(zu);function Hu(){return Hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Hu.apply(null,arguments)}class qu extends ea.Component{constructor(e){super(e),this.toggleState=this.toggleState.bind(this),this.updateValue=this.updateValue.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateRuleValue=this.updateRuleValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.state={open:!1},this.fields=this.props.fields}removeRule(){this.props.removeRule(this.props.counter)}updateValue(e,t){this.props.updateValue(this.props.counter,t)}updateField(e,t){this.props.updateField(this.props.counter,t)}updateRule(e,t){this.props.updateRule(this.props.counter,t)}updateRuleValue(e){this.props.updateRuleValue(this.props.counter,e.target.value)}updateInputValue(e,t){this.props.updateInputValue(this.props.counter,t)}toggleState(){this.setState({open:!this.state.open})}disableSearch(){return{minimumResultsForSearch:-1}}getEmailOptions(){const e=[];return Pa(this.props.wrappers,["address","captcha","date","consent","gdprcheckbox","html","name","number","slider","page-break","phone","postdata","section","time","upload","website","textarea","text","paypal","stripe","stripe-ocs","currency","calculation","password","rating"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}render(){const e="routing-"+this.props.counter,t=_.filter(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?Na("null"):this.props.rule.value,a=_.isEmpty(this.props.rule.email)?"":this.props.rule.email;return Object.keys(t).length>0&&d().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},d().createElement("h4",{className:"fui-visibility-rule-header"},d().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-sitemap fui-visibility-rule-icon","aria-hidden":"true"}),d().createElement("span",{className:"fui-visibility-rule-text"},Na('Send to {{strong}}"%(label)s"{{/strong}} if {{strong}}%(field)s{{/strong}} %(rule)s {{strong}}%(value)s{{/strong}}',{args:{label:a,field:t.label,rule:Ma(this.props.rule.rule,t.field_type),value:s},components:{strong:d().createElement("strong",null)}})),d().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),d().createElement("div",{role:"region",id:"forminator-field-"+e+"-content",className:"sui-box-body fui-visibility-rule-body","aria-labelledby":"forminator-field-"+e,"aria-hidden":!0!==this.state.open},d().createElement(hc,Hu({},this.props,{property:"email",placeholder:Na("E.g. sales@website.com"),label:Na("Recipients"),settings:this.props.rule,value:this.props.rule.email,required:"true",note:Na("Separate multiple emails with a comma"),onChange:this.updateValue.bind(this)}),this.getEmailOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label)))),d().createElement(rl,{class:"sui-align-bottom sui-spacing-10"},d().createElement(il,{cols:"6",customClass:"sui-padding-right-10"},d().createElement(fl,Hu({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:Na("Routing Condition")}),_.map(this.fields,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id)))),d().createElement(il,{cols:"6",customClass:"sui-padding-left-10"},d().createElement(kl,Hu({key:"visibility-condition-"+ia()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,options:this.disableSearch()}),d().createElement("option",{value:""},Na("Select rule")),"signature"===t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is null")),d().createElement("option",{value:"is_not"},Na("Is not null"))),"signature"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is")),d().createElement("option",{value:"is_not"},Na("Is not"))),(t.isNumber||"rating"===t.field_type)&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is_great"},Na("Is greater than")),d().createElement("option",{value:"is_less"},Na("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"contains"},Na("Contains")),d().createElement("option",{value:"does_not_contain"},Na("Does not contain")),d().createElement("option",{value:"starts"},Na("Starts with")),d().createElement("option",{value:"ends"},Na("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"day_is"},Na("Day is")),d().createElement("option",{value:"day_is_not"},Na("Day is not"))),"date"===t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"month_is"},Na("Month is")),d().createElement("option",{value:"month_is_not"},Na("Month is not")))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},t.hasOptions&&d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},d().createElement("option",{value:""},Na("Select option")),_.map(t.values,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label)))),!t.hasOptions&&"signature"!==t.field_type&&(!["day_is","day_is_not","month_is","month_is_not"].includes(this.props.rule.rule)||"date"!==t.field_type)&&d().createElement(ol,Hu({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,placeholder:Na("Enter value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule==="month_is"||"month_is_not"===this.props.rule.rule)&&d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},d().createElement("option",{value:""},Na("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=>d().createElement("option",{value:e,key:e},e))),!t.hasOptions&&"date"===t.field_type&&("day_is"===this.props.rule.rule||"day_is_not"===this.props.rule.rule)&&d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},d().createElement("option",{value:""},Na("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],e=>d().createElement("option",{value:e,key:e},e))))),d().createElement("div",{className:"fui-visibility-rule-footer"},d().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},Na("Done")))))}}function Qu(){return Qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Qu.apply(null,arguments)}class Yu extends ea.Component{constructor(e){super(e),this.addRule=this.addRule.bind(this),this.removeRule=this.removeRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateRuleValue=this.updateRuleValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.fields=Pa(this.props.wrappers),this.fields=_.filter(this.fields,e=>"stripe"!==e.field_type&&"stripe-ocs"!==e.field_type&&"paypal"!==e.field_type&&"page-break"!==e.field_type&&"pagination"!==e.field_type&&"section"!==e.field_type&&"html"!==e.field_type),this.validateConditions()}updateState(e){this.props.updateProperty("routing",e)}getPropState(){const e=[];return _.each(this.props.state.routing,t=>{const s=Object.assign({},t);e.push(s)}),e}updateField(e,t){const s=this.getPropState();s[e].element_id=t,s[e].rule="is",s[e].value="",this.updateState(s)}updateValue(e,t){const s=this.getPropState();s[e].email=t,this.updateState(s)}updateRule(e,t){const s=this.getPropState();s[e].rule=t,this.updateState(s)}updateRuleValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}updateInputValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}removeRule(e){const t=this.getPropState();t.splice(e,1),this.updateState(t)}addRule(){const e=this.getPropState(),t=_.isUndefined(this.fields[0])?"":this.fields[0].element_id;e.push({email:"",element_id:t,rule:"is",value:""}),this.updateState(e)}validateConditions(){const e=_.map(this.props.state.routing,"element_id"),t=_.map(this.fields,"element_id"),s=_.difference(e,t);_.isUndefined(s)||this.removeCondition(s)}removeCondition(e){const t=this.getPropState(),s=_.filter(t,function(t){return!_.includes(e,t.element_id)});this.updateState(s)}render(){const e=d().createElement("div",{className:"fui-visibility-group"},d().createElement("div",{className:"fui-visibility",style:{marginTop:"0"}},d().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>1)&&!_.isEmpty(this.fields)&&d().createElement("button",{accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Rule")),d().createElement("p",null,Na('You haven\'t defined any email routing rules yet. Click on the "+ Add Rule" button to add the recipients along with the routing rules.')))));return(_.isUndefined(this.props.state.routing)||0===this.props.state.routing.length)&&ea.Fragment,!_.isUndefined(this.props.state.routing)&&this.props.state.routing.length>0&&!_.isEmpty(this.fields)?d().createElement("div",{className:"fui-visibility-group"},d().createElement("div",{className:"fui-visibility",style:{marginTop:"0"}},d().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.routing,(e,t)=>d().createElement(qu,Qu({},this.props,{rule:e,key:t,counter:t,removeRule:this.removeRule,updateValue:this.updateValue,updateField:this.updateField,updateRule:this.updateRule,updateRuleValue:this.updateRuleValue,updateInputValue:this.updateInputValue,fields:this.fields}))))),d().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Rule"))):d().createElement(ea.Fragment,null,e)}}function Gu(){return Gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Gu.apply(null,arguments)}class Ku extends ea.Component{constructor(e){super(e),this.toggleState=this.toggleState.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.state={open:!1},this.fields=this.props.fields}removeRule(){this.props.removeRule(this.props.counter)}updateField(e,t){this.props.updateField(this.props.counter,t)}updateRule(e,t){this.props.updateRule(this.props.counter,t)}updateValue(e){this.props.updateValue(this.props.counter,e.target.value)}updateInputValue(e,t){this.props.updateInputValue(this.props.counter,t)}toggleState(){this.setState({open:!this.state.open})}disableSearch(){return{minimumResultsForSearch:-1}}render(){const e="condition-"+this.props.counter,t=_.filter(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?Na("null"):this.props.rule.value;return Object.keys(t).length>0&&d().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},d().createElement("h4",{className:"fui-visibility-rule-header"},d().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-link fui-visibility-rule-icon","aria-hidden":"true"}),d().createElement("span",{className:"fui-visibility-rule-text"},d().createElement("strong",null,ml(t.label))," ",Ma(this.props.rule.rule,t.field_type)," ",d().createElement("strong",null,s)),d().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),d().createElement("div",{role:"region",id:"forminator-field-"+e+"-content",className:"sui-box-body fui-visibility-rule-body","aria-labelledby":"forminator-field-"+e,"aria-hidden":!0!==this.state.open},d().createElement(fl,Gu({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:Na("Field")}),_.map(this.fields,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,Gu({key:"visibility-condition-"+ia()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,label:Na("Condition (required)"),options:this.disableSearch()}),d().createElement("option",{value:""},Na("Select rule")),"signature"===t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is null")),d().createElement("option",{value:"is_not"},Na("Is not null"))),"signature"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is")),d().createElement("option",{value:"is_not"},Na("Is not"))),(t.isNumber||"rating"===t.field_type)&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is_great"},Na("Is greater than")),d().createElement("option",{value:"is_less"},Na("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"contains"},Na("Contains")),d().createElement("option",{value:"does_not_contain"},Na("Does not contain")),d().createElement("option",{value:"starts"},Na("Starts with")),d().createElement("option",{value:"ends"},Na("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"day_is"},Na("Day is")),d().createElement("option",{value:"day_is_not"},Na("Day is not"))),"date"===t.field_type&&"signature"!==t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"month_is"},Na("Month is")),d().createElement("option",{value:"month_is_not"},Na("Month is not"))))),d().createElement(il,{cols:"6"},d().createElement(ea.Fragment,null,t.hasOptions&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select option")),_.map(t.values,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label))))),!t.hasOptions&&"signature"!==t.field_type&&(!["day_is","day_is_not","month_is","month_is_not"].includes(this.props.rule.rule)||"date"!==t.field_type)&&d().createElement(ol,Gu({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule==="month_is"||"month_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=>d().createElement("option",{value:e,key:e},e)))),!t.hasOptions&&"date"===t.field_type&&("day_is"===this.props.rule.rule||"day_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],e=>d().createElement("option",{value:e,key:e},e))))))),d().createElement("div",{className:"fui-visibility-rule-footer"},d().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},Na("Done")))))}}function Ju(){return Ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ju.apply(null,arguments)}class Zu extends ea.Component{constructor(e){super(e),this.addRule=this.addRule.bind(this),this.removeRule=this.removeRule.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.fields=Pa(this.props.wrappers),this.fields=_.filter(this.fields,e=>"stripe"!==e.field_type&&"stripe-ocs"!==e.field_type&&"paypal"!==e.field_type&&"page-break"!==e.field_type&&"pagination"!==e.field_type&&"section"!==e.field_type&&"html"!==e.field_type),this.validateConditions()}updateState(e){this.props.updateProperty("conditions",e)}getPropState(){const e=[];return _.each(this.props.state.conditions,t=>{const s=Object.assign({},t);e.push(s)}),e}updateField(e,t){const s=this.getPropState();s[e].element_id=t,s[e].rule="is",s[e].value="",this.updateState(s)}updateRule(e,t){const s=this.getPropState();s[e].rule=t,this.updateState(s)}updateValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}updateInputValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}removeRule(e){const t=this.getPropState();t.splice(e,1),this.updateState(t)}addRule(){const e=this.getPropState(),t=_.isUndefined(this.fields[0])?"":this.fields[0].element_id;e.push({element_id:t,rule:"is",value:""}),this.updateState(e)}validateConditions(){const e=_.map(this.props.state.conditions,"element_id"),t=_.map(this.fields,"element_id"),s=_.difference(e,t);_.isUndefined(s)||this.removeCondition(s)}removeCondition(e){const t=this.getPropState(),s=_.filter(t,function(t){return!_.includes(e,t.element_id)});this.updateState(s)}render(){const e=d().createElement("div",{className:"fui-visibility-options"},d().createElement("div",{className:"fui-visibility-option"},d().createElement(_l,Ju({},this.props,{settings:this.props.state,property:"condition_action",defaultValue:"send",noWrapper:!0}),d().createElement("span",{value:"send"},Na("Send")),d().createElement("span",{value:"dont-send"},Na("Don't Send"))),d().createElement("span",{className:"sui-description"},Na("this email if"))),d().createElement("div",{className:"fui-visibility-option"},d().createElement(_l,Ju({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),d().createElement("span",{value:"all"},Na("All")),d().createElement("span",{value:"any"},Na("Any"))),d().createElement("span",{className:"sui-description"},Na("of the following rules match:")))),t=d().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&d().createElement("div",{className:"fui-visibility-header"},e,d().createElement("label",{className:"sui-label"},Na("Conditions"))),d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&d().createElement("button",{accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Conditions")),d().createElement("p",null,Na("By default, this email is always sent on form submission. You can add conditions to send this email conditionally based on user input.")))));return(_.isUndefined(this.props.state.conditions)||0===this.props.state.conditions.length)&&ea.Fragment,!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0&&!_.isEmpty(this.fields)?d().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>1)&&d().createElement("div",{className:"fui-visibility-header"},e,d().createElement("label",{className:"sui-label"},Na("Conditions"))),d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,(e,t)=>d().createElement(Ku,Ju({},this.props,{rule:e,key:t,counter:t,removeRule:this.removeRule,updateField:this.updateField,updateRule:this.updateRule,updateValue:this.updateValue,updateInputValue:this.updateInputValue,fields:this.fields}))))),d().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Rule"))):d().createElement(ea.Fragment,null,t)}}class Xu extends ea.Component{constructor(e){super(e)}render(){const e=this.props.color,t=Ia(forminatorData.userPermissions.manage_forminator_addons)||Ia(forminatorData.userPermissions.manage_options);return d().createElement("div",{role:"alert",className:`sui-notice sui-notice-${e} sui-active`,style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,this.props.text),t&&d().createElement("p",null,d().createElement("a",{className:`sui-button sui-button-${e}`,href:this.props.buttonUrl,target:"_blank"},this.props.buttonText)))))}}class ed extends ea.Component{constructor(e){super(e),this.goToSection=this.goToSection.bind(this)}goToSection(e){this.props.modal.modalProps.closeModal(),setTimeout(()=>{this.props.router.navigate("/"+e)},700)}render(){return d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("No PDF file available for this form yet. Go to the {{link}}PDF tab{{/link}} to create one.",{components:{link:d().createElement("a",{onClick:()=>this.goToSection("pdf"),href:"#"})}})))))}}var td=Dr(ed);class sd extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this),this.getCheckedPdfs=this.getCheckedPdfs.bind(this),this.state={pdfsChecked:_.isUndefined(this.props.settings["email-pdfs"])?[]:this.getCheckedPdfs()}}getCheckedPdfs(){const e=this.props.pdfs.map(e=>e.pdfId.toString()),t=this.props.settings["email-pdfs"].filter(t=>{if(e.includes(t))return t});return t}updateValue(e,t){let s=this.state.pdfsChecked;t=String(t),s=e.target.checked?_.union(s,[t]):_.without(s,t),this.props.updateProperty(this.props.property,s),this.setState({pdfsChecked:s})}render(){const e=this.props.pdfs,t=this.state.pdfsChecked,s=forminatorData.pdfExtensionsEnabled;return d().createElement("div",{className:"sui-form-field"},e.map((e,a)=>d().createElement("label",{htmlFor:`forminator-pdf-${e.pdfId}`,className:"sui-checkbox sui-checkbox-stacked",key:`forminator-pdf-${e.pdfId}-${ia()}`,disabled:s?"":"disabled"},d().createElement("input",{disabled:s?"":"disabled",type:"checkbox",id:`forminator-pdf-${e.pdfId}`,"aria-labelledby":`label-pdf-${e.pdfId}`,checked:_.includes(t,String(e.pdfId))&&s?"checked":"",onChange:t=>{this.updateValue(t,e.pdfId)}}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",{id:`label-pdf-${e.pdfId}`},e.pdfFilename+".pdf"))))}}function ad(){return ad=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},ad.apply(null,arguments)}class rd extends ea.Component{constructor(e){super(e)}render(){const e=forminatorData.isPro,t=forminatorData.pdfAddonActive,s=d().createElement(Xu,ad({},this.props,{text:e?Na("The {{strong}}Forminator PDF Generator Add-on{{/strong}} is required to use the PDF generator feature. Install it from the Add-ons page.",{components:{strong:d().createElement("strong",null)}}):Na("Generate and send PDF files (e.g. forms entries, receipts, invoices, quotations) to users after form submission."),buttonText:e?Na("Get the Add-on"):Na("Upgrade to PRO{{icon/}}",{components:{icon:d().createElement("span",{className:"sui-icon-open-new-window sui-sm","aria-hidden":"true",style:{margin:0}})}}),buttonUrl:e?forminatorData.addonsUrl:"https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-builder_email-notification_pdf-addon",color:e?"blue":"purple"}));let a;return a=e?t?_.isEmpty(this.props.pdfs)?d().createElement("div",{className:"sui-border-frame",style:{marginTop:"0"}},d().createElement(td,this.props)):d().createElement("div",{className:"sui-border-frame"},d().createElement(sd,ad({},this.props,{pdfs:this.props.pdfs}))):d().createElement("div",{className:"sui-border-frame"},s):s,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{htmlFor:"forminator-field-email-pdf-attachment",className:"sui-label"},Na("PDF Attachments"),!e&&d().createElement("span",{className:"sui-tag sui-tag-pro"},Na("Pro"))),d().createElement("span",{className:"sui-description",style:{padding:"5px 0 7px"}},Na("Select PDF file(s) to attach to this email notification.")),a)))}}function id(){return id=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},id.apply(null,arguments)}class nd extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.updateProperty=this.updateProperty.bind(this),this.applyChanges=this.applyChanges.bind(this),this.data=Object.assign({},this.props.modal.modalProps),this.state=this.data.notification}updateProperty(e,t){this.setState({[e]:t})}componentWillUnmount(){this.props.router.navigate("/notifications/")}getNameOptions(){const e=[];return Pa(this.props.wrappers,["page-break","postdata","upload","captcha","email","consent","gdprcheckbox","password"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}getEmailOptions(){const e=[];return Pa(this.props.wrappers,["address","captcha","date","consent","gdprcheckbox","html","name","number","slider","page-break","phone","postdata","section","time","upload","website","textarea","text","paypal","stripe","stripe-ocs","currency","calculation","password","signature","rating"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}getRecipientAddressesOptions(){const e=this.getEmailOptions(),t=[];return e.map(e=>{t.push({id:e.value,text:e.label})}),t}getRecipientTagsOptions(){const e=this.getRecipientAddressesOptions();return{tags:!0,tokenSeparators:[","," "],language:{searching:function(){return Na("Searching")},noResults:function(){return Na("No Result Found")}},placeholder:Na("Recipient(s)"),ajax:{url:forminatorData.ajaxUrl,type:"POST",delay:350,data:function(e){return{action:"forminator_builder_search_emails",_wpnonce:forminatorData.searchNonce,q:e.term,permission:"forminator"}},processResults:function(t){return{results:e.concat(t.data)}},cache:!0},templateResult:function(e){return _.isUndefined(e.id)||_.isUndefined(e.text)||_.isUndefined(e.display_name)?e.text:jQuery("<span><b>"+e.text+"</b> - <small>"+e.display_name+"</small></span>")},createTag:function(e){const t=e.term.trim();return function(e){if(e.length<6)return!1;if(e.indexOf("@",1)<0)return!1;const t=e.split("@",2);if(!t[0].match(/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~\.-]+$/))return!1;if(t[1].match(/\.{2,}/))return!1;const s=t[1].split(".");if(s.length<2)return!1;const a=s.length;for(let e=0;e<a;e++)if(!s[e].match(/^[a-z0-9-]+$/i))return!1;return!0}(t)?{id:t,text:t}:null}}}applyChanges(){if(this.data.new){const e=Object.assign({},this.state),t=[...this.data.notifications,e];this.props.actions.notificationsActions.updateNotifications(t)}this.data.new||this.props.actions.notificationsActions.updateNotification(this.state),this.closeModal()}render(){const e=_.isUndefined(this.state["email-recipients"])?"default":this.state["email-recipients"],t=ba("upload",this.props.wrappers),s=_.isUndefined(this.state.type)?"default":this.state.type;let a=!0,r="",i={};"default"===e&&_.isEmpty(this.state.recipients)&&(a=!1,r=Na("Please enter recipients")),"routing"===e&&(_.isUndefined(this.state.routing)||_.isEmpty(this.state.routing)?(r=Na("Please add email routing"),a=!1):_.each(this.state.routing,e=>{_.isEmpty(e.email)&&(r=Na("Please enter recipients"),a=!1),_.isEmpty(e.rule)&&(r=Na("Please select rule"),a=!1)}));let n="",o="email-subject",l="email-editor";if("registration"===this.props.formType)switch(n=_.isUndefined(this.props.settings["activation-method"])?"":this.props.settings["activation-method"],n){case"email":o="email-subject-method-email",l="email-editor-method-email";break;case"manual":o="email-subject-method-manual",l="email-editor-method-manual";break;default:o="email-subject",l="email-editor"}return(_.isUndefined(this.state[l])||_.isEmpty(this.state[l]))&&(a=!1,r=Na("Please fix the error(s) in the EMAIL tab.")),(_.isUndefined(this.state[o])||_.isEmpty(this.state[o]))&&(a=!1,r=Na("Please fix the error(s) in the EMAIL tab.")),_.isEmpty(this.state["form-email"])||(i={display:"block"}),d().createElement(ea.Fragment,null,d().createElement(Yo,{closeType:"icon",closeModal:this.closeModal,customClass:"forminator-builder-fields-close"},d().createElement(Jo,{id:"",label:Na("Add Email Notification")})),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",{className:"sui-tabs-menu"},d().createElement(wr,{to:"/notifications/email/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Email")),"save_draft"!==s&&d().createElement(wr,{to:"/notifications/recipients/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Recipients")),d().createElement(wr,{to:"/notifications/advanced/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Advanced")),"save_draft"!==s&&d().createElement(wr,{to:"/notifications/conditions/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Conditions"))),d().createElement(kt,null,d().createElement(Nt,{path:"/notifications/",element:d().createElement(xt,{to:"/notifications/email/",replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content active"},d().createElement(kt,null,d().createElement(Nt,{path:"/notifications/email",element:d().createElement("div",{key:"notifications-email"},d().createElement(rl,{key:"index-1"},d().createElement(il,{cols:"12"},d().createElement(ol,id({},this.props,{settings:this.state,label:Na("Label"),description:Na("The label is to help you identify this email and won't appear anywhere in the email."),placeholder:Na("E.g. Sales Team Notification"),property:"label",updateProperty:this.updateProperty})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,id({},this.props,{settings:this.state,property:o,placeholder:Na("E.g. New Form Submission"),label:Na("Subject"),required:"true",isRequired:"true",requiredError:Na("Email subject can't be empty"),updateProperty:this.updateProperty}),this.getNameOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label)))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ip,id({},this.props,{settings:this.state,property:l,extraId:"email-editor",editorOptions:forminatorData.variables,paymentOptions:forminatorData.payment_variables,stripeSubscriptionOptions:forminatorData.stripe_subscription_variables,enableFormData:"true",enableAllFormFields:"true",enableAllNonFormFields:"true",enablePostData:"true",enableUpload:"true",wrappers:this.props.wrappers,boxClass:"sui-tab-boxed",label:Na("Body"),isRequired:"true",requiredError:Na("Email body can't be empty"),updateProperty:this.updateProperty})))),t&&d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(_l,id({},this.props,{settings:this.state,property:"email-attachment",defaultValue:"false",label:Na("Attachments"),description:Na("Choose whether you want to attach the files uploaded via the File Upload fields to this email."),updateProperty:this.updateProperty}),d().createElement("div",{value:"false"},Na("None")),d().createElement("div",{value:"true"},Na("Uploaded files"))))),!forminatorData.addonsDisabled&&"save_draft"!==s&&d().createElement(rd,id({},this.props,{settings:this.state,property:"email-pdfs",updateProperty:this.updateProperty})))}),d().createElement(Nt,{path:"/notifications/recipients",element:d().createElement("div",{key:"notifications-recipients"},d().createElement("span",{className:"sui-description",style:{marginTop:"0",marginBottom:"10px"}},Na("The default behavior is to send the email to the same recipients. If you want to send this email to different recipients conditionally, you can enable the email routing and change the recipients of this email based on the user input.")),d().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},d().createElement(ql,id({},this.props,{property:"email-recipients",default:"default",settings:this.state,updateProperty:this.updateProperty,simple:!0}),d().createElement(Ql,id({},this.props,{value:"default",label:Na("Default"),boxClass:"sui-tab-boxed"}),d().createElement(hc,id({},this.props,{settings:this.state,property:"recipients",placeholder:Na("E.g. sales@website.com"),label:Na("Recipients"),required:"true",type:"textarea",updateProperty:this.updateProperty,note:Na("(Separate multiple emails with a comma)"),customClass:"sui-variables-select-text"}),this.getEmailOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label))))),d().createElement(Ql,id({},this.props,{value:"routing",label:Na("Email Routing")}),d().createElement(Yu,id({},this.props,{updateProperty:this.updateProperty,state:this.state}))))))}),d().createElement(Nt,{path:"/notifications/advanced",element:d().createElement("div",{key:"notifications-advanced"},d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,id({},this.props,{settings:this.state,property:"from-name",placeholder:Na("Enter from name here"),label:Na("From Name"),updateProperty:this.updateProperty}),this.getNameOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value},ml(e.label)))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,id({},this.props,{settings:this.state,property:"form-email",placeholder:Na("Enter from email here"),label:Na("From Email"),updateProperty:this.updateProperty}),this.getEmailOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label)))),d().createElement("div",{role:"alert",className:`sui-notice sui-notice-blue${!_.isEmpty(this.state["form-email"])&&" sui-active"}`,"aria-live":"assertive",style:i},!_.isEmpty(this.state["form-email"])&&d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na('Some hosts do not allow "from email" to be overridden or replaced due to spam issues.'))))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,id({},this.props,{settings:this.state,property:"replyto-email",placeholder:Na("Enter reply-to email here"),label:Na("Reply-to Email"),updateProperty:this.updateProperty}),this.getEmailOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label)))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,id({},this.props,{settings:this.state,property:"cc-email",placeholder:Na("Enter CC email here"),label:Na("CC Emails"),updateProperty:this.updateProperty}),this.getEmailOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label)))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,id({},this.props,{settings:this.state,property:"bcc-email",placeholder:Na("Enter BCC email here"),label:Na("BCC Emails"),updateProperty:this.updateProperty}),this.getEmailOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label)))))))}),d().createElement(Nt,{path:"/notifications/conditions",element:d().createElement(Zu,id({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),d().createElement(Go,{alignment:"separated"},d().createElement(Ho,{icon:"close",label:Na("Cancel"),closeModal:this.closeModal}),a&&d().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Add")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),!a&&d().createElement("div",{className:"sui-tooltip","data-tooltip":r},d().createElement("button",{className:"sui-button forminator-save-field-settings sui-tooltip",disabled:"disabled","data-tooltip":r},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Add")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}var od=Dr(nd);function ld(){return ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},ld.apply(null,arguments)}class pd extends ea.Component{constructor(e){super(e),this.toggleState=this.toggleState.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.state={open:!1},this.fields=this.props.fields}removeRule(){this.props.removeRule(this.props.counter)}updateField(e,t){this.props.updateField(this.props.counter,t)}updateRule(e,t){this.props.updateRule(this.props.counter,t)}updateValue(e){this.props.updateValue(this.props.counter,e.target.value)}updateInputValue(e,t){this.props.updateInputValue(this.props.counter,t)}toggleState(){this.setState({open:!this.state.open})}render(){const e="condition-"+this.props.counter,t=_.filter(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?Na("null"):this.props.rule.value,a="consent"===t.field_type;return a&&(this.props.rule.value=Na("checked")),Object.keys(t).length>0&&d().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},d().createElement("h4",{className:"fui-visibility-rule-header"},d().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},d().createElement("span",{className:"sui-icon-link fui-visibility-rule-icon","aria-hidden":"true"}),d().createElement("span",{className:"fui-visibility-rule-text"},d().createElement("strong",null,ml(t.label))," ",Ma(this.props.rule.rule,t.field_type)," ",d().createElement("strong",null,s)),d().createElement("span",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),d().createElement("div",{role:"region",id:"forminator-field-"+e+"-content",className:"sui-box-body fui-visibility-rule-body","aria-labelledby":"forminator-field-"+e,"aria-hidden":!0!==this.state.open},d().createElement(kl,ld({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:Na("Field"),hasSearch:!0}),_.map(this.fields,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,ld({key:"visibility-condition-"+ia()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,label:Na("Condition (required)"),"data-placeholder":Na("Select rule"),hasSearch:!0}),d().createElement("option",null),"signature"===t.field_type&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is null")),d().createElement("option",{value:"is_not"},Na("Is not null"))),"signature"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is")),d().createElement("option",{value:"is_not"},Na("Is not"))),(t.isNumber||"rating"===t.field_type)&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is_great"},Na("Is greater than")),d().createElement("option",{value:"is_less"},Na("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"contains"},Na("Contains")),d().createElement("option",{value:"does_not_contain"},Na("Does not contain")),d().createElement("option",{value:"starts"},Na("Starts with")),d().createElement("option",{value:"ends"},Na("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"day_is"},Na("Day is")),d().createElement("option",{value:"day_is_not"},Na("Day is not"))),"date"===t.field_type&&"signature"!==t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"month_is"},Na("Month is")),d().createElement("option",{value:"month_is_not"},Na("Month is not"))))),d().createElement(il,{cols:"6"},d().createElement(ea.Fragment,null,t.hasOptions&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select option")),_.map(t.values,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label))))),!t.hasOptions&&a&&d().createElement(ol,ld({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Status"),disabled:!0})),!t.hasOptions&&"signature"!==t.field_type&&!a&&(!["day_is","day_is_not","month_is","month_is_not"].includes(this.props.rule.rule)||"date"!==t.field_type)&&d().createElement(ol,ld({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule||"month_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=>d().createElement("option",{value:e,key:e},e)))),!t.hasOptions&&"date"===t.field_type&&("day_is"===this.props.rule.rule||"day_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],e=>d().createElement("option",{value:e,key:e},e))))))),d().createElement("div",{className:"fui-visibility-rule-footer"},d().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},Na("Done")))))}}function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},cd.apply(null,arguments)}class ud extends ea.Component{constructor(e){super(e),this.addRule=this.addRule.bind(this),this.removeRule=this.removeRule.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.fields=Pa(this.props.wrappers),this.fields=_.filter(this.fields,e=>"stripe"!==e.field_type&&"stripe-ocs"!==e.field_type&&"paypal"!==e.field_type&&"page-break"!==e.field_type&&"pagination"!==e.field_type&&"section"!==e.field_type&&"html"!==e.field_type),this.validateConditions()}updateState(e){this.props.updateProperty("conditions",e)}getPropState(){const e=[];return _.each(this.props.state.conditions,t=>{const s=Object.assign({},t);e.push(s)}),e}updateField(e,t){const s=this.getPropState();s[e].element_id=t,s[e].rule="is",s[e].value="",this.updateState(s)}updateRule(e,t){const s=this.getPropState();s[e].rule=t,this.updateState(s)}updateValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}updateInputValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}removeRule(e){const t=this.getPropState();t.splice(e,1),this.updateState(t)}addRule(){const e=this.getPropState(),t=_.isUndefined(this.fields[0])?"":this.fields[0].element_id;e.push({element_id:t,rule:"is",value:""}),this.updateState(e)}validateConditions(){const e=_.pluck(this.props.state.conditions,"element_id"),t=_.pluck(this.fields,"element_id"),s=_.difference(e,t);_.isUndefined(s)||this.removeCondition(s)}removeCondition(e){const t=this.getPropState(),s=_.filter(t,function(t){return!_.includes(e,t.element_id)});this.updateState(s)}render(){const e=d().createElement("div",{className:"fui-visibility-options"},d().createElement("div",{className:"fui-visibility-option"},d().createElement("span",{className:"sui-description",style:{marginRight:"10px"}},Na("Process behavior if ")),d().createElement(_l,cd({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),d().createElement("span",{value:"all"},Na("All")),d().createElement("span",{value:"any"},Na("Any"))),d().createElement("span",{className:"sui-description"},Na("of the conditions below match.")))),t=d().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&d().createElement("div",{className:"fui-visibility-header"},e,d().createElement("label",{className:"sui-label"},Na("Conditions"))),d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&d().createElement("button",{accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Conditions")),d().createElement("p",null,Na("Add conditions for when this behavior will be processed.")))));return(_.isUndefined(this.props.state.conditions)||0===this.props.state.conditions.length)&&ea.Fragment,!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0&&!_.isEmpty(this.fields)?d().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>1)&&d().createElement("div",{className:"fui-visibility-header"},e,d().createElement("label",{className:"sui-label"},Na("Conditions"))),d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,(e,t)=>d().createElement(pd,cd({},this.props,{rule:e,key:t,counter:t,removeRule:this.removeRule,updateField:this.updateField,updateRule:this.updateRule,updateValue:this.updateValue,updateInputValue:this.updateInputValue,fields:this.fields}))))),d().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Condition"))):d().createElement(ea.Fragment,null,t)}}function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},dd.apply(null,arguments)}class md extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.updateProperty=this.updateProperty.bind(this),this.applyChanges=this.applyChanges.bind(this),this.data=Object.assign({},this.props.modal.modalProps),this.state=this.data.behavior}updateProperty(e,t){this.setState({[e]:t})}componentWillUnmount(){this.props.router.navigate("/behaviour/")}applyChanges(){if(this.data.new){const e=Object.assign({},this.state),t=[...this.data.behaviors,e];this.props.actions.behaviorsActions.updateBehaviorArray(t)}this.data.new||this.props.actions.behaviorsActions.updateBehavior(this.state),this.closeModal()}getNameOptions(){const e=[];return Pa(this.props.wrappers,["page-break","postdata","upload","captcha","gdprcheckbox","password"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}render(){const e=_.isUndefined(this.props.settings["activation-method"])?"":this.props.settings["activation-method"],t={};_.assign(t,forminatorData.variables),delete t.submission_id;let s="thankyou-message",a=ua(),r=Object.values(a),i=Object.keys(a);return"email"!==e&&"manual"!==e||(s=e+"-"+s),d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-box-header"},d().createElement("h3",{id:"dialogTitle",className:"sui-box-title"},Na("After Submission")),d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"forminator-builder-fields-close",onClick:this.closeModal}))),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",{className:"sui-tabs-menu"},d().createElement(wr,{to:"/behaviour/behavior",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Behavior")),d().createElement(wr,{to:"/behaviour/conditions/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Conditions"))),d().createElement(kt,null,d().createElement(Nt,{path:"/behaviour/",element:d().createElement(xt,{to:"/behaviour/behavior",replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content active"},d().createElement(kt,null,d().createElement(Nt,{path:"/behaviour/behavior",element:d().createElement("div",{key:"behaviour-behaviour"},d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,dd({},this.props,{settings:this.state,label:Na("Label"),description:Na("Only used to identify this behavior, and not displayed to users."),placeholder:Na("E.g., Inline Message"),property:"label",updateProperty:this.updateProperty})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ql,dd({},this.props,{settings:this.state,updateProperty:this.updateProperty,property:"submission-behaviour",label:Na("Behavior"),default:i[0]}),d().createElement(Ql,{value:i[0],boxClass:"sui-tab-boxed",label:r[0]},d().createElement(ip,dd({},this.props,{settings:this.state,updateProperty:this.updateProperty,property:s,ariaLabel:Na("Success message editor"),descriptionTop:Na("Display an inline success message to the user after the form is submitted."),editorOptions:t,paymentOptions:forminatorData.payment_variables,stripeSubscriptionOptions:forminatorData.stripe_subscription_variables,cutomTinymce:"bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link",enableFormData:"true"}),r[0]),d().createElement("div",{className:"sui-form-field"},d().createElement("div",{style:{display:"inline-block"}},d().createElement(pp,dd({},this.props,{property:"autoclose",settings:this.state,updateProperty:this.updateProperty,defaultValue:"true",itemClass:"sui-checkbox-stacked sui-checkbox-sm",ariaLabel:Na("Enable auto-close after success message")}))),d().createElement("span",{className:"sui-field-prefix sui-field-suffix",style:{fontWeight:"500",fontSize:"13px"}},Na("Auto-close success message after")),d().createElement(ol,dd({},this.props,{property:"autoclose-time",settings:this.state,updateProperty:this.updateProperty,placeholder:Na("E.g. 5"),inputClass:"sui-input-sm sui-field-has-suffix",disabled:!this.state.autoclose,simple:!0,ariaLabel:Na("Seconds for auto-close")})),d().createElement("span",{className:"sui-field-suffix",style:{fontWeight:"500",fontSize:"13px"}},Na("seconds.")))),d().createElement(Ql,{value:i[1],boxClass:"sui-tab-boxed",label:r[1]},d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,dd({},this.props,{placeholder:Na("https://www.mywebsite.com"),property:"redirect-url",settings:this.state,updateProperty:this.updateProperty,label:Na("Redirect URL"),boxClass:"sui-tab-boxed",customClass:"redirect-url",description:Na("Provide the absolute URL of the page you want to redirect users to after submitting the login form. For example, to redirect users to the WordPress admin, use the URL  {{strong}}http://www.website.com/wp-admin/{{/strong}}.",{components:{strong:d().createElement("strong",null)}})}),this.getNameOptions().map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label)))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(fl,dd({},this.props,{property:"newtab",settings:this.state,updateProperty:this.updateProperty,label:Na("Redirection Option"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}),d().createElement("option",{value:"sametab"},Na("Redirect on the same tab")),d().createElement("option",{value:"newtab_thankyou"},Na("Redirect on new tab and show thank you message on form page")),d().createElement("option",{value:"newtab_hide"},Na("Redirect on new tab and hide form on the form page")))))),d().createElement(Ql,{value:i[2],boxClass:"sui-tab-boxed",label:r[2]},d().createElement(ip,dd({},this.props,{property:s,settings:this.state,updateProperty:this.updateProperty,extraId:"-hide",ariaLabel:Na("Success message editor"),descriptionTop:Na("Hide the form after submission, and display a success message to the user."),editorOptions:t,enableFormData:"true"}),Na("Submit Message")),d().createElement("div",{className:"sui-form-field"},d().createElement("div",{style:{display:"inline-block"}},d().createElement(pp,dd({},this.props,{property:"autoclose",settings:this.state,updateProperty:this.updateProperty,defaultValue:"true",itemClass:"sui-checkbox-stacked sui-checkbox-sm",ariaLabel:Na("Enable auto-close after success message")}))),d().createElement("span",{className:"sui-field-prefix sui-field-suffix",style:{fontWeight:"500",fontSize:"13px"}},Na("Auto-close success message after")),d().createElement(ol,dd({},this.props,{property:"autoclose-time",settings:this.state,updateProperty:this.updateProperty,defaultValue:"5",placeholder:Na("E.g. 5"),inputClass:"sui-input-sm sui-field-has-suffix",disabled:!this.state.autoclose,simple:!0,ariaLabel:Na("Seconds for auto-close")})),d().createElement("span",{className:"sui-field-suffix",style:{fontWeight:"500",fontSize:"13px"}},Na("seconds."))))))))}),d().createElement(Nt,{path:"/behaviour/conditions",element:d().createElement(ud,dd({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),d().createElement("div",{className:"sui-box-footer"},d().createElement("button",{className:"sui-button sui-button-ghost forminator-discard-field-settings",onClick:this.closeModal},d().createElement("i",{className:"sui-icon-close","aria-hidden":"true"}),Na("Cancel")),d().createElement("div",{className:"sui-actions-right"},d().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Apply")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),!1)))}}var hd=Dr(md);function fd(){return fd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},fd.apply(null,arguments)}class bd extends ea.Component{constructor(e){super(e),this.toggleState=this.toggleState.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.state={open:!1},this.fields=this.props.fields}removeRule(){this.props.removeRule(this.props.counter)}updateField(e,t){this.props.updateField(this.props.counter,t)}updateRule(e,t){this.props.updateRule(this.props.counter,t)}updateValue(e){this.props.updateValue(this.props.counter,e.target.value)}updateInputValue(e,t){this.props.updateInputValue(this.props.counter,t)}toggleState(){this.setState({open:!this.state.open})}disableSearch(){return{minimumResultsForSearch:-1}}render(){const e="condition-"+this.props.counter,t=_.filter(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?Na("null"):this.props.rule.value,a="consent"===t.field_type;return a&&(this.props.rule.value=Na("checked")),Object.keys(t).length>0&&d().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},d().createElement("h4",{className:"fui-visibility-rule-header"},d().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-link fui-visibility-rule-icon","aria-hidden":"true"}),d().createElement("span",{className:"fui-visibility-rule-text"},d().createElement("strong",null,ml(t.label))," ",Ma(this.props.rule.rule,t.field_type)," ",d().createElement("strong",null,s)),d().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),d().createElement("div",{role:"region",id:"forminator-field-"+e+"-content",className:"sui-box-body fui-visibility-rule-body","aria-labelledby":"forminator-field-"+e,"aria-hidden":!0!==this.state.open},d().createElement(fl,fd({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:Na("Field")}),_.map(this.fields,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,fd({key:"visibility-condition-"+ia()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,label:Na("Condition (required)"),options:this.disableSearch()}),d().createElement("option",{value:""},Na("Select rule")),"signature"===t.field_type&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is null")),d().createElement("option",{value:"is_not"},Na("Is not null"))),"signature"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is")),d().createElement("option",{value:"is_not"},Na("Is not"))),(t.isNumber||"rating"===t.field_type)&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is_great"},Na("Is greater than")),d().createElement("option",{value:"is_less"},Na("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"contains"},Na("Contains")),d().createElement("option",{value:"does_not_contain"},Na("Does not contain")),d().createElement("option",{value:"starts"},Na("Starts with")),d().createElement("option",{value:"ends"},Na("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"day_is"},Na("Day is")),d().createElement("option",{value:"day_is_not"},Na("Day is not"))),"date"===t.field_type&&"signature"!==t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&!a&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"month_is"},Na("Month is")),d().createElement("option",{value:"month_is_not"},Na("Month is not"))))),d().createElement(il,{cols:"6"},d().createElement(ea.Fragment,null,t.hasOptions&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select option")),_.map(t.values,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label))))),!t.hasOptions&&a&&d().createElement(ol,fd({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Status"),disabled:!0})),!t.hasOptions&&"signature"!==t.field_type&&!a&&(!["day_is","day_is_not","month_is","month_is_not"].includes(this.props.rule.rule)||"date"!==t.field_type)&&d().createElement(ol,fd({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule==="month_is"||"month_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=>d().createElement("option",{value:e,key:e},e)))),!t.hasOptions&&"date"===t.field_type&&("day_is"===this.props.rule.rule||"day_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},d().createElement("option",{value:""},Na("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],e=>d().createElement("option",{value:e,key:e},e))))))),d().createElement("div",{className:"fui-visibility-rule-footer"},d().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},Na("Done")))))}}function gd(){return gd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},gd.apply(null,arguments)}class yd extends ea.Component{constructor(e){super(e),this.addRule=this.addRule.bind(this),this.removeRule=this.removeRule.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.fields=Pa(this.props.wrappers,null,{main_date_field:!0}),this.fields=_.filter(this.fields,e=>"stripe"!==e.field_type&&"stripe-ocs"!==e.field_type&&"paypal"!==e.field_type&&"page-break"!==e.field_type&&"pagination"!==e.field_type&&"section"!==e.field_type&&"html"!==e.field_type),this.validateConditions()}updateState(e){this.props.updateProperty("conditions",e)}getPropState(){const e=[];return _.each(this.props.state.conditions,t=>{const s=Object.assign({},t);e.push(s)}),e}updateField(e,t){const s=this.getPropState();s[e].element_id=t,s[e].rule="is",s[e].value="",this.updateState(s)}updateRule(e,t){const s=this.getPropState();s[e].rule=t,this.updateState(s)}updateValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}updateInputValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}removeRule(e){const t=this.getPropState();t.splice(e,1),this.updateState(t)}addRule(){const e=this.getPropState(),t=_.isUndefined(this.fields[0])?"":this.fields[0].element_id;e.push({element_id:t,rule:"is",value:""}),this.updateState(e)}validateConditions(){const e=_.pluck(this.props.state.conditions,"element_id"),t=_.pluck(this.fields,"element_id"),s=_.difference(e,t);_.isUndefined(s)||this.removeCondition(s)}removeCondition(e){const t=this.getPropState(),s=_.filter(t,function(t){return!_.includes(e,t.element_id)});this.updateState(s)}render(){const e=d().createElement("div",{className:"fui-visibility-options"},d().createElement("div",{className:"fui-visibility-option"},d().createElement(_l,gd({},this.props,{settings:this.props.state,property:"condition_action",defaultValue:"send",noWrapper:!0}),d().createElement("span",{value:"send"},Na("Send")),d().createElement("span",{value:"dont-send"},Na("Don't Send"))),d().createElement("span",{className:"sui-description"},Na("data if"))),d().createElement("div",{className:"fui-visibility-option"},d().createElement(_l,gd({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),d().createElement("span",{value:"all"},Na("All")),d().createElement("span",{value:"any"},Na("Any"))),d().createElement("span",{className:"sui-description"},Na("of the conditions below are met.")))),t=d().createElement("div",{className:"fui-visibility-header"},e,d().createElement("label",{className:"sui-label"},Na("Conditions"))),s=d().createElement("div",{className:"sui-description",style:{margin:"0 0 30px"}},Na("Use conditional logic to send data to this app based on submitted form data.")),a=d().createElement("div",{className:"fui-visibility-group"},s,(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&t,d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&d().createElement("button",{accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Conditions")),d().createElement("p",null,Na("Add conditions under which data should be sent to this app.")))));return!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0&&!_.isEmpty(this.fields)?d().createElement("div",{className:"fui-visibility-group"},s,(this.props.wrappers.length>1||this.fields.length>1)&&t,d().createElement("div",{className:"fui-visibility"},d().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,(e,t)=>d().createElement(bd,gd({},this.props,{rule:e,key:t,counter:t,removeRule:this.removeRule,updateField:this.updateField,updateRule:this.updateRule,updateValue:this.updateValue,updateInputValue:this.updateInputValue,fields:this.fields}))))),d().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Condition"))):d().createElement(ea.Fragment,null,a)}}function Ed(){return Ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ed.apply(null,arguments)}class vd extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.updateProperty=this.updateProperty.bind(this),this.applyChanges=this.applyChanges.bind(this),this.data=Object.assign({},this.props.modal.modalProps),this.state=_.isUndefined(this.data.conditions[this.data.integrationId])?{}:this.data.conditions[this.data.integrationId]}updateProperty(e,t){this.setState({[e]:t})}componentWillUnmount(){this.props.router.navigate("/integrations/")}applyChanges(){const e=Object.assign({},this.data.conditions);e[this.data.integrationId]=Object.assign({},this.state),this.props.actions.integrationActions.updateIntegrationConditions(e),this.closeModal()}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-box-header"},d().createElement("h3",{id:"dialogTitle",className:"sui-box-title"},Na("Conditions")),d().createElement("div",{className:"sui-actions-left"},d().createElement("span",{className:"sui-tag sui-tag-draft"},this.data.integrationTitle)),d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"forminator-builder-fields-close",onClick:this.closeModal}))),d().createElement("div",{className:"sui-box-body"},d().createElement(yd,Ed({},this.props,{updateProperty:this.updateProperty,state:this.state}))),d().createElement("div",{className:"sui-box-footer"},d().createElement("button",{className:"sui-button sui-button-ghost forminator-discard-field-settings",onClick:this.closeModal},d().createElement("i",{className:"sui-icon-close","aria-hidden":"true"}),Na("Cancel")),d().createElement("div",{className:"sui-actions-right"},d().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Apply")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}var _d=Dr(vd);class wd extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.trashField=this.trashField.bind(this)}trashField(){this.props.modal.modalProps.trashField(),this.closeModal()}render(){return d().createElement(ea.Fragment,null,d().createElement(Yo,{flatten:!0,alignment:"center",closeModal:this.closeModal,closeType:"icon",customClass:"sui-spacing-top--60"},d().createElement(Jo,{id:"",label:Na("Delete Notification"),size:"lg"}),d().createElement("p",{id:"",className:"sui-description"},Na("Are you sure you wish to delete this Notification?"))),d().createElement(Go,{customClass:"sui-flatten sui-content-center"},d().createElement(Ho,{label:Na("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),d().createElement("button",{className:"sui-button sui-button-ghost sui-button-red",onClick:this.trashField},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class xd extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.deletePdf=this.deletePdf.bind(this),this.showNotification=this.showNotification.bind(this),this.trashPDF=this.trashPDF.bind(this),this.data=Object.assign({},this.props.modal.modalProps)}deletePdf(){const e={action:"forminator_delete_pdf",_wpnonce:forminatorData.formNonce,pdfId:this.data.pdf.pdfId};po.post(forminatorData.ajaxUrl,uo().stringify(e)).then(e=>{e.data.success?(this.showNotification("success",Na("PDF file successfully deleted.")),this.trashPDF(e.data.data)):this.showNotification("error",e.data)}).catch(e=>{this.showNotification("error",e)})}showNotification(e,t){new ta({type:e,text:"error"===e?Na("Something went wrong while creating your PDF. Please try again."):t}).open(),"error"===e&&console.log(t),this.closeModal()}trashPDF(e){const t=[...this.props.pdfs],s=this.getPDFWithoutCurrent(t,e);this.props.actions.pdfsActions.updatePdfs(s)}getPDFWithoutCurrent(e,t){return e.filter(e=>parseInt(e.pdfId)!==parseInt(t))}render(){return d().createElement(ea.Fragment,null,d().createElement(Yo,{flatten:!0,alignment:"center",closeModal:this.closeModal,closeType:"icon",customClass:"sui-spacing-top--60"},d().createElement(Jo,{id:"forminator-delete-pdf-modal__title",label:Na("Delete PDF File"),size:"sm"}),d().createElement("p",{className:"sui-description"},Na("Are you sure you wish to delete"),d().createElement("b",null," ",this.data.pdf.pdfFilename,".pdf"),"?")),d().createElement(Go,{customClass:"sui-flatten sui-content-center"},d().createElement(Ho,{label:Na("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost"}),d().createElement("button",{className:"sui-button sui-button-ghost sui-button-red pdf-delete-button",onClick:this.deletePdf},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class Nd extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.onClickCallback=this.onClickCallback.bind(this)}onClickCallback(e,t){e.preventDefault(),Ra(t),setTimeout(()=>{this.closeModal()},500)}render(){const e=encodeURIComponent(forminatorData.siteUrl);return d().createElement(ea.Fragment,null,d().createElement(Yo,{alignment:"center",closeModal:this.closeModal,closeType:"icon",closeColor:"white",flatten:!0,imageName:"connect-to-wpmudev"},d().createElement(Jo,{id:"forminator-delete-pdf-modal__title",label:Na("Access PDF Generator Add-on"),size:"lg"}),d().createElement("p",{className:"sui-description"},Na("Create an account with WPMU DEV (the developers of Forminator) to get instant access to PDF Add-on, plus a host of bonus site management tools that come included. It’s fast, easy, and free!"))),d().createElement("div",{className:"sui-box-body sui-content-center sui-spacing-bottom--20"},d().createElement("button",{className:"sui-button connect-button",style:{backgroundColor:"#286EF1"},onClick:t=>{this.onClickCallback(t,`https://wpmudev.com/register/?signup=forminator-pdf-addon&forminator_url=${e}`)}},d().createElement("span",{className:"sui-loading-text"},Na("Connect to WPMU DEV")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))),d().createElement(Go,{customClass:"sui-flatten sui-content-center"},d().createElement("small",{style:{fontWeight:"500"}},Na("Already a member? {{link}}Connect site{{/link}}",{components:{link:d().createElement("a",{onClick:t=>{this.onClickCallback(t,`https://wpmudev.com/login/?signin=forminator-pdf-addon&forminator_url=${e}`)},target:"_blank"})}}))))}}function Cd(){return Cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Cd.apply(null,arguments)}class kd extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.updateProperty=this.updateProperty.bind(this),this.applyChanges=this.applyChanges.bind(this),this.state=this.props.settings||{}}getNameOptions(){const e=[];return Pa(forminatorData.parentFormFields,["page-break","postdata","captcha","consent","gdprcheckbox","stripe","stripe-ocs","paypal","password","group"],void 0,void 0,!0).map(t=>{_.isEmpty(t.parent_group)&&e.push({value:"{"+t.element_id+"}",label:t.label})}),e}updateProperty(e,t){this.setState({[e]:t})}componentWillUnmount(){this.props.router.navigate("/builder/")}applyChanges(){this.props.actions.settingsActions.updateSettings(this.state),this.closeModal()}getMiscData(){const e={};_.assign(e,forminatorData.variables);const t=_.isEmpty(e)?[]:e;return d().createElement(ea.Fragment,null,t&&d().createElement("optgroup",{label:Na("Misc Data")},_.map(t,(e,t)=>d().createElement("option",{key:t,value:"{"+t+"}","data-content":"{"+t+"}"},e))))}render(){const e=d().createElement(ea.Fragment,null,d().createElement("optgroup",{label:Na("Site Information")},[{value:"{site_title}",label:"Site Title"},{value:"{site_url}",label:"Site URL"},{value:"{date_dmy}",label:"Date"}].map((e,t)=>d().createElement("option",{key:t,value:e.value,"data-content":e.value},ml(e.label)))),this.getMiscData());return d().createElement(ea.Fragment,null,d().createElement(Yo,{closeType:"icon",closeModal:this.closeModal},d().createElement(Jo,{label:Na("Customize Header Field"),icon:"sui-icon-check"})),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",{className:"sui-tabs-menu"},d().createElement(wr,{to:"/builder/settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Settings")),d().createElement(wr,{to:"/builder/styling/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Styling"))),d().createElement(kt,null,d().createElement(Nt,{path:"/builder/",element:d().createElement(xt,{to:"/builder/settings/",replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content active"},d().createElement(kt,null,d().createElement(Nt,{path:"/builder/settings",element:d().createElement("div",{key:"builder-settings",className:"sui-accordion sui-accordion-flushed",style:{marginTop:"-30px",marginBottom:"-30px"},value:"multiple"},d().createElement(ll,Cd({},this.props,{settings:this.state,label:Na("Logo"),property:"pdf_logo_enabled",open:!0,updateProperty:this.updateProperty}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ql,Cd({},this.props,{label:Na("Logo Type"),property:"pdf_logo_type",default:"text",settings:this.state,updateProperty:this.updateProperty}),d().createElement(Ql,{value:"text",label:Na("Text")},d().createElement("div",{style:{marginTop:"20px"}},d().createElement(hc,Cd({},this.props,{label:Na("Logo Text"),settings:this.state,property:"pdf_logo_text",placeholder:Na("Value"),className:"sui-form-control",updateProperty:this.updateProperty}),e))),d().createElement(Ql,{value:"image",label:Na("Image")},d().createElement("div",{style:{marginTop:"20px"}},d().createElement(ql,Cd({},this.props,{label:Na("Logo image source"),property:"pdf_logo_image_type",default:"image_site_logo",settings:this.state,updateProperty:this.updateProperty}),d().createElement(Ql,{value:"image_site_logo",label:Na("Use site logo")},d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block",marginTop:"20px"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Your site’s logo will be used as the logo for this PDF file."))))),!forminatorData.hasSiteLogo&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-yellow sui-active",style:{display:"block",marginTop:"20px"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Your site doesn’t have any logo image set. You can set a site logo or upload a new logo for your PDF file.")))))),d().createElement(Ql,{value:"image_upload_logo",label:Na("Use logo image"),boxClass:"sui-tab-boxed"},d().createElement(Hp,Cd({},this.props,{settings:this.state,updateProperty:this.updateProperty,type:"image",fieldClass:"sui-auto",property:"image_upload_logo_value",label:Na("Upload Image"),description:Na("Supported formats (.png, .gif, .jpg, and .svg). For best output, please upload an image with a height of 80px.")}))),d().createElement(Ql,{value:"image_logo_url",label:Na("Logo URL"),boxClass:"sui-tab-boxed"},d().createElement(ol,Cd({},this.props,{property:"image_logo_url_value",settings:this.state,updateProperty:this.updateProperty,label:Na("Image URL"),placeholder:Na("E.g. https://domain.com/images/logo.png"),requiredError:Na("Please enter the image URL for the logo."),description:Na("For best output, image height is constrained to 80px. You can adjust this size using custom CSS.")}))))))))))),d().createElement(ll,Cd({},this.props,{settings:this.state,label:Na("Title"),property:"pdf_title_enabled",open:!0,updateProperty:this.updateProperty}),d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(hc,Cd({},this.props,{settings:this.state,property:"pdf_title",placeholder:Na("Value"),className:"sui-form-control",updateProperty:this.updateProperty}),e))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ql,Cd({},this.props,{label:Na("Title alignment"),property:"pdf_title_alignment",default:"left",settings:this.state,updateProperty:this.updateProperty}),d().createElement(Yl,{value:"left"},Na("Left")),d().createElement(Yl,{value:"center"},Na("Center")),d().createElement(Yl,{value:"right"},Na("Right"))))))))}),d().createElement(Nt,{path:"/builder/styling",element:d().createElement(Ol,Cd({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),d().createElement(Go,{alignment:"separated"},d().createElement(Ho,{icon:"close",label:Na("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),d().createElement("button",{className:"sui-button forminator-save-field-settings",disabled:Ia(this.state.pdf_title_enabled)&&_.isEmpty(this.state.pdf_title),onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Apply")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var Sd=Dr(kd);function Pd(){return Pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Pd.apply(null,arguments)}class Od extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.updateProperty=this.updateProperty.bind(this),this.applyChanges=this.applyChanges.bind(this),this.state=this.props.settings||{}}updateProperty(e,t){this.setState({[e]:t})}componentWillUnmount(){this.props.router.navigate("/builder/")}applyChanges(){this.props.actions.settingsActions.updateSettings(this.state),this.closeModal()}getFieldOptions(){const e=[];return Pa(forminatorData.parentFormFields,["page-break","postdata","captcha","consent","gdprcheckbox","stripe","stripe-ocs","paypal","password","group"],void 0,void 0,!0).map(t=>{_.isEmpty(t.parent_group)&&(e[t.element_id]=t.label)}),e}render(){return d().createElement(ea.Fragment,null,d().createElement(Yo,{closeType:"icon",closeModal:this.closeModal},d().createElement(Jo,{label:Na("Customize Footer Field"),icon:"sui-icon-check"})),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"sui-tabs sui-tabs-flushed"},d().createElement("div",{className:"sui-tabs-menu"},d().createElement(wr,{to:"/builder/settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Settings")),d().createElement(wr,{to:"/builder/styling/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},Na("Styling"))),d().createElement(kt,null,d().createElement(Nt,{path:"/builder/",element:d().createElement(xt,{to:"/builder/settings/",replace:!0})})),d().createElement("div",{className:"sui-tabs-content"},d().createElement("div",{className:"sui-tab-content active"},d().createElement(kt,null,d().createElement(Nt,{path:"/builder/settings",element:d().createElement("div",{key:"builder-settings"},d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ip,Pd({},this.props,{extraId:"html-type",settings:this.state,boxClass:"sui-tab-boxed",property:"footer_value",disableMiscData:!0,allowRepeater:!1,excludeSubFields:!0,enableFormData:!0,enablePostData:!1,enableUpload:!0,allowButtonOnclick:"true",enableParentForm:"true",mainOptions:[],label:Na("Value"),updateProperty:this.updateProperty})))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(Up,Pd({},this.props,{settings:this.state,label:Na("Show page number"),property:"show_page_number",updateProperty:this.updateProperty,unWrap:!0})))))}),d().createElement(Nt,{path:"/builder/styling",element:d().createElement(Ol,Pd({},this.props,{property:"footer-custom-class",updateProperty:this.updateProperty,state:this.state}))})))))),d().createElement(Go,{alignment:"separated"},d().createElement(Ho,{icon:"close",label:Na("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),d().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),Na("Apply")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var Dd=Dr(Od);function Fd(){return Fd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Fd.apply(null,arguments)}class Ad extends ea.Component{constructor(e){super(e),this.state={options:[],templatesPageLoaded:1,showLoadMore:!1,templateSaveLoader:!1,disabled:!0,optionsLoaded:!1,"form-template-settings":"form-template-name","form-template-name":"","form-existing-template":""},this.closeModal=this.closeModal.bind(this),this.getOptions=this.getOptions.bind(this),this.openModal=this.openModal.bind(this),this.onChange=this.onChange.bind(this),this.showError=this.showError.bind(this),this.saveTemplate=this.saveTemplate.bind(this),this.updateProperty=this.updateProperty.bind(this),this.resetFields()}isDisabled(e){const t=this.props.settings?this.props.settings[e]:void 0;return void 0===t||void 0===this.props.settings[t]||""===this.props.settings[t]}onChange(e){"form-existing-template"===e?e=this.props.settings["form-existing-template"]:"form-template-name"===e&&(e=this.props.settings["form-template-name"]),this.setState({disabled:""===e})}getOptions(){window.fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"action=forminator_get_cloud_templates&_ajax_nonce="+forminatorData.load_cloud_templates+"&page_number="+this.state.templatesPageLoaded}).then(e=>e.json()).then(e=>{if(e.success){if(e.data.length){const t=e.data.map(e=>({id:e.template_id,text:e.name}));this.setState({options:[...this.state.options,...t],templatesPageLoaded:this.state.templatesPageLoaded+1})}e.data.length<forminatorData.templates_per_page&&this.setState({showLoadMore:!1}),this.setState({optionsLoaded:!0})}}).catch(e=>{console.log(e)})}saveTemplate(){const e={action:"forminator_save_template",_wpnonce:forminatorData.save_cloud_templates,form_id:this.props.settings.form_id,template_name:this.props.settings["form-template-name"],template_id:this.props.settings["form-existing-template"]};this.setState({templateSaveLoader:!0}),po.post(ajaxurl,uo().stringify(e)).then(e=>{e.data.success?this.openModal():this.showError(e.data),this.resetFields()}).catch(e=>{this.showError(e),this.resetFields()})}resetFields(){this.props.settings["form-template-settings"]="form-template-name",this.props.settings["form-template-name"]="",this.props.settings["form-existing-template"]=""}showError(e){new ta({type:"error",text:e.data||Na("Something went wrong while saving your template. Please try again.")}).open(),console.log(e),this.closeModal()}updateProperty(e,t){this.props.settings[e]=t,this.setState({[e]:t})}openModal(){setTimeout(()=>{this.props.actions.modalActions.showModal({open:!0,title:this.actionText,id:"save-template",activeElement:jQuery(document.activeElement),focusFirst:".modal-close-button"},"savedTemplateSuccessModal")},500)}closeModal(){this.resetFields(),this.props.modal.modalProps.closeModal()}render(){const e=this.state.optionsLoaded;return d().createElement(ea.Fragment,null,d().createElement(Yo,{alignment:"center",closeModal:this.closeModal,closeType:"icon",flatten:!0,customClass:"sui-spacing-top--60"},d().createElement(Jo,{id:"forminator-save-template-modal__title",label:Na("Save Template"),size:"lg"}),d().createElement("p",{className:"sui-description"},Na("Enter a name to save this form as a template or select an existing template to overwrite."))),d().createElement("div",{className:"sui-box-body sui-spacing-bottom--20"},d().createElement(ql,Fd({},this.props,{property:"form-template-settings",default:this.state["form-template-settings"],updateProperty:(e,t)=>{this.updateProperty(e,t),this.props.settings["form-existing-template"]="",this.onChange(t)}}),d().createElement(Ql,{value:"form-template-name",boxClass:"sui-tab-boxed",label:Na("New Template")},d().createElement(ol,Fd({},this.props,{type:"text",label:Na("Name"),placeholder:Na("E.g., Registration form template"),property:"form-template-name",updateProperty:(e,t)=>{this.updateProperty(e,t),this.onChange(t)}}))),d().createElement(Ql,{value:"form-existing-template",boxClass:"sui-tab-boxed",label:Na("Update Existing Template")},d().createElement(kl,Fd({},this.props,{label:Na("Choose template"),property:"form-existing-template",hasSearch:e,updateProperty:(e,t)=>{this.updateProperty(e,t),this.onChange(t)},placeholder:Na("Select a template"),data:e?this.state.options:[{id:"searching",text:Na("Searching…"),disabled:!0}],loading:!e,fetchOptions:()=>this.getOptions}),d().createElement("option",null)),this.state.showLoadMore&&d().createElement("a",{href:"#",onClick:this.getOptions,style:{display:"block",marginTop:"-15px",marginBottom:"15px"}},Na("Load more")),d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block",marginTop:"-15px"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Warning! The selected template will be overwritten by this form.")))))))),d().createElement(Go,{customClass:"sui-flatten sui-content-center"},d().createElement("button",{className:"sui-button sui-button-grey \n\t\t\t\t\t\t\t"+(this.state.templateSaveLoader?"sui-button-onload":""),disabled:""+(this.state.disabled?"disabled":""),onClick:this.saveTemplate},d().createElement("span",{class:"sui-loading-text"},d().createElement("span",{class:"sui-icon-save","aria-hidden":"true"}),Na("Save Template")),d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class Td extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"savedTemplateSuccessModal")}render(){return d().createElement(ea.Fragment,null,d().createElement(Yo,{alignment:"center",closeModal:this.closeModal,closeType:"icon",flatten:!0,customClass:"sui-spacing-top--60"},d().createElement("span",{class:"sui-icon-check sui-lg","aria-hidden":"true"}),d().createElement(Jo,{id:"forminator-save-template-modal__title",label:Na("Template Saved"),size:"lg"}),d().createElement("p",{className:"sui-description"},Na("Template successfully saved to your Hub account. You can access the saved template in the "),d().createElement("a",{href:"admin.php?page=forminator-templates&tab=cloud",target:"_blank"},Na("Templates Page.")))),d().createElement(Go,{customClass:"sui-flatten sui-content-center"},d().createElement("button",{className:"sui-button sui-button-grey",onClick:this.closeModal},Na("Close"))))}}class Md extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.onClickCallback=this.onClickCallback.bind(this)}onClickCallback(e,t){e.preventDefault(),Ra(t),setTimeout(()=>{this.closeModal()},500)}render(){return d().createElement(ea.Fragment,null,d().createElement(Yo,{alignment:"center",closeModal:this.closeModal,closeType:"icon",closeColor:"white",flatten:!0,imageName:"saved-form-template"},d().createElement(Jo,{id:"forminator-save-pro-modal__title",label:forminatorData.hubConnectTitle,size:"lg",tagSize:"sm"}),d().createElement("p",{className:"sui-description"},forminatorData.hubConnectDescription)),d().createElement("div",{className:"sui-box-body sui-content-center sui-spacing-bottom--20"},d().createElement("a",{href:forminatorData.hubConnectUrl,className:"sui-button sui-button-icon-right sui-button-blue"},forminatorData.hubConnectButton)),d().createElement(Go,{customClass:"sui-flatten sui-content-center"}))}}class jd extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this)}getColorFieldNames(){return["cform-form-border","cform-form-background","response-loading-background","response-loading-color","response-success-border","response-success-background","response-success-color","response-error-border","response-error-background","response-error-color","timeline-border","timeline-border-current","timeline-text","timeline-text-current","timeline-dot-border","timeline-dot-background","timeline-dot-color","timeline-dot-border-current","timeline-dot-background-current","timeline-dot-color-current","progress-label","progress-background","progress-background-status","cform-label-color","cform-asterisk-color","label-helper-color","label-validation-background","label-validation-color","cform-title-color","cform-subtitle-color","input-border","input-bg","input-placeholder","input-color","input-border-hover","input-hover-bg","input-hover-color","input-border-active","input-active-bg","input-active-color","input-border-error","input-icon","prefix-color","suffix-color","input-icon-hover","input-icon-focus","radio-border-static","radio-background-static","radio-label","radio-image-border-static","radio-image-background","radio-border-hover","radio-background-hover","radio-outline-focus","radio-border-active","radio-background-active","radio-icon","radio-image-border-active","radio-image-background-active","radio-border-error","radio-background-error","select-border-static","select-background-static","select-icon-static","select-value-static","select-border-hover","select-background-hover","select-icon-hover","select-value-hover","select-border-active","select-background-active","select-icon-active","select-value-active","select-border-error","dropdown-border","dropdown-background","dropdown-option-color-static","dropdown-option-background-hover","dropdown-option-color-hover","dropdown-option-background-active","dropdown-option-color-active","dropdown-search-border","dropdown-search-background","dropdown-search-color","multiselect-border","multiselect-background","multiselect-item-color-static","multiselect-tag-background-static","multiselect-tag-color-static","multiselect-tag-remove-color-static","multiselect-border-hover","multiselect-item-bg-hover","multiselect-item-color-hover","multiselect-border-active","multiselect-item-bg-active","multiselect-item-color-active","multiselect-border-error","rating-icon","rating-suffix","rating-icon-hover","rating-icon-active","calendar-border","calendar-background","calendar-arrows-bg","calendar-arrows-static","calendar-select-border","calendar-select-bg","calendar-select-color","calendar-dweek","calendar-days-border-static","calendar-days-background-static","calendar-days-color-static","calendar-days-border-hover","calendar-days-background-hover","calendar-days-color-hover","calendar-days-border-active","calendar-days-background-active","calendar-days-color-active","calendar-days-border-current","calendar-days-background-current","calendar-days-color-current","button-upload-background-static","button-upload-color-static","button-upload-background-hover","button-upload-color-hover","button-upload-background-active","button-upload-color-active","multiupload-panel-background-default","multiupload-panel-border-default","multiupload-panel-icon-default","multiupload-panel-text-default","multiupload-panel-link-default","multiupload-panel-background-hover","multiupload-panel-border-hover","multiupload-panel-icon-hover","multiupload-panel-background-drop","multiupload-panel-border-drop","multiupload-panel-icon-drop","multiupload-panel-background-error","multiupload-panel-border-error","multiupload-panel-icon-error","multiupload-file-preview-border-default","multiupload-file-preview-background-default","multiupload-file-preview-icon-default","multiupload-file-name-default","multiupload-file-size-default","multiupload-file-loader-color","multiupload-file-preview-border-error","multiupload-file-preview-background-error","multiupload-file-preview-icon-error","multiupload-file-error-color","button-upload-delete-background-static","button-upload-delete-color-static","button-upload-delete-background-hover","button-upload-delete-color-hover","button-upload-delete-background-active","button-upload-delete-color-active","signature-border-default","signature-background-default","signature-placeholder","signature-color","signature-reset-icon-default","signature-border-hover","signature-background-hover","signature-reset-icon-hover","signature-border-error","group-background","group-border","group-divider","repeater-button-background","repeater-button","repeater-border","repeater-button-background-hover","repeater-button-hover","repeater-border-hover","repeater-button-background-focus","repeater-button-focus","repeater-border-focus","repeater-icon","repeater-icon-hover","repeater-icon-focus","repeater-link","repeater-link-hover","repeater-link-focus","prev-background-static","prev-color-static","prev-background-hover","prev-color-hover","prev-background-active","prev-color-active","next-background-static","next-color-static","next-background-hover","next-color-hover","next-background-active","next-color-active","consent-cbox-border-static","consent-cbox-background-static","consent-cbox-label","consent-cbox-border-active","consent-cbox-background-active","consent-cbox-icon","consent-cbox-border-error","consent-cbox-background-error","button-submit-background-static","button-submit-color-static","button-submit-background-hover","button-submit-color-hover","button-submit-background-active","button-submit-color-active","slider-track","slider-track-border","slider-track-fill","slider-handle","slider-selected-value","slider-steps-value","slider-custom-label-value","slider-track-hover","slider-track-border-hover","slider-track-fill-hover","slider-handle-hover","slider-handle-drag","input-focus-outline-color","select-focus-outline-color","button-submit-focus-outline-color","prev-focus-outline-color","next-focus-outline-color","button-upload-focus-outline-color","button-upload-delete-focus-outline-color","multiupload-panel-focus-outline-color","multiupload-panel-link-focus-outline-color","repeater-button-outline-focus","repeater-icon-outline-focus","repeater-link-outline-focus","consent-cbox-border-hover","consent-cbox-background-hover","consent-cbox-outline-focus","slider-handle-outline-color","rating-focus-outline-color","dropdown-search-outline-focus","dropdown-option-outline-focus","multiselect-item-outline-focus","steps-outline-focus","calendar-outline-focus"]}applyProceed(){const{settings:e}=this.props,t=this,s=this.getColorFieldNames();_.forEach(s,function(s){_.isUndefined(e[pa(t.props)+s])||delete e[pa(t.props)+s]}),_.forEach(forminatorData.formColorSettings,function(t,s){e[s]=t}),this.props.actions.settingsActions.resetSettings(e),jQuery("#forminator-section-appearance-color .sui-accordion-item--open .sui-accordion-item-header").trigger("click"),this.closeModal()}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60",style:{paddingBottom:"0"}},d().createElement("button",{className:"sui-button-icon sui-button-float--right forminator-popup-close forminator-cancel-create-form","aria-label":Na("Close this dialog window"),onClick:this.closeModal},d().createElement("span",{className:"sui-icon-close sui-md","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Close this dialog window"))),d().createElement("h3",{className:"sui-box-title sui-lg",id:"dialogTitle"},Na("Clear Color Customization?")),d().createElement("span",{className:"sui-description",style:{marginTop:"15px"}},Na("Are you sure you want to clear your form's color customization? All customized color options will be lost."))),d().createElement("div",{className:"sui-box-footer sui-flatten sui-content-center",style:{paddingTop:"10"}},d().createElement(Ho,{label:Na("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost"}),d().createElement("button",{id:"forminator-apply-preset",className:"sui-button sui-button-gray",onClick:()=>this.applyProceed()},d().createElement("span",{className:"sui-button-text-default"},Na("Proceed")))))}}class Ud extends ea.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.confirmRevert=this.props.modal.modalProps.confirmCallback.bind(this),this.confirm=this.confirm.bind(this)}confirm(){this.closeModal(),this.confirmRevert()}render(){return d().createElement(d().Fragment,null,d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right",onClick:this.closeModal}),d().createElement("h3",{id:"dialogTitle",className:"sui-box-title sui-lg"},Na("Discard Changes?")),d().createElement("p",{className:"sui-description"},Na("Are you sure you want to discard your saved changes and revert to the last published version? This action cannot be undone."))),d().createElement("div",{className:"sui-box-footer sui-flatten sui-content-center"},d().createElement(Io,{design:"ghost",className:"forminator-discard-field-settings",label:Na("Cancel"),onClick:this.closeModal}),d().createElement(Io,{color:"red",design:"ghost",icon:"trash",label:Na("Discard"),onClick:this.confirm})))}}function Vd(){return Vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Vd.apply(null,arguments)}class $d extends ea.Component{constructor(e){super(e),this.state={"feedback-rating":"5","feedback-additional-details":""},this.closeModal=this.props.modal.modalProps.closeModal.bind(this),this.shareFeedback=this.shareFeedback.bind(this),this.updateField=this.updateField.bind(this)}updateField(e,t){this.setState({[e]:t})}shareFeedback(){const e={action:"forminator_share_feedback",_ajax_nonce:forminatorData.shareFeedbackNonce,rating:this.state["feedback-rating"],additional_details:this.state["feedback-additional-details"]},t=jQuery("#forminator-feedback-submit");t.addClass("sui-button-onload-text"),po.post(forminatorData.ajaxUrl,uo().stringify(e)).then(e=>{if(e.data.success){this.closeModal();new ta({type:"success",text:`<strong>${Na("Thanks for your feedback!")}</strong> ${Na("It helps us make Forminator even better.")}`,time:4e3}).open()}else{new ta({type:"error",text:e.data.data}).open()}}).catch(e=>{new ta({type:"error",text:Na("Something went wrong. Please try again.")}).open(),console.log(e)}).then(()=>{setTimeout(()=>{t.removeClass("sui-button-onload-text")},1e3)})}render(){return d().createElement(d().Fragment,null,d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right",onClick:this.closeModal}),d().createElement("h3",{id:"dialogTitle",className:"sui-box-title sui-lg"},Na("Share your feedback")),d().createElement("p",{className:"sui-description"},Na("We’ve just started rolling out updates to the new form editor — and this is only the beginning!"))),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{className:"sui-box-settings-row forminator-feedback-rating"},d().createElement("div",{className:"sui-side-tabs"},d().createElement("label",{className:"sui-settings-label"},Na("How was your experience with the new form editor?")),d().createElement(ql,Vd({},this.props,{settings:this.state,updateProperty:this.updateField,property:"feedback-rating"}),d().createElement(Yl,{value:"1"},"1"),d().createElement(Yl,{value:"2"},"2"),d().createElement(Yl,{value:"3"},"3"),d().createElement(Yl,{value:"4"},"4"),d().createElement(Yl,{value:"5"},"5")),d().createElement("div",{className:"forminator-feedback-rating-range"},d().createElement("span",{className:"forminator-feedback-rating-range-min"},Na("Dislike")),d().createElement("span",{className:"forminator-feedback-rating-range-max"},Na("Love it!"))))),d().createElement("div",{className:"sui-box-settings-row forminator-feedback-additional-details"},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label"},Na("Additional details {{span}}(optional){{/span}}",{components:{span:d().createElement("span",{className:"sui-description"})}})),d().createElement($l,Vd({},this.props,{settings:this.state,updateProperty:this.updateField,property:"feedback-additional-details",placeholder:Na("Tell us what you loved or what could be better..."),characterLimit:255}))))),d().createElement("div",{className:"sui-box-footer sui-flatten sui-content-center"},d().createElement("button",{id:"forminator-feedback-submit",className:"sui-button sui-button-blue",onClick:()=>this.shareFeedback()},d().createElement("span",{className:"sui-button-text-default"},Na("Share feedback")),d().createElement("span",{className:"sui-button-text-onload"},d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}),Na("Sending feedback...")))))}}var Id={fieldsModal:al,settingsModal:Du,previewModal:Au,submitModal:ju,publishModal:Uu,deleteModal:$u,shortcodeModal:Iu,applyPresetModal:Ru,paginationModal:Wu,notificationModal:od,behaviorModal:hd,integrationConditionsModal:_d,deleteNotificationModal:wd,deletePdfModal:xd,accessPdfAddonModal:Nd,pageHeaderModal:Sd,pageFooterModal:Dd,savedTemplateModal:Ad,savedTemplateProModal:Md,savedTemplateSuccessModal:Td,clearColorCustomizationModal:jd,revertModal:Ud,feedbackModal:$d},Rd=r(7337),Ld=r.n(Rd);class Bd extends ea.Component{constructor(e){super(e),"undefined"!=typeof document&&(this.previouslyFocusedElement=document.activeElement)}componentDidMount(){const e=this.props.focusTrapOptions,t={returnFocusOnDeactivate:!1,fallbackFocus:"body"};for(const s in e)e.hasOwnProperty(s)&&"returnFocusOnDeactivate"!==s&&(t[s]=e[s]);const s=(0,ea.findDOMNode)(this.focusTrapElement);this.focusTrap=this.props._createFocusTrap(s,t),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()}componentDidUpdate(e){if(e.active&&!this.props.active){const{returnFocusOnDeactivate:e}=this.props.focusTrapOptions,t={returnFocus:e||!1};this.focusTrap.deactivate(t)}else!e.active&&this.props.active&&this.focusTrap.activate();e.paused&&!this.props.paused?this.focusTrap.unpause():!e.paused&&this.props.paused&&this.focusTrap.pause()}componentWillUnmount(){this.focusTrap.deactivate(),!1!==this.props.focusTrapOptions.returnFocusOnDeactivate&&this.previouslyFocusedElement&&this.previouslyFocusedElement.focus&&this.previouslyFocusedElement.focus()}setFocusTrapElement(e){this.focusTrapElement=e}render(){const e=d().Children.only(this.props.children);return d().cloneElement(e,{ref:t=>{this.setFocusTrapElement(t),"function"==typeof e.ref&&e.ref(t)}})}}Bd.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:Ld()};const zd=["renderTo"];function Wd(){return Wd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Wd.apply(null,arguments)}const Hd={"insert-fields":Id.fieldsModal,"field-settings":Id.settingsModal,preview:Id.previewModal,submit:Id.submitModal,publish:Id.publishModal,delete:Id.deleteModal,shortcode:Id.shortcodeModal,applyPreset:Id.applyPresetModal,pagination:Id.paginationModal,notification:Id.notificationModal,behavior:Id.behaviorModal,integration:Id.integrationConditionsModal,deleteNotification:Id.deleteNotificationModal,deletePdf:Id.deletePdfModal,accessPdfAddon:Id.accessPdfAddonModal,pageHeader:Id.pageHeaderModal,pageFooter:Id.pageFooterModal,savedTemplateProModal:Id.savedTemplateProModal,savedTemplateModal:Id.savedTemplateModal,savedTemplateSuccessModal:Id.savedTemplateSuccessModal,clearColorCustomizationModal:Id.clearColorCustomizationModal,revert:Id.revertModal,feedback:Id.feedbackModal};class qd extends ea.Component{constructor(e){super(e),this.modelRef=d().createRef()}componentDidUpdate(e){const t=this;if(e.modal.modalProps.open!==this.props.modal.modalProps.open){const e=this.modelRef.current;if(this.props.modal.modalProps.open){if(this.focusAfterClosed=this.props.modal.modalProps.activeElement,this.focusableElementIndex=null,this.focusAfterClosed&&this.focusAfterClosed.length){const e=jQuery("#wpbody-content").find(":tabbable");this.focusableElementIndex=e.index(jQuery(this.focusAfterClosed))}const e=this.props.modal.modalProps.focusFirst;setTimeout(function(){t.focusFirst="string"==typeof e?jQuery(t.modelRef.current).find(e):"object"==typeof e?e:null,t.focusFirst&&t.focusFirst.length&&t.setFocus(t.focusFirst.first())},320),jQuery("#wpwrap").attr("aria-hidden","true")}this.props.modal.modalProps.open?e.removeAttribute("aria-hidden"):(jQuery("#wpwrap").attr("aria-hidden","false"),setTimeout(function(){if(jQuery(document).find(t.focusAfterClosed).length)t.setFocus(t.focusAfterClosed);else if(t.focusableElementIndex){const e=jQuery("#wpbody-content").find(":tabbable");t.setFocus(e.eq(t.focusableElementIndex))}},320),this.hideModalTimeout=setTimeout(()=>{e.setAttribute("aria-hidden","true"),this.props.modal.modalType=null,this.forceUpdate()},300))}}setFocus(e){if(void 0===e)return;e.attr("tabindex","0"),e.blur();let t=0;const s=window.setInterval(function(){e.focus(),t++,t>=10&&window.clearInterval(s)},10)}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown),clearTimeout(this.hideModalTimeout)}handleKeyDown=e=>{"Escape"!==e.key&&27!==e.keyCode||this.props.modal.modalProps.open&&this.props.modal.modalProps.closeModal()};render(){if(!this.props.modal.modalType)return null;let e="sui-modal-lg",t=["sui-modal-content","sui-content-fade-in"];this.props.modal.modalProps.open||(t=["sui-modal-content","sui-content-fade-out"]);const s=this.props.modal.modalType,a=Hd[s];"publish"===s&&(e="sui-modal-sm fui-dialog-publish"),"shortcode"===s&&(e="sui-modal-sm fui-dialog-publish");if(["delete","deleteNotification","applyPreset","deletePdf","savedTemplateModal","savedTemplateSuccessModal","revert"].includes(s)&&(e="sui-modal-sm"),!_.isUndefined(this.props.modal.modalProps)&&!_.isUndefined(this.props.modal.modalProps.field)&&!_.isUndefined(this.props.modal.modalProps.field.type)){const t=this.props.modal.modalProps.field.type;e+="radio"===t||"checkbox"===t||"select"===t?" multivalue-modal":" "+this.props.modal.modalProps.field.type+"-modal"}const r=jQuery(".sui-color-accessible").length?"sui-wrap sui-color-accessible":"sui-wrap";return d().createElement("div",{className:r},d().createElement("div",{id:"forminator-modal",className:`sui-modal sui-active ${e} ${s}`},d().createElement("div",Wd({role:"dialog",id:`modal-${this.props.modal.modalProps.id}`,className:`${t.join(" ")}`,"aria-modal":"true","aria-live":"polite"},this.props.modal.modalProps.labelledBy&&{"aria-labelledby":this.props.modal.modalProps.labelledBy},this.props.modal.modalProps.describedBy&&{"aria-describedby":this.props.modal.modalProps.describedBy},{ref:this.modelRef}),d().createElement("div",{className:"sui-box",style:{marginBottom:0}},d().createElement(a,this.props)))))}}const Qd=e=>{let{renderTo:t=document.body}=e,s=function(e,t){if(null==e)return{};var s,a,r=function(e,t){if(null==e)return{};var s={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;s[a]=e[a]}return s}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],-1===t.indexOf(s)&&{}.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}(e,zd);return(0,ea.createPortal)(d().createElement(qd,s),t)};Qd.renderTo=function(e){return t=>d().createElement(Qd,Wd({},t,{renderTo:e}))};var Yd=Qd;const Gd=e=>t=>{t({type:"UPDATE_PDFS",pdfs:e})};var Kd=ce(function(e){return{modal:e.modal,wrappers:e.wrappers,settings:e.settings,notifications:e.notifications,id:e.settings.form_id||-1,formType:e.settings["form-type"]||"default",formDesign:e.settings["form-style"]||"default",skipProNotice:e.settings.skipProNotice||forminatorData.skip_pro_notice||!1,pdfs:e.pdfs||{}}},function(s){return{actions:{modalActions:Ut(t,s),builderActions:Ut(a,s),settingsActions:Ut(e,s),integrationActions:Ut(o,s),behaviorsActions:Ut(n,s),notificationsActions:Ut(i,s),pdfsActions:Ut(c,s)}}})(Yd);class Jd extends ea.Component{constructor(e){super(e)}render(){return d().createElement("div",{role:"alert",className:"sui-notice sui-active sui-notice-blue",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("This option will inherit the basic styles from your WordPress theme.")))))}}class Zd extends ea.Component{constructor(e){super(e)}updateValue(e){this.props.actions.settingsActions.updateSetting("form-substyle",e)}render(){let e="default";switch(this.props.formSubDesign){case"default":case"flat":case"bold":case"material":e=this.props.formSubDesign}return d().createElement("div",{className:"sui-form-field",role:"radiogroup"},d().createElement("label",{htmlFor:"design-style-default",className:"sui-radio sui-radio-sm sui-radio-stacked"},d().createElement("input",{type:"radio",name:"form-substyle",id:"design-style-default","aria-labelledby":"label-design-style-default",value:"default",checked:"default"===e,onChange:this.updateValue.bind(this,"default")}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",{id:"label-design-style-default"},Na("Default"))),d().createElement("label",{htmlFor:"design-style-flat",className:"sui-radio sui-radio-sm sui-radio-stacked"},d().createElement("input",{type:"radio",name:"form-substyle",id:"design-style-flat","aria-labelledby":"label-design-style-flat",value:"flat",checked:"flat"===e,onChange:this.updateValue.bind(this,"flat")}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",{id:"label-design-style-flat"},Na("Flat"))),d().createElement("label",{htmlFor:"design-style-bold",className:"sui-radio sui-radio-sm sui-radio-stacked"},d().createElement("input",{type:"radio",name:"form-substyle",id:"design-style-bold","aria-labelledby":"label-design-style-bold",value:"bold",checked:"bold"===e,onChange:this.updateValue.bind(this,"bold")}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",{id:"label-design-style-bold"},Na("Bold"))),d().createElement("label",{htmlFor:"design-style-material",className:"sui-radio sui-radio-sm sui-radio-stacked"},d().createElement("input",{type:"radio",name:"form-substyle",id:"design-style-material","aria-labelledby":"label-design-style-material",value:"material",checked:"material"===e,onChange:this.updateValue.bind(this,"material")}),d().createElement("span",{"aria-hidden":"true"}),d().createElement("span",{id:"label-design-style-material"},Na("Material"))))}}class Xd extends ea.Component{constructor(e){super(e)}render(){return d().createElement("div",{role:"alert",className:"sui-notice sui-active sui-notice-blue",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You have opted for no stylesheet to be enqueued. Note that we add a grid style css for spacing to your form by default. If needed, you can disable it in the option below.")))))}}function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},em.apply(null,arguments)}class tm extends ea.Component{render(){const e=!_.isUndefined(this.props.preset);return d().createElement("div",{id:"forminator-section-appearance-design-style",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},e&&d().createElement("span",{className:"sui-settings-label"},Na("Design Style"))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(ql,em({},this.props,{property:"form-style",default:"default"}),d().createElement(Zd,em({value:"default",boxClass:"sui-tab-content sui-tab-boxed"},this.props,{id:"forminator-design-style-forminator"}),Na("Forminator Styles")),d().createElement(Jd,{value:"basic",boxClass:"sui-tab-content",id:"forminator-design-style-basic"},Na("Basic Styles")),d().createElement(Xd,{value:"none",boxClass:"sui-tab-content",id:"forminator-design-style-none"},Na("None")))))}}function sm(){return sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},sm.apply(null,arguments)}class am extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active","aria-live":"assertive",style:{display:"block"}},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note: If value is empty or zero, image will fallback to default size."))))),d().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},d().createElement(il,{cols:"6"},d().createElement(ol,sm({},this.props,{label:Na("Width"),type:"number",placeholder:"0",defaultValue:70,property:`${pa(this.props)}field-image-width`}))),d().createElement(il,{cols:"6"},d().createElement(ol,sm({},this.props,{label:Na("Height"),type:"number",placeholder:"0",defaultValue:70,property:`${pa(this.props)}field-image-height`})))),d().createElement("span",{className:"sui-description"},Na("Set your custom dimensions in pixels.")))}}function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},rm.apply(null,arguments)}class im extends ea.Component{render(){_.isUndefined(this.props.preset);return d().createElement(Fl,{label:Na("Layouts"),labelDark:!0,id:"forminator-section-appearance-layout"},d().createElement("label",{className:"sui-settings-label"},Na("Field description position"),d().createElement("span",{class:"fui-tooltip-description sui-tooltip sui-tooltip-constrained",style:{"--tooltip-width":"170px"},"data-tooltip":Na("Select the default position for field descriptions. You can override this setting in each individual field."),"aria-hidden":"true"},d().createElement("i",{className:"sui-icon-info","aria-hidden":"true"}))),d().createElement(kl,rm({},this.props,{property:"description-position",defaultValue:"below",fieldsize:"md"}),d().createElement("option",{value:"above"},Na("Above Inputs")),d().createElement("option",{value:"below"},Na("Below Inputs"))),d().createElement(ql,rm({},this.props,{property:`${pa(this.props)}field-image-size`,default:"custom",settingsLabel:Na("Radio/Checkbox Image Size"),tooltipDescription:Na("Set radio/checkbox image size."),tooltipWidth:"170px"}),d().createElement(Yl,{value:"auto"},Na("Automatic")),d().createElement(am,rm({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),Na("Custom"))))}}function nm(){return nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},nm.apply(null,arguments)}class om extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement(_c,nm({},this.props,{defaultValue:`${oa(this.props,"#00000000")}`,property:`${pa(this.props)}cform-form-border`,label:Na("Border color"),isAlpha:!0})),d().createElement(_c,nm({},this.props,{defaultValue:`${oa(this.props,"#00000000")}`,property:`${pa(this.props)}cform-form-background`,label:Na("Background color"),isAlpha:!0})))}}function lm(){return lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},lm.apply(null,arguments)}class pm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement(_c,lm({},this.props,{defaultValue:`${oa(this.props,"#777771")}`,property:`${pa(this.props)}cform-label-color`,label:Na("Label")})),d().createElement(_c,lm({},this.props,{defaultValue:`${oa(this.props,"#E51919",!0)}`,property:`${pa(this.props)}cform-asterisk-color`,label:Na("Required asterisk")})),d().createElement(_c,lm({},this.props,{defaultValue:`${oa(this.props,"#777771")}`,property:`${pa(this.props)}label-helper-color`,label:Na("Description")})),"material"!==this.props.formDesign&&d().createElement(_c,lm({},this.props,{defaultValue:`${oa(this.props,"#F9E4E8",!0)}`,property:`${pa(this.props)}label-validation-background`,label:Na("Error message BG"),isAlpha:!0})),d().createElement(_c,lm({},this.props,{defaultValue:"material"!==this.props.formDesign?`${oa(this.props,"#333333",!0)}`:`${oa(this.props,"#E51919",!0)}`,property:`${pa(this.props)}label-validation-color`,label:"material"!==this.props.formDesign?Na("Error message color"):Na("Global error color"),description:"material"===this.props.formDesign?Na("This color will be used when fields throw an error as text color, border color, etc."):""})))}}function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},cm.apply(null,arguments)}class um extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,"material"!==this.props.formDesign&&d().createElement(_c,cm({},this.props,{defaultValue:`${oa(this.props,"#F8F8F8",!0)}`,property:`${pa(this.props)}response-loading-background`,label:Na("Background color"),isAlpha:!0})),d().createElement(_c,cm({},this.props,{defaultValue:`${oa(this.props,"#666666")}`,property:`${pa(this.props)}response-loading-color`,label:Na("Text color")})))}}function dm(){return dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},dm.apply(null,arguments)}class mm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,"flat"!==this.props.formDesign&&d().createElement(_c,dm({},this.props,{defaultValue:`${oa(this.props,"#E51919",!0)}`,property:`${pa(this.props)}response-error-border`,label:Na("Border color"),isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,dm({},this.props,{defaultValue:`${oa(this.props,"#F9E4E8",!0)}`,property:`${pa(this.props)}response-error-background`,label:Na("Background color"),isAlpha:!0})),d().createElement(_c,dm({},this.props,{defaultValue:`${oa(this.props,"#333333")}`,property:`${pa(this.props)}response-error-color`,label:Na("Text color")})))}}function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},hm.apply(null,arguments)}class fm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,"flat"!==this.props.formDesign&&d().createElement(_c,hm({},this.props,{defaultValue:`${oa(this.props,"#067963",!0)}`,property:`${pa(this.props)}response-success-border`,label:Na("Border color"),isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,hm({},this.props,{defaultValue:`${oa(this.props,"#BCEEE6",!0)}`,property:`${pa(this.props)}response-success-background`,label:Na("Background color"),isAlpha:!0})),d().createElement(_c,hm({},this.props,{defaultValue:`${oa(this.props,"#333333")}`,property:`${pa(this.props)}response-success-color`,label:Na("Text color")})))}}function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},bm.apply(null,arguments)}class gm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement(_c,bm({},this.props,{label:Na("Title color"),property:`${pa(this.props)}cform-title-color`,defaultValue:`${oa(this.props,"#333333")}`})),d().createElement(_c,bm({},this.props,{label:Na("Subtitle color"),property:`${pa(this.props)}cform-subtitle-color`,defaultValue:`${oa(this.props,"#333333")}`})))}}function ym(){return ym=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},ym.apply(null,arguments)}class Em extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},"flat"!==this.props.formDesign&&d().createElement(_c,ym({},this.props,{label:Na("Border color"),property:`${pa(this.props)}input-border`,defaultValue:`${oa(this.props,"#777771")}`,isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,ym({},this.props,{label:Na("Background color"),property:`${pa(this.props)}input-bg`,defaultValue:`${oa(this.props,"#EDEDED")}`,isAlpha:!0})),d().createElement(_c,ym({},this.props,{label:Na("Placeholder"),property:`${pa(this.props)}input-placeholder`,defaultValue:`${oa(this.props,"#888888")}`})),d().createElement(_c,ym({},this.props,{label:Na("Text color"),property:`${pa(this.props)}input-color`,defaultValue:`${oa(this.props,"#000000")}`}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},"flat"!==this.props.formDesign&&d().createElement(_c,ym({},this.props,{label:Na("Border color"),property:`${pa(this.props)}input-border-hover`,defaultValue:`${oa(this.props,"#097BAA")}`,isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,ym({},this.props,{label:Na("Background color"),property:`${pa(this.props)}input-hover-bg`,defaultValue:`${oa(this.props,"#E6E6E6")}`,isAlpha:!0})),d().createElement(_c,ym({},this.props,{label:Na("Text color"),property:`${pa(this.props)}input-hover-color`,defaultValue:`${oa(this.props,"#000000")}`}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},"flat"!==this.props.formDesign&&d().createElement(_c,ym({},this.props,{label:Na("Border color"),property:`${pa(this.props)}input-border-active`,defaultValue:`${oa(this.props,"#097BAA")}`,isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,ym({},this.props,{label:Na("Background color"),property:`${pa(this.props)}input-active-bg`,defaultValue:`${oa(this.props,"#E6E6E6")}`,isAlpha:!0})),d().createElement(_c,ym({},this.props,{label:Na("Text color"),property:`${pa(this.props)}input-active-color`,defaultValue:`${oa(this.props,"#000000")}`})),d().createElement(_c,ym({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}input-focus-outline-color`,isAlpha:!0}))),"material"!==this.props.formDesign&&d().createElement(Ql,{label:Na("Error"),value:"error"},d().createElement(_c,ym({},this.props,{defaultValue:`${oa(this.props,"#E51919")}`,property:`${pa(this.props)}input-border-error`,label:Na("Border color"),isAlpha:!0}))))}}function vm(){return vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},vm.apply(null,arguments)}class _m extends ea.Component{constructor(e){super(e)}render(){const e=Va(this.props.wrappers,"date","field_type","picker"),t=ba("calculation",this.props.wrappers),s=ba("currency",this.props.wrappers),a=ba("stripe",this.props.wrappers)||ba("stripe-ocs",this.props.wrappers);let r=d().createElement(ea.Fragment,null,(e||a)&&d().createElement(_c,vm({},this.props,{property:`${pa(this.props)}input-icon`,defaultValue:`${oa(this.props,"#777771")}`,label:Na("Icon color")})),t&&d().createElement(_c,vm({},this.props,{property:`${pa(this.props)}prefix-color`,defaultValue:`${oa(this.props,"#000000")}`,label:Na("Prefix color")})),(s||t)&&d().createElement(_c,vm({},this.props,{property:`${pa(this.props)}suffix-color`,defaultValue:`${oa(this.props,"#000000")}`,label:Na("Suffix color")})));return a&&(r=d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},(e||a)&&d().createElement(_c,vm({},this.props,{property:`${pa(this.props)}input-icon`,defaultValue:`${oa(this.props,"#777771")}`,label:Na("Icon color")})),t&&d().createElement(_c,vm({},this.props,{property:`${pa(this.props)}prefix-color`,defaultValue:`${oa(this.props,"#000000")}`,label:Na("Prefix color")})),(s||t)&&d().createElement(_c,vm({},this.props,{property:`${pa(this.props)}suffix-color`,defaultValue:`${oa(this.props,"#000000")}`,label:Na("Suffix color")}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},a&&d().createElement(_c,vm({},this.props,{property:`${pa(this.props)}input-icon-hover`,defaultValue:`${oa(this.props,"#097BAA")}`,label:Na("Icon color")}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},a&&d().createElement(_c,vm({},this.props,{property:`${pa(this.props)}input-icon-focus`,defaultValue:`${oa(this.props,"#097BAA")}`,label:Na("Icon color")}))))),r}}function wm(){return wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},wm.apply(null,arguments)}class xm extends ea.Component{constructor(e){super(e)}render(){const e="basic"===this.props.formDesign;return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},"flat"!==this.props.formSubDesign&&!e&&d().createElement(_c,wm({},this.props,{defaultValue:`${oa(this.props,"#777771",!0)}`,property:`${pa(this.props)}radio-border-static`,label:Na("Border color"),isAlpha:!0})),!e&&d().createElement(_c,wm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}radio-background-static`,defaultValue:`${oa(this.props,"#EDEDED",!0)}`,isAlpha:!0})),d().createElement(_c,wm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}radio-label`,defaultValue:`${oa(this.props,"#000000")}`})),"flat"!==this.props.formSubDesign&&"material"!==this.props.formSubDesign&&d().createElement(_c,wm({},this.props,{label:Na("Image border"),property:`${pa(this.props)}radio-image-border-static`,defaultValue:`${oa(this.props,"#777771",!0)}`,isAlpha:!0})),"material"!==this.props.formSubDesign&&!e&&d().createElement(_c,wm({},this.props,{label:Na("Image background"),property:`${pa(this.props)}radio-image-background`,defaultValue:`${oa(this.props,"#EDEDED",!0)}`,isAlpha:!0}))),!e&&d().createElement(Ql,{label:Na("Hover"),value:"hover"},"flat"!==this.props.formSubDesign&&d().createElement(_c,wm({},this.props,{defaultValue:`${oa(this.props,"#097BAA",!0)}`,property:`${pa(this.props)}radio-border-hover`,label:Na("Border color"),isAlpha:!0})),("flat"===this.props.formSubDesign||"material"===this.props.formSubDesign)&&d().createElement(_c,wm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}radio-background-hover`,defaultValue:`${oa(this.props,"#E1F6FF",!0)}`,isAlpha:!0}))),!e&&d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,wm({},this.props,{defaultValue:`${oa(this.props,"#254DEB",!0)}`,property:`${pa(this.props)}radio-outline-focus`,label:Na("Outline color"),isAlpha:!0}))),!e&&d().createElement(Ql,{label:Na("Checked"),value:"checked"},"flat"!==this.props.formSubDesign&&d().createElement(_c,wm({},this.props,{label:Na("Border color"),property:`${pa(this.props)}radio-border-active`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),d().createElement(_c,wm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}radio-background-active`,defaultValue:`${oa(this.props,"#EDEDED",!0)}`,isAlpha:!0})),d().createElement(_c,wm({},this.props,{label:Na("Icon color"),property:`${pa(this.props)}radio-icon`,defaultValue:`${oa(this.props,"#097BAA",!0)}`})),"flat"!==this.props.formSubDesign&&"material"!==this.props.formSubDesign&&d().createElement(_c,wm({},this.props,{label:Na("Image border"),property:`${pa(this.props)}radio-image-border-active`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),"material"!==this.props.formSubDesign&&d().createElement(_c,wm({},this.props,{label:Na("Image background"),property:`${pa(this.props)}radio-image-background-active`,defaultValue:`${oa(this.props,"#E1F6FF",!0)}`,isAlpha:!0}))),"material"!==this.props.formSubDesign&&!e&&d().createElement(Ql,{label:Na("Error"),value:"error"},"flat"!==this.props.formSubDesign&&d().createElement(_c,wm({},this.props,{defaultValue:`${oa(this.props,"#E51919",!0)}`,property:`${pa(this.props)}radio-border-error`,label:Na("Border color"),isAlpha:!0})),"flat"===this.props.formSubDesign&&d().createElement(_c,wm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}radio-background-error`,defaultValue:`${oa(this.props,"#F9E4E8",!0)}`,isAlpha:!0}))))}}function Nm(){return Nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Nm.apply(null,arguments)}class Cm extends ea.Component{constructor(e){super(e)}render(){const e="basic"===this.props.formDesign;return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},"flat"!==this.props.formDesign&&!e&&d().createElement(_c,Nm({},this.props,{defaultValue:`${oa(this.props,"#777771",!0)}`,property:`${pa(this.props)}consent-cbox-border-static`,label:Na("Border color"),isAlpha:!0})),!e&&d().createElement(_c,Nm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}consent-cbox-background-static`,defaultValue:`${oa(this.props,"#EDEDED",!0)}`,isAlpha:!0})),d().createElement(_c,Nm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}consent-cbox-label`,defaultValue:`${oa(this.props,"#000000")}`}))),!e&&d().createElement(Ql,{label:Na("Hover"),value:"hover"},"flat"!==this.props.formSubDesign&&d().createElement(_c,Nm({},this.props,{property:`${pa(this.props)}consent-cbox-border-hover`,label:Na("Border color"),isAlpha:!0})),("flat"===this.props.formSubDesign||"material"===this.props.formSubDesign)&&d().createElement(_c,Nm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}consent-cbox-background-hover`,isAlpha:!0}))),!e&&d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Nm({},this.props,{property:`${pa(this.props)}consent-cbox-outline-focus`,label:Na("Outline color"),isAlpha:!0}))),!e&&d().createElement(Ql,{label:Na("Checked"),value:"checked"},"flat"!==this.props.formDesign&&d().createElement(_c,Nm({},this.props,{label:Na("Border color"),property:`${pa(this.props)}consent-cbox-border-active`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),d().createElement(_c,Nm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}consent-cbox-background-active`,defaultValue:`${oa(this.props,"#EDEDED",!0)}`,isAlpha:!0})),d().createElement(_c,Nm({},this.props,{label:Na("Icon color"),property:`${pa(this.props)}consent-cbox-icon`,defaultValue:`${oa(this.props,"#097BAA",!0)}`}))),"material"!==this.props.formDesign&&!e&&d().createElement(Ql,{label:Na("Error"),value:"error"},"flat"!==this.props.formDesign&&d().createElement(_c,Nm({},this.props,{defaultValue:`${oa(this.props,"#E51919",!0)}`,property:`${pa(this.props)}consent-cbox-border-error`,label:Na("Border color"),isAlpha:!0})),"flat"===this.props.formDesign&&d().createElement(_c,Nm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}consent-cbox-background-error`,defaultValue:`${oa(this.props,"#F9E4E8",!0)}`,isAlpha:!0}))))}}function km(){return km=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},km.apply(null,arguments)}class Sm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},"flat"!==this.props.formDesign&&d().createElement(_c,km({},this.props,{label:Na("Border color"),property:`${pa(this.props)}select-border-static`,defaultValue:`${oa(this.props,"#777771",!0)}`,isAlpha:!0})),d().createElement(_c,km({},this.props,{label:Na("Background color"),property:`${pa(this.props)}select-background-static`,defaultValue:`${oa(this.props,"#EDEDED")}`,isAlpha:!0})),d().createElement(_c,km({},this.props,{label:Na("Icon color"),property:`${pa(this.props)}select-icon-static`,defaultValue:`${oa(this.props,"#777771",!0)}`})),d().createElement(_c,km({},this.props,{label:Na("Text color"),property:`${pa(this.props)}select-value-static`,defaultValue:`${oa(this.props,"#000000",!0)}`}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},"flat"!==this.props.formDesign&&d().createElement(_c,km({},this.props,{label:Na("Border color"),property:`${pa(this.props)}select-border-hover`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,km({},this.props,{label:Na("Background color"),property:`${pa(this.props)}select-background-hover`,defaultValue:`${oa(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),d().createElement(_c,km({},this.props,{label:Na("Icon color"),property:`${pa(this.props)}select-icon-hover`,defaultValue:`${oa(this.props,"#097BAA",!0)}`})),d().createElement(_c,km({},this.props,{label:Na("Text color"),property:`${pa(this.props)}select-value-hover`,defaultValue:`${oa(this.props,"#000000",!0)}`}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},"flat"!==this.props.formDesign&&d().createElement(_c,km({},this.props,{label:Na("Border color"),property:`${pa(this.props)}select-border-active`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,km({},this.props,{label:Na("Background color"),property:`${pa(this.props)}select-background-active`,defaultValue:`${oa(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),d().createElement(_c,km({},this.props,{label:Na("Icon color"),property:`${pa(this.props)}select-icon-active`,defaultValue:`${oa(this.props,"#097BAA",!0)}`})),d().createElement(_c,km({},this.props,{label:Na("Text color"),property:`${pa(this.props)}select-value-active`,defaultValue:`${oa(this.props,"#000000",!0)}`})),d().createElement(_c,km({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}select-focus-outline-color`,isAlpha:!0}))),"material"!==this.props.formDesign&&d().createElement(Ql,{label:Na("Error"),value:"error"},d().createElement(_c,km({},this.props,{label:Na("Border color"),property:`${pa(this.props)}select-border-error`,defaultValue:`${oa(this.props,"#E51919",!0)}`,isAlpha:!0}))))}}function Pm(){return Pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Pm.apply(null,arguments)}class Om extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},"flat"!==this.props.formDesign&&"material"!==this.props.formDesign&&d().createElement(_c,Pm({},this.props,{defaultValue:`${oa(this.props,"#097BAA",!0)}`,property:`${pa(this.props)}dropdown-border`,label:Na("Container border"),isAlpha:!0})),d().createElement(_c,Pm({},this.props,{defaultValue:`${oa(this.props,"#E6E6E6",!0)}`,property:`${pa(this.props)}dropdown-background`,label:Na("Container BG"),isAlpha:!0})),d().createElement(_c,Pm({},this.props,{defaultValue:`${oa(this.props,"#777771",!0)}`,property:`${pa(this.props)}dropdown-option-color-static`,label:Na("Option color")}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},d().createElement(_c,Pm({},this.props,{defaultValue:`${oa(this.props,"#DDDDDD",!0)}`,property:`${pa(this.props)}dropdown-option-background-hover`,label:Na("Option background"),isAlpha:!0})),d().createElement(_c,Pm({},this.props,{defaultValue:`${oa(this.props,"#000000",!0)}`,property:`${pa(this.props)}dropdown-option-color-hover`,label:Na("Option color")}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Pm({},this.props,{property:`${pa(this.props)}dropdown-option-outline-focus`,label:Na("Outline color"),isAlpha:!0}))),d().createElement(Ql,{label:Na("Selected"),value:"selected"},d().createElement(_c,Pm({},this.props,{defaultValue:`${oa(this.props,"#097BAA",!0)}`,property:`${pa(this.props)}dropdown-option-background-active`,label:Na("Option background"),isAlpha:!0})),d().createElement(_c,Pm({},this.props,{defaultValue:`${oa(this.props,"#FFFFFF",!0)}`,property:`${pa(this.props)}dropdown-option-color-active`,label:Na("Option color")}))))}}function Dm(){return Dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Dm.apply(null,arguments)}class Fm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},"flat"!==this.props.formDesign&&"material"!==this.props.formDesign&&d().createElement(_c,Dm({},this.props,{defaultValue:`${oa(this.props,"#097BAA")}`,property:`${pa(this.props)}dropdown-search-border`,label:Na("Border color"),isAlpha:!0})),d().createElement(_c,Dm({},this.props,{defaultValue:`${oa(this.props,"#FFFFFF")}`,property:`${pa(this.props)}dropdown-search-background`,label:Na("Background color"),isAlpha:!0})),d().createElement(_c,Dm({},this.props,{defaultValue:`${oa(this.props,"#000000")}`,property:`${pa(this.props)}dropdown-search-color`,label:Na("Text color")}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Dm({},this.props,{property:`${pa(this.props)}dropdown-search-outline-focus`,label:Na("Outline color"),isAlpha:!0}))))}}function Am(){return Am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Am.apply(null,arguments)}class Tm extends ea.Component{constructor(e){super(e)}render(){const e=Va(this.props.wrappers,"select","multiselect_style","modern");let t=Va(this.props.wrappers,"select","multiselect_style","standard");return!1===e&&!1===t&&(t=!0),d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},t&&d().createElement(Fl,null,"flat"!==this.props.formDesign&&d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#777771",!0)}`,property:`${pa(this.props)}multiselect-border`,label:"material"!==this.props.formDesign?Na("Container border"):Na("Option border"),isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#E6E6E6")}`,property:`${pa(this.props)}multiselect-background`,label:Na("Container BG"),isAlpha:!0})),d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#777771",!0)}`,property:`${pa(this.props)}multiselect-item-color-static`,label:Na("Option color")}))),e&&d().createElement(Fl,null,d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#888888")}`,property:`${pa(this.props)}multiselect-tag-background-static`,label:Na("Tag background color")})),d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#FFFFFF",!0)}`,property:`${pa(this.props)}multiselect-tag-color-static`,label:Na("Tag text color")})),d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#FFFFFF",!0)}`,property:`${pa(this.props)}multiselect-tag-remove-color-static`,label:Na("Remove tag color")})))),t&&d().createElement(Ql,{label:Na("Hover"),value:"hover"},"material"===this.props.formDesign&&d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#000000",!0)}`,property:`${pa(this.props)}multiselect-border-hover`,label:Na("Option border"),isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#DDDDDD",!0)}`,property:`${pa(this.props)}multiselect-item-bg-hover`,label:Na("Option background"),isAlpha:!0})),d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#000000",!0)}`,property:`${pa(this.props)}multiselect-item-color-hover`,label:Na("Option color")}))),t&&d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Am({},this.props,{property:`${pa(this.props)}multiselect-item-outline-focus`,label:Na("Outline color"),isAlpha:!0}))),t&&d().createElement(Ql,{label:Na("Selected"),value:"selected"},"material"===this.props.formDesign&&d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#097BAA",!0)}`,property:`${pa(this.props)}multiselect-border-active`,label:Na("Option border"),isAlpha:!0})),"material"!==this.props.formDesign&&d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#097BAA",!0)}`,property:`${pa(this.props)}multiselect-item-bg-active`,label:Na("Option background"),isAlpha:!0})),d().createElement(_c,Am({},this.props,{defaultValue:"material"!==this.props.formDesign?oa(this.props,"#FFFFFF",!0):oa(this.props,"#097BAA",!0),property:`${pa(this.props)}multiselect-item-color-active`,label:Na("Option color")}))),t&&"material"!==this.props.formDesign&&d().createElement(Ql,{label:Na("Error"),value:"error"},d().createElement(_c,Am({},this.props,{defaultValue:`${oa(this.props,"#E51919",!0)}`,property:`${pa(this.props)}multiselect-border-error`,label:Na("Container border"),isAlpha:!0}))))}}function Mm(){return Mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Mm.apply(null,arguments)}class jm extends ea.Component{constructor(e){super(e)}render(){const e=this.props.formDesign,t=pa(this.props);this.props.settings[`${t}cform-color-option`];return d().createElement(Zl,{default:"container",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Container"),value:"container"},"flat"!==e&&d().createElement(_c,Mm({},this.props,{label:Na(""!==e?"Border":"Header background"),property:`${pa(this.props)}calendar-border`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),d().createElement(_c,Mm({},this.props,{label:Na(""!==e?"Background":"Main background"),property:`${pa(this.props)}calendar-background`,defaultValue:`${oa(this.props,"#E6E6E6",!0)}`,isAlpha:!0}))),d().createElement(Ql,{label:Na("Navigation"),value:"navigation"},"material"!==e&&d().createElement(_c,Mm({},this.props,{label:Na("Arrows background"),property:`${pa(this.props)}calendar-arrows-bg`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),d().createElement(_c,Mm({},this.props,{label:Na("Arrows color"),property:`${pa(this.props)}calendar-arrows-static`,defaultValue:`${oa(this.props,"#FFFFFF",!0)}`,isAlpha:!0}))),d().createElement(Ql,{label:Na("Select"),value:"select"},"flat"!==e&&d().createElement(_c,Mm({},this.props,{label:Na("Border"),property:`${pa(this.props)}calendar-select-border`,defaultValue:`${oa(this.props,"#BBBBBB",!0)}`,isAlpha:!0})),d().createElement(_c,Mm({},this.props,{label:Na("Background"),property:`${pa(this.props)}calendar-select-bg`,defaultValue:`${oa(this.props,"#FFFFFF",!0)}`,isAlpha:!0})),d().createElement(_c,Mm({},this.props,{label:Na("Color"),property:`${pa(this.props)}calendar-select-color`,defaultValue:`${oa(this.props,"#777771",!0)}`,isAlpha:!0}))))}}function Um(){return Um=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Um.apply(null,arguments)}class Vm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{value:"default",label:Na("Default")},"flat"!==this.props.formDesign&&d().createElement(_c,Um({},this.props,{label:Na("Border color"),property:`${pa(this.props)}signature-border-default`,defaultValue:`${oa(this.props,"#777771",!0)}`})),"material"!==this.props.formDesign&&d().createElement(_c,Um({},this.props,{label:Na("Background color"),property:`${pa(this.props)}signature-background-default`,defaultValue:`${oa(this.props,"#EDEDED",!0)}`})),d().createElement(_c,Um({},this.props,{label:Na("Placeholder"),property:`${pa(this.props)}signature-placeholder`,defaultValue:`${oa(this.props,"#888888")}`})),d().createElement(_c,Um({},this.props,{label:Na("Signature Color"),property:`${pa(this.props)}signature-color`,defaultValue:`${oa(this.props,"#000000",!0)}`})),d().createElement(_c,Um({},this.props,{label:Na("Reset icon color"),property:`${pa(this.props)}signature-reset-icon-default`,defaultValue:`${oa(this.props,"#888888",!0)}`}))),d().createElement(Ql,{value:"hover",label:Na("Hover")},"flat"!==this.props.formDesign&&d().createElement(_c,Um({},this.props,{label:Na("Border color"),property:`${pa(this.props)}signature-border-hover`,defaultValue:`${oa(this.props,"#097BAA",!0)}`})),"material"!==this.props.formDesign&&d().createElement(_c,Um({},this.props,{label:Na("Background color"),property:`${pa(this.props)}signature-background-hover`,defaultValue:`${oa(this.props,"#E6E6E6",!0)}`})),d().createElement(_c,Um({},this.props,{label:Na("Reset icon color"),property:`${pa(this.props)}signature-reset-icon-hover`,defaultValue:`${oa(this.props,"#097BAA",!0)}`}))),d().createElement(Ql,{value:"error",label:Na("Error")},d().createElement(_c,Um({},this.props,{label:Na("Border color"),property:`${pa(this.props)}signature-border-error`,defaultValue:`${oa(this.props,"#E51919",!0)}`}))))}}function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},$m.apply(null,arguments)}class Im extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement(_c,$m({},this.props,{defaultValue:`${oa(this.props,"rgba(248,248,248,.5)",!0)}`,property:`${pa(this.props)}group-background`,label:Na("Background color"),isAlpha:!0})),d().createElement(_c,$m({},this.props,{defaultValue:`${oa(this.props,"rgba(221,221,221,.5)",!0)}`,property:`${pa(this.props)}group-border`,label:Na("Border color"),isAlpha:!0})),d().createElement(_c,$m({},this.props,{defaultValue:`${oa(this.props,"rgba(170,170,170,.5)",!0)}`,property:`${pa(this.props)}group-divider`,label:Na("Divider color"),isAlpha:!0})))}}function Rm(){return Rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Rm.apply(null,arguments)}class Lm extends ea.Component{constructor(e){super(e)}render(){return d().createElement("div",{className:"sui-box"},d().createElement(lp,Rm({},this.props,{label:Na("Button")}),d().createElement(Zl,{default:"default",extraClass:"sui-tabs-flushed",type:"tabs"},d().createElement(Ql,{value:"default",label:Na("Default")},d().createElement(_c,Rm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}repeater-button-background`,defaultValue:`${oa(this.props,"#F8F8F8")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}repeater-button`,defaultValue:`${oa(this.props,"#666666")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Border color"),property:`${pa(this.props)}repeater-border`,defaultValue:`${oa(this.props,"#AAAAAA")}`}))),d().createElement(Ql,{value:"hover",label:Na("Hover")},d().createElement(_c,Rm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}repeater-button-background-hover`,defaultValue:`${oa(this.props,"#F1F1F1")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}repeater-button-hover`,defaultValue:`${oa(this.props,"#666666")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Border color"),property:`${pa(this.props)}repeater-border-hover`,defaultValue:`${oa(this.props,"#AAAAAA")}`}))),d().createElement(Ql,{value:"focus",label:Na("Focus")},d().createElement(_c,Rm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}repeater-button-background-focus`,defaultValue:`${oa(this.props,"#F1F1F1")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}repeater-button-focus`,defaultValue:`${oa(this.props,"#666666")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Border color"),property:`${pa(this.props)}repeater-border-focus`,defaultValue:`${oa(this.props,"#AAAAAA")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}repeater-button-outline-focus`}))))),d().createElement(lp,Rm({},this.props,{label:Na("Icon")}),d().createElement(Zl,{default:"default",extraClass:"sui-tabs-flushed",type:"tabs"},d().createElement(Ql,{value:"default",label:Na("Default")},d().createElement(_c,Rm({},this.props,{label:Na("Color"),property:`${pa(this.props)}repeater-icon`,defaultValue:`${oa(this.props,"#888888")}`}))),d().createElement(Ql,{value:"hover",label:Na("Hover")},d().createElement(_c,Rm({},this.props,{label:Na("Color"),property:`${pa(this.props)}repeater-icon-hover`,defaultValue:`${oa(this.props,"#888888")}`}))),d().createElement(Ql,{value:"focus",label:Na("Focus")},d().createElement(_c,Rm({},this.props,{label:Na("Color"),property:`${pa(this.props)}repeater-icon-focus`,defaultValue:`${oa(this.props,"#888888")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}repeater-icon-outline-focus`}))))),d().createElement(lp,Rm({},this.props,{label:Na("Link")}),d().createElement(Zl,{default:"default",extraClass:"sui-tabs-flushed",type:"tabs"},d().createElement(Ql,{value:"default",label:Na("Default")},d().createElement(_c,Rm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}repeater-link`,defaultValue:`${oa(this.props,"#097BAA")}`}))),d().createElement(Ql,{value:"hover",label:Na("Hover")},d().createElement(_c,Rm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}repeater-link-hover`,defaultValue:`${oa(this.props,"#097BAA")}`}))),d().createElement(Ql,{value:"focus",label:Na("Focus")},d().createElement(_c,Rm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}repeater-link-focus`,defaultValue:`${oa(this.props,"#097BAA")}`})),d().createElement(_c,Rm({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}repeater-link-outline-focus`}))))))}}function Bm(){return Bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Bm.apply(null,arguments)}class zm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},d().createElement(_c,Bm({},this.props,{label:Na("Table head color"),property:`${pa(this.props)}calendar-dweek`,defaultValue:`${oa(this.props,"#333333",!0)}`,isAlpha:!0})),"flat"!==this.props.formDesign&&d().createElement(_c,Bm({},this.props,{label:Na("Table cell border"),property:`${pa(this.props)}calendar-days-border-static`,defaultValue:`${oa(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),d().createElement(_c,Bm({},this.props,{label:Na("Table cell BG"),property:`${pa(this.props)}calendar-days-background-static`,defaultValue:`${oa(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),d().createElement(_c,Bm({},this.props,{label:Na("Table cell color"),property:`${pa(this.props)}calendar-days-color-static`,defaultValue:`${oa(this.props,"#777771",!0)}`,isAlpha:!0}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},"flat"!==this.props.formDesign&&d().createElement(_c,Bm({},this.props,{label:Na("Table cell border"),property:`${pa(this.props)}calendar-days-border-hover`,defaultValue:`${oa(this.props,"#DDDDDD",!0)}`,isAlpha:!0})),d().createElement(_c,Bm({},this.props,{label:Na("Table cell BG"),property:`${pa(this.props)}calendar-days-background-hover`,defaultValue:`${oa(this.props,"#DDDDDD",!0)}`,isAlpha:!0})),d().createElement(_c,Bm({},this.props,{label:Na("Table cell color"),property:`${pa(this.props)}calendar-days-color-hover`,defaultValue:`${oa(this.props,"#777771",!0)}`}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Bm({},this.props,{property:`${pa(this.props)}calendar-outline-focus`,label:Na("Outline color"),isAlpha:!0}))),d().createElement(Ql,{label:Na("Active"),value:"active"},"flat"!==this.props.formDesign&&d().createElement(_c,Bm({},this.props,{label:Na("Table cell border"),property:`${pa(this.props)}calendar-days-border-active`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),d().createElement(_c,Bm({},this.props,{label:Na("Table cell BG"),property:`${pa(this.props)}calendar-days-background-active`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),d().createElement(_c,Bm({},this.props,{label:Na("Table cell color"),property:`${pa(this.props)}calendar-days-color-active`,defaultValue:`${oa(this.props,"#FFFFFF",!0)}`}))),d().createElement(Ql,{label:Na("Current"),value:"current"},"flat"!==this.props.formDesign&&d().createElement(_c,Bm({},this.props,{label:Na("Table cell border"),property:`${pa(this.props)}calendar-days-border-current`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),d().createElement(_c,Bm({},this.props,{label:Na("Table cell BG"),property:`${pa(this.props)}calendar-days-background-current`,defaultValue:`${oa(this.props,"#C8DEE7",!0)}`,isAlpha:!0})),d().createElement(_c,Bm({},this.props,{label:Na("Table cell color"),property:`${pa(this.props)}calendar-days-color-current`,defaultValue:`${oa(this.props,"#097BAA",!0)}`}))))}}function Wm(){return Wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Wm.apply(null,arguments)}class Hm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"border",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Border"),value:"border"},d().createElement(_c,Wm({},this.props,{label:Na("Default"),property:`${pa(this.props)}timeline-border`,defaultValue:`${oa(this.props,"#777771",!0)}`,isAlpha:!0})),"bold"!==this.props.formDesign&&"material"!==this.props.formDesign&&d().createElement(_c,Wm({},this.props,{label:Na("Current"),property:`${pa(this.props)}timeline-border-current`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Wm({},this.props,{property:`${pa(this.props)}steps-outline-focus`,label:Na("Outline color"),isAlpha:!0}))),d().createElement(Ql,{label:Na("Label"),value:"label"},d().createElement(_c,Wm({},this.props,{label:Na("Default"),property:`${pa(this.props)}timeline-text`,defaultValue:`${oa(this.props,"#777771",!0)}`})),d().createElement(_c,Wm({},this.props,{label:Na("Current"),property:`${pa(this.props)}timeline-text-current`,defaultValue:`${oa(this.props,"#097BAA",!0)}`}))),d().createElement(Ql,{label:Na("Dot"),value:"dot"},d().createElement(Fl,null,d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Default state colors"))),"material"!==this.props.formDesign&&d().createElement(_c,Wm({},this.props,{label:Na("Border"),property:`${pa(this.props)}timeline-dot-border`,defaultValue:`${oa(this.props,"#777771",!0)}`,isAlpha:!0})),d().createElement(_c,Wm({},this.props,{label:Na("Background"),property:`${pa(this.props)}timeline-dot-background`,defaultValue:`${oa(this.props,"#777771",!0)}`,isAlpha:!0})),"material"===this.props.formDesign&&d().createElement(_c,Wm({},this.props,{label:Na("Page number color"),property:`${pa(this.props)}timeline-dot-color`,defaultValue:`${oa(this.props,"#FFFFFF",!0)}`}))),d().createElement(Fl,null,d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label sui-dark"},Na("Current state colors"))),"material"!==this.props.formDesign&&d().createElement(_c,Wm({},this.props,{label:Na("Border"),property:`${pa(this.props)}timeline-dot-border-current`,defaultValue:`${oa(this.props,"#777771",!0)}`,isAlpha:!0})),d().createElement(_c,Wm({},this.props,{label:Na("Background"),property:`${pa(this.props)}timeline-dot-background-current`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})),"material"===this.props.formDesign&&d().createElement(_c,Wm({},this.props,{label:Na("Page number color"),property:`${pa(this.props)}timeline-dot-color-current`,defaultValue:`${oa(this.props,"#FFFFFF",!0)}`})))))}}function qm(){return qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},qm.apply(null,arguments)}class Qm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement(_c,qm({},this.props,{label:Na("Label"),property:`${pa(this.props)}progress-label`,defaultValue:`${oa(this.props,"#777771",!0)}`})),d().createElement(_c,qm({},this.props,{label:Na("Progress bar BG"),property:`${pa(this.props)}progress-background`,defaultValue:`${oa(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),d().createElement(_c,qm({},this.props,{label:Na("Progress status BG"),property:`${pa(this.props)}progress-background-status`,defaultValue:`${oa(this.props,"#097BAA",!0)}`,isAlpha:!0})))}}function Ym(){return Ym=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ym.apply(null,arguments)}class Gm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},d().createElement(_c,Ym({},this.props,{label:Na("Background color"),property:`${pa(this.props)}prev-background-static`,defaultValue:`${oa(this.props,"#067963")}`,isAlpha:!0})),d().createElement(_c,Ym({},this.props,{label:Na("Label color"),property:`${pa(this.props)}prev-color-static`,defaultValue:`${oa(this.props,"#FFFFFF")}`}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},d().createElement(_c,Ym({},this.props,{label:Na("Background color"),property:`${pa(this.props)}prev-background-hover`,defaultValue:`${oa(this.props,"#05614F")}`,isAlpha:!0})),d().createElement(_c,Ym({},this.props,{label:Na("Label color"),property:`${pa(this.props)}prev-color-hover`,defaultValue:`${oa(this.props,"#FFFFFF")}`}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Ym({},this.props,{label:Na("Background color"),property:`${pa(this.props)}prev-background-active`,defaultValue:`${oa(this.props,"#05614F")}`,isAlpha:!0})),d().createElement(_c,Ym({},this.props,{label:Na("Label color"),property:`${pa(this.props)}prev-color-active`,defaultValue:`${oa(this.props,"#FFFFFF")}`})),d().createElement(_c,Ym({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}prev-focus-outline-color`,isAlpha:!0}))))}}function Km(){return Km=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Km.apply(null,arguments)}class Jm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},d().createElement(_c,Km({},this.props,{label:Na("Background color"),property:`${pa(this.props)}next-background-static`,defaultValue:`${oa(this.props,"#067963")}`,isAlpha:!0})),d().createElement(_c,Km({},this.props,{label:Na("Label color"),property:`${pa(this.props)}next-color-static`,defaultValue:`${oa(this.props,"#FFFFFF")}`}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},d().createElement(_c,Km({},this.props,{label:Na("Background color"),property:`${pa(this.props)}next-background-hover`,defaultValue:`${oa(this.props,"#05614F")}`,isAlpha:!0})),d().createElement(_c,Km({},this.props,{label:Na("Label color"),property:`${pa(this.props)}next-color-hover`,defaultValue:`${oa(this.props,"#FFFFFF")}`}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Km({},this.props,{label:Na("Background color"),property:`${pa(this.props)}next-background-active`,defaultValue:`${oa(this.props,"#05614F")}`,isAlpha:!0})),d().createElement(_c,Km({},this.props,{label:Na("Label color"),property:`${pa(this.props)}next-color-active`,defaultValue:`${oa(this.props,"#FFFFFF")}`})),d().createElement(_c,Km({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}next-focus-outline-color`,isAlpha:!0}))))}}function Zm(){return Zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Zm.apply(null,arguments)}class Xm extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},d().createElement(_c,Zm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}button-submit-background-static`,defaultValue:`${oa(this.props,"#097BAA")}`,isAlpha:!0})),d().createElement(_c,Zm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}button-submit-color-static`,defaultValue:`${oa(this.props,"#FFFFFF")}`}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},d().createElement(_c,Zm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}button-submit-background-hover`,defaultValue:`${oa(this.props,"#086A91")}`,isAlpha:!0})),d().createElement(_c,Zm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}button-submit-color-hover`,defaultValue:`${oa(this.props,"#FFFFFF")}`}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,Zm({},this.props,{label:Na("Background color"),property:`${pa(this.props)}button-submit-background-active`,defaultValue:`${oa(this.props,"#086A91")}`,isAlpha:!0})),d().createElement(_c,Zm({},this.props,{label:Na("Text color"),property:`${pa(this.props)}button-submit-color-active`,defaultValue:`${oa(this.props,"#FFFFFF")}`})),d().createElement(_c,Zm({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}button-submit-focus-outline-color`,isAlpha:!0}))))}}function eh(){return eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},eh.apply(null,arguments)}class th extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},d().createElement(_c,eh({},this.props,{label:Na("Background color"),property:`${pa(this.props)}button-upload-background-static`,defaultValue:`${oa(this.props,"#1ABC9C")}`,isAlpha:!0})),d().createElement(_c,eh({},this.props,{label:Na("Text color"),property:`${pa(this.props)}button-upload-color-static`,defaultValue:`${oa(this.props,"#FFFFFF")}`}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},d().createElement(_c,eh({},this.props,{label:Na("Background color"),property:`${pa(this.props)}button-upload-background-hover`,defaultValue:`${oa(this.props,"#01A383")}`,isAlpha:!0})),d().createElement(_c,eh({},this.props,{label:Na("Text color"),property:`${pa(this.props)}button-upload-color-hover`,defaultValue:`${oa(this.props,"#FFFFFF")}`}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,eh({},this.props,{label:Na("Background color"),property:`${pa(this.props)}button-upload-background-active`,defaultValue:`${oa(this.props,"#01A383")}`,isAlpha:!0})),d().createElement(_c,eh({},this.props,{label:Na("Text color"),property:`${pa(this.props)}button-upload-color-active`,defaultValue:`${oa(this.props,"#FFFFFF")}`})),d().createElement(_c,eh({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}button-upload-focus-outline-color`,isAlpha:!0}))))}}function sh(){return sh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},sh.apply(null,arguments)}class ah extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{value:"default",label:Na("Default")},"material"!==this.props.formDesign&&d().createElement(_c,sh({},this.props,{label:Na("Background color"),property:`${pa(this.props)}multiupload-panel-background-default`,defaultValue:`${oa(this.props,"#EDEDED")}`,isAlpha:!0})),"flat"!==this.props.formDesign&&d().createElement(_c,sh({},this.props,{label:Na("Border color"),property:`${pa(this.props)}multiupload-panel-border-default`,defaultValue:`${oa(this.props,"#777771")}`,isAlpha:!0})),d().createElement(_c,sh({},this.props,{label:Na("Cloud icon color"),property:`${pa(this.props)}multiupload-panel-icon-default`,defaultValue:`${oa(this.props,"#777771")}`,isAlpha:!0})),d().createElement(_c,sh({},this.props,{label:Na("Message text color"),property:`${pa(this.props)}multiupload-panel-text-default`,defaultValue:`${oa(this.props,"#666666")}`})),d().createElement(_c,sh({},this.props,{label:Na("Message link color"),property:`${pa(this.props)}multiupload-panel-link-default`,defaultValue:`${oa(this.props,"#097BAA")}`}))),d().createElement(Ql,{value:"hover",label:Na("Hover")},"material"!==this.props.formDesign&&d().createElement(_c,sh({},this.props,{label:Na("Background color"),property:`${pa(this.props)}multiupload-panel-background-hover`,defaultValue:`${oa(this.props,"#E6E6E6")}`,isAlpha:!0})),"flat"!==this.props.formDesign&&d().createElement(_c,sh({},this.props,{label:Na("Border color"),property:`${pa(this.props)}multiupload-panel-border-hover`,defaultValue:`${oa(this.props,"#097BAA")}`,isAlpha:!0})),d().createElement(_c,sh({},this.props,{label:Na("Cloud icon color"),property:`${pa(this.props)}multiupload-panel-icon-hover`,defaultValue:`${oa(this.props,"#777771")}`,isAlpha:!0}))),d().createElement(Ql,{value:"focus",label:Na("Focus")},d().createElement(_c,sh({},this.props,{label:Na("Outline color"),property:`${pa(this.props)}multiupload-panel-focus-outline-color`,isAlpha:!0})),d().createElement(_c,sh({},this.props,{label:Na("Message link outline color"),property:`${pa(this.props)}multiupload-panel-link-focus-outline-color`,isAlpha:!0}))),d().createElement(Ql,{value:"drop",label:Na("Drop")},"material"!==this.props.formDesign&&d().createElement(_c,sh({},this.props,{label:Na("Background color"),property:`${pa(this.props)}multiupload-panel-background-drop`,defaultValue:`${oa(this.props,"#E1F6FF")}`,isAlpha:!0})),"flat"!==this.props.formDesign&&d().createElement(_c,sh({},this.props,{label:Na("Border color"),property:`${pa(this.props)}multiupload-panel-border-drop`,defaultValue:`${oa(this.props,"#097BAA")}`,isAlpha:!0})),d().createElement(_c,sh({},this.props,{label:Na("Cloud icon color"),property:`${pa(this.props)}multiupload-panel-icon-drop`,defaultValue:`${oa(this.props,"#097BAA")}`,isAlpha:!0}))),d().createElement(Ql,{value:"error",label:Na("Error")},"material"!==this.props.formDesign&&d().createElement(_c,sh({},this.props,{label:Na("Background color"),property:`${pa(this.props)}multiupload-panel-background-error`,defaultValue:`${oa(this.props,"#EDEDED")}`,isAlpha:!0})),d().createElement(_c,sh({},this.props,{label:"flat"===this.props.formDesign?Na("Left border color"):Na("Border color"),property:`${pa(this.props)}multiupload-panel-border-error`,defaultValue:`${oa(this.props,"#E51919")}`,isAlpha:!0})),d().createElement(_c,sh({},this.props,{label:Na("Cloud icon color"),property:`${pa(this.props)}multiupload-panel-icon-error`,defaultValue:`${oa(this.props,"#777771")}`,isAlpha:!0}))))}}function rh(){return rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},rh.apply(null,arguments)}class ih extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{value:"default",label:Na("Default")},"flat"!==this.props.formDesign&&d().createElement(_c,rh({},this.props,{label:Na("File preview border color"),description:Na("Default state border will not appear when file uploaded is an image."),property:`${pa(this.props)}multiupload-file-preview-border-default`,defaultValue:`${oa(this.props,"#777771")}`})),"material"!==this.props.formDesign&&d().createElement(_c,rh({},this.props,{label:Na("File preview background color"),property:`${pa(this.props)}multiupload-file-preview-background-default`,defaultValue:"flat"===this.props.formDesign?oa(this.props,"#EDEDED"):oa(this.props,"#FFFFFF")})),d().createElement(_c,rh({},this.props,{label:Na("File preview icon color"),property:`${pa(this.props)}multiupload-file-preview-icon-default`,defaultValue:`${oa(this.props,"#777771")}`})),d().createElement(_c,rh({},this.props,{label:Na("File name color"),property:`${pa(this.props)}multiupload-file-name-default`,defaultValue:`${oa(this.props,"#333333")}`})),d().createElement(_c,rh({},this.props,{label:Na("File size color"),property:`${pa(this.props)}multiupload-file-size-default`,defaultValue:`${oa(this.props,"#888888")}`})),d().createElement(_c,rh({},this.props,{label:Na("Loading icon color"),property:`${pa(this.props)}multiupload-file-loader-color`,defaultValue:`${oa(this.props,"#888888")}`}))),d().createElement(Ql,{value:"error",label:Na("Error")},d().createElement(_c,rh({},this.props,{label:Na("File preview border color"),property:`${pa(this.props)}multiupload-file-preview-border-error`,defaultValue:`${oa(this.props,"#E51919")}`})),"material"!==this.props.formDesign&&d().createElement(_c,rh({},this.props,{label:Na("File preview background color"),property:`${pa(this.props)}multiupload-file-preview-background-error`,defaultValue:"flat"===this.props.formDesign?oa(this.props,"#EDEDED"):oa(this.props,"#FFFFFF")})),d().createElement(_c,rh({},this.props,{label:Na("File preview icon color"),property:`${pa(this.props)}multiupload-file-preview-icon-error`,defaultValue:`${oa(this.props,"#777771")}`})),d().createElement(_c,rh({},this.props,{label:Na("File size icon color"),property:`${pa(this.props)}multiupload-file-error-color`,defaultValue:`${oa(this.props,"#E51919")}`}))))}}function nh(){return nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},nh.apply(null,arguments)}class oh extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},d().createElement(_c,nh({},this.props,{defaultValue:`${oa(this.props,"#00000000")}`,property:`${pa(this.props)}button-upload-delete-background-static`,label:Na("Background color"),isAlpha:!0})),d().createElement(_c,nh({},this.props,{defaultValue:`${oa(this.props,"#E51919")}`,property:`${pa(this.props)}button-upload-delete-color-static`,label:Na("Icon color")}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},d().createElement(_c,nh({},this.props,{defaultValue:`${oa(this.props,"#F9E4E8")}`,property:`${pa(this.props)}button-upload-delete-background-hover`,label:Na("Background color"),isAlpha:!0})),d().createElement(_c,nh({},this.props,{defaultValue:`${oa(this.props,"#E51919")}`,property:`${pa(this.props)}button-upload-delete-color-hover`,label:Na("Icon color")}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,nh({},this.props,{defaultValue:`${oa(this.props,"#F9E4E8")}`,property:`${pa(this.props)}button-upload-delete-background-active`,label:Na("Background color"),isAlpha:!0})),d().createElement(_c,nh({},this.props,{defaultValue:`${oa(this.props,"#E51919")}`,property:`${pa(this.props)}button-upload-delete-color-active`,label:Na("Icon color")})),d().createElement(_c,nh({},this.props,{property:`${pa(this.props)}button-upload-delete-focus-outline-color`,label:Na("Outline color"),isAlpha:!0}))))}}function lh(){return lh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},lh.apply(null,arguments)}class ph extends ea.Component{constructor(e){super(e)}render(){const e=Va(this.props.wrappers,"upload","file-type","single")||Va(this.props.wrappers,"postdata","post_image","false"),t=Va(this.props.wrappers,"upload","file-type","multiple");return d().createElement("div",{className:"sui-box"},e&&d().createElement(ea.Fragment,null,d().createElement(lp,lh({},this.props,{label:Na("Single File Uploader")}),d().createElement(th,this.props))),t&&d().createElement(ea.Fragment,null,d().createElement(lp,lh({},this.props,{label:Na("Multiple Files Uploader")}),d().createElement(ah,this.props)),d().createElement(lp,lh({},this.props,{label:Na("Uploaded File")}),d().createElement(ih,this.props))),d().createElement(lp,lh({},this.props,{label:Na("Uploaded File Delete Button")}),d().createElement(oh,this.props)))}}function ch(){return ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},ch.apply(null,arguments)}class uh extends ea.Component{constructor(e){super(e)}render(){return d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},"flat"!==this.props.formDesign&&"material"!==this.props.formDesign&&d().createElement(_c,ch({},this.props,{defaultValue:`${oa(this.props,"#AAAAAA",!0)}`,property:`${pa(this.props)}rating-icon`,label:Na("Rating icon color"),isAlpha:!0})),d().createElement(_c,ch({},this.props,{defaultValue:`${oa(this.props,"#888888",!0)}`,property:`${pa(this.props)}rating-suffix`,label:Na("Suffix text color"),isAlpha:!0}))),d().createElement(Ql,{label:Na("Hover"),value:"hover"},d().createElement(_c,ch({},this.props,{defaultValue:`${oa(this.props,"#FF7E41",!0)}`,property:`${pa(this.props)}rating-icon-hover`,label:Na("Rating icon color"),isAlpha:!0}))),d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,ch({},this.props,{property:`${pa(this.props)}rating-focus-outline-color`,label:Na("Outline color"),isAlpha:!0}))),d().createElement(Ql,{label:Na("Selected"),value:"selected"},d().createElement(_c,ch({},this.props,{defaultValue:`${oa(this.props,"#FF7E41",!0)}`,property:`${pa(this.props)}rating-icon-active`,label:Na("Rating icon color"),isAlpha:!0}))))}}function dh(){return dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},dh.apply(null,arguments)}class mh extends ea.Component{constructor(e){super(e)}render(){const e="basic"===this.props.formDesign,t="default"===this.props.formDesign&&("flat"===this.props.formSubDesign||"material"===this.props.formSubDesign);let s="#EDEDED";return"material"===this.props.formSubDesign?s="#777771":"flat"===this.props.formSubDesign&&(s="#DDDDDD"),d().createElement(Zl,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},d().createElement(Ql,{label:Na("Default"),value:"default"},!e&&d().createElement(d().Fragment,null,d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,s,!0)}`,property:`${pa(this.props)}slider-track`,label:Na("Slider track color"),isAlpha:!0})),!t&&d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#777771",!0)}`,property:`${pa(this.props)}slider-track-border`,label:Na("Slider track border color"),isAlpha:!0})),d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#097BAA",!0)}`,property:`${pa(this.props)}slider-track-fill`,label:Na("Slider track fill color"),isAlpha:!0})),d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#097BAA",!0)}`,property:`${pa(this.props)}slider-handle`,label:Na("Handle color"),isAlpha:!0}))),d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#333333",!0)}`,property:`${pa(this.props)}slider-selected-value`,label:Na("Selected value color"),isAlpha:!0})),d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#888888",!0)}`,property:`${pa(this.props)}slider-steps-value`,label:Na("Step number color"),isAlpha:!0})),d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#888888",!0)}`,property:`${pa(this.props)}slider-custom-label-value`,label:Na("Custom Min/Max label color"),isAlpha:!0}))),!e&&d().createElement(Ql,{label:Na("Hover"),value:"hover"},d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,s,!0)}`,property:`${pa(this.props)}slider-track-hover`,label:Na("Slider track color"),isAlpha:!0})),!t&&d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#777771",!0)}`,property:`${pa(this.props)}slider-track-border-hover`,label:Na("Slider track border color"),isAlpha:!0})),d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#086A91",!0)}`,property:`${pa(this.props)}slider-track-fill-hover`,label:Na("Slider track fill color"),isAlpha:!0})),d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#086A91",!0)}`,property:`${pa(this.props)}slider-handle-hover`,label:Na("Handle color"),isAlpha:!0}))),!e&&d().createElement(Ql,{label:Na("Focus"),value:"focus"},d().createElement(_c,dh({},this.props,{property:`${pa(this.props)}slider-handle-outline-color`,label:Na("Handle outline color"),isAlpha:!0}))),!e&&d().createElement(Ql,{label:Na("Pressed"),value:"drag"},d().createElement(_c,dh({},this.props,{defaultValue:`${oa(this.props,"#086A91",!0)}`,property:`${pa(this.props)}slider-handle-drag`,label:Na("Handle color"),isAlpha:!0}))))}}function hh(){return hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},hh.apply(null,arguments)}class fh extends ea.Component{constructor(e){super(e)}componentDidMount(){const e=this;jQuery(document).off("click","#forminator-clear-color-options").on("click","#forminator-clear-color-options",function(t){e.props.actions.modalActions.showModal({open:!0,closeModal:t=>{e.props.actions.modalActions.showModal({open:!1},"clearColorCustomizationModal")}},"clearColorCustomizationModal")})}hasIndicatorEnabled(e){return void 0!==e["submission-indicator"]&&"show"===e["submission-indicator"]}toggleAccordion(){jQuery("#forminator-section-appearance-color .sui-accordion-item--open .sui-accordion-item-header").trigger("click")}render(){const e=ba("page-break",this.props.wrappers),t=ba("section",this.props.wrappers),s=Va(this.props.wrappers,"radio","value_type","radio"),a=Va(this.props.wrappers,"select","value_type","single"),r=Va(this.props.wrappers,"checkbox","value_type","checkbox"),i=Va(this.props.wrappers,"select","value_type","multiselect"),n=i&&Va(this.props.wrappers,"select","multiselect_style","modern"),o=n&&Va(this.props.wrappers,"select","checkbox_in_dropdown","show"),l=Va(this.props.wrappers,"date","field_type","picker"),p=ba("signature",this.props.wrappers),c=ba("group",this.props.wrappers),u=Va(this.props.wrappers,"date","field_type","select"),m=Va(this.props.wrappers,"time","field_type","select")||Va(this.props.wrappers,"time","time_type","twelve"),h=Va(this.props.wrappers,"address","address_country","true"),f=Va(this.props.wrappers,"name","prefix","true"),b=ba("gdprcheckbox",this.props.wrappers),g=ba("upload",this.props.wrappers),y=ba("currency",this.props.wrappers),E=ba("stripe",this.props.wrappers),v=ba("calculation",this.props.wrappers),w=ba("consent",this.props.wrappers),x=ba("rating",this.props.wrappers),N=ba("slider",this.props.wrappers),C=function(e){let t=0;return!!fa(e)||(e.map(e=>{e.fields.map(e=>{const s=forminatorData.postCategories[e.post_type];void 0!==s&&s.map(s=>{const a=s.value+"_multiple";1===parseInt(e[a])&&t++})})}),t>0)}(this.props.wrappers),k=!_.isUndefined(this.props.preset),S="basic"===this.props.formDesign,P=k||this.hasIndicatorEnabled(this.props.settings),O=_.isUndefined(this.props.settings.paginationData)||_.isUndefined(this.props.settings.paginationData["pagination-header-design"])?"":this.props.settings.paginationData["pagination-header-design"],D=_.isUndefined(this.props.settings.paginationData)||_.isUndefined(this.props.settings.paginationData["pagination-header"])?"":this.props.settings.paginationData["pagination-header"],F=_.isUndefined(this.props.settings[`${pa(this.props)}cform-color-option`])?"forminator":"theme",A=_.isUndefined(this.props.settings[`${pa(this.props)}cform-color-option`])?F:this.props.settings[`${pa(this.props)}cform-color-option`];return d().createElement("div",{id:"forminator-section-appearance-color",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},k&&d().createElement("span",{className:"sui-settings-label"},Na("Colors"))),d().createElement("div",{className:"sui-box-settings-col-2"},!S&&d().createElement(ea.Fragment,null,d().createElement("div",{style:{marginBottom:"20px"}},d().createElement(ql,hh({},this.props,{property:"cform-color-option",default:F,onChange:this.toggleAccordion}),d().createElement(Yl,{value:"theme",boxClass:""},Na("Use Theme Colors")),d().createElement(Yl,{value:"forminator",boxClass:""},Na("Use Default Colors")))),d().createElement("div",{role:"alert",className:"sui-notice sui-active sui-notice-blue",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("theme"===A?"The form inherits colors from your theme. You can customize specific elements below.":"The form uses Forminator’s default colors.")))))),d().createElement("div",{className:"sui-form-field"},d().createElement("div",{style:{marginBottom:"10px",marginTop:"20px"}},d().createElement(Up,hh({},this.props,{label:Na("Customize colors"),property:`${pa(this.props)}cform-color-settings`,unWrap:!0}))),!_.isUndefined(this.props.settings[`${pa(this.props)}cform-color-settings`])&&this.props.settings[`${pa(this.props)}cform-color-settings`]&&d().createElement("div",{className:"sui-accordion"},d().createElement("div",{className:"sui-accordion-header"},d().createElement("div",null,d().createElement("div",null,Na("Element")),d().createElement("div",{className:"sui-actions-right"},d().createElement("button",{id:"forminator-clear-color-options",className:"sui-button sui-button-ghost"},d().createElement("span",{className:"sui-icon-update","aria-hidden":"true"}),Na("Clear Customization"))))),d().createElement(lp,hh({},this.props,{label:Na("Form Container")}),d().createElement(om,this.props)),P&&d().createElement(lp,hh({},this.props,{label:Na("Submission Indicator")}),d().createElement(um,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Response Success")}),d().createElement("p",{className:"sui-description"},Na("Successful response message will be displayed after form submission succeeds.")),d().createElement(fm,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Response Error")}),d().createElement("p",{className:"sui-description"},Na("Error response message will be displayed after form submission fails.")),d().createElement(mm,this.props)),(k||e&&"show"===O&&"nav"===D)&&d().createElement(lp,hh({},this.props,{label:Na("Pagination Steps")}),d().createElement(Hm,this.props)),(k||e&&"show"===O&&"bar"===D)&&d().createElement(lp,hh({},this.props,{label:Na("Pagination Progress Bar")}),d().createElement(Qm,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Fields Basics")}),d().createElement(pm,this.props)),t&&d().createElement(lp,hh({},this.props,{label:Na("Section")}),d().createElement(gm,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Input and Textarea")}),d().createElement(Em,this.props)),(l||y||E||v)&&d().createElement(lp,hh({},this.props,{label:Na("Input Extras")}),d().createElement(_m,this.props)),(r||s||b||o)&&d().createElement(lp,hh({},this.props,{label:Na("Radio and Checkbox")}),d().createElement(xm,this.props)),(a||u||m||h||f||n)&&d().createElement(ea.Fragment,null,d().createElement(lp,hh({},this.props,{label:Na("Select",{context:"select field"})}),d().createElement(Sm,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Dropdown List")}),d().createElement(Om,this.props))),h&&d().createElement(lp,hh({},this.props,{label:Na("Dropdown Search")}),d().createElement(Fm,this.props)),(i||C)&&d().createElement(lp,hh({},this.props,{label:Na("Multi Select")}),d().createElement(Tm,this.props)),x&&d().createElement(lp,hh({},this.props,{label:Na("Rating")}),d().createElement(uh,this.props)),N&&d().createElement(lp,hh({},this.props,{label:Na("Slider")}),d().createElement(mh,this.props)),l&&!S&&d().createElement(ea.Fragment,null,d().createElement(lp,hh({},this.props,{label:Na("Calendar Basics")}),d().createElement(jm,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Calendar Table")}),d().createElement(zm,this.props))),g&&d().createElement(lp,hh({},this.props,{label:Na("File Upload"),boxedContent:!1}),d().createElement(ph,this.props)),p&&d().createElement(ea.Fragment,null,d().createElement(lp,hh({},this.props,{label:Na("E-Signature")}),d().createElement(Vm,this.props))),c&&d().createElement(ea.Fragment,null,d().createElement(lp,hh({},this.props,{label:Na("Field Group")}),d().createElement(Im,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Repeater Button"),boxedContent:!1}),d().createElement(Lm,this.props))),e&&d().createElement(ea.Fragment,null,d().createElement(lp,hh({},this.props,{label:Na("Button Back")}),d().createElement(Gm,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Button Next")}),d().createElement(Jm,this.props))),w&&d().createElement(lp,hh({},this.props,{label:Na("Consent")}),d().createElement(Cm,this.props)),d().createElement(lp,hh({},this.props,{label:Na("Submit Button")}),d().createElement(Xm,this.props))))))}}function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},bh.apply(null,arguments)}class gh extends ea.Component{constructor(e){super(e)}backwardsCompat(e,t){return _.includes(t,e)||t.push(e),t}render(){const e=pa(this.props),t=e+this.props.prefix,s="basic-"===e?"":this.props.defaultFont,a=_.isUndefined(this.props.settings[t+"-font-family"])?s:this.props.settings[t+"-font-family"],r=_.isUndefined(this.props.settings[t+"-custom-family"])?this.props.defaultCustom:this.props.settings[t+"-custom-family"],i="basic-"===e?"":this.props.defaultWeight,n=_.isUndefined(this.props.settings[t+"-font-weight"])?i:this.props.settings[t+"-font-weight"],o="basic-"===e?"":this.props.defaultSize,l=_.isUndefined(this.props.settings[t+"-font-size"])?o:this.props.settings[t+"-font-size"],p=function(e,t){const s=_.filter(t,function(t){return t.family===e});return _.isUndefined(s[0])||_.isUndefined(s[0].variants)?[Na("None")]:s[0].variants}(a,window.forminatorFonts),c=this.backwardsCompat(n,p);return d().createElement(ea.Fragment,null,d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(kl,bh({},this.props,{label:Na("Font Family"),placeholder:Na("Roboto"),property:`${t}-font-family`,defaultValue:`${la(this.props,a)}`}),_.map(window.forminatorFonts,e=>d().createElement("option",{value:e.family,key:e.family},e.family)),d().createElement("option",{value:"",key:"inherit"},Na("inherit")),d().createElement("option",{value:"custom",key:"custom"},Na("Custom user font"))),"custom"===a&&d().createElement(ol,bh({},this.props,{type:"text",property:`${t}-custom-family`,defaultValue:`${la(this.props,r)}`,placeholder:Na("E.g., Arial, sans-serif"),label:Na("Custom font family"),prefix:""})))),!this.props.familyOnly&&d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,bh({},this.props,{type:"number",property:`${t}-font-size`,defaultValue:`${la(this.props,l)}`,placeholder:Na("E.g., 16"),label:Na("Font Size"),note:"in px",prefix:""}))),d().createElement(il,{cols:"6"},d().createElement(kl,bh({},this.props,{label:Na("Font Weight"),placeholder:Na("Select font weight"),property:`${t}-font-weight`,defaultValue:`${la(this.props,n)}`}),d().createElement("option",{value:"",key:"inherit"},Na("inherit")),_.map(c,e=>d().createElement("option",{value:e,key:e},e))))))}}function yh(){return yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},yh.apply(null,arguments)}class Eh extends ea.Component{constructor(e){super(e)}componentDidMount(){this.loadFonts()}componentDidUpdate(){this.loadFonts()}loadFonts(){if(!_.isUndefined(window.forminatorFonts))return;const e={action:"forminator_load_google_fonts",data:{isObject:!0},_wpnonce:forminatorData.gFontNonce};po.post(forminatorData.ajaxUrl,uo().stringify(e)).then(e=>{window.forminatorFonts=e.data.data}).catch(e=>{console.log(e)})}render(){const e=ba("page-break",this.props.wrappers),t=ba("section",this.props.wrappers),s=Va(this.props.wrappers,"radio","value_type","radio"),a=Va(this.props.wrappers,"select","value_type","single"),r=Va(this.props.wrappers,"checkbox","value_type","checkbox"),i=Va(this.props.wrappers,"select","value_type","multiselect"),n=Va(this.props.wrappers,"select","multiselect_style","modern"),o=Va(this.props.wrappers,"date","field_type","picker"),l=Va(this.props.wrappers,"date","field_type","select"),p=Va(this.props.wrappers,"time","field_type","select")||Va(this.props.wrappers,"time","time_type","twelve"),c=Va(this.props.wrappers,"address","address_country","true"),u=Va(this.props.wrappers,"name","prefix","true"),m=ba("gdprcheckbox",this.props.wrappers),h=ba("currency",this.props.wrappers),f=Va(this.props.wrappers,"upload","file-type","single")||Va(this.props.wrappers,"postdata","post_image","false"),b=Va(this.props.wrappers,"upload","file-type","multiple"),g=ba("signature",this.props.wrappers),y=ba("calculation",this.props.wrappers),E=ba("group",this.props.wrappers),v=ba("slider",this.props.wrappers),w=!_.isUndefined(this.props.preset),x=_.isUndefined(this.props.settings.paginationData)||_.isUndefined(this.props.settings.paginationData["pagination-header-design"])?"":this.props.settings.paginationData["pagination-header-design"],N=_.isUndefined(this.props.settings.paginationData)||_.isUndefined(this.props.settings.paginationData["pagination-header"])?"":this.props.settings.paginationData["pagination-header"];return d().createElement(Fl,yh({},w&&{label:Na("Fonts")},{id:"forminator-section-appearance-font"}),d().createElement(ql,yh({},this.props,{property:`${pa(this.props)}form-font-family`,default:""}),d().createElement(Yl,{value:""},Na("Theme Fonts")),d().createElement(Ql,{value:"custom",label:Na("Custom")},d().createElement("div",{className:"sui-accordion"},d().createElement(lp,yh({},this.props,{label:Na("Response Message")}),d().createElement(gh,yh({},this.props,{prefix:"cform-response",defaultSize:"15",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),(w||e&&"show"===x&&"nav"===N)&&d().createElement(lp,yh({},this.props,{label:Na("Pagination Steps")}),d().createElement(gh,yh({},this.props,{prefix:"cform-timeline",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),(w||e&&"show"===x&&"bar"===N)&&d().createElement(lp,yh({},this.props,{label:Na("Pagination Progress Bar")}),d().createElement(gh,yh({},this.props,{prefix:"cform-progress",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),d().createElement(lp,yh({},this.props,{label:Na("Fields Label")}),d().createElement(gh,yh({},this.props,{prefix:"cform-label",defaultSize:"13",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"700"}))),d().createElement(lp,yh({},this.props,{label:Na("Fields Description")}),d().createElement(gh,yh({},this.props,{prefix:"cform-description",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),d().createElement(lp,yh({},this.props,{label:Na("Fields Error Message")}),d().createElement(gh,yh({},this.props,{prefix:"cform-validation",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),t&&d().createElement(d().Fragment,null,d().createElement(lp,yh({},this.props,{label:Na("Section Title")}),d().createElement(gh,yh({},this.props,{prefix:"cform-title",defaultSize:"45",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),d().createElement(lp,yh({},this.props,{label:Na("Section Subtitle")}),d().createElement(gh,yh({},this.props,{prefix:"cform-subtitle",defaultSize:"18",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"})))),d().createElement(lp,yh({},this.props,{label:Na("Input and Textarea")}),d().createElement(gh,yh({},this.props,{prefix:"cform-input",defaultSize:"16",defaultFont:"Roboto",defaultWeight:"400"}))),y&&d().createElement(lp,yh({},this.props,{label:Na("Input Prefix")}),d().createElement(gh,yh({},this.props,{prefix:"cform-input-prefix",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),(h||y)&&d().createElement(lp,yh({},this.props,{label:Na("Input Suffix")}),d().createElement(gh,yh({},this.props,{prefix:"cform-input-suffix",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),(r||s||m)&&d().createElement(lp,yh({},this.props,{label:Na("Radio and Checkbox")}),d().createElement(gh,yh({},this.props,{prefix:"cform-radio",defaultSize:"14",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),(a||l||p||c||u)&&d().createElement(d().Fragment,null,d().createElement(lp,yh({},this.props,{label:Na("Select")}),d().createElement(gh,yh({},this.props,{prefix:"cform-select",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),d().createElement(lp,yh({},this.props,{label:Na("Dropdown")}),d().createElement(gh,yh({},this.props,{prefix:"cform-dropdown",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"})))),o&&d().createElement(lp,yh({},this.props,{label:Na("Calendar")}),d().createElement(gh,yh({},this.props,{prefix:"cform-calendar",defaultFont:"custom",defaultCustom:"inherit",familyOnly:!0}))),i&&d().createElement(d().Fragment,null,d().createElement(lp,yh({},this.props,{label:Na("Multi Select")}),d().createElement(gh,yh({},this.props,{prefix:"cform-multiselect",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),n&&d().createElement(lp,yh({},this.props,{label:"material"!==this.props.formDesign?Na("Multi Select Tag"):Na("Multi Select Chip")}),d().createElement(gh,yh({},this.props,{prefix:"cform-multiselect-tag",defaultSize:"12",defaultFont:"inherit",defaultCustom:"inherit",defaultWeight:"medium"})))),f&&d().createElement(lp,yh({},this.props,{label:Na("Single File Upload")}),d().createElement(Zl,yh({},this.props,{type:"tabs",default:"upload-single-button",extraClass:"sui-tabs-flushed"}),d().createElement(gh,yh({},this.props,{value:"upload-single-button",label:Na("Upload Button"),prefix:"upload-single-button",defaultSize:"14",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"700"})),d().createElement(gh,yh({},this.props,{value:"upload-single-text",label:Na("File Name"),prefix:"upload-single-text",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"700"})))),b&&d().createElement(lp,yh({},this.props,{label:Na("Multiple Files Upload")}),d().createElement(Zl,yh({},this.props,{type:"tabs",default:"upload-multiple-panel",extraClass:"sui-tabs-flushed"}),d().createElement(gh,yh({},this.props,{value:"upload-multiple-panel",label:Na("Upload Panel"),prefix:"upload-multiple-panel",defaultSize:"13",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"})),d().createElement(gh,yh({},this.props,{value:"upload-multiple-file-name",label:Na("File Name"),prefix:"upload-multiple-file-name",defaultSize:"13",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"})),d().createElement(gh,yh({},this.props,{value:"upload-multiple-file-size",label:Na("File Size"),prefix:"upload-multiple-file-size",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"})))),g&&d().createElement(lp,yh({},this.props,{label:Na("E-Signature Placeholder")}),d().createElement(gh,yh({},this.props,{prefix:"cform-esign-placeholder",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),E&&d().createElement(lp,yh({},this.props,{label:Na("Repeater Button")}),d().createElement(gh,yh({},this.props,{prefix:"cform-repeater-button",defaultSize:"12",defaultFont:"Roboto",defaultWeight:"500"}))),e&&d().createElement(lp,yh({},this.props,{label:Na("Pagination Buttons")}),d().createElement(gh,yh({},this.props,{prefix:"cform-pagination-buttons",defaultSize:"14",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),v&&d().createElement(d().Fragment,null,d().createElement(lp,yh({},this.props,{label:Na("Slider selected value")}),d().createElement(gh,yh({},this.props,{prefix:"cform-slider-selected",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"normal"}))),d().createElement(lp,yh({},this.props,{label:Na("Slider step values")}),d().createElement(gh,yh({},this.props,{prefix:"cform-slider-steps",defaultSize:"15",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"normal"})))),d().createElement(lp,yh({},this.props,{label:Na("Submit Button")}),d().createElement(gh,yh({},this.props,{prefix:"cform-button",defaultSize:"14",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"})))))))}}function vh(){return vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},vh.apply(null,arguments)}class _h extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},d().createElement(il,{cols:"6"},d().createElement(ol,vh({},this.props,{label:Na("Top"),type:"number",placeholder:"0",property:`${pa(this.props)}form-padding-top`}))),d().createElement(il,{cols:"6"},d().createElement(ol,vh({},this.props,{label:Na("Bottom"),type:"number",placeholder:"0",property:`${pa(this.props)}form-padding-bottom`})))),d().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},d().createElement(il,{cols:"6"},d().createElement(ol,vh({},this.props,{label:Na("Left"),type:"number",placeholder:"0",property:`${pa(this.props)}form-padding-left`}))),d().createElement(il,{cols:"6"},d().createElement(ol,vh({},this.props,{label:Na("Right"),type:"number",placeholder:"0",property:`${pa(this.props)}form-padding-right`})))),d().createElement("span",{className:"sui-description"},Na("Set your custom padding in pixels.")))}}function wh(){return wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},wh.apply(null,arguments)}class xh extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},d().createElement(il,{cols:"6"},d().createElement(ol,wh({},this.props,{label:Na("Radius"),note:Na("in px"),type:"number",placeholder:"0",property:`${pa(this.props)}form-border-radius`}))),d().createElement(il,{cols:"6"},d().createElement(ol,wh({},this.props,{label:Na("Thickness"),note:Na("in px"),type:"number",placeholder:"0",property:`${pa(this.props)}form-border-width`})))),d().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},d().createElement(il,{cols:"12"},d().createElement(kl,wh({},this.props,{property:`${pa(this.props)}form-border-style`,label:Na("Style"),defaultValue:"none"}),d().createElement("option",{value:"solid"},Na("Solid")),d().createElement("option",{value:"dashed"},Na("Dashed")),d().createElement("option",{value:"dotted"},Na("Dotted")),d().createElement("option",{value:"none"},Na("None"))))),d().createElement("span",{className:"sui-description"},Na("Note: Set the color of the border in the Colors settings area above.")))}}function Nh(){return Nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Nh.apply(null,arguments)}class Ch extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ol,Nh({},this.props,{label:Na("Spacing"),note:Na("in pixels"),type:"number",placeholder:Na("0"),property:`${pa(this.props)}spacing`}))}}function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},kh.apply(null,arguments)}class Sh extends ea.Component{render(){return d().createElement("div",{id:"forminator-section-appearance-form-container",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label sui-dark"},Na("Form Container"))),d().createElement("div",{className:"sui-box-settings-col-2"},"none"!==this.props.formDesign&&d().createElement(ea.Fragment,null,d().createElement(ql,kh({},this.props,{property:`${pa(this.props)}form-padding`,settingsLabel:Na("Padding"),tooltipDescription:Na("By default the form will fill the available space where you insert it. You can add some padding here to better suit your theme."),tooltipWidth:"170px"}),d().createElement(Yl,{value:""},Na("None")),d().createElement(_h,kh({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),Na("Custom"))),d().createElement(ql,kh({},this.props,{property:`${pa(this.props)}form-border`,settingsLabel:Na("Border"),tooltipDescription:Na("Add an optional border around the form."),tooltipWidth:"170px"}),d().createElement(Yl,{value:""},Na("None")),d().createElement(xh,kh({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),Na("Custom")))),d().createElement(ql,kh({},this.props,{property:`${pa(this.props)}fields-style`,settingsLabel:Na("Spacing"),default:"open",tooltipDescription:Na("Choose how much spacing you want between each form field."),tooltipWidth:"170px"}),d().createElement(Yl,{value:"open"},Na("Comfortable")),d().createElement(Yl,{value:"enclosed"},Na("Compact")),d().createElement(Ch,kh({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),Na("Custom")),d().createElement(Yl,{value:""},Na("Disable")))))}}function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ph.apply(null,arguments)}class Oh extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},d().createElement(il,{cols:"6"},d().createElement(ol,Ph({},this.props,{label:Na("Radius"),note:Na("in px"),type:"number",placeholder:"0",property:`${pa(this.props)}field-border-radius`}))),d().createElement(il,{cols:"6"},d().createElement(ol,Ph({},this.props,{label:Na("Thickness"),note:Na("in px"),type:"number",placeholder:"0",property:`${pa(this.props)}field-border-width`})))))}}function Dh(){return Dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Dh.apply(null,arguments)}class Fh extends ea.Component{render(){return d().createElement("div",{id:"forminator-section-appearance-field-container",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label sui-dark"},Na("Field Container"))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(ql,Dh({},this.props,{property:`${pa(this.props)}field-border`,settingsLabel:Na("Border"),tooltipDescription:Na("Add a border style around the field."),tooltipWidth:"170px"}),d().createElement(Yl,{value:""},Na("None")),d().createElement(Oh,Dh({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),Na("Custom")))))}}class Ah extends ea.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this),this.insertSelector=this.insertSelector.bind(this)}componentDidMount(){this.editor=ace.edit(`forminator-field-${this.props.property}`),this.session=this.editor.getSession(),this.session.setUseWorker(!1),this.editor.setShowPrintMargin(!1),this.props.ariaLabel&&(this.editor.textInput.getElement().ariaLabel=this.props.ariaLabel),this.session.setMode("ace/mode/css"),this.editor.setTheme("ace/theme/sui"),this.editor.renderer.setShowGutter(!0),this.editor.setHighlightActiveLine(!0),this.editor.focus(),this.editor.on("change",this.updateValue)}componentWillUnmount(){this.editor.destroy(),this.editor=null}insertSelector(e){const t=e+"{}";this.editor.navigateFileEnd(),this.editor.insert(t),this.editor.navigateLeft(1),this.editor.focus()}shouldComponentUpdate(){return!1}updateValue(){this.props.actions.settingsActions.updateSetting(this.props.property,this.editor.getValue())}render(){const e=_.isUndefined(this.props.settings[this.props.property])?"":this.props.settings[this.props.property],t=_.isUndefined(this.props.settings.pdf_template)?"basic":this.props.settings.pdf_template;let s=_.isUndefined(this.props.type)?"form":this.props.type;"pdf-form"===this.props.formType&&(s=this.props.formType);const a=d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"},Na("Basic selectors")),d().createElement("div",{className:"sui-ace-selectors"},d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" ")},Na("Form")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-title ")},Na("Section Title")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-subtitle ")},Na("Section Subtitle")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-label ")},Na("Field Label")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-description ")},Na("Field Description")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-input ")},Na("Input")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-textarea ")},Na("Textarea")))),r=d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"},Na("Basic selectors")),d().createElement("div",{className:"sui-ace-selectors"},d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" ")},Na("Poll")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-poll--question ")},Na("Question")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-radio .forminator-radio-bullet ")},Na("Answer Input")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-radio .forminator-radio-label ")},Na("Answer Label")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-button ")},Na("Submit Button")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-poll-footer a.forminator-link, .forminator-poll-footer a.forminator-link:visited ")},Na("View Results Link")))),i=d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"},Na("Basic selectors")),d().createElement("div",{className:"sui-ace-selectors"},d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" ")},Na("Quiz")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-quiz--title ")},Na("Title")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-quiz--description p ")},Na("Description")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-question .forminator-legend ")},Na("Question")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-answer .forminator-answer--design ")},Na("Answer Container")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-answer .forminator-answer--name ")},Na("Answer Text")))),n=d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"},Na("PDF selectors")),d().createElement("div",{className:"sui-ace-selectors"},d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector("body")},Na("Body")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-pdf-header")},Na("PDF Header")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".pdf-logo")},Na("Logo")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".pdf-title")},Na("Title")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector("basic"===t?".forminator-field-label, .forminator-pdf-basic-template .row-heading td":".forminator-row-heading td")},Na("Field Label")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector("basic"===t?".forminator-field-content, .forminator-pdf-basic-template .forminator-row-content td":".forminator-row-content td")},Na("Field Value")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-pdf-footer-text td")},Na("Footer")),d().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-pdf-pagination td")},Na("Pagination"))));return d().createElement(ea.Fragment,null,"form"===s&&a,"poll"===s&&r,"quiz"===s&&i,"pdf-form"===s&&n,d().createElement("div",{id:`forminator-field-${this.props.property}`,"data-value":e,style:{height:"210px"}},e),"pdf-form"===s&&forminatorData.showDocLink&&d().createElement("span",{className:"sui-description"},Na("Learn more about using custom CSS in your PDF file {{link}}here{{/link}}.",{components:{link:d().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#pdf-custom-css",target:"_blank"})}})))}}function Th(){return Th=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Th.apply(null,arguments)}class Mh extends ea.Component{constructor(e){super(e)}render(){const e=!_.isUndefined(this.props.preset);return d().createElement("div",{id:"forminator-section-appearance-custom-css",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},(e||"pdf-form"===this.props.formType)&&d().createElement("span",{className:"sui-settings-label"},Na("Custom CSS"))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field"},d().createElement("div",{style:{marginBottom:"10px"}},d().createElement(Up,Th({},this.props,{label:Na("Enable custom CSS"),property:"use-custom-css",unWrap:!0}))),!_.isUndefined(this.props.settings["use-custom-css"])&&this.props.settings["use-custom-css"]&&d().createElement(Ah,Th({},this.props,{property:"custom_css",type:"form",ariaLabel:Na("Custom CSS")})))))}}function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},jh.apply(null,arguments)}class Uh extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ql,jh({},this.props,{property:"pdf_margin",divClass:"pdf-page-margin",settingsLabel:Na("Page Margin"),default:"default",description:Na("Default margin for all paper sizes is 30px. Use the custom tab to set a different value.")}),d().createElement(Ql,{value:"default",label:Na("Default")}),d().createElement(Ql,{value:"custom",label:Na("Custom")},d().createElement("div",{className:"sui-border-frame"},d().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},d().createElement(il,{cols:"12"},d().createElement(kl,jh({},this.props,{label:Na("Margin"),property:"pdf_margin_unit",fieldClass:"fui-select-inline",fieldsize:"100"}),d().createElement("option",{value:"pt"},"pt"),d().createElement("option",{value:"px"},"px"),d().createElement("option",{value:"mm"},"mm"),d().createElement("option",{value:"in"},"in"))),d().createElement(il,{cols:"3"},d().createElement(ol,jh({},this.props,{label:Na("Top"),type:"number",placeholder:"0",property:"pdf_margin_top"}))),d().createElement(il,{cols:"3"},d().createElement(ol,jh({},this.props,{label:Na("Bottom"),type:"number",placeholder:"0",property:"pdf_margin_bottom"}))),d().createElement(il,{cols:"3"},d().createElement(ol,jh({},this.props,{label:Na("Left"),type:"number",placeholder:"0",property:"pdf_margin_left"}))),d().createElement(il,{cols:"3"},d().createElement(ol,jh({},this.props,{label:Na("Right"),type:"number",placeholder:"0",property:"pdf_margin_right"})))))))}}function Vh(){return Vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Vh.apply(null,arguments)}class $h extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ql,Vh({},this.props,{property:"pdf_layout",divClass:"pdf-page-layout",settingsLabel:Na("Container markup"),default:"table",description:Na("Choose the default markup structure for your PDF. For better styling flexibility and improved page formatting, we recommend using the Div markup.")}),d().createElement(Ql,{value:"div",label:Na("Div")}),d().createElement(Ql,{value:"table",label:Na("Table")}))}}function Ih(){return Ih=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ih.apply(null,arguments)}class Rh extends ea.Component{constructor(e){super(e)}render(){const{pdf_template:e}=this.props.settings;return d().createElement(ea.Fragment,null,d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active","aria-live":"assertive",style:{display:"block"}},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Our PDF builder is constantly improving and we’ll be adding more features over time. While the current release has limited customization options, we appreciate your patience as we work to bring you the best experience possible. Keep an eye out for updates. To manually adjust the appearance of the fields, you can enable the Custom CSS option below."))))),d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Page settings")),d().createElement("span",{className:"sui-description"},Na("Configure the PDF file settings"))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label"},Na("Page size")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("Choose the standard paper size for your PDF document. The default resolution for each page is set at 96dpi.")),d().createElement(kl,Ih({},this.props,{property:"paper_size",defaultValue:"A4"}),_.map(forminatorData.pdf_page_sizes,(e,t)=>d().createElement("option",{key:t,value:t},e))),d().createElement("div",{className:"sui-form-field"},d().createElement(Up,Ih({},this.props,{label:Na("Enable RTL (right-to-left)"),property:"enable_rtl",unWrap:!0}))),d().createElement("div",{className:"sui-form-field"},d().createElement(Up,Ih({},this.props,{label:Na("Hide empty form fields in generated PDF file"),property:"hide_empty_fields",unWrap:!0}))),d().createElement("hr",null),"basic"===e&&d().createElement(ea.Fragment,null,d().createElement($h,this.props),d().createElement("hr",null)),d().createElement(Uh,this.props))))}}class Lh extends ea.Component{constructor(e){super(e),this.state={open:e.expanded||!1},this.toggleState=this.toggleState.bind(this)}toggleState(){this.setState({open:!this.state.open})}render(){const{label:e,description:t}=this.props,{open:s}=this.state;let a="";s&&(a="sui-accordion-item--open");const r=!(!_.isUndefined(this.props.boxedContent)&&""!==this.props.boxedContent)||this.props.boxedContent,i=!_.isUndefined(this.props.defaultContentRender)&&this.props.defaultContentRender,n=d().Children.map(this.props.children,e=>e);return d().createElement("div",{className:"sui-accordion-item forminatior-nav-accordion-item "+a},d().createElement("span",{className:"sui-accordion-item-header",onClick:()=>this.toggleState()},d().createElement("div",{className:"sui-accordion-item-title"},d().createElement("span",null,e),d().createElement("button",{className:"sui-button-icon sui-accordion-open-indicator",onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-chevron-down","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},!1===this.state.open?"Open":"Close")))),d().createElement("div",{className:"sui-accordion-item-body"},!1===r?(i||s)&&n:d().createElement(ea.Fragment,null,(i||s)&&n,r)))}}function Bh(){return Bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Bh.apply(null,arguments)}class zh extends ea.Component{constructor(e){super(e)}componentDidMount(){const e=this;jQuery("#forminator-open-apply-preset").off("click").on("click",function(t){e.props.actions.modalActions.showModal({open:!0,closeModal:t=>{e.props.actions.modalActions.showModal({open:!1},"applyPreset")}},"applyPreset")})}render(){const e=this.props.settings.appearance_preset||"";return d().createElement("div",{id:"forminator-section-appearance-preset-template",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-description"},Na("Choose a preset to apply to your form. You can edit or create new ones in {{link}}Settings > Appearance Preset{{/link}}",{components:{link:d().createElement("a",{href:forminatorData.modules.ApplyPreset.presetUrl,target:"_blank"})}}))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field",style:{marginTop:"20px",marginBottom:"20px"}},d().createElement(kl,Bh({},this.props,{property:"appearance_preset",label:Na("Select preset")}),d().createElement("option",{value:""},Na("Choose preset")),_.map(forminatorData.modules.ApplyPreset.presets,(e,t)=>d().createElement("option",{value:t,key:t},e)))),d().createElement("div",{className:"sui-actions-right"},d().createElement("button",{id:"forminator-open-apply-preset",className:"sui-button sui-button-ghost",style:{width:"100%"},disabled:""===e},d().createElement("span",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Apply Preset")))))}}function Wh(){return Wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Wh.apply(null,arguments)}class Hh extends ea.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=_.isUndefined(this.props.settings["form-style"])?"default":this.props.settings["form-style"],t=forminatorData.currentForm.settings["form-type"]||"default",s="pdf-form"===t?"pdf-appearance":"";return d().createElement("div",{id:"forminator-form-appearance",className:`sui-box ${s}`},"pdf-form"!==t&&d().createElement(ea.Fragment,null,d().createElement(Lh,Wh({},this.props,{label:Na("Global Appearance Presets")}),d().createElement(zh,this.props)),d().createElement(Lh,Wh({},this.props,{label:Na("Style")}),d().createElement(tm,this.props)),"none"!==e&&d().createElement(ea.Fragment,{key:`${pa(this.props)}themeKey`},d().createElement(Lh,Wh({},this.props,{label:Na("Colors")}),d().createElement(fh,this.props)),d().createElement(Lh,Wh({},this.props,{label:Na("Fonts")}),d().createElement(Eh,this.props)),d().createElement(Lh,Wh({},this.props,{label:Na("Layout and Spacing")}),d().createElement(im,this.props),d().createElement(Sh,this.props),d().createElement(Fh,this.props))),"none"===e&&d().createElement(Lh,Wh({},this.props,{label:Na("Layout and Spacing")}),d().createElement(im,this.props),d().createElement(Sh,this.props)),d().createElement(Lh,Wh({},this.props,{label:Na("Custom CSS")}),d().createElement(Mh,Wh({},this.props,{formType:t})))),"pdf-form"===t&&d().createElement(ea.Fragment,null,d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("Appearance"))),d().createElement("div",{className:"sui-box-body"},d().createElement(Rh,this.props),d().createElement(Mh,Wh({},this.props,{formType:t}))),d().createElement(Ro,this.props)))}}var qh=Dr(Hh);var Qh=ce(function(e){return{settings:e.settings,wrappers:e.wrappers,formDesign:e.settings["form-style"]||"default",formSubDesign:e.settings["form-substyle"]||"default"}},function(s){return{actions:{settingsActions:Ut(e,s),modalActions:Ut(t,s)}}})(qh);class Yh extends kl{constructor(e){super(e),this.updateValue=this.updateValue.bind(this),this.afterSave=this.afterSave.bind(this)}replaceInPosition(e,t,s){return[...e.slice(0,t),s,...e.slice(t+1)]}updateState(e){this.props.actions.builderActions.updateFields(e)}afterSave(e){Object.assign({},this.props.wrappers);let t=[];if(jQuery(".field-required select").length>0){let e="";jQuery(".field-required select option:selected").map(function(){e=jQuery(this).val(),"auto"!==e&&t.push(e)}),t=[...new Set(t)]}const s=_.map(this.props.wrappers,(e,s)=>(e.fields.map(e=>(e.required=-1!==t.indexOf(e.element_id),e)),e));this.updateState(s)}}function Gh(){return Gh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Gh.apply(null,arguments)}class Kh extends ea.Component{constructor(e){super(e),this.toggleState=this.toggleState.bind(this),this.updateValue=this.updateValue.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateRuleValue=this.updateRuleValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.state={open:!1},this.fields=this.props.fields}removeRule(){this.props.removeRule(this.props.counter)}updateValue(e,t){this.props.updateValue(this.props.counter,t)}updateField(e,t){this.props.updateField(this.props.counter,t)}updateRule(e,t){this.props.updateRule(this.props.counter,t)}updateRuleValue(e){this.props.updateRuleValue(this.props.counter,e.target.value)}updateInputValue(e,t){this.props.updateInputValue(this.props.counter,t)}toggleState(){this.setState({open:!this.state.open})}disableSearch(){return{minimumResultsForSearch:-1}}getEmailOptions(){const e=[];return Pa(this.props.wrappers,["address","captcha","date","consent","gdprcheckbox","html","name","number","slider","page-break","phone","postdata","section","time","upload","website","textarea","text","paypal","stripe","stripe-ocs","currency","calculation","password","rating"]).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}render(){const e="routing-"+this.props.counter,t=_.filter(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?Na("null"):this.props.rule.value,a=_.isEmpty(this.props.rule.role)?"subscriber":this.props.rule.role;let r,i;const n=Object.assign({},forminatorData.userRoles);return forminatorData.isMainSite?(r=Na("Network's Main Site Role"),i=Na("If you don't want to create a user in the network's main site, set this meta key to {{strong}}Don't create a user in the network's main site{{/strong}}.",{components:{strong:d().createElement("strong",null)}}),n.notCreate={name:"Don't create a user in the network's main site",capabilities:{read:!0}}):(r=Na("User Role"),i=""),Object.keys(t).length>0&&d().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},d().createElement("h4",{className:"fui-visibility-rule-header"},d().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},d().createElement("i",{className:"sui-icon-sitemap fui-visibility-rule-icon","aria-hidden":"true"}),d().createElement("span",{className:"fui-visibility-rule-text"},Na('{{strong}}"%(label)s"{{/strong}} when {{strong}}%(field)s{{/strong}} %(rule)s {{strong}}%(value)s{{/strong}}',{args:{label:Ca(a),field:t.label,rule:Ma(this.props.rule.rule,t.field_type),value:s},components:{strong:d().createElement("strong",null)}})),d().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),d().createElement("div",{role:"region",id:"forminator-field-"+e+"-content",className:"sui-box-body fui-visibility-rule-body","aria-labelledby":"forminator-field-"+e,"aria-hidden":!0!==this.state.open},d().createElement(fl,Gh({},this.props,{property:"role",settings:this.props.rule,label:r,defaultValue:"subscriber",value:this.props.rule.role,description:i,updateProperty:this.updateValue,required:!0}),_.map(n,(e,t)=>d().createElement("option",{value:t,key:t},e.name))),d().createElement(rl,{className:"sui-align-bottom sui-spacing-10"},d().createElement(il,{cols:"6",customClass:"sui-padding-right-10"},d().createElement(fl,Gh({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:Na("Field")}),_.map(this.fields,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id)))),d().createElement(il,{cols:"6",customClass:"sui-padding-left-10"},d().createElement(kl,Gh({key:"visibility-condition-"+ia()},this.props,{elementId:e+"-condrule",label:Na("Condition (Required)"),settings:this.props.rule,property:"rule",updateProperty:this.updateRule,options:this.disableSearch()}),d().createElement("option",{value:""},Na("Select rule")),"signature"===t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is null")),d().createElement("option",{value:"is_not"},Na("Is not null"))),"signature"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is"},Na("Is")),d().createElement("option",{value:"is_not"},Na("Is not"))),t.isNumber&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"is_great"},Na("Is greater than")),d().createElement("option",{value:"is_less"},Na("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"contains"},Na("Contains")),d().createElement("option",{value:"does_not_contain"},Na("Does not contain")),d().createElement("option",{value:"starts"},Na("Starts with")),d().createElement("option",{value:"ends"},Na("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"day_is"},Na("Day is")),d().createElement("option",{value:"day_is_not"},Na("Day is not"))),"date"===t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&d().createElement(ea.Fragment,null,d().createElement("option",{value:"month_is"},Na("Month is")),d().createElement("option",{value:"month_is_not"},Na("Month is not")))))),d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ea.Fragment,null,t.hasOptions&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},d().createElement("option",{value:""},Na("Select option")),_.map(t.values,(e,t)=>d().createElement("option",{value:e.value,key:t},ml(e.label))))),!t.hasOptions&&"signature"!==t.field_type&&(!["day_is","day_is_not","month_is","month_is_not"].includes(this.props.rule.rule)||"date"!==t.field_type)&&d().createElement(ol,Gh({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,placeholder:Na("Enter value"),label:Na("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule==="month_is"||"month_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},d().createElement("option",{value:""},Na("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=>d().createElement("option",{value:e,key:e},e)))),!t.hasOptions&&"date"===t.field_type&&("day_is"===this.props.rule.rule||"day_is_not"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"}," "),d().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},d().createElement("option",{value:""},Na("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],e=>d().createElement("option",{value:e,key:e},e)))),!t.hasOptions&&"date"===t.field_type&&("is_before"===this.props.rule.rule||"is_after"===this.props.rule.rule)&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-label"},Na("Select date")),d().createElement(gl,Gh({},this.props,{settings:this.props.rule,property:"value",id:e+"-value",placeholder:Na("20 April 2018"),updateProperty:this.updateInputValue}))),!t.hasOptions&&"date"===t.field_type&&("is_before_n_or_more_days"===this.props.rule.rule||"is_before_less_than_n_days"===this.props.rule.rule||"is_after_n_or_more_days"===this.props.rule.rule||"is_after_less_than_n_days"===this.props.rule.rule)&&d().createElement(ol,Gh({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:Na("Number of days"),placeholder:Na("E.g. 10"),type:"number",minValue:"0"}))))),d().createElement("div",{className:"fui-visibility-rule-footer"},d().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")),d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},Na("Done")))))}}function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Jh.apply(null,arguments)}class Zh extends ea.Component{constructor(e){super(e),this.addRule=this.addRule.bind(this),this.removeRule=this.removeRule.bind(this),this.updateValue=this.updateValue.bind(this),this.updateField=this.updateField.bind(this),this.updateRule=this.updateRule.bind(this),this.updateRuleValue=this.updateRuleValue.bind(this),this.updateInputValue=this.updateInputValue.bind(this),this.fields=Pa(this.props.wrappers),this.fields=_.filter(this.fields,e=>"stripe"!==e.field_type&&"stripe-ocs"!==e.field_type&&"paypal"!==e.field_type&&"page-break"!==e.field_type&&"pagination"!==e.field_type&&"section"!==e.field_type&&"html"!==e.field_type),this.validateConditions()}updateState(e){this.setState({options:e}),this.props.updateProperty("user_role",e),_.isUndefined(this.props.actions)||this.props.actions.settingsActions.updateSetting("user_role",e)}getPropState(){const e=[];return _.each(this.props.state.user_role,t=>{const s=Object.assign({},t);e.push(s)}),e}updateField(e,t){const s=this.getPropState();s[e].element_id=t,s[e].rule="is",s[e].value="",this.updateState(s)}updateValue(e,t){const s=this.getPropState();s[e].role=t,this.updateState(s)}updateRule(e,t){const s=this.getPropState();s[e].rule=t,this.updateState(s)}updateRuleValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}updateInputValue(e,t){const s=this.getPropState();s[e].value=t,this.updateState(s)}removeRule(e){const t=this.getPropState();t.splice(e,1),this.updateState(t)}addRule(){const e=this.getPropState(),t=_.isUndefined(this.fields[0])?"":this.fields[0].element_id;e.push({role:"subscriber",element_id:t,rule:"is",value:""}),this.updateState(e)}validateConditions(){const e=_.map(this.props.state.user_role,"element_id"),t=_.map(this.fields,"element_id"),s=_.difference(e,t);_.isUndefined(s)||this.removeCondition(s)}removeCondition(e){const t=this.getPropState(),s=_.filter(t,function(t){return!_.includes(e,t.element_id)});this.updateState(s)}render(){return d().createElement("div",{className:"sui-box-builder"},d().createElement("div",{className:"fui-visibility sui-box-builder-body",style:{margin:0}},d().createElement("div",{className:"sui-builder-fields"},_.map(this.props.state.user_role,(e,t)=>d().createElement(Kh,Jh({},this.props,{rule:e,key:t,counter:t,removeRule:this.removeRule,updateValue:this.updateValue,updateField:this.updateField,updateRule:this.updateRule,updateRuleValue:this.updateRuleValue,updateInputValue:this.updateInputValue,fields:this.fields})))),d().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addRule},d().createElement("span",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add User Role"))))}}function Xh(){return Xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Xh.apply(null,arguments)}class ef extends ea.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this),this.state=this.props.settings||{}}updateProperty(e,t){this.setState({[e]:t})}render(){const e=Pa(this.props.wrappers,["password"]),t=ya("password",this.props.wrappers),s=Object.assign({},forminatorData.userRoles),a=e=>{this.props.router.navigate("/"+e)};let r,i;forminatorData.isMainSite?(r=Na("Network's Main Site Role"),i=Na("If you don't want to create a user in the network's main site, set this meta key to {{strong}}Don't create a user in the network's main site{{/strong}}.",{components:{strong:d().createElement("strong",null)}}),s.notCreate={name:"Don't create a user in the network's main site",capabilities:{read:!0}}):(r=Na("User Role"),i="");let n=!1;const o=_.isUndefined(this.props.settings["registration-user-role"])||"fixed"===this.props.settings["registration-user-role"],l=!_.isUndefined(this.props.settings["registration-role-field"])&&"administrator"===this.props.settings["registration-role-field"];return o&&l?n=!0:o||_.isUndefined(this.props.settings.user_role)||_.each(this.props.settings.user_role,e=>{_.isUndefined(e.role)||"administrator"!==e.role||(n=!0)}),d().createElement(Fl,{label:Na("User Meta Mapping"),description:Na("Assign your form fields to the user meta keys to use the data collected from the visitor to create a user profile.")},d().createElement("div",{className:"sui-form-field"},d().createElement("h4",{className:"sui-settings-label"},Na("Default Meta Keys")),d().createElement("p",{className:"sui-description",style:{marginBottom:10}},Na("Assign form fields to the default WordPress user meta keys (used in Profiles) below. You can assign a form field to multiple meta keys. If you assign a non-required form field to a required user meta, that form field will automatically become required in your form.")),d().createElement("div",{className:"sui-border-frame"},d().createElement(Yh,Xh({},this.props,{property:"registration-username-field",label:Na("Username"),defaultValue:"text-1",fieldClass:"field-required",required:!0}),d().createElement("option",{value:""},Na("Select a field")),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(Yh,Xh({},this.props,{property:"registration-email-field",label:Na("Email"),defaultValue:"email-1",fieldClass:"field-required",required:!0}),d().createElement("option",{value:""},Na("Select a field")),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(kl,Xh({},this.props,{property:"registration-first-name-field",label:Na("First Name"),defaultValue:""}),d().createElement("option",{value:""},Na("Select a field")),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(kl,Xh({},this.props,{property:"registration-last-name-field",label:Na("Last Name"),defaultValue:""}),d().createElement("option",{value:""},Na("Select a field")),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(kl,Xh({},this.props,{property:"registration-website-field",label:Na("Website"),defaultValue:""}),d().createElement("option",{value:""},Na("Select a field")),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(Yh,Xh({},this.props,{property:"registration-password-field",label:Na("Password"),defaultValue:"password-1",fieldClass:"field-required",required:!0}),d().createElement("option",{value:""},Na("Select a field")),_.map(t,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id)),d().createElement("option",{value:"auto"},Na("Auto Generated Password"))),t.length>0&&"auto"===this.props.settings["registration-password-field"]&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("This form includes a {{strong}}Password field{{/strong}}. Since user passwords will be {{strong}}automatically generated{{/strong}}, the {{strong}}Password field{{/strong}} should be deleted.",{components:{strong:d().createElement("strong",null)}}))))),0===t.length&&"auto"===this.props.settings["registration-password-field"]&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("This form is set to {{strong}}automatically generate{{/strong}} user passwords. To allow users to set their own passwords, insert a {{strong}}Password field{{/strong}} into {{link}}this form{{/link}}.",{components:{strong:d().createElement("strong",null),link:d().createElement("a",{onClick:()=>a("builder"),style:{cursor:"pointer"}})}}))))))),d().createElement("div",{style:{marginBottom:"10px"}},d().createElement(ql,Xh({},this.props,{property:"registration-user-role",settingsLabel:r,default:"fixed",description:Na("Choose which user role you want to assign to the visitors signing up. You can either assign a fixed user role to all of them or assign a user role conditionally, based on their response to the form fields.")}),d().createElement(Yl,{value:"fixed",boxClass:""},Na("Fixed Role to All")),d().createElement(Yl,{value:"conditionally",boxClass:""},Na("Assign Role Conditionally")))),n&&d().createElement("div",{style:{marginBottom:"10px"}},d().createElement("div",{role:"alert",className:"sui-notice sui-notice-warning sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,d().createElement("b",null,Na("Caution")+": "),Na("Granting the Administrator role gives users complete access to your site. Please assign this role carefully to prevent unauthorized access.")))))),_.isUndefined(this.props.settings["registration-user-role"])||"fixed"===this.props.settings["registration-user-role"]?d().createElement("div",{className:"sui-border-frame"},d().createElement("div",{className:"sui-form-field"},d().createElement(fl,Xh({},this.props,{property:"registration-role-field",label:r,defaultValue:"subscriber",description:i,required:!0}),_.map(s,(e,t)=>d().createElement("option",{value:t,key:t},e.name))))):d().createElement("div",{className:"sui-form-field"},d().createElement(Zh,Xh({},this.props,{updateProperty:this.updateProperty,settings:this.state,state:this.state,metaDescription:Na('No custom user meta created yet. Click on "+ Add Custom User Meta" to create custom user meta and map form fields to it.')}))),d().createElement(ql,Xh({},this.props,{property:"custom-mapping",settingsLabel:Na("Custom User Meta"),default:"none",description:Na("Create custom user meta keys and assign your form fields to them to set additional user meta keys upon successful user registration.")}),d().createElement(Yl,{value:"none",label:Na("None")}),d().createElement(Ql,{value:"custom",label:Na("Add Custom User Meta")},d().createElement(yc,Xh({},this.props,{updateProperty:this.updateProperty,settings:this.state,state:this.state,metaDescription:Na('No custom user meta created yet. Click on "+ Add Custom User Meta" to create custom user meta and map form fields to it.')})))))}}var tf=Dr(ef);function sf(){return sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},sf.apply(null,arguments)}class af extends ea.Component{render(){const e=Pa(this.props.wrappers,["password"]),t=forminatorData.isSubdomainNetwork?"http://sitename.website.com":"http://website.com/network-name/sitename";return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Site Registration")),d().createElement("span",{className:"sui-description"},Na("Choose whether to allow site registrations on your multisite network and different related settings."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field"},d().createElement(ql,sf({},this.props,{property:"site-registration",default:"enable"}),d().createElement(Ql,{value:"enable",label:Na("Enable")},d().createElement("div",{className:"sui-border-frame"},d().createElement(ea.Fragment,null,d().createElement("span",{className:"sui-description",style:{marginTop:"0",marginBottom:"10px"}},Na("Assign form fields to the default WordPress site meta keys below.")),d().createElement(Yh,sf({},this.props,{property:"site-registration-name-field",label:Na("Site Name"),defaultValue:"",fieldClass:"field-required",required:!0,description:Na("Site address meta key will be automatically set based on this field as {{strong}}"+t+"{{/strong}}",{components:{strong:d().createElement("strong",null)}})}),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(Yh,sf({},this.props,{property:"site-registration-title-field",label:Na("Site Title"),defaultValue:"",fieldClass:"field-required",required:!0}),_.map(e,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(fl,sf({},this.props,{property:"site-registration-role-field",label:Na("Site Role"),defaultValue:"",required:!0}),_.map(forminatorData.userRoles,(e,t)=>d().createElement("option",{value:t,key:t},e.name)))))),d().createElement(Yl,{value:"disable",label:Na("Disable")})))))}}function rf(){return rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},rf.apply(null,arguments)}class nf extends ea.Component{render(){const e=_.isUndefined(this.props.settings["registration-password-field"])?"":this.props.settings["registration-password-field"],t=_.isUndefined(this.props.settings["activation-method"])?"":this.props.settings["activation-method"];return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("User Account Activation")),d().createElement("span",{className:"sui-description"},Na("Choose the activation method and other settings for the user accounts."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(ql,rf({},this.props,{property:"activation-method",settingsLabel:Na("Activation Method"),default:"default",description:Na("By default, the user account is activated upon form submission. However, you can choose between {{strong}}Email Activation{{/strong}}, which requires the user to click on an activation email, or {{strong}}Manual Approval{{/strong}} which requires site admin to approve an account.",{components:{strong:d().createElement("strong",null)}})}),d().createElement(Yl,{value:"default",label:Na("Default")}),d().createElement(Ql,{value:"email",label:Na("Email Activation"),boxClass:"sui-tab-boxed"},d().createElement(kl,rf({},this.props,{property:"confirmation-page",label:Na("Confirmation Page"),defaultValue:"",triggerChange:"1",description:Na("Choose the page to redirect users to when they click on the confirmation link.")}),_.map(forminatorData.pages,(e,t)=>d().createElement("option",{value:e.ID,key:t},_.isEmpty(e.post_title)?Na("page ID: ")+e.ID:e.post_title)))),d().createElement(Ql,{value:"manual",label:Na("Manual Approval")},d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("A site admin will have to manually approve each entry from the submissions page to activate the user accounts."))))))),d().createElement(_l,rf({},this.props,{property:"activation-email",settingsLabel:Na("Activation Email"),default:"default",settingsDesc:Na("By default, WordPress sends an activation email containing user account information after the account activation. However, you can choose not to send this email.")}),d().createElement("div",{value:"default"},Na("Default")),d().createElement("div",{value:"none"},Na("None"))),"auto"===e&&d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Since the {{strong}}Password{{/strong}} user meta key is mapped to {{strong}}Auto Generate Password{{/strong}}, it's recommended to keep this option to {{strong}}Default{{/strong}} so the auto-generated password can be sent to the users.",{components:{strong:d().createElement("strong",null)}}))))),"manual"===t&&d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Since the activation requires manual approval from site admin, it's recommended to keep this option to {{strong}}Default{{/strong}} to let users know when their account is activated.",{components:{strong:d().createElement("strong",null)}})))))))}}function of(){return of=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},of.apply(null,arguments)}class lf extends ea.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.settings["hide-registration-form"])?"":this.props.settings["hide-registration-form"];return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Additional Settings")),d().createElement("span",{className:"sui-description"},Na("These settings will add some extra control on your registration process."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field"},d().createElement("div",{style:{marginBottom:"10px"}},"manual"!==this.props.settings["activation-method"]&&d().createElement(Up,of({},this.props,{label:Na("Automatically log in newly activated users"),description:Na("This will automatically log in a user upon successful activation of their account."),property:"automatic-login"})),d().createElement(Up,of({},this.props,{label:Na("Hide the form if a user is already logged in"),description:Na("Enabling this will hide the form from logged-in users."),property:"hide-registration-form",unWrap:!0}))),e&&d().createElement("div",{className:"sui-border-frame sui-toggle-content"},d().createElement(ip,of({},this.props,{property:"hidden-registration-form-message",label:Na("Message (optional)"),hideEditorOptions:"true",cutomTinymce:"bold,italic,underline,link,alignleft,aligncenter,alignright",placeholder:Na("Type a message for logged in users here…"),description:Na("You can optionally add a message for logged in users, which appears when the form is hidden.")}))))))}}class pf extends ea.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){return d().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("User Registration"))),d().createElement("div",{className:"sui-box-body"},d().createElement(tf,this.props),forminatorData.isMainSite&&d().createElement(af,this.props),d().createElement(nf,this.props),d().createElement(lf,this.props)),d().createElement(Ro,this.props))}}var cf=Dr(pf);var uf=ce(function(e){return{settings:e.settings,wrappers:e.wrappers}},function(s){return{actions:{settingsActions:Ut(e,s),modalActions:Ut(t,s),builderActions:Ut(a,s)}}})(cf);function df(){return df=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},df.apply(null,arguments)}class mf extends ea.Component{render(){Pa(this.props.wrappers,["password"]);const e=ya("email",this.props.wrappers),t=ya("text",this.props.wrappers),s=ya("name",this.props.wrappers),a=e.concat(t,s),r=ya("password",this.props.wrappers),i=_.isEmpty(a)?"":a[0].element_id,n=this.props.settings["login-username-field"],o=_.find(a,function(e){return n===e.element_id});return this.props.settings["login-username-field"]=o?n:i,d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Login Fields")),d().createElement("span",{className:"sui-description"},Na("Map your form fields to the meta keys and have additional control over the login form fields."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label"},Na("Form Fields Mapping")),d().createElement("span",{className:"sui-description"},Na("Assign your form fields to the meta keys required to login a user.")),d().createElement("div",{className:"sui-border-frame"},d().createElement(ea.Fragment,null,d().createElement(Yh,df({},this.props,{property:"login-username-field",label:Na("Username"),defaultValue:i,fieldClass:"field-required",required:!0}),_.map(a,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))),d().createElement(Yh,df({},this.props,{property:"login-password-field",label:Na("Password"),defaultValue:"password-1",fieldClass:"field-required",required:!0}),_.map(r,(e,t)=>d().createElement("option",{value:e.element_id,key:t},ml(e.label)," | ",e.element_id))))),d().createElement(ql,df({},this.props,{property:"remember-me",settingsLabel:Na("Remember Me Field"),default:"true",description:Na("Choose whether to show the {{strong}}Remember Me{{/strong}} field in your form. This option will add a Remember Me checkbox before the submit button.",{components:{strong:d().createElement("strong",null)}})}),d().createElement(Ql,{value:"true",label:Na("Show"),boxClass:"sui-tab-boxed"},d().createElement(rl,null,d().createElement(il,{cols:"12"},d().createElement(ol,df({},this.props,{property:"remember-me-label",placeholder:Na("Remember me"),label:Na("Label")})))),d().createElement(rl,null,d().createElement(il,{cols:"4"},d().createElement(ol,df({},this.props,{type:"number",defaultValue:"0",property:"remember-me-cookie-number",placeholder:"10",label:Na("Cookie Expiration")}))),d().createElement(il,{cols:"4"},d().createElement(fl,df({},this.props,{defaultValue:"days",property:"remember-me-cookie-type",label:" "}),d().createElement("option",{value:"days"},Na("day(s)")),d().createElement("option",{value:"weeks"},Na("week(s)")),d().createElement("option",{value:"months"},Na("month(s)")),d().createElement("option",{value:"years"},Na("year(s)")))),d().createElement(il,{cols:"12"},d().createElement("span",{className:"sui-description sui-description-toggle"},Na("Users will have to provide login details again after the selected period."))))),d().createElement(Yl,{value:"false",label:Na("Hide")})))))}}function hf(){return hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},hf.apply(null,arguments)}class ff extends ea.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.settings["hide-login-form"])?"":this.props.settings["hide-login-form"];return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Additional Settings")),d().createElement("span",{className:"sui-description"},Na("These settings will add some extra control on your login process."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field"},d().createElement("div",{style:{marginBottom:"10px"}},d().createElement(Up,hf({},this.props,{label:Na("Hide the form if a user is already logged in"),description:Na("Enabling this will hide the form from logged-in users."),property:"hide-login-form",unWrap:!0}))),e&&d().createElement("div",{className:"sui-border-frame sui-toggle-content"},d().createElement(ip,hf({},this.props,{property:"hidden-login-form-message",label:Na("Message (optional)"),hideEditorOptions:"true",cutomTinymce:"bold,italic,underline,link,alignleft,aligncenter,alignright",placeholder:Na("Type a message for logged in users here…"),description:Na("You can optionally add a message for logged in users, which appears when the form is hidden.")}))))))}}class bf extends ea.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){return d().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("Login User"))),d().createElement("div",{className:"sui-box-body"},d().createElement(mf,this.props),d().createElement(ff,this.props)),d().createElement(Ro,this.props))}}var gf=Dr(bf);var yf=ce(function(e){return{settings:e.settings,wrappers:e.wrappers}},function(s){return{actions:{settingsActions:Ut(e,s),modalActions:Ut(t,s),builderActions:Ut(a,s)}}})(gf);class Ef extends ea.Component{constructor(e){super(e),this.deleteBehavior=this.deleteBehavior.bind(this),this.editModal=this.editModal.bind(this),this.closeEditModal=this.closeEditModal.bind(this)}closeMenu(){jQuery(".sui-dropdown").removeClass("open")}getAllWithoutCurrent(e){return e.filter(e=>e.slug!==this.props.behavior.slug)}deleteBehavior(){const e=[...this.props.behaviors],t=this.getAllWithoutCurrent(e);this.closeMenu(),this.props.actions.behaviorsActions.updateBehaviorArray(t)}closeEditModal(){this.props.actions.modalActions.showModal({open:!1},"behavior")}editModal(){this.props.actions.modalActions.showModal({open:!0,new:!1,behavior:this.props.behavior,field:this.props.field,behaviors:this.props.behaviors,closeModal:this.closeEditModal},"behavior")}conditionMarkup(){const e=Pa(this.props.wrappers);if(_.isUndefined(this.props.behavior.conditions))return;const t=this.props.behavior.conditions[0];if(_.isUndefined(t))return;const s=_.filter(e,e=>e.element_id===t.element_id);if(_.isUndefined(s))return;if(_.isUndefined(s[0]))return;const a=s[0].label,r=Ma(t.rule,s.field_type),i=ka(s[0],t),n=this.props.behavior.conditions.length;let o="";return n-1>0&&(o="+ "+(n-1)+" "+Na("more condition(s)")),d().createElement("span",{className:"fui-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${Na("Process behavior if")} ${a} ${r} ${i} ${o}`,"aria-hidden":"true"},d().createElement("i",{className:"sui-icon-link sui-sm"}))}render(){let e="",t="",s=ua(),a=Object.keys(s)[0];_.isUndefined(this.props.behavior["submission-behaviour"])||_.isEmpty(this.props.behavior["submission-behaviour"])||(a=this.props.behavior["submission-behaviour"]),e=this.props.behavior.label?this.props.behavior.label:s[a],t=a===Object.keys(s)[1]?this.props.behavior["redirect-url"]:this.props.behavior["thankyou-message"]?jQuery("<div>"+this.props.behavior["thankyou-message"]+"</div>").text():"";const r=this.conditionMarkup();return d().createElement("div",{className:"sui-builder-field sui-react sui-can_open"},!_.isUndefined(this.props.behavior.conditions)&&this.props.behavior.conditions.length>0&&d().createElement(d().Fragment,null,r),d().createElement("div",{className:"sui-field-info fui-behaviors-info",onClick:this.editModal},d().createElement("div",{className:"sui-builder-field-label fui-behaviors-label",style:{minWidth:"90px"}},d().createElement("i",{className:"","aria-hidden":"true"}),d().createElement("span",null,e)),d().createElement("div",{className:"sui-builder-field-label fui-notifications-recipient"},d().createElement("span",null,t))),d().createElement("div",{className:"sui-field-actions"},d().createElement("div",{className:"sui-dropdown"},d().createElement("button",{className:"sui-button-icon sui-dropdown-anchor"},d().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Open condition settings"))),d().createElement("ul",null,d().createElement("li",null,d().createElement("button",{onClick:this.editModal},d().createElement("i",{className:"sui-icon-pencil","aria-hidden":"true"}),Na("Edit Behavior"))),this.props.behaviors.length>1&&d().createElement("li",null,d().createElement("button",{className:"sui-option-red",onClick:this.deleteBehavior},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete")))))))}}function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},vf.apply(null,arguments)}class _f extends ea.Component{constructor(e){super(e),this.addBehavior=this.addBehavior.bind(this),this.closeModal=this.closeModal.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"behavior")}addBehavior(){const e={slug:"behavior-"+ia(),autoclose:!0,"autoclose-time":5,newtab:"sametab"};e["submission-behaviour"]=this.props.settings["submission-behaviour"]?this.props.settings["submission-behaviour"]:"behaviour-thankyou",this.props.settings["thankyou-message"]&&(e["thankyou-message"]=this.props.settings["thankyou-message"]),this.props.settings["email-thankyou-message"]&&(e["email-thankyou-message"]=this.props.settings["email-thankyou-message"]),this.props.settings["manual-thankyou-message"]&&(e["manual-thankyou-message"]=this.props.settings["manual-thankyou-message"]),this.props.actions.modalActions.showModal({open:!0,new:!0,behavior:e,field:this.props.field,behaviors:this.props.behaviors,closeModal:this.closeModal},"behavior")}render(){return d().createElement("div",{className:"sui-box-builder sui-flushed",ref:e=>this.el=e},d().createElement("div",{className:"sui-box-builder-body"},this.props.behaviors.length>0&&d().createElement("div",{className:"sui-builder-fields"},_.map(this.props.behaviors,(e,t)=>d().createElement(Ef,vf({key:e.slug,behavior:e},this.props,{counter:t})))),d().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addBehavior},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Behavior"))))}}function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},wf.apply(null,arguments)}class xf extends ea.Component{render(){return d().createElement("div",{id:"forminator-section-behavior-submission",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Submission Behavior")),d().createElement("span",{className:"sui-description"},Na("Configure what should happen when a user submits this form."))),d().createElement("div",{className:"sui-box-settings-col-2"},"leads"!==this.props.formType&&d().createElement(ea.Fragment,null,d().createElement("label",{className:"sui-settings-label"},Na("After submission")),d().createElement("span",{className:"sui-description",style:{marginBottom:10}},Na("Choose what happens after successful submission of this form. Multiple submission behaviors can be added and conditionally processed based on submitted form data.")),this.props.behaviors.length>1&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{style:"block",margin:"10px 0 20px"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You’ll need to configure conditional logic for each submission behavior to ensure Forminator knows when each behavior should be processed. If no conditions have been set, the first submission behavior will be processed."))))),d().createElement("div",{className:"sui-box-body",style:{marginBottom:30}},d().createElement(_f,this.props)),d().createElement(ql,wf({},this.props,{property:"enable-ajax",defaultValue:"true",settingsLabel:Na("Method"),disabled:ba("stripe",this.props.wrappers)||ba("stripe-ocs",this.props.wrappers),description:Na("Choose whether you want to use AJAX to send this form without reloading the page, or use the more traditional method of reloading the page.")}),d().createElement(Ql,{value:"true",label:Na("Ajax")},(ba("stripe",this.props.wrappers)||ba("stripe-ocs",this.props.wrappers))&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note that you can only use the Ajax submission method while using the Stripe field in your form. The Ajax method will hide your form after the successful submission and only your inline success message will be shown. The form will be available again when the page is reloaded.")))))),d().createElement(Ql,{value:"false",label:Na("Page Reload")},(ba("stripe",this.props.wrappers)||ba("stripe-ocs",this.props.wrappers))&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Note that you can only use the Ajax submission method while using the Stripe field in your form. The Ajax method will hide your form after the successful submission and only your inline success message will be shown. The form will be available again when the page is reloaded.")))))))),d().createElement(_l,wf({},this.props,{property:"validation",defaultValue:"true",settingsLabel:Na("Validation"),settingsDesc:Na("For fields that you've chosen to validate, choose how you want the validation to behave. On submission will run validation checks when the user submits the form using Ajax (recommended). The Live method will check fields at the same time as the user fills them out. Server side does the validation using PHP and returns any error messages after a page reload.")}),d().createElement("div",{value:"on_submit"},Na("On Submit")),d().createElement("div",{value:"server"},Na("Server Side"))),d().createElement(Up,wf({},this.props,{label:Na("Enable inline validation (as user types)"),property:"validation-inline",unWrap:!0})),d().createElement("div",{style:{marginTop:"30px"}},d().createElement(ql,wf({},this.props,{property:"submission-indicator",settingsLabel:Na("Submission Indicator"),default:"",description:Na("Choose whether you want to show a loader on your form until it is submitted. We highly recommend using this on long forms or forms with payment field since they may take a few seconds to submit.")}),d().createElement(Ql,{value:"show",boxClass:"sui-tab-boxed",label:Na("Show Loader")},d().createElement(ol,wf({},this.props,{property:"indicator-label",placeholder:Na("E.g. Submitting…"),defaultValue:"Submitting...",ariaLabel:Na("Text to show on the right of loading icon"),description:Na("Choose the text to show on the right of loading icon")}))),d().createElement(Yl,{label:Na("None"),value:""})))))}}function Nf(){return Nf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Nf.apply(null,arguments)}class Cf extends ea.Component{getFieldsWithAutofill(){this.fields=Pa(this.props.wrappers,[]),this.savedFieldsAutofill=_.isUndefined(this.props.settings["fields-autofill"])?[]:this.props.settings["fields-autofill"],this.fieldsWithAutoFill=[],this.fields.map(e=>{const t=function(e){let t=[],s=forminatorData.fields.filter(t=>t.type===e);return s.length<1?[]:(s=s[0],_.isUndefined(s.autofill_settings)||(t=s.autofill_settings),t)}(e.field_type),s=e.field_slug;if(!_.isUndefined(t[s])&&!_.isUndefined(t[s].values)&&!_.isEmpty(t[s].values)){let a={element_id:"",provider:"",is_editable:"no"},r=this.savedFieldsAutofill.filter(t=>t.element_id===e.element_id),i=!1;_.isUndefined(r)||_.isEmpty(r)||(r=r[0],a={element_id:r.element_id,provider:r.provider,is_editable:r.is_editable},i=!0),e.selectedProvider=a,e.isActive=i,e.autofillProviders=t[s].values,this.fieldsWithAutoFill.push(e)}})}maybeGetNoFieldsMarkup(){return _.isEmpty(this.fieldsWithAutoFill)?d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Form does not have fields that can be autofilled."))))):""}updateProvider(e,t,s){let a=this.savedFieldsAutofill.filter(e=>e.element_id===s);_.isEmpty(a)?(a={element_id:s,provider:t,is_editable:"no"},this.savedFieldsAutofill.push(a)):(a=a[0],a.provider=t,this.savedFieldsAutofill=this.savedFieldsAutofill.map(e=>e.element_id===s?a:e)),this.props.actions.settingsActions.updateSetting("fields-autofill",this.savedFieldsAutofill)}updateEditable(e,t,s){let a=this.savedFieldsAutofill.filter(e=>e.element_id===s);_.isEmpty(a)?(a={element_id:s,provider:"",is_editable:t},this.savedFieldsAutofill.push(a)):(a=a[0],a.is_editable=t,this.savedFieldsAutofill=this.savedFieldsAutofill.map(e=>e.element_id===s?a:e)),this.props.actions.settingsActions.updateSetting("fields-autofill",this.savedFieldsAutofill)}renderProviderOptions(e){const t=[];return Object.entries(e).forEach(e=>{let[s,a]=e;const r=[];Object.entries(a.attributes).forEach(e=>{let[t,s]=e;r.push(d().createElement("option",{value:t,key:t},s.name))}),t.push(d().createElement("optgroup",{label:a.name,key:s},r))}),t}render(){this.getFieldsWithAutofill();const e=_.isUndefined(this.props.settings["use-autofill"])?"":this.props.settings["use-autofill"];let t="sui-hidden";e&&"false"!==e&&(t="sui-toggle-content");return!(!_.isUndefined(this.props.settings["form-type"])&&_.includes(["registration","login"],this.props.settings["form-type"]))&&d().createElement("div",{id:"forminator-section-behavior-autofill",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Autofill")),d().createElement("span",{className:"sui-description"},Na("If the user filling out the form is logged in, we can auto-fill fields with any available data."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(Up,Nf({},this.props,{label:Na("Enable Autofill"),property:"use-autofill",unWrap:!0})),d().createElement("div",{className:t,style:{marginTop:"10px"}},this.maybeGetNoFieldsMarkup(),d().createElement("div",{className:"sui-accordion"},this.fieldsWithAutoFill.map(e=>d().createElement(lp,Nf({},this.props,{label:e.label,key:e.element_id}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(kl,{property:"provider",updateProperty:(t,s)=>{this.updateProvider(t,s,e.element_id)},defaultValue:"",label:Na("Autofill source"),settings:e.selectedProvider,hasSearch:!0,elementId:e.element_id},d().createElement("option",{value:""},Na("Disable Autofill")),this.renderProviderOptions(e.autofillProviders))),d().createElement(il,{cols:"6"},d().createElement(kl,{property:"is_editable",updateProperty:(t,s)=>{this.updateEditable(t,s,e.element_id)},defaultValue:"no",label:Na("Editable"),settings:e.selectedProvider,elementId:e.element_id+"_editable"},d().createElement("option",{value:"no"},Na("No")),d().createElement("option",{value:"yes"},Na("Yes")))))))))))}}function kf(){return kf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},kf.apply(null,arguments)}class Sf extends ea.Component{render(){const e=forminatorData.currentForm.settings["form-type"]||"default",t=["login","registration","leads"].includes(e);return _.isUndefined(this.props.settings["akismet-protection"])&&(this.props.settings["akismet-protection"]=1),forminatorData.akismetEnabled||(this.props.settings["akismet-protection"]=""),d().createElement("div",{id:"forminator-section-behavior-security",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Security")),d().createElement("span",{className:"sui-description"},Na("Added layers of security to prevent spam submissions."))),d().createElement("div",{className:"sui-box-settings-col-2"},"form"===this.props.moduleSlug&&d().createElement(Up,kf({},this.props,{label:Na("Enable Honeypot protection"),property:"honeypot",description:Na("Enabling this feature tricks spam bots by giving them a hidden challenge only bots will see. If the bot tries the challenge we know it's not a human and prevent the form being submitted.")})),d().createElement(Up,kf({},this.props,{label:Na("Enable Akismet spam protection"),property:"akismet-protection",disabled:!forminatorData.akismetEnabled,description:Na("If you have installed the {{link}}Akismet anti-spam plugin{{/link}}, you can enable this option to tell Forminator how to handle submissions that Akismet flags as spam.",{components:{link:d().createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/akismet/"})}})}),d().createElement(ql,kf({},this.props,{property:"akismet-protection-behavior",default:"fail",label:Na("How should Forminator handle spam submissions?")}),d().createElement(Ql,{value:"fail",boxClass:"sui-tab-boxed",label:Na("Fail Submission")},d().createElement(ol,kf({},this.props,{label:Na("Custom error message"),placeholder:Na("Something went wrong."),property:"spam-fail-message",description:Na("Enter a custom error message to let your visitors know why the submission failed.")}))),d().createElement(Ql,{value:"mark_spam",label:Na("Mark as Spam")},d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Entries marked as spam will be captured in the database, but not shown in Submissions. Additionally, Payments, Notification emails, and other automatic processes will be blocked.")))))))),"form"===this.props.moduleSlug&&!t&&d().createElement(Up,kf({},this.props,{label:Na("Enable logged in submission only"),property:"logged-users",description:Na("Lock down your form submissions to registered users only.")}),d().createElement("div",null,d().createElement(ol,kf({},this.props,{label:Na("Submissions limit per logged in user"),description:Na("Enter the number of times a logged in user can submit this form. Leave blank or enter “0” for no limit."),type:"number",placeholder:"0",property:"limit-per-user"}))),d().createElement("div",{style:{marginTop:"20px"}},d().createElement(ol,kf({},this.props,{label:Na("Message when user has already reached submissions limit"),placeholder:Na("You’ve already reached submissions limit."),property:"limit-per-user-error"}))))))}}function Pf(){return Pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Pf.apply(null,arguments)}class Of extends ea.Component{render(){return d().createElement("div",{id:"forminator-section-behavior-lifespan",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Lifespan")),d().createElement("span",{className:"sui-description"},Na("By default this form will always be available for submissions. However you can lock down if need be."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label",style:{marginBottom:"10px"}},Na("Expiry")),d().createElement(ql,Pf({},this.props,{property:"form-expire",default:"no_expire",simple:!0}),d().createElement(Yl,{value:"no_expire"},Na("None")),d().createElement(Ql,{value:"date",boxClass:"sui-tab-boxed",label:Na("Date")},d().createElement(gl,Pf({},this.props,{property:"expire_date",placeholder:Na("20 April 2018"),hasWordFormat:!0})),d().createElement(ol,Pf({},this.props,{label:Na("Expiration Message"),placeholder:Na("Whoops! This form has expired."),property:"expire_message",description:Na("Add some custom message for users to see when your form stops appearing or leave empty to show nothing (just an empty space).")}))),d().createElement(Ql,{value:"submits",boxClass:"sui-tab-boxed",label:Na("Submissions")},d().createElement(ol,Pf({},this.props,{placeholder:"10",property:"expire_submits",type:"number"})),d().createElement(ol,Pf({},this.props,{label:Na("Expiration Message"),placeholder:Na("Whoops! This form has expired."),property:"expire_message",description:Na("Add some custom message for users to see when your form stops appearing or leave empty to show nothing (just an empty space).")}))))))}}function Df(){return Df=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Df.apply(null,arguments)}class Ff extends ea.Component{render(){return d().createElement("div",{id:"forminator-section-behavior-rendering",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Rendering")),d().createElement("span",{className:"sui-description"},Na("Choose how you want your form to be rendered for users."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(Up,Df({},this.props,{property:"use_ajax_load",label:Na("Load form using AJAX"),description:Na("Enabling this feature will load the form via AJAX after the page has loaded up, effectively speeding up your page load time. This method can also (in most cases) avoid page caching issues with your form.")})),d().createElement(Up,Df({},this.props,{property:"use_donotcachepage",label:Na("Prevent page caching on form pages"),description:Na("Page caching plugins serve a static HTML version of the page which can cause issues to your dynamic forms. By enabling this, we'll use {{strong}}DONOTCACHEPAGE{{/strong}} constant to prevent pages with this form on it from being cached.",{components:{strong:d().createElement("strong",null)}})}))))}}function Af(){return Af=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Af.apply(null,arguments)}class Tf extends ea.Component{constructor(e){super(e)}componentDidUpdate(){this.addSaveAndContinueNotification()}addSaveAndContinueNotification(){const e=_.findIndex(this.props.notifications,{slug:"notification-0008-7000"});if(!this.props.settings.use_save_and_continue||!this.props.settings.sc_email_link)return void(-1!==e&&this.props.notifications.splice(e,1));const t={slug:"notification-0008-7000",recipients:"{save_and_continue_email}",label:Na("Save and Continue"),"email-subject":Na("Your {form_name} form on {site_title} has been saved as draft"),"email-editor":Na("<p>Hi there!</p><p>You've successfully saved <b>{form_name}</b> form on <a href='{site_url}' target='_blank' rel='noopener noreferrer' style='color:#097BAA;'>{site_title}</a>.\nTo continue where you left off, click the link below or copy the link to your web browser.</p><p><a href='{form_link}' target='_blank' rel='noopener noreferrer' style='color:#097BAA;'>{form_link}</a></p><p>The above link will expire in {retention_period} days. Also note that anyone visiting the link will be able to view your partially completed form data.</p>"),"email-recipients":"default","email-attachment":"false",type:"save_draft"};-1===e&&this.props.notifications.push(t)}render(){const e=e=>{this.props.router.navigate("/"+e)},t=this.props.settings,s=!_.isUndefined(t.use_save_and_continue)&&t.use_save_and_continue;return _.isUndefined(t.sc_email_link)&&(t.sc_email_link=!0),_.isUndefined(t.sc_message)&&(t.sc_message=Na("<p>Your form has been saved as draft and a resume link has been generated so you can return to the form anytime within {retention_period} days from today. Copy and save the link or enter your email address below to have the link sent to your mail.</p><p>These fields weren't saved to your submission draft: Paypal, Stripe, Signature, Password, Captcha, and Upload. Kindly fill them out before submitting the form.</p>")),"login"===t["form-type"]?"":d().createElement("div",{id:"forminator-section-behavior-save",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Save and Continue")),d().createElement("span",{className:"sui-description"},Na("Enable this option if you want to allow users save their progress and return to complete the form at a later time."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(Up,Af({},this.props,{property:"use_save_and_continue",label:Na("Enable save and continue"),unWrap:!0})),s&&d().createElement(ea.Fragment,null,d().createElement(ql,Af({},this.props,{property:"sc_tab",default:"configuration",wrapperClass:"save-continue-wrap mtop10",simple:!0,basicTabs:!0}),d().createElement(Ql,{value:"configuration",boxClass:"sui-tab-boxed",label:Na("Configuration")},d().createElement(ol,Af({},this.props,{property:"sc_draft_retention",label:Na("Draft retention period"),defaultValue:"30",description:Na("Enter the number of days a form's draft will be stored on your server before they are automatically deleted."),suffix:"days"})),d().createElement(ol,Af({},this.props,{property:"sc_link_text",label:Na("Save form link text"),defaultValue:Na("Save as Draft"),description:Na("Edit text for the save draft link.")})),d().createElement(ip,Af({},this.props,{property:"sc_message",extraId:"-draft",updateProperty:this.updateProperty,label:Na("Resume message"),description:Na("This message will be shown when a form is successfully saved as draft."),editorOptions:forminatorData.variables,cutomTinymce:"bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link",enableFormData:"true"})),d().createElement("div",{role:"alert",className:"sui-notice sui-active","aria-live":"assertive",style:{display:"block"}},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("These fields will not be saved in the submission draft: Paypal, Stripe, Signature, Password, Captcha, and Upload."))))),d().createElement(Up,Af({},this.props,{property:"sc_email_link",label:Na("Allow send draft link to email"),description:Na("Enable to allow users send the draft form's link to their email."),unWrap:!0})),t.sc_email_link&&d().createElement("div",{className:"sui-border-frame"},d().createElement("p",null,d().createElement("small",null,Na("Configure the send link email form below. You can edit the email contents in the {{link}}Email Notifications{{/link}} tab.",{components:{link:d().createElement("a",{onClick:()=>e("notifications"),href:"#"})}}))),d().createElement(ol,Af({},this.props,{property:"sc_email_input_label",label:Na("Email input label"),defaultValue:Na("Send draft link to")})),d().createElement(ol,Af({},this.props,{property:"sc_email_placeholder",label:Na("Placeholder (Optional)"),defaultValue:Na("E.g., johndoe@gmail.com")})),d().createElement(ol,Af({},this.props,{property:"sc_email_button_label",label:Na("Send link button label"),defaultValue:Na("Send draft link")})))),d().createElement(Ql,{value:"permission",boxClass:"sui-tab-boxed",label:Na("Permission")},d().createElement("p",{style:{marginBottom:"20px"}},d().createElement("small",null,Na("Select which users can save their forms as draft."))),d().createElement(ql,Af({},this.props,{property:"sc_permission",default:"public",simple:!0}),d().createElement(Ql,{value:"public",boxClass:"sui-tab-boxed",label:Na("Public")},d().createElement("p",null,d().createElement("small",null,Na("Every user can save their forms as draft.")))),d().createElement(Ql,{value:"registered",boxClass:"sui-tab-boxed",label:Na("Registered Users")},d().createElement("p",null,d().createElement("small",null,Na("Only registered users can save their forms as draft."))))))))))}}var Mf=Dr(Tf);function jf(){return jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},jf.apply(null,arguments)}class Uf extends ea.Component{render(){return d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Payments")),d().createElement("span",{className:"sui-description"},Na("Choose how you want the form to behave when you are collecting payments."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(Up,jf({},this.props,{label:Na("Require SSL certificate to submit this form"),property:"payment_require_ssl",description:Na("Enabling this will allow the form submission on an HTTPS page only. It is highly recommended to embed the form with payments action on an HTTPS page to avoid any man in the middle attack.")}))))}}function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Vf.apply(null,arguments)}class $f extends ea.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=ba("stripe",this.props.wrappers),t=ba("paypal",this.props.wrappers);forminatorData.currentForm.settings["form-type"];return d().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("Behavior"))),d().createElement("div",{className:"sui-box-body"},"leads"===this.props.formType&&d().createElement("div",{className:"sui-box-settings-row"},d().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Some of the settings you'd find in a regular form are unavailable in this form template because they are either unnecessary or controlled by the parent quiz automatically.")))))),d().createElement(xf,this.props),(e||t)&&d().createElement(Uf,this.props),d().createElement(Cf,this.props),d().createElement(Sf,Vf({},this.props,{moduleSlug:"form"})),"leads"!==this.props.formType&&d().createElement(ea.Fragment,null,d().createElement(Of,this.props),d().createElement(Ff,this.props),d().createElement(Mf,this.props))),d().createElement(Ro,this.props))}}var If=Dr($f);var Rf=ce(function(e){return{settings:e.settings,wrappers:e.wrappers,notifications:e.notifications,behaviors:e.behaviorArray,formType:e.settings["form-type"]||"default"}},function(s){return{actions:{settingsActions:Ut(e,s),behaviorsActions:Ut(n,s),modalActions:Ut(t,s)}}})(If);class Lf extends ea.Component{constructor(e){super(e)}render(){return d().createElement(ea.Fragment,null,forminatorData.showBranding&&d().createElement("img",{src:"https://wpmudev.com/wp-content/uploads/2023/08/Project-pdf-logo.png",style:{borderRadius:"50%"},width:"60",className:"sui-image sui-image-center"}),d().createElement("p",{className:"sui-block-content-center",style:{maxWidth:"600px",margin:"15px auto"}},d().createElement("small",null,Na("Generate and send PDF files (e.g. forms entries, receipts, invoices, quotations) to users after form submission."))),d().createElement("p",{className:"sui-block-content-center"},d().createElement("a",{className:"sui-button sui-button-purple",target:"_blank",href:"https://wpmudev.com/project/forminator-pro/?utm_source=forminator&utm_medium=plugin&utm_campaign=forminator_form-builder_pdf-addon"},Na("Upgrade to PRO{{icon/}}",{components:{icon:d().createElement("span",{className:"sui-icon-open-new-window sui-sm","aria-hidden":"true",style:{margin:0}})}}))))}}class Bf extends ea.Component{render(){const e=forminatorData.pluginUrl+"assets/images/",t=Ia(forminatorData.userPermissions.manage_forminator_addons)||Ia(forminatorData.userPermissions.manage_options);return d().createElement(ea.Fragment,null,forminatorData.showBranding&&d().createElement("img",{src:`${e}/forminator-disabled.png`,srcSet:`${e}/forminator-disabled.png 1x,\n\t\t\t\t\t\t${e}/forminator-disabled@2x.png 2x`,className:"sui-image sui-image-center"}),d().createElement("p",{className:"sui-block-content-center",style:{marginTop:"30px"}},d().createElement("small",null,Na("The {{b}}Forminator PDF Generator Add-on{{/b}} is required to use the PDF generator feature. Install it from the Add-ons page.",{components:{b:d().createElement("b",null)}}))),t&&d().createElement("p",{className:"sui-block-content-center"},d().createElement("button",{className:"sui-button sui-button-blue",href:forminatorData.addonsUrl,onClick:e=>{Ra(forminatorData.addonsUrl)}},Na("Get the Add-on"))))}}class zf extends ea.Component{render(){return d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("You haven't created any PDF files yet. When you do, you'll be able to view them all here.")))))}}class Wf extends ea.Component{constructor(e){super(e),this.showPreview=this.showPreview.bind(this),this.editPdf=this.editPdf.bind(this),this.deletePdf=this.deletePdf.bind(this),this.closeModal=this.closeModal.bind(this)}showPreview(e){Ra(window.location.href+"&form_type=pdf-form&forminator_action=pdf-preview&preview_nonce="+forminatorData.previewNonce+"&pdf_id="+e)}editPdf(e){window.location.href=forminatorData.formEditUrl+"&id="+e}deletePdf(e){this.props.actions.modalActions.showModal({open:!0,pdf:e,closeModal:this.closeModal,focusFirst:".pdf-delete-button"},"deletePdf")}closeModal(){this.props.actions.modalActions.showModal({open:!1},"deletePdf")}render(){return d().createElement("tr",{key:this.props.pdf.pdfId,className:`pdf-${this.props.pdf.pdfId}`},d().createElement("td",{className:"sui-table-item-title",colSpan:2},d().createElement("span",{className:"sui-icon-page-pdf","aria-hidden":"true"}),this.props.pdf.pdfFilename+".pdf"),d().createElement("td",{colSpan:1,style:{textAlign:"right"}},d().createElement("button",{role:"button",disabled:!Ia(forminatorData.pdfExtensionsEnabled),className:"sui-button-icon sui-tooltip sui-tooltip-left","data-tooltip":Na("Preview this PDF"),onClick:()=>{this.showPreview(this.props.pdf.pdfId)}},d().createElement("span",{className:"sui-icon-eye","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Preview this PDF"))),d().createElement("button",{role:"button",className:"sui-button-icon sui-tooltip sui-tooltip","data-tooltip":Na("Edit PDF File"),onClick:()=>{this.editPdf(this.props.pdf.pdfId)}},d().createElement("span",{className:"sui-icon-pencil","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Edit PDF File"))),d().createElement("button",{role:"button",className:"sui-button-icon sui-button-red sui-tooltip","data-tooltip":Na("Delete PDF File"),onClick:()=>{this.deletePdf(this.props.pdf)}},d().createElement("span",{className:"sui-icon-trash","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Delete PDF File")))))}}class Hf extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.saveForm=this.saveForm.bind(this)}closeModal(){this.props.closeModal()}saveForm(){const{formState:e}=this.props,t=_.isUndefined(e.settings.form_status)?"draft":e.settings.form_status,s=_.isUndefined(e.settings.formName)?"":e.settings.formName,a=_.isUndefined(e.settings.form_id)?-1:e.settings.form_id;let r="draft";"publish"===t&&(r="publish");const i={action:"forminator_save_builder",_wpnonce:forminatorData.formNonce,formName:s,form_id:a,status:r,version:forminatorData.version,data:JSON.stringify(e)};po.post(forminatorData.ajaxUrl,uo().stringify(i)).then(s=>{const a=ga("stripe",e.wrappers);if(s.data.success)this.reloadPageForSubscriptionPlans(a),-1===t.form_id&&(this.props.actions.settingsActions.updateSetting("form_id",s.data.data),forminatorData.currentForm.settings.form_id=s.data.data,window.history.pushState({},"Edit Form",forminatorData.formEditUrl+"&id="+s.data.data)),this.props.actions.settingsActions.saveBuilder("form_status",r),this.props.slideTo("pdfFilenameSlide","right");else{let e=!1,t=Na("Something went wrong while saving your form. Please try again.");_.isUndefined(s.data.data)||"string"!=typeof s.data.data?_.isUndefined(s.data.data)||"object"!=typeof s.data.data||(_.isUndefined(s.data.data[0].code)||"forminator_stripe_authentication_error"!==s.data.data[0].code||(e=!0),_.isUndefined(s.data.data[0].message)||(t=s.data.data[0].message)):t=s.data.data;new ta({type:"error",text:t,dismiss:e}).open(),this.closeModal()}}).catch(e=>{new ta({type:"error",text:Na("Something went wrong while saving your form. Please try again.")}).open(),this.closeModal()})}reloadPageForSubscriptionPlans(e){let t=!1;e.map(e=>{const s="live"===(_.isUndefined(e.mode)?"test":e.mode)?"live_plan_id":"test_plan_id";_.isUndefined(e.payments)||e.payments.map(e=>{_.isUndefined(e.payment_method)||"subscription"!==e.payment_method||(_.isUndefined(e[s])||_.isEmpty(e[s]))&&(t=!0)})}),t&&(window.forminatorChanges={fields:[],settings:!1,saved:!0,saveAttempted:!1},location.reload())}render(){const{closeModal:e}=this.props;return d().createElement("div",{className:"sui-box",style:{marginBottom:0}},d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),d().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},Na("You have unsaved changes")),d().createElement("p",{id:"forminator-settings__description",className:"sui-description"},Na("Your form contains unsaved changes. Please save your form before proceeding."))),d().createElement("div",{className:"sui-box-body sui-flatten sui-content-center sui-spacing-top--20 sui-spacing-bottom--40"},d().createElement("button",{className:"sui-button sui-button-ghost forminator-discard-pdf-settings",onClick:e},Na("Cancel")),d().createElement("button",{className:"sui-button forminator-pdf-save-continue",onClick:this.saveForm},d().createElement("span",{className:"sui-loading-text"},Na("Save and Continue")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class qf extends ea.Component{constructor(e){super(e),this.filename_input=d().createRef(),this.createBtn=d().createRef(),this.hyphenateFilename=this.hyphenateFilename.bind(this),this.setFilename=this.setFilename.bind(this),this.state={fileName:_.isEmpty(this.props.state.pdfFilename)?"":this.props.state.pdfFilename}}componentDidMount(){_.isEmpty(this.props.state.pdfFilename)&&jQuery(this.createBtn.current).prop("disabled",!0)}hyphenateFilename(e){const t=jQuery(this.createBtn.current);let s=e.currentTarget.value;e.currentTarget.value=s,this.setState({fileName:s}),s.trim().length>0?t.prop("disabled",!1):t.prop("disabled",!0)}setFilename(){const e=this;this.props.updateProperty("pdfFilename",this.state.fileName),setTimeout(function(){e.props.slideTo("pdfChooseTemplateSlide","right")},20)}render(){const{closeModal:e}=this.props;return d().createElement("div",{className:"sui-box",style:{marginBottom:0}},d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),d().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},Na("Enter PDF filename")),d().createElement("p",{id:"forminator-settings__description",className:"sui-description"},Na("Give your file a name so you can identify it later."))),d().createElement("div",{className:"sui-box-body sui-content-center"},d().createElement("div",{className:"sui-form-field"},d().createElement("input",{type:"text",id:"forminator-field-pdf-filename",name:"pdf_filename",className:"sui-form-control",defaultValue:this.state.fileName,onChange:e=>this.hyphenateFilename(e),ref:this.filename_input})),d().createElement("button",{id:"forminator-pdf-create-btn",className:"sui-button pdf-btn-next",onClick:this.setFilename,ref:this.createBtn},d().createElement("span",{className:"sui-loading-text"},Na("Next")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class Qf extends ea.Component{constructor(e){super(e),this.templates=d().createRef(),this.saveTemplate=this.saveTemplate.bind(this),this.setTemplate=this.setTemplate.bind(this),this.state={pdfTemplate:_.isEmpty(this.props.state.pdfTemplate)?"basic":this.props.state.pdfTemplate}}saveTemplate(){this.props.updateProperty("pdfTemplate",this.state.pdfTemplate);const e="receipt"===this.state.pdfTemplate?"invoiceInfoSlide":"pdfPreloadContentSlide";this.props.slideTo(e,"right")}setTemplate(e){this.setState({pdfTemplate:e.currentTarget.value})}render(){const{closeModal:e,slideTo:t}=this.props,s=ba("stripe",this.props.wrappers)||ba("stripe-ocs",this.props.wrappers),a=ba("paypal",this.props.wrappers);return d().createElement("div",{className:"sui-box",style:{marginBottom:0}},d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),d().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},Na("Choose a template")),d().createElement("p",{id:"forminator-settings__description",className:"sui-description"},Na("Select a template below to get started."))),d().createElement("div",{className:"sui-box-body sui-spacing-sides--0 sui-spacing-bottom--0"},d().createElement("div",{className:"sui-box-selectors sui-box-selectors-col-3",ref:this.templates},d().createElement("ul",{role:"radiogroup"},[{name:"basic",disabled:!1},{name:"receipt",disabled:!1},{name:"quotation",disabled:!0}].map((e,t)=>d().createElement("li",{key:"template-"+ia()},d().createElement("label",{htmlFor:`pdf-template-${e.name}`,className:"sui-box-selector "+(e.disabled?"sui-disabled":"")},d().createElement("input",{type:"radio",id:`pdf-template-${e.name}`,name:"pdf-template","aria-labelledby":`pdf-template-${e.name}-label`,value:e.name,defaultChecked:e.name===this.state.pdfTemplate,onClick:this.setTemplate}),d().createElement("span",{"aria-hidden":"true",className:"box-select-head"},d().createElement("span",{id:`pdf-template-${e.name}-label`,"aria-hidden":"true",style:{textTransform:"capitalize"}},Na(e.name)),e.disabled&&d().createElement("span",{className:"sui-tag sui-tag-blue",style:{padding:"0 5px",marginLeft:"10px",fontWeight:"900",fontSize:"8px",textTransform:"uppercase",minHeight:"0",lineHeight:"1.1"}},Na("Coming Soon"))),d().createElement("span",{"aria-hidden":"true",className:"pdf-template-img"},d().createElement("img",{src:`${forminatorData.imagesUrl}/pdf-template-${e.name}.png`,srcSet:`${forminatorData.imagesUrl}/pdf-template-${e.name}.png 1x,\n\t\t\t\t\t\t\t\t\t\t\t${forminatorData.imagesUrl}/pdf-template-${e.name}@2x.png 2x`,alt:`pdf-template-${e.name}`})))))),"receipt"===this.state.pdfTemplate&&!s&&!a&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block",paddingTop:"30px"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Receipt template requires at least one payment field. Please add a PayPal or Stripe field to your form to proceed or choose a different template."))))))),d().createElement("div",{className:"sui-box-footer"},d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>t("pdfFilenameSlide","left")},Na("Back")),d().createElement("div",{className:"sui-actions-right"},d().createElement("button",{className:"sui-button pdf-btn-next",onClick:e=>this.saveTemplate(e),disabled:"receipt"===this.state.pdfTemplate&&!s&&!a},d().createElement("span",{className:"sui-loading-text"},Na("Next")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}class Yf extends ea.Component{constructor(e){super(e),this.contentTypes=d().createRef(),this.setType=this.setType.bind(this),this.state={preloadContent:"preload"}}createPdf(e){this.props.updateProperty("pdfPreloadContent",this.state.preloadContent),this.props.slideTo("pdfLoadingSlide","right")}setType(e){this.setState({preloadContent:e.currentTarget.value})}render(){const{closeModal:e,slideTo:t}=this.props,s=[{name:Na("Preload form fields in PDF file"),value:"preload"},{name:Na("Start with a blank PDF file"),value:"blank"}];return d().createElement("div",{className:"sui-box",style:{marginBottom:0}},d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),d().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},Na("Preload PDF Content")),d().createElement("p",{id:"forminator-settings__description",className:"sui-description"},Na("Choose if you want to load form data into your PDF file or start with a blank PDF file."))),d().createElement("div",{className:"sui-box-body sui-content-center sui-spacing-sides--0 sui-spacing-bottom--0"},d().createElement("div",{className:"sui-box-selectors sui-box-selectors-col-2",style:{marginBottom:"0"},ref:this.contentTypes},d().createElement("ul",{role:"radiogroup"},s.map((e,t)=>d().createElement("li",{key:"content-"+ia()},d().createElement("label",{htmlFor:`pdf-content-${e.value}`,className:"sui-box-selector"},d().createElement("input",{type:"radio",id:`pdf-content-${e.value}`,name:"pdf-content","aria-labelledby":`pdf-content-${e.value}-label`,value:e.value,checked:e.value===this.state.preloadContent,onChange:e=>this.setType(e)}),d().createElement("span",{"aria-hidden":"true",className:"box-select-head"},d().createElement("span",{id:`pdf-content-${e.value}-label`,"aria-hidden":"true"},e.name)))))))),d().createElement("div",{className:"sui-box-footer"},d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>t("pdfChooseTemplateSlide","left")},Na("Back")),d().createElement("div",{className:"sui-actions-right"},d().createElement("button",{className:"sui-button sui-button-blue pdf-btn-next",onClick:e=>this.createPdf(e)},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Create")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}class Gf extends ea.Component{constructor(e){super(e),this.save=this.save.bind(this),this.showError=this.showError.bind(this)}componentDidMount(){this.props.state.pdfSaved||this.save({action:"forminator_save_pdf",_wpnonce:forminatorData.formNonce,parent_form_id:this.props.settings.form_id,pdf_filename:this.props.state.pdfFilename,pdf_template:this.props.state.pdfTemplate,payee_info:this.props.state.payeeInfo,payer_info:this.props.state.payerInfo,payment_note:this.props.state.paymentNote,pdf_preload:this.props.state.pdfPreloadContent,version:forminatorData.version})}save(e){this.props.updateProperty("pdfSaved",!0),po.post(forminatorData.ajaxUrl,uo().stringify(e)).then(e=>{e.data.success?(this.props.updateProperty("pdfId",e.data.data.pdf_id),this.props.updateProperty("pdfFilename",e.data.data.pdf_filename),setTimeout(()=>{this.props.slideTo("pdfFileCreatedSlide","right")},20)):this.showError(e.data)}).catch(e=>{this.showError(e)})}showError(e){new ta({type:"error",text:Na("Something went wrong while creating your PDF. Please try again.")}).open(),console.log(e),this.props.closeModal()}render(){const{closeModal:e}=this.props;return d().createElement("div",{className:"sui-box",style:{marginBottom:0}},d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e}))),d().createElement("div",{className:"sui-box-body sui-content-center"},d().createElement("p",null,d().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),d().createElement("p",null,Na("Hold tight a few moments while we create your PDF file."))))}}class Kf extends ea.Component{constructor(e){super(e),this.customizePdf=this.customizePdf.bind(this),this.closeModal=this.closeModal.bind(this),this.applyChanges=this.applyChanges.bind(this)}customizePdf(e){window.location.href=forminatorData.formEditUrl+"&id="+e}closeModal(){this.props.closeModal()}applyChanges(){let e=this.getPropState();e=[this.props.state,...e],this.props.actions.pdfsActions.updatePdfs(e),this.closeModal()}componentWillUnmount(){this.props.updateProperty("pdfFilename",""),this.props.updateProperty("pdfTemplate",""),this.props.updateProperty("pdfPreloadContent","preload"),this.props.updateProperty("pdfSaved",!1)}getPropState(){const e=[];return _.each(this.props.pdfs,t=>{const s=Object.assign({},t);e.push(s)}),e}render(){return d().createElement("div",{className:"sui-box",style:{marginBottom:0}},d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:this.closeModal})),d().createElement("p",null,d().createElement("span",{className:"sui-icon-check sui-lg","aria-hidden":"true"})),d().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},Na("PDF File Created!")),d().createElement("p",{id:"forminator-settings__description",className:"sui-description"},Na("The PDF file has been created. Click “Edit PDF” to customize the created PDF or “Continue” to continue building your form."))),d().createElement("div",{className:"sui-box-body sui-content-center"},d().createElement("button",{className:"sui-button forminator-customize-pdf-settings","data-pdf-id":"",onClick:()=>this.customizePdf(this.props.state.pdfId)},Na("Edit PDF")),d().createElement("button",{className:"sui-button sui-button-ghost",onClick:this.applyChanges},d().createElement("span",{className:"sui-loading-text"},Na("Continue")))))}}function Jf(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,a)}return s}function Zf(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?Jf(Object(s),!0).forEach(function(t){ab(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Jf(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}function Xf(e){return Xf="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},Xf(e)}function eb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tb(e,t){for(var s=0;s<t.length;s++){var a=t[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function sb(e,t,s){return t&&tb(e.prototype,t),s&&tb(e,s),Object.defineProperty(e,"prototype",{writable:!1}),e}function ab(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function rb(){return rb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},rb.apply(this,arguments)}function ib(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ob(e,t)}function nb(e){return nb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},nb(e)}function ob(e,t){return ob=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ob(e,t)}function lb(e,t){if(null==e)return{};var s,a,r=function(e,t){if(null==e)return{};var s,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)s=i[a],t.indexOf(s)>=0||(r[s]=e[s]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}function pb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var s,a=nb(e);if(t){var r=nb(this).constructor;s=Reflect.construct(a,arguments,r)}else s=a.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pb(e)}(this,s)}}function ub(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var s=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==s)return;var a,r,i=[],n=!0,o=!1;try{for(s=s.call(e);!(n=(a=s.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw r}}return i}(e,t)||db(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 db(e,t){if(e){if("string"==typeof e)return mb(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?mb(e,t):void 0}}function mb(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,a=new Array(t);s<t;s++)a[s]=e[s];return a}var hb,fb,bb=!1;function gb(){if("undefined"!=typeof document&&!bb){var e=document.documentElement;fb=window.pageYOffset,document.documentElement.scrollHeight>window.innerHeight?e.style.width="calc(100% - "+function(){if(void 0!==hb)return hb;var e=document.documentElement,t=document.createElement("div");return t.setAttribute("style","width:99px;height:99px;position:absolute;top:-9999px;overflow:scroll;"),e.appendChild(t),hb=t.offsetWidth-t.clientWidth,e.removeChild(t),hb}()+"px)":e.style.width="100%",e.style.position="fixed",e.style.top=-fb+"px",e.style.overflow="hidden",bb=!0}}function yb(){if("undefined"!=typeof document&&bb){var e=document.documentElement;e.style.width="",e.style.position="",e.style.top="",e.style.overflow="","number"==typeof fb&&window.scroll(0,fb),bb=!1}}var Eb=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],vb=Eb.join(","),_b="undefined"==typeof Element?function(){return!1}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function wb(e,t){var s,a=[],r=function(e,t){var s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!s){if(Array.isArray(e)||(s=db(e))||t&&e&&"number"==typeof e.length){s&&(e=s);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}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 i,n=!0,o=!1;return{s:function(){s=s.call(e)},n:function(){var e=s.next();return n=e.done,e},e:function(e){o=!0,i=e},f:function(){try{n||null==s.return||s.return()}finally{if(o)throw i}}}}(e.querySelectorAll(t));try{for(r.s();!(s=r.n()).done;){var i=s.value;i instanceof HTMLElement&&a.push(i)}}catch(e){r.e(e)}finally{r.f()}return a}function xb(e,t){var s,a,r=t||{},i=[],n=[],o=wb(e,vb);r.includeContainer&&_b.call(e,vb)&&(o=Array.prototype.slice.apply(o)).unshift(e);for(var l=0;l<o.length;l++)Nb(s=o[l])&&(0===(a=Pb(s))?i.push(s):n.push({documentOrder:l,tabIndex:a,node:s}));return n.sort(Ob).map(function(e){return e.node}).concat(i)}function Nb(e){return!(!Cb(e)||function(e){return function(e){return Db(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;if(!e.ownerDocument)return!1;var t=Array.from(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]')),s=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t];return}(t);return!s||s===e}(e)}(e)||Pb(e)<0)}function Cb(e){return!(e.disabled||function(e){return Db(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}xb.isTabbable=function(e){if(!e)throw new Error("No node provided");if(!1===_b.call(e,vb))return!1;return Nb(e)},xb.isFocusable=function(e){if(!e)throw new Error("No node provided");if(!(e instanceof HTMLElement))return!1;if(!1===_b.call(e,Sb))return!1;return Cb(e)};var kb,Sb=Eb.concat("iframe").join(",");function Pb(e){var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function Ob(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function Db(e){return"INPUT"===e.tagName}var Fb,Ab=(Fb=[],{activateTrap:function(e){if(Fb.length>0){var t=Fb[Fb.length-1];t!==e&&t.pause()}var s=Fb.indexOf(e);-1===s||Fb.splice(s,1),Fb.push(e)},deactivateTrap:function(e){var t=Fb.indexOf(e);-1!==t&&Fb.splice(t,1),Fb.length>0&&Fb[Fb.length-1].unpause()}});function Tb(e){return window.setTimeout(e,0)}var Mb=function(e){ib(s,e);var t=cb(s);function s(e){var a;return eb(this,s),(a=t.call(this,e)).setFocusTrapElement=function(e){a.focusTrapElement=e},"undefined"!=typeof document&&(a.previouslyFocusedElement=document.activeElement),a}return sb(s,[{key:"componentDidMount",value:function(){var e=this.props.focusTrapOptions,t={returnFocusOnDeactivate:!1};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&"returnFocusOnDeactivate"!==s&&(t[s]=e[s]);var a=dr.findDOMNode(this.focusTrapElement);if(!(a instanceof HTMLElement))throw new Error("Focus trap element DOM node is not an HTML element!");this.focusTrap=this.props._createFocusTrap(a,t),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()}},{key:"componentDidUpdate",value:function(e){if(!this.focusTrap)throw new Error("Assertion failure!");if(e.active&&!this.props.active){var t={returnFocus:this.props.focusTrapOptions.returnFocusOnDeactivate||!1};this.focusTrap.deactivate(t)}else!e.active&&this.props.active&&this.focusTrap.activate();e.paused&&!this.props.paused?this.focusTrap.unpause():!e.paused&&this.props.paused&&this.focusTrap.pause()}},{key:"componentWillUnmount",value:function(){if(!this.focusTrap)throw new Error("Assertion failure!");this.focusTrap.deactivate(),!1!==this.props.focusTrapOptions.returnFocusOnDeactivate&&this.previouslyFocusedElement&&this.previouslyFocusedElement.focus&&this.previouslyFocusedElement.focus()}},{key:"render",value:function(){var e=this,t=d().Children.only(this.props.children);return d().cloneElement(t,{ref:function(s){e.setFocusTrapElement(s),"function"==typeof t.ref&&t.ref(s)}})}}]),s}(d().Component);function jb(e,t){var s=t||{},a=function(t){ib(r,t);var a=cb(r);function r(){return eb(this,r),a.apply(this,arguments)}return sb(r,[{key:"componentDidMount",value:function(){this.container=function(){var e=s.renderTo;if(e){if("string"==typeof e){var t=document.querySelector(e);if(!t)throw new Error('No element matches "'.concat(e,'"!'));return t}return e}var a=document.createElement("div");return document.body.appendChild(a),a}(),this.forceUpdate()}},{key:"componentWillUnmount",value:function(){!s.renderTo&&this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}},{key:"render",value:function(){return!1===this.props.mounted?null:!!this.container&&dr.createPortal(d().createElement(e,this.props,this.props.children),this.container)}}]),r}(d().Component);return a}Mb.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:function(e,t){var s=document,a="string"==typeof e?function(e,t){var s=e.querySelector(t);if(!(s&&s instanceof HTMLElement))throw new Error('No HTML element matches "'.concat(t,'"!'));return s}(s,e):e,r=Zf({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),i={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},n={activate:function(e){if(i.active)return;g(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=s.activeElement;var t=e&&e.onActivate?e.onActivate:r.onActivate;t&&t();return p(),n},deactivate:o,pause:function(){if(i.paused||!i.active)return;i.paused=!0,c()},unpause:function(){if(!i.paused||!i.active)return;i.paused=!1,g(),p()}};return n;function o(e){if(i.active){clearTimeout(kb),c(),i.active=!1,i.paused=!1,Ab.deactivateTrap(n);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:r.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:r.returnFocusOnDeactivate)&&Tb(function(){var e;y((e=i.nodeFocusedBeforeActivation,u("setReturnFocus")||e))}),n}}function l(e){return!!(e&&e instanceof Node)&&a.contains(e)}function p(){if(i.active)return Ab.activateTrap(n),kb=Tb(function(){y(d())}),s.addEventListener("focusin",h,!0),s.addEventListener("mousedown",m,{capture:!0,passive:!1}),s.addEventListener("touchstart",m,{capture:!0,passive:!1}),s.addEventListener("click",b,{capture:!0,passive:!1}),s.addEventListener("keydown",f,{capture:!0,passive:!1}),n}function c(){if(i.active)return s.removeEventListener("focusin",h,!0),s.removeEventListener("mousedown",m,!0),s.removeEventListener("touchstart",m,!0),s.removeEventListener("click",b,!0),s.removeEventListener("keydown",f,!0),n}function u(e){var t=r[e],a=t;if(!t)return null;if("string"==typeof t&&!(a=s.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(a=t()))throw new Error("`"+e+"` did not return a node");return a}function d(){var e;if(!(e=null!==u("initialFocus")?u("initialFocus"):a.contains(s.activeElement)?s.activeElement:i.firstTabbableNode||u("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function m(e){l(e.target)||(r.clickOutsideDeactivates?o({returnFocus:!xb.isFocusable(e.target)}):r.allowOutsideClick&&r.allowOutsideClick(e)||e.preventDefault())}function h(e){l(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),y(i.mostRecentlyFocusedNode||d()))}function f(e){if(!1!==r.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void o();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===i.firstTabbableNode)return e.preventDefault(),void y(i.lastTabbableNode);if(!e.shiftKey&&e.target===i.lastTabbableNode)e.preventDefault(),y(i.firstTabbableNode)}(e)}function b(e){r.clickOutsideDeactivates||l(e.target)||r.allowOutsideClick&&r.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=xb(a);i.firstTabbableNode=e[0]||d(),i.lastTabbableNode=e[e.length-1]||d()}function y(e){e!==s.activeElement&&(e&&e.focus?(e.focus({preventScroll:t.preventScroll}),i.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):y(d()))}}};var Ub=function(e){ib(s,e);var t=cb(s);function s(e){var a;if(eb(this,s),ab(pb(a=t.call(this,e)),"clearTimer",function(){var e;null===(e=a.timeout)||void 0===e||e.forEach(function(e){clearTimeout(e)})}),a.getApplicationNode=function(){return a.props.getApplicationNode?a.props.getApplicationNode():a.props.applicationNode},a.checkUnderlayClick=function(e){a.dialogNode&&e.target instanceof Node&&a.dialogNode.contains(e.target)||e.target instanceof Element&&e.target.ownerDocument&&(e.pageX>e.target.ownerDocument.documentElement.offsetWidth||e.pageY>e.target.ownerDocument.documentElement.offsetHeight)||a.exit(e)},a.checkDocumentKeyDown=function(e){!a.props.escapeExits||"Escape"!==e.key&&"Esc"!==e.key&&27!==e.keyCode||a.exit(e)},a.exit=function(e){a.props.onExit&&a.props.onExit(e)},!a.props.titleText&&!a.props.titleId)throw new Error("react-aria-modal instances should have a `titleText` or `titleId`");return a.timeout=[],a}return sb(s,[{key:"componentDidMount",value:function(){this.props.onEnter&&this.props.onEnter();var e=this.getApplicationNode();this.timeout.push(setTimeout(function(){e&&e instanceof Element&&e.setAttribute("aria-hidden","true")},0)),this.props.escapeExits&&this.timeout.push(this.addKeyDownListener()),this.props.scrollDisabled&&gb()}},{key:"componentDidUpdate",value:function(e){e.scrollDisabled&&!this.props.scrollDisabled?yb():!e.scrollDisabled&&this.props.scrollDisabled&&gb(),this.props.escapeExits&&!e.escapeExits?this.timeout.push(this.addKeyDownListener()):!this.props.escapeExits&&e.escapeExits&&this.timeout.push(this.removeKeyDownListener())}},{key:"componentWillUnmount",value:function(){this.props.scrollDisabled&&yb();var e=this.getApplicationNode();e&&e instanceof Element&&e.setAttribute("aria-hidden","false"),this.timeout.push(this.removeKeyDownListener()),this.clearTimer()}},{key:"addKeyDownListener",value:function(){var e=this;return setTimeout(function(){document.addEventListener("keydown",e.checkDocumentKeyDown)})}},{key:"removeKeyDownListener",value:function(){var e=this;return setTimeout(function(){document.removeEventListener("keydown",e.checkDocumentKeyDown)})}},{key:"render",value:function(){var e=this,t=this.props,s={};if(t.underlayStyle)for(var a in t.underlayStyle)Object.prototype.hasOwnProperty.call(t.underlayStyle,a)&&(s[a]=t.underlayStyle[a]);var r={className:t.underlayClass,style:s};for(var i in t.underlayClickExits&&(r.onMouseDown=this.checkUnderlayClick),this.props.underlayProps)r[i]=this.props.underlayProps[i];var n={};if(t.dialogStyle)for(var o in t.dialogStyle)Object.prototype.hasOwnProperty.call(t.dialogStyle,o)&&(n[o]=t.dialogStyle[o]);var l={key:"b",ref:function(t){e.dialogNode=t},role:t.alert?"alertdialog":"dialog",id:t.dialogId,className:t.dialogClass,style:n};for(var p in t.titleId?l["aria-labelledby"]=t.titleId:t.titleText&&(l["aria-label"]=t.titleText),t.focusDialog&&(l.tabIndex=-1),t)/^(data-|aria-)/.test(p)&&(l[p]=t[p]);var c=[d().createElement("div",Zf({},l),t.children)];t.verticallyCenter&&c.unshift(d().createElement("div",{key:"a",style:{}}));var u=t.focusTrapOptions||{};return(t.focusDialog||t.initialFocus)&&(u.initialFocus=t.focusDialog?"#".concat(this.props.dialogId):t.initialFocus),u.escapeDeactivates=t.escapeExits,d().createElement(Mb,{focusTrapOptions:u,paused:t.focusTrapPaused},d().createElement("div",Zf({},r),c))}}]),s}(d().Component);Ub.defaultProps={underlayProps:{},dialogId:"react-aria-modal-dialog",escapeExits:!0,focusTrapPaused:!1,scrollDisabled:!0};var Vb=jb(Ub);Vb.renderTo=function(e){return jb(Ub,{renderTo:e})};var $b=["modalContent","triggerContent"],Ib=function(e){var t=e.modalContent,s=e.triggerContent,a=lb(e,$b),r=ub(d().useState(!1),2),i=r[0],n=r[1],o=ub(d().useState(!1),2),l=o[0],p=o[1],c=ub(d().useState(a.firstSlide),2),u=c[0],m=c[1],h=ub(d().useState(null),2),f=h[0],b=h[1];d().useEffect(function(){if(!a.dialogId)throw new Error("SUI Modal instances should have a `dialogId`")},[a.dialogId]);var g,y,E,v="object"===Xf(t)&&null!==t,_=a.getApplicationNode,w=void 0===_?function(){return document.getElementsByClassName("sui-wrap")[0]}:_,x="sui-modal-content sui-content-".concat(l?"fade-out":"fade-in"," ").concat(a.dialogClass||"");v?(g=t[u].render,E=t[u].focus||!1,y=t[u].size,f&&!l&&(x+="sui-modal-slide sui-active sui-fadein-".concat(f))):(g=t,y=a.size,E=a.initialFocus||!1),void 0===a.mounted&&(a.mounted=i);var N=a.renderToNode?a.renderToNode:".sui-wrap",C=N?Vb.renderTo(N):Vb;return d().createElement(d().Fragment,null,d().createElement(C,rb({getApplicationNode:w,dialogClass:x,underlayClass:"sui-modal sui-modal-".concat(y||"md"," sui-active ").concat(a.underlayClass||""),includeDefaultStyle:!1,initialFocus:E},a),g({closeModal:function(){p(!0),setTimeout(function(){n(!1),p(!1),v&&(b(null),m(a.firstSlide))},300)},slideTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"left";m(e),b(t)}})),s&&s({openModal:function(){return n(!0)}}))};function Rb(){return Rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Rb.apply(null,arguments)}class Lb extends ea.Component{constructor(e){super(e),this.contentTypes=d().createRef(),this.saveReceiptInfo=this.saveReceiptInfo.bind(this),this.updateProperty=this.updateProperty.bind(this),this.state={payeeInfo:_.isEmpty(this.props.state.payeeInfo)?"":this.props.state.payeeInfo,payerInfo:_.isEmpty(this.props.state.payerInfo)?"":this.props.state.payerInfo,paymentNote:_.isEmpty(this.props.state.paymentNote)?"":this.props.state.paymentNote}}updateProperty(e,t){this.setState({[e]:t})}getOptions(){const e=[];return Pa(this.props.wrappers).map(t=>{e.push({value:"{"+t.element_id+"}",label:t.label})}),e}saveReceiptInfo(){this.props.updateProperty("payeeInfo",this.state.payeeInfo),this.props.updateProperty("payerInfo",this.state.payerInfo),this.props.updateProperty("paymentNote",this.state.paymentNote),this.props.slideTo("pdfLoadingSlide","right")}getFieldElementId(e){const t=ga(e,this.props.wrappers);let s="";return t.map((e,t)=>{0===t&&(s="{"+e.element_id+"}")}),s}render(){const{closeModal:e,slideTo:t}=this.props,s={site_title:Na("Site Title"),site_url:Na("Site URL"),date_dmy:Na("Date")},a=this.getFieldElementId("name"),r=this.getFieldElementId("email"),i=this.getFieldElementId("address"),n={};return _.assign(n,forminatorData.variables),d().createElement("div",{className:"sui-box",style:{marginBottom:0}},d().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},d().createElement("div",{className:"sui-actions-right"},d().createElement(sl,{icon:"close",iconSize:"md",label:Na("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),d().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},Na("Payee and Payer Details")),d().createElement("p",{id:"forminator-settings__description",className:"sui-description"},Na("Enter the payee and payer details for your receipt. You can insert merge tags or manually enter the details below. The details can later be changed in the PDF editor."))),d().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginTop:"30px"}},d().createElement(lp,Rb({},this.props,{label:Na("Payee details"),expanded:!0,defaultContentRender:!0}),d().createElement(ip,Rb({},this.props,{extraId:"payee-info",settings:this.props.state,boxClass:"sui-tab-boxed",property:"payeeInfo",disableMiscData:!1,editorOptions:n,allowRepeater:!1,excludeSubFields:!0,enableFormData:!0,enableAllFormFields:!1,enableAllNonFormFields:!1,enablePostData:!1,enableUpload:"true",allowButtonOnclick:"true",enableParentForm:"true",mainOptionsLabel:Na("Site Information"),mainOptions:s,paymentOptions:forminatorData.payment_variables,stripeSubscriptionOptions:forminatorData.stripe_subscription_variables,label:Na("Payee details"),updateProperty:this.updateProperty,selectLabel:Na("Insert dynamic data"),tooltipLabel:Na("Add dynamic data"),defaultValue:`<strong>${Na("Company:")}</strong> {site_title}<br><strong>${Na("Address:")}</strong> ${i}<br><strong>${Na("Invoice No:")}</strong> INV-{date_dmy}-{submission_id}`}))),d().createElement(lp,Rb({},this.props,{label:Na("Payer details"),defaultContentRender:!0}),d().createElement(ip,Rb({},this.props,{extraId:"payer-info",settings:this.props.state,boxClass:"sui-tab-boxed",property:"payerInfo",disableMiscData:!1,editorOptions:n,allowRepeater:!1,excludeSubFields:!0,enableFormData:!0,enablePostData:!1,enableUpload:"true",allowButtonOnclick:"true",enableParentForm:"true",mainOptions:s,paymentOptions:forminatorData.payment_variables,stripeSubscriptionOptions:forminatorData.stripe_subscription_variables,label:Na("Payer details"),updateProperty:this.updateProperty,selectLabel:Na("Insert dynamic data"),tooltipLabel:Na("Add dynamic data"),defaultValue:`<strong>${Na("Name / Company:")}</strong> ${a}<br><strong>${Na("Address:")}</strong> ${i}<br><strong>${Na("Email:")}</strong> ${r}<br><strong>${Na("Date:")}</strong> {date_dmy}`}))),d().createElement(lp,Rb({},this.props,{label:Na("Payment note or other instructions (Optional)")}),d().createElement(ip,Rb({},this.props,{extraId:"payment-note",settings:this.props.state,boxClass:"sui-tab-boxed",property:"paymentNote",disableMiscData:!1,editorOptions:n,allowRepeater:!1,excludeSubFields:!0,enableFormData:!0,enablePostData:!1,enableUpload:"true",allowButtonOnclick:"true",enableParentForm:"true",mainOptions:s,paymentOptions:forminatorData.payment_variables,stripeSubscriptionOptions:forminatorData.stripe_subscription_variables,label:Na("Payment note or other instructions (Optional)"),updateProperty:this.updateProperty,selectLabel:Na("Insert dynamic data"),tooltipLabel:Na("Add dynamic data")})))),d().createElement("div",{className:"sui-box-footer"},d().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>t("pdfChooseTemplateSlide","left")},Na("Back")),d().createElement("div",{className:"sui-actions-right"},d().createElement("button",{className:"sui-button sui-button-blue pdf-btn-next",onClick:e=>this.saveReceiptInfo(e)},d().createElement("span",{className:"sui-loading-text"},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Create")),d().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}function Bb(){return Bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Bb.apply(null,arguments)}class zb extends ea.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this),this.closeModal=this.closeModal.bind(this),this.state={pdfId:"",pdfFilename:"",pdfTemplate:"",payeeInfo:"",payerInfo:"",paymentNote:"",pdfPreloadContent:"",pdfSaved:!1}}updateProperty(e,t){this.setState({[e]:t})}closeModal(){this.props.actions.modalActions.showModal({open:!1},"createPdf")}render(){const e=window.forminatorChanges.settings,t=e=>{let{closeModal:t,slideTo:s}=e;return d().createElement(Yf,Bb({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},s=e=>{let{closeModal:t,slideTo:s}=e;return d().createElement(Lb,Bb({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},a=forminatorData.pdfExtensionsEnabled,r={pdfUnsavedSlide:{render:e=>{let{closeModal:t,slideTo:s}=e;return d().createElement(Hf,Bb({},this.props,{closeModal:t,slideTo:s,state:this.state}))},focus:".forminator-pdf-save-continue",size:"sm"},pdfFilenameSlide:{render:e=>{let{closeModal:t,slideTo:s}=e;return d().createElement(qf,Bb({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},focus:"#forminator-field-pdf-filename",size:"sm"},pdfChooseTemplateSlide:{render:e=>{let{closeModal:t,slideTo:s}=e;return d().createElement(Qf,Bb({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},size:"xl"}};return"receipt"===this.state.pdfTemplate?r.invoiceInfoSlide={render:s,size:"lg"}:r.pdfPreloadContentSlide={render:t,size:"lg"},r.pdfLoadingSlide={render:e=>{let{closeModal:t,slideTo:s}=e;return d().createElement(Gf,Bb({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},size:"sm"},r.pdfFileCreatedSlide={render:e=>{let{closeModal:t,slideTo:s}=e;return d().createElement(Kf,Bb({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},size:"sm"},d().createElement("p",{id:"create-new-pdf-btn"},d().createElement(Ib,Bb({},this.props,{dialogId:"create-pdf-modal",firstSlide:e?"pdfUnsavedSlide":"pdfFilenameSlide",titleId:"forminator-pdf-modal__title",modalContent:r,triggerContent:e=>{let{openModal:t}=e;return d().createElement("button",{className:"sui-button sui-button-blue",onClick:t,disabled:!Ia(a)},d().createElement("span",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Create New PDF"))},focusTrapPaused:"receipt"===this.state.pdfTemplate})))}}function Wb(){return Wb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Wb.apply(null,arguments)}class Hb extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"createPdf")}render(){const e=forminatorData.pdfExtensionsEnabled;return d().createElement("div",{id:"forminator-section-manage-pdf",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Manage PDF files")),d().createElement("span",{className:"sui-description"},Na("Create one or more PDF file templates that will be generated and populated with user data on form submissions. "))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("label",{className:"sui-settings-label"},Na("Available PDF files")),Ia(forminatorData.isPDFAddonCompatible)&&!Ia(e)&&d().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active","aria-live":"assertive",style:{display:"block",margin:"10px 0 20px"}},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("{{b}}Forminator PDF Generator Add-on{{/b}} requires the following modules ({{b}}mbstring{{/b}} and {{b}}gd{{/b}}). Please contact your hosting provider to enable the extensions.",{components:{b:d().createElement("b",null)}}))))),d().createElement("div",{className:"pdf-files-box",style:{marginTop:"10px"}},this.props.pdfs.length>0&&d().createElement("table",{className:"sui-table"},d().createElement("tbody",null,_.map(this.props.pdfs,(e,t)=>d().createElement(Wf,Wb({},this.props,{key:t,pdf:e}))))),this.props.pdfs.length<=0&&d().createElement(zf,this.props)),d().createElement(zb,this.props)))}}class qb extends ea.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=forminatorData.isPro,t=forminatorData.pdfAddonActive;let s;return s=e?t?d().createElement(Hb,this.props):d().createElement(Bf,this.props):d().createElement(Lf,this.props),d().createElement("div",{id:"forminator-form-pdf",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("PDF")),d().createElement("div",{className:"sui-actions-left"},!e&&d().createElement("span",{className:"sui-tag sui-tag-pro"},Na("Pro")))),d().createElement("div",{className:"sui-box-body"},s),d().createElement(Ro,this.props))}}var Qb=Dr(qb);var Yb=ce(function(e){return{wrappers:e.wrappers,settings:e.settings,formType:e.settings["form-type"]||"default",pdfs:e.pdfs||{},formState:e}},function(s){return{actions:{settingsActions:Ut(e,s),modalActions:Ut(t,s),pdfsActions:Ut(c,s)}}})(Qb);class Gb extends ea.Component{constructor(e){super(e)}render(){const e=`${forminatorData.pluginUrl}/assets/images/extension-pack-logo.png`,t=`${forminatorData.pluginUrl}/assets/images/extension-pack-logo@2x.png`,s=forminatorData.isPro||forminatorData.isHubConnected?"sui-button-blue":"sui-button-bright-blue",a=forminatorData.isPro||forminatorData.isHubConnected?"download":"plug-connected",r=forminatorData.isPro||forminatorData.isHubConnected?Na("Get Extension Pack Add-on"):Na("Get Free Extension Pack Add-on"),i=forminatorData.isPro?Na("Install the {{strong}}Forminator Extension Pack add-on{{/strong}} to enable this feature.",{components:{strong:d().createElement("strong",null)}}):forminatorData.isHubConnected?Na("The {{strong}}Forminator Free Extension Pack Add-on{{/strong}} is required to enable this feature. Click the Install button below to install it.",{components:{strong:d().createElement("strong",null)}}):Na("Connect your site to The Hub to install and activate the Forminator Extension Pack Add-on.");return d().createElement("div",{className:"sui-box-body sui-margin-top sui-margin-bottom"},forminatorData.showBranding&&d().createElement("img",{src:e,srcSet:`${e} 1x, ${t} 2x`,className:"sui-image sui-image-center",width:"60"}),d().createElement("p",{className:"sui-block-content-center",style:{maxWidth:"600px",margin:"15px auto"}},d().createElement("small",null,Na("Unlock abandoned form insights to refine your strategy and recover missed leads."),d().createElement("br",null),i)),d().createElement("p",{className:"sui-block-content-center"},d().createElement("a",{className:`sui-button ${s}`,target:"_blank",href:forminatorData.addonsUrl+"&page_referral=form_builder&forminator_open_addon="+forminatorData.EXTENSION_PACK_PID},d().createElement("span",{className:`sui-icon-${a} sui-sm`,"aria-hidden":"true",style:{margin:0}}),r)))}}class Kb extends ea.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}componentDidMount(){const e=this,t=_.isUndefined(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];this.$el=jQuery(this.el);const s=Object.assign({allowClear:!0,dropdownCssClass:"sui-select-dropdown"},this.props.options);if("function"==typeof this.$el.SUIselect2?this.$el.SUIselect2(s):"function"==typeof this.$el.FUIselect2?this.$el.FUIselect2(s):console.log("select2 not intiated"),this.$el.on("change.select2",this.handleChange),_.isUndefined(this.props.settings.permission_type)||"specific"!==this.props.settings.permission_type&&_.isUndefined(this.props.settings.user_info))"abandonment_required_fields"!==this.props.property&&_.each(t,function(t){e.$el.append(jQuery('<option value="'+t+'">'+t+"</option>"))});else{const s=this.props.settings.user_info;_.each(t,function(t){_.isUndefined(s[t])||e.$el.append(jQuery('<option value="'+t+'">'+s[t].email+"</option>"))})}this.$el.val(t).trigger("change.select2")}componentDidUpdate(e,t){_.isUndefined(this.props.settings.user_role)||e.settings.user_role===this.props.settings.user_role||this.$el.val([]).trigger("change.select2")}handleChange(e){const t=jQuery(e.target).val();"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,t):this.props.actions.settingsActions.updateSetting(this.props.property,t)}componentWillUnmount(){this.$el.off("change",this.handleChange),this.$el.unbind().removeData()}render(){const e=_.isUndefined(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];let t="";this.props.label&&(t=d().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&d().createElement("span",{className:"sui-label-note"},this.props.note)));let s="";return this.props.description&&(s=d().createElement("span",{id:`forminator-field-${this.props.property}-helper`,className:"sui-description"},this.props.description)),d().createElement("div",{className:"sui-form-field",style:this.props.style},t,d().createElement("select",{id:`forminator-field-${this.props.property}`,ref:e=>this.el=e,className:"sui-select",defaultValue:e,multiple:"multiple"},this.props.children),s)}}function Jb(){return Jb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Jb.apply(null,arguments)}class Zb extends ea.Component{getAbandonmentFieldOptions(){const e=Pa(this.props.wrappers,["page-break","stripe","stripe-ocs","paypal","group","section","captcha","html","hidden","calculation","signature","upload"]).map(e=>({id:e.element_id,text:e.label}));return{placeholder:Na("Select field(s)"),data:e}}render(){return d().createElement("div",{className:"sui-box-body"},d().createElement(Fl,{label:Na("Enable Form Abandonment"),labelDark:!0,description:Na("Capture and manage partially completed form entries when users leave without submitting.")},d().createElement(Up,Jb({},this.props,{settings:this.props.settings,label:Na("Enable tracking for abandoned form entries"),property:"abandonment",description:Na("Store users’ partially completed forms if they leave before submitting.")}),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-label"},Na("Fields required to start saving form data")),d().createElement(Kb,Jb({},this.props,{property:"abandonment_required_fields",options:this.getAbandonmentFieldOptions(),defaultValue:[],description:Na("These fields must be filled out by visitors before form data can be captured. If no field is selected, form data will always be saved.")}))),d().createElement("p",{className:"sui-description"},Na("Abandoned entries are stored according to your data retention settings under {{link}}Settings -> Privacy tab{{/link}}.",{components:{link:d().createElement("a",{href:forminatorData.settingsUrl+"&section=submissions",target:"_blank"})}})))))}}class Xb extends ea.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){if(forminatorData.abandonmentDisabled)return null;const e=forminatorData.isHubConnected,t=forminatorData.extensionPack,s=forminatorData.isPro;let a;return a=t?d().createElement(Zb,this.props):d().createElement(Gb,this.props),d().createElement("div",{id:"forminator-form-abandonment",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("Form Abandonment")),d().createElement("div",{className:"sui-actions-left"},(e||s)&&d().createElement("span",{className:"sui-tag sui-tag-sm sui-tag-green"},Na("New")),!e&&!s&&d().createElement("span",{className:"sui-tag sui-tag-sm sui-tag-free-plan"},Na("FREE PLAN")))),a,d().createElement(Ro,this.props))}}var eg=Dr(Xb);var tg=ce(function(e){return{settings:e.settings,wrappers:e.wrappers}},function(t){return{actions:{settingsActions:Ut(e,t)}}})(eg);class sg extends ea.Component{constructor(e){super(e),this.trashNotification=this.trashNotification.bind(this),this.deleteNotification=this.deleteNotification.bind(this),this.closeDeleteField=this.closeDeleteField.bind(this),this.editModal=this.editModal.bind(this),this.closeEditModal=this.closeEditModal.bind(this),this.duplicateNotification=this.duplicateNotification.bind(this)}closeMenu(){jQuery(".sui-dropdown").removeClass("open")}getNotificationsWithoutCurrent(e){return e.filter(e=>e.slug!==this.props.notification.slug)}deleteNotification(){this.closeMenu(),this.props.actions.modalActions.showModal({open:!0,notification:this.props.notification,closeModal:this.closeDeleteField,trashField:this.trashNotification},"deleteNotification")}closeDeleteField(){this.props.actions.modalActions.showModal({open:!1,notification:this.props.notification,closeModal:this.closeDeleteField,trashField:this.trashNotification},"deleteNotification")}trashNotification(){const e=[...this.props.notifications],t=this.getNotificationsWithoutCurrent(e);this.closeMenu(),this.props.actions.notificationsActions.updateNotifications(t)}closeEditModal(){this.props.actions.modalActions.showModal({open:!1},"notification")}editModal(){this.props.actions.modalActions.showModal({open:!0,new:!1,notification:this.props.notification,field:this.props.field,notifications:this.props.notifications,closeModal:this.closeEditModal},"notification")}duplicateNotification(){const e=Object.assign({},this.props.notification);e.slug="notification-"+ia()+"-"+ia();const t=[...this.props.notifications,e];this.props.actions.notificationsActions.updateNotifications(t)}conditionMarkup(){const e=Pa(this.props.wrappers),t="dont-send"===this.props.notification.condition_action?Na("Do not Send Email"):Na("Send Email");if(_.isUndefined(this.props.notification.conditions))return;const s=this.props.notification.conditions[0];if(_.isUndefined(s))return;const a=_.filter(e,e=>e.element_id===s.element_id);if(_.isUndefined(a))return;if(_.isUndefined(a[0]))return;const r=a[0].label,i=Ma(s.rule,a.field_type),n=ka(a[0],s),o=this.props.notification.conditions.length;let l="";return o-1>0&&(l="+ "+(o-1)+" "+Na("more condition(s)")),d().createElement("span",{className:"fui-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${t} ${Na("if")} ${r} ${i} ${n} ${l}`,"aria-hidden":"true"},d().createElement("i",{className:"sui-icon-link sui-sm"}))}render(){let e="";if(_.isUndefined(this.props.notification["email-recipients"])||"routing"!==this.props.notification["email-recipients"]){let t="";if(!_.isUndefined(this.props.notification.recipients)&&!_.isEmpty(this.props.notification.recipients)){const s=this.props.notification.recipients.split(","),a=s.length;t=a>2?s[0]+", "+s[1]+" + "+(a-2)+" "+Na("more recipient(s)"):this.props.notification.recipients,e=t}}else e=Na("Email routing is enabled");const t=this.conditionMarkup();return d().createElement("div",{className:"sui-builder-field sui-react sui-can_open"},!_.isUndefined(this.props.notification.conditions)&&this.props.notification.conditions.length>0&&d().createElement(ea.Fragment,null,t),d().createElement("div",{className:"sui-field-info fui-notifications-info",onClick:this.editModal},d().createElement("div",{className:"sui-builder-field-label fui-notifications-label"},d().createElement("i",{className:"sui-icon-mail","aria-hidden":"true"}),d().createElement("span",null,this.props.notification.label)),d().createElement("div",{className:"sui-builder-field-label fui-notifications-recipient"},d().createElement("span",null,e))),d().createElement("div",{className:"sui-field-actions"},d().createElement("div",{className:"sui-dropdown"},d().createElement("button",{className:"sui-button-icon sui-dropdown-anchor"},d().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}),d().createElement("span",{className:"sui-screen-reader-text"},Na("Open field settings"))),d().createElement("ul",null,d().createElement("li",null,d().createElement("button",{onClick:this.editModal},d().createElement("i",{className:"sui-icon-pencil","aria-hidden":"true"}),Na("Edit"))),"notification-0008-7000"!==this.props.notification.slug&&d().createElement(ea.Fragment,null,d().createElement("li",null,d().createElement("button",{onClick:this.duplicateNotification},d().createElement("i",{className:"sui-icon-copy","aria-hidden":"true"}),Na("Duplicate"))),d().createElement("li",null,d().createElement("button",{className:"sui-option-red",onClick:this.deleteNotification},d().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),Na("Delete"))))))))}}function ag(){return ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},ag.apply(null,arguments)}class rg extends ea.Component{constructor(e){super(e),this.addNotification=this.addNotification.bind(this),this.closeModal=this.closeModal.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"notification")}addNotification(){const e={slug:"notification-"+ia()+"-"+ia()};this.props.actions.modalActions.showModal({open:!0,new:!0,notification:e,field:this.props.field,notifications:this.props.notifications,closeModal:this.closeModal},"notification")}render(){return d().createElement("div",{className:"sui-box-builder sui-flushed",ref:e=>this.el=e},d().createElement("div",{className:"sui-box-builder-body"},this.props.notifications.length>0&&d().createElement("div",{className:"sui-builder-fields"},_.map(this.props.notifications,(e,t)=>d().createElement(sg,ag({key:e.slug,notification:e},this.props,{counter:t})))),d().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addNotification},d().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),Na("Add Email Notification"))))}}class ig extends ea.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){return d().createElement("div",{id:"forminator-form-notifications",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("Email Notifications"))),d().createElement("div",{className:"sui-box-body"},d().createElement("p",{className:"sui-description"},Na("You can send customized email notifications to your site admins and visitors on successful form submission. Advanced features like email routing and conditional emails provide granular control over the email notifications."))),d().createElement("div",{className:"sui-box-body"},d().createElement(rg,this.props)),d().createElement(Ro,this.props))}}var ng=Dr(ig);var og=ce(function(e){return{settings:e.settings,wrappers:e.wrappers,notifications:e.notifications}},function(e){return{actions:{notificationsActions:Ut(i,e),modalActions:Ut(t,e)}}})(ng);class lg extends Backbone.View{constructor(e){return super({el:e.el,tagName:"div",events:{"click .forminator-addon-connect":"connectAddon","click .forminator-addon-disconnect":"disconnectAddon","click .forminator-addon-form-disconnect":"formDisconnectAddon","click .forminator-addon-next":"submitNextStep","click .forminator-addon-back":"goPrevStep","click .forminator-addon-finish":"finishSteps","click .forminator-refresh-email-lists":"refreshLists","change select#group":"showInterests","click .forminator-google-spreadsheet-option":"changeFormType"}}),this.slug=e.slug,this.nonce=e.nonce,this.action=e.action,this.multi_id=e.multi_id,this.global_id=e.global_id,this.type=e.type,this.step=0,this.next_step=!1,this.prev_step=!1,this.scrollbar_width=this.getScrollbarWidth(),"form"===this.type?this.module_id=e.form_id:"poll"===this.type?this.module_id=e.poll_id:"quiz"===this.type&&(this.module_id=e.quiz_id),this.render()}render(){const e={};e.action=this.action,e._ajax_nonce=this.nonce,e.data={},e.data.slug=this.slug,e.data.step=this.step,e.data.current_step=this.step,e.data.global_id=this.global_id,e.data=this.getAjaxModuleData(e.data,!0),this.request(e,!1,!0)}applyLoader(e){e.find(".sui-button:not(.disable-loader)").addClass("sui-button-onload")}resetLoader(e){e.find(".sui-button").removeClass("sui-button-onload")}request(e,t,s){let a=this,r={data:e,close:t,loader:s};s&&(this.$el.find(".sui-box-body").html('<p class="fui-loading-dialog" style="text-align: center;" aria-label="Loading content"><span class="sui-icon-loader sui-md sui-loading" aria-hidden="true"></span></p>'),this.$el.find(".sui-box-footer").html(""),this.$el.find(".forminator-integration-popup__header").html("")),a.applyLoader(a.$el),this.ajax=jQuery.post({url:forminatorData.ajaxUrl,type:"post",data:e}).done(function(e){if(e&&e.success){a.renderBody(e),a.renderFooter(e);const s=e.data.data;if(a.onRender(s),a.resetLoader(a.$el),(t||!_.isUndefined(s.is_close)&&s.is_close)&&a.close(a),a.$el.find(".forminator-addon-close").on("click",function(){a.close(a)}),!_.isUndefined(s.notification)&&!_.isUndefined(s.notification.type)&&!_.isUndefined(s.notification.text)){new ta({type:s.notification.type,text:s.notification.text,time:4e3}).open()}if(_.isUndefined(s.has_back)?a.$el.find(".forminator-addon-back").hide():s.has_back?a.$el.find(".forminator-addon-back").show():a.$el.find(".forminator-addon-back").hide(),!_.isUndefined(s.size)){const e=jQuery("#forminator-integration-popup");"normal"===s.size&&e.removeClass("sui-modal-sm sui-modal-lg"),"small"===s.size&&(e.addClass("sui-modal-sm"),e.removeClass("sui-modal-lg sui-modal-reduced")),"reduced"===s.size&&(e.addClass("sui-modal-sm"),e.removeClass("sui-modal-lg sui-modal-md")),"large"===s.size&&(e.addClass("sui-modal-lg"),e.removeClass("sui-modal-sm sui-modal-md"))}s.is_poll&&setTimeout(a.request(r.data,r.close,r.loader),5e3),setTimeout(function(){SUI.suiAccordion(jQuery(".sui-accordion")),SUI.suiTabs(jQuery(".sui-tabs")),jQuery('select.sui-select[data-theme="icon"]').each(function(){SUI.select.initIcon(jQuery(this))}),jQuery('select.sui-select[data-theme="color"]').each(function(){SUI.select.initColor(jQuery(this))}),jQuery('select.sui-select[data-theme="search"]').each(function(){SUI.select.initSearch(jQuery(this))}),jQuery("select.sui-select:not([data-theme]):not(.custom-select2):not(.fui-multi-select)").each(function(){SUI.select.init(jQuery(this))}),jQuery("select.sui-variables").each(function(){SUI.select.initVars(jQuery(this))}),SUI.loadCircleScore(jQuery(".sui-circle-score")),SUI.showHidePassword()},10);jQuery("#forminator-integration-popup .sui-box").height()>jQuery(window).height()?jQuery("#forminator-integration-popup .sui-modal-overlay").css("right",a.scrollbar_width+"px"):jQuery("#forminator-integration-popup .sui-modal-overlay").css("right",0)}if("mailchimp"===a.slug){const e=a.$el.find("#group");e.length&&e.trigger("change")}a.$el.find("form").on("submit",function(e){e.preventDefault(),a.submitNextStep()})}),this.ajax.always(function(){a.$el.find(".fui-loading-dialog").remove()})}renderBody(e){this.$el.find(".sui-box-body").html(e.data.data.html);const t=this.$el.find(".sui-box-body .forminator-integration-popup__header").remove();t.length>0&&this.$el.find(".forminator-integration-popup__header").html(t.html())}renderFooter(e){const t=this,s=e.data.data.buttons;t.$el.find(".sui-box-footer").html(""),_.each(s,function(e){t.$el.find(".sui-box-footer").append(e.markup)})}onRender(e){var t,s;"object"==typeof window.SUI&&setTimeout(function(){SUI.suiAccordion(jQuery(".sui-accordion")),SUI.suiTabs(jQuery(".sui-tabs")),jQuery('select.sui-select[data-theme="icon"]').each(function(){SUI.select.initIcon(jQuery(this))}),jQuery('select.sui-select[data-theme="color"]').each(function(){SUI.select.initColor(jQuery(this))}),jQuery('select.sui-select[data-theme="search"]').each(function(){SUI.select.initSearch(jQuery(this))}),jQuery("select.sui-select:not([data-theme]):not(.custom-select2):not(.fui-multi-select)").each(function(){SUI.select.init(jQuery(this))}),jQuery("select.sui-variables").each(function(){SUI.select.initVars(jQuery(this))}),SUI.loadCircleScore(jQuery(".sui-circle-score")),SUI.showHidePassword()},50),t=this.$el,s={},s=Object.assign({allowClear:!0,dropdownCssClass:"sui-select-dropdown"},s),t.find("select.sui-select.fui-multi-select").each(function(){jQuery(this).attr("data-reorder")&&jQuery(this).on("select2:select",function(e){const t=e.params.data.element,s=jQuery(t),a=jQuery(this);a.append(s),a.trigger("change.select2")}),jQuery(this).SUIselect2(s)}),_.isUndefined(e.forminator_addon_current_step)||(this.step=+e.forminator_addon_current_step),_.isUndefined(e.forminator_addon_has_next_step)||(this.next_step=e.forminator_addon_has_next_step),_.isUndefined(e.forminator_addon_has_prev_step)||(this.prev_step=e.forminator_addon_has_prev_step)}close(e){e.ajax.abort(),e.remove(),this.trigger("modal:closed")}refreshLists(e){e.preventDefault(),e.stopPropagation();const t=jQuery(e.currentTarget),s=this.slug,a=this.global_id,r=this.nonce,i={slug:s,global_id:a};t.addClass("sui-button-onload"),jQuery.ajax({url:ajaxurl,type:"POST",data:{action:"forminator_refresh_email_lists",data:i,_ajax_nonce:r}}).done(function(e){if(e.success&&void 0!==e.data.options){const s=t.siblings(".sui-select"),a=s.closest(".sui-modal-content"),r=a.attr("id"),i=a.length?jQuery("#"+r):jQuery("body"),n="true"===s.attr("data-search")?0:-1,o=s.hasClass("sui-select-sm")?"sui-select-dropdown-sm":"";s.html(e.data.options),s.SUIselect2({dropdownParent:i,minimumResultsForSearch:n,dropdownCssClass:o})}}).fail(function(){}).always(function(){t.removeClass("sui-button-onload")})}showInterests(e){const t=this,s=jQuery(e.currentTarget).data("nonce"),a={},r=t.$el.find("form"),i={slug:t.slug,global_id:this.global_id,module_id:this.module_id,module_type:this.type};let n=r.serialize();n=n+"&"+jQuery.param(i),a.action="forminator_mailchimp_get_group_interests",a._ajax_nonce=s,a.data=n,t.applyLoader(t.$el),jQuery.ajax({url:ajaxurl,type:"POST",data:a}).done(function(e){e.success&&(r.find(".sui-form-field").slice(1).remove(),r.find(".sui-form-field:first-child").after(e.data),r.find(".sui-form-field").slice(1).find("select").each(function(){SUI.select.init(jQuery(this))}))}).fail(function(){}).always(function(){t.resetLoader(t.$el)})}submitNextStep(e){const t={},s=this.$el.find("form");let a={slug:this.slug,step:this.getStep(),global_id:this.global_id,current_step:this.step},r=s.serialize();a=this.getAjaxModuleData(a,!1),r=r+"&"+jQuery.param(a),t.action=this.action,t._ajax_nonce=this.nonce,t.data=r,this.request(t,!1,!1)}changeFormType(){const e={},t=this.$el.find("form");let s={slug:this.slug,step:this.step,global_id:this.global_id,current_step:this.step,change_form_type:1},a=t.serialize();s=this.getAjaxModuleData(s,!1),a=a+"&"+jQuery.param(s),e.action=this.action,e._ajax_nonce=this.nonce,e.data=a,this.request(e,!1,!1)}goPrevStep(e){const t={};let s={slug:this.slug,step:this.getPrevStep(),global_id:this.global_id,current_step:this.step};s=this.getAjaxModuleData(s,!0),t.action=this.action,t._ajax_nonce=this.nonce,t.data=s,this.request(t,!1,!1)}finishSteps(e){const t={},s=this.$el.find("form");let a={slug:this.slug,step:this.getStep(),global_id:this.global_id,current_step:this.step},r=s.serialize();a=this.getAjaxModuleData(a,!0),r=r+"&"+jQuery.param(a),t.action=this.action,t._ajax_nonce=this.nonce,t.data=r,this.request(t,!1,!1)}getStep(){return this.next_step?this.step+1:this.step}getPrevStep(){return this.prev_step?this.step-1:this.step}connectAddon(){const e={},t=this.$el.find("form");let s={slug:this.slug,step:this.getStep(),global_id:this.global_id,current_step:this.step},a=t.serialize();s=this.getAjaxModuleData(s,!0),a=a+"&"+jQuery.param(s),e.action=this.action,e._ajax_nonce=this.nonce,e.data=a,this.request(e,!1,!1)}disconnectAddon(){const e={action:"forminator_addon_deactivate"};e._ajax_nonce=this.nonce,e.data={},e.data.slug=this.slug,e.data.global_id=this.global_id,this.request(e,!0,!1)}formDisconnectAddon(){const e={};e.action=this.getAjaxModuleAction("deactivate"),e._ajax_nonce=this.nonce,e.data={},e.data.slug=this.slug,e.data=this.getAjaxModuleData(e.data,!0),this.request(e,!0,!1)}getScrollbarWidth(){let e=0;if(navigator.userAgent.match("MSIE")){let t=jQuery('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1e3,left:-1e3}).appendTo("body"),s=jQuery('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1e3,left:-1e3}).appendTo("body");e=t.width()-s.width(),t.add(s).remove()}else{const t=jQuery("<div />").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1e3,left:-1e3}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200});e=100-t.width(),t.parent().remove()}return e}getAjaxModuleData(e,t){return this.module_id&&(e.module_id=this.module_id,e.module_type=this.type,e.global_id=this.global_id),t&&this.multi_id&&(e.multi_id=this.multi_id),e}getAjaxModuleAction(e){if("deactivate"===e)e="forminator_addon_deactivate_for_module";return e}}!function(){const e={type:"form"};function t(t,s){this.$popup={},this._deferred={},this.el=t,this.$el=jQuery(this.el),this.options=_.extend(e,s),this.init()}jQuery.extend(t.prototype,{init:function(){const e=this;this.$el.find(".connect-integration").on("click",function(t){e.open(t)})},open:function(e){const t=this;jQuery("#forminator-integration-popup").remove();let s=jQuery(e.target);s.hasClass("connect-integration")||(s=s.closest(".connect-integration"));const a=function(){return t.close(),!1},r=s.data("nonce"),i=s.data("slug"),n=s.data("multi-global-id"),o=s.data("title"),l=s.data("image"),p=s.data("imagex2"),c=s.data("action"),u=s.data("form-id"),d=s.data("multi-id"),m=s.data("poll-id"),h=s.data("quiz-id"),f=_.template('<div class="sui-modal sui-modal-lg"><div role="dialog" id="forminator-integration-popup" class="sui-modal-content" aria-modal="true" aria-labelledby="forminator-integration-popup__title" aria-describedby="forminator-integration-popup__description"><div class="sui-box" style="margin-bottom: 0;"><div class="sui-box-header sui-flatten sui-content-center sui-spacing-top--60"><button class="sui-button-icon sui-button-float--right forminator-popup-close"><span class="sui-icon-close sui-md" aria-hidden="true"></span><span class="sui-screen-reader-text">Close</span></button><button class="sui-button-icon sui-button-float--left forminator-addon-back"><span class="sui-icon-chevron-left sui-md" aria-hidden="true"></span><span class="sui-screen-reader-text">Back</span></button><figure class="sui-box-logo" aria-hidden="true"><img src="<%= image %>" srcset="<%= image %> 1x, <%= image2x %> 2x" alt="<%= title %>" /></figure><div class="forminator-integration-popup__header"></div></div><div class="sui-box-body"></div><div class="sui-box-footer sui-flatten sui-content-center"></div></div></div></div>');jQuery("main.sui-wrap").append(f({image:l,image2x:p,title:o})),this.$popup=jQuery("#forminator-integration-popup");const b={slug:i,nonce:r,action:c,multi_id:d,global_id:n,el:this.$popup,type:t.options.type};"form"===t.options.type?b.form_id=u:"poll"===t.options.type?b.poll_id=m:"quiz"===t.options.type&&(b.quiz_id=h);return new lg(b).on("modal:closed",function(){t.close()}),this.$popup.find(".forminator-popup-action").remove(),this.$popup.find(".forminator-popup-close").on("click",a),this.$popup.on("click",".forminator-popup-cancel",a),SUI.openModal("forminator-integration-popup","forminator-form-appearance",undefined,!1,!0),this._deferred=new jQuery.Deferred,this._deferred.promise()},close:function(e){SUI.closeModal(),this.$el.trigger("reload"),this._deferred.resolve(this.$popup,e)}}),jQuery.fn.ForminatorIntegrationsModal=function(e){return this.each(function(){new t(this,e)})}}(jQuery,window,document);var pg="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},cg="URLSearchParams"in pg,ug="Symbol"in pg&&"iterator"in Symbol,dg="FileReader"in pg&&"Blob"in pg&&function(){try{return new Blob,!0}catch(e){return!1}}(),mg="FormData"in pg,hg="ArrayBuffer"in pg;if(hg)var fg=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],bg=ArrayBuffer.isView||function(e){return e&&fg.indexOf(Object.prototype.toString.call(e))>-1};function gg(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function yg(e){return"string"!=typeof e&&(e=String(e)),e}function Eg(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return ug&&(t[Symbol.iterator]=function(){return t}),t}function vg(e){this.map={},e instanceof vg?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function _g(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function wg(e){return new Promise(function(t,s){e.onload=function(){t(e.result)},e.onerror=function(){s(e.error)}})}function xg(e){var t=new FileReader,s=wg(t);return t.readAsArrayBuffer(e),s}function Ng(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Cg(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:dg&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:mg&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:cg&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():hg&&dg&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ng(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):hg&&(ArrayBuffer.prototype.isPrototypeOf(e)||bg(e))?this._bodyArrayBuffer=Ng(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):cg&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},dg&&(this.blob=function(){var e=_g(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=_g(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(dg)return this.blob().then(xg);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,s,a,r,i=_g(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,s=wg(t),a=/charset=([A-Za-z0-9_-]+)/.exec(e.type),r=a?a[1]:"utf-8",t.readAsText(e,r),s;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),s=new Array(t.length),a=0;a<t.length;a++)s[a]=String.fromCharCode(t[a]);return s.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},mg&&(this.formData=function(){return this.text().then(Pg)}),this.json=function(){return this.text().then(JSON.parse)},this}vg.prototype.append=function(e,t){e=gg(e),t=yg(t);var s=this.map[e];this.map[e]=s?s+", "+t:t},vg.prototype.delete=function(e){delete this.map[gg(e)]},vg.prototype.get=function(e){return e=gg(e),this.has(e)?this.map[e]:null},vg.prototype.has=function(e){return this.map.hasOwnProperty(gg(e))},vg.prototype.set=function(e,t){this.map[gg(e)]=yg(t)},vg.prototype.forEach=function(e,t){for(var s in this.map)this.map.hasOwnProperty(s)&&e.call(t,this.map[s],s,this)},vg.prototype.keys=function(){var e=[];return this.forEach(function(t,s){e.push(s)}),Eg(e)},vg.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Eg(e)},vg.prototype.entries=function(){var e=[];return this.forEach(function(t,s){e.push([s,t])}),Eg(e)},ug&&(vg.prototype[Symbol.iterator]=vg.prototype.entries);var kg=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Sg(e,t){if(!(this instanceof Sg))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var s,a,r=(t=t||{}).body;if(e instanceof Sg){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new vg(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new vg(t.headers)),this.method=(s=t.method||this.method||"GET",a=s.toUpperCase(),kg.indexOf(a)>-1?a:s),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in pg)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Pg(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var s=e.split("="),a=s.shift().replace(/\+/g," "),r=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(r))}}),t}function Og(e,t){if(!(this instanceof Og))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new vg(t.headers),this.url=t.url||"",this._initBody(e)}Sg.prototype.clone=function(){return new Sg(this,{body:this._bodyInit})},Cg.call(Sg.prototype),Cg.call(Og.prototype),Og.prototype.clone=function(){return new Og(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new vg(this.headers),url:this.url})},Og.error=function(){var e=new Og(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var Dg=[301,302,303,307,308];Og.redirect=function(e,t){if(-1===Dg.indexOf(t))throw new RangeError("Invalid status code");return new Og(null,{status:t,headers:{location:e}})};var Fg=pg.DOMException;try{new Fg}catch(e){(Fg=function(e,t){this.message=e,this.name=t;var s=Error(e);this.stack=s.stack}).prototype=Object.create(Error.prototype),Fg.prototype.constructor=Fg}function Ag(e,t){return new Promise(function(s,a){var r=new Sg(e,t);if(r.signal&&r.signal.aborted)return a(new Fg("Aborted","AbortError"));var i=new XMLHttpRequest;function n(){i.abort()}if(i.onload=function(){var e,t,a={statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new vg,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var s=e.split(":"),a=s.shift().trim();if(a){var r=s.join(":").trim();try{t.append(a,r)}catch(e){console.warn("Response "+e.message)}}}),t)};0===r.url.indexOf("file://")&&(i.status<200||i.status>599)?a.status=200:a.status=i.status,a.url="responseURL"in i?i.responseURL:a.headers.get("X-Request-URL");var n="response"in i?i.response:i.responseText;setTimeout(function(){s(new Og(n,a))},0)},i.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},i.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},i.onabort=function(){setTimeout(function(){a(new Fg("Aborted","AbortError"))},0)},i.open(r.method,function(e){try{return""===e&&pg.location.href?pg.location.href:e}catch(t){return e}}(r.url),!0),"include"===r.credentials?i.withCredentials=!0:"omit"===r.credentials&&(i.withCredentials=!1),"responseType"in i&&(dg?i.responseType="blob":hg&&(i.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof vg||pg.Headers&&t.headers instanceof pg.Headers)){var o=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){o.push(gg(e)),i.setRequestHeader(e,yg(t.headers[e]))}),r.headers.forEach(function(e,t){-1===o.indexOf(t)&&i.setRequestHeader(t,e)})}else r.headers.forEach(function(e,t){i.setRequestHeader(t,e)});r.signal&&(r.signal.addEventListener("abort",n),i.onreadystatechange=function(){4===i.readyState&&r.signal.removeEventListener("abort",n)}),i.send(void 0===r._bodyInit?null:r._bodyInit)})}Ag.polyfill=!0,pg.fetch||(pg.fetch=Ag,pg.Headers=vg,pg.Request=Sg,pg.Response=Og);class Tg extends ea.Component{constructor(e){super(e),this.state={loading:!1,markup:""},this.loadIntegrations=this.loadIntegrations.bind(this),this.closeModal=this.closeModal.bind(this),this.conditionMarkup=this.conditionMarkup.bind(this)}componentDidUpdate(){_.isEmpty(this.props.integrationConditions)||this.conditionMarkup()}componentDidMount(){this.mounted=!0,this.loadIntegrations(),jQuery("html, body").animate({scrollTop:0},"fast");const e=this;window.jQuery("#forminator-form-appearance").on("click",".conditions-integration",function(){const t=jQuery(this).data("multi-id"),s=jQuery(this).data("title");e.openConditionsModal(t,s)})}openConditionsModal(e,t){this.props.actions.modalActions.showModal({open:!0,integrationId:e,integrationTitle:t,field:this.props.field,conditions:this.props.integrationConditions,closeModal:this.closeModal},"integration")}closeModal(){this.props.actions.modalActions.showModal({open:!1},"integration")}conditionMarkup(){const e=Pa(this.props.wrappers);Object.entries(this.props.integrationConditions).forEach(t=>{let[s,a]=t;if(!jQuery(".fui-connected").length)return;const r=jQuery('.fui-conditions[data-integration-id="'+s+'"]');if(!r.length)return void delete this.props.integrationConditions[s];if(r.hide(),_.isUndefined(a.conditions))return;const i=a.conditions[0];if(_.isUndefined(i))return;const n=_.filter(e,e=>e.element_id===i.element_id);if(_.isUndefined(n))return;if(_.isUndefined(n[0]))return;const o="send"===a.condition_action||_.isUndefined(a.condition_action)?Na("Send"):Na("Don't send"),l=n[0].label,p=Ma(i.rule,n.field_type),c=ka(n[0],i),u=a.conditions.length;let d="";u-1>0&&(d="+ "+(u-1)+" "+Na("more condition(s)"));const m=o+" "+Na("data if")+" "+l+" "+p+" "+c+" "+d;r.attr("data-tooltip",m).show()})}componentWillUnmount(){this.mounted=!1}loadIntegrations(){const e=forminatorData.currentForm.settings.form_id;_.isUndefined(e)||+e<=0||this.state.loading||(this.setState({markup:"",loading:!0}),window.fetch(forminatorData.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"action=forminator_addon_get_module_addons&_ajax_nonce="+forminatorData.addonNonce+"&data[module_type]=form&data[module_id]="+e}).then(e=>e.json()).then(e=>{if(e.success&&this.mounted){const t=this;this.setState({markup:e.data.data}),setTimeout(()=>{const e=window.jQuery(".form-integrations-wrapper");e.ForminatorIntegrationsModal(),e.on("reload",function(){e.unbind(),t.loadIntegrations()})},10),this.setState({loading:!1})}}).catch(e=>{console.log(e)}))}render(){const{loading:e}=this.state,{markup:t}=this.state,s=(forminatorData.currentForm.settings.form_id,Ia(forminatorData.userPermissions.manage_forminator_integrations)||Ia(forminatorData.userPermissions.manage_options));let a="";return a=e?d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-loader sui-loading","aria-hidden":"true"}),d().createElement("p",null,Na("Fetching integration list…"))))):d().createElement("span",{className:"form-integrations-wrapper",dangerouslySetInnerHTML:{__html:t}}),d().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("Integrations"))),d().createElement("div",{className:"sui-box-body"},d().createElement(Fl,{id:"forminator-section-applications",label:Na("Applications"),description:Na("You can send this form's data to any of the connected third party apps. Connect to more apps on the {{link}}Integrations{{/link}} page.",{components:{link:s?d().createElement("a",{href:forminatorData.integrationsUrl}):d().createElement("b",null)}})},a)),d().createElement(Ro,this.props))}}var Mg=Dr(Tg);var jg=ce(function(e){return{integrationConditions:e.integrationConditions,wrappers:e.wrappers}},function(e){return{actions:{integrationActions:Ut(o,e),modalActions:Ut(t,e)}}})(Mg);function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ug.apply(null,arguments)}class Vg extends ea.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=_.isEmpty(forminatorData.retain_number)||"0"===forminatorData.retain_number,t=d().createElement(ea.Fragment,null,e&&d().createElement(ea.Fragment,null,Na("forever")),!e&&d().createElement(ea.Fragment,null,forminatorData.retain_number," ",forminatorData.retain_unit)),s=forminatorData.erasure?Na("remove"):Na("retain"),a=Ia(forminatorData.userPermissions.manage_forminator_settings)||Ia(forminatorData.userPermissions.manage_options)?d().createElement("a",{href:forminatorData.settingsUrl+"&section=submissions",target:"_blank"},Na("global privacy settings.")):Na("global privacy settings.");return d().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("Settings"))),d().createElement("div",{className:"sui-box-body"},d().createElement("div",{id:"forminator-section-settings-data-storage",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Data Storage")),d().createElement("span",{className:"sui-description"},Na("By default we will store all submissions in your database."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(Up,Ug({},this.props,{label:Na("Store Submissions in Database"),property:"store_submissions",description:Na("Disable this feature to prevent submissions from being stored in your database. Note that any submissions previously stored in the database will be retained and automatically deleted according to the retention schedule configured in the Privacy settings below."),unWrap:!0})))),forminatorData.geolocation&&d().createElement("div",{id:"forminator-section-settings-geolocation",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("User’s Geolocation")),d().createElement("span",{className:"sui-description"},Na("Enabling this option will attempt to collect and store users' location information when this form is submitted."))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement(Up,Ug({},this.props,{label:Na("Enable current user’s Geolocation"),property:"geolocation_field",unWrap:!0}),d().createElement("span",{className:"sui-description"},Na("Enable the checkbox to make it mandatory for users to grant access to the location permission to submit this form.")),d().createElement(pp,Ug({},this.props,{label:Na("Require access to users' location"),property:"geolocation_field_required",itemClass:"sui-checkbox-sm sui-checkbox-stacked"})),d().createElement(ol,Ug({},this.props,{label:Na("Error message"),placeholder:Na("Enter message"),property:"require_geolocation_field",fieldClass:"sui-margin-top"}))))),d().createElement("div",{id:"forminator-section-settings-multiple-option",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Multiple Option Value")),d().createElement("span",{className:"sui-description"},d().createElement("div",null,Na("Choose how you want to handle multiple option values in form submissions and email notifications.")))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label"},Na("Default Stored Value")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("By default, we store option labels of multiple option fields ({{strong}}e.g., Radio, Checkbox, and Select{{/strong}}) in submissions, and use the same in email notifications. You can choose to use option values instead.",{components:{strong:d().createElement("strong",null)}})),d().createElement("div",{className:"sui-side-tabs"},d().createElement(ql,Ug({},this.props,{property:"print_value",default:"false"}),d().createElement(Yl,{value:"false"},Na("Option labels")),d().createElement(Yl,{value:"true"},Na("Option values"))))))),d().createElement("div",{id:"forminator-section-settings-email-image-option",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Email Image Options")),d().createElement("span",{className:"sui-description"},d().createElement("div",null,Na("Choose how images are shown in email notifications. You can embed images directly in the email or display them as clickable links.")))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field"},d().createElement("div",{className:"sui-side-tabs"},d().createElement(ql,Ug({},this.props,{property:"email_image_display_option",default:"preview"}),d().createElement(Ql,{value:"link",label:Na("Image Link")},d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("This setting applies to images from E-Signature and File Upload fields.")))))),d().createElement(Ql,{value:"preview",label:Na("Image Preview")},d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("This setting applies to images from E-Signature, File Upload, Radio, and Checkbox fields."))))))))))),d().createElement("div",{id:"forminator-section-settings-privacy",className:"sui-box-settings-row"},d().createElement("div",{className:"sui-box-settings-col-1"},d().createElement("span",{className:"sui-settings-label"},Na("Privacy")),d().createElement("span",{className:"sui-description"},d().createElement("div",null,Na("Choose how you want to handle this form's data storage.")),d().createElement("div",null,Na("By default we will use the configuration you have set in your")),d().createElement("div",null,a))),d().createElement("div",{className:"sui-box-settings-col-2"},d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label"},Na("Submissions")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("How long do you want to retain this form's submissions for?")),d().createElement("div",{className:"sui-side-tabs"},d().createElement(ql,Ug({},this.props,{default:"false",property:"enable-submissions-retention"}),d().createElement(Ql,{value:"false",label:Na("Use default")},d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Your default setting value is to keep the submissions")," ",t))))),d().createElement(Ql,Ug({},this.props,{value:"true",boxClass:"sui-tab-boxed",label:Na("Custom")}),d().createElement(rl,null,d().createElement(il,{cols:"6"},d().createElement(ol,Ug({},this.props,{type:"number",placeholder:"10",property:"submissions-retention-number"}))),d().createElement(il,{cols:"6"},d().createElement(kl,Ug({},this.props,{property:"submissions-retention-unit",defaultValue:"days"}),d().createElement("option",{value:"days"},Na("Days")),d().createElement("option",{value:"weeks"},Na("Weeks")),d().createElement("option",{value:"months"},Na("Months")),d().createElement("option",{value:"years"},Na("Years"))))),d().createElement("span",{className:"sui-description"},Na('Set the value to "0" or leave it blank to store submissions forever.')))))),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label"},Na("Account Erasure Requests")),d().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},Na("When handling an account erasure request that contains an email associated with a submission, what do you want to do?")),d().createElement("div",{className:"sui-side-tabs"},d().createElement(ql,Ug({},this.props,{property:"enable-submissions-erasure",default:"false"}),d().createElement(Ql,{value:"false",label:Na("Use default")},d().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Your default setting value is to ")," ",s," ",Na(" the submission.")))))),d().createElement(Ql,Ug({},this.props,{value:"true",boxClass:"sui-tab-boxed",label:Na("Custom")}),d().createElement(kl,Ug({property:"submission-erasure-remove",defaultValue:"false"},this.props),d().createElement("option",{value:"false"},Na("Retain Submissions")),d().createElement("option",{value:"true"},Na("Remove Submissions"))))))),d().createElement("div",{className:"sui-form-field"},d().createElement("label",{className:"sui-settings-label"},Na("Submission Files")),d().createElement("span",{className:"sui-description"},Na("If your form has file upload field(s), choose whether to delete the file(s) related to a submission when that submission gets deleted.")),d().createElement(_l,Ug({},this.props,{property:"submission-file",defaultValue:"delete"}),d().createElement("div",{value:"delete"},Na("Delete")),d().createElement("div",{value:"keep"},Na("Keep"))))))),d().createElement(Ro,this.props))}}var $g=Dr(Vg);var Ig=ce(function(e){return{settings:e.settings,formType:e.settings["form-type"]||"default"}},function(s){return{actions:{settingsActions:Ut(e,s),modalActions:Ut(t,s)}}})($g);class Rg extends ea.Component{constructor(e){super(e),this.previewLoaded=this.previewLoaded.bind(this)}componentDidMount(){this.$el=jQuery(this.el),this.$body=jQuery(this.body),this.load(),jQuery(document).off("after.load.forminator",this.previewLoaded),jQuery(document).on("after.load.forminator",this.previewLoaded)}shouldComponentUpdate(e){const t=Object.keys(e.settings).filter(t=>e.settings[t]!==this.props.settings[t]);if(!t.length)return!1;let s=["description-position","form-style","form-substyle","fields-style"].some(e=>t.includes(e));if(s||(s=t.some(e=>e.includes("font-family"))),s||t.includes("_resetTimestamp"))return this.previewLoading(),this.load(e),!1;if(this.props.changed&&this.props.changed.settings){const t=this.props.id,s={settings:e.settings},a={id:t,action:"forminator_update_live_preview",_wpnonce:forminatorData.updateLivePreviewNonce,preview_data:JSON.stringify(s)};po.post(forminatorData.ajaxUrl,uo().stringify(a)).then(e=>{e.data.success&&e.data.data.styles&&(jQuery("style#forminator-module-styles-"+t).length&&jQuery("style#forminator-module-styles-"+t).remove(),jQuery("body").append(e.data.data.styles))}).catch(e=>{console.log(e)})}return!1}componentWillUnmount(){ba("postdata",this.props.wrappers)&&(window.jQuery=window.jQueryFormi),jQuery(document).off("after.load.forminator",this.previewLoaded)}previewLoaded(){this.$body.find(".sui-notice-loading").hide(),this.$body.find(".sui-notice-style-basic").show()}previewLoading(){this.$body.find(".sui-notice-style-basic").hide(),this.$body.find(".sui-notice-loading").show(),this.$body.find("#forminator-module-"+this.props.id+'[data-forminator-render="99"]').addClass("sui-hidden")}load(e){const t={wrappers:this.props.wrappers,settings:e?e.settings:this.props.settings},s={id:this.props.id,action:"forminator_load_form",type:"forminator_forms",nonce:forminatorData.previewNonce,render_id:99,is_preview:1,instant_preview:1,preview_data:t,last_submit_data:{}};this.$body.find("#forminator-module-"+this.props.id).forminatorLoader(s)}render(){return d().createElement("div",{id:"forminator-form-instant-preview",className:"sui-box"},d().createElement("div",{className:"sui-box-header"},d().createElement("h2",{className:"sui-box-title"},Na("Appearance Preview")),d().createElement("span",{class:"sui-tooltip sui-tooltip-constrained sui-tooltip-bottom","data-tooltip":Na("In Preview mode, Conditional Logic is ignored so you can see all fields and review the full layout."),"aria-hidden":"true"},d().createElement("i",{className:"sui-icon-info","aria-hidden":"true"}))),d().createElement("div",{id:"forminator-instant-preview",className:"sui-box-body",ref:e=>this.body=e},d().createElement("div",{role:"alert",className:"sui-notice sui-notice-loading sui-active",style:{display:"block"},"aria-live":"assertive"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-loader sui-loading","aria-hidden":"true"}),d().createElement("p",null,Na("Loading preview…"))))),d().createElement("form",{ref:e=>this.el=e,id:`forminator-module-${this.props.id}`,"data-forminator-render":"99",className:"sui-hidden"})),d().createElement(Ro,this.props))}}var Lg=Dr(Rg);var Bg=ce(function(e){return{wrappers:e.wrappers,settings:e.settings,id:e.settings.form_id||-1,changed:window.forminatorChanges}})(Lg);class zg extends ea.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.openModal=this.openModal.bind(this)}closeModal(e){this.props.actions.modalActions.showModal({open:!1,title:Na("Shape the new Form Editor"),id:"share-feedback"},"feedback")}openModal(e){this.props.actions.modalActions.showModal({open:!0,title:Na("Shape the new Form Editor"),closeModal:this.closeModal,id:"share-feedback"},"feedback")}render(){return forminatorData.feedbackDisabled||"pdf-form"===this.props.formType?"":d().createElement("div",{className:"forminator-feedback",onClick:this.openModal},d().createElement("div",{className:"forminator-feedback-icon"},d().createElement("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"#333333",xmlns:"http://www.w3.org/2000/svg"},d().createElement("path",{d:"M12.9688 25.5391L11.4844 26.5938C11.2109 26.7891 10.8203 26.7891 10.5078 26.6328C10.1953 26.4766 10 26.1641 10 25.8125V23H8.75C6.67969 23 5 21.3203 5 19.25V10.5C5 8.42969 6.67969 6.75 8.75 6.75H21.25C23.3203 6.75 25 8.42969 25 10.5V19.25C25 21.3203 23.3203 23 21.25 23H16.5625L12.9688 25.5391ZM16.5625 21.125H21.25C22.3047 21.125 23.125 20.3047 23.125 19.25V10.5C23.125 9.48438 22.3047 8.625 21.25 8.625H8.75C7.73438 8.625 6.875 9.48438 6.875 10.5V19.25C6.875 20.3047 7.73438 21.125 8.75 21.125H10.9375C11.3281 21.125 11.6797 21.3984 11.8359 21.75C11.875 21.8281 11.875 21.9453 11.875 22.0625V24.0156C13.1641 23.1172 14.3359 22.2578 15.4688 21.4766C15.7812 21.2422 16.1719 21.125 16.5625 21.125ZM10.9375 12.375H19.0625C19.5703 12.375 20 12.8047 20 13.3125C20 13.8203 19.5703 14.25 19.0625 14.25H10.9375C10.4297 14.25 10 13.8203 10 13.3125C10 12.8047 10.4297 12.375 10.9375 12.375ZM10.9375 16.125H15.3125C15.8203 16.125 16.25 16.5547 16.25 17.0625C16.25 17.5703 15.8203 18 15.3125 18H10.9375C10.4297 18 10 17.5703 10 17.0625C10 16.5547 10.4297 16.125 10.9375 16.125Z"}))),d().createElement("div",{className:"forminator-feedback-content"},d().createElement("h4",null,Na("Shape the new Form Editor")),d().createElement("p",null,Na("Share your feedback and help us make it even better!"))))}}var Wg=ce(function(e){return{settings:e.settings,formType:e.settings["form-type"]||"default",type:"form"}},function(e){return{actions:{modalActions:Ut(t,e)}}})(zg);class Hg extends ea.Component{constructor(e){super(e),this.stickyHeaderRef=d().createRef(),this.state={animationInProcess:!1},this.sideNavFooterRef=d().createRef()}componentDidMount(){this.goToSectionFromUrl(),window.addEventListener("beforeunload",this.handleBeforeunload),window.addEventListener("scroll",this.applySticky.bind(this)),window.addEventListener("resize",this.adjustSecondaryNavWidth.bind(this)),window.addEventListener("resize",this.applySticky.bind(this)),this.observer=new ResizeObserver(()=>{this.applySticky()}),this.observer.observe(this.stickyHeaderRef.current),this.observer.observe(this.sideNavFooterRef.current)}componentWillUnmount(){window.removeEventListener("beforeunload",this.handleBeforeunload),this.observer?.disconnect()}componentDidUpdate(){this.adjustSecondaryNavWidth(),this.applySticky()}adjustSecondaryNavWidth(){const e=jQuery(".forminator-sidenav-right"),t=jQuery(".forminator-secondary-nav-is-active .forminator-sidenav-right");if(e.css("max-width","auto"),t.length){let e=t.offset().left;jQuery(window).width()>768?t.css("max-width","auto"):t.css("max-width",`calc(100vw - ${e}px)`)}}goToSectionFromUrl(){const e=function(){for(var e={},t=location.search.substring(1).split("&"),s=0;s<t.length;s++){var a=t[s].split("=");e[a[0]]=decodeURIComponent(a[1])}return e}().gotosection;if(!_.isUndefined(e)){const t=window.location.href;setTimeout(()=>{this.props.router.navigate("/"+e)},100),window.history.replaceState({},document.title,t.slice(0,t.indexOf("&gotosection")))}}applySticky(){!function(e){if(window.innerWidth>600){let e=jQuery("#wpadminbar").innerHeight();jQuery("#forminator-builder-status").css("top",e+"px")}else jQuery("#forminator-builder-status").css("top","0px");const t=jQuery(".forminator-sidenav-right"),s=e.getBoundingClientRect().bottom;t.css("top",s+"px");const a=jQuery("#adminmenuwrap").innerHeight();jQuery(".sui-row-with-sidenav").css("min-height",a-e.getBoundingClientRect().height+"px");const r=jQuery("div.forminator-side-navigation-footer");let i=0;r.length&&r.innerHeight()&&(i=r.innerHeight());const n=jQuery(".forminator-secondary-nav-content");if(n.length){const e=s+jQuery("div.forminator-secondary-nav-header").innerHeight()+i;n.css("max-height",`calc(100vh - ${e}px)`),t.css("max-height","unset")}else{const e=s+i;t.css("max-height",`calc(100vh - ${e}px)`)}}(this.stickyHeaderRef.current)}handleBeforeunload(e){if(window.forminatorChanges.length>0||!0===window.forminatorChanges.settings)return e.preventDefault(),e.returnValue=Na("You have unsaved changes, are you sure want to leave this page"),Na("You have unsaved changes, are you sure want to leave this page")}onSlideOutEnd(){this.setState({animationInProcess:!1})}disableRegistrationForm(){const e=forminatorData.currentForm.settings["form-type"]||"default",t=forminatorData.userRoles;if("registration"===e){if(0===forminatorData.userRoles.length)return!0;const e=Object.keys(t);if(!1===e.includes("administrator")){if("fixed"!==(forminatorData.currentForm.settings["registration-user-role"]||"fixed")){const t=forminatorData.currentForm.settings.user_role||{};let s=!1;return _.each(t,t=>{""!==t.role&&!1===e.includes(t.role)&&(s=!0)}),s}{const t=forminatorData.currentForm.settings["registration-role-field"]||"";if(!_.isEmpty(t)&&!1===e.includes(t))return!0}}}return!1}render(){const e=forminatorData.currentForm.settings["form-type"]||"default";let t=!1;"pdf-form"!==e&&"/appearance"===this.props.router.location.pathname&&(t=!0);const s=t||this.state.animationInProcess,a=e=>{this.setState({animationInProcess:!0}),setTimeout(()=>{this.props.router.navigate("/"+e)},300)};return!0===this.disableRegistrationForm()?d().createElement("div",{className:"sui-notice sui-notice-red sui-active"},d().createElement("div",{className:"sui-notice-content"},d().createElement("div",{className:"sui-notice-message"},d().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),d().createElement("p",null,Na("Sorry, you are not allowed to access this page."))))):d().createElement("div",null,d().createElement("div",{className:`forminator-${e}-builder`},d().createElement("div",{id:"forminator-builder-status",className:"sui-box sui-box-sticky sui-is-sticky",ref:this.stickyHeaderRef},d().createElement(xo,null)),d().createElement("div",{className:"sui-row-with-sidenav"+(s?" forminator-secondary-nav-is-active":"")},d().createElement("div",{id:"forminator-builder-content"},d().createElement(Pr,null),d().createElement(kt,null,d().createElement(Nt,{path:"/",element:d().createElement(xt,{to:"/builder",replace:!0})}),d().createElement(Nt,{path:"/builder",element:d().createElement(Wo,null)}),d().createElement(Nt,{path:"/builder/:tab",element:d().createElement(Wo,null)}),"pdf-form"===e?d().createElement(Nt,{path:"/appearance",element:d().createElement(Qh,null)}):d().createElement(Nt,{path:"/appearance",element:d().createElement(Bg,null)}),"registration"===e&&d().createElement(Nt,{path:"/registration",element:d().createElement(uf,null)}),"login"===e&&d().createElement(Nt,{path:"/login",element:d().createElement(yf,null)}),d().createElement(Nt,{path:"/behaviour",element:d().createElement(Rf,null)}),d().createElement(Nt,{path:"/behaviour/:tab",element:d().createElement(Rf,null)}),!forminatorData.addonsDisabled&&d().createElement(Nt,{path:"/pdf",element:d().createElement(Yb,null)}),!forminatorData.abandonmentDisabled&&d().createElement(Nt,{path:"/abandonment",element:d().createElement(tg,null)}),d().createElement(Nt,{path:"/notifications",element:d().createElement(og,null)}),d().createElement(Nt,{path:"/notifications/:tab",element:d().createElement(og,null)}),d().createElement(Nt,{path:"/integrations",element:d().createElement(jg,null)}),d().createElement(Nt,{path:"/settings",element:d().createElement(Ig,null)}))),d().createElement("div",{className:"sui-sidenav fui-sidenav forminator-side-navigation"},d().createElement("div",{className:"forminator-sidenav-right sui-box sui-sidenav-fixed"+(t?" forminator-slide-in":""),onAnimationStart:()=>this.adjustSecondaryNavWidth()},s&&d().createElement("div",{className:this.state.animationInProcess?"forminator-slide-out":"",onAnimationEnd:()=>this.onSlideOutEnd()},d().createElement("div",{className:"sui-box-header forminator-secondary-nav-header"},d().createElement("button",{class:"sui-button-icon sui-button-float--left",onClick:()=>a("")},d().createElement("span",{class:"sui-icon-chevron-left sui-md","aria-hidden":"true"}),d().createElement("span",{class:"sui-screen-reader-text"},Na("Back"))),d().createElement("h2",{className:"sui-box-title"},Na("Appearance"))),d().createElement("div",{className:"forminator-secondary-nav-content"},d().createElement(kt,null,d().createElement(Nt,{path:"/appearance",element:d().createElement(Qh,null)})))),d().createElement("div",{className:"forminator-side-navigation-content"},d().createElement(jr,this.props))),!t&&d().createElement("div",{className:"forminator-side-navigation-footer",ref:this.sideNavFooterRef},d().createElement(Wg,this.props))))),d().createElement(Kd,this.props))}}var qg=Dr(Hg);const Qg=function(e){return qt({reducer:Xa,middleware:e=>e(),preloadedState:e})}(forminatorData.currentForm);window.forminatorChanges={fields:[],settings:!1,saveAttempted:!1},window.jQueryFormi=jQuery.noConflict(),function(e,t){const s=document.getElementById(e);if(_.isNull(s))return;(0,m.H)(s).render(t)}("forminator-form-builder",d().createElement(ue,{store:Qg},d().createElement(wt,null,d().createElement(kt,null,d().createElement(Nt,{path:"*",element:d().createElement(qg,null)})))))}()}();