Server IP : 192.64.118.117 / Your IP : 3.144.252.197 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/mcprintingandpromotions.com/wp-content/plugins/forminator/build/ |
Upload File : |
!function(){var e,t,s={2505:function(e,t,s){e.exports=s(8015)},5592:function(e,t,s){"use strict";var r=s(9516),a=s(7522),n=s(9106),i=s(2012),o=s(4202),l=s(7763);e.exports=function(e){return new Promise((function(t,p){var c=e.data,u=e.headers;r.isFormData(c)&&delete u["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",h=e.auth.password||"";u.Authorization="Basic "+btoa(m+":"+h)}if(d.open(e.method.toUpperCase(),n(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var s="getAllResponseHeaders"in d?i(d.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:s,config:e,request:d};a(t,p,r),d=null}},d.onerror=function(){p(l("Network Error",e,null,d)),d=null},d.ontimeout=function(){p(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var f=s(3948),b=(e.withCredentials||o(e.url))&&e.xsrfCookieName?f.read(e.xsrfCookieName):void 0;b&&(u[e.xsrfHeaderName]=b)}if("setRequestHeader"in d&&r.forEach(u,(function(e,t){void 0===c&&"content-type"===t.toLowerCase()?delete u[t]:d.setRequestHeader(t,e)})),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),p(e),d=null)})),void 0===c&&(c=null),d.send(c)}))}},8015:function(e,t,s){"use strict";var r=s(9516),a=s(9012),n=s(5155),i=s(6987);function o(e){var t=new n(e),s=a(n.prototype.request,t);return r.extend(s,n.prototype,t),r.extend(s,t),s}var l=o(i);l.Axios=n,l.create=function(e){return o(r.merge(i,e))},l.Cancel=s(1928),l.CancelToken=s(3191),l.isCancel=s(3864),l.all=function(e){return Promise.all(e)},l.spread=s(7980),e.exports=l,e.exports.default=l},1928:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},3191:function(e,t,s){"use strict";var r=s(1928);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var s=this;e((function(e){s.reason||(s.reason=new r(e),t(s.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},3864:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},5155:function(e,t,s){"use strict";var r=s(6987),a=s(9516),n=s(3471),i=s(4490);function o(e){this.defaults=e,this.interceptors={request:new n,response:new n}}o.prototype.request=function(e){"string"==typeof e&&(e=a.merge({url:arguments[0]},arguments[1])),(e=a.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[i,void 0],s=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)s=s.then(t.shift(),t.shift());return s},a.forEach(["delete","get","head","options"],(function(e){o.prototype[e]=function(t,s){return this.request(a.merge(s||{},{method:e,url:t}))}})),a.forEach(["post","put","patch"],(function(e){o.prototype[e]=function(t,s,r){return this.request(a.merge(r||{},{method:e,url:t,data:s}))}})),e.exports=o},3471:function(e,t,s){"use strict";var r=s(9516);function a(){this.handlers=[]}a.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},7763:function(e,t,s){"use strict";var r=s(5449);e.exports=function(e,t,s,a,n){var i=new Error(e);return r(i,t,s,a,n)}},4490:function(e,t,s){"use strict";var r=s(9516),a=s(2881),n=s(3864),i=s(6987),o=s(9137),l=s(4680);function p(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return p(e),e.baseURL&&!o(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return p(e),t.data=a(t.data,t.headers,e.transformResponse),t}),(function(t){return n(t)||(p(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5449:function(e){"use strict";e.exports=function(e,t,s,r,a){return e.config=t,s&&(e.code=s),e.request=r,e.response=a,e}},7522:function(e,t,s){"use strict";var r=s(7763);e.exports=function(e,t,s){var a=s.config.validateStatus;s.status&&a&&!a(s.status)?t(r("Request failed with status code "+s.status,s.config,null,s.request,s)):e(s)}},2881:function(e,t,s){"use strict";var r=s(9516);e.exports=function(e,t,s){return r.forEach(s,(function(s){e=s(e,t)})),e}},6987:function(e,t,s){"use strict";var r=s(9516),a=s(7018),n={"Content-Type":"application/x-www-form-urlencoded"};function i(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var o,l={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process)&&(o=s(5592)),o),transformRequest:[function(e,t){return a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(i(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(i(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(n)})),e.exports=l},9012:function(e){"use strict";e.exports=function(e,t){return function(){for(var s=new Array(arguments.length),r=0;r<s.length;r++)s[r]=arguments[r];return e.apply(t,s)}}},9106:function(e,t,s){"use strict";var r=s(9516);function a(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,s){if(!t)return e;var n;if(s)n=s(t);else if(r.isURLSearchParams(t))n=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(a(t)+"="+a(e))})))})),n=i.join("&")}return n&&(e+=(-1===e.indexOf("?")?"?":"&")+n),e}},4680:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},3948:function(e,t,s){"use strict";var r=s(9516);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,s,a,n,i){var o=[];o.push(e+"="+encodeURIComponent(t)),r.isNumber(s)&&o.push("expires="+new Date(s).toGMTString()),r.isString(a)&&o.push("path="+a),r.isString(n)&&o.push("domain="+n),!0===i&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},9137:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},4202:function(e,t,s){"use strict";var r=s(9516);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a");function a(e){var r=e;return t&&(s.setAttribute("href",r),r=s.href),s.setAttribute("href",r),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:"/"===s.pathname.charAt(0)?s.pathname:"/"+s.pathname}}return e=a(window.location.href),function(t){var s=r.isString(t)?a(t):t;return s.protocol===e.protocol&&s.host===e.host}}():function(){return!0}},7018:function(e,t,s){"use strict";var r=s(9516);e.exports=function(e,t){r.forEach(e,(function(s,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=s,delete e[r])}))}},2012:function(e,t,s){"use strict";var r=s(9516),a=["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"];e.exports=function(e){var t,s,n,i={};return e?(r.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=r.trim(e.substr(0,n)).toLowerCase(),s=r.trim(e.substr(n+1)),t){if(i[t]&&a.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([s]):i[t]?i[t]+", "+s:s}})),i):i}},7980:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},9516:function(e,t,s){"use strict";var r=s(9012),a=s(7206),n=Object.prototype.toString;function i(e){return"[object Array]"===n.call(e)}function o(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===n.call(e)}function p(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===n.call(e)},isBuffer:a,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:o,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===n.call(e)},isFile:function(e){return"[object File]"===n.call(e)},isBlob:function(e){return"[object Blob]"===n.call(e)},isFunction:l,isStream:function(e){return o(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:p,merge:function e(){var t={};function s(s,r){"object"==typeof t[r]&&"object"==typeof s?t[r]=e(t[r],s):t[r]=s}for(var r=0,a=arguments.length;r<a;r++)p(arguments[r],s);return t},extend:function(e,t,s){return p(t,(function(t,a){e[a]=s&&"function"==typeof t?r(t,s):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},3144:function(e,t,s){"use strict";var r=s(6743),a=s(1002),n=s(76),i=s(7119);e.exports=i||r.call(n,a)},1002:function(e){"use strict";e.exports=Function.prototype.apply},76:function(e){"use strict";e.exports=Function.prototype.call},3126:function(e,t,s){"use strict";var r=s(6743),a=s(9675),n=s(76),i=s(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new a("a function is required");return i(r,n,e)}},7119:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},6556:function(e,t,s){"use strict";var r=s(453),a=s(3126),n=a([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var s=r(e,!!t);return"function"==typeof s&&n(e,".prototype.")>-1?a([s]):s}},1804:function(e,t,s){"use strict";var r=s(5228),a={};function n(e,t,s,r,a,n,i,o){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[s,r,a,n,i,o],c=0;(l=new Error(t.replace(/%s/g,(function(){return p[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}var i="mixins";e.exports=function(e,t,s){var o=[],l={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},p={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},c={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var s=0;s<t.length;s++)d(e,t[s])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=h(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var s in t){var r=t[s];if(t.hasOwnProperty(s)){if(n(!(s in c),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',s),s in e)return n("DEFINE_MANY_MERGED"===(p.hasOwnProperty(s)?p[s]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",s),void(e[s]=h(e[s],r));e[s]=r}}}(e,t)},autobind:function(){}};function u(e,t){var s=l.hasOwnProperty(t)?l[t]:null;v.hasOwnProperty(t)&&n("OVERRIDE_BASE"===s,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&n("DEFINE_MANY"===s||"DEFINE_MANY_MERGED"===s,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function d(e,s){if(s){n("function"!=typeof s,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),n(!t(s),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,a=r.__reactAutoBindPairs;for(var o in s.hasOwnProperty(i)&&c.mixins(e,s.mixins),s)if(s.hasOwnProperty(o)&&o!==i){var p=s[o],d=r.hasOwnProperty(o);if(u(d,o),c.hasOwnProperty(o))c[o](e,p);else{var m=l.hasOwnProperty(o);if("function"==typeof p&&!m&&!d&&!1!==s.autobind)a.push(o,p),r[o]=p;else if(d){var b=l[o];n(m&&("DEFINE_MANY_MERGED"===b||"DEFINE_MANY"===b),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",b,o),"DEFINE_MANY_MERGED"===b?r[o]=h(r[o],p):"DEFINE_MANY"===b&&(r[o]=f(r[o],p))}else r[o]=p}}}else;}function m(e,t){for(var s in n(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(s)&&(n(void 0===e[s],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",s),e[s]=t[s]);return e}function h(e,t){return function(){var s=e.apply(this,arguments),r=t.apply(this,arguments);if(null==s)return r;if(null==r)return s;var a={};return m(a,s),m(a,r),a}}function f(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function b(e,t){return t.bind(e)}var g={componentDidMount:function(){this.__isMounted=!0}},y={componentWillUnmount:function(){this.__isMounted=!1}},v={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},E=function(){};return r(E.prototype,e.prototype,v),function(e){var t=function(e,r,i){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,s=0;s<t.length;s+=2){var r=t[s],a=t[s+1];e[r]=b(e,a)}}(this),this.props=e,this.context=r,this.refs=a,this.updater=i||s,this.state=null;var o=this.getInitialState?this.getInitialState():null;n("object"==typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=o};for(var r in t.prototype=new E,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],o.forEach(d.bind(null,t)),d(t,g),d(t,e),d(t,y),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),n(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),l)t.prototype[r]||(t.prototype[r]=null);return t}}},2306:function(e,t,s){"use strict";var r=s(1594),a=s(1804);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var n=(new r.Component).updater;e.exports=a(r.Component,r.isValidElement,n)},7176:function(e,t,s){"use strict";var r,a=s(3126),n=s(5795);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var i=!!r&&n&&n(Object.prototype,"__proto__"),o=Object,l=o.getPrototypeOf;e.exports=i&&"function"==typeof i.get?a([i.get]):"function"==typeof l&&function(e){return l(null==e?e:o(e))}},655:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},1237:function(e){"use strict";e.exports=EvalError},9383:function(e){"use strict";e.exports=Error},9290:function(e){"use strict";e.exports=RangeError},9538:function(e){"use strict";e.exports=ReferenceError},8068:function(e){"use strict";e.exports=SyntaxError},9675:function(e){"use strict";e.exports=TypeError},5345:function(e){"use strict";e.exports=URIError},9612:function(e){"use strict";e.exports=Object},7007:function(e){var t=Object.create||function(e){var t=function(){};return t.prototype=e,new t},s=Object.keys||function(e){var t=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(s);return s},r=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=t(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var n,i=10;try{var o={};Object.defineProperty&&Object.defineProperty(o,"x",{value:0}),n=0===o.x}catch(e){n=!1}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function p(e,s,r,a){var n,i,o;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",s,r.listener?r.listener:r),i=e._events),o=i[s]):(i=e._events=t(null),e._eventsCount=0),o){if("function"==typeof o?o=i[s]=a?[r,o]:[o,r]:a?o.unshift(r):o.push(r),!o.warned&&(n=l(e))&&n>0&&o.length>n){o.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(s)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');p.name="MaxListenersExceededWarning",p.emitter=e,p.type=s,p.count=o.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",p.name,p.message)}}else o=i[s]=r,++e._eventsCount;return e}function c(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function u(e,t,s){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:s},n=r.call(c,a);return n.listener=s,a.wrapFn=n,n}function d(e,t,s){var r=e._events;if(!r)return[];var a=r[t];return a?"function"==typeof a?s?[a.listener||a]:[a]:s?function(e){for(var t=new Array(e.length),s=0;s<t.length;++s)t[s]=e[s].listener||e[s];return t}(a):h(a,a.length):[]}function m(e){var t=this._events;if(t){var s=t[e];if("function"==typeof s)return 1;if(s)return s.length}return 0}function h(e,t){for(var s=new Array(t),r=0;r<t;++r)s[r]=e[r];return s}n?Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');i=e}}):a.defaultMaxListeners=i,a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){var t,s,r,a,n,i,o="error"===e;if(i=this._events)o=o&&null==i.error;else if(!o)return!1;if(o){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(s=i[e]))return!1;var p="function"==typeof s;switch(r=arguments.length){case 1:!function(e,t,s){if(t)e.call(s);else for(var r=e.length,a=h(e,r),n=0;n<r;++n)a[n].call(s)}(s,p,this);break;case 2:!function(e,t,s,r){if(t)e.call(s,r);else for(var a=e.length,n=h(e,a),i=0;i<a;++i)n[i].call(s,r)}(s,p,this,arguments[1]);break;case 3:!function(e,t,s,r,a){if(t)e.call(s,r,a);else for(var n=e.length,i=h(e,n),o=0;o<n;++o)i[o].call(s,r,a)}(s,p,this,arguments[1],arguments[2]);break;case 4:!function(e,t,s,r,a,n){if(t)e.call(s,r,a,n);else for(var i=e.length,o=h(e,i),l=0;l<i;++l)o[l].call(s,r,a,n)}(s,p,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=new Array(r-1),n=1;n<r;n++)a[n-1]=arguments[n];!function(e,t,s,r){if(t)e.apply(s,r);else for(var a=e.length,n=h(e,a),i=0;i<a;++i)n[i].apply(s,r)}(s,p,this,a)}return!0},a.prototype.addListener=function(e,t){return p(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return p(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,u(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,u(this,e,t)),this},a.prototype.removeListener=function(e,s){var r,a,n,i,o;if("function"!=typeof s)throw new TypeError('"listener" argument must be a function');if(!(a=this._events))return this;if(!(r=a[e]))return this;if(r===s||r.listener===s)0==--this._eventsCount?this._events=t(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,r.listener||s));else if("function"!=typeof r){for(n=-1,i=r.length-1;i>=0;i--)if(r[i]===s||r[i].listener===s){o=r[i].listener,n=i;break}if(n<0)return this;0===n?r.shift():function(e,t){for(var s=t,r=s+1,a=e.length;r<a;s+=1,r+=1)e[s]=e[r];e.pop()}(r,n),1===r.length&&(a[e]=r[0]),a.removeListener&&this.emit("removeListener",e,o||s)}return this},a.prototype.removeAllListeners=function(e){var r,a,n;if(!(a=this._events))return this;if(!a.removeListener)return 0===arguments.length?(this._events=t(null),this._eventsCount=0):a[e]&&(0==--this._eventsCount?this._events=t(null):delete a[e]),this;if(0===arguments.length){var i,o=s(a);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=t(null),this._eventsCount=0,this}if("function"==typeof(r=a[e]))this.removeListener(e,r);else if(r)for(n=r.length-1;n>=0;n--)this.removeListener(e,r[n]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},9395:function(e){"use strict";function t(e){return function(){return e}}var s=function(){};s.thatReturns=t,s.thatReturnsFalse=t(!1),s.thatReturnsTrue=t(!0),s.thatReturnsNull=t(null),s.thatReturnsThis=function(){return this},s.thatReturnsArgument=function(e){return e},e.exports=s},646:function(e){"use strict";e.exports=function(e,t,s,r,a,n,i,o){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[s,r,a,n,i,o],c=0;(l=new Error(t.replace(/%s/g,(function(){return p[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},4594:function(e,t,s){"use strict";var r=s(9395);e.exports=r},7337:function(e,t,s){var r,a,n=s(818),i=s(7510),o=(a=[],{activateTrap:function(e){if(a.length>0){var t=a[a.length-1];t!==e&&t.pause()}var s=a.indexOf(e);-1===s||a.splice(s,1),a.push(e)},deactivateTrap:function(e){var t=a.indexOf(e);-1!==t&&a.splice(t,1),a.length>0&&a[a.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var s=document,a="string"==typeof e?s.querySelector(e):e,p=i({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(r),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),r=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",E,{capture:!0,passive:!1}),s.addEventListener("keydown",v,{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",E,!0),s.removeEventListener("keydown",v,!0),u}function f(e){var t=p[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=s.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function b(){var e;if(!(e=null!==f("initialFocus")?f("initialFocus"):a.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){a.contains(e.target)||(p.clickOutsideDeactivates?d({returnFocus:!n.isFocusable(e.target)}):p.allowOutsideClick&&p.allowOutsideClick(e)||e.preventDefault())}function y(e){a.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(c.mostRecentlyFocusedNode||b()))}function v(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 E(e){p.clickOutsideDeactivates||a.contains(e.target)||p.allowOutsideClick&&p.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function _(){var e=n(a);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()))}}},9353:function(e){"use strict";var t=Object.prototype.toString,s=Math.max,r=function(e,t){for(var s=[],r=0;r<e.length;r+=1)s[r]=e[r];for(var a=0;a<t.length;a+=1)s[a+e.length]=t[a];return s};e.exports=function(e){var a=this;if("function"!=typeof a||"[object Function]"!==t.apply(a))throw new TypeError("Function.prototype.bind called on incompatible "+a);for(var n,i=function(e,t){for(var s=[],r=t||0,a=0;r<e.length;r+=1,a+=1)s[a]=e[r];return s}(arguments,1),o=s(0,a.length-i.length),l=[],p=0;p<o;p++)l[p]="$"+p;if(n=Function("binder","return function ("+function(e,t){for(var s="",r=0;r<e.length;r+=1)s+=e[r],r+1<e.length&&(s+=t);return s}(l,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var t=a.apply(this,r(i,arguments));return Object(t)===t?t:this}return a.apply(e,r(i,arguments))})),a.prototype){var c=function(){};c.prototype=a.prototype,n.prototype=new c,c.prototype=null}return n}},6743:function(e,t,s){"use strict";var r=s(9353);e.exports=Function.prototype.bind||r},453:function(e,t,s){"use strict";var r,a=s(9612),n=s(9383),i=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),v=Function,E=function(e){try{return v('"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,k=s(4039)(),S=s(3628),C=s(1064),P=s(8648),F=s(1002),O=s(76),D={},A="undefined"!=typeof Uint8Array&&S?S(Uint8Array):r,T={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":k&&S?S([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":D,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&S?S(S([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&k&&S?S((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":a,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&k&&S?S((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&S?S(""[Symbol.iterator]()):r,"%Symbol%":k?Symbol:r,"%SyntaxError%":p,"%ThrowTypeError%":N,"%TypedArray%":A,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":F,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":C,"%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(S)try{null.error}catch(e){var j=S(S(e));T["%Error.prototype%"]=j}var M=function e(t){var s;if("%AsyncFunction%"===t)s=E("async function () {}");else if("%GeneratorFunction%"===t)s=E("function* () {}");else if("%AsyncGeneratorFunction%"===t)s=E("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(s=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&S&&(s=S(a.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"]},I=s(6743),$=s(9957),V=I.call(O,Array.prototype.concat),R=I.call(F,Array.prototype.splice),L=I.call(O,String.prototype.replace),B=I.call(O,String.prototype.slice),z=I.call(O,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,H=function(e,t){var s,r=e;if($(U,r)&&(r="%"+(s=U[r])[0]+"%"),$(T,r)){var a=T[r];if(a===D&&(a=M(r)),void 0===a&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:r,value:a}}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 r=[];return L(e,W,(function(e,t,s,a){r[r.length]=s?L(a,q,"$1"):t||e})),r}(e),r=s.length>0?s[0]:"",a=H("%"+r+"%",t),n=a.name,i=a.value,o=!1,l=a.alias;l&&(r=l[0],R(s,V([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,n="%"+(r+="."+m)+"%"))i=T[n];else if(null!=i){if(!(m in i)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(_&&u+1>=s.length){var b=_(i,m);i=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:i[m]}else d=$(i,m),i=i[m];d&&!o&&(T[n]=i)}}return i}},1064:function(e,t,s){"use strict";var r=s(9612);e.exports=r.getPrototypeOf||null},8648:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628:function(e,t,s){"use strict";var r=s(8648),a=s(1064),n=s(7176);e.exports=r?function(e){return r(e)}:a?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return a(e)}:n?function(e){return n(e)}:null},6549:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},5795:function(e,t,s){"use strict";var r=s(6549);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},4039:function(e,t,s){"use strict";var r="undefined"!=typeof Symbol&&Symbol,a=s(1333);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&a())))}},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 r 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 a=Object.getOwnPropertySymbols(e);if(1!==a.length||a[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},6166:function(e,t,s){"use strict";var r=s(7426),a=s(3349);function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=n,n.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var s=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-s,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-s,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),a(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,s=t-(e+this.padLength)%t,r=new Array(s+this.padLength);r[0]=128;for(var a=1;a<s;a++)r[a]=0;if(e<<=3,"big"===this.endian){for(var n=8;n<this.padLength;n++)r[a++]=0;r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=e>>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,n=8;n<this.padLength;n++)r[a++]=0;return r}},3917:function(e,t,s){"use strict";var r=s(7426),a=s(6166),n=s(6225),i=r.rotl32,o=r.sum32,l=r.sum32_5,p=n.ft_1,c=a.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var s=this.W,r=0;r<16;r++)s[r]=e[t+r];for(;r<s.length;r++)s[r]=i(s[r-3]^s[r-8]^s[r-14]^s[r-16],1);var a=this.h[0],n=this.h[1],c=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<s.length;r++){var h=~~(r/20),f=l(i(a,5),p(h,n,c,d),m,s[r],u[h]);m=d,d=c,c=i(n,30),n=a,a=f}this.h[0]=o(this.h[0],a),this.h[1]=o(this.h[1],n),this.h[2]=o(this.h[2],c),this.h[3]=o(this.h[3],d),this.h[4]=o(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},6225:function(e,t,s){"use strict";var r=s(7426).rotr32;function a(e,t,s){return e&t^~e&s}function n(e,t,s){return e&t^e&s^t&s}function i(e,t,s){return e^t^s}t.ft_1=function(e,t,s,r){return 0===e?a(t,s,r):1===e||3===e?i(t,s,r):2===e?n(t,s,r):void 0},t.ch32=a,t.maj32=n,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},7426:function(e,t,s){"use strict";var r=s(3349),a=s(6698);function n(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var s=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)s.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?s[r++]=i:i<2048?(s[r++]=i>>6|192,s[r++]=63&i|128):n(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),s[r++]=i>>18|240,s[r++]=i>>12&63|128,s[r++]=i>>6&63|128,s[r++]=63&i|128):(s[r++]=i>>12|224,s[r++]=i>>6&63|128,s[r++]=63&i|128)}else for(a=0;a<e.length;a++)s[a]=0|e[a];return s},t.toHex=function(e){for(var t="",s=0;s<e.length;s++)t+=o(e[s].toString(16));return t},t.htonl=i,t.toHex32=function(e,t){for(var s="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),s+=l(a.toString(16))}return s},t.zero2=o,t.zero8=l,t.join32=function(e,t,s,a){var n=s-t;r(n%4==0);for(var i=new Array(n/4),o=0,l=t;o<i.length;o++,l+=4){var p;p="big"===a?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],i[o]=p>>>0}return i},t.split32=function(e,t){for(var s=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var n=e[r];"big"===t?(s[a]=n>>>24,s[a+1]=n>>>16&255,s[a+2]=n>>>8&255,s[a+3]=255&n):(s[a+3]=n>>>24,s[a+2]=n>>>16&255,s[a+1]=n>>>8&255,s[a]=255&n)}return s},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,s){return e+t+s>>>0},t.sum32_4=function(e,t,s,r){return e+t+s+r>>>0},t.sum32_5=function(e,t,s,r,a){return e+t+s+r+a>>>0},t.sum64=function(e,t,s,r){var a=e[t],n=r+e[t+1]>>>0,i=(n<r?1:0)+s+a;e[t]=i>>>0,e[t+1]=n},t.sum64_hi=function(e,t,s,r){return(t+r>>>0<t?1:0)+e+s>>>0},t.sum64_lo=function(e,t,s,r){return t+r>>>0},t.sum64_4_hi=function(e,t,s,r,a,n,i,o){var l=0,p=t;return l+=(p=p+r>>>0)<t?1:0,l+=(p=p+n>>>0)<n?1:0,e+s+a+i+(l+=(p=p+o>>>0)<o?1:0)>>>0},t.sum64_4_lo=function(e,t,s,r,a,n,i,o){return t+r+n+o>>>0},t.sum64_5_hi=function(e,t,s,r,a,n,i,o,l,p){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+n>>>0)<n?1:0,c+=(u=u+o>>>0)<o?1:0,e+s+a+i+l+(c+=(u=u+p>>>0)<p?1:0)>>>0},t.sum64_5_lo=function(e,t,s,r,a,n,i,o,l,p){return t+r+n+o+p>>>0},t.rotr64_hi=function(e,t,s){return(t<<32-s|e>>>s)>>>0},t.rotr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0},t.shr64_hi=function(e,t,s){return e>>>s},t.shr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0}},9957:function(e,t,s){"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,n=s(6743);e.exports=n.call(r,a)},9477:function(e,t,s){var r=s(9789),a=new r;e.exports={numberFormat:a.numberFormat.bind(a),translate:a.translate.bind(a),configure:a.configure.bind(a),setLocale:a.setLocale.bind(a),getLocale:a.getLocale.bind(a),getLocaleSlug:a.getLocaleSlug.bind(a),addTranslations:a.addTranslations.bind(a),reRenderTranslations:a.reRenderTranslations.bind(a),registerComponentUpdateHook:a.registerComponentUpdateHook.bind(a),registerTranslateHook:a.registerTranslateHook.bind(a),state:a.state,stateObserver:a.stateObserver,on:a.stateObserver.on.bind(a.stateObserver),off:a.stateObserver.removeListener.bind(a.stateObserver),emit:a.stateObserver.emit.bind(a.stateObserver),localize:s(9029)(a),$this:a,I18N:r}},9789:function(e,t,s){var r=s(2905)("i18n-wp-plugin"),a=s(9407),n=s(3917),i=s(7007).EventEmitter,o=s(1807).A,l=s(8454),p=s(9023),c=s(930),u="number_format_decimals",d="number_format_thousands_sep",m=[function(e){return e}],h={};function f(){E.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function b(e){return Array.prototype.slice.call(e)}function g(e){var t,s=e[0],r={};for(("string"!=typeof s||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&f("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",b(e),". See https://github.com/pentatonicfunk/i18n-wp-plugin#translate-method"),2===e.length&&"string"==typeof s&&"string"==typeof e[1]&&f("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",b(e)),t=0;t<e.length;t++)"object"==typeof e[t]&&(r=e[t]);if("string"==typeof s?r.original=s:"object"==typeof r.original&&(r.plural=r.original.plural,r.count=r.original.count,r.original=r.original.single),"string"==typeof e[1]&&(r.plural=e[1]),void 0===r.original)throw new Error("Translate called without a `string` value as first argument.");return r}function y(e,t){var s,r="gettext";return t.context&&(r="p"+r),"string"==typeof t.original&&"string"==typeof t.plural&&(r="n"+r),s=function(e,t){switch(e){case"gettext":return[t.original];case"ngettext":return[t.original,t.plural,t.count];case"npgettext":return[t.context,t.original,t.plural,t.count];case"pgettext":return[t.context,t.original]}return[]}(r,t),e[r].apply(e,s)}function v(e,t){var s,r;for(s=m.length-1;s>=0;s--)if(r=m[s](p({},t)),e.state.locale[r.original])return y(e.state.jed,r);return null}function E(){if(!(this instanceof E))return new E;this.defaultLocaleSlug="en",this.state={numberFormatSettings:{},jed:void 0,locale:void 0,localeSlug:void 0,translations:l({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new i,this.stateObserver.setMaxListeners(0),this.configure()}E.throwErrors=!1,E.prototype.numberFormat=function(e){var t=arguments[1]||{},s="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",a=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return c(e,s,r,a)},E.prototype.configure=function(e){p(this,e||{}),this.setLocale()},E.prototype.setLocale=function(e){if(e&&e[""]&&e[""]["key-hash"]){var t,s,r,i=e[""]["key-hash"],o=function(e,t){const s=!1===t?"":String(t);if(void 0!==h[s+e])return h[s+e];var r=n().update(e).digest("hex");return h[s+e]=t?r.substr(0,t):r},l=function(e){return function(t){return t.context?(t.original=o(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=o(t.original,e),t}};if("sha1"===i.substr(0,4))if(4===i.length)m.push(l(!1));else{var c=i.substr(5).indexOf("-");if(c<0)t=Number(i.substr(5)),m.push(l(t));else for(s=Number(i.substr(5,c)),r=Number(i.substr(6+c)),t=s;t<=r;t++)m.push(l(t))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;p(this.state.locale,e)}else this.state.locale=p({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.jed=new a({locale_data:{messages:this.state.locale}}),this.state.numberFormatSettings.decimal_point=y(this.state.jed,g([u])),this.state.numberFormatSettings.thousands_sep=y(this.state.jed,g([d])),this.state.numberFormatSettings.decimal_point===u&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===d&&(this.state.numberFormatSettings.thousands_sep=","),this.state.translations.clear(),this.stateObserver.emit("change")},E.prototype.getLocale=function(){return this.state.locale},E.prototype.getLocaleSlug=function(){return this.state.localeSlug},E.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.jed.options.locale_data.messages[t]=e[t]);this.state.translations.clear(),this.stateObserver.emit("change")},E.prototype.hasTranslation=function(){return!!v(this,g(arguments))},E.prototype.translate=function(){var e,t,s,r,n,i;if(i=!(e=g(arguments)).components){try{n=JSON.stringify(e)}catch(e){i=!1}if(n&&(t=this.state.translations.get(n)))return t}if((t=v(this,e))||(t=y(this.state.jed,e)),e.args){(s=Array.isArray(e.args)?e.args.slice(0):[e.args]).unshift(t);try{t=a.sprintf.apply(a,s)}catch(e){if(!window||!window.console)return;r=this.throwErrors?"error":"warn","string"!=typeof e?window.console[r](e):window.console[r]("i18n sprintf error:",s)}}return e.components&&(t=o({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(s){t=s(t,e)})),i&&this.state.translations.set(n,t),t},E.prototype.reRenderTranslations=function(){r("Re-rendering all translations due to external request"),this.state.translations.clear(),this.stateObserver.emit("change")},E.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},E.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},e.exports=E},9029:function(e,t,s){var r=s(1594),a=s(9023),n=s(2306);e.exports=function(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(s){var i=s.displayName||s.name||"",o=n({displayName:"Localized("+i+")",componentDidMount:function(){this.boundForceUpdate=this.forceUpdate.bind(this),e.stateObserver.addListener("change",this.boundForceUpdate)},componentWillUnmount:function(){this.boundForceUpdate&&e.stateObserver.removeListener("change",this.boundForceUpdate)},render:function(){var e=a({},this.props,t);return r.createElement(s,e)}});return o._composedComponent=s,o}}},930:function(e){e.exports=function(e,t,s,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,n=isFinite(+t)?Math.abs(t):0,i=void 0===r?",":r,o=void 0===s?".":s,l="";return(l=(n?function(e,t){var s=Math.pow(10,t);return""+(Math.round(e*s)/s).toFixed(t)}(a,n):""+Math.round(a)).split("."))[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(l[1]||"").length<n&&(l[1]=l[1]||"",l[1]+=new Array(n-l[1].length+1).join("0")),l.join(o)}},2905:function(e,t,s){"use strict";function r(e){return r="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},r(e)}t.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":r(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var s="color: "+this.color;t.splice(1,0,s,"color: inherit");var r=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(a=r))})),t.splice(a,0,s)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=s(3360)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},3360:function(e,t,s){"use strict";e.exports=function(e){function t(e){for(var t=0,s=0;s<e.length;s++)t=(t<<5)-t+e.charCodeAt(s),t|=0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){var s;function i(){if(i.enabled){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var n=i,o=Number(new Date),l=o-(s||o);n.diff=l,n.prev=s,n.curr=o,s=o,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var p=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,s){if("%%"===e)return e;p++;var a=r.formatters[s];if("function"==typeof a){var i=t[p];e=a.call(n,i),t.splice(p,1),p--}return e})),r.formatArgs.call(n,t),(n.log||r.log).apply(n,t)}}return i.namespace=e,i.enabled=r.enabled(e),i.useColors=r.useColors(),i.color=t(e),i.destroy=a,i.extend=n,"function"==typeof r.init&&r.init(i),r.instances.push(i),i}function a(){var e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function n(e,t){return r(this.namespace+(void 0===t?":":t)+e)}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){r.enable("")},r.enable=function(e){var t;r.save(e),r.names=[],r.skips=[];var s=("string"==typeof e?e:"").split(/[\s,]+/),a=s.length;for(t=0;t<a;t++)s[t]&&("-"===(e=s[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var n=r.instances[t];n.enabled=r.enabled(n.namespace)}},r.enabled=function(e){if("*"===e[e.length-1])return!0;var t,s;for(t=0,s=r.skips.length;t<s;t++)if(r.skips[t].test(e))return!1;for(t=0,s=r.names.length;t<s;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=s(6585),Object.keys(e).forEach((function(t){r[t]=e[t]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var s=function(){};s.prototype=t.prototype,e.prototype=new s,e.prototype.constructor=e}}},1807:function(e,t,s){"use strict";var r="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},a=o(s(1594)),n=o(s(6294)),i=o(s(1978));function o(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function p(e,t){var s,i,o,c,u,d,m,h,f=[],b={};for(d=0;d<e.length;d++)if("string"!==(u=e[d]).type){if(!t.hasOwnProperty(u.value)||void 0===t[u.value])throw new Error("Invalid interpolation, missing component node: `"+u.value+"`");if("object"!==r(t[u.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+u.value+"`","\n> "+l);if("componentClose"===u.type)throw new Error("Missing opening component token: `"+u.value+"`");if("componentOpen"===u.type){s=t[u.value],o=d;break}f.push(t[u.value])}else f.push(u.value);return s&&(c=function(e,t){var s,r,a=t[e],n=0;for(r=e+1;r<t.length;r++)if((s=t[r]).value===a.value){if("componentOpen"===s.type){n++;continue}if("componentClose"===s.type){if(0===n)return r;n--}}throw new Error("Missing closing component token `"+a.value+"`")}(o,e),m=p(e.slice(o+1,c),t),i=a.default.cloneElement(s,{},m),f.push(i),c<e.length-1&&(h=p(e.slice(c+1),t),f=f.concat(h))),1===f.length?f[0]:(f.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,n.default)(b))}t.A=function(e){var t=e.mixedString,s=e.components,a=e.throwErrors;if(l=t,!s)return t;if("object"!==(void 0===s?"undefined":r(s))){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var n=(0,i.default)(t);try{return p(n,s)}catch(e){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},1978:function(e){"use strict";function t(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(t)}},7206:function(e){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},9407:function(e,t){!function(s,r){var a=Array.prototype,n=Object.prototype,i=a.slice,o=n.hasOwnProperty,l=a.forEach,p={},c={forEach:function(e,t,s){var r,a,n;if(null!==e)if(l&&e.forEach===l)e.forEach(t,s);else if(e.length===+e.length){for(r=0,a=e.length;r<a;r++)if(r in e&&t.call(s,e[r],r,e)===p)return}else for(n in e)if(o.call(e,n)&&t.call(s,e[n],n,e)===p)return},extend:function(e){return this.forEach(i.call(arguments,1),(function(t){for(var s in t)e[s]=t[s]})),e}},u=function(e){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=c.extend({},this.defaults,e),this.textdomain(this.options.domain),e.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+e.domain+"`")};function d(e){return u.PF.compile(e||"nplurals=2; plural=(n != 1);")}function m(e,t){this._key=e,this._i18n=t}u.context_delimiter=String.fromCharCode(4),c.extend(m.prototype,{onDomain:function(e){return this._domain=e,this},withContext:function(e){return this._context=e,this},ifPlural:function(e,t){return this._val=e,this._pkey=t,this},fetch:function(e){return"[object Array]"!={}.toString.call(e)&&(e=[].slice.call(arguments,0)),(e&&e.length?u.sprintf:function(e){return e})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),e)}}),c.extend(u.prototype,{translate:function(e){return new m(e,this)},textdomain:function(e){if(!e)return this._textdomain;this._textdomain=e},gettext:function(e){return this.dcnpgettext.call(this,r,r,e)},dgettext:function(e,t){return this.dcnpgettext.call(this,e,r,t)},dcgettext:function(e,t){return this.dcnpgettext.call(this,e,r,t)},ngettext:function(e,t,s){return this.dcnpgettext.call(this,r,r,e,t,s)},dngettext:function(e,t,s,a){return this.dcnpgettext.call(this,e,r,t,s,a)},dcngettext:function(e,t,s,a){return this.dcnpgettext.call(this,e,r,t,s,a)},pgettext:function(e,t){return this.dcnpgettext.call(this,r,e,t)},dpgettext:function(e,t,s){return this.dcnpgettext.call(this,e,t,s)},dcpgettext:function(e,t,s){return this.dcnpgettext.call(this,e,t,s)},npgettext:function(e,t,s,a){return this.dcnpgettext.call(this,r,e,t,s,a)},dnpgettext:function(e,t,s,r,a){return this.dcnpgettext.call(this,e,t,s,r,a)},dcnpgettext:function(e,t,s,r,a){var n;if(r=r||s,e=e||this._textdomain,!this.options)return(n=new u).dcnpgettext.call(n,void 0,void 0,s,r,a);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[e])throw new Error("Domain `"+e+"` was not found.");if(!this.options.locale_data[e][""])throw new Error("No locale meta information provided.");if(!s)throw new Error("No translation key found.");var i,o,l,p=t?t+u.context_delimiter+s:s,c=this.options.locale_data,m=c[e],h=(c.messages||this.defaults.locale_data.messages)[""],f=m[""].plural_forms||m[""]["Plural-Forms"]||m[""]["plural-forms"]||h.plural_forms||h["Plural-Forms"]||h["plural-forms"];if(void 0===a)l=1;else{if("number"!=typeof a&&(a=parseInt(a,10),isNaN(a)))throw new Error("The number that was passed in is not a number.");l=d(f)(a)+1}if(!m)throw new Error("No domain named `"+e+"` could be found.");return!(i=m[p])||l>=i.length?(this.options.missing_key_callback&&this.options.missing_key_callback(p,e),o=[null,s,r],!0===this.options.debug&&console.log(o[d(f)(a)+1]),o[d()(a)+1]):(o=i[l])||(o=[null,s,r])[d()(a)+1]}});var h,f,b=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function t(e,t){for(var s=[];t>0;s[--t]=e);return s.join("")}var s=function(){return s.cache.hasOwnProperty(arguments[0])||(s.cache[arguments[0]]=s.parse(arguments[0])),s.format.call(null,s.cache[arguments[0]],arguments)};return s.format=function(s,r){var a,n,i,o,l,p,c,u=1,d=s.length,m="",h=[];for(n=0;n<d;n++)if("string"===(m=e(s[n])))h.push(s[n]);else if("array"===m){if((o=s[n])[2])for(a=r[u],i=0;i<o[2].length;i++){if(!a.hasOwnProperty(o[2][i]))throw b('[sprintf] property "%s" does not exist',o[2][i]);a=a[o[2][i]]}else a=o[1]?r[o[1]]:r[u++];if(/[^s]/.test(o[8])&&"number"!=e(a))throw b("[sprintf] expecting number but found %s",e(a));switch(null==a&&(a=""),o[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=o[7]?a.toExponential(o[7]):a.toExponential();break;case"f":a=o[7]?parseFloat(a).toFixed(o[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&o[7]?a.substring(0,o[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(o[8])&&o[3]&&a>=0?"+"+a:a,p=o[4]?"0"==o[4]?"0":o[4].charAt(1):" ",c=o[6]-String(a).length,l=o[6]?t(p,c):"",h.push(o[5]?a+l:l+a)}return h.join("")},s.cache={},s.parse=function(e){for(var t=e,s=[],r=[],a=0;t;){if(null!==(s=/^[^\x25]+/.exec(t)))r.push(s[0]);else if(null!==(s=/^\x25{2}/.exec(t)))r.push("%");else{if(null===(s=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw"[sprintf] huh?";if(s[2]){a|=1;var n=[],i=s[2],o=[];if(null===(o=/^([a-z_][a-z_\d]*)/i.exec(i)))throw"[sprintf] huh?";for(n.push(o[1]);""!==(i=i.substring(o[0].length));)if(null!==(o=/^\.([a-z_][a-z_\d]*)/i.exec(i)))n.push(o[1]);else{if(null===(o=/^\[(\d+)\]/.exec(i)))throw"[sprintf] huh?";n.push(o[1])}s[2]=n}else a|=2;if(3===a)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(s)}t=t.substring(s[0].length)}return r},s}();u.parse_plural=function(e,t){return e=e.replace(/n/g,t),u.parse_expression(e)},u.sprintf=function(e,t){return"[object Array]"=={}.toString.call(t)?function(e,t){return t.unshift(e),b.apply(null,t)}(e,[].slice.call(t)):b.apply(this,[].slice.call(arguments))},u.prototype.sprintf=function(){return u.sprintf.apply(this,arguments)},(u.PF={}).parse=function(e){var t=u.PF.extractPluralExpr(e);return u.PF.parser.parse.call(u.PF.parser,t)},u.PF.compile=function(e){var t=u.PF.parse(e);return function(e){return!0===(s=u.PF.interpreter(t)(e))?1:s||0;var s}},u.PF.interpreter=function(e){return function(t){switch(e.type){case"GROUP":return u.PF.interpreter(e.expr)(t);case"TERNARY":return u.PF.interpreter(e.expr)(t)?u.PF.interpreter(e.truthy)(t):u.PF.interpreter(e.falsey)(t);case"OR":return u.PF.interpreter(e.left)(t)||u.PF.interpreter(e.right)(t);case"AND":return u.PF.interpreter(e.left)(t)&&u.PF.interpreter(e.right)(t);case"LT":return u.PF.interpreter(e.left)(t)<u.PF.interpreter(e.right)(t);case"GT":return u.PF.interpreter(e.left)(t)>u.PF.interpreter(e.right)(t);case"LTE":return u.PF.interpreter(e.left)(t)<=u.PF.interpreter(e.right)(t);case"GTE":return u.PF.interpreter(e.left)(t)>=u.PF.interpreter(e.right)(t);case"EQ":return u.PF.interpreter(e.left)(t)==u.PF.interpreter(e.right)(t);case"NEQ":return u.PF.interpreter(e.left)(t)!=u.PF.interpreter(e.right)(t);case"MOD":return u.PF.interpreter(e.left)(t)%u.PF.interpreter(e.right)(t);case"VAR":return t;case"NUM":return e.val;default:throw new Error("Invalid Token found.")}}},u.PF.extractPluralExpr=function(e){e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(e)||(e=e.concat(";"));var t,s=/nplurals\=(\d+);/,r=e.match(s);if(!(r.length>1))throw new Error("nplurals not found in plural_forms string: "+e);if(r[1],!((t=(e=e.replace(s,"")).match(/plural\=(.*);/))&&t.length>1))throw new Error("`plural` expression not found: "+e);return t[1]},u.PF.parser=(h={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(e,t,s,r,a,n,i){var o=n.length-1;switch(a){case 1:return{type:"GROUP",expr:n[o-1]};case 2:this.$={type:"TERNARY",expr:n[o-4],truthy:n[o-2],falsey:n[o]};break;case 3:this.$={type:"OR",left:n[o-2],right:n[o]};break;case 4:this.$={type:"AND",left:n[o-2],right:n[o]};break;case 5:this.$={type:"LT",left:n[o-2],right:n[o]};break;case 6:this.$={type:"LTE",left:n[o-2],right:n[o]};break;case 7:this.$={type:"GT",left:n[o-2],right:n[o]};break;case 8:this.$={type:"GTE",left:n[o-2],right:n[o]};break;case 9:this.$={type:"NEQ",left:n[o-2],right:n[o]};break;case 10:this.$={type:"EQ",left:n[o-2],right:n[o]};break;case 11:this.$={type:"MOD",left:n[o-2],right:n[o]};break;case 12:this.$={type:"GROUP",expr:n[o-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:Number(e)}}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,s=[0],r=[null],a=[],n=this.table,i="",o=0,l=0,p=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var c=this.lexer.yylloc;function u(){var e;return"number"!=typeof(e=t.lexer.lex()||1)&&(e=t.symbols_[e]||e),e}a.push(c),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,m,h,f,b,g,y,v,E,_,w={};;){if(h=s[s.length-1],this.defaultActions[h]?f=this.defaultActions[h]:(null==d&&(d=u()),f=n[h]&&n[h][d]),void 0===f||!f.length||!f[0]){if(!p){for(g in E=[],n[h])this.terminals_[g]&&g>2&&E.push("'"+this.terminals_[g]+"'");var x="";x=this.lexer.showPosition?"Parse error on line "+(o+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+E.join(", ")+", got '"+this.terminals_[d]+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:c,expected:E})}if(3==p){if(1==d)throw new Error(x||"Parsing halted.");l=this.lexer.yyleng,i=this.lexer.yytext,o=this.lexer.yylineno,c=this.lexer.yylloc,d=u()}for(;!(2..toString()in n[h]);){if(0==h)throw new Error(x||"Parsing halted.");_=1,s.length=s.length-2*_,r.length=r.length-_,a.length=a.length-_,h=s[s.length-1]}m=d,d=2,f=n[h=s[s.length-1]]&&n[h][2],p=3}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+h+", token: "+d);switch(f[0]){case 1:s.push(d),r.push(this.lexer.yytext),a.push(this.lexer.yylloc),s.push(f[1]),d=null,m?(d=m,m=null):(l=this.lexer.yyleng,i=this.lexer.yytext,o=this.lexer.yylineno,c=this.lexer.yylloc,p>0&&p--);break;case 2:if(y=this.productions_[f[1]][1],w.$=r[r.length-y],w._$={first_line:a[a.length-(y||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(y||1)].first_column,last_column:a[a.length-1].last_column},void 0!==(b=this.performAction.call(w,i,l,o,this.yy,f[1],r,a)))return b;y&&(s=s.slice(0,-1*y*2),r=r.slice(0,-1*y),a=a.slice(0,-1*y)),s.push(this.productions_[f[1]][0]),r.push(w.$),a.push(w._$),v=n[s[s.length-2]][s[s.length-1]],s.push(v);break;case 3:return!0}}return!0}},f=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e,e.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if(e=this._input.match(this.rules[s[r]]))return(t=e[0].match(/\n.*/g))&&(this.yylineno+=t.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:t?t[t.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],this.performAction.call(this,this.yy,this,s[r],this.conditionStack[this.conditionStack.length-1])||void 0;if(""===this._input)return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},performAction:function(e,t,s,r){switch(s){case 0:break;case 1:return 20;case 2:return 19;case 3:return 8;case 4:return 9;case 5:return 6;case 6:return 7;case 7:return 11;case 8:return 13;case 9:return 10;case 10:return 12;case 11:return 14;case 12:return 15;case 13:return 16;case 14:return 17;case 15:return 18;case 16:return 5;case 17:return"INVALID"}},rules:[/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};return e}(),h.lexer=f,h),e.exports&&(t=e.exports=u),t.Jed=u}()},9023:function(e){var t=9007199254740991,s="[object Arguments]",r="[object Function]",a="[object GeneratorFunction]",n=/^(?:0|[1-9]\d*)$/;var i,o,l=Object.prototype,p=l.hasOwnProperty,c=l.toString,u=l.propertyIsEnumerable,d=(i=Object.keys,o=Object,function(e){return i(o(e))}),m=Math.max,h=!u.call({valueOf:1},"valueOf");function f(e,t){var r=E(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&_(e)}(e)&&p.call(e,"callee")&&(!u.call(e,"callee")||c.call(e)==s)}(e)?function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r}(e.length,String):[],a=r.length,n=!!a;for(var i in e)!t&&!p.call(e,i)||n&&("length"==i||g(i,a))||r.push(i);return r}function b(e,t,s){var r=e[t];p.call(e,t)&&v(r,s)&&(void 0!==s||t in e)||(e[t]=s)}function g(e,s){return!!(s=null==s?t:s)&&("number"==typeof e||n.test(e))&&e>-1&&e%1==0&&e<s}function y(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||l)}function v(e,t){return e===t||e!=e&&t!=t}var E=Array.isArray;function _(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}(e.length)&&!function(e){var t=w(e)?c.call(e):"";return t==r||t==a}(e)}function w(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var x,N=(x=function(e,t){if(h||y(t)||_(t))!function(e,t,s,r){s||(s={});for(var a=-1,n=t.length;++a<n;){var i=t[a],o=r?r(s[i],e[i],i,s,e):void 0;b(s,i,void 0===o?e[i]:o)}}(t,function(e){return _(e)?f(e):function(e){if(!y(e))return d(e);var t=[];for(var s in Object(e))p.call(e,s)&&"constructor"!=s&&t.push(s);return t}(e)}(t),e);else for(var s in t)p.call(t,s)&&b(e,s,t[s])},function(e,t){return t=m(void 0===t?e.length-1:t,0),function(){for(var s=arguments,r=-1,a=m(s.length-t,0),n=Array(a);++r<a;)n[r]=s[t+r];r=-1;for(var i=Array(t+1);++r<t;)i[r]=s[r];return i[t]=n,function(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}(e,this,i)}}((function(e,t){var s=-1,r=t.length,a=r>1?t[r-1]:void 0,n=r>2?t[2]:void 0;for(a=x.length>3&&"function"==typeof a?(r--,a):void 0,n&&function(e,t,s){if(!w(s))return!1;var r=typeof t;return!!("number"==r?_(s)&&g(t,s.length):"string"==r&&t in s)&&v(s[t],e)}(t[0],t[1],n)&&(a=r<3?void 0:a,r=1),e=Object(e);++s<r;){var i=t[s];i&&x(e,i,s,a)}return e})));e.exports=N},5580:function(e,t,s){var r=s(6110)(s(9325),"DataView");e.exports=r},1549:function(e,t,s){var r=s(2032),a=s(3862),n=s(6721),i=s(2749),o=s(5749);function l(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,e.exports=l},79:function(e,t,s){var r=s(3702),a=s(80),n=s(4739),i=s(8655),o=s(1175);function l(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,e.exports=l},8223:function(e,t,s){var r=s(6110)(s(9325),"Map");e.exports=r},3661:function(e,t,s){var r=s(3040),a=s(7670),n=s(289),i=s(4509),o=s(2949);function l(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,e.exports=l},2804:function(e,t,s){var r=s(6110)(s(9325),"Promise");e.exports=r},6545:function(e,t,s){var r=s(6110)(s(9325),"Set");e.exports=r},7217:function(e,t,s){var r=s(79),a=s(1420),n=s(938),i=s(3605),o=s(9817),l=s(945);function p(e){var t=this.__data__=new r(e);this.size=t.size}p.prototype.clear=a,p.prototype.delete=n,p.prototype.get=i,p.prototype.has=o,p.prototype.set=l,e.exports=p},1873:function(e,t,s){var r=s(9325).Symbol;e.exports=r},7828:function(e,t,s){var r=s(9325).Uint8Array;e.exports=r},8303:function(e,t,s){var r=s(6110)(s(9325),"WeakMap");e.exports=r},3729:function(e){e.exports=function(e,t){for(var s=-1,r=null==e?0:e.length;++s<r&&!1!==t(e[s],s,e););return e}},9770:function(e){e.exports=function(e,t){for(var s=-1,r=null==e?0:e.length,a=0,n=[];++s<r;){var i=e[s];t(i,s,e)&&(n[a++]=i)}return n}},695:function(e,t,s){var r=s(8096),a=s(2428),n=s(6449),i=s(3656),o=s(361),l=s(7167),p=Object.prototype.hasOwnProperty;e.exports=function(e,t){var s=n(e),c=!s&&a(e),u=!s&&!c&&i(e),d=!s&&!c&&!u&&l(e),m=s||c||u||d,h=m?r(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}},4528:function(e){e.exports=function(e,t){for(var s=-1,r=t.length,a=e.length;++s<r;)e[a+s]=t[s];return e}},6547:function(e,t,s){var r=s(979),a=s(5288),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,s){var i=e[t];n.call(e,t)&&a(i,s)&&(void 0!==s||t in e)||r(e,t,s)}},6025:function(e,t,s){var r=s(5288);e.exports=function(e,t){for(var s=e.length;s--;)if(r(e[s][0],t))return s;return-1}},4733:function(e,t,s){var r=s(1791),a=s(5950);e.exports=function(e,t){return e&&r(t,a(t),e)}},3838:function(e,t,s){var r=s(1791),a=s(7241);e.exports=function(e,t){return e&&r(t,a(t),e)}},979:function(e,t,s){var r=s(3243);e.exports=function(e,t,s){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}},9999:function(e,t,s){var r=s(7217),a=s(3729),n=s(6547),i=s(4733),o=s(3838),l=s(3290),p=s(3007),c=s(4652),u=s(8948),d=s(2),m=s(5730),h=s(5861),f=s(6189),b=s(7199),g=s(5529),y=s(6449),v=s(3656),E=s(7730),_=s(3805),w=s(8440),x=s(5950),N=s(7241),k="[object Arguments]",S="[object Function]",C="[object Object]",P={};P[k]=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[C]=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[S]=P["[object WeakMap]"]=!1,e.exports=function e(t,s,F,O,D,A){var T,j=1&s,M=2&s,U=4&s;if(F&&(T=D?F(t,O,D,A):F(t)),void 0!==T)return T;if(!_(t))return t;var I=y(t);if(I){if(T=f(t),!j)return p(t,T)}else{var $=h(t),V=$==S||"[object GeneratorFunction]"==$;if(v(t))return l(t,j);if($==C||$==k||V&&!D){if(T=M||V?{}:g(t),!j)return M?u(t,o(T,t)):c(t,i(T,t))}else{if(!P[$])return D?t:{};T=b(t,$,j)}}A||(A=new r);var R=A.get(t);if(R)return R;A.set(t,T),w(t)?t.forEach((function(r){T.add(e(r,s,F,r,t,A))})):E(t)&&t.forEach((function(r,a){T.set(a,e(r,s,F,a,t,A))}));var L=I?void 0:(U?M?m:d:M?N:x)(t);return a(L||t,(function(r,a){L&&(r=t[a=r]),n(T,a,e(r,s,F,a,t,A))})),T}},9344:function(e,t,s){var r=s(3805),a=Object.create,n=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var s=new e;return e.prototype=void 0,s}}();e.exports=n},2199:function(e,t,s){var r=s(4528),a=s(6449);e.exports=function(e,t,s){var n=t(e);return a(e)?n:r(n,s(e))}},2552:function(e,t,s){var r=s(1873),a=s(659),n=s(9350),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):n(e)}},7534:function(e,t,s){var r=s(2552),a=s(346);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},9172:function(e,t,s){var r=s(5861),a=s(346);e.exports=function(e){return a(e)&&"[object Map]"==r(e)}},5083:function(e,t,s){var r=s(1882),a=s(7296),n=s(3805),i=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!(!n(e)||a(e))&&(r(e)?d:o).test(i(e))}},6038:function(e,t,s){var r=s(5861),a=s(346);e.exports=function(e){return a(e)&&"[object Set]"==r(e)}},4901:function(e,t,s){var r=s(2552),a=s(294),n=s(346),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return n(e)&&a(e.length)&&!!i[r(e)]}},8984:function(e,t,s){var r=s(5527),a=s(3650),n=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var s in Object(e))n.call(e,s)&&"constructor"!=s&&t.push(s);return t}},2903:function(e,t,s){var r=s(3805),a=s(5527),n=s(181),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return n(e);var t=a(e),s=[];for(var o in e)("constructor"!=o||!t&&i.call(e,o))&&s.push(o);return s}},8096:function(e){e.exports=function(e,t){for(var s=-1,r=Array(e);++s<e;)r[s]=t(s);return r}},7301:function(e){e.exports=function(e){return function(t){return e(t)}}},9653:function(e,t,s){var r=s(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},3290:function(e,t,s){e=s.nmd(e);var r=s(9325),a=t&&!t.nodeType&&t,n=a&&e&&!e.nodeType&&e,i=n&&n.exports===a?r.Buffer:void 0,o=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var s=e.length,r=o?o(s):new e.constructor(s);return e.copy(r),r}},6169:function(e,t,s){var r=s(9653);e.exports=function(e,t){var s=t?r(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}},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}},3736:function(e,t,s){var r=s(1873),a=r?r.prototype:void 0,n=a?a.valueOf:void 0;e.exports=function(e){return n?Object(n.call(e)):{}}},1961:function(e,t,s){var r=s(9653);e.exports=function(e,t){var s=t?r(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}},3007:function(e){e.exports=function(e,t){var s=-1,r=e.length;for(t||(t=Array(r));++s<r;)t[s]=e[s];return t}},1791:function(e,t,s){var r=s(6547),a=s(979);e.exports=function(e,t,s,n){var i=!s;s||(s={});for(var o=-1,l=t.length;++o<l;){var p=t[o],c=n?n(s[p],e[p],p,s,e):void 0;void 0===c&&(c=e[p]),i?a(s,p,c):r(s,p,c)}return s}},4652:function(e,t,s){var r=s(1791),a=s(4664);e.exports=function(e,t){return r(e,a(e),t)}},8948:function(e,t,s){var r=s(1791),a=s(6375);e.exports=function(e,t){return r(e,a(e),t)}},5481:function(e,t,s){var r=s(9325)["__core-js_shared__"];e.exports=r},3243:function(e,t,s){var r=s(6110),a=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},4840:function(e,t,s){var r="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g;e.exports=r},2:function(e,t,s){var r=s(2199),a=s(4664),n=s(5950);e.exports=function(e){return r(e,n,a)}},5730:function(e,t,s){var r=s(2199),a=s(6375),n=s(7241);e.exports=function(e){return r(e,n,a)}},2651:function(e,t,s){var r=s(4218);e.exports=function(e,t){var s=e.__data__;return r(t)?s["string"==typeof t?"string":"hash"]:s.map}},6110:function(e,t,s){var r=s(5083),a=s(392);e.exports=function(e,t){var s=a(e,t);return r(s)?s:void 0}},8879:function(e,t,s){var r=s(4335)(Object.getPrototypeOf,Object);e.exports=r},659:function(e,t,s){var r=s(1873),a=Object.prototype,n=a.hasOwnProperty,i=a.toString,o=r?r.toStringTag:void 0;e.exports=function(e){var t=n.call(e,o),s=e[o];try{e[o]=void 0;var r=!0}catch(e){}var a=i.call(e);return r&&(t?e[o]=s:delete e[o]),a}},4664:function(e,t,s){var r=s(9770),a=s(3345),n=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return n.call(e,t)})))}:a;e.exports=o},6375:function(e,t,s){var r=s(4528),a=s(8879),n=s(4664),i=s(3345),o=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,n(e)),e=a(e);return t}:i;e.exports=o},5861:function(e,t,s){var r=s(5580),a=s(8223),n=s(2804),i=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(r),b=p(a),g=p(n),y=p(i),v=p(o),E=l;(r&&E(new r(new ArrayBuffer(1)))!=h||a&&E(new a)!=c||n&&E(n.resolve())!=u||i&&E(new i)!=d||o&&E(new o)!=m)&&(E=function(e){var t=l(e),s="[object Object]"==t?e.constructor:void 0,r=s?p(s):"";if(r)switch(r){case f:return h;case b:return c;case g:return u;case y:return d;case v:return m}return t}),e.exports=E},392:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},2032:function(e,t,s){var r=s(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3862:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721:function(e,t,s){var r=s(1042),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return a.call(t,e)?t[e]:void 0}},2749:function(e,t,s){var r=s(1042),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},5749:function(e,t,s){var r=s(1042);e.exports=function(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},6189:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var s=e.length,r=new e.constructor(s);return s&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},7199:function(e,t,s){var r=s(9653),a=s(6169),n=s(3201),i=s(3736),o=s(1961);e.exports=function(e,t,s){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return a(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 n(e);case"[object Symbol]":return i(e)}}},5529:function(e,t,s){var r=s(9344),a=s(8879),n=s(5527);e.exports=function(e){return"function"!=typeof e.constructor||n(e)?{}:r(a(e))}},361:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,s){var r=typeof e;return!!(s=null==s?9007199254740991:s)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<s}},4218:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296:function(e,t,s){var r,a=s(5481),n=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!n&&n in e}},5527:function(e){var t=Object.prototype;e.exports=function(e){var s=e&&e.constructor;return e===("function"==typeof s&&s.prototype||t)}},3702:function(e){e.exports=function(){this.__data__=[],this.size=0}},80:function(e,t,s){var r=s(6025),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,s=r(t,e);return!(s<0)&&(s==t.length-1?t.pop():a.call(t,s,1),--this.size,!0)}},4739:function(e,t,s){var r=s(6025);e.exports=function(e){var t=this.__data__,s=r(t,e);return s<0?void 0:t[s][1]}},8655:function(e,t,s){var r=s(6025);e.exports=function(e){return r(this.__data__,e)>-1}},1175:function(e,t,s){var r=s(6025);e.exports=function(e,t){var s=this.__data__,a=r(s,e);return a<0?(++this.size,s.push([e,t])):s[a][1]=t,this}},3040:function(e,t,s){var r=s(1549),a=s(79),n=s(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(n||a),string:new r}}},7670:function(e,t,s){var r=s(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},289:function(e,t,s){var r=s(2651);e.exports=function(e){return r(this,e).get(e)}},4509:function(e,t,s){var r=s(2651);e.exports=function(e){return r(this,e).has(e)}},2949:function(e,t,s){var r=s(2651);e.exports=function(e,t){var s=r(this,e),a=s.size;return s.set(e,t),this.size+=s.size==a?0:1,this}},1042:function(e,t,s){var r=s(6110)(Object,"create");e.exports=r},3650:function(e,t,s){var r=s(4335)(Object.keys,Object);e.exports=r},181:function(e){e.exports=function(e){var t=[];if(null!=e)for(var s in Object(e))t.push(s);return t}},6009:function(e,t,s){e=s.nmd(e);var r=s(4840),a=t&&!t.nodeType&&t,n=a&&e&&!e.nodeType&&e,i=n&&n.exports===a&&r.process,o=function(){try{var e=n&&n.require&&n.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o},9350:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:function(e){e.exports=function(e,t){return function(s){return e(t(s))}}},9325:function(e,t,s){var r=s(4840),a="object"==typeof self&&self&&self.Object===Object&&self,n=r||a||Function("return this")();e.exports=n},1420:function(e,t,s){var r=s(79);e.exports=function(){this.__data__=new r,this.size=0}},938:function(e){e.exports=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}},3605:function(e){e.exports=function(e){return this.__data__.get(e)}},9817:function(e){e.exports=function(e){return this.__data__.has(e)}},945:function(e,t,s){var r=s(79),a=s(8223),n=s(3661);e.exports=function(e,t){var s=this.__data__;if(s instanceof r){var i=s.__data__;if(!a||i.length<199)return i.push([e,t]),this.size=++s.size,this;s=this.__data__=new n(i)}return s.set(e,t),this.size=s.size,this}},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""}},8055:function(e,t,s){var r=s(9999);e.exports=function(e){return r(e,5)}},5288:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},2428:function(e,t,s){var r=s(7534),a=s(346),n=Object.prototype,i=n.hasOwnProperty,o=n.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return a(e)&&i.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},6449:function(e){var t=Array.isArray;e.exports=t},4894:function(e,t,s){var r=s(1882),a=s(294);e.exports=function(e){return null!=e&&a(e.length)&&!r(e)}},3656:function(e,t,s){e=s.nmd(e);var r=s(9325),a=s(9935),n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,o=i&&i.exports===n?r.Buffer:void 0,l=(o?o.isBuffer:void 0)||a;e.exports=l},1882:function(e,t,s){var r=s(2552),a=s(3805);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730:function(e,t,s){var r=s(9172),a=s(7301),n=s(6009),i=n&&n.isMap,o=i?a(i):r;e.exports=o},3805:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8440:function(e,t,s){var r=s(6038),a=s(7301),n=s(6009),i=n&&n.isSet,o=i?a(i):r;e.exports=o},7167:function(e,t,s){var r=s(4901),a=s(7301),n=s(6009),i=n&&n.isTypedArray,o=i?a(i):r;e.exports=o},5950:function(e,t,s){var r=s(695),a=s(8984),n=s(4894);e.exports=function(e){return n(e)?r(e):a(e)}},7241:function(e,t,s){var r=s(695),a=s(2903),n=s(4894);e.exports=function(e){return n(e)?r(e,!0):a(e)}},3345:function(e){e.exports=function(){return[]}},9935:function(e){e.exports=function(){return!1}},8454:function(e,t,s){var r=s(7007),a=s(6698);function n(e){if(!(this instanceof n))return new n(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=n,a(n,r.EventEmitter),Object.defineProperty(n.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),n.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},n.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},n.prototype._unlink=function(e,t,s){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=s,this.cache[this.tail].prev=null):(this.cache[t].next=s,this.cache[s].prev=t)},n.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},n.prototype.set=function(e,t){var s;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((s=this.cache[e]).value=t,this.maxAge&&(s.modified=Date.now()),e===this.head)return t;this._unlink(e,s.prev,s.next)}else s={value:t,modified:0,next:null,prev:null},this.maxAge&&(s.modified=Date.now()),this.cache[e]=s,this.length===this.max&&this.evict();return this.length++,s.next=null,s.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},n.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},n.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},n.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},1514:function(e){"use strict";e.exports=Math.abs},8968:function(e){"use strict";e.exports=Math.floor},4459:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},6188:function(e){"use strict";e.exports=Math.max},8002:function(e){"use strict";e.exports=Math.min},5880:function(e){"use strict";e.exports=Math.pow},414:function(e){"use strict";e.exports=Math.round},3093:function(e,t,s){"use strict";var r=s(4459);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},3349:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,s){if(e!=t)throw new Error(s||"Assertion failed: "+e+" != "+t)}},6585:function(e){var t=1e3,s=60*t,r=60*s,a=24*r,n=7*a,i=365.25*a;function o(e,t,s,r){var a=t>=1.5*s;return Math.round(e/s)+" "+r+(a?"s":"")}e.exports=function(e,l){l=l||{};var p=typeof e;if("string"===p&&e.length>0)return function(e){if((e=String(e)).length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!o)return;var l=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*n;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*s;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===p&&isFinite(e))return l.long?function(e){var n=Math.abs(e);if(n>=a)return o(e,n,a,"day");if(n>=r)return o(e,n,r,"hour");if(n>=s)return o(e,n,s,"minute");if(n>=t)return o(e,n,t,"second");return e+" ms"}(e):function(e){var n=Math.abs(e);if(n>=a)return Math.round(e/a)+"d";if(n>=r)return Math.round(e/r)+"h";if(n>=s)return Math.round(e/s)+"m";if(n>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5228:function(e){"use strict";var t=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},s=0;s<10;s++)t["_"+String.fromCharCode(s)]=s;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var n,i,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var p in n=Object(arguments[l]))s.call(n,p)&&(o[p]=n[p]);if(t){i=t(n);for(var c=0;c<i.length;c++)r.call(n,i[c])&&(o[i[c]]=n[i[c]])}}return o}},8859:function(e,t,s){var r="function"==typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=r&&a&&"function"==typeof a.get?a.get:null,i=r&&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,v=String.prototype.replace,E=String.prototype.toUpperCase,_=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,N=Array.prototype.join,k=Array.prototype.slice,S=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,O="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||"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 j(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 r=e<0?-S(-e):S(e);if(r!==e){var a=String(r),n=y.call(t,a.length+1);return v.call(a,s,"$&_")+"."+v.call(v.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,s,"$&_")}var M=s(2634),U=M.custom,I=W(U)?U:null,$={__proto__:null,double:'"',single:"'"},V={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function R(e,t,s){var r=s.quoteStyle||t,a=$[r];return a+e+a}function L(e){return v.call(String(e),/"/g,""")}function B(e){return!("[object Array]"!==Q(e)||D&&"object"==typeof e&&D in e)}function z(e){return!("[object RegExp]"!==Q(e)||D&&"object"==typeof e&&D in e)}function W(e){if(O)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!F)return!1;try{return F.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,a,o){var l=r||{};if(H(l,"quoteStyle")&&!H($,l.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(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=!H(l,"customInspect")||l.customInspect;if("boolean"!=typeof f&&"symbol"!==f)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(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(H(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var E=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 G(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return E?j(t,w):w}if("bigint"==typeof t){var S=String(t)+"n";return E?j(t,S):S}var P=void 0===l.depth?5:l.depth;if(void 0===a&&(a=0),a>=P&&P>0&&"object"==typeof t)return B(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,a);if(void 0===o)o=[];else if(Y(o,t)>=0)return"[Circular]";function V(t,s,r){if(s&&(o=k.call(o)).push(s),r){var n={depth:l.depth};return H(l,"quoteStyle")&&(n.quoteStyle=l.quoteStyle),e(t,n,a+1,o)}return e(t,l,a+1,o)}if("function"==typeof t&&!z(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),K=te(t,V);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(K.length>0?" { "+N.call(K,", ")+" }":"")}if(W(t)){var se=O?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!=typeof t||O?se:J(se)}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)),ae=t.attributes||[],ne=0;ne<ae.length;ne++)re+=" "+ae[ne].name+"="+R(L(ae[ne].value),"double",l);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+="</"+_.call(String(t.nodeName))+">"}if(B(t)){if(0===t.length)return"[]";var ie=te(t,V);return U&&!function(e){for(var t=0;t<e.length;t++)if(Y(e[t],"\n")>=0)return!1;return!0}(ie)?"["+ee(ie,U)+"]":"[ "+N.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==Q(e)||D&&"object"==typeof e&&D in e)}(t)){var oe=te(t,V);return"cause"in Error.prototype||!("cause"in t)||A.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+N.call(oe,", ")+" }":"{ ["+String(t)+"] "+N.call(x.call("[cause]: "+V(t.cause),oe),", ")+" }"}if("object"==typeof t&&f){if(I&&"function"==typeof t[I]&&M)return M(t,{depth:P-a});if("symbol"!==f&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!n||!e||"object"!=typeof e)return!1;try{n.call(e);try{p.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,s){le.push(V(s,t,!0)+" => "+V(e,t))})),Z("Map",n.call(t),le,U)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e);try{n.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var pe=[];return c&&c.call(t,(function(e){pe.push(V(e,t))})),Z("Set",p.call(t),pe,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]"!==Q(e)||D&&"object"==typeof e&&D in e)}(t))return J(V(Number(t)));if(function(e){if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}(t))return J(V(C.call(t)));if(function(e){return!("[object Boolean]"!==Q(e)||D&&"object"==typeof e&&D in e)}(t))return J(h.call(t));if(function(e){return!("[object String]"!==Q(e)||D&&"object"==typeof e&&D in e)}(t))return J(V(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]"!==Q(e)||D&&"object"==typeof e&&D in e)}(t)&&!z(t)){var ce=te(t,V),ue=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",me=!ue&&D&&Object(t)===t&&D in t?y.call(Q(t),8,-1):de?"Object":"",he=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(me||de?"["+N.call(x.call([],me||[],de||[]),": ")+"] ":"");return 0===ce.length?he+"{}":U?he+"{"+ee(ce,U)+"}":he+"{ "+N.call(ce,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return q.call(e,t)}function Q(e){return f.call(e)}function Y(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s<r;s++)if(e[s]===t)return s;return-1}function G(e,t){if(e.length>t.maxStringLength){var s=e.length-t.maxStringLength,r="... "+s+" more character"+(s>1?"s":"");return G(y.call(e,0,t.maxStringLength),t)+r}var a=V[t.quoteStyle||"single"];return a.lastIndex=0,R(v.call(v.call(e,a,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(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":"")+E.call(t.toString(16))}function J(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function Z(e,t,s,r){return e+" ("+t+") {"+(r?ee(s,r):N.call(s,", "))+"}"}function ee(e,t){if(0===e.length)return"";var s="\n"+t.prev+t.base;return s+N.call(e,","+s)+"\n"+t.prev}function te(e,t){var s=B(e),r=[];if(s){r.length=e.length;for(var a=0;a<e.length;a++)r[a]=H(e,a)?t(e[a],e):""}var n,i="function"==typeof P?P(e):[];if(O){n={};for(var o=0;o<i.length;o++)n["$"+i[o]]=i[o]}for(var l in e)H(e,l)&&(s&&String(Number(l))===l&&l<e.length||O&&n["$"+l]instanceof Symbol||(w.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof P)for(var p=0;p<i.length;p++)A.call(e,i[p])&&r.push("["+t(i[p])+"]: "+t(e[i[p]],e));return r}},4765:function(e){"use strict";var t=String.prototype.replace,s=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,s,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:a}},5373:function(e,t,s){"use strict";var r=s(8636),a=s(2642),n=s(4765);e.exports={formats:n,parse:a,stringify:r}},2642:function(e,t,s){"use strict";var r=s(7720),a=Object.prototype.hasOwnProperty,n=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},p=function(e,t,s,r){if(e){var n=s.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,o=s.depth>0&&/(\[[^[\]]*])/.exec(n),p=o?n.slice(0,o.index):n,c=[];if(p){if(!s.plainObjects&&a.call(Object.prototype,p)&&!s.allowPrototypes)return;c.push(p)}for(var u=0;s.depth>0&&null!==(o=i.exec(n))&&u<s.depth;){if(u+=1,!s.plainObjects&&a.call(Object.prototype,o[1].slice(1,-1))&&!s.allowPrototypes)return;c.push(o[1])}if(o){if(!0===s.strictDepth)throw new RangeError("Input depth exceeded depth option of "+s.depth+" and strictDepth is true");c.push("["+n.slice(o.index)+"]")}return function(e,t,s,r){for(var a=r?t:l(t,s),n=e.length-1;n>=0;--n){var i,o=e[n];if("[]"===o&&s.parseArrays)i=s.allowEmptyArrays&&(""===a||s.strictNullHandling&&null===a)?[]:[].concat(a);else{i=s.plainObjects?{__proto__:null}:{};var p="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,c=s.decodeDotInKeys?p.replace(/%2E/g,"."):p,u=parseInt(c,10);s.parseArrays||""!==c?!isNaN(u)&&o!==c&&String(u)===c&&u>=0&&s.parseArrays&&u<=s.arrayLimit?(i=[])[u]=a:"__proto__"!==c&&(i[c]=a):i={0:a}}a=i}return a}(c,t,s,r)}};e.exports=function(e,t){var s=function(e){if(!e)return i;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");var t=void 0===e.charset?i.charset:e.charset,s=void 0===e.duplicates?i.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||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:s,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(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,u=t.parameterLimit===1/0?void 0:t.parameterLimit,d=p.split(t.delimiter,u),m=-1,h=t.charset;if(t.charsetSentinel)for(c=0;c<d.length;++c)0===d[c].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[c]?h="utf-8":"utf8=%26%2310003%3B"===d[c]&&(h="iso-8859-1"),m=c,c=d.length);for(c=0;c<d.length;++c)if(c!==m){var f,b,g=d[c],y=g.indexOf("]="),v=-1===y?g.indexOf("="):y+1;-1===v?(f=t.decoder(g,i.decoder,h,"key"),b=t.strictNullHandling?null:""):(f=t.decoder(g.slice(0,v),i.decoder,h,"key"),b=r.maybeMap(l(g.slice(v+1),t),(function(e){return t.decoder(e,i.decoder,h,"value")}))),b&&t.interpretNumericEntities&&"iso-8859-1"===h&&(b=o(String(b))),g.indexOf("[]=")>-1&&(b=n(b)?[b]:b);var E=a.call(s,f);E&&"combine"===t.duplicates?s[f]=r.combine(s[f],b):E&&"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=r.merge(u,f,s)}return!0===s.allowSparse?u:r.compact(u)}},8636:function(e,t,s){"use strict";var r=s(920),a=s(7720),n=s(4765),i=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=n.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:a.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:n.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},h={},f=function e(t,s,n,i,o,p,u,d,f,b,g,y,v,E,_,w,x,N){for(var k,S=t,C=N,P=0,F=!1;void 0!==(C=C.get(h))&&!F;){var O=C.get(t);if(P+=1,void 0!==O){if(O===P)throw new RangeError("Cyclic object value");F=!0}void 0===C.get(h)&&(P=0)}if("function"==typeof b?S=b(s,S):S instanceof Date?S=v(S):"comma"===n&&l(S)&&(S=a.maybeMap(S,(function(e){return e instanceof Date?v(e):e}))),null===S){if(p)return f&&!w?f(s,m.encoder,x,"key",E):s;S=""}if("string"==typeof(k=S)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||a.isBuffer(S))return f?[_(w?s:f(s,m.encoder,x,"key",E))+"="+_(f(S,m.encoder,x,"value",E))]:[_(s)+"="+_(String(S))];var D,A=[];if(void 0===S)return A;if("comma"===n&&l(S))w&&f&&(S=a.maybeMap(S,f)),D=[{value:S.length>0?S.join(",")||null:void 0}];else if(l(b))D=b;else{var T=Object.keys(S);D=g?T.sort(g):T}var j=d?String(s).replace(/\./g,"%2E"):String(s),M=i&&l(S)&&1===S.length?j+"[]":j;if(o&&l(S)&&0===S.length)return M+"[]";for(var U=0;U<D.length;++U){var I=D[U],$="object"==typeof I&&I&&void 0!==I.value?I.value:S[I];if(!u||null!==$){var V=y&&d?String(I).replace(/\./g,"%2E"):String(I),R=l(S)?"function"==typeof n?n(M,V):M:M+(y?"."+V:"["+V+"]");N.set(t,P);var L=r();L.set(h,N),c(A,e($,R,n,i,o,p,u,d,"comma"===n&&w&&l(S)?null:f,b,g,y,v,E,_,w,x,L))}}return A};e.exports=function(e,t){var s,a=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=n.default;if(void 0!==e.format){if(!i.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");s=e.format}var r,a=n.formatters[s],p=m.filter;if(("function"==typeof e.filter||l(e.filter))&&(p=e.filter),r=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:r,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:a,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?a=(0,p.filter)("",a):l(p.filter)&&(s=p.filter);var u=[];if("object"!=typeof a||null===a)return"";var d=o[p.arrayFormat],h="comma"===d&&p.commaRoundTrip;s||(s=Object.keys(a)),p.sort&&s.sort(p.sort);for(var b=r(),g=0;g<s.length;++g){var y=s[g],v=a[y];p.skipNulls&&null===v||c(u,f(v,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 E=u.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),E.length>0?_+E:""}},7720:function(e,t,s){"use strict";var r=s(4765),a=Object.prototype.hasOwnProperty,n=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var s=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)void 0!==e[r]&&(s[r]=e[r]);return s},l=1024;e.exports={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce((function(e,s){return e[s]=t[s],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],s=[],r=0;r<t.length;++r)for(var a=t[r],i=a.obj[a.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 r=[],a=0;a<s.length;++a)void 0!==s[a]&&r.push(s[a]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,s){var r=e.replace(/\+/g," ");if("iso-8859-1"===s)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,s,a,n){if(0===e.length)return e;var o=e;if("symbol"==typeof e?o=Symbol.prototype.toString.call(e):"string"!=typeof e&&(o=String(e)),"iso-8859-1"===s)return escape(o).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var p="",c=0;c<o.length;c+=l){for(var u=o.length>=l?o.slice(c,c+l):o,d=[],m=0;m<u.length;++m){var h=u.charCodeAt(m);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||n===r.RFC1738&&(40===h||41===h)?d[d.length]=u.charAt(m):h<128?d[d.length]=i[h]:h<2048?d[d.length]=i[192|h>>6]+i[128|63&h]:h<55296||h>=57344?d[d.length]=i[224|h>>12]+i[128|h>>6&63]+i[128|63&h]:(m+=1,h=65536+((1023&h)<<10|1023&u.charCodeAt(m)),d[d.length]=i[240|h>>18]+i[128|h>>12&63]+i[128|h>>6&63]+i[128|63&h])}p+=d.join("")}return p},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(n(e)){for(var s=[],r=0;r<e.length;r+=1)s.push(t(e[r]));return s}return t(e)},merge:function e(t,s,r){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];(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,s))&&(t[s]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(s);var i=t;return n(t)&&!n(s)&&(i=o(t,r)),n(t)&&n(s)?(s.forEach((function(s,n){if(a.call(t,n)){var i=t[n];i&&"object"==typeof i&&s&&"object"==typeof s?t[n]=e(i,s,r):t.push(s)}else t[n]=s})),t):Object.keys(s).reduce((function(t,n){var i=s[n];return a.call(t,n)?t[n]=e(t[n],i,r):t[n]=i,t}),i)}}},6294:function(e,t,s){"use strict";var r=s(1594),a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,n=s(9395),i=s(646),o=s(4594),l="function"==typeof Symbol&&Symbol.iterator;function p(e,t){return e&&"object"==typeof e&&null!=e.key?(s=e.key,r={"=":"=0",":":"=2"},"$"+(""+s).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var s,r}function c(e,t,s,r){var n,o=typeof e;if("undefined"!==o&&"boolean"!==o||(e=null),null===e||"string"===o||"number"===o||"object"===o&&e.$$typeof===a)return s(r,e,""===t?"."+p(e,0):t),1;var u=0,d=""===t?".":t+":";if(Array.isArray(e))for(var m=0;m<e.length;m++)u+=c(n=e[m],d+p(n,m),s,r);else{var h=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(h){0;for(var f,b=h.call(e),g=0;!(f=b.next()).done;)u+=c(n=f.value,d+p(n,g++),s,r)}else if("object"===o){0;var y=""+e;i(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===y?"object with keys {"+Object.keys(e).join(", ")+"}":y,"")}}return u}var u=/\/+/g;function d(e){return(""+e).replace(u,"$&/")}var m,h,f=b,b=function(e){var t=this;if(t.instancePool.length){var s=t.instancePool.pop();return t.call(s,e),s}return new t(e)},g=function(e){var t=this;i(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)};function y(e,t,s,r){this.result=e,this.keyPrefix=t,this.func=s,this.context=r,this.count=0}function v(e,t,s){var a,i,o=e.result,l=e.keyPrefix,p=e.func,c=e.context,u=p.call(c,t,e.count++);Array.isArray(u)?E(u,o,s,n.thatReturnsArgument):null!=u&&(r.isValidElement(u)&&(a=u,i=l+(!u.key||t&&t.key===u.key?"":d(u.key)+"/")+s,u=r.cloneElement(a,{key:i},void 0!==a.props?a.props.children:void 0)),o.push(u))}function E(e,t,s,r,a){var n="";null!=s&&(n=d(s)+"/");var i=y.getPooled(t,n,r,a);!function(e,t,s){null==e||c(e,"",t,s)}(e,v,i),y.release(i)}y.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},m=function(e,t,s,r){var a=this;if(a.instancePool.length){var n=a.instancePool.pop();return a.call(n,e,t,s,r),n}return new a(e,t,s,r)},(h=y).instancePool=[],h.getPooled=m||f,h.poolSize||(h.poolSize=10),h.release=g;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return o(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return o(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;i(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var s in e)E(e[s],t,s,n.thatReturnsArgument);return t}},2551:function(e,t,s){"use strict";var r=s(1594),a=s(9982);function n(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 i=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++)i.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,r,a,n,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=n,this.removeEmptyString=i}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 v(e,t,s,r){var a=b.hasOwnProperty(t)?b[t]:null;(null!==a?0!==a.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,s,r){if(null==t||function(e,t,s,r){if(null!==s&&0===s.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==s?!s.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,s,r))return!0;if(r)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,a,r)&&(s=null),r||null===a?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)):a.mustUseProperty?e[a.propertyName]=null===s?3!==a.type&&"":s:(t=a.attributeName,r=a.attributeNamespace,null===s?e.removeAttribute(t):(s=3===(a=a.type)||4===a&&!0===s?"":""+s,r?e.setAttributeNS(r,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 E=r.__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"),k=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),C=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),D=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 j=Symbol.iterator;function M(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var U,I=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 V=!1;function R(e,t){if(!e||V)return"";V=!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 r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),n=r.stack.split("\n"),i=a.length-1,o=n.length-1;1<=i&&0<=o&&a[i]!==n[o];)o--;for(;1<=i&&0<=o;i--,o--)if(a[i]!==n[o]){if(1!==i||1!==o)do{if(i--,0>--o||a[i]!==n[o]){var l="\n"+a[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=o);break}}}finally{V=!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 k:return"Profiler";case N:return"StrictMode";case F:return"Suspense";case O:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case S: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 D: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 q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function H(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==s&&"function"==typeof s.get&&"function"==typeof s.set){var a=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,n.call(this,e)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+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(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==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 I({},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,r=null!=t.checked?t.checked:t.defaultChecked;s=W(null!=t.value?t.value:s),e._wrapperState={initialChecked:r,initialValue:s,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function X(e,t){J(e,t);var s=W(t.value),r=t.type;if(null!=s)"number"===r?(0===s&&""===e.value||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if("submit"===r||"reset"===r)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 Z(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||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,r){if(e=e.options,t){t={};for(var a=0;a<s.length;a++)t["$"+s[a]]=!0;for(s=0;s<e.length;s++)a=t.hasOwnProperty("$"+e[s].value),e[s].selected!==a&&(e[s].selected=a),a&&r&&(e[s].defaultSelected=!0)}else{for(s=""+W(s),t=null,a=0;a<e.length;a++){if(e[a].value===s)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return I({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ae(e,t){var s=t.value;if(null==s){if(s=t.children,t=t.defaultValue,null!=s){if(null!=t)throw Error(n(92));if(te(s)){if(1<s.length)throw Error(n(93));s=s[0]}t=s}null==t&&(t=""),s=t}e._wrapperState={initialValue:W(s)}}function ne(e,t){var s=W(t.value),r=W(t.defaultValue);null!=s&&((s=""+s)!==e.value&&(e.value=s),null==t.defaultValue&&e.defaultValue!==s&&(e.defaultValue=s)),null!=r&&(e.defaultValue=""+r)}function ie(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,r){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 r=0===s.indexOf("--"),a=fe(s,t[s],r);"float"===s&&(s="cssFloat"),r?e.setProperty(s,a):e[s]=a}}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=I({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(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function ve(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 Ee=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 ke(e){if(e=ya(e)){if("function"!=typeof we)throw Error(n(280));var t=e.stateNode;t&&(t=Ea(t),we(e.stateNode,e.type,t))}}function Se(e){xe?Ne?Ne.push(e):Ne=[e]:xe=e}function Ce(){if(xe){var e=xe,t=Ne;if(Ne=xe=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Pe(e,t){return e(t)}function Fe(){}var Oe=!1;function De(e,t,s){if(Oe)return e(t,s);Oe=!0;try{return Pe(e,t,s)}finally{Oe=!1,(null!==xe||null!==Ne)&&(Fe(),Ce())}}function Ae(e,t){var s=e.stateNode;if(null===s)return null;var r=Ea(s);if(null===r)return null;s=r[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":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(s&&"function"!=typeof s)throw Error(n(231,t,typeof s));return s}var Te=!1;if(c)try{var je={};Object.defineProperty(je,"passive",{get:function(){Te=!0}}),window.addEventListener("test",je,je),window.removeEventListener("test",je,je)}catch(ce){Te=!1}function Me(e,t,s,r,a,n,i,o,l){var p=Array.prototype.slice.call(arguments,3);try{t.apply(s,p)}catch(e){this.onError(e)}}var Ue=!1,Ie=null,$e=!1,Ve=null,Re={onError:function(e){Ue=!0,Ie=e}};function Le(e,t,s,r,a,n,i,o,l){Ue=!1,Ie=null,Me.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(n(188))}function qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(n(188));return t!==e?null:e}for(var s=e,r=t;;){var a=s.return;if(null===a)break;var i=a.alternate;if(null===i){if(null!==(r=a.return)){s=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===s)return We(a),e;if(i===r)return We(a),t;i=i.sibling}throw Error(n(188))}if(s.return!==r.return)s=a,r=i;else{for(var o=!1,l=a.child;l;){if(l===s){o=!0,s=a,r=i;break}if(l===r){o=!0,r=a,s=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===s){o=!0,s=i,r=a;break}if(l===r){o=!0,r=i,s=a;break}l=l.sibling}if(!o)throw Error(n(189))}}if(s.alternate!==r)throw Error(n(190))}if(3!==s.tag)throw Error(n(188));return s.stateNode.current===s?e:t}(e))?He(e):null}function He(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=He(e);if(null!==t)return t;e=e.sibling}return null}var Qe=a.unstable_scheduleCallback,Ye=a.unstable_cancelCallback,Ge=a.unstable_shouldYield,Ke=a.unstable_requestPaint,Je=a.unstable_now,Xe=a.unstable_getCurrentPriorityLevel,Ze=a.unstable_ImmediatePriority,et=a.unstable_UserBlockingPriority,tt=a.unstable_NormalPriority,st=a.unstable_LowPriority,rt=a.unstable_IdlePriority,at=null,nt=null;var it=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 r=0,a=e.suspendedLanes,n=e.pingedLanes,i=268435455&s;if(0!==i){var o=i&~a;0!==o?r=ut(o):0!==(n&=i)&&(r=ut(n))}else 0!==(i=s&~a)?r=ut(i):0!==n&&(r=ut(n));if(0===r)return 0;if(0!==t&&t!==r&&!(t&a)&&((a=r&-r)>=(n=t&-t)||16===a&&4194240&n))return t;if(4&r&&(r|=16&s),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(s=31-it(t)),r|=e[s],t&=~a;return r}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-it(t)]=s}function yt(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var r=31-it(s),a=1<<r;a&t|e[r]&t&&(e[r]|=t),s&=~a}}var vt=0;function Et(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var _t,wt,xt,Nt,kt,St=!1,Ct=[],Pt=null,Ft=null,Ot=null,Dt=new Map,At=new Map,Tt=[],jt="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 Mt(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":Ft=null;break;case"mouseover":case"mouseout":Ot=null;break;case"pointerover":case"pointerout":Dt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":At.delete(t.pointerId)}}function Ut(e,t,s,r,a,n){return null===e||e.nativeEvent!==n?(e={blockedOn:t,domEventName:s,eventSystemFlags:r,nativeEvent:n,targetContainers:[a]},null!==t&&(null!==(t=ya(t))&&wt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function It(e){var t=ga(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 kt(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=ya(s))&&wt(t),e.blockedOn=s,!1;var r=new(s=e.nativeEvent).constructor(s.type,s);Ee=r,s.target.dispatchEvent(r),Ee=null,t.shift()}return!0}function Vt(e,t,s){$t(e)&&s.delete(t)}function Rt(){St=!1,null!==Pt&&$t(Pt)&&(Pt=null),null!==Ft&&$t(Ft)&&(Ft=null),null!==Ot&&$t(Ot)&&(Ot=null),Dt.forEach(Vt),At.forEach(Vt)}function Lt(e,t){e.blockedOn===t&&(e.blockedOn=null,St||(St=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Rt)))}function Bt(e){function t(t){return Lt(t,e)}if(0<Ct.length){Lt(Ct[0],e);for(var s=1;s<Ct.length;s++){var r=Ct[s];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Pt&&Lt(Pt,e),null!==Ft&&Lt(Ft,e),null!==Ot&&Lt(Ot,e),Dt.forEach(t),At.forEach(t),s=0;s<Tt.length;s++)(r=Tt[s]).blockedOn===e&&(r.blockedOn=null);for(;0<Tt.length&&null===(s=Tt[0]).blockedOn;)It(s),null===s.blockedOn&&Tt.shift()}var zt=E.ReactCurrentBatchConfig,Wt=!0;function qt(e,t,s,r){var a=vt,n=zt.transition;zt.transition=null;try{vt=1,Qt(e,t,s,r)}finally{vt=a,zt.transition=n}}function Ht(e,t,s,r){var a=vt,n=zt.transition;zt.transition=null;try{vt=4,Qt(e,t,s,r)}finally{vt=a,zt.transition=n}}function Qt(e,t,s,r){if(Wt){var a=Gt(e,t,s,r);if(null===a)zr(e,t,r,Yt,s),Mt(e,r);else if(function(e,t,s,r,a){switch(t){case"focusin":return Pt=Ut(Pt,e,t,s,r,a),!0;case"dragenter":return Ft=Ut(Ft,e,t,s,r,a),!0;case"mouseover":return Ot=Ut(Ot,e,t,s,r,a),!0;case"pointerover":var n=a.pointerId;return Dt.set(n,Ut(Dt.get(n)||null,e,t,s,r,a)),!0;case"gotpointercapture":return n=a.pointerId,At.set(n,Ut(At.get(n)||null,e,t,s,r,a)),!0}return!1}(a,e,t,s,r))r.stopPropagation();else if(Mt(e,r),4&t&&-1<jt.indexOf(e)){for(;null!==a;){var n=ya(a);if(null!==n&&_t(n),null===(n=Gt(e,t,s,r))&&zr(e,t,r,Yt,s),n===a)break;a=n}null!==a&&r.stopPropagation()}else zr(e,t,r,null,s)}}var Yt=null;function Gt(e,t,s,r){if(Yt=null,null!==(e=ga(e=_e(r))))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(Xe()){case Ze:return 1;case et:return 4;case tt:case st:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Jt=null,Xt=null,Zt=null;function es(){if(Zt)return Zt;var e,t,s=Xt,r=s.length,a="value"in Jt?Jt.value:Jt.textContent,n=a.length;for(e=0;e<r&&s[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&s[r-t]===a[n-t];t++);return Zt=a.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 rs(){return!1}function as(e){function t(t,s,r,a,n){for(var i in this._reactName=t,this._targetInst=r,this.type=s,this.nativeEvent=a,this.target=n,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?ss:rs,this.isPropagationStopped=rs,this}return I(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 ns,is,os,ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ps=as(ls),cs=I({},ls,{view:0,detail:0}),us=as(cs),ds=I({},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?(ns=e.screenX-os.screenX,is=e.screenY-os.screenY):is=ns=0,os=e),ns)},movementY:function(e){return"movementY"in e?e.movementY:is}}),ms=as(ds),hs=as(I({},ds,{dataTransfer:0})),fs=as(I({},cs,{relatedTarget:0})),bs=as(I({},ls,{animationName:0,elapsedTime:0,pseudoElement:0})),gs=I({},ls,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ys=as(gs),vs=as(I({},ls,{data:0})),Es={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 ks=I({},cs,{key:function(e){if(e.key){var t=Es[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}}),Ss=as(ks),Cs=as(I({},ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ps=as(I({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ns})),Fs=as(I({},ls,{propertyName:0,elapsedTime:0,pseudoElement:0})),Os=I({},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}),Ds=as(Os),As=[9,13,27,32],Ts=c&&"CompositionEvent"in window,js=null;c&&"documentMode"in document&&(js=document.documentMode);var Ms=c&&"TextEvent"in window&&!js,Us=c&&(!Ts||js&&8<js&&11>=js),Is=String.fromCharCode(32),$s=!1;function Vs(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,r){Se(r),0<(t=qr(t,"onChange")).length&&(s=new ps("onChange","change",null,s,r),e.push({event:s,listeners:t}))}var qs=null,Hs=null;function Qs(e){Ir(e,0)}function Ys(e){if(Q(va(e)))return e}function Gs(e,t){if("change"===e)return t}var Ks=!1;if(c){var Js;if(c){var Xs="oninput"in document;if(!Xs){var Zs=document.createElement("div");Zs.setAttribute("oninput","return;"),Xs="function"==typeof Zs.oninput}Js=Xs}else Js=!1;Ks=Js&&(!document.documentMode||9<document.documentMode)}function er(){qs&&(qs.detachEvent("onpropertychange",tr),Hs=qs=null)}function tr(e){if("value"===e.propertyName&&Ys(Hs)){var t=[];Ws(t,Hs,e,_e(e)),De(Qs,t)}}function sr(e,t,s){"focusin"===e?(er(),Hs=s,(qs=t).attachEvent("onpropertychange",tr)):"focusout"===e&&er()}function rr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Ys(Hs)}function ar(e,t){if("click"===e)return Ys(t)}function nr(e,t){if("input"===e||"change"===e)return Ys(t)}var ir="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function or(e,t){if(ir(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var s=Object.keys(e),r=Object.keys(t);if(s.length!==r.length)return!1;for(r=0;r<s.length;r++){var a=s[r];if(!u.call(t,a)||!ir(e[a],t[a]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var s,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(s=e+r.textContent.length,e<=t&&s>=t)return{node:r,offset:t-e};e=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function cr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?cr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ur(){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 dr(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 mr(e){var t=ur(),s=e.focusedElem,r=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&cr(s.ownerDocument.documentElement,s)){if(null!==r&&dr(s))if(t=r.start,void 0===(e=r.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 a=s.textContent.length,n=Math.min(r.start,a);r=void 0===r.end?n:Math.min(r.end,a),!e.extend&&n>r&&(a=r,r=n,n=a),a=pr(s,n);var i=pr(s,r);a&&i&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),n>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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 hr=c&&"documentMode"in document&&11>=document.documentMode,fr=null,br=null,gr=null,yr=!1;function vr(e,t,s){var r=s.window===s?s.document:9===s.nodeType?s:s.ownerDocument;yr||null==fr||fr!==Y(r)||("selectionStart"in(r=fr)&&dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&or(gr,r)||(gr=r,0<(r=qr(br,"onSelect")).length&&(t=new ps("onSelect","select",null,t,s),e.push({event:t,listeners:r}),t.target=fr)))}function Er(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var _r={animationend:Er("Animation","AnimationEnd"),animationiteration:Er("Animation","AnimationIteration"),animationstart:Er("Animation","AnimationStart"),transitionend:Er("Transition","TransitionEnd")},wr={},xr={};function Nr(e){if(wr[e])return wr[e];if(!_r[e])return e;var t,s=_r[e];for(t in s)if(s.hasOwnProperty(t)&&t in xr)return wr[e]=s[t];return e}c&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var kr=Nr("animationend"),Sr=Nr("animationiteration"),Cr=Nr("animationstart"),Pr=Nr("transitionend"),Fr=new Map,Or="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 Dr(e,t){Fr.set(e,t),l(t,[e])}for(var Ar=0;Ar<Or.length;Ar++){var Tr=Or[Ar];Dr(Tr.toLowerCase(),"on"+(Tr[0].toUpperCase()+Tr.slice(1)))}Dr(kr,"onAnimationEnd"),Dr(Sr,"onAnimationIteration"),Dr(Cr,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(Pr,"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 jr="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(" "),Mr=new Set("cancel close invalid load scroll toggle".split(" ").concat(jr));function Ur(e,t,s){var r=e.type||"unknown-event";e.currentTarget=s,function(e,t,s,r,a,i,o,l,p){if(Le.apply(this,arguments),Ue){if(!Ue)throw Error(n(198));var c=Ie;Ue=!1,Ie=null,$e||($e=!0,Ve=c)}}(r,t,void 0,e),e.currentTarget=null}function Ir(e,t){t=!!(4&t);for(var s=0;s<e.length;s++){var r=e[s],a=r.event;r=r.listeners;e:{var n=void 0;if(t)for(var i=r.length-1;0<=i;i--){var o=r[i],l=o.instance,p=o.currentTarget;if(o=o.listener,l!==n&&a.isPropagationStopped())break e;Ur(a,o,p),n=l}else for(i=0;i<r.length;i++){if(l=(o=r[i]).instance,p=o.currentTarget,o=o.listener,l!==n&&a.isPropagationStopped())break e;Ur(a,o,p),n=l}}}if($e)throw e=Ve,$e=!1,Ve=null,e}function $r(e,t){var s=t[ha];void 0===s&&(s=t[ha]=new Set);var r=e+"__bubble";s.has(r)||(Br(t,e,2,!1),s.add(r))}function Vr(e,t,s){var r=0;t&&(r|=4),Br(s,e,r,t)}var Rr="_reactListening"+Math.random().toString(36).slice(2);function Lr(e){if(!e[Rr]){e[Rr]=!0,i.forEach((function(t){"selectionchange"!==t&&(Mr.has(t)||Vr(t,!1,e),Vr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Rr]||(t[Rr]=!0,Vr("selectionchange",!1,t))}}function Br(e,t,s,r){switch(Kt(t)){case 1:var a=qt;break;case 4:a=Ht;break;default:a=Qt}s=a.bind(null,t,s,e),a=void 0,!Te||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,s,{capture:!0,passive:a}):e.addEventListener(t,s,!0):void 0!==a?e.addEventListener(t,s,{passive:a}):e.addEventListener(t,s,!1)}function zr(e,t,s,r,a){var n=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var o=r.stateNode.containerInfo;if(o===a||8===o.nodeType&&o.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===a||8===l.nodeType&&l.parentNode===a))return;i=i.return}for(;null!==o;){if(null===(i=ga(o)))return;if(5===(l=i.tag)||6===l){r=n=i;continue e}o=o.parentNode}}r=r.return}De((function(){var r=n,a=_e(s),i=[];e:{var o=Fr.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=Ss;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 kr:case Sr:case Cr:l=bs;break;case Pr:l=Fs;break;case"scroll":l=us;break;case"wheel":l=Ds;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=Cs}var c=!!(4&t),u=!c&&"scroll"===e,d=c?null!==o?o+"Capture":null:o;c=[];for(var m,h=r;null!==h;){var f=(m=h).stateNode;if(5===m.tag&&null!==f&&(m=f,null!==d&&(null!=(f=Ae(h,d))&&c.push(Wr(h,f,m)))),u)break;h=h.return}0<c.length&&(o=new l(o,p,null,s,a),i.push({event:o,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||s===Ee||!(p=s.relatedTarget||s.fromElement)||!ga(p)&&!p[ma])&&(l||o)&&(o=a.window===a?a:(o=a.ownerDocument)?o.defaultView||o.parentWindow:window,l?(l=r,null!==(p=(p=s.relatedTarget||s.toElement)?ga(p):null)&&(p!==(u=Be(p))||5!==p.tag&&6!==p.tag)&&(p=null)):(l=null,p=r),l!==p)){if(c=ms,f="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Cs,f="onPointerLeave",d="onPointerEnter",h="pointer"),u=null==l?o:va(l),m=null==p?o:va(p),(o=new c(f,h+"leave",l,s,a)).target=u,o.relatedTarget=m,f=null,ga(a)===r&&((c=new c(d,h+"enter",p,s,a)).target=m,c.relatedTarget=u,f=c),u=f,l&&p)e:{for(d=p,h=0,m=c=l;m;m=Hr(m))h++;for(m=0,f=d;f;f=Hr(f))m++;for(;0<h-m;)c=Hr(c),h--;for(;0<m-h;)d=Hr(d),m--;for(;h--;){if(c===d||null!==d&&c===d.alternate)break e;c=Hr(c),d=Hr(d)}c=null}else c=null;null!==l&&Qr(i,o,l,c,!1),null!==p&&null!==u&&Qr(i,u,p,c,!0)}if("select"===(l=(o=r?va(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===l&&"file"===o.type)var b=Gs;else if(zs(o))if(Ks)b=nr;else{b=rr;var g=sr}else(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(b=ar);switch(b&&(b=b(e,r))?Ws(i,b,s,a):(g&&g(e,o,r),"focusout"===e&&(g=o._wrapperState)&&g.controlled&&"number"===o.type&&ee(o,"number",o.value)),g=r?va(r):window,e){case"focusin":(zs(g)||"true"===g.contentEditable)&&(fr=g,br=r,gr=null);break;case"focusout":gr=br=fr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,vr(i,s,a);break;case"selectionchange":if(hr)break;case"keydown":case"keyup":vr(i,s,a)}var y;if(Ts)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else Ls?Vs(e,s)&&(v="onCompositionEnd"):"keydown"===e&&229===s.keyCode&&(v="onCompositionStart");v&&(Us&&"ko"!==s.locale&&(Ls||"onCompositionStart"!==v?"onCompositionEnd"===v&&Ls&&(y=es()):(Xt="value"in(Jt=a)?Jt.value:Jt.textContent,Ls=!0)),0<(g=qr(r,v)).length&&(v=new vs(v,e,null,s,a),i.push({event:v,listeners:g}),y?v.data=y:null!==(y=Rs(s))&&(v.data=y))),(y=Ms?function(e,t){switch(e){case"compositionend":return Rs(t);case"keypress":return 32!==t.which?null:($s=!0,Is);case"textInput":return(e=t.data)===Is&&$s?null:e;default:return null}}(e,s):function(e,t){if(Ls)return"compositionend"===e||!Ts&&Vs(e,t)?(e=es(),Zt=Xt=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<(r=qr(r,"onBeforeInput")).length&&(a=new vs("onBeforeInput","beforeinput",null,s,a),i.push({event:a,listeners:r}),a.data=y))}Ir(i,t)}))}function Wr(e,t,s){return{instance:e,listener:t,currentTarget:s}}function qr(e,t){for(var s=t+"Capture",r=[];null!==e;){var a=e,n=a.stateNode;5===a.tag&&null!==n&&(a=n,null!=(n=Ae(e,s))&&r.unshift(Wr(e,n,a)),null!=(n=Ae(e,t))&&r.push(Wr(e,n,a))),e=e.return}return r}function Hr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qr(e,t,s,r,a){for(var n=t._reactName,i=[];null!==s&&s!==r;){var o=s,l=o.alternate,p=o.stateNode;if(null!==l&&l===r)break;5===o.tag&&null!==p&&(o=p,a?null!=(l=Ae(s,n))&&i.unshift(Wr(s,l,o)):a||null!=(l=Ae(s,n))&&i.push(Wr(s,l,o))),s=s.return}0!==i.length&&e.push({event:t,listeners:i})}var Yr=/\r\n?/g,Gr=/\u0000|\uFFFD/g;function Kr(e){return("string"==typeof e?e:""+e).replace(Yr,"\n").replace(Gr,"")}function Jr(e,t,s){if(t=Kr(t),Kr(e)!==t&&s)throw Error(n(425))}function Xr(){}var Zr=null,ea=null;function ta(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 sa="function"==typeof setTimeout?setTimeout:void 0,ra="function"==typeof clearTimeout?clearTimeout:void 0,aa="function"==typeof Promise?Promise:void 0,na="function"==typeof queueMicrotask?queueMicrotask:void 0!==aa?function(e){return aa.resolve(null).then(e).catch(ia)}:sa;function ia(e){setTimeout((function(){throw e}))}function oa(e,t){var s=t,r=0;do{var a=s.nextSibling;if(e.removeChild(s),a&&8===a.nodeType)if("/$"===(s=a.data)){if(0===r)return e.removeChild(a),void Bt(t);r--}else"$"!==s&&"$?"!==s&&"$!"!==s||r++;s=a}while(s);Bt(t)}function la(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 pa(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 ca=Math.random().toString(36).slice(2),ua="__reactFiber$"+ca,da="__reactProps$"+ca,ma="__reactContainer$"+ca,ha="__reactEvents$"+ca,fa="__reactListeners$"+ca,ba="__reactHandles$"+ca;function ga(e){var t=e[ua];if(t)return t;for(var s=e.parentNode;s;){if(t=s[ma]||s[ua]){if(s=t.alternate,null!==t.child||null!==s&&null!==s.child)for(e=pa(e);null!==e;){if(s=e[ua])return s;e=pa(e)}return t}s=(e=s).parentNode}return null}function ya(e){return!(e=e[ua]||e[ma])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function va(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function Ea(e){return e[da]||null}var _a=[],wa=-1;function xa(e){return{current:e}}function Na(e){0>wa||(e.current=_a[wa],_a[wa]=null,wa--)}function ka(e,t){wa++,_a[wa]=e.current,e.current=t}var Sa={},Ca=xa(Sa),Pa=xa(!1),Fa=Sa;function Oa(e,t){var s=e.type.contextTypes;if(!s)return Sa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,n={};for(a in s)n[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function Da(e){return null!=(e=e.childContextTypes)}function Aa(){Na(Pa),Na(Ca)}function Ta(e,t,s){if(Ca.current!==Sa)throw Error(n(168));ka(Ca,t),ka(Pa,s)}function ja(e,t,s){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return s;for(var a in r=r.getChildContext())if(!(a in t))throw Error(n(108,z(e)||"Unknown",a));return I({},s,r)}function Ma(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sa,Fa=Ca.current,ka(Ca,e),ka(Pa,Pa.current),!0}function Ua(e,t,s){var r=e.stateNode;if(!r)throw Error(n(169));s?(e=ja(e,t,Fa),r.__reactInternalMemoizedMergedChildContext=e,Na(Pa),Na(Ca),ka(Ca,e)):Na(Pa),ka(Pa,s)}var Ia=null,$a=!1,Va=!1;function Ra(e){null===Ia?Ia=[e]:Ia.push(e)}function La(){if(!Va&&null!==Ia){Va=!0;var e=0,t=vt;try{var s=Ia;for(vt=1;e<s.length;e++){var r=s[e];do{r=r(!0)}while(null!==r)}Ia=null,$a=!1}catch(t){throw null!==Ia&&(Ia=Ia.slice(e+1)),Qe(Ze,La),t}finally{vt=t,Va=!1}}return null}var Ba=[],za=0,Wa=null,qa=0,Ha=[],Qa=0,Ya=null,Ga=1,Ka="";function Ja(e,t){Ba[za++]=qa,Ba[za++]=Wa,Wa=e,qa=t}function Xa(e,t,s){Ha[Qa++]=Ga,Ha[Qa++]=Ka,Ha[Qa++]=Ya,Ya=e;var r=Ga;e=Ka;var a=32-it(r)-1;r&=~(1<<a),s+=1;var n=32-it(t)+a;if(30<n){var i=a-a%5;n=(r&(1<<i)-1).toString(32),r>>=i,a-=i,Ga=1<<32-it(t)+a|s<<a|r,Ka=n+e}else Ga=1<<n|s<<a|r,Ka=e}function Za(e){null!==e.return&&(Ja(e,1),Xa(e,1,0))}function en(e){for(;e===Wa;)Wa=Ba[--za],Ba[za]=null,qa=Ba[--za],Ba[za]=null;for(;e===Ya;)Ya=Ha[--Qa],Ha[Qa]=null,Ka=Ha[--Qa],Ha[Qa]=null,Ga=Ha[--Qa],Ha[Qa]=null}var tn=null,sn=null,rn=!1,an=null;function nn(e,t){var s=Dp(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 on(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,tn=e,sn=la(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,tn=e,sn=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(s=null!==Ya?{id:Ga,overflow:Ka}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},(s=Dp(18,null,null,0)).stateNode=t,s.return=e,e.child=s,tn=e,sn=null,!0);default:return!1}}function ln(e){return!(!(1&e.mode)||128&e.flags)}function pn(e){if(rn){var t=sn;if(t){var s=t;if(!on(e,t)){if(ln(e))throw Error(n(418));t=la(s.nextSibling);var r=tn;t&&on(e,t)?nn(r,s):(e.flags=-4097&e.flags|2,rn=!1,tn=e)}}else{if(ln(e))throw Error(n(418));e.flags=-4097&e.flags|2,rn=!1,tn=e}}}function cn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;tn=e}function un(e){if(e!==tn)return!1;if(!rn)return cn(e),rn=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ta(e.type,e.memoizedProps)),t&&(t=sn)){if(ln(e))throw dn(),Error(n(418));for(;t;)nn(e,t),t=la(t.nextSibling)}if(cn(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var s=e.data;if("/$"===s){if(0===t){sn=la(e.nextSibling);break e}t--}else"$"!==s&&"$!"!==s&&"$?"!==s||t++}e=e.nextSibling}sn=null}}else sn=tn?la(e.stateNode.nextSibling):null;return!0}function dn(){for(var e=sn;e;)e=la(e.nextSibling)}function mn(){sn=tn=null,rn=!1}function hn(e){null===an?an=[e]:an.push(e)}var fn=E.ReactCurrentBatchConfig;function bn(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(n(309));var r=s.stateNode}if(!r)throw Error(n(147,e));var a=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=a.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(n(284));if(!s._owner)throw Error(n(290,e))}return e}function gn(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yn(e){return(0,e._init)(e._payload)}function vn(e){function t(t,s){if(e){var r=t.deletions;null===r?(t.deletions=[s],t.flags|=16):r.push(s)}}function s(s,r){if(!e)return null;for(;null!==r;)t(s,r),r=r.sibling;return null}function r(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 a(e,t){return(e=Tp(e,t)).index=0,e.sibling=null,e}function i(t,s,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<s?(t.flags|=2,s):r:(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,r){return null===t||6!==t.tag?((t=Ip(s,e.mode,r)).return=e,t):((t=a(t,s)).return=e,t)}function p(e,t,s,r){var n=s.type;return n===x?u(e,t,s.props.children,r,s.key):null!==t&&(t.elementType===n||"object"==typeof n&&null!==n&&n.$$typeof===A&&yn(n)===t.type)?((r=a(t,s.props)).ref=bn(e,t,s),r.return=e,r):((r=jp(s.type,s.key,s.props,null,e.mode,r)).ref=bn(e,t,s),r.return=e,r)}function c(e,t,s,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==s.containerInfo||t.stateNode.implementation!==s.implementation?((t=$p(s,e.mode,r)).return=e,t):((t=a(t,s.children||[])).return=e,t)}function u(e,t,s,r,n){return null===t||7!==t.tag?((t=Mp(s,e.mode,r,n)).return=e,t):((t=a(t,s)).return=e,t)}function d(e,t,s){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Ip(""+t,e.mode,s)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(s=jp(t.type,t.key,t.props,null,e.mode,s)).ref=bn(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)||M(t))return(t=Mp(t,e.mode,s,null)).return=e,t;gn(e,t)}return null}function m(e,t,s,r){var a=null!==t?t.key:null;if("string"==typeof s&&""!==s||"number"==typeof s)return null!==a?null:l(e,t,""+s,r);if("object"==typeof s&&null!==s){switch(s.$$typeof){case _:return s.key===a?p(e,t,s,r):null;case w:return s.key===a?c(e,t,s,r):null;case A:return m(e,t,(a=s._init)(s._payload),r)}if(te(s)||M(s))return null!==a?null:u(e,t,s,r,null);gn(e,s)}return null}function h(e,t,s,r,a){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(s)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return p(t,e=e.get(null===r.key?s:r.key)||null,r,a);case w:return c(t,e=e.get(null===r.key?s:r.key)||null,r,a);case A:return h(e,t,s,(0,r._init)(r._payload),a)}if(te(r)||M(r))return u(t,e=e.get(s)||null,r,a,null);gn(t,r)}return null}function f(a,n,o,l){for(var p=null,c=null,u=n,f=n=0,b=null;null!==u&&f<o.length;f++){u.index>f?(b=u,u=null):b=u.sibling;var g=m(a,u,o[f],l);if(null===g){null===u&&(u=b);break}e&&u&&null===g.alternate&&t(a,u),n=i(g,n,f),null===c?p=g:c.sibling=g,c=g,u=b}if(f===o.length)return s(a,u),rn&&Ja(a,f),p;if(null===u){for(;f<o.length;f++)null!==(u=d(a,o[f],l))&&(n=i(u,n,f),null===c?p=u:c.sibling=u,c=u);return rn&&Ja(a,f),p}for(u=r(a,u);f<o.length;f++)null!==(b=h(u,a,f,o[f],l))&&(e&&null!==b.alternate&&u.delete(null===b.key?f:b.key),n=i(b,n,f),null===c?p=b:c.sibling=b,c=b);return e&&u.forEach((function(e){return t(a,e)})),rn&&Ja(a,f),p}function b(a,o,l,p){var c=M(l);if("function"!=typeof c)throw Error(n(150));if(null==(l=c.call(l)))throw Error(n(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 v=m(a,f,y.value,p);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(a,f),o=i(v,o,b),null===u?c=v:u.sibling=v,u=v,f=g}if(y.done)return s(a,f),rn&&Ja(a,b),c;if(null===f){for(;!y.done;b++,y=l.next())null!==(y=d(a,y.value,p))&&(o=i(y,o,b),null===u?c=y:u.sibling=y,u=y);return rn&&Ja(a,b),c}for(f=r(a,f);!y.done;b++,y=l.next())null!==(y=h(f,a,b,y.value,p))&&(e&&null!==y.alternate&&f.delete(null===y.key?b:y.key),o=i(y,o,b),null===u?c=y:u.sibling=y,u=y);return e&&f.forEach((function(e){return t(a,e)})),rn&&Ja(a,b),c}return function e(r,n,i,l){if("object"==typeof i&&null!==i&&i.type===x&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case _:e:{for(var p=i.key,c=n;null!==c;){if(c.key===p){if((p=i.type)===x){if(7===c.tag){s(r,c.sibling),(n=a(c,i.props.children)).return=r,r=n;break e}}else if(c.elementType===p||"object"==typeof p&&null!==p&&p.$$typeof===A&&yn(p)===c.type){s(r,c.sibling),(n=a(c,i.props)).ref=bn(r,c,i),n.return=r,r=n;break e}s(r,c);break}t(r,c),c=c.sibling}i.type===x?((n=Mp(i.props.children,r.mode,l,i.key)).return=r,r=n):((l=jp(i.type,i.key,i.props,null,r.mode,l)).ref=bn(r,n,i),l.return=r,r=l)}return o(r);case w:e:{for(c=i.key;null!==n;){if(n.key===c){if(4===n.tag&&n.stateNode.containerInfo===i.containerInfo&&n.stateNode.implementation===i.implementation){s(r,n.sibling),(n=a(n,i.children||[])).return=r,r=n;break e}s(r,n);break}t(r,n),n=n.sibling}(n=$p(i,r.mode,l)).return=r,r=n}return o(r);case A:return e(r,n,(c=i._init)(i._payload),l)}if(te(i))return f(r,n,i,l);if(M(i))return b(r,n,i,l);gn(r,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==n&&6===n.tag?(s(r,n.sibling),(n=a(n,i)).return=r,r=n):(s(r,n),(n=Ip(i,r.mode,l)).return=r,r=n),o(r)):s(r,n)}}var En=vn(!0),_n=vn(!1),wn=xa(null),xn=null,Nn=null,kn=null;function Sn(){kn=Nn=xn=null}function Cn(e){var t=wn.current;Na(wn),e._currentValue=t}function Pn(e,t,s){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===s)break;e=e.return}}function Fn(e,t){xn=e,kn=Nn=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(vo=!0),e.firstContext=null)}function On(e){var t=e._currentValue;if(kn!==e)if(e={context:e,memoizedValue:t,next:null},null===Nn){if(null===xn)throw Error(n(308));Nn=e,xn.dependencies={lanes:0,firstContext:e}}else Nn=Nn.next=e;return t}var Dn=null;function An(e){null===Dn?Dn=[e]:Dn.push(e)}function Tn(e,t,s,r){var a=t.interleaved;return null===a?(s.next=s,An(t)):(s.next=a.next,a.next=s),t.interleaved=s,jn(e,r)}function jn(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 Mn=!1;function Un(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function In(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 $n(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vn(e,t,s){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Pl){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,jn(e,s)}return null===(a=r.interleaved)?(t.next=t,An(r)):(t.next=a.next,a.next=t),r.interleaved=t,jn(e,s)}function Rn(e,t,s){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&s)){var r=t.lanes;s|=r&=e.pendingLanes,t.lanes=s,yt(e,s)}}function Ln(e,t){var s=e.updateQueue,r=e.alternate;if(null!==r&&s===(r=r.updateQueue)){var a=null,n=null;if(null!==(s=s.firstBaseUpdate)){do{var i={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};null===n?a=n=i:n=n.next=i,s=s.next}while(null!==s);null===n?a=n=t:n=n.next=t}else a=n=t;return s={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:n,shared:r.shared,effects:r.effects},void(e.updateQueue=s)}null===(e=s.lastBaseUpdate)?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function Bn(e,t,s,r){var a=e.updateQueue;Mn=!1;var n=a.firstBaseUpdate,i=a.lastBaseUpdate,o=a.shared.pending;if(null!==o){a.shared.pending=null;var l=o,p=l.next;l.next=null,null===i?n=p:i.next=p,i=l;var c=e.alternate;null!==c&&((o=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===o?c.firstBaseUpdate=p:o.next=p,c.lastBaseUpdate=l))}if(null!==n){var u=a.baseState;for(i=0,c=p=l=null,o=n;;){var d=o.lane,m=o.eventTime;if((r&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=I({},u,d);break e;case 2:Mn=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(d=a.effects)?a.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,i|=d;if(null===(o=o.next)){if(null===(o=a.shared.pending))break;o=(d=o).next,d.next=null,a.lastBaseUpdate=d,a.shared.pending=null}}if(null===c&&(l=u),a.baseState=l,a.firstBaseUpdate=p,a.lastBaseUpdate=c,null!==(t=a.shared.interleaved)){a=t;do{i|=a.lane,a=a.next}while(a!==t)}else null===n&&(a.shared.lanes=0);Ul|=i,e.lanes=i,e.memoizedState=u}}function zn(e,t,s){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=s,"function"!=typeof a)throw Error(n(191,a));a.call(r)}}}var Wn={},qn=xa(Wn),Hn=xa(Wn),Qn=xa(Wn);function Yn(e){if(e===Wn)throw Error(n(174));return e}function Gn(e,t){switch(ka(Qn,t),ka(Hn,e),ka(qn,Wn),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)}Na(qn),ka(qn,t)}function Kn(){Na(qn),Na(Hn),Na(Qn)}function Jn(e){Yn(Qn.current);var t=Yn(qn.current),s=le(t,e.type);t!==s&&(ka(Hn,e),ka(qn,s))}function Xn(e){Hn.current===e&&(Na(qn),Na(Hn))}var Zn=xa(0);function ei(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 ti=[];function si(){for(var e=0;e<ti.length;e++)ti[e]._workInProgressVersionPrimary=null;ti.length=0}var ri=E.ReactCurrentDispatcher,ai=E.ReactCurrentBatchConfig,ni=0,ii=null,oi=null,li=null,pi=!1,ci=!1,ui=0,di=0;function mi(){throw Error(n(321))}function hi(e,t){if(null===t)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!ir(e[s],t[s]))return!1;return!0}function fi(e,t,s,r,a,i){if(ni=i,ii=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ri.current=null===e||null===e.memoizedState?Xi:Zi,e=s(r,a),ci){i=0;do{if(ci=!1,ui=0,25<=i)throw Error(n(301));i+=1,li=oi=null,t.updateQueue=null,ri.current=eo,e=s(r,a)}while(ci)}if(ri.current=Ji,t=null!==oi&&null!==oi.next,ni=0,li=oi=ii=null,pi=!1,t)throw Error(n(300));return e}function bi(){var e=0!==ui;return ui=0,e}function gi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===li?ii.memoizedState=li=e:li=li.next=e,li}function yi(){if(null===oi){var e=ii.alternate;e=null!==e?e.memoizedState:null}else e=oi.next;var t=null===li?ii.memoizedState:li.next;if(null!==t)li=t,oi=e;else{if(null===e)throw Error(n(310));e={memoizedState:(oi=e).memoizedState,baseState:oi.baseState,baseQueue:oi.baseQueue,queue:oi.queue,next:null},null===li?ii.memoizedState=li=e:li=li.next=e}return li}function vi(e,t){return"function"==typeof t?t(e):t}function Ei(e){var t=yi(),s=t.queue;if(null===s)throw Error(n(311));s.lastRenderedReducer=e;var r=oi,a=r.baseQueue,i=s.pending;if(null!==i){if(null!==a){var o=a.next;a.next=i.next,i.next=o}r.baseQueue=a=i,s.pending=null}if(null!==a){i=a.next,r=r.baseState;var l=o=null,p=null,c=i;do{var u=c.lane;if((ni&u)===u)null!==p&&(p=p.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===p?(l=p=d,o=r):p=p.next=d,ii.lanes|=u,Ul|=u}c=c.next}while(null!==c&&c!==i);null===p?o=r:p.next=l,ir(r,t.memoizedState)||(vo=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=p,s.lastRenderedState=r}if(null!==(e=s.interleaved)){a=e;do{i=a.lane,ii.lanes|=i,Ul|=i,a=a.next}while(a!==e)}else null===a&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function _i(e){var t=yi(),s=t.queue;if(null===s)throw Error(n(311));s.lastRenderedReducer=e;var r=s.dispatch,a=s.pending,i=t.memoizedState;if(null!==a){s.pending=null;var o=a=a.next;do{i=e(i,o.action),o=o.next}while(o!==a);ir(i,t.memoizedState)||(vo=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),s.lastRenderedState=i}return[i,r]}function wi(){}function xi(e,t){var s=ii,r=yi(),a=t(),i=!ir(r.memoizedState,a);if(i&&(r.memoizedState=a,vo=!0),r=r.queue,Mi(Si.bind(null,s,r,e),[e]),r.getSnapshot!==t||i||null!==li&&1&li.memoizedState.tag){if(s.flags|=2048,Oi(9,ki.bind(null,s,r,a,t),void 0,null),null===Fl)throw Error(n(349));30&ni||Ni(s,t,a)}return a}function Ni(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},null===(t=ii.updateQueue)?(t={lastEffect:null,stores:null},ii.updateQueue=t,t.stores=[e]):null===(s=t.stores)?t.stores=[e]:s.push(e)}function ki(e,t,s,r){t.value=s,t.getSnapshot=r,Ci(t)&&Pi(e)}function Si(e,t,s){return s((function(){Ci(t)&&Pi(e)}))}function Ci(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!ir(e,s)}catch(e){return!0}}function Pi(e){var t=jn(e,1);null!==t&&sp(t,e,1,-1)}function Fi(e){var t=gi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t.queue=e,e=e.dispatch=Qi.bind(null,ii,e),[t.memoizedState,e]}function Oi(e,t,s,r){return e={tag:e,create:t,destroy:s,deps:r,next:null},null===(t=ii.updateQueue)?(t={lastEffect:null,stores:null},ii.updateQueue=t,t.lastEffect=e.next=e):null===(s=t.lastEffect)?t.lastEffect=e.next=e:(r=s.next,s.next=e,e.next=r,t.lastEffect=e),e}function Di(){return yi().memoizedState}function Ai(e,t,s,r){var a=gi();ii.flags|=e,a.memoizedState=Oi(1|t,s,void 0,void 0===r?null:r)}function Ti(e,t,s,r){var a=yi();r=void 0===r?null:r;var n=void 0;if(null!==oi){var i=oi.memoizedState;if(n=i.destroy,null!==r&&hi(r,i.deps))return void(a.memoizedState=Oi(t,s,n,r))}ii.flags|=e,a.memoizedState=Oi(1|t,s,n,r)}function ji(e,t){return Ai(8390656,8,e,t)}function Mi(e,t){return Ti(2048,8,e,t)}function Ui(e,t){return Ti(4,2,e,t)}function Ii(e,t){return Ti(4,4,e,t)}function $i(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 Vi(e,t,s){return s=null!=s?s.concat([e]):null,Ti(4,4,$i.bind(null,t,e),s)}function Ri(){}function Li(e,t){var s=yi();t=void 0===t?null:t;var r=s.memoizedState;return null!==r&&null!==t&&hi(t,r[1])?r[0]:(s.memoizedState=[e,t],e)}function Bi(e,t){var s=yi();t=void 0===t?null:t;var r=s.memoizedState;return null!==r&&null!==t&&hi(t,r[1])?r[0]:(e=e(),s.memoizedState=[e,t],e)}function zi(e,t,s){return 21&ni?(ir(s,t)||(s=ft(),ii.lanes|=s,Ul|=s,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,vo=!0),e.memoizedState=s)}function Wi(e,t){var s=vt;vt=0!==s&&4>s?s:4,e(!0);var r=ai.transition;ai.transition={};try{e(!1),t()}finally{vt=s,ai.transition=r}}function qi(){return yi().memoizedState}function Hi(e,t,s){var r=tp(e);if(s={lane:r,action:s,hasEagerState:!1,eagerState:null,next:null},Yi(e))Gi(t,s);else if(null!==(s=Tn(e,t,s,r))){sp(s,e,r,ep()),Ki(s,t,r)}}function Qi(e,t,s){var r=tp(e),a={lane:r,action:s,hasEagerState:!1,eagerState:null,next:null};if(Yi(e))Gi(t,a);else{var n=e.alternate;if(0===e.lanes&&(null===n||0===n.lanes)&&null!==(n=t.lastRenderedReducer))try{var i=t.lastRenderedState,o=n(i,s);if(a.hasEagerState=!0,a.eagerState=o,ir(o,i)){var l=t.interleaved;return null===l?(a.next=a,An(t)):(a.next=l.next,l.next=a),void(t.interleaved=a)}}catch(e){}null!==(s=Tn(e,t,a,r))&&(sp(s,e,r,a=ep()),Ki(s,t,r))}}function Yi(e){var t=e.alternate;return e===ii||null!==t&&t===ii}function Gi(e,t){ci=pi=!0;var s=e.pending;null===s?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Ki(e,t,s){if(4194240&s){var r=t.lanes;s|=r&=e.pendingLanes,t.lanes=s,yt(e,s)}}var Ji={readContext:On,useCallback:mi,useContext:mi,useEffect:mi,useImperativeHandle:mi,useInsertionEffect:mi,useLayoutEffect:mi,useMemo:mi,useReducer:mi,useRef:mi,useState:mi,useDebugValue:mi,useDeferredValue:mi,useTransition:mi,useMutableSource:mi,useSyncExternalStore:mi,useId:mi,unstable_isNewReconciler:!1},Xi={readContext:On,useCallback:function(e,t){return gi().memoizedState=[e,void 0===t?null:t],e},useContext:On,useEffect:ji,useImperativeHandle:function(e,t,s){return s=null!=s?s.concat([e]):null,Ai(4194308,4,$i.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ai(4,2,e,t)},useMemo:function(e,t){var s=gi();return t=void 0===t?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var r=gi();return t=void 0!==s?s(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Hi.bind(null,ii,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},gi().memoizedState=e},useState:Fi,useDebugValue:Ri,useDeferredValue:function(e){return gi().memoizedState=e},useTransition:function(){var e=Fi(!1),t=e[0];return e=Wi.bind(null,e[1]),gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var r=ii,a=gi();if(rn){if(void 0===s)throw Error(n(407));s=s()}else{if(s=t(),null===Fl)throw Error(n(349));30&ni||Ni(r,t,s)}a.memoizedState=s;var i={value:s,getSnapshot:t};return a.queue=i,ji(Si.bind(null,r,i,e),[e]),r.flags|=2048,Oi(9,ki.bind(null,r,i,s,t),void 0,null),s},useId:function(){var e=gi(),t=Fl.identifierPrefix;if(rn){var s=Ka;t=":"+t+"R"+(s=(Ga&~(1<<32-it(Ga)-1)).toString(32)+s),0<(s=ui++)&&(t+="H"+s.toString(32)),t+=":"}else t=":"+t+"r"+(s=di++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Zi={readContext:On,useCallback:Li,useContext:On,useEffect:Mi,useImperativeHandle:Vi,useInsertionEffect:Ui,useLayoutEffect:Ii,useMemo:Bi,useReducer:Ei,useRef:Di,useState:function(){return Ei(vi)},useDebugValue:Ri,useDeferredValue:function(e){return zi(yi(),oi.memoizedState,e)},useTransition:function(){return[Ei(vi)[0],yi().memoizedState]},useMutableSource:wi,useSyncExternalStore:xi,useId:qi,unstable_isNewReconciler:!1},eo={readContext:On,useCallback:Li,useContext:On,useEffect:Mi,useImperativeHandle:Vi,useInsertionEffect:Ui,useLayoutEffect:Ii,useMemo:Bi,useReducer:_i,useRef:Di,useState:function(){return _i(vi)},useDebugValue:Ri,useDeferredValue:function(e){var t=yi();return null===oi?t.memoizedState=e:zi(t,oi.memoizedState,e)},useTransition:function(){return[_i(vi)[0],yi().memoizedState]},useMutableSource:wi,useSyncExternalStore:xi,useId:qi,unstable_isNewReconciler:!1};function to(e,t){if(e&&e.defaultProps){for(var s in t=I({},t),e=e.defaultProps)void 0===t[s]&&(t[s]=e[s]);return t}return t}function so(e,t,s,r){s=null==(s=s(r,t=e.memoizedState))?t:I({},t,s),e.memoizedState=s,0===e.lanes&&(e.updateQueue.baseState=s)}var ro={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,s){e=e._reactInternals;var r=ep(),a=tp(e),n=$n(r,a);n.payload=t,null!=s&&(n.callback=s),null!==(t=Vn(e,n,a))&&(sp(t,e,a,r),Rn(t,e,a))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var r=ep(),a=tp(e),n=$n(r,a);n.tag=1,n.payload=t,null!=s&&(n.callback=s),null!==(t=Vn(e,n,a))&&(sp(t,e,a,r),Rn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=ep(),r=tp(e),a=$n(s,r);a.tag=2,null!=t&&(a.callback=t),null!==(t=Vn(e,a,r))&&(sp(t,e,r,s),Rn(t,e,r))}};function ao(e,t,s,r,a,n,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,n,i):!t.prototype||!t.prototype.isPureReactComponent||(!or(s,r)||!or(a,n))}function no(e,t,s){var r=!1,a=Sa,n=t.contextType;return"object"==typeof n&&null!==n?n=On(n):(a=Da(t)?Fa:Ca.current,n=(r=null!=(r=t.contextTypes))?Oa(e,a):Sa),t=new t(s,n),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ro,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=n),t}function io(e,t,s,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(s,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(s,r),t.state!==e&&ro.enqueueReplaceState(t,t.state,null)}function oo(e,t,s,r){var a=e.stateNode;a.props=s,a.state=e.memoizedState,a.refs={},Un(e);var n=t.contextType;"object"==typeof n&&null!==n?a.context=On(n):(n=Da(t)?Fa:Ca.current,a.context=Oa(e,n)),a.state=e.memoizedState,"function"==typeof(n=t.getDerivedStateFromProps)&&(so(e,t,n,s),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&ro.enqueueReplaceState(a,a.state,null),Bn(e,s,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4194308)}function lo(e,t){try{var s="",r=t;do{s+=L(r),r=r.return}while(r);var a=s}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a,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=$n(-1,s)).tag=3,s.payload={element:null};var r=t.value;return s.callback=function(){Wl||(Wl=!0,ql=r),co(0,t)},s}function ho(e,t,s){(s=$n(-1,s)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;s.payload=function(){return r(a)},s.callback=function(){co(0,t)}}var n=e.stateNode;return null!==n&&"function"==typeof n.componentDidCatch&&(s.callback=function(){co(0,t),"function"!=typeof r&&(null===Hl?Hl=new Set([this]):Hl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),s}function fo(e,t,s){var r=e.pingCache;if(null===r){r=e.pingCache=new uo;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(s)||(a.add(s),e=kp.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,r,a){return 1&e.mode?(e.flags|=65536,e.lanes=a,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=$n(-1,1)).tag=2,Vn(s,t,1))),s.lanes|=1),e)}var yo=E.ReactCurrentOwner,vo=!1;function Eo(e,t,s,r){t.child=null===e?_n(t,null,s,r):En(t,e.child,s,r)}function _o(e,t,s,r,a){s=s.render;var n=t.ref;return Fn(t,a),r=fi(e,t,s,r,n,a),s=bi(),null===e||vo?(rn&&s&&Za(t),t.flags|=1,Eo(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Wo(e,t,a))}function wo(e,t,s,r,a){if(null===e){var n=s.type;return"function"!=typeof n||Ap(n)||void 0!==n.defaultProps||null!==s.compare||void 0!==s.defaultProps?((e=jp(s.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=n,xo(e,t,n,r,a))}if(n=e.child,!(e.lanes&a)){var i=n.memoizedProps;if((s=null!==(s=s.compare)?s:or)(i,r)&&e.ref===t.ref)return Wo(e,t,a)}return t.flags|=1,(e=Tp(n,r)).ref=t.ref,e.return=t,t.child=e}function xo(e,t,s,r,a){if(null!==e){var n=e.memoizedProps;if(or(n,r)&&e.ref===t.ref){if(vo=!1,t.pendingProps=r=n,!(e.lanes&a))return t.lanes=e.lanes,Wo(e,t,a);131072&e.flags&&(vo=!0)}}return So(e,t,s,r,a)}function No(e,t,s){var r=t.pendingProps,a=r.children,n=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&s))return e=null!==n?n.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ka(Tl,Al),Al|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==n?n.baseLanes:s,ka(Tl,Al),Al|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ka(Tl,Al),Al|=s;else null!==n?(r=n.baseLanes|s,t.memoizedState=null):r=s,ka(Tl,Al),Al|=r;return Eo(e,t,a,s),t.child}function ko(e,t){var s=t.ref;(null===e&&null!==s||null!==e&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function So(e,t,s,r,a){var n=Da(s)?Fa:Ca.current;return n=Oa(t,n),Fn(t,a),s=fi(e,t,s,r,n,a),r=bi(),null===e||vo?(rn&&r&&Za(t),t.flags|=1,Eo(e,t,s,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Wo(e,t,a))}function Co(e,t,s,r,a){if(Da(s)){var n=!0;Ma(t)}else n=!1;if(Fn(t,a),null===t.stateNode)zo(e,t),no(t,s,r),oo(t,s,r,a),r=!0;else if(null===e){var i=t.stateNode,o=t.memoizedProps;i.props=o;var l=i.context,p=s.contextType;"object"==typeof p&&null!==p?p=On(p):p=Oa(t,p=Da(s)?Fa:Ca.current);var c=s.getDerivedStateFromProps,u="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(o!==r||l!==p)&&io(t,i,r,p),Mn=!1;var d=t.memoizedState;i.state=d,Bn(t,r,i,a),l=t.memoizedState,o!==r||d!==l||Pa.current||Mn?("function"==typeof c&&(so(t,s,c,r),l=t.memoizedState),(o=Mn||ao(t,s,o,r,d,l,p))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=p,r=o):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,In(e,t),o=t.memoizedProps,p=t.type===t.elementType?o:to(t.type,o),i.props=p,u=t.pendingProps,d=i.context,"object"==typeof(l=s.contextType)&&null!==l?l=On(l):l=Oa(t,l=Da(s)?Fa:Ca.current);var m=s.getDerivedStateFromProps;(c="function"==typeof m||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(o!==u||d!==l)&&io(t,i,r,l),Mn=!1,d=t.memoizedState,i.state=d,Bn(t,r,i,a);var h=t.memoizedState;o!==u||d!==h||Pa.current||Mn?("function"==typeof m&&(so(t,s,m,r),h=t.memoizedState),(p=Mn||ao(t,s,p,r,d,h,l)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=p):("function"!=typeof i.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Po(e,t,s,r,n,a)}function Po(e,t,s,r,a,n){ko(e,t);var i=!!(128&t.flags);if(!r&&!i)return a&&Ua(t,s,!1),Wo(e,t,n);r=t.stateNode,yo.current=t;var o=i&&"function"!=typeof s.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=En(t,e.child,null,n),t.child=En(t,null,o,n)):Eo(e,t,o,n),t.memoizedState=r.state,a&&Ua(t,s,!0),t.child}function Fo(e){var t=e.stateNode;t.pendingContext?Ta(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ta(0,t.context,!1),Gn(e,t.containerInfo)}function Oo(e,t,s,r,a){return mn(),hn(a),t.flags|=256,Eo(e,t,s,r),t.child}var Do,Ao,To,jo,Mo={dehydrated:null,treeContext:null,retryLane:0};function Uo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Io(e,t,s){var r,a=t.pendingProps,i=Zn.current,o=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&i)),r?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),ka(Zn,1&i),null===e)return pn(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=a.children,e=a.fallback,o?(a=t.mode,o=t.child,l={mode:"hidden",children:l},1&a||null===o?o=Up(l,a,0,null):(o.childLanes=0,o.pendingProps=l),e=Mp(e,a,s,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Uo(s),t.memoizedState=Mo,e):$o(t,l));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,s,r,a,i,o){if(s)return 256&t.flags?(t.flags&=-257,Vo(e,t,o,r=po(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=Up({mode:"visible",children:r.children},a,0,null),(i=Mp(i,a,o,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,1&t.mode&&En(t,e.child,null,o),t.child.memoizedState=Uo(o),t.memoizedState=Mo,i);if(!(1&t.mode))return Vo(e,t,o,null);if("$!"===a.data){if(r=a.nextSibling&&a.nextSibling.dataset)var l=r.dgst;return r=l,Vo(e,t,o,r=po(i=Error(n(419)),r,void 0))}if(l=!!(o&e.childLanes),vo||l){if(null!==(r=Fl)){switch(o&-o){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(a=a&(r.suspendedLanes|o)?0:a)&&a!==i.retryLane&&(i.retryLane=a,jn(e,a),sp(r,e,a,-1))}return fp(),Vo(e,t,o,r=po(Error(n(421))))}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=Cp.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,sn=la(a.nextSibling),tn=t,rn=!0,an=null,null!==e&&(Ha[Qa++]=Ga,Ha[Qa++]=Ka,Ha[Qa++]=Ya,Ga=e.id,Ka=e.overflow,Ya=t),t=$o(t,r.children),t.flags|=4096,t)}(e,t,l,a,r,i,s);if(o){o=a.fallback,l=t.mode,r=(i=e.child).sibling;var p={mode:"hidden",children:a.children};return 1&l||t.child===i?(a=Tp(i,p)).subtreeFlags=14680064&i.subtreeFlags:((a=t.child).childLanes=0,a.pendingProps=p,t.deletions=null),null!==r?o=Tp(r,o):(o=Mp(o,l,s,null)).flags|=2,o.return=t,a.return=t,a.sibling=o,t.child=a,a=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=Mo,a}return e=(o=e.child).sibling,a=Tp(o,{mode:"visible",children:a.children}),!(1&t.mode)&&(a.lanes=s),a.return=t,a.sibling=null,null!==e&&(null===(s=t.deletions)?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=a,t.memoizedState=null,a}function $o(e,t){return(t=Up({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Vo(e,t,s,r){return null!==r&&hn(r),En(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 r=e.alternate;null!==r&&(r.lanes|=t),Pn(e.return,t,s)}function Lo(e,t,s,r,a){var n=e.memoizedState;null===n?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:s,tailMode:a}:(n.isBackwards=t,n.rendering=null,n.renderingStartTime=0,n.last=r,n.tail=s,n.tailMode=a)}function Bo(e,t,s){var r=t.pendingProps,a=r.revealOrder,n=r.tail;if(Eo(e,t,r.children,s),2&(r=Zn.current))r=1&r|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}r&=1}if(ka(Zn,r),1&t.mode)switch(a){case"forwards":for(s=t.child,a=null;null!==s;)null!==(e=s.alternate)&&null===ei(e)&&(a=s),s=s.sibling;null===(s=a)?(a=t.child,t.child=null):(a=s.sibling,s.sibling=null),Lo(t,!1,a,s,n);break;case"backwards":for(s=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===ei(e)){t.child=a;break}e=a.sibling,a.sibling=s,s=a,a=e}Lo(t,!0,s,null,n);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,!(s&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(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 qo(e,t){if(!rn)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 r=null;null!==s;)null!==s.alternate&&(r=s),s=s.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ho(e){var t=null!==e.alternate&&e.alternate.child===e.child,s=0,r=0;if(t)for(var a=e.child;null!==a;)s|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)s|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=s,t}function Qo(e,t,s){var r=t.pendingProps;switch(en(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ho(t),null;case 1:case 17:return Da(t.type)&&Aa(),Ho(t),null;case 3:return r=t.stateNode,Kn(),Na(Pa),Na(Ca),si(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(un(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==an&&(ip(an),an=null))),Ao(e,t),Ho(t),null;case 5:Xn(t);var a=Yn(Qn.current);if(s=t.type,null!==e&&null!=t.stateNode)To(e,t,s,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(n(166));return Ho(t),null}if(e=Yn(qn.current),un(t)){r=t.stateNode,s=t.type;var i=t.memoizedProps;switch(r[ua]=t,r[da]=i,e=!!(1&t.mode),s){case"dialog":$r("cancel",r),$r("close",r);break;case"iframe":case"object":case"embed":$r("load",r);break;case"video":case"audio":for(a=0;a<jr.length;a++)$r(jr[a],r);break;case"source":$r("error",r);break;case"img":case"image":case"link":$r("error",r),$r("load",r);break;case"details":$r("toggle",r);break;case"input":K(r,i),$r("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},$r("invalid",r);break;case"textarea":ae(r,i),$r("invalid",r)}for(var l in ye(s,i),a=null,i)if(i.hasOwnProperty(l)){var p=i[l];"children"===l?"string"==typeof p?r.textContent!==p&&(!0!==i.suppressHydrationWarning&&Jr(r.textContent,p,e),a=["children",p]):"number"==typeof p&&r.textContent!==""+p&&(!0!==i.suppressHydrationWarning&&Jr(r.textContent,p,e),a=["children",""+p]):o.hasOwnProperty(l)&&null!=p&&"onScroll"===l&&$r("scroll",r)}switch(s){case"input":H(r),Z(r,i,!0);break;case"textarea":H(r),ie(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=Xr)}r=a,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===a.nodeType?a:a.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 r.is?e=l.createElement(s,{is:r.is}):(e=l.createElement(s),"select"===s&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,s),e[ua]=t,e[da]=r,Do(e,t,!1,!1),t.stateNode=e;e:{switch(l=ve(s,r),s){case"dialog":$r("cancel",e),$r("close",e),a=r;break;case"iframe":case"object":case"embed":$r("load",e),a=r;break;case"video":case"audio":for(a=0;a<jr.length;a++)$r(jr[a],e);a=r;break;case"source":$r("error",e),a=r;break;case"img":case"image":case"link":$r("error",e),$r("load",e),a=r;break;case"details":$r("toggle",e),a=r;break;case"input":K(e,r),a=G(e,r),$r("invalid",e);break;case"option":default:a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=I({},r,{value:void 0}),$r("invalid",e);break;case"textarea":ae(e,r),a=re(e,r),$r("invalid",e)}for(i in ye(s,a),p=a)if(p.hasOwnProperty(i)){var c=p[i];"style"===i?be(e,c):"dangerouslySetInnerHTML"===i?null!=(c=c?c.__html:void 0)&&ue(e,c):"children"===i?"string"==typeof c?("textarea"!==s||""!==c)&&de(e,c):"number"==typeof c&&de(e,""+c):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(o.hasOwnProperty(i)?null!=c&&"onScroll"===i&&$r("scroll",e):null!=c&&v(e,i,c,l))}switch(s){case"input":H(e),Z(e,r,!1);break;case"textarea":H(e),ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?se(e,!!r.multiple,i,!1):null!=r.defaultValue&&se(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=Xr)}switch(s){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ho(t),null;case 6:if(e&&null!=t.stateNode)jo(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(n(166));if(s=Yn(Qn.current),Yn(qn.current),un(t)){if(r=t.stateNode,s=t.memoizedProps,r[ua]=t,(i=r.nodeValue!==s)&&null!==(e=tn))switch(e.tag){case 3:Jr(r.nodeValue,s,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,s,!!(1&e.mode))}i&&(t.flags|=4)}else(r=(9===s.nodeType?s:s.ownerDocument).createTextNode(r))[ua]=t,t.stateNode=r}return Ho(t),null;case 13:if(Na(Zn),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(rn&&null!==sn&&1&t.mode&&!(128&t.flags))dn(),mn(),t.flags|=98560,i=!1;else if(i=un(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(n(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(n(317));i[ua]=t}else mn(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ho(t),i=!1}else null!==an&&(ip(an),an=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=s,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Zn.current?0===jl&&(jl=3):fp())),null!==t.updateQueue&&(t.flags|=4),Ho(t),null);case 4:return Kn(),Ao(e,t),null===e&&Lr(t.stateNode.containerInfo),Ho(t),null;case 10:return Cn(t.type._context),Ho(t),null;case 19:if(Na(Zn),null===(i=t.memoizedState))return Ho(t),null;if(r=!!(128&t.flags),null===(l=i.rendering))if(r)qo(i,!1);else{if(0!==jl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ei(e))){for(t.flags|=128,qo(i,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=s,s=t.child;null!==s;)e=r,(i=s).flags&=14680066,null===(l=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return ka(Zn,1&Zn.current|2),t.child}e=e.sibling}null!==i.tail&&Je()>Bl&&(t.flags|=128,r=!0,qo(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ei(l))){if(t.flags|=128,r=!0,null!==(s=e.updateQueue)&&(t.updateQueue=s,t.flags|=4),qo(i,!0),null===i.tail&&"hidden"===i.tailMode&&!l.alternate&&!rn)return Ho(t),null}else 2*Je()-i.renderingStartTime>Bl&&1073741824!==s&&(t.flags|=128,r=!0,qo(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(null!==(s=i.last)?s.sibling=l:t.child=l,i.last=l)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,s=Zn.current,ka(Zn,r?1&s|2:1&s),t):(Ho(t),null);case 22:case 23:return up(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Al)&&(Ho(t),6&t.subtreeFlags&&(t.flags|=8192)):Ho(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function Yo(e,t){switch(en(t),t.tag){case 1:return Da(t.type)&&Aa(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Kn(),Na(Pa),Na(Ca),si(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xn(t),null;case 13:if(Na(Zn),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));mn()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Na(Zn),null;case 4:return Kn(),null;case 10:return Cn(t.type._context),null;case 22:case 23:return up(),null;default:return null}}Do=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,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Yn(qn.current);var n,i=null;switch(s){case"input":a=G(e,a),r=G(e,r),i=[];break;case"select":a=I({},a,{value:void 0}),r=I({},r,{value:void 0}),i=[];break;case"textarea":a=re(e,a),r=re(e,r),i=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=Xr)}for(c in ye(s,r),s=null,a)if(!r.hasOwnProperty(c)&&a.hasOwnProperty(c)&&null!=a[c])if("style"===c){var l=a[c];for(n in l)l.hasOwnProperty(n)&&(s||(s={}),s[n]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(o.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var p=r[c];if(l=null!=a?a[c]:void 0,r.hasOwnProperty(c)&&p!==l&&(null!=p||null!=l))if("style"===c)if(l){for(n in l)!l.hasOwnProperty(n)||p&&p.hasOwnProperty(n)||(s||(s={}),s[n]="");for(n in p)p.hasOwnProperty(n)&&l[n]!==p[n]&&(s||(s={}),s[n]=p[n])}else s||(i||(i=[]),i.push(c,s)),s=p;else"dangerouslySetInnerHTML"===c?(p=p?p.__html:void 0,l=l?l.__html:void 0,null!=p&&l!==p&&(i=i||[]).push(c,p)):"children"===c?"string"!=typeof p&&"number"!=typeof p||(i=i||[]).push(c,""+p):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(o.hasOwnProperty(c)?(null!=p&&"onScroll"===c&&$r("scroll",e),i||l===p||(i=[])):(i=i||[]).push(c,p))}s&&(i=i||[]).push("style",s);var c=i;(t.updateQueue=c)&&(t.flags|=4)}},jo=function(e,t,s,r){s!==r&&(t.flags|=4)};var Go=!1,Ko=!1,Jo="function"==typeof WeakSet?WeakSet:Set,Xo=null;function Zo(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 r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var n=a.destroy;a.destroy=void 0,void 0!==n&&el(t,s,n)}a=a.next}while(a!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var s=t=t.next;do{if((s.tag&e)===e){var r=s.create;s.destroy=r()}s=s.next}while(s!==t)}}function al(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 nl(e){var t=e.alternate;null!==t&&(e.alternate=null,nl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ua],delete t[da],delete t[ha],delete t[fa],delete t[ba])),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 il(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||il(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 r=e.tag;if(5===r||6===r)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=Xr));else if(4!==r&&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 r=e.tag;if(5===r||6===r)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(4!==r&&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(nt&&"function"==typeof nt.onCommitFiberUnmount)try{nt.onCommitFiberUnmount(at,s)}catch(e){}switch(s.tag){case 5:Ko||Zo(s,t);case 6:var r=cl,a=ul;cl=null,dl(e,t,s),ul=a,null!==(cl=r)&&(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?oa(e.parentNode,s):1===e.nodeType&&oa(e,s),Bt(e)):oa(cl,s.stateNode));break;case 4:r=cl,a=ul,cl=s.stateNode.containerInfo,ul=!0,dl(e,t,s),cl=r,ul=a;break;case 0:case 11:case 14:case 15:if(!Ko&&(null!==(r=s.updateQueue)&&null!==(r=r.lastEffect))){a=r=r.next;do{var n=a,i=n.destroy;n=n.tag,void 0!==i&&(2&n||4&n)&&el(s,t,i),a=a.next}while(a!==r)}dl(e,t,s);break;case 1:if(!Ko&&(Zo(s,t),"function"==typeof(r=s.stateNode).componentWillUnmount))try{r.props=s.memoizedProps,r.state=s.memoizedState,r.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=(r=Ko)||null!==s.memoizedState,dl(e,t,s),Ko=r):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 r=Pp.bind(null,e,t);s.has(t)||(s.add(t),t.then(r,r))}))}}function fl(e,t){var s=t.deletions;if(null!==s)for(var r=0;r<s.length;r++){var a=s[r];try{var i=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(n(160));ml(i,o,a),cl=null,ul=!1;var p=a.alternate;null!==p&&(p.return=null),a.return=null}catch(e){Np(a,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,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),gl(e),4&r){try{sl(3,e,e.return),rl(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&r&&null!==s&&Zo(s,s.return);break;case 5:if(fl(t,e),gl(e),512&r&&null!==s&&Zo(s,s.return),32&e.flags){var a=e.stateNode;try{de(a,"")}catch(t){Np(e,e.return,t)}}if(4&r&&null!=(a=e.stateNode)){var i=e.memoizedProps,o=null!==s?s.memoizedProps:i,l=e.type,p=e.updateQueue;if(e.updateQueue=null,null!==p)try{"input"===l&&"radio"===i.type&&null!=i.name&&J(a,i),ve(l,o);var c=ve(l,i);for(o=0;o<p.length;o+=2){var u=p[o],d=p[o+1];"style"===u?be(a,d):"dangerouslySetInnerHTML"===u?ue(a,d):"children"===u?de(a,d):v(a,u,d,c)}switch(l){case"input":X(a,i);break;case"textarea":ne(a,i);break;case"select":var m=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var h=i.value;null!=h?se(a,!!i.multiple,h,!1):m!==!!i.multiple&&(null!=i.defaultValue?se(a,!!i.multiple,i.defaultValue,!0):se(a,!!i.multiple,i.multiple?[]:"",!1))}a[da]=i}catch(t){Np(e,e.return,t)}}break;case 6:if(fl(t,e),gl(e),4&r){if(null===e.stateNode)throw Error(n(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(t){Np(e,e.return,t)}}break;case 3:if(fl(t,e),gl(e),4&r&&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&(a=e.child).flags&&(i=null!==a.memoizedState,a.stateNode.isHidden=i,!i||null!==a.alternate&&null!==a.alternate.memoizedState||(Ll=Je())),4&r&&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&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Xo=e,u=e.child;null!==u;){for(d=Xo=u;null!==Xo;){switch(h=(m=Xo).child,m.tag){case 0:case 11:case 14:case 15:sl(4,m,m.return);break;case 1:Zo(m,m.return);var f=m.stateNode;if("function"==typeof f.componentWillUnmount){r=m,s=m.return;try{t=r,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(e){Np(r,s,e)}}break;case 5:Zo(m,m.return);break;case 22:if(null!==m.memoizedState){_l(d);continue}}null!==h?(h.return=m,Xo=h):_l(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{a=d.stateNode,c?"function"==typeof(i=a.style).setProperty?i.setProperty("display","none","important"):i.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&r&&hl(e);case 21:}}function gl(e){var t=e.flags;if(2&t){try{e:{for(var s=e.return;null!==s;){if(il(s)){var r=s;break e}s=s.return}throw Error(n(160))}switch(r.tag){case 5:var a=r.stateNode;32&r.flags&&(de(a,""),r.flags&=-33),pl(e,ol(e),a);break;case 3:case 4:var i=r.stateNode.containerInfo;ll(e,ol(e),i);break;default:throw Error(n(161))}}catch(t){Np(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,s){Xo=e,vl(e,t,s)}function vl(e,t,s){for(var r=!!(1&e.mode);null!==Xo;){var a=Xo,n=a.child;if(22===a.tag&&r){var i=null!==a.memoizedState||Go;if(!i){var o=a.alternate,l=null!==o&&null!==o.memoizedState||Ko;o=Go;var p=Ko;if(Go=i,(Ko=l)&&!p)for(Xo=a;null!==Xo;)l=(i=Xo).child,22===i.tag&&null!==i.memoizedState?wl(a):null!==l?(l.return=i,Xo=l):wl(a);for(;null!==n;)Xo=n,vl(n,t,s),n=n.sibling;Xo=a,Go=o,Ko=p}El(e)}else 8772&a.subtreeFlags&&null!==n?(n.return=a,Xo=n):El(e)}}function El(e){for(;null!==Xo;){var t=Xo;if(8772&t.flags){var s=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ko||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ko)if(null===s)r.componentDidMount();else{var a=t.elementType===t.type?s.memoizedProps:to(t.type,s.memoizedProps);r.componentDidUpdate(a,s.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&zn(t,i,r);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}zn(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(n(163))}Ko||512&t.flags&&al(t)}catch(e){Np(t,t.return,e)}}if(t===e){Xo=null;break}if(null!==(s=t.sibling)){s.return=t.return,Xo=s;break}Xo=t.return}}function _l(e){for(;null!==Xo;){var t=Xo;if(t===e){Xo=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xo=s;break}Xo=t.return}}function wl(e){for(;null!==Xo;){var t=Xo;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{rl(4,t)}catch(e){Np(t,s,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var a=t.return;try{r.componentDidMount()}catch(e){Np(t,a,e)}}var n=t.return;try{al(t)}catch(e){Np(t,n,e)}break;case 5:var i=t.return;try{al(t)}catch(e){Np(t,i,e)}}}catch(e){Np(t,t.return,e)}if(t===e){Xo=null;break}var o=t.sibling;if(null!==o){o.return=t.return,Xo=o;break}Xo=t.return}}var xl,Nl=Math.ceil,kl=E.ReactCurrentDispatcher,Sl=E.ReactCurrentOwner,Cl=E.ReactCurrentBatchConfig,Pl=0,Fl=null,Ol=null,Dl=0,Al=0,Tl=xa(0),jl=0,Ml=null,Ul=0,Il=0,$l=0,Vl=null,Rl=null,Ll=0,Bl=1/0,zl=null,Wl=!1,ql=null,Hl=null,Ql=!1,Yl=null,Gl=0,Kl=0,Jl=null,Xl=-1,Zl=0;function ep(){return 6&Pl?Je():-1!==Xl?Xl:Xl=Je()}function tp(e){return 1&e.mode?2&Pl&&0!==Dl?Dl&-Dl:null!==fn.transition?(0===Zl&&(Zl=ft()),Zl):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Kt(e.type):1}function sp(e,t,s,r){if(50<Kl)throw Kl=0,Jl=null,Error(n(185));gt(e,s,r),2&Pl&&e===Fl||(e===Fl&&(!(2&Pl)&&(Il|=s),4===jl&&op(e,Dl)),rp(e,r),1===s&&0===Pl&&!(1&t.mode)&&(Bl=Je()+500,$a&&La()))}function rp(e,t){var s=e.callbackNode;!function(e,t){for(var s=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,n=e.pendingLanes;0<n;){var i=31-it(n),o=1<<i,l=a[i];-1===l?o&s&&!(o&r)||(a[i]=mt(o,t)):l<=t&&(e.expiredLanes|=o),n&=~o}}(e,t);var r=dt(e,e===Fl?Dl:0);if(0===r)null!==s&&Ye(s),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=s&&Ye(s),1===t)0===e.tag?function(e){$a=!0,Ra(e)}(lp.bind(null,e)):Ra(lp.bind(null,e)),na((function(){!(6&Pl)&&La()})),s=null;else{switch(Et(r)){case 1:s=Ze;break;case 4:s=et;break;case 16:default:s=tt;break;case 536870912:s=rt}s=Fp(s,ap.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function ap(e,t){if(Xl=-1,Zl=0,6&Pl)throw Error(n(327));var s=e.callbackNode;if(wp()&&e.callbackNode!==s)return null;var r=dt(e,e===Fl?Dl:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=bp(e,r);else{t=r;var a=Pl;Pl|=2;var i=hp();for(Fl===e&&Dl===t||(zl=null,Bl=Je()+500,dp(e,t));;)try{yp();break}catch(t){mp(e,t)}Sn(),kl.current=i,Pl=a,null!==Ol?t=0:(Fl=null,Dl=0,t=jl)}if(0!==t){if(2===t&&(0!==(a=ht(e))&&(r=a,t=np(e,a))),1===t)throw s=Ml,dp(e,0),op(e,r),rp(e,Je()),s;if(6===t)op(e,r);else{if(a=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var s=t.updateQueue;if(null!==s&&null!==(s=s.stores))for(var r=0;r<s.length;r++){var a=s[r],n=a.getSnapshot;a=a.value;try{if(!ir(n(),a))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}(a)||(t=bp(e,r),2===t&&(i=ht(e),0!==i&&(r=i,t=np(e,i))),1!==t)))throw s=Ml,dp(e,0),op(e,r),rp(e,Je()),s;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(n(345));case 2:case 5:_p(e,Rl,zl);break;case 3:if(op(e,r),(130023424&r)===r&&10<(t=Ll+500-Je())){if(0!==dt(e,0))break;if(((a=e.suspendedLanes)&r)!==r){ep(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=sa(_p.bind(null,e,Rl,zl),t);break}_p(e,Rl,zl);break;case 4:if(op(e,r),(4194240&r)===r)break;for(t=e.eventTimes,a=-1;0<r;){var o=31-it(r);i=1<<o,(o=t[o])>a&&(a=o),r&=~i}if(r=a,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nl(r/1960))-r)){e.timeoutHandle=sa(_p.bind(null,e,Rl,zl),r);break}_p(e,Rl,zl);break;default:throw Error(n(329))}}}return rp(e,Je()),e.callbackNode===s?ap.bind(null,e):null}function np(e,t){var s=Vl;return e.current.memoizedState.isDehydrated&&(dp(e,t).flags|=256),2!==(e=bp(e,t))&&(t=Rl,Rl=s,null!==t&&ip(t)),e}function ip(e){null===Rl?Rl=e:Rl.push.apply(Rl,e)}function op(e,t){for(t&=~$l,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-it(t),r=1<<s;e[s]=-1,t&=~r}}function lp(e){if(6&Pl)throw Error(n(327));wp();var t=dt(e,0);if(!(1&t))return rp(e,Je()),null;var s=bp(e,t);if(0!==e.tag&&2===s){var r=ht(e);0!==r&&(t=r,s=np(e,r))}if(1===s)throw s=Ml,dp(e,0),op(e,t),rp(e,Je()),s;if(6===s)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_p(e,Rl,zl),rp(e,Je()),null}function pp(e,t){var s=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=s)&&(Bl=Je()+500,$a&&La())}}function cp(e){null!==Yl&&0===Yl.tag&&!(6&Pl)&&wp();var t=Pl;Pl|=1;var s=Cl.transition,r=vt;try{if(Cl.transition=null,vt=1,e)return e()}finally{vt=r,Cl.transition=s,!(6&(Pl=t))&&La()}}function up(){Al=Tl.current,Na(Tl)}function dp(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(-1!==s&&(e.timeoutHandle=-1,ra(s)),null!==Ol)for(s=Ol.return;null!==s;){var r=s;switch(en(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Aa();break;case 3:Kn(),Na(Pa),Na(Ca),si();break;case 5:Xn(r);break;case 4:Kn();break;case 13:case 19:Na(Zn);break;case 10:Cn(r.type._context);break;case 22:case 23:up()}s=s.return}if(Fl=e,Ol=e=Tp(e.current,null),Dl=Al=t,jl=0,Ml=null,$l=Il=Ul=0,Rl=Vl=null,null!==Dn){for(t=0;t<Dn.length;t++)if(null!==(r=(s=Dn[t]).interleaved)){s.interleaved=null;var a=r.next,n=s.pending;if(null!==n){var i=n.next;n.next=a,r.next=i}s.pending=r}Dn=null}return e}function mp(e,t){for(;;){var s=Ol;try{if(Sn(),ri.current=Ji,pi){for(var r=ii.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}pi=!1}if(ni=0,li=oi=ii=null,ci=!1,ui=0,Sl.current=null,null===s||null===s.return){jl=1,Ml=t,Ol=null;break}e:{var i=e,o=s.return,l=s,p=t;if(t=Dl,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(i,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(i,c,t),fp();break e}p=Error(n(426))}else if(rn&&1&l.mode){var g=bo(o);if(null!==g){!(65536&g.flags)&&(g.flags|=256),go(g,o,l,0,t),hn(lo(p,l));break e}}i=p=lo(p,l),4!==jl&&(jl=2),null===Vl?Vl=[i]:Vl.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Ln(i,mo(0,p,t));break e;case 1:l=p;var y=i.type,v=i.stateNode;if(!(128&i.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==Hl&&Hl.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t,Ln(i,ho(i,l,t));break e}}i=i.return}while(null!==i)}Ep(s)}catch(e){t=e,Ol===s&&null!==s&&(Ol=s=s.return);continue}break}}function hp(){var e=kl.current;return kl.current=Ji,null===e?Ji:e}function fp(){0!==jl&&3!==jl&&2!==jl||(jl=4),null===Fl||!(268435455&Ul)&&!(268435455&Il)||op(Fl,Dl)}function bp(e,t){var s=Pl;Pl|=2;var r=hp();for(Fl===e&&Dl===t||(zl=null,dp(e,t));;)try{gp();break}catch(t){mp(e,t)}if(Sn(),Pl=s,kl.current=r,null!==Ol)throw Error(n(261));return Fl=null,Dl=0,jl}function gp(){for(;null!==Ol;)vp(Ol)}function yp(){for(;null!==Ol&&!Ge();)vp(Ol)}function vp(e){var t=xl(e.alternate,e,Al);e.memoizedProps=e.pendingProps,null===t?Ep(e):Ol=t,Sl.current=null}function Ep(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(Ol=s);if(null===e)return jl=6,void(Ol=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(s=Qo(s,t,Al)))return void(Ol=s);if(null!==(t=t.sibling))return void(Ol=t);Ol=t=e}while(null!==t);0===jl&&(jl=5)}function _p(e,t,s){var r=vt,a=Cl.transition;try{Cl.transition=null,vt=1,function(e,t,s,r){do{wp()}while(null!==Yl);if(6&Pl)throw Error(n(327));s=e.finishedWork;var a=e.finishedLanes;if(null===s)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var i=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 r=e.eventTimes;for(e=e.expirationTimes;0<s;){var a=31-it(s),n=1<<a;t[a]=0,r[a]=-1,e[a]=-1,s&=~n}}(e,i),e===Fl&&(Ol=Fl=null,Dl=0),!(2064&s.subtreeFlags)&&!(2064&s.flags)||Ql||(Ql=!0,Fp(tt,(function(){return wp(),null}))),i=!!(15990&s.flags),!!(15990&s.subtreeFlags)||i){i=Cl.transition,Cl.transition=null;var o=vt;vt=1;var l=Pl;Pl|=4,Sl.current=null,function(e,t){if(Zr=Wt,dr(e=ur())){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(s=(s=e.ownerDocument)&&s.defaultView||window).getSelection&&s.getSelection();if(r&&0!==r.rangeCount){s=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{s.nodeType,i.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!==a&&3!==d.nodeType||(l=o+a),d!==i||0!==r&&3!==d.nodeType||(p=o+r),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===a&&(l=o),m===i&&++u===r&&(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(ea={focusedElem:e,selectionRange:s},Wt=!1,Xo=t;null!==Xo;)if(e=(t=Xo).child,1028&t.subtreeFlags&&null!==e)e.return=t,Xo=e;else for(;null!==Xo;){t=Xo;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,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?b:to(t.type,b),g);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var E=t.stateNode.containerInfo;1===E.nodeType?E.textContent="":9===E.nodeType&&E.documentElement&&E.removeChild(E.documentElement);break;default:throw Error(n(163))}}catch(e){Np(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Xo=e;break}Xo=t.return}f=tl,tl=!1}(e,s),bl(s,e),mr(ea),Wt=!!Zr,ea=Zr=null,e.current=s,yl(s,e,a),Ke(),Pl=l,vt=o,Cl.transition=i}else e.current=s;if(Ql&&(Ql=!1,Yl=e,Gl=a),i=e.pendingLanes,0===i&&(Hl=null),function(e){if(nt&&"function"==typeof nt.onCommitFiberRoot)try{nt.onCommitFiberRoot(at,e,void 0,!(128&~e.current.flags))}catch(e){}}(s.stateNode),rp(e,Je()),null!==t)for(r=e.onRecoverableError,s=0;s<t.length;s++)a=t[s],r(a.value,{componentStack:a.stack,digest:a.digest});if(Wl)throw Wl=!1,e=ql,ql=null,e;!!(1&Gl)&&0!==e.tag&&wp(),i=e.pendingLanes,1&i?e===Jl?Kl++:(Kl=0,Jl=e):Kl=0,La()}(e,t,s,r)}finally{Cl.transition=a,vt=r}return null}function wp(){if(null!==Yl){var e=Et(Gl),t=Cl.transition,s=vt;try{if(Cl.transition=null,vt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,Gl=0,6&Pl)throw Error(n(331));var a=Pl;for(Pl|=4,Xo=e.current;null!==Xo;){var i=Xo,o=i.child;if(16&Xo.flags){var l=i.deletions;if(null!==l){for(var p=0;p<l.length;p++){var c=l[p];for(Xo=c;null!==Xo;){var u=Xo;switch(u.tag){case 0:case 11:case 15:sl(8,u,i)}var d=u.child;if(null!==d)d.return=u,Xo=d;else for(;null!==Xo;){var m=(u=Xo).sibling,h=u.return;if(nl(u),u===c){Xo=null;break}if(null!==m){m.return=h,Xo=m;break}Xo=h}}}var f=i.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)}}Xo=i}}if(2064&i.subtreeFlags&&null!==o)o.return=i,Xo=o;else e:for(;null!==Xo;){if(2048&(i=Xo).flags)switch(i.tag){case 0:case 11:case 15:sl(9,i,i.return)}var y=i.sibling;if(null!==y){y.return=i.return,Xo=y;break e}Xo=i.return}}var v=e.current;for(Xo=v;null!==Xo;){var E=(o=Xo).child;if(2064&o.subtreeFlags&&null!==E)E.return=o,Xo=E;else e:for(o=v;null!==Xo;){if(2048&(l=Xo).flags)try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(e){Np(l,l.return,e)}if(l===o){Xo=null;break e}var _=l.sibling;if(null!==_){_.return=l.return,Xo=_;break e}Xo=l.return}}if(Pl=a,La(),nt&&"function"==typeof nt.onPostCommitFiberRoot)try{nt.onPostCommitFiberRoot(at,e)}catch(e){}r=!0}return r}finally{vt=s,Cl.transition=t}}return!1}function xp(e,t,s){e=Vn(e,t=mo(0,t=lo(s,t),1),1),t=ep(),null!==e&&(gt(e,1,t),rp(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 r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Hl||!Hl.has(r))){t=Vn(t,e=ho(t,e=lo(s,e),1),1),e=ep(),null!==t&&(gt(t,1,e),rp(t,e));break}}t=t.return}}function kp(e,t,s){var r=e.pingCache;null!==r&&r.delete(t),t=ep(),e.pingedLanes|=e.suspendedLanes&s,Fl===e&&(Dl&s)===s&&(4===jl||3===jl&&(130023424&Dl)===Dl&&500>Je()-Ll?dp(e,0):$l|=s),rp(e,t)}function Sp(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var s=ep();null!==(e=jn(e,t))&&(gt(e,t,s),rp(e,s))}function Cp(e){var t=e.memoizedState,s=0;null!==t&&(s=t.retryLane),Sp(e,s)}function Pp(e,t){var s=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(s=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(n(314))}null!==r&&r.delete(t),Sp(e,s)}function Fp(e,t){return Qe(e,t)}function Op(e,t,s,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dp(e,t,s,r){return new Op(e,t,s,r)}function Ap(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Tp(e,t){var s=e.alternate;return null===s?((s=Dp(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 jp(e,t,s,r,a,i){var o=2;if(r=e,"function"==typeof e)Ap(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case x:return Mp(s.children,a,i,t);case N:o=8,a|=8;break;case k:return(e=Dp(12,s,t,2|a)).elementType=k,e.lanes=i,e;case F:return(e=Dp(13,s,t,a)).elementType=F,e.lanes=i,e;case O:return(e=Dp(19,s,t,a)).elementType=O,e.lanes=i,e;case T:return Up(s,a,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case S:o=10;break e;case C:o=9;break e;case P:o=11;break e;case D:o=14;break e;case A:o=16,r=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Dp(o,s,t,a)).elementType=e,t.type=r,t.lanes=i,t}function Mp(e,t,s,r){return(e=Dp(7,e,r,t)).lanes=s,e}function Up(e,t,s,r){return(e=Dp(22,e,r,t)).elementType=T,e.lanes=s,e.stateNode={isHidden:!1},e}function Ip(e,t,s){return(e=Dp(6,e,null,t)).lanes=s,e}function $p(e,t,s){return(t=Dp(4,null!==e.children?e.children:[],e.key,t)).lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vp(e,t,s,r,a){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=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Rp(e,t,s,r,a,n,i,o,l){return e=new Vp(e,t,s,o,l),1===t?(t=1,!0===n&&(t|=8)):t=0,n=Dp(3,null,null,t),e.current=n,n.stateNode=e,n.memoizedState={element:r,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Un(n),e}function Lp(e){if(!e)return Sa;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Da(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var s=e.type;if(Da(s))return ja(e,s,t)}return t}function Bp(e,t,s,r,a,n,i,o,l){return(e=Rp(s,r,!0,e,0,n,0,o,l)).context=Lp(null),s=e.current,(n=$n(r=ep(),a=tp(s))).callback=null!=t?t:null,Vn(s,n,a),e.current.lanes=a,gt(e,a,r),rp(e,r),e}function zp(e,t,s,r){var a=t.current,n=ep(),i=tp(a);return s=Lp(s),null===t.context?t.context=s:t.pendingContext=s,(t=$n(n,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Vn(a,t,i))&&(sp(e,a,i,n),Rn(e,a,i)),i}function Wp(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qp(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var s=e.retryLane;e.retryLane=0!==s&&s<t?s:t}}function Hp(e,t){qp(e,t),(e=e.alternate)&&qp(e,t)}xl=function(e,t,s){if(null!==e)if(e.memoizedProps!==t.pendingProps||Pa.current)vo=!0;else{if(!(e.lanes&s||128&t.flags))return vo=!1,function(e,t,s){switch(t.tag){case 3:Fo(t),mn();break;case 5:Jn(t);break;case 1:Da(t.type)&&Ma(t);break;case 4:Gn(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;ka(wn,r._currentValue),r._currentValue=a;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(ka(Zn,1&Zn.current),t.flags|=128,null):s&t.child.childLanes?Io(e,t,s):(ka(Zn,1&Zn.current),null!==(e=Wo(e,t,s))?e.sibling:null);ka(Zn,1&Zn.current);break;case 19:if(r=!!(s&t.childLanes),128&e.flags){if(r)return Bo(e,t,s);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),ka(Zn,Zn.current),r)break;return null;case 22:case 23:return t.lanes=0,No(e,t,s)}return Wo(e,t,s)}(e,t,s);vo=!!(131072&e.flags)}else vo=!1,rn&&1048576&t.flags&&Xa(t,qa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zo(e,t),e=t.pendingProps;var a=Oa(t,Ca.current);Fn(t,s),a=fi(null,t,r,e,a,s);var i=bi();return t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Da(r)?(i=!0,Ma(t)):i=!1,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,Un(t),a.updater=ro,t.stateNode=a,a._reactInternals=t,oo(t,r,e,s),t=Po(null,t,r,!0,i,s)):(t.tag=0,rn&&i&&Za(t),Eo(null,t,a,s),t=t.child),t;case 16:r=t.elementType;e:{switch(zo(e,t),e=t.pendingProps,r=(a=r._init)(r._payload),t.type=r,a=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===D)return 14}return 2}(r),e=to(r,e),a){case 0:t=So(null,t,r,e,s);break e;case 1:t=Co(null,t,r,e,s);break e;case 11:t=_o(null,t,r,e,s);break e;case 14:t=wo(null,t,r,to(r.type,e),s);break e}throw Error(n(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,So(e,t,r,a=t.elementType===r?a:to(r,a),s);case 1:return r=t.type,a=t.pendingProps,Co(e,t,r,a=t.elementType===r?a:to(r,a),s);case 3:e:{if(Fo(t),null===e)throw Error(n(387));r=t.pendingProps,a=(i=t.memoizedState).element,In(e,t),Bn(t,r,null,s);var o=t.memoizedState;if(r=o.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Oo(e,t,r,s,a=lo(Error(n(423)),t));break e}if(r!==a){t=Oo(e,t,r,s,a=lo(Error(n(424)),t));break e}for(sn=la(t.stateNode.containerInfo.firstChild),tn=t,rn=!0,an=null,s=_n(t,null,r,s),t.child=s;s;)s.flags=-3&s.flags|4096,s=s.sibling}else{if(mn(),r===a){t=Wo(e,t,s);break e}Eo(e,t,r,s)}t=t.child}return t;case 5:return Jn(t),null===e&&pn(t),r=t.type,a=t.pendingProps,i=null!==e?e.memoizedProps:null,o=a.children,ta(r,a)?o=null:null!==i&&ta(r,i)&&(t.flags|=32),ko(e,t),Eo(e,t,o,s),t.child;case 6:return null===e&&pn(t),null;case 13:return Io(e,t,s);case 4:return Gn(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=En(t,null,r,s):Eo(e,t,r,s),t.child;case 11:return r=t.type,a=t.pendingProps,_o(e,t,r,a=t.elementType===r?a:to(r,a),s);case 7:return Eo(e,t,t.pendingProps,s),t.child;case 8:case 12:return Eo(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,ka(wn,r._currentValue),r._currentValue=o,null!==i)if(ir(i.value,o)){if(i.children===a.children&&!Pa.current){t=Wo(e,t,s);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var l=i.dependencies;if(null!==l){o=i.child;for(var p=l.firstContext;null!==p;){if(p.context===r){if(1===i.tag){(p=$n(-1,s&-s)).tag=2;var c=i.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}}i.lanes|=s,null!==(p=i.alternate)&&(p.lanes|=s),Pn(i.return,s,t),l.lanes|=s;break}p=p.next}}else if(10===i.tag)o=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(o=i.return))throw Error(n(341));o.lanes|=s,null!==(l=o.alternate)&&(l.lanes|=s),Pn(o,s,t),o=i.sibling}else o=i.child;if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===t){o=null;break}if(null!==(i=o.sibling)){i.return=o.return,o=i;break}o=o.return}i=o}Eo(e,t,a.children,s),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,Fn(t,s),r=r(a=On(a)),t.flags|=1,Eo(e,t,r,s),t.child;case 14:return a=to(r=t.type,t.pendingProps),wo(e,t,r,a=to(r.type,a),s);case 15:return xo(e,t,t.type,t.pendingProps,s);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:to(r,a),zo(e,t),t.tag=1,Da(r)?(e=!0,Ma(t)):e=!1,Fn(t,s),no(t,r,a),oo(t,r,a,s),Po(null,t,r,!0,e,s);case 19:return Bo(e,t,s);case 22:return No(e,t,s)}throw Error(n(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 Xp(){}function Zp(e,t,s,r,a){var n=s._reactRootContainer;if(n){var i=n;if("function"==typeof a){var o=a;a=function(){var e=Wp(i);o.call(e)}}zp(t,i,e,a)}else i=function(e,t,s,r,a){if(a){if("function"==typeof r){var n=r;r=function(){var e=Wp(i);n.call(e)}}var i=Bp(t,r,e,0,null,!1,0,"",Xp);return e._reactRootContainer=i,e[ma]=i.current,Lr(8===e.nodeType?e.parentNode:e),cp(),i}for(;a=e.lastChild;)e.removeChild(a);if("function"==typeof r){var o=r;r=function(){var e=Wp(l);o.call(e)}}var l=Rp(e,0,!1,null,0,!1,0,"",Xp);return e._reactRootContainer=l,e[ma]=l.current,Lr(8===e.nodeType?e.parentNode:e),cp((function(){zp(t,l,s,r)})),l}(s,t,e,a,r);return Wp(i)}Gp.prototype.render=Yp.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(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[ma]=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&&It(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),rp(t,Je()),!(6&Pl)&&(Bl=Je()+500,La()))}break;case 13:cp((function(){var t=jn(e,1);if(null!==t){var s=ep();sp(t,e,1,s)}})),Hp(e,1)}},wt=function(e){if(13===e.tag){var t=jn(e,134217728);if(null!==t)sp(t,e,134217728,ep());Hp(e,134217728)}},xt=function(e){if(13===e.tag){var t=tp(e),s=jn(e,t);if(null!==s)sp(s,e,t,ep());Hp(e,t)}},Nt=function(){return vt},kt=function(e,t){var s=vt;try{return vt=e,t()}finally{vt=s}},we=function(e,t,s){switch(t){case"input":if(X(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 r=s[t];if(r!==e&&r.form===e.form){var a=Ea(r);if(!a)throw Error(n(90));Q(r),X(r,a)}}}break;case"textarea":ne(e,s);break;case"select":null!=(t=s.value)&&se(e,!!s.multiple,t,!1)}},Pe=pp,Fe=cp;var ec={usingClientEntryPoint:!1,Events:[ya,va,Ea,Se,Ce,pp]},tc={findFiberByHostInstance:ga,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:E.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(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 rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{at=rc.inject(sc),nt=rc}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(n(200));return function(e,t,s){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:s}}(e,t,null,s)},t.createRoot=function(e,t){if(!Kp(e))throw Error(n(299));var s=!1,r="",a=Qp;return null!=t&&(!0===t.unstable_strictMode&&(s=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(a=t.onRecoverableError)),t=Rp(e,1,!1,null,0,s,0,r,a),e[ma]=t.current,Lr(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(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return e=null===(e=qe(t))?null:e.stateNode},t.flushSync=function(e){return cp(e)},t.hydrate=function(e,t,s){if(!Jp(t))throw Error(n(200));return Zp(null,e,t,!0,s)},t.hydrateRoot=function(e,t,s){if(!Kp(e))throw Error(n(405));var r=null!=s&&s.hydratedSources||null,a=!1,i="",o=Qp;if(null!=s&&(!0===s.unstable_strictMode&&(a=!0),void 0!==s.identifierPrefix&&(i=s.identifierPrefix),void 0!==s.onRecoverableError&&(o=s.onRecoverableError)),t=Bp(t,null,e,1,null!=s?s:null,a,0,i,o),e[ma]=t.current,Lr(e),r)for(e=0;e<r.length;e++)a=(a=(s=r[e])._getVersion)(s._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[s,a]:t.mutableSourceEagerHydrationData.push(s,a);return new Gp(t)},t.render=function(e,t,s){if(!Jp(t))throw Error(n(200));return Zp(null,e,t,!1,s)},t.unmountComponentAtNode=function(e){if(!Jp(e))throw Error(n(40));return!!e._reactRootContainer&&(cp((function(){Zp(null,null,e,!1,(function(){e._reactRootContainer=null,e[ma]=null}))})),!0)},t.unstable_batchedUpdates=pp,t.unstable_renderSubtreeIntoContainer=function(e,t,s,r){if(!Jp(s))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return Zp(e,t,s,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},5338:function(e,t,s){"use strict";var r=s(961);t.H=r.createRoot,r.hydrateRoot},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)},7463:function(e,t){"use strict";function s(e,t){var s=e.length;e.push(t);e:for(;0<s;){var r=s-1>>>1,a=e[r];if(!(0<n(a,t)))break e;e[r]=t,e[s]=a,s=r}}function r(e){return 0===e.length?null:e[0]}function a(e){if(0===e.length)return null;var t=e[0],s=e.pop();if(s!==t){e[0]=s;e:for(var r=0,a=e.length,i=a>>>1;r<i;){var o=2*(r+1)-1,l=e[o],p=o+1,c=e[p];if(0>n(l,s))p<a&&0>n(c,l)?(e[r]=c,e[p]=s,r=p):(e[r]=l,e[o]=s,r=o);else{if(!(p<a&&0>n(c,s)))break e;e[r]=c,e[p]=s,r=p}}}return t}function n(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 i=performance;t.unstable_now=function(){return i.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,v="undefined"!=typeof setImmediate?setImmediate:null;function E(e){for(var t=r(c);null!==t;){if(null===t.callback)a(c);else{if(!(t.startTime<=e))break;a(c),t.sortIndex=t.expirationTime,s(p,t)}t=r(c)}}function _(e){if(b=!1,E(e),!f)if(null!==r(p))f=!0,T(w);else{var t=r(c);null!==t&&j(_,t.startTime-e)}}function w(e,s){f=!1,b&&(b=!1,y(S),S=-1),h=!0;var n=m;try{for(E(s),d=r(p);null!==d&&(!(d.expirationTime>s)||e&&!F());){var i=d.callback;if("function"==typeof i){d.callback=null,m=d.priorityLevel;var o=i(d.expirationTime<=s);s=t.unstable_now(),"function"==typeof o?d.callback=o:d===r(p)&&a(p),E(s)}else a(p);d=r(p)}if(null!==d)var l=!0;else{var u=r(c);null!==u&&j(_,u.startTime-s),l=!1}return l}finally{d=null,m=n,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,N=!1,k=null,S=-1,C=5,P=-1;function F(){return!(t.unstable_now()-P<C)}function O(){if(null!==k){var e=t.unstable_now();P=e;var s=!0;try{s=k(!0,e)}finally{s?x():(N=!1,k=null)}}else N=!1}if("function"==typeof v)x=function(){v(O)};else if("undefined"!=typeof MessageChannel){var D=new MessageChannel,A=D.port2;D.port1.onmessage=O,x=function(){A.postMessage(null)}}else x=function(){g(O,0)};function T(e){k=e,N||(N=!0,x())}function j(e,s){S=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"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return r(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,a,n){var i=t.unstable_now();switch("object"==typeof n&&null!==n?n="number"==typeof(n=n.delay)&&0<n?i+n:i:n=i,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:a,priorityLevel:e,startTime:n,expirationTime:o=n+o,sortIndex:-1},n>i?(e.sortIndex=n,s(c,e),null===r(p)&&e===r(c)&&(b?(y(S),S=-1):b=!0,j(_,n-i))):(e.sortIndex=o,s(p,e),f||h||(f=!0,T(w))),e},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(e){var t=m;return function(){var s=m;m=t;try{return e.apply(this,arguments)}finally{m=s}}}},9982:function(e,t,s){"use strict";e.exports=s(7463)},4803:function(e,t,s){"use strict";var r=s(8859),a=s(9675),n=function(e,t,s){for(var r,a=e;null!=(r=a.next);a=r)if(r.key===t)return a.next=r.next,s||(r.next=e.next,e.next=r),r};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){var s=e&&e.next,r=function(e,t){if(e)return n(e,t,!0)}(e,t);return r&&s&&s===r&&(e=void 0),!!r},get:function(t){return function(e,t){if(e){var s=n(e,t);return s&&s.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!n(e,t)}(e,t)},set:function(t,s){e||(e={next:void 0}),function(e,t,s){var r=n(e,t);r?r.value=s:e.next={key:t,next:e.next,value:s}}(e,t,s)}};return t}},507:function(e,t,s){"use strict";var r=s(453),a=s(6556),n=s(8859),i=s(9675),o=r("%Map%",!0),l=a("Map.prototype.get",!0),p=a("Map.prototype.set",!0),c=a("Map.prototype.has",!0),u=a("Map.prototype.delete",!0),d=a("Map.prototype.size",!0);e.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+n(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}},2271:function(e,t,s){"use strict";var r=s(453),a=s(6556),n=s(8859),i=s(507),o=s(9675),l=r("%WeakMap%",!0),p=a("WeakMap.prototype.get",!0),c=a("WeakMap.prototype.set",!0),u=a("WeakMap.prototype.has",!0),d=a("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 "+n(e))},delete:function(s){if(l&&s&&("object"==typeof s||"function"==typeof s)){if(e)return d(e,s)}else if(i&&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,r){l&&s&&("object"==typeof s||"function"==typeof s)?(e||(e=new l),c(e,s,r)):i&&(t||(t=i()),t.set(s,r))}};return s}:i},920:function(e,t,s){"use strict";var r=s(9675),a=s(8859),n=s(4803),i=s(507),o=s(2271)||i||n;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){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}},818:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],s=t.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function a(e,t){t=t||{};var a,i,o,c=[],u=[],d=e.querySelectorAll(s);for(t.includeContainer&&r.call(e,s)&&(d=Array.prototype.slice.apply(d)).unshift(e),a=0;a<d.length;a++)n(i=d[a])&&(0===(o=l(i))?c.push(i):u.push({documentOrder:a,tabIndex:o,node:i}));return u.sort(p).map((function(e){return e.node})).concat(c)}function n(e){return!(!i(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 i(e){return!(e.disabled||function(e){return c(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}a.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,s)&&n(e)},a.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,o)&&i(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=a},5160:function(e,t,s){"use strict";var r=s(1594);var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=r.useSyncExternalStore,i=r.useRef,o=r.useEffect,l=r.useMemo,p=r.useDebugValue},8418:function(e,t,s){"use strict";s(5160)},7510:function(e){e.exports=function(){for(var e={},s=0;s<arguments.length;s++){var r=arguments[s];for(var a in r)t.call(r,a)&&(e[a]=r[a])}return e};var t=Object.prototype.hasOwnProperty},1594:function(e){"use strict";e.exports=React},2634:function(){}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,loaded:!1,exports:{}};return s[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(s,r){if(1&r&&(s=this(s)),8&r)return s;if("object"==typeof s&&s){if(4&r&&s.__esModule)return s;if(16&r&&"function"==typeof s.then)return s}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&s;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((function(e){i[e]=function(){return s[e]}}));return i.default=function(){return s},a.d(n,i),n},a.d=function(e,t){for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e={};a.r(e),a.d(e,{resetSettings:function(){return zr},saveBuilder:function(){return Wr},updateSetting:function(){return Lr},updateSettings:function(){return Br}});var t={};a.r(t),a.d(t,{hideModal:function(){return Hr},showModal:function(){return qr}});var s={};a.r(s),a.d(s,{UPDATE_TITLE:function(){return Qr},updateTitle:function(){return Yr}});var r={};a.r(r),a.d(r,{updateField:function(){return Ma},updateFieldSettings:function(){return Ua},updateFields:function(){return ja}});var n={};a.r(n),a.d(n,{updateIntegrationConditions:function(){return Ia}});var i={};a.r(i),a.d(i,{updateBehavior:function(){return Va},updateBehaviorArray:function(){return $a}});var o={};a.r(o),a.d(o,{updateNotification:function(){return La},updateNotifications:function(){return Ra}});var l={};a.r(l),a.d(l,{updatePdfs:function(){return tc}});var p=a(1594),c=a.n(p),u=a(5338);a(8418);var d=p.version.startsWith("19"),m=Symbol.for(d?"react.transitional.element":"react.element"),h=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),v=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),S=E,C=N;function P(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case m:switch(e=e.type){case f:case g:case b:case w:case x:return e;default:switch(e=e&&e.$$typeof){case v:case E:case k:case N:case y:return e;default:return t}}case h:return t}}}function F(e,t,s,r,{areStatesEqual:a,areOwnPropsEqual:n,areStatePropsEqual:i}){let o,l,p,c,u,d=!1;function m(d,m){const h=!n(m,l),f=!a(d,o,m,l);return o=d,l=m,h&&f?(p=e(o,l),t.dependsOnOwnProps&&(c=t(r,l)),u=s(p,c,l),u):h?(e.dependsOnOwnProps&&(p=e(o,l)),t.dependsOnOwnProps&&(c=t(r,l)),u=s(p,c,l),u):f?function(){const t=e(o,l),r=!i(t,p);return p=t,r&&(u=s(p,c,l)),u}():u}return function(a,n){return d?m(a,n):(o=a,l=n,p=e(o,l),c=t(r,l),u=s(p,c,l),d=!0,u)}}function O(e){return function(t){const s=e(t);function r(){return s}return r.dependsOnOwnProps=!1,r}}function D(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function A(e,t){return function(t,{displayName:s}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,s){r.mapToProps=e,r.dependsOnOwnProps=D(e);let a=r(t,s);return"function"==typeof a&&(r.mapToProps=a,r.dependsOnOwnProps=D(a),a=r(t,s)),a},r}}function T(e,t){return(s,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function j(e,t,s){return{...s,...e,...t}}function M(e){e()}var U={notify(){},get:()=>[]};function I(e,t){let s,r=U,a=0,n=!1;function i(){p.onStateChange&&p.onStateChange()}function o(){a++,s||(s=t?t.addNestedSub(i):e.subscribe(i),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){M((()=>{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 r=!0;const a=t={callback:s,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){r&&null!==e&&(r=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}())}function l(){a--,s&&0===a&&(s(),s=void 0,r.clear(),r=U)}const p={addNestedSub:function(e){o();const t=r.subscribe(e);let s=!1;return()=>{s||(s=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return n},trySubscribe:function(){n||(n=!0,o())},tryUnsubscribe:function(){n&&(n=!1,l())},getListeners:()=>r};return p}var $=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),V=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),R=(()=>$||V?p.useLayoutEffect:p.useEffect)();function L(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function B(e,t){if(L(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const s=Object.keys(e),r=Object.keys(t);if(s.length!==r.length)return!1;for(let r=0;r<s.length;r++)if(!Object.prototype.hasOwnProperty.call(t,s[r])||!L(e[s[r]],t[s[r]]))return!1;return!0}var z={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},W={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},H={[S]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[C]:q};function Q(e){return P(e)===N?q:H[e.$$typeof]||z}var Y=Object.defineProperty,G=Object.getOwnPropertyNames,K=Object.getOwnPropertySymbols,J=Object.getOwnPropertyDescriptor,X=Object.getPrototypeOf,Z=Object.prototype;function ee(e,t){if("string"!=typeof t){if(Z){const s=X(t);s&&s!==Z&&ee(e,s)}let s=G(t);K&&(s=s.concat(K(t)));const r=Q(e),a=Q(t);for(let n=0;n<s.length;++n){const i=s[n];if(!(W[i]||a&&a[i]||r&&r[i])){const s=J(t,i);try{Y(e,i,s)}catch(e){}}}}return e}var te=Symbol.for("react-redux-context"),se="undefined"!=typeof globalThis?globalThis:{};function re(){if(!p.createContext)return{};const e=se[te]??=new Map;let t=e.get(p.createContext);return t||(t=p.createContext(null),e.set(p.createContext,t)),t}var ae=re(),ne=[null,null];function ie(e,t,s,r,a,n){e.current=r,s.current=!1,a.current&&(a.current=null,n())}function oe(e,t){return e===t}var le=function(e,t,s,{pure:r,areStatesEqual:a=oe,areOwnPropsEqual:n=B,areStatePropsEqual:i=B,areMergedPropsEqual:o=B,forwardRef:l=!1,context:c=ae}={}){const u=c,d=function(e){return e?"function"==typeof e?A(e):T(e,"mapStateToProps"):O((()=>({})))}(e),m=function(e){return e&&"object"==typeof e?O((t=>function(e,t){const s={};for(const r in e){const a=e[r];"function"==typeof a&&(s[r]=(...e)=>t(a(...e)))}return s}(e,t))):e?"function"==typeof e?A(e):T(e,"mapDispatchToProps"):O((e=>({dispatch:e})))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:s,areMergedPropsEqual:r}){let a,n=!1;return function(t,s,i){const o=e(t,s,i);return n?r(o,a)||(a=o):(n=!0,a=o),a}}}(e):T(e,"mergeProps"):()=>j}(s),f=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",s=`Connect(${t})`,r={shouldHandleStateChanges:f,displayName:s,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:d,initMapDispatchToProps:m,initMergeProps:h,areStatesEqual:a,areStatePropsEqual:i,areOwnPropsEqual:n,areMergedPropsEqual:o};function c(t){const[s,a,n]=p.useMemo((()=>{const{reactReduxForwardedRef:e,...s}=t;return[t.context,e,s]}),[t]),i=p.useMemo((()=>u),[s,u]),o=p.useContext(i),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),c=Boolean(o)&&Boolean(o.store);const d=l?t.store:o.store,m=c?o.getServerState:d.getState,h=p.useMemo((()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:s,initMergeProps:r,...a}){return F(t(e,a),s(e,a),r(e,a),e,a)}(d.dispatch,r)),[d]),[b,g]=p.useMemo((()=>{if(!f)return ne;const e=I(d,l?void 0:o.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,l,o]),y=p.useMemo((()=>l?o:{...o,subscription:b}),[l,o,b]),v=p.useRef(void 0),E=p.useRef(n),_=p.useRef(void 0),w=p.useRef(!1),x=p.useRef(!1),N=p.useRef(void 0);R((()=>(x.current=!0,()=>{x.current=!1})),[]);const k=p.useMemo((()=>()=>_.current&&n===E.current?_.current:h(d.getState(),n)),[d,n]),S=p.useMemo((()=>e=>b?function(e,t,s,r,a,n,i,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=r(e,a.current)}catch(e){m=e,d=e}m||(d=null),s===n.current?i.current||p():(n.current=s,l.current=s,i.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,E,v,w,x,_,g,e):()=>{}),[b]);var C,P,O;let D;C=ie,P=[E,v,w,n,_,g],R((()=>C(...P)),O);try{D=p.useSyncExternalStore(S,k,m?()=>h(m(),n):k)}catch(e){throw N.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${N.current.stack}\n\n`),e}R((()=>{N.current=void 0,_.current=void 0,v.current=D}));const A=p.useMemo((()=>p.createElement(e,{...D,ref:a})),[a,e,D]);return p.useMemo((()=>f?p.createElement(i.Provider,{value:y},A):A),[i,A,y])}const b=p.memo(c);if(b.WrappedComponent=e,b.displayName=c.displayName=s,l){const t=p.forwardRef((function(e,t){return p.createElement(b,{...e,reactReduxForwardedRef:t})}));return t.displayName=s,t.WrappedComponent=e,ee(t,e)}return ee(b,e)}};var pe=function(e){const{children:t,context:s,serverState:r,store:a}=e,n=p.useMemo((()=>{const e=I(a);return{store:a,subscription:e,getServerState:r?()=>r:void 0}}),[a,r]),i=p.useMemo((()=>a.getState()),[a]);R((()=>{const{subscription:e}=n;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),i!==a.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[n,i]);const o=s||ae;return p.createElement(o.Provider,{value:n},t)};var ce;function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ue.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(ce||(ce={}));function de(e,t){if(!1===e||null==e)throw new Error(t)}function me(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function he(e,t,s,r){return void 0===s&&(s=null),ue({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?be(t):t,{state:s,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function fe(e){let{pathname:t="/",search:s="",hash:r=""}=e;return s&&"?"!==s&&(t+="?"===s.charAt(0)?s:"?"+s),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function be(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var ge;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(ge||(ge={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function ye(e,t,s){return void 0===s&&(s="/"),ve(e,t,s,!1)}function ve(e,t,s,r){let a=Te(("string"==typeof t?be(t):t).pathname||"/",s);if(null==a)return null;let n=Ee(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)))))}(n);let i=null;for(let e=0;null==i&&e<n.length;++e){let t=Ae(a);i=Oe(n[e],t,r)}return i}function Ee(e,t,s,r){void 0===t&&(t=[]),void 0===s&&(s=[]),void 0===r&&(r="");let a=(e,a,n)=>{let i={relativePath:void 0===n?e.path||"":n,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(de(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let o=$e([r,i.relativePath]),l=s.concat(i);e.children&&e.children.length>0&&(de(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),Ee(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 _e(e.path))a(e,t,s);else a(e,t)})),t}function _e(e){let t=e.split("/");if(0===t.length)return[];let[s,...r]=t,a=s.endsWith("?"),n=s.replace(/\?$/,"");if(0===r.length)return a?[n,""]:[n];let i=_e(r.join("/")),o=[];return o.push(...i.map((e=>""===e?n:[n,e].join("/")))),a&&o.push(...i),o.map((t=>e.startsWith("/")&&""===t?"/":t))}const we=/^:[\w-]+$/,xe=3,Ne=2,ke=1,Se=10,Ce=-2,Pe=e=>"*"===e;function Fe(e,t){let s=e.split("/"),r=s.length;return s.some(Pe)&&(r+=Ce),t&&(r+=Ne),s.filter((e=>!Pe(e))).reduce(((e,t)=>e+(we.test(t)?xe:""===t?ke:Se)),r)}function Oe(e,t,s){void 0===s&&(s=!1);let{routesMeta:r}=e,a={},n="/",i=[];for(let e=0;e<r.length;++e){let o=r[e],l=e===r.length-1,p="/"===n?t:t.slice(n.length)||"/",c=De({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},p),u=o.route;if(!c&&l&&s&&!r[r.length-1].route.index&&(c=De({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},p)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:$e([n,c.pathname]),pathnameBase:Ve($e([n,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(n=$e([n,c.pathnameBase]))}return i}function De(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[s,r]=function(e,t,s){void 0===t&&(t=!1);void 0===s&&(s=!0);me("*"===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 r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,s)=>(r.push({paramName:t,isOptional:null!=s}),s?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let n=new RegExp(a,t?void 0:"i");return[n,r]}(e.path,e.caseSensitive,e.end),a=t.match(s);if(!a)return null;let n=a[0],i=n.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce(((e,t,s)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=o[s]||"";i=n.slice(0,n.length-e.length).replace(/(.)\/+$/,"$1")}const l=o[s];return e[r]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:n,pathnameBase:i,pattern:e}}function Ae(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return me(!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 Te(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&"/"!==r?null:e.slice(s)||"/"}function je(e,t,s,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. 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 Me(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function Ue(e,t){let s=Me(e);return t?s.map(((e,t)=>t===s.length-1?e.pathname:e.pathnameBase)):s.map((e=>e.pathnameBase))}function Ie(e,t,s,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=be(e):(a=ue({},e),de(!a.pathname||!a.pathname.includes("?"),je("?","pathname","search",a)),de(!a.pathname||!a.pathname.includes("#"),je("#","pathname","hash",a)),de(!a.search||!a.search.includes("#"),je("#","search","hash",a)));let n,i=""===e||""===a.pathname,o=i?"/":a.pathname;if(null==o)n=s;else{let e=t.length-1;if(!r&&o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}n=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:s,search:r="",hash:a=""}="string"==typeof e?be(e):e,n=s?s.startsWith("/")?s:function(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("/"):"/"}(s,t):t;return{pathname:n,search:Re(r),hash:Le(a)}}(a,n),p=o&&"/"!==o&&o.endsWith("/"),c=(i||"."===o)&&s.endsWith("/");return l.pathname.endsWith("/")||!p&&!c||(l.pathname+="/"),l}const $e=e=>e.join("/").replace(/\/\/+/g,"/"),Ve=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Re=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Le=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Be(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const ze=["post","put","patch","delete"],We=(new Set(ze),["get",...ze]);new Set(We),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},qe.apply(this,arguments)}const He=p.createContext(null);const Qe=p.createContext(null);const Ye=p.createContext(null);const Ge=p.createContext(null);const Ke=p.createContext({outlet:null,matches:[],isDataRoute:!1});const Je=p.createContext(null);function Xe(){return null!=p.useContext(Ge)}function Ze(){return Xe()||de(!1),p.useContext(Ge).location}function et(e){p.useContext(Ye).static||p.useLayoutEffect(e)}function tt(){let{isDataRoute:e}=p.useContext(Ke);return e?function(){let{router:e}=ut(pt.UseNavigateStable),t=mt(ct.UseNavigateStable),s=p.useRef(!1);return et((()=>{s.current=!0})),p.useCallback((function(r,a){void 0===a&&(a={}),s.current&&("number"==typeof r?e.navigate(r):e.navigate(r,qe({fromRouteId:t},a)))}),[e,t])}():function(){Xe()||de(!1);let e=p.useContext(He),{basename:t,future:s,navigator:r}=p.useContext(Ye),{matches:a}=p.useContext(Ke),{pathname:n}=Ze(),i=JSON.stringify(Ue(a,s.v7_relativeSplatPath)),o=p.useRef(!1);return et((()=>{o.current=!0})),p.useCallback((function(s,a){if(void 0===a&&(a={}),!o.current)return;if("number"==typeof s)return void r.go(s);let l=Ie(s,JSON.parse(i),n,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:$e([t,l.pathname])),(a.replace?r.replace:r.push)(l,a.state,a)}),[t,r,i,n,e])}()}function st(e,t){let{relative:s}=void 0===t?{}:t,{future:r}=p.useContext(Ye),{matches:a}=p.useContext(Ke),{pathname:n}=Ze(),i=JSON.stringify(Ue(a,r.v7_relativeSplatPath));return p.useMemo((()=>Ie(e,JSON.parse(i),n,"path"===s)),[e,i,n,s])}function rt(e,t,s,r){Xe()||de(!1);let{navigator:a}=p.useContext(Ye),{matches:n}=p.useContext(Ke),i=n[n.length-1],o=i?i.params:{},l=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let c,u=Ze();if(t){var d;let e="string"==typeof t?be(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||de(!1),c=e}else c=u;let m=c.pathname||"/",h=m;if("/"!==l){let e=l.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=ye(e,{pathname:h});let b=lt(f&&f.map((e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:$e([l,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:$e([l,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),n,s,r);return t&&b?p.createElement(Ge.Provider,{value:{location:qe({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ce.Pop}},b):b}function at(){let e=function(){var e;let t=p.useContext(Je),s=dt(ct.UseRouteError),r=mt(ct.UseRouteError);if(void 0!==t)return t;return null==(e=s.errors)?void 0:e[r]}(),t=Be(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),s?p.createElement("pre",{style:a},s):null,null)}const nt=p.createElement(at,null);class it extends p.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?p.createElement(Ke.Provider,{value:this.props.routeContext},p.createElement(Je.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ot(e){let{routeContext:t,match:s,children:r}=e,a=p.useContext(He);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),p.createElement(Ke.Provider,{value:t},r)}function lt(e,t,s,r){var a;if(void 0===t&&(t=[]),void 0===s&&(s=null),void 0===r&&(r=null),null==e){var n;if(!s)return null;if(s.errors)e=s.matches;else{if(!(null!=(n=r)&&n.v7_partialHydration&&0===t.length&&!s.initialized&&s.matches.length>0))return null;e=s.matches}}let i=e,o=null==(a=s)?void 0:a.errors;if(null!=o){let e=i.findIndex((e=>e.route.id&&void 0!==(null==o?void 0:o[e.route.id])));e>=0||de(!1),i=i.slice(0,Math.min(i.length,e+1))}let l=!1,c=-1;if(s&&r&&r.v7_partialHydration)for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=s,a=t.route.loader&&void 0===e[t.route.id]&&(!r||void 0===r[t.route.id]);if(t.route.lazy||a){l=!0,i=c>=0?i.slice(0,c+1):[i[0]];break}}}return i.reduceRight(((e,r,a)=>{let n,u=!1,d=null,m=null;var h;s&&(n=o&&r.route.id?o[r.route.id]:void 0,d=r.route.errorElement||nt,l&&(c<0&&0===a?(h="route-fallback",!1||ht[h]||(ht[h]=!0),u=!0,m=null):c===a&&(u=!0,m=r.route.hydrateFallbackElement||null)));let f=t.concat(i.slice(0,a+1)),b=()=>{let t;return t=n?d:u?m:r.route.Component?p.createElement(r.route.Component,null):r.route.element?r.route.element:e,p.createElement(ot,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=s},children:t})};return s&&(r.route.ErrorBoundary||r.route.errorElement||0===a)?p.createElement(it,{location:s.location,revalidation:s.revalidation,component:d,error:n,children:b(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):b()}),null)}var pt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pt||{}),ct=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}(ct||{});function ut(e){let t=p.useContext(He);return t||de(!1),t}function dt(e){let t=p.useContext(Qe);return t||de(!1),t}function mt(e){let t=function(){let e=p.useContext(Ke);return e||de(!1),e}(),s=t.matches[t.matches.length-1];return s.route.id||de(!1),s.route.id}const ht={};const ft={};const bt=(e,t,s)=>{var r;ft[r="⚠️ React Router Future Flag Warning: "+t+". You can use the `"+e+"` future flag to opt-in early. For more information, see "+s+"."]||(ft[r]=!0,console.warn(r))};function gt(e,t){void 0===(null==e?void 0:e.v7_startTransition)&&bt("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&t.v7_relativeSplatPath||bt("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(void 0===t.v7_fetcherPersist&&bt("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&bt("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&bt("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&bt("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}const yt=p.startTransition;function vt(e){let{basename:t,children:s,initialEntries:r,initialIndex:a,future:n}=e,i=p.useRef();null==i.current&&(i.current=function(e){void 0===e&&(e={});let t,{initialEntries:s=["/"],initialIndex:r,v5Compat:a=!1}=e;t=s.map(((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let n=l(null==r?t.length-1:r),i=ce.Pop,o=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function p(){return t[n]}function c(e,s,r){void 0===s&&(s=null);let a=he(t?p().pathname:"/",e,s,r);return me("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function u(e){return"string"==typeof e?e:fe(e)}return{get index(){return n},get action(){return i},get location(){return p()},createHref:u,createURL(e){return new URL(u(e),"http://localhost")},encodeLocation(e){let t="string"==typeof e?be(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,s){i=ce.Push;let r=c(e,s);n+=1,t.splice(n,t.length,r),a&&o&&o({action:i,location:r,delta:1})},replace(e,s){i=ce.Replace;let r=c(e,s);t[n]=r,a&&o&&o({action:i,location:r,delta:0})},go(e){i=ce.Pop;let s=l(n+e),r=t[s];n=s,o&&o({action:i,location:r,delta:e})},listen(e){return o=e,()=>{o=null}}}}({initialEntries:r,initialIndex:a,v5Compat:!0}));let o=i.current,[l,c]=p.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=p.useCallback((e=>{u&&yt?yt((()=>c(e))):c(e)}),[c,u]);return p.useLayoutEffect((()=>o.listen(d)),[o,d]),p.useEffect((()=>gt(n)),[n]),p.createElement(wt,{basename:t,children:s,location:l.location,navigationType:l.action,navigator:o,future:n})}function Et(e){let{to:t,replace:s,state:r,relative:a}=e;Xe()||de(!1);let{future:n,static:i}=p.useContext(Ye),{matches:o}=p.useContext(Ke),{pathname:l}=Ze(),c=tt(),u=Ie(t,Ue(o,n.v7_relativeSplatPath),l,"path"===a),d=JSON.stringify(u);return p.useEffect((()=>c(JSON.parse(d),{replace:s,state:r,relative:a})),[c,d,a,s,r]),null}function _t(e){de(!1)}function wt(e){let{basename:t="/",children:s=null,location:r,navigationType:a=ce.Pop,navigator:n,static:i=!1,future:o}=e;Xe()&&de(!1);let l=t.replace(/^\/*/,"/"),c=p.useMemo((()=>({basename:l,navigator:n,static:i,future:qe({v7_relativeSplatPath:!1},o)})),[l,o,n,i]);"string"==typeof r&&(r=be(r));let{pathname:u="/",search:d="",hash:m="",state:h=null,key:f="default"}=r,b=p.useMemo((()=>{let e=Te(u,l);return null==e?null:{location:{pathname:e,search:d,hash:m,state:h,key:f},navigationType:a}}),[l,u,d,m,h,f,a]);return null==b?null:p.createElement(Ye.Provider,{value:c},p.createElement(Ge.Provider,{children:s,value:b}))}function xt(e){let{children:t,location:s}=e;return rt(Nt(t),s)}new Promise((()=>{}));p.Component;function Nt(e,t){void 0===t&&(t=[]);let s=[];return p.Children.forEach(e,((e,r)=>{if(!p.isValidElement(e))return;let a=[...t,r];if(e.type===p.Fragment)return void s.push.apply(s,Nt(e.props.children,a));e.type!==_t&&de(!1),e.props.index&&e.props.children&&de(!1);let n={id:e.props.id||a.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&&(n.children=Nt(e.props.children,a)),s.push(n)})),s}function kt(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 St=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Ct=()=>Math.random().toString(36).substring(7).split("").join("."),Pt={INIT:`@@redux/INIT${Ct()}`,REPLACE:`@@redux/REPLACE${Ct()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ct()}`};function Ft(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 Ot(e,t,s){if("function"!=typeof e)throw new Error(kt(2));if("function"==typeof t&&"function"==typeof s||"function"==typeof s&&"function"==typeof arguments[3])throw new Error(kt(0));if("function"==typeof t&&void 0===s&&(s=t,t=void 0),void 0!==s){if("function"!=typeof s)throw new Error(kt(1));return s(Ot)(e,t)}let r=e,a=t,n=new Map,i=n,o=0,l=!1;function p(){i===n&&(i=new Map,n.forEach(((e,t)=>{i.set(t,e)})))}function c(){if(l)throw new Error(kt(3));return a}function u(e){if("function"!=typeof e)throw new Error(kt(4));if(l)throw new Error(kt(5));let t=!0;p();const s=o++;return i.set(s,e),function(){if(t){if(l)throw new Error(kt(6));t=!1,p(),i.delete(s),n=null}}}function d(e){if(!Ft(e))throw new Error(kt(7));if(void 0===e.type)throw new Error(kt(8));if("string"!=typeof e.type)throw new Error(kt(17));if(l)throw new Error(kt(9));try{l=!0,a=r(a,e)}finally{l=!1}return(n=i).forEach((e=>{e()})),e}d({type:Pt.INIT});return{dispatch:d,subscribe:u,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(kt(10));r=e,d({type:Pt.REPLACE})},[St]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(kt(11));function s(){const e=t;e.next&&e.next(c())}s();return{unsubscribe:e(s)}},[St](){return this}}}}}function Dt(e){const t=Object.keys(e),s={};for(let r=0;r<t.length;r++){const a=t[r];0,"function"==typeof e[a]&&(s[a]=e[a])}const r=Object.keys(s);let a;try{!function(e){Object.keys(e).forEach((t=>{const s=e[t];if(void 0===s(void 0,{type:Pt.INIT}))throw new Error(kt(12));if(void 0===s(void 0,{type:Pt.PROBE_UNKNOWN_ACTION()}))throw new Error(kt(13))}))}(s)}catch(e){a=e}return function(e={},t){if(a)throw a;let n=!1;const i={};for(let a=0;a<r.length;a++){const o=r[a],l=s[o],p=e[o],c=l(p,t);if(void 0===c){t&&t.type;throw new Error(kt(14))}i[o]=c,n=n||c!==p}return n=n||r.length!==Object.keys(e).length,n?i:e}}function At(e,t){return function(...s){return t(e.apply(this,s))}}function Tt(e,t){if("function"==typeof e)return At(e,t);if("object"!=typeof e||null===e)throw new Error(kt(16));const s={};for(const r in e){const a=e[r];"function"==typeof a&&(s[r]=At(a,t))}return s}function jt(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...s)=>e(t(...s))))}function Mt(e){return({dispatch:t,getState:s})=>r=>a=>"function"==typeof a?a(t,s,e):r(a)}var Ut=Mt(),It=Mt,$t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?jt:jt.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Vt=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 Rt="RTK_autoBatch",Lt=e=>t=>{setTimeout(t,e)},Bt=e=>function(t){const{autoBatch:s=!0}=t??{};let r=new Vt(e);return s&&r.push(((e={type:"raf"})=>t=>(...s)=>{const r=t(...s);let a=!0,n=!1,i=!1;const o=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Lt(10):"callback"===e.type?e.queueNotification:Lt(e.timeout),p=()=>{i=!1,n&&(n=!1,o.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>a&&e()));return o.add(e),()=>{t(),o.delete(e)}},dispatch(e){try{return a=!e?.meta?.[Rt],n=!a,n&&(i||(i=!0,l(p))),r.dispatch(e)}finally{a=!0}}})})("object"==typeof s?s:void 0)),r};function zt(e){const t=function(e){const{thunk:t=!0,immutableCheck:s=!0,serializableCheck:r=!0,actionCreatorCheck:a=!0}=e??{};let n=new Vt;return t&&("boolean"==typeof t?n.push(Ut):n.push(It(t.extraArgument))),n},{reducer:s,middleware:r,devTools:a=!0,preloadedState:n,enhancers:i}=e||{};let o,l;if("function"==typeof s)o=s;else{if(!Ft(s))throw new Error(qt(1));o=Dt(s)}l="function"==typeof r?r(t):t();let p=jt;a&&(p=$t({trace:!1,..."object"==typeof a&&a}));const c=function(...e){return t=>(s,r)=>{const a=t(s,r);let n=()=>{throw new Error(kt(15))};const i={getState:a.getState,dispatch:(e,...t)=>n(e,...t)},o=e.map((e=>e(i)));return n=jt(...o)(a.dispatch),{...a,dispatch:n}}}(...l),u=Bt(c);return Ot(o,n,p(..."function"==typeof i?i(u):u()))}var{assign:Wt}=Object;Symbol.for("rtk-state-proxy-original");function qt(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. `}var Ht=a(9477),Qt=a.n(Ht);const{entries:Yt,setPrototypeOf:Gt,isFrozen:Kt,getPrototypeOf:Jt,getOwnPropertyDescriptor:Xt}=Object;let{freeze:Zt,seal:es,create:ts}=Object,{apply:ss,construct:rs}="undefined"!=typeof Reflect&&Reflect;Zt||(Zt=function(e){return e}),es||(es=function(e){return e}),ss||(ss=function(e,t,s){return e.apply(t,s)}),rs||(rs=function(e,t){return new e(...t)});const as=gs(Array.prototype.forEach),ns=gs(Array.prototype.pop),is=gs(Array.prototype.push),os=gs(String.prototype.toLowerCase),ls=gs(String.prototype.toString),ps=gs(String.prototype.match),cs=gs(String.prototype.replace),us=gs(String.prototype.indexOf),ds=gs(String.prototype.trim),ms=gs(Object.prototype.hasOwnProperty),hs=gs(RegExp.prototype.test),fs=(bs=TypeError,function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return rs(bs,t)});var bs;function gs(e){return function(t){for(var s=arguments.length,r=new Array(s>1?s-1:0),a=1;a<s;a++)r[a-1]=arguments[a];return ss(e,t,r)}}function ys(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:os;Gt&&Gt(e,null);let r=t.length;for(;r--;){let a=t[r];if("string"==typeof a){const e=s(a);e!==a&&(Kt(t)||(t[r]=e),a=e)}e[a]=!0}return e}function vs(e){for(let t=0;t<e.length;t++){ms(e,t)||(e[t]=null)}return e}function Es(e){const t=ts(null);for(const[s,r]of Yt(e)){ms(e,s)&&(Array.isArray(r)?t[s]=vs(r):r&&"object"==typeof r&&r.constructor===Object?t[s]=Es(r):t[s]=r)}return t}function _s(e,t){for(;null!==e;){const s=Xt(e,t);if(s){if(s.get)return gs(s.get);if("function"==typeof s.value)return gs(s.value)}e=Jt(e)}return function(){return null}}const ws=Zt(["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","section","select","shadow","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"]),xs=Zt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ns=Zt(["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"]),ks=Zt(["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"]),Ss=Zt(["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"]),Cs=Zt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ps=Zt(["#text"]),Fs=Zt(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Os=Zt(["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","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"]),Ds=Zt(["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"]),As=Zt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ts=es(/\{\{[\w\W]*|[\w\W]*\}\}/gm),js=es(/<%[\w\W]*|[\w\W]*%>/gm),Ms=es(/\$\{[\w\W]*}/gm),Us=es(/^data-[\-\w.\u00B7-\uFFFF]+$/),Is=es(/^aria-[\-\w]+$/),$s=es(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vs=es(/^(?:\w+script|data):/i),Rs=es(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ls=es(/^html$/i),Bs=es(/^[a-z][.\w]*(-[.\w]+)+$/i);var zs=Object.freeze({__proto__:null,ARIA_ATTR:Is,ATTR_WHITESPACE:Rs,CUSTOM_ELEMENT:Bs,DATA_ATTR:Us,DOCTYPE_NAME:Ls,ERB_EXPR:js,IS_ALLOWED_URI:$s,IS_SCRIPT_OR_DATA:Vs,MUSTACHE_EXPR:Ts,TMPLIT_EXPR:Ms});const Ws=1,qs=3,Hs=7,Qs=8,Ys=9,Gs=function(){return"undefined"==typeof window?null:window};var Ks=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gs();const s=t=>e(t);if(s.version="3.2.3",s.removed=[],!t||!t.document||t.document.nodeType!==Ys)return s.isSupported=!1,s;let{document:r}=t;const a=r,n=a.currentScript,{DocumentFragment:i,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=_s(f,"cloneNode"),g=_s(f,"remove"),y=_s(f,"nextSibling"),v=_s(f,"childNodes"),E=_s(f,"parentNode");if("function"==typeof o){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let _,w="";const{implementation:x,createNodeIterator:N,createDocumentFragment:k,getElementsByTagName:S}=r,{importNode:C}=a;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};s.isSupported="function"==typeof Yt&&"function"==typeof E&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:F,ERB_EXPR:O,TMPLIT_EXPR:D,DATA_ATTR:A,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:U}=zs;let{IS_ALLOWED_URI:I}=zs,$=null;const V=ys({},[...ws,...xs,...Ns,...Ss,...Ps]);let R=null;const L=ys({},[...Fs,...Os,...Ds,...As]);let B=Object.seal(ts(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,q=!0,H=!0,Q=!1,Y=!0,G=!1,K=!0,J=!1,X=!1,Z=!1,ee=!1,te=!1,se=!1,re=!0,ae=!1,ne=!0,ie=!1,oe={},le=null;const pe=ys({},["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 ce=null;const ue=ys({},["audio","video","img","source","image","track"]);let de=null;const me=ys({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let ge=be,ye=!1,ve=null;const Ee=ys({},[he,fe,be],ls);let _e=ys({},["mi","mo","mn","ms","mtext"]),we=ys({},["annotation-xml"]);const xe=ys({},["title","style","font","a","script"]);let Ne=null;const ke=["application/xhtml+xml","text/html"];let Se=null,Ce=null;const Pe=r.createElement("form"),Fe=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ce||Ce!==e){if(e&&"object"==typeof e||(e={}),e=Es(e),Ne=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Se="application/xhtml+xml"===Ne?ls:os,$=ms(e,"ALLOWED_TAGS")?ys({},e.ALLOWED_TAGS,Se):V,R=ms(e,"ALLOWED_ATTR")?ys({},e.ALLOWED_ATTR,Se):L,ve=ms(e,"ALLOWED_NAMESPACES")?ys({},e.ALLOWED_NAMESPACES,ls):Ee,de=ms(e,"ADD_URI_SAFE_ATTR")?ys(Es(me),e.ADD_URI_SAFE_ATTR,Se):me,ce=ms(e,"ADD_DATA_URI_TAGS")?ys(Es(ue),e.ADD_DATA_URI_TAGS,Se):ue,le=ms(e,"FORBID_CONTENTS")?ys({},e.FORBID_CONTENTS,Se):pe,z=ms(e,"FORBID_TAGS")?ys({},e.FORBID_TAGS,Se):{},W=ms(e,"FORBID_ATTR")?ys({},e.FORBID_ATTR,Se):{},oe=!!ms(e,"USE_PROFILES")&&e.USE_PROFILES,q=!1!==e.ALLOW_ARIA_ATTR,H=!1!==e.ALLOW_DATA_ATTR,Q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,G=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,J=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,se=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ae=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,I=e.ALLOWED_URI_REGEXP||$s,ge=e.NAMESPACE||be,_e=e.MATHML_TEXT_INTEGRATION_POINTS||_e,we=e.HTML_INTEGRATION_POINTS||we,B=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Fe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Fe(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),G&&(H=!1),te&&(ee=!0),oe&&($=ys({},Ps),R=[],!0===oe.html&&(ys($,ws),ys(R,Fs)),!0===oe.svg&&(ys($,xs),ys(R,Os),ys(R,As)),!0===oe.svgFilters&&(ys($,Ns),ys(R,Os),ys(R,As)),!0===oe.mathMl&&(ys($,Ss),ys(R,Ds),ys(R,As))),e.ADD_TAGS&&($===V&&($=Es($)),ys($,e.ADD_TAGS,Se)),e.ADD_ATTR&&(R===L&&(R=Es(R)),ys(R,e.ADD_ATTR,Se)),e.ADD_URI_SAFE_ATTR&&ys(de,e.ADD_URI_SAFE_ATTR,Se),e.FORBID_CONTENTS&&(le===pe&&(le=Es(le)),ys(le,e.FORBID_CONTENTS,Se)),ne&&($["#text"]=!0),J&&ys($,["html","head","body"]),$.table&&(ys($,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw fs('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 r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(s=t.getAttribute(r));const a="dompurify"+(s?"#"+s:"");try{return e.createPolicy(a,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(h,n)),null!==_&&"string"==typeof w&&(w=_.createHTML(""));Zt&&Zt(e),Ce=e}},De=ys({},[...xs,...Ns,...ks]),Ae=ys({},[...Ss,...Cs]),Te=function(e){is(s.removed,{element:e});try{E(e).removeChild(e)}catch(t){g(e)}},je=function(e,t){try{is(s.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){is(s.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Te(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Me=function(e){let t=null,s=null;if(Z)e="<remove></remove>"+e;else{const t=ps(e,/^[\r\n\t ]+/);s=t&&t[0]}"application/xhtml+xml"===Ne&&ge===be&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=_?_.createHTML(e):e;if(ge===be)try{t=(new m).parseFromString(a,Ne)}catch(e){}if(!t||!t.documentElement){t=x.createDocument(ge,"template",null);try{t.documentElement.innerHTML=ye?w:a}catch(e){}}const n=t.body||t.documentElement;return e&&s&&n.insertBefore(r.createTextNode(s),n.childNodes[0]||null),ge===be?S.call(t,J?"html":"body")[0]:J?t.documentElement:n},Ue=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)},Ie=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)},$e=function(e){return"function"==typeof l&&e instanceof l};function Ve(e,t,r){as(e,(e=>{e.call(s,t,r,Ce)}))}const Re=function(e){let t=null;if(Ve(P.beforeSanitizeElements,e,null),Ie(e))return Te(e),!0;const r=Se(e.nodeName);if(Ve(P.uponSanitizeElement,e,{tagName:r,allowedTags:$}),e.hasChildNodes()&&!$e(e.firstElementChild)&&hs(/<[/\w]/g,e.innerHTML)&&hs(/<[/\w]/g,e.textContent))return Te(e),!0;if(e.nodeType===Hs)return Te(e),!0;if(K&&e.nodeType===Qs&&hs(/<[/\w]/g,e.data))return Te(e),!0;if(!$[r]||z[r]){if(!z[r]&&Be(r)){if(B.tagNameCheck instanceof RegExp&&hs(B.tagNameCheck,r))return!1;if(B.tagNameCheck instanceof Function&&B.tagNameCheck(r))return!1}if(ne&&!le[r]){const t=E(e)||e.parentNode,s=v(e)||e.childNodes;if(s&&t){for(let r=s.length-1;r>=0;--r){const a=b(s[r],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,y(e))}}}return Te(e),!0}return e instanceof p&&!function(e){let t=E(e);t&&t.tagName||(t={namespaceURI:ge,tagName:"template"});const s=os(e.tagName),r=os(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===be?"svg"===s:t.namespaceURI===he?"svg"===s&&("annotation-xml"===r||_e[r]):Boolean(De[s]):e.namespaceURI===he?t.namespaceURI===be?"math"===s:t.namespaceURI===fe?"math"===s&&we[r]:Boolean(Ae[s]):e.namespaceURI===be?!(t.namespaceURI===fe&&!we[r])&&!(t.namespaceURI===he&&!_e[r])&&!Ae[s]&&(xe[s]||!De[s]):!("application/xhtml+xml"!==Ne||!ve[e.namespaceURI]))}(e)?(Te(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!hs(/<\/no(script|embed|frames)/i,e.innerHTML)?(G&&e.nodeType===qs&&(t=e.textContent,as([F,O,D],(e=>{t=cs(t,e," ")})),e.textContent!==t&&(is(s.removed,{element:e.cloneNode()}),e.textContent=t)),Ve(P.afterSanitizeElements,e,null),!1):(Te(e),!0)},Le=function(e,t,s){if(re&&("id"===t||"name"===t)&&(s in r||s in Pe))return!1;if(H&&!W[t]&&hs(A,t));else if(q&&hs(T,t));else if(!R[t]||W[t]){if(!(Be(e)&&(B.tagNameCheck instanceof RegExp&&hs(B.tagNameCheck,e)||B.tagNameCheck instanceof Function&&B.tagNameCheck(e))&&(B.attributeNameCheck instanceof RegExp&&hs(B.attributeNameCheck,t)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(t))||"is"===t&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&hs(B.tagNameCheck,s)||B.tagNameCheck instanceof Function&&B.tagNameCheck(s))))return!1}else if(de[t]);else if(hs(I,cs(s,M,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==us(s,"data:")||!ce[e]){if(Q&&!hs(j,cs(s,M,"")));else if(s)return!1}else;return!0},Be=function(e){return"annotation-xml"!==e&&ps(e,U)},ze=function(e){Ve(P.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Ie(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0};let a=t.length;for(;a--;){const n=t[a],{name:i,namespaceURI:o,value:l}=n,p=Se(i);let c="value"===i?l:ds(l);if(r.attrName=p,r.attrValue=c,r.keepAttr=!0,r.forceKeepAttr=void 0,Ve(P.uponSanitizeAttribute,e,r),c=r.attrValue,!ae||"id"!==p&&"name"!==p||(je(i,e),c="user-content-"+c),K&&hs(/((--!?|])>)|<\/(style|title)/i,c)){je(i,e);continue}if(r.forceKeepAttr)continue;if(je(i,e),!r.keepAttr)continue;if(!Y&&hs(/\/>/i,c)){je(i,e);continue}G&&as([F,O,D],(e=>{c=cs(c,e," ")}));const u=Se(e.nodeName);if(Le(u,p,c)){if(_&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(o);else switch(h.getAttributeType(u,p)){case"TrustedHTML":c=_.createHTML(c);break;case"TrustedScriptURL":c=_.createScriptURL(c)}try{o?e.setAttributeNS(o,i,c):e.setAttribute(i,c),Ie(e)?Te(e):ns(s.removed)}catch(e){}}}Ve(P.afterSanitizeAttributes,e,null)},We=function e(t){let s=null;const r=Ue(t);for(Ve(P.beforeSanitizeShadowDOM,t,null);s=r.nextNode();)Ve(P.uponSanitizeShadowNode,s,null),Re(s),ze(s),s.content instanceof i&&e(s.content);Ve(P.afterSanitizeShadowDOM,t,null)};return s.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,n=null,o=null,p=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!$e(e)){if("function"!=typeof e.toString)throw fs("toString is not a function");if("string"!=typeof(e=e.toString()))throw fs("dirty is not a string, aborting")}if(!s.isSupported)return e;if(X||Oe(t),s.removed=[],"string"==typeof e&&(ie=!1),ie){if(e.nodeName){const t=Se(e.nodeName);if(!$[t]||z[t])throw fs("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=Me("\x3c!----\x3e"),n=r.ownerDocument.importNode(e,!0),n.nodeType===Ws&&"BODY"===n.nodeName||"HTML"===n.nodeName?r=n:r.appendChild(n);else{if(!ee&&!G&&!J&&-1===e.indexOf("<"))return _&&se?_.createHTML(e):e;if(r=Me(e),!r)return ee?null:se?w:""}r&&Z&&Te(r.firstChild);const c=Ue(ie?e:r);for(;o=c.nextNode();)Re(o),ze(o),o.content instanceof i&&We(o.content);if(ie)return e;if(ee){if(te)for(p=k.call(r.ownerDocument);r.firstChild;)p.appendChild(r.firstChild);else p=r;return(R.shadowroot||R.shadowrootmode)&&(p=C.call(a,p,!0)),p}let u=J?r.outerHTML:r.innerHTML;return J&&$["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&hs(Ls,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),G&&as([F,O,D],(e=>{u=cs(u,e," ")})),_&&se?_.createHTML(u):u},s.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),X=!0},s.clearConfig=function(){Ce=null,X=!1},s.isValidAttribute=function(e,t,s){Ce||Oe({});const r=Se(e),a=Se(t);return Le(r,a,s)},s.addHook=function(e,t){"function"==typeof t&&is(P[e],t)},s.removeHook=function(e){return ns(P[e])},s.removeHooks=function(e){P[e]=[]},s.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},s}();function Js(){var e=Math.ceil(1e3),t=Math.floor(9999);return Math.floor(Math.random()*(t-e)+e)}function Xs(){return"wrapper-"+Js()+"-"+Js()}function Zs(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=sr(e),a=_.isUndefined(e.settings["cform-color-option"])?"forminator":e.settings["cform-color-option"];return s||"basic"!==r&&"theme"!==a?t:""}function er(e,t){return"basic"!==sr(e)?t:""}function tr(e){return"basic"===sr(e)?"basic-":""}function sr(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 rr(){return{"behaviour-thankyou":fr("Inline Message"),"behaviour-redirect":fr("Redirect user to a URL"),"behaviour-hide":fr("Hide form")}}function ar(e,t){let s=0;return t.map((t=>{t.fields.map((t=>{t.type===e&&s++}))})),s}function nr(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 r=0;return _.isEmpty(s)||(r=_.max(s)),parseInt(r)+1}function ir(e){return null===e}function or(e,t){let s=0;return!!ir(t)||(t.map((t=>{t.fields.map((t=>{t.type===e&&s++}))})),s>0)}function lr(e,t){const s=[];return"stripe"===e&&(t.map((e=>{e.fields.map((e=>{"stripe-ocs"===e.type&&s.push(e)}))})),s.length)||t.map((t=>{t.fields.map((t=>{t.type===e&&s.push(t)}))})),s}function pr(e,t){const s=[];return lr(e,t).map((t=>{let r=t.field_label;"address"===e&&(r=t.element_id),s.push({value:t.element_id,label:r,element_id:t.element_id})})),s}function cr(e,t){let s="";return t.map((t=>{t.fields.map((t=>{t.element_id===e&&(s=t.field_label)}))})),s}function ur(e,t){let s=0;return t.map((t=>{t.fields.map((t=>{t.element_id===e&&s++}))})),s>0}function dr(e,t,s){const r=forminatorData.fields.find((t=>t.slug===e)),a=nr(r.type,t),n={element_id:r.type+"-"+a,type:r.type,options:r.options,cols:12,conditions:{},wrapper_id:s};return _.contains(["calculation","number","slider","radio","currency","select","checkbox"],r.type)&&(n.hidden_behavior="zero"),_.extend(n,JSON.parse(JSON.stringify(r.defaults)))}function mr(e){return forminatorData.fields.find((t=>t.type===e.type))}function hr(e,t,s){return[...e.slice(0,t),s,...e.slice(t+1)]}function fr(){return Qt().translate.apply(null,arguments)}function br(e){return e.charAt(0).toUpperCase()+e.slice(1)}function gr(e,t){const s=t.value;let r;if(e.hasOptions&&e.values.length>0){let t;if(t=_.where(e.values,{value:s})[0],t||(t=_.where(e.values,{label:s})[0]),!t)return;r=t.label}else r="date"===e.field_type&&["is_before","is_after"].includes(t.rule)?yr(s):s;return _.isEmpty(r)?fr("null"):r}function yr(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 vr(e,t,s,r,a){let n=[];_.isUndefined(t)&&(t=["page-break","postdata","total","product","captcha"]),Array.isArray(t)&&!Or(a)&&t.push("group");let i=!1;return _.isUndefined(s)||_.isUndefined(s.main_date_field)||!0!==s.main_date_field||(i=!0),e.map((e=>{const s=e.fields,o=e.parent_group;s.map((e=>{if(_.isUndefined(r)){if(_.contains(t,e.type))return}else if(!_.contains(r,e.type))return;let s;_.isUndefined(e.field_label)||_.isEmpty(e.field_label)?(s=e.type,s=br(s)):s=e.field_label,"name"!==e.type||Or(a)?"address"!==e.type||Or(a)?"slider"===e.type&&"range"===e.slider_type?n=n.concat(function(e,t,s){const r=[];return[{suffix:"min"},{suffix:"max"}].map((a=>{r.push({element_id:e.element_id+"-"+a.suffix,parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-"+a.suffix,label:t+" - "+a.suffix,isNumber:!0,hasCalcs:_r(e)})})),r}(e,s,o)):"time"!==e.type||Or(a)?"date"===e.type&&"picker"!==e.field_type&&!1===i||n.push({element_id:e.element_id,parent_group:o,required:e.required,field_type:e.type,field_slug:e.type,label:s,values:Nr(e),hasOptions:xr(e),hasCalcs:_r(e),formula:wr(e),isNumber:Er(e),fieldData:e}):n=n.concat(function(e,t,s){const r=[];let a,n;a=_.isUndefined(e.hh_label)||_.isEmpty(e.hh_label)?t+" - "+fr("Hour"):t+" - "+e.hh_label;n=_.isUndefined(e.mm_label)||_.isEmpty(e.mm_label)?t+" - "+fr("Minute"):t+" - "+e.mm_label;r.push({element_id:e.element_id+"-hours",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-hours",label:a,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:n,values:!1,hasOptions:!1,isNumber:!0}),"twelve"===e.time_type&&r.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 r}(e,s,o)):n=n.concat(function(e,t,s){const r=[];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((a=>{if(Or(e[a.attr])){let n;n=_.isUndefined(e[a.label])||_.isEmpty(e[a.label])?t+" - ":t+" - "+e[a.label],r.push({element_id:e.element_id+"-"+a.element_suffix,parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-"+a.element_suffix,label:n,values:a.values,hasOptions:a.hasOptions,isNumber:a.isNumber})}})),r}(e,s,o)):n=n.concat(function(e,t,s){const r=[];"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((a=>{if("true"===e[a.attr]||!0===e[a.attr]){let n;n=_.isUndefined(e[a.label])||_.isEmpty(e[a.label])?t+" - ":t+" - "+e[a.label],r.push({element_id:e.element_id+"-"+a.element_suffix,parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-"+a.element_suffix,label:n,values:a.values,hasOptions:a.hasOptions,isNumber:a.isNumber})}})):r.push({element_id:e.element_id,parent_group:s,required:e.required,field_type:e.type,field_slug:e.type,label:t,values:Nr(e),hasOptions:xr(e),isNumber:Er(e)});return r}(e,s,o)),"date"!==e.type||"picker"===e.field_type||Or(a)||(n=n.concat(function(e,t,s){const r=[];let a,n,i;a=_.isUndefined(e.day_label)||_.isEmpty(e.day_label)?t+" - "+fr("Day"):t+" - "+e.day_label;n=_.isUndefined(e.month_label)||_.isEmpty(e.month_label)?t+" - "+fr("Month"):t+" - "+e.month_label;i=_.isUndefined(e.year_label)||_.isEmpty(e.year_label)?t+" - "+fr("Year"):t+" - "+e.year_label;"input"===e.field_type?r.push({element_id:e.element_id+"-day",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-day",label:a,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:n,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:i,values:!1,hasOptions:!1,isNumber:!0}):r.push({element_id:e.element_id+"-day",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-day",label:a,values:Nr(e),hasOptions:xr(e),isNumber:Er(e)},{element_id:e.element_id+"-month",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-month",label:n,values:Nr(e),hasOptions:xr(e),isNumber:Er(e)},{element_id:e.element_id+"-year",parent_group:s,required:e.required,field_type:e.type,field_slug:e.type+"-year",label:i,values:Nr(e),hasOptions:xr(e),isNumber:Er(e)});return r}(e,s,o)))}))})),n.map((e=>{e.label=function(e){if(!e)return"";e=Ks.sanitize(e,{ALLOWED_TAGS:[],ALLOWED_ATTR:[]});const t=document.createElement("div");t.innerHTML=e;const s=t.textContent||t.innerText||"";return Ks.sanitize(s,{ALLOWED_TAGS:[],ALLOWED_ATTR:[]})}(e.label)})),n}function Er(e){return!!_.contains(["calculation","number","slider","phone","currency"],e.type)}function _r(e){return"true"===e.calculations||!0===e.calculations}function wr(e){return!!e.formula&&e.formula}function xr(e){return"select"===e.type||"checkbox"===e.type||"radio"===e.type}function Nr(e){const t=e.type;return("select"===t||"checkbox"===t||"radio"===t)&&e.options}function kr(e,t,s){let r=_.isUndefined(s)?"":s;switch(e){case"is":return fr("is");case"is_not":return fr("is not");case"day_is":return fr("day is");case"day_is_not":return fr("day is not");case"month_is_not":return fr("month is not");case"month_is":return fr("month is");case"is_before":return fr("is before");case"is_after":return fr("is after");case"is_before_n_or_more_days":return fr("is before %s or more days from current date").replace("%s",r);case"is_before_less_than_n_days":return fr("is before less than %s days from current date").replace("%s",r);case"is_after_n_or_more_days":return fr("is after %s or more days from current date").replace("%s",r);case"is_after_less_than_n_days":return fr("is after less than %s days from current date").replace("%s",r);case"is_great":return fr("is greater than");case"is_less":return fr("is less than");case"contains":return fr("contains");case"does_not_contain":return fr("does not contain");case"starts":return fr("starts with");case"ends":return fr("ends with");case"is_correct":return fr("is correct");case"is_incorrect":return fr("is incorrect");case"is_final_result":return fr("is final result");case"is_not_final_result":return fr("is not final result");default:return"-"}}function Sr(e){const t=[];return _.each(forminatorData.fields,(e=>{"calculation"!==e.type&&t.push(e.type)})),vr(e,t)}function Cr(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 Pr(e,t,s,r){let a=0;return!!ir(e)||(e.map((e=>{e.fields.map((e=>{t===e.type&&r===e[s]&&a++}))})),a>0)}function Fr(e,t){let s=[];return _.each(t,(function(t,r){if(t.amount_type&&t.plan_name||(e.error=fr("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(r)),"single"===t.payment_method&&("fixed"===t.amount_type&&_.isEmpty(t.amount)||"variable"===t.amount_type&&_.isEmpty(t.variable)))e.error=fr("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(r);else if("subscription"===t.payment_method){forminatorData.hasStripePro||(e.error=fr("Stripe Subscription Add-on is required."),e.isValid=!1,s.push(r));const a=_.isUndefined(t.subscription_amount_type)?"fixed":t.subscription_amount_type,n=_.isUndefined(t.quantity_type)?"fixed":t.quantity_type,i=_.isUndefined(t.quantity)?1:t.quantity,o=_.isUndefined(t.bill_input)?1:t.bill_input;("fixed"===a&&_.isEmpty(t.subscription_amount)||"variable"===a&&_.isEmpty(t.subscription_variable))&&(e.error=fr("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(r)),("fixed"===n&&!i||"variable"===n&&_.isEmpty(t.variable_quantity))&&(e.error=fr("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(r)),o?o<=0&&(e.error=fr("Billing frequency should be greater than or equal to 1"),e.isValid=!1,s.push(r)):(e.error=fr("Please fix the error(s) in the SETTINGS tab."),e.isValid=!1,s.push(r))}})),s.length>0&&(e.paymentKey=s),e}function Or(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 Dr(){for(var e={},t=location.search.substring(1).split("&"),s=0;s<t.length;s++){var r=t[s].split("=");e[r[0]]=decodeURIComponent(r[1])}return e}function Ar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank";window.open(e,t)}function Tr(e){return!_.isUndefined(e.descriptionExist)&&e.descriptionExist||!_.isUndefined(e.state.type)&&_.contains(["address","postdata"],e.state.type)}function jr(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function Mr(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(s),!0).forEach((function(t){Ur(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):jr(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}function Ur(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 r=s.call(e,t||"default");if("object"!=typeof r)return r;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 Ir={modalType:null,modalProps:{}};const $r=Dt({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,r=e.findIndex((e=>e.wrapper_id===s.wrapper_id));return hr(e,r,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 Mr(Mr({},e),s)}(s,t);case"RESET_SETTINGS":return function(e,t){const{settings:s}=t;return Mr({},s)}(0,t);case"UPDATE_SETTING":return function(e,t){const{setting:s,value:r}=t;return e[s]=r,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]:Ir,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 Ir;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,r=e.findIndex((e=>e.slug===s.slug));return hr(e,r,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,r=e.findIndex((e=>e.slug===s.slug));return hr(e,r,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 Vr=$r;var Rr=wp.element;const Lr=(e,t)=>s=>{window.forminatorChanges.settings=!0,s({type:"UPDATE_SETTING",setting:e,value:t})},Br=e=>t=>{window.forminatorChanges.settings=!0,t({type:"UPDATE_SETTINGS",settings:e})},zr=e=>t=>{window.forminatorChanges.settings=!0,t({type:"RESET_SETTINGS",settings:e})},Wr=(e,t)=>s=>{window.forminatorChanges={fields:[],settings:!1,saved:!0},s({type:"UPDATE_SETTING",setting:e,value:t})},qr=(e,t)=>s=>{s({type:"SHOW_MODAL",modalProps:e,modalType:t})},Hr=()=>e=>{e({type:"HIDE_MODAL"})},Qr="UPDATE_TITLE";function Yr(e){return window.forminatorChanges.settings=!0,{type:Qr,title:e}}class Gr extends Rr.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")}}class Kr extends Rr.Component{constructor(e){super(e);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,dropdownLabel:fr("Open form options")},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,dropdownLabel:fr("Open poll options")},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,dropdownLabel:fr("Open quiz options")}};this.copyToClipboard=this.copyToClipboard.bind(this),this.resetTrackingData=this.resetTrackingData.bind(this),this.data=t[this.props.type]}copyToClipboard(){this.input.select(),document.execCommand("copy");new Gr({type:"success",text:fr("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){let t=e.success?"success":"error",s=e.data||fr("Something went wrong.");new Gr({type:t,text:s,time:4e3}).open()}}))}render(){const e=this.data.processAction+"&export=true&module_id="+this.props.id+"&exportnonce="+this.data.exportNonce+"&module_type="+this.data.type,t=this.data.processAction+"&delete=true&module_id="+this.props.id+"&nonce="+this.data.processNonce+"&module_type="+this.data.type;let s=fr("Create New Form");return"poll"===this.props.type&&(s=fr("Create New Poll")),"quiz"===this.props.type&&(s=fr("Create New Quiz")),c().createElement(Rr.Fragment,null,c().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}),c().createElement("div",{className:this.props.hasLead?"sui-dropdown fui-dropdown-soon":"sui-dropdown"},c().createElement("button",{className:"sui-button-icon sui-dropdown-anchor","aria-label":"Dropdown"},c().createElement("span",{className:"sui-icon-widget-settings-config sui-md","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},this.data.dropdownLabel)),c().createElement("ul",null,c().createElement("li",null,c().createElement("button",{className:"forminator-field-edit",onClick:this.copyToClipboard},c().createElement("span",{className:"sui-icon-code","aria-hidden":"true"}),fr("Copy Shortcode"))),c().createElement("li",null,c().createElement("a",{className:"forminator-field-edit",href:this.data.submissions},c().createElement("span",{className:"sui-icon-community-people","aria-hidden":"true"}),fr("View Submissions"))),c().createElement("li",null,c().createElement("form",{method:"post",action:this.data.processAction},c().createElement("input",{type:"hidden",name:"forminator_action",value:"clone"}),c().createElement("input",{type:"hidden",name:"id",value:this.props.id}),c().createElement("input",{type:"hidden",id:"forminatorNonce",name:"forminatorNonce",value:forminatorData.cloneNonce}),c().createElement("input",{type:"hidden",name:"forminatorRedirect",value:"false"}),this.props.hasLead&&c().createElement("button",{type:"submit",disabled:"disabled",className:"fui-button-with-tag sui-tooltip sui-tooltip-left sui-constrained","data-tooltip":fr("Duplicate isn't supported at the moment for the quizzes with lead capturing enabled.")},c().createElement("span",{className:"sui-icon-page-multiple","aria-hidden":"true"}),c().createElement("span",{className:"fui-button-label"},fr("Duplicate")),c().createElement("span",{className:"sui-tag sui-tag-blue sui-tag-sm"},fr("Coming soon"))),!this.props.hasLead&&c().createElement("button",{type:"submit"},c().createElement("span",{className:"sui-icon-page-multiple","aria-hidden":"true"}),fr("Duplicate")))),c().createElement("li",null,c().createElement("a",{className:"forminator-field-edit",onClick:this.resetTrackingData},c().createElement("span",{className:"sui-icon-update","aria-hidden":"true"}),fr("Reset Tracking Data"))),c().createElement("li",null,this.props.hasLead&&c().createElement("a",{href:"#",className:"fui-button-with-tag sui-tooltip sui-tooltip-left","data-tooltip":fr("Export isn't supported at the moment for the quizzes with lead capturing enabled.")},c().createElement("span",{className:"sui-icon-cloud-migration","aria-hidden":"true"}),c().createElement("span",{className:"fui-button-label"},fr("Export")),c().createElement("span",{className:"sui-tag sui-tag-blue sui-tag-sm"},fr("Coming soon"))),!this.props.hasLead&&c().createElement("a",{className:"forminator-field-edit",href:e},c().createElement("span",{className:"sui-icon-cloud-migration","aria-hidden":"true"}),fr("Export"))),c().createElement("li",null,c().createElement("a",{className:"forminator-field-edit sui-option-red",href:t},c().createElement("span",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete"))))),c().createElement("a",{href:forminatorData.dashboardUrl+"&createnew="+this.props.type,className:"sui-button-icon sui-tooltip sui-tooltip-bottom","data-tooltip":s},c().createElement("span",{className:"sui-icon-plus sui-md","aria-hidden":"true"})))}}function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Jr.apply(null,arguments)}class Xr extends Rr.Component{constructor(e){super(e)}render(){const{title:e}=this.props,t=_.isEmpty(e.trim()),s=t?"sui-form-field-error":"",r="pdf-form"===this.props.formType,a=r?"sui-field-has-suffix":"";let n={};return"leads"===this.props.formType&&(n={borderColor:"#ddd",backgroundColor:"#fafafa",color:"#666"}),c().createElement(Rr.Fragment,null,c().createElement("div",{className:`sui-form-field ${s}`},r&&c().createElement("strong",{className:"sui-field-prefix"},forminatorData.parent_form_name," -"),c().createElement("label",{htmlFor:"forminator-set-title",id:"forminator-set-title-label",className:"sui-screen-reader-text"},fr("Name your form")),c().createElement("input",{type:"text",value:e,placeholder:fr("Give your form a name"),id:"forminator-set-title",className:`sui-form-control ${a}`,style:n,"aria-labelledby":"forminator-set-title-label","aria-describedby":"forminator-set-title-message","aria-required":"true",accessKey:"t",onChange:e=>this.props.actions.navigationActions.updateTitle(e.target.value),disabled:"leads"===this.props.formType}),r&&c().createElement("strong",{className:"sui-field-suffix"},".pdf"),c().createElement("p",{role:"alert",id:"forminator-set-title-message",className:"sui-error-message",style:{display:t?"block":"none",marginBottom:0}},t&&fr("Please, enter a valid name."))),"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&c().createElement(Kr,Jr({},this.props,{type:"form"})))}}function Zr(e){return forminatorData.showDocLink?c().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#forms",target:"_blank",className:"sui-button sui-button-ghost"},c().createElement("span",{className:"sui-icon-academy"})," ",fr("View Documentation")):""}class ea extends Rr.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 c().createElement("button",{className:"sui-button sui-sidenav-hide-md",onClick:this.openModal},c().createElement("span",{className:"sui-icon-upload-cloud"})," ",fr("Save to Cloud"))}}var ta=le((function(e){return{id:e.settings.form_id,title:e.settings.formName||"",formType:e.settings["form-type"]||""}}),(function(r){return{actions:{navigationActions:Tt(s,r),modalActions:Tt(t,r),settingsActions:Tt(e,r)}}}))((function(e){const t="pdf-form"===e.formType,s="pdf-form"===e.formType?fr("Edit PDF"):fr("Edit Form");return c().createElement("div",{className:"sui-header fui-header-with-settings"},c().createElement("div",{className:"fui-header-title"},c().createElement("h1",{className:"sui-header-title"},s),c().createElement("div",{className:"sui-actions-right"},!t&&!forminatorData.cloudDisabled&&c().createElement(ea,e),c().createElement(Zr,e))),c().createElement("div",{className:"fui-header-settings"},c().createElement("div",{className:"sui-actions-left"},c().createElement(Xr,e)),c().createElement("div",{className:"sui-actions-right"},!t&&!forminatorData.cloudDisabled&&c().createElement(ea,e),c().createElement(Zr,e))))})),sa=a(961),ra=a.t(sa,2);function aa(){return aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},aa.apply(this,arguments)}function na(e,t){if(null==e)return{};var s,r,a={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(a[s]=e[s]);return a}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ia=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],oa=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"];try{window.__reactRouterVersion="6"}catch(e){}const la=p.createContext({isTransitioning:!1});new Map;p.startTransition,ra.flushSync,p.useId;const pa="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ca=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ua=p.forwardRef((function(e,t){let s,{onClick:r,relative:a,reloadDocument:n,replace:i,state:o,target:l,to:c,preventScrollReset:u,viewTransition:d}=e,m=na(e,ia),{basename:h}=p.useContext(Ye),f=!1;if("string"==typeof c&&ca.test(c)&&(s=c,pa))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),s=Te(t.pathname,h);t.origin===e.origin&&null!=s?c=s+t.search+t.hash:f=!0}catch(e){}let b=function(e,t){let{relative:s}=void 0===t?{}:t;Xe()||de(!1);let{basename:r,navigator:a}=p.useContext(Ye),{hash:n,pathname:i,search:o}=st(e,{relative:s}),l=i;return"/"!==r&&(l="/"===i?r:$e([r,i])),a.createHref({pathname:l,search:o,hash:n})}(c,{relative:a}),g=function(e,t){let{target:s,replace:r,state:a,preventScrollReset:n,relative:i,viewTransition:o}=void 0===t?{}:t,l=tt(),c=Ze(),u=st(e,{relative:i});return p.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!==r?r:fe(c)===fe(u);l(e,{replace:s,state:a,preventScrollReset:n,relative:i,viewTransition:o})}}),[c,l,u,r,a,s,e,n,i,o])}(c,{replace:i,state:o,target:l,preventScrollReset:u,relative:a,viewTransition:d});return p.createElement("a",aa({},m,{href:s||b,onClick:f||n?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:l}))}));const da=p.forwardRef((function(e,t){let{"aria-current":s="page",caseSensitive:r=!1,className:a="",end:n=!1,style:i,to:o,viewTransition:l,children:c}=e,u=na(e,oa),d=st(o,{relative:u.relative}),m=Ze(),h=p.useContext(Qe),{navigator:f,basename:b}=p.useContext(Ye),g=null!=h&&function(e,t){void 0===t&&(t={});let s=p.useContext(la);null==s&&de(!1);let{basename:r}=fa(ma.useViewTransitionState),a=st(e,{relative:t.relative});if(!s.isTransitioning)return!1;let n=Te(s.currentLocation.pathname,r)||s.currentLocation.pathname,i=Te(s.nextLocation.pathname,r)||s.nextLocation.pathname;return null!=De(a.pathname,i)||null!=De(a.pathname,n)}(d)&&!0===l,y=f.encodeLocation?f.encodeLocation(d).pathname:d.pathname,v=m.pathname,E=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(v=v.toLowerCase(),E=E?E.toLowerCase():null,y=y.toLowerCase()),E&&b&&(E=Te(E,b)||E);const _="/"!==y&&y.endsWith("/")?y.length-1:y.length;let w,x=v===y||!n&&v.startsWith(y)&&"/"===v.charAt(_),N=null!=E&&(E===y||!n&&E.startsWith(y)&&"/"===E.charAt(y.length)),k={isActive:x,isPending:N,isTransitioning:g},S=x?s:void 0;w="function"==typeof a?a(k):[a,x?"active":null,N?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof i?i(k):i;return p.createElement(ua,aa({},u,{"aria-current":S,className:w,ref:t,style:C,to:o,viewTransition:l}),"function"==typeof c?c(k):c)}));var ma,ha;function fa(e){let t=p.useContext(He);return t||de(!1),t}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ma||(ma={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ha||(ha={}));function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ba.apply(null,arguments)}const ga=e=>function(t){const s=Ze(),r=tt(),a=function(){let{matches:e}=p.useContext(Ke),t=e[e.length-1];return t?t.params:{}}();return c().createElement(e,ba({},t,{router:{location:s,navigate:r,params:a}}))};class ya extends Rr.Component{constructor(e){super(e),this.updateValue=this.updateValue.bind(this)}componentDidMount(){this.$el=jQuery(this.el),SUI.select.init(this.$el),this.updateValue=this.updateValue.bind(this),this.$el.on("change",this.updateValue)}updateValue(e){const t=e.target.value;this.props.router.navigate("/"+t)}componentWillUnmount(){this.$el.off("change",this.updateValue),this.$el.unbind().removeData()}render(){return c().createElement("div",{className:"sui-form-field sui-sidenav-hide-lg"},c().createElement("label",{className:"sui-label"},fr("Navigate")),c().createElement("select",{className:"sui-select sui-mobile-nav",ref:e=>this.el=e},this.props.children))}}var va=ga(ya);class Ea extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement("ul",{className:"sui-vertical-tabs sui-sidenav-sticky sui-sidenav-hide-md fui-sidenav"},c().createElement("li",{className:"sui-vertical-tab"},c().createElement(da,{to:"/builder",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("Fields"))),c().createElement("li",{className:"sui-vertical-tab"},c().createElement(da,{to:"/appearance",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("Appearance"))),"registration"===this.props.formType&&c().createElement("li",{className:"sui-vertical-tab"},c().createElement(da,{to:"/registration",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("User Registration"))),"login"===this.props.formType&&c().createElement("li",{className:"sui-vertical-tab"},c().createElement(da,{to:"/login",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("User Login"))),"pdf-form"!==this.props.formType&&c().createElement("li",{className:"sui-vertical-tab"},c().createElement(da,{to:"/behaviour",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("Behavior"))),"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&c().createElement("li",{className:"sui-vertical-tab"},c().createElement(da,{to:"/pdf",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("PDF"))),c().createElement("li",{className:"sui-vertical-tab"},"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&c().createElement(da,{to:"/notifications",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("Email Notifications")),"leads"===this.props.formType&&c().createElement(da,{to:"#",className:e=>{let{isActive:t}=e;return(t?"current ":"")+"sui-tooltip sui-tooltip-right sui-tooltip-constrained"},style:{"--tooltip-width":"235px"},"data-tooltip":fr("You can configure email notifications on the parent quiz as it is shared between this form and the parent quiz.")},c().createElement("span",{style:{opacity:"0.4"}},fr("Email Notifications"),c().createElement("i",{className:"sui-icon-lock","aria-hidden":"true"})))),c().createElement("li",{className:"sui-vertical-tab"},"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&c().createElement(da,{to:"/integrations",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("Integrations")),"leads"===this.props.formType&&c().createElement(da,{to:"#",className:e=>{let{isActive:t}=e;return(t?"current ":"")+"sui-tooltip sui-tooltip-right sui-tooltip-constrained"},style:{"--tooltip-width":"235px"},"data-tooltip":fr("You can configure integrations on the parent quiz as it is shared between this form and the parent quiz.")},c().createElement("span",{style:{opacity:"0.4"}},fr("Integrations"),c().createElement("i",{className:"sui-icon-lock","aria-hidden":"true"})))),c().createElement("li",{className:"sui-vertical-tab"},"pdf-form"===this.props.formType&&c().createElement(da,{to:"#",className:e=>{let{isActive:t}=e;return(t?"current ":"")+"sui-tooltip sui-tooltip-top sui-tooltip-constrained"},style:{"--tooltip-width":"169px"},"data-tooltip":fr("More settings options are coming soon")},c().createElement("span",{style:{opacity:"0.4"}},fr("Settings"),c().createElement("i",{className:"sui-icon-lock sui-sm","aria-hidden":"true"}))),"pdf-form"!==this.props.formType&&c().createElement(da,{to:"/settings",className:e=>{let{isActive:t}=e;return t?"current":""}},fr("Settings")))),c().createElement(va,this.props,c().createElement("option",{value:""},fr("Fields")),c().createElement("option",{value:"appearance"},fr("Appearance")),"registration"===this.props.formType&&c().createElement("option",{value:"registration"},fr("User Registration")),"login"===this.props.formType&&c().createElement("option",{value:"login"},fr("User Login")),"pdf-form"!==this.props.formType&&c().createElement("option",{value:"behaviour"},fr("Behavior")),"leads"!==this.props.formType&&"pdf-form"!==this.props.formType&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"pdf"},fr("PDF")),c().createElement("option",{value:"notifications"},fr("Email Notifications")),c().createElement("option",{value:"integrations"},fr("Integrations"))),"pdf-form"!==this.props.formType&&c().createElement("option",{value:"settings"},fr("Settings"))))}}var _a=ga(Ea);var wa=le((function(e){return{id:e.settings.form_id,title:e.settings.formName||"",formType:e.settings["form-type"]||"default"}}),(function(e){return{actions:{navigationActions:Tt(s,e),modalActions:Tt(t,e)}}}))((function(e){return c().createElement("div",{className:"sui-sidenav fui-sidenav"},c().createElement(_a,e))})),xa=a(2505),Na=a.n(xa),ka=a(5373),Sa=a.n(ka);function Ca(e){const{status:t,formType:s}=e;let r="";switch(t){case"publish":r="sui-tag-published";break;case"pdf_form":r="sui-tag-pdf-form";break;default:r="sui-tag-draft"}const a=!(!e.state.draftLoading&&!e.state.publishLoading);return c().createElement("div",{className:"sui-status"},"pdf-form"===s&&c().createElement("a",{href:forminatorData.adminUrl+"admin.php?page=forminator-cform-wizard&id="+forminatorData.parent_form_id+"&gotosection=pdf",className:"sui-button sui-button-ghost",style:{marginRight:"20px"}},c().createElement(Rr.Fragment,null,c().createElement("span",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("Back to form"))),c().createElement("div",{className:"sui-status-module"},fr("Status"),"pdf-form"!==e.formType&&c().createElement("span",{className:`sui-tag ${r}`},fr("publish"===t?"Published":"Draft"))),a&&c().createElement("div",{className:"sui-status-changes"},c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}),fr("Saving…")),!a&&e.changed.settings&&c().createElement("div",{className:"sui-status-changes"},c().createElement("i",{className:"sui-icon-update","aria-hidden":"true"}),fr("Unsaved changes")),!a&&!e.changed.settings&&e.changed.saved&&c().createElement("div",{className:"sui-status-changes"},c().createElement("i",{className:"sui-icon-check-tick","aria-hidden":"true"}),fr("Saved")))}class Pa extends Rr.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:fr("Preview")},"preview"),jQuery("#forminator-module-styles-"+this.props.id).remove()}openModal(e){"pdf-form"===this.props.formType?Ar(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"pdf-form"===this.props.formType&&(Or(forminatorData.pdfExtensionsEnabled)||(e=!0)),c().createElement("button",{id:"forminator-preview-button",className:"sui-button sui-button-ghost",accessKey:"p",onClick:this.openModal,disabled:e},c().createElement("i",{className:"sui-icon-eye","aria-hidden":"true"})," ",fr("Preview"))}}function Fa(){return Fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Fa.apply(null,arguments)}class Oa extends Rr.Component{constructor(e){super(e),this.publish=this.publish.bind(this),this.draft=this.draft.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"publish")}publish(){const{status:e,title:t}=this.props;_.isEmpty(t.trim())||(this.props.publish(),("draft"===e||_.isEmpty(e))&&this.props.actions.modalActions.showModal({open:!0,closeModal:this.closeModal},"publish"))}draft(){const{title:e}=this.props;_.isEmpty(e.trim())||this.props.draft()}render(){const{draftLoading:e,publishLoading:t}=this.props.state,s=forminatorData.currentForm.settings["form-type"]||"default";let{status:r}=this.props;return"pdf-form"===s&&(r="pdf_form"),c().createElement("div",{className:"sui-actions"},"leads"!==s&&"pdf-form"!==s&&c().createElement("button",{id:"forminator-module-save",className:"sui-button sui-button-ghost",style:{borderColor:"transparent"},disabled:!!e||t,onClick:this.draft},"publish"===r&&c().createElement(Rr.Fragment,null,c().createElement("span",{className:"sui-icon-unpublish","aria-hidden":"true"}),fr("Unpublish")),"publish"!==r&&c().createElement(Rr.Fragment,null,c().createElement("span",{className:"sui-icon-save","aria-hidden":"true"}),fr("Save Draft"))),c().createElement(Pa,Fa({},this.props,{disabled:!(!e&&!t),formType:s})),c().createElement("button",{id:"forminator-module-publish",className:"sui-button sui-button-blue",disabled:!(!e&&!t),onClick:this.publish},c().createElement("span",{className:"sui-loading-text"},c().createElement("span",{className:"sui-icon-web-globe-world","aria-hidden":"true"}),c().createElement("span",{className:"button-text"},(()=>{switch(r){case"publish":return fr("Update");case"pdf_form":return fr("Save changes");default:return fr("Publish")}})())),c().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))}}function Da(){return Da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Da.apply(null,arguments)}class Aa extends Rr.Component{constructor(e){super(e),this.state={publishLoading:!1,draftLoading:!1},this.publish=this.publish.bind(this),this.draft=this.draft.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())}publish(){const{state:e}=this.props,{form_id:t,formName:s}=e.settings,r=_.isUndefined(s)?"":s,a=_.isUndefined(t)?-1:t;this.setState({publishLoading:!0});const n={action:"forminator_save_builder",_wpnonce:forminatorData.formNonce,formName:r,form_id:a,status:"publish",version:forminatorData.version,data:JSON.stringify(e)};setTimeout((()=>{this.save(n,"publish")}),1500)}draft(){const{state:e}=this.props,{form_id:t,formName:s}=e.settings,r=_.isUndefined(s)?"":s,a=_.isUndefined(t)?-1:t;this.setState({draftLoading:!0});const n={action:"forminator_save_builder",_wpnonce:forminatorData.formNonce,formName:r,form_id:a,status:"draft",version:forminatorData.version,data:JSON.stringify(e)};setTimeout((()=>{this.save(n,"draft")}),1500)}showReadyToGoModel(){const e=this;e.props.actions.modalActions.showModal({open:!0,closeModal:t=>{e.props.actions.modalActions.showModal({open:!1},"shortcode")}},"shortcode")}save(e,t){const s=this,{status:r,state:a}=this.props;Na().post(forminatorData.ajaxUrl,Sa().stringify(e)).then((n=>{const i=lr("stripe",a.wrappers),o="draft"===r&&"publish"===t||_.isUndefined(r)&&"publish"===t;if(n.data.success){if(this.reloadPageForSubscriptionPlans(i)){if(o){let e=window.location.href;return e+="&ready-to-go=show",void(window.location.href=e)}location.reload()}-1===e.form_id&&(this.props.actions.settingsActions.updateSetting("form_id",n.data.data),forminatorData.currentForm.settings.form_id=n.data.data,window.history.pushState({},"Edit Form",forminatorData.formEditUrl+"&id="+n.data.data)),this.props.actions.settingsActions.saveBuilder("form_status",t),o&&this.showReadyToGoModel()}else{o&&s.props.actions.modalActions.showModal({open:!1,closeModal:this.closeModal},"publish");let e=!1,t=fr("Something went wrong while saving your form. Please try again.");_.isUndefined(n.data.data)||"string"!=typeof n.data.data?_.isUndefined(n.data.data)||"object"!=typeof n.data.data||(_.isUndefined(n.data.data[0].code)||"forminator_stripe_authentication_error"!==n.data.data[0].code||(e=!0),_.isUndefined(n.data.data[0].message)||(t=n.data.data[0].message)):t=n.data.data;new Gr({type:"error",text:t,dismiss:e}).open()}this.setState({publishLoading:!1,draftLoading:!1})})).catch((e=>{new Gr({type:"error",text:fr("Something went wrong while saving your form. Please try again.")}).open(),console.log(e),this.setState({publishLoading:!1,draftLoading:!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}),t}render(){return c().createElement("div",{className:"sui-box-status"},c().createElement(Ca,Da({},this.props,{state:this.state,formType:this.props.state.settings["form-type"]})),c().createElement(Oa,Da({},this.props,{publish:this.publish,draft:this.draft,state:this.state})))}}var Ta=le((function(e){return{id:e.settings.form_id,status:e.settings.form_status,state:e,title:e.settings.formName||"",changed:window.forminatorChanges}}),(function(s){return{actions:{settingsActions:Tt(e,s),modalActions:Tt(t,s)}}}))(Aa);const ja=e=>t=>{window.forminatorChanges.settings=!0,t({type:"UPDATE_FIELDS",wrappers:e})},Ma=e=>t=>{window.forminatorChanges.settings=!0,t({type:"UPDATE_FIELD",wrapper:e})},Ua=(e,t)=>s=>{window.forminatorChanges.fields.push(t),window.forminatorChanges.settings=!0,s({type:"UPDATE_FIELD",wrapper:e})},Ia=e=>t=>{window.forminatorChanges.settings=!0,t({type:"UPDATE_INTEGRATION_CONDITIONS",conditions:e})},$a=e=>t=>{window.forminatorChanges.settings=!0,t({type:"UPDATE_BEHAVIORS",behaviors:e})},Va=e=>t=>{window.forminatorChanges.settings=!0,t({type:"UPDATE_BEHAVIOR",behavior:e})},Ra=e=>t=>{window.forminatorChanges.settings=!0,t({type:"UPDATE_NOTIFICATIONS",notifications:e})},La=e=>t=>{window.forminatorChanges.settings=!0,t({type:"UPDATE_NOTIFICATION",notification:e})};class Ba extends Rr.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?fr("Add fields to group"):fr("Insert 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(){const e="pdf-form"===this.props.formType?"blue":"purple";if("true"===this.props.header)return c().createElement("div",{className:"sui-box-header fui-builder-section--insert","data-testid":"forminator-insert-fields"},c().createElement("button",{className:`sui-button sui-button-${e} forminator-open-insert-fields`,onClick:this.openModal},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.actionText));let t;return 0!==this.props.wrappers.length||this.groupId||"pdf-form"===this.props.formType||(t=c().createElement(Rr.Fragment,null,c().createElement("p",{className:"sui-block-content-center"},c().createElement("small",null,fr("A form without fields isn’t going to be very useful… Add your first field above!"))))),c().createElement("div",{"data-testid":"forminator-insert-fields",className:"fui-builder-fields--footer"},c().createElement("button",{className:"sui-button sui-button-dashed forminator-open-insert-fields",onClick:this.openModal},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.actionText),t)}}function za(){return za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},za.apply(null,arguments)}class Wa extends Rr.Component{constructor(e){super(e),this.el=c().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"],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:".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 r=Xs();_.isUndefined(s)&&(s="");let a=[],n=[...t];e.map((t=>{const i=(t=JSON.parse(JSON.stringify(t))).element_id,o=1===e.length?12:t.cols,l=function(e,t,s,r,a){const n=[...r,{fields:a=a||[]}],i=nr(e.type,n);return _.extend(e,{element_id:e.type+"-"+i,formID:t,cols:s})}(t,r,o,n,a),p=l.element_id;s&&(l.parent_group=s),a=[...a,l],"group"===t.type&&this.props.wrappers.filter((e=>e.parent_group===i)).reverse().map((e=>{n=this.duplicateFieldRecursively(e.fields,n,p)}))}));const i={wrapper_id:r,parent_group:s,fields:a},o=t.findIndex((e=>e.wrapper_id===this.props.wrapper.wrapper_id));return n=this.insertInPosition(n,o+1,i),n}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(),"page-break"===this.props.field.type||"pdf-page-break"===this.props.field.type)return!1;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,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,r){const a=s+"-"+r+"-"+t;let n=!1,i=null;return"before"===r?(n=e.prev().hasClass("fui-drop"),i=e.prev(),e.prev().prev().hasClass("fui-drop")&&e.prev().prev().remove()):(n=e.next().hasClass("fui-drop"),i=e.next(),e.next().next().hasClass("fui-drop")&&e.next().next().remove()),n&&i.attr("id","forminator-drop-"+a),a}createDropPoints(e){let t,s,r=!1;this.lonerFields.forEach((t=>{e.includes(t)&&(r=!0)})),this.props.wrappers.forEach((t=>{let a=!1;if(["page-break","paypal","stripe","stripe-ocs","signature","captcha","postdata","group"].forEach((t=>{e.includes(t)&&(a=!0)})),t.parent_group&&a)return;const n=this.getEl(t.wrapper_id);if(!n.length)return;const i=this.getPosition(n);if(this.drops.push({id:this.generateRandomID(n,t.wrapper_id,"full","before"),top:i.top-50,bottom:i.center.y,left:i.left,right:i.right,type:"full",parent:t.parent_group,insert:["before",n],wrapper:t,is_me:!1}),_.size(t.fields)<4){if(r)return;t.fields.map((e=>{const r=this.getEl("field-"+e.element_id);if(!r.length)return;const n=this.getPosition(r),i=r.attr("id")===this.$el.attr("id");if(this.drops.push({id:this.generateRandomID(r,"field-"+e.element_id,"side-before","before"),top:n.top,bottom:n.bottom,left:n.left,right:n.left+n.width,type:"side-before",insert:["before",r],wrapper:t,field:e,is_me:i}),s=e,"group"===e.type&&!a){const s=jQuery("#field-"+e.element_id+" > div > div > div > .fui-builder-form").children().last(),r=this.getPosition(s);this.drops.push({id:this.generateRandomID(s,"field-"+e.element_id,"full","after"),top:r.center.y,bottom:r.bottom+65,left:r.left,right:r.right,type:"full",parent:e.element_id,insert:["after",s],wrapper:t,is_me:!1})}}));const e=this.getEl("field-"+s.element_id),n=this.getPosition(e),i=e.attr("id")===this.$el.attr("id");this.drops.push({id:this.generateRandomID(e,"field-"+s.element_id,"side-after","after"),top:n.top,bottom:n.bottom,left:n.center.x,right:n.right+20,type:"side-after",insert:["after",e],wrapper:t,field:s,is_me:i})}})),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 a=this.getEl(t.wrapper_id),n=this.getPosition(a);this.drops.push({id:this.generateRandomID(a,t.wrapper_id,"full","after"),top:n.center.y,bottom:n.bottom+65,left:n.left,right:n.right,type:"full",insert:["after",a],wrapper:t,is_me:!1}),this.renderDropPoints()}getCenterXY(e,t,s){const r=Math.round(e.top+s/2);return{x:Math.round(e.left+t/2),y:r}}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 r,a=parseFloat(t.css("width")),n=parseFloat(t.css("height"))-10,i=s.top,o=s.left-10,l=t.prev();const p=i+n,c=o+a,u=Math.round(i+n/2),d=Math.round(o+a/2);return this.isRow(t)?l.length>0&&(r=this.getPosition(l),i=r.center.y+20,n=u-i):l.length>0?(r=this.getPosition(l),o=r.center.x):a/=2,{width:a,height:n,top:i,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),r=jQuery('<div class="fui-drop-view"><span className="fui-drop-view-pos"></span></div>');r.css({top:t.top,left:t.left,width:t.right-t.left,height:t.bottom-t.top,border:s}),this.$main.append(r);const a=jQuery('<div class="fui-drop-view"><span className="fui-drop-view-pos"></span></div>');a.css({top:t.center.y,left:t.center.x,width:15,height:15,border:s,"background-color":"red"}),this.$main.append(a)}}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(_.contains(["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],r=Object.assign({},this.props.field);if(r.parent_group=_.isUndefined(this.drop.parent)?_.isUndefined(this.drop.wrapper.parent_group)?"":this.drop.wrapper.parent_group:this.drop.parent,this.isWrapperDrop()){const a={wrapper_id:Xs(),parent_group:this.drop.parent,fields:[r]};let n=s.findIndex((e=>e.wrapper_id===t.attr("id")));"after"===e&&n++;let i=this.getWrappersWithoutCurrentField(s);i=this.insertInPosition(i,n,a).filter((e=>!_.isEmpty(e.fields))),i=this.updateCols(i),this.updateState(i)}else{const a=s.findIndex((e=>e.wrapper_id===this.drop.wrapper.wrapper_id));let n=this.getWrappersWithoutCurrentField(s),i=this.drop.wrapper.fields.findIndex((e=>e.element_id===t.data("id")));"after"===e&&i++;const o=this.drop.wrapper,l=this.insertInPosition(o.fields,i,r);o.fields=l,n=this.replaceInPosition(n,a,o).filter((e=>!_.isEmpty(e.fields))),n=this.updateCols(n),this.updateState(n)}}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=vr(this.props.wrappers,null,{main_date_field:!0}),t="hide"===this.props.field.condition_action?fr("Hide"):fr("Show");if(_.isUndefined(this.props.field.conditions))return;const s=this.props.field.conditions[0];if(_.isUndefined(s))return;const r=_.filter(e,(e=>e.element_id===s.element_id));if(_.isUndefined(r))return;if(_.isUndefined(r[0]))return;const a=r[0].label,n=kr(s.rule,r.field_type),i=gr(r[0],s),o=this.props.field.conditions.length;let l="";return o-1>0&&(l="+ "+(o-1)+" "+fr("more condition(s)")),c().createElement("span",{className:"fui-builder-field-block-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${t} ${fr("if")} ${a} ${n} ${i} ${l}`},c().createElement("i",{className:"sui-icon-link","aria-hidden":"true"}))}draggableArea(e){const t=_.filter(this.props.wrappers,(t=>t.parent_group===e));return c().createElement("div",{className:"fui-builder-fields"},c().createElement("div",{className:"fui-builder-form--wrap"},c().createElement("span",{className:"fui-swipe"},fr("Swipe"),c().createElement("i",{className:"sui-icon-finger-point","aria-hidden":"true"})),c().createElement("div",{className:"fui-builder-form"},t.map((e=>c().createElement(Ha,za({},this.props,{key:e.wrapper_id,wrapper:e})))))),c().createElement(Ba,za({},this.props,{header:"false",group:e})))}isDeleteEnabled(){return!("login"===this.props.formType&&"password"===this.props.field.type&&ar("password",this.props.wrappers)<2)&&("registration"!==this.props.formType&&"leads"!==this.props.formType||"email"!==this.props.field.type||!(ar("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=_.contains(this.props.changed.fields,this.props.field.element_id)?"fui-unsaved":"",s=this.conditionMarkup();let r;if("group"===this.props.field.type&&(r=this.draggableArea(this.props.field.element_id)),_.isUndefined(e))return c().createElement("div",null);const a="stripe"===this.props.field.type&&this.hasNewStripeType();return c().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},c().createElement("div",za({className:`fui-builder-field-block ${t}`},a&&{style:{backgroundColor:"unset"}},{"data-field":this.props.field.type}),c().createElement("div",za({className:"fui-field--info"},!a&&{onClick:this.editSettings}),c().createElement("span",{className:"fui-field--move"},c().createElement("i",{className:"sui-icon-drag","aria-hidden":"true"})),c().createElement("span",{className:"fui-field--icon"},c().createElement("i",{className:e.icon,"aria-hidden":"true"})),c().createElement("span",{className:"fui-field--name"},this.props.field.field_label&&c().createElement(Rr.Fragment,null,c().createElement("span",{className:"fui-field--label"},this.props.field.field_label,(Cr(this.props.field)||"stripe"===this.props.field.type||"stripe-ocs"===this.props.field.type)&&c().createElement("span",{className:"sui-error"},"*"),"stripe"===this.props.field.type&&c().createElement("span",za({className:"sui-tag sui-tag-yellow sui-tag-sm "+(a?"sui-tooltip sui-tooltip-constrained":"")},a&&{style:{position:"absolute","--tooltip-width":"164px"}},{"data-tooltip":fr("Old Stripe field is being deprecated and only available for backward compatibility. You can delete this field if your form is working properly.")}),fr("Legacy"))),"pdf-form"!==this.props.formType&&c().createElement("span",{className:"fui-field--id"},"{",this.props.field.element_id,"}")),!this.props.field.field_label&&c().createElement(Rr.Fragment,null,c().createElement("span",{className:"fui-field--label"},this.props.field.section_title||e.name,Cr(this.props.field)&&c().createElement("span",{className:"sui-error"},"*")),"pdf-form"!==this.props.formType&&c().createElement("span",{className:"fui-field--id"},"{",this.props.field.element_id,"}")))),c().createElement("div",{className:"fui-field--actions"},c().createElement("div",{className:"sui-dropdown"},c().createElement("button",{className:"sui-button-icon sui-dropdown-anchor"},c().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Field options"))),c().createElement("ul",null,"page-break"!==this.props.field.type&&"pdf-page-break"!==this.props.field.type&&!a&&c().createElement("li",null,c().createElement("button",{className:"forminator-field-edit",onClick:this.editSettings},c().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}),fr("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&&c().createElement("li",null,c().createElement("button",{className:"forminator-field-clone",onClick:this.cloneField},c().createElement("i",{className:"sui-icon-copy","aria-hidden":"true"}),fr("Duplicate"))),this.isDeleteEnabled()&&c().createElement("li",null,c().createElement("button",{className:"forminator-field-remove sui-option-red",onClick:this.deleteField},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")))))),!_.isUndefined(this.props.field.conditions)&&this.props.field.conditions.length>0&&c().createElement(Rr.Fragment,null,s),!_.isUndefined(r)&&c().createElement(Rr.Fragment,null,r)))}}function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},qa.apply(null,arguments)}class Ha extends Rr.Component{constructor(e){super(e)}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}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"fui-drop fui-drop-full"}),c().createElement("div",{id:`${this.props.wrapper.wrapper_id}`,className:"fui-row"},this.props.wrapper.fields.map((e=>c().createElement(Wa,qa({key:e.element_id},this.props,{field:e}))))))}}function Qa(){return Qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Qa.apply(null,arguments)}class Ya extends Rr.Component{constructor(e){super(e)}render(){const e=_.filter(this.props.wrappers,(e=>!e.parent_group));return c().createElement("div",{id:"forminator-builder-fields","data-testid":"forminator-builder-fields",className:"fui-builder-fields"},c().createElement("div",{className:"fui-builder-form--wrap"},c().createElement("span",{className:"fui-swipe"},fr("Swipe"),c().createElement("i",{className:"sui-icon-finger-point","aria-hidden":"true"})),c().createElement("div",{className:"fui-builder-form"},e.map((e=>c().createElement(Ha,Qa({},this.props,{key:e.wrapper_id,wrapper:e})))))),c().createElement(Ba,Qa({},this.props,{header:"false"})))}}class Ga extends Rr.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 c().createElement("div",{className:"sui-box-body fui-builder-section--pagination"},c().createElement("div",{className:"fui-builder-field-block fui-has-info","data-field":"pagination"},c().createElement("span",{className:"fui-info sui-tooltip sui-tooltip-top-left sui-tooltip-constrained",style:{"--tooltip-width":"275px"},"data-tooltip":fr("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.")},c().createElement("i",{className:"sui-icon-info","aria-hidden":"true"})),c().createElement("div",{className:"fui-field--info",onClick:this.editSettings},c().createElement("span",{className:"fui-field--icon"},c().createElement("i",{className:"sui-icon forminator-icon-pagination","aria-hidden":"true"})),c().createElement("span",{className:"fui-field--name"},c().createElement("span",{className:"fui-field--label"},fr("Pagination")))),c().createElement("div",{className:"fui-field--actions"},c().createElement("button",{className:"sui-button-icon sui-tooltip","data-tooltip":fr("Edit field"),onClick:this.editSettings},c().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"})))))}}class Ka extends Rr.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=vr(this.props.wrappers),t="hide"===this.props.submitData.condition_action?fr("Hide"):fr("Show");if(_.isUndefined(this.props.submitData.conditions))return;const s=this.props.submitData.conditions[0];if(_.isUndefined(s))return;const r=_.filter(e,(e=>e.element_id===s.element_id));if(_.isUndefined(r)||_.isEmpty(r))return;const a=r[0].label,n=kr(s.rule,r.field_type),i=gr(r[0],s),o=this.props.submitData.conditions.length;let l="";return o-1>0&&(l="+ "+(o-1)+" "+fr("more condition(s)")),c().createElement("span",{className:"fui-builder-field-block-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${t} ${fr("if")} ${a} ${n} ${i} ${l}`},c().createElement("i",{className:"sui-icon-link","aria-hidden":"true"}))}render(){const e=_.isUndefined(this.props.submitData["custom-submit-text"])?fr("Submit"):this.props.submitData["custom-submit-text"];return c().createElement("div",{className:"sui-box-body","data-testid":"forminator-submit"},c().createElement("div",{className:"fui-builder-field-block","data-field":"submit"},c().createElement("div",{className:"fui-field--info",onClick:this.editSettings},c().createElement("span",{className:"fui-field--icon"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"})),c().createElement("span",{className:"fui-field--name"},c().createElement("span",{className:"fui-field--label"},e))),c().createElement("div",{className:"fui-field--actions"},c().createElement("button",{className:"sui-button-icon sui-tooltip","data-tooltip":fr("Edit field"),onClick:this.editSettings},c().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&&c().createElement(Rr.Fragment,null,this.conditionMarkup())))}}class Ja extends Rr.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=fr("Page Header");return c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"fui-builder-field-block","data-field":"submit"},c().createElement("div",{className:"fui-field--info",onClick:this.editSettings},c().createElement("span",{className:"fui-field--icon"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"})),c().createElement("span",{className:"fui-field--name"},c().createElement("span",{className:"fui-field--label"},e))),c().createElement("div",{className:"fui-field--actions"},c().createElement("button",{className:"sui-button-icon sui-tooltip","data-tooltip":fr("Edit field"),onClick:this.editSettings},c().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"})))))}}class Xa extends Rr.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=fr("Page Footer");return c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"fui-builder-field-block","data-field":"submit"},c().createElement("div",{className:"fui-field--info",onClick:this.editSettings},c().createElement("span",{className:"fui-field--icon"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"})),c().createElement("span",{className:"fui-field--name"},c().createElement("span",{className:"fui-field--label"},e))),c().createElement("div",{className:"fui-field--actions"},c().createElement("button",{className:"sui-button-icon sui-tooltip","data-tooltip":fr("Edit field"),onClick:this.editSettings},c().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"})))))}}function Za(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function en(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function tn(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s,r,a={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(a[s]=e[s]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}var sn=["label","icon","iconRight","design","color","className","loading"],rn=function(e){var t=e.label,s=e.icon,r=e.iconRight,a=e.design,n=void 0===a?"solid":a,i=e.color,o=e.className,l=e.loading,p=tn(e,sn),u=c().createElement("span",{className:"sui-icon-loader sui-loading",style:{position:"relative"},"aria-hidden":"true"}),d=c().createElement(c().Fragment,null,s&&!r&&""!==s&&c().createElement("span",{className:"sui-icon-"+s,"aria-hidden":"true"}),t,s&&r&&""!==s&&c().createElement("span",{className:"sui-icon-"+s,"aria-hidden":"true"}));switch(o="sui-button".concat(r?" sui-button-icon-right":"").concat(o?" "+o:""),i){case"blue":case"green":case"red":case"orange":case"purple":case"yellow":case"white":o+=" sui-button-"+i;break;default:o+=""}switch(n){case"ghost":case"outlined":o+=" sui-button-"+n;break;default:o+=""}l&&(o+=" sui-button-onload");var m="button";return p.href?m="a":p.htmlFor&&(m="label"),c().createElement(m,function(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?Za(Object(s),!0).forEach((function(t){en(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Za(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}({className:o,disabled:p.disabled||l},p),l?u:d)};function an(){return an=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},an.apply(null,arguments)}class nn extends Rr.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"],_.pluck(e.fields,"type")))||(e.parent_group="")})),this.migrateStripe=this.migrateStripe.bind(this)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}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 Gr({type:"success",text:`<strong>${fr("Stripe field has been migrated successfully.")}</strong>\n\t\t\t\t${fr("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?c().createElement("div",{className:"sui-notice sui-notice-yellow"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("{{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:c().createElement("strong",null)}})),c().createElement("p",null,c().createElement(rn,{label:fr("Migrate to new Stripe field"),onClick:this.migrateStripe}))))):""}getPaymentMethodNotification(){const e=lr("stripe",this.props.wrappers),t=lr("paypal",this.props.wrappers),s=this;let r=!1;e.map((e=>{const t="live"===(_.isUndefined(e.mode)?"test":e.mode)?"live_plan_id":"test_plan_id",a=_.contains(s.props.changed.fields,e.element_id);_.isUndefined(e.payments)||a||e.payments.map((e=>{_.isUndefined(e.payment_method)||"subscription"!==e.payment_method||(_.isUndefined(e[t])||_.isEmpty(e[t]))&&(r=!0)}))}));const a=[];return e.length&&!forminatorData.hasStripe||t.length&&!forminatorData.hasPayPal?a.push(c().createElement(c().Fragment,null,c().createElement("p",null,fr("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.")),c().createElement("p",null,c().createElement("a",{className:"sui-button",href:forminatorData.settingsUrl+"§ion=payments",target:"_blank",rel:"noreferrer"},fr("Set API keys"))))):e.length&&forminatorData.hasStripePro&&r&&a.push(c().createElement("p",null,fr("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:c().createElement("strong",null),link:c().createElement("a",{href:forminatorData.settingsUrl+"§ion=payments",target:"_blank",rel:"noreferrer"})}}))),a.length?a.map((e=>c().createElement("div",{className:"sui-notice sui-notice-yellow"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().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=e=>{this.props.router.navigate("/"+e)},t=or("page-break",this.props.wrappers),s=this.getStripeNotification(),r=this.getPaymentMethodNotification();return this.open_hub_connected(),c().createElement(Rr.Fragment,null,s,r,c().createElement("div",{id:"forminator-form-fields",className:"sui-box"},c().createElement(Ba,an({},this.props,{header:"true"})),t&&c().createElement(Ga,this.props),"pdf-form"===this.props.formType&&c().createElement(Ja,this.props),c().createElement(Ya,this.props),"pdf-form"===this.props.formType&&c().createElement(Xa,this.props),"pdf-form"!==this.props.formType&&c().createElement(Ka,this.props),c().createElement("div",{className:"sui-box-footer"},c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("appearance")},fr("Appearance"),c().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"}))))))}}var on=ga(nn);var ln=le((function(e){return{wrappers:e.wrappers,notifications:e.notifications,submitData:e.settings.submitData||{},changed:window.forminatorChanges,formType:e.settings["form-type"]||"",footerData:e.settings.footerData||{}}}),(function(e){return{actions:{builderActions:Tt(r,e),modalActions:Tt(t,e),integrationActions:Tt(n,e),behaviorsActions:Tt(i,e),notificationsActions:Tt(o,e)}}}))(on);class pn extends Rr.Component{constructor(e){super(e),this.closeModal=this.props.closeModal.bind(this)}render(){const e=_.isUndefined(this.props.label)||""===this.props.label?fr("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,r=!_.isUndefined(this.props.sronly)&&!0===this.props.sronly,a=!_.isUndefined(this.props.icon)&&""!==this.props.icon,n=!_.isUndefined(this.props.float)&&"left"===this.props.float,i=!_.isUndefined(this.props.float)&&"right"===this.props.float,o=!_.isUndefined(this.props.customClass)&&""!==this.props.customClass;let l="sui-button";return!0===r?l="sui-screen-reader-text":!1===r&&!0===s&&(l="sui-button-icon"),!1===r&&""!==t&&(l+=" sui-button-"+t),!1!==r||!0!==n&&!0!==i||(l+=" sui-button-float--"+this.props.float),!0===o&&(l+=" "+this.props.customClass),l+=" modal-close-button",c().createElement("button",{className:l,onClick:this.closeModal},!0===s&&c().createElement("i",{className:"sui-icon-close sui-md","aria-hidden":"true"}),!0===a&&c().createElement("i",{className:"sui-icon-"+this.props.icon,"aria-hidden":"true"}),!0===s?c().createElement("span",{className:"sui-screen-reader-text"},e):e)}}class cn extends Rr.Component{constructor(e){super(e)}render(){const e=this.props.filename?this.props.filename:"";let t="sui-box-banner",s=fr("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),c().createElement("figure",{className:t,"aria-hidden":"true"},c().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 un(){return un=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},un.apply(null,arguments)}class dn extends Rr.Component{constructor(e){super(e),this.closeModal=this.props.closeModal.bind(this)}render(){const e=c().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,r=!(!_.isUndefined(this.props.canClose)&&!1===this.props.canClose),a=_.isUndefined(this.props.closeType)||""===this.props.closeType?"":this.props.closeType,n=_.isUndefined(this.props.closeColor)||""===this.props.closeColor?"default":this.props.closeColor,i=!_.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===i&&(p+=" sui-spacing-top--60"),!0===(!_.isUndefined(this.props.customClass)&&""!==this.props.customClass)&&(p+=" "+this.props.customClass);let u=c().createElement("div",{className:p},!0===r&&c().createElement(pn,un({type:a,float:"right",color:n},r&&{closeModal:this.closeModal})),!0===i&&c().createElement(cn,{logo:o,filename:this.props.imageName,alt:l}),e);return"center"!==t&&(u=c().createElement(Rr.Fragment,null,!0===r&&c().createElement(pn,un({sronly:!0},r&&{closeModal:this.closeModal})),c().createElement("div",{className:p},!0===i&&c().createElement(cn,{logo:o,filename:this.props.imageName,alt:l}),e,c().createElement("div",{className:"sui-actions-right"},!0===r&&c().createElement(pn,{type:a,color:n,closeModal:this.closeModal}))))),u}}class mn extends Rr.Component{constructor(e){super(e)}render(){const e=c().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),c().createElement("div",{className:s},e)}}class hn extends Rr.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,r=_.isUndefined(this.props.tagColor)||""===this.props.tagColor?"":" sui-tag-"+this.props.tagColor,a=_.isUndefined(this.props.tagSize)||""===this.props.tagSize?"":" sui-tag-"+this.props.tagSize;let n="sui-box-title";return"lg"===this.props.size&&(n+=" sui-lg"),_.isUndefined(this.props.customClass)||""===this.props.customClass||(n+=" "+this.props.customClass),c().createElement("h3",{id:e,className:n},t,""!==s&&c().createElement("span",{className:"sui-tag"+r+a,style:{marginTop:"-2px",marginLeft:"10px"}},s))}}function fn(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function bn(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function gn(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s,r,a={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(a[s]=e[s]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}var yn=["label","icon","iconSize","design","color","className","loading"],vn=function(e){var t=e.label,s=e.icon,r=e.iconSize,a=e.design,n=void 0===a?"solid":a,i=e.color,o=e.className,l=e.loading,p=gn(e,yn),u=c().createElement("span",{className:"sui-icon-loader sui-loading",style:{position:"relative"},"aria-hidden":"true"}),d=c().createElement(c().Fragment,null,c().createElement("span",{className:"sui-icon-".concat(s).concat(r?" sui-"+r:""),"aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},t));switch(o="sui-button-icon ".concat(o||""),i){case"blue":case"green":case"red":case"orange":case"purple":case"yellow":case"white":o+=" sui-button-"+i;break;default:o+=""}switch(n){case"ghost":case"outlined":o+=" sui-button-"+n;break;default:o+=""}l&&(o+=" sui-button-onload");var m=p.href?"a":"button";return c().createElement(m,function(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(s),!0).forEach((function(t){bn(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):fn(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}({className:o,disabled:p.disabled||l},p),l?u:d)};class En extends Rr.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=or("stripe",this.props.wrappers),s=or("stripe-ocs",this.props.wrappers),r=or("paypal",this.props.wrappers);(_.contains(this.state.fields,"stripe")&&r||_.contains(this.state.fields,"stripe-ocs")&&r||_.contains(this.state.fields,"paypal")&&s||_.contains(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 r=Xs();return{wrapper_id:r,parent_group:e,fields:[dr(s,t,r)]}}));if(forminatorData.showFieldSettings&&1===this.state.fields.length){const e=this,t=void 0!==s[0]&&s[0],r=void 0!==s[0].fields[0]&&s[0].fields[0];t&&r&&("page-break"!==r.type&&"pdf-page-break"!==r.type&&setTimeout((function(){e.props.actions.modalActions.showModal({open:!0,field:r,wrapper:t,closeModal:e.closeSettingsModal,isValid:!0},"field-settings")}),500),"stripe"!==r.type&&"stripe-ocs"!==r.type||(this.props.settings["enable-ajax"]="true"))}this.props.actions.builderActions.updateFields([...t,...s]),this.closeFields()}closeFields(){this.closeModal(),(_.contains(this.state.fields,"stripe")||_.contains(this.state.fields,"stripe-ocs"))&&_.contains(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 r=or("stripe",this.props.wrappers),a=or("stripe-ocs",this.props.wrappers),n=or("captcha",this.props.wrappers),i=or("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),_.contains(s.fields,"stripe")&&r?this.hasStripe=!0:this.hasStripe=!1,this.hasStripeOCS=_.contains(s.fields,"stripe-ocs")&&a,_.contains(s.fields,"paypal")&&i?this.hasPayPal=!0:this.hasPayPal=!1,_.contains(s.fields,"captcha")&&n?this.hasCaptcha=!0:this.hasCaptcha=!1,"pdf-form"===this.props.formType){const e=_.isUndefined(forminatorData.parentFormFields)?[]:forminatorData.parentFormFields,t=or("stripe",e)||or("stripe-ocs",e),r=or("paypal",e);this.missingPaymentField=_.contains(s.fields,"payment")&&!t&&!r}}showPaymentNotice(){new Gr({type:"info",text:`<strong>${fr("Collect payments like a pro")}</strong></p>\n\t<p style="margin-top: -10px; margin-bottom: 5px;">${fr("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. ${fr("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. ${fr("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={position:"absolute",top:"5px",right:"5px"},r={};const a=forminatorData.fieldsPro||[],n=or("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||n&&"registration"===this.props.formType)&&(e=_.filter(e,(function(e){return"password"!==e.slug}))),i&&(e=_.filter(e,(function(e){return!_.contains(["page-break","paypal","stripe","stripe-ocs","signature","captcha","postdata","group"],e.slug)})));const o=_.sortBy(e,"position");(this.hasStripe||this.hasStripeOCS||this.hasCaptcha||this.hasPayPal)&&(t={display:"block"}),forminatorData.isPro||this.props.skipProNotice||(r={display:"block"});const l=this.props.formType;let p,u;return"pdf-form"===l?(p=fr("PDF file"),u="blue"):(p=fr("form"),u="red"),c().createElement(Rr.Fragment,null,c().createElement(dn,{closeType:"icon",closeModal:this.closeModal},c().createElement(hn,{id:this.props.modal.modalProps.id,label:fr("Insert Fields")})),c().createElement("div",{className:"sui-box-body"},c().createElement("p",null,fr("Choose which fields you want to insert into your %s.",{args:p})),(this.hasStripe||this.hasCaptcha||this.hasStripeOCS||this.hasPayPal||"pdf-form"===l)&&c().createElement("div",{role:"alert",className:`sui-notice sui-notice-${u} sui-active`,"aria-live":"assertive",style:{display:"block"}},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),(this.hasStripe||this.hasStripeOCS)&&c().createElement("p",null,fr("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&&c().createElement("p",null,fr("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&&c().createElement("p",null,fr("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"===l&&c().createElement("p",null,fr("{{b}}Note{{/b}}: You can use the {{b}}Rich Text{{/b}} field to add form fields and custom text to your PDF.",{components:{b:c().createElement("b",null)}})))))),c().createElement("div",{className:"sui-box-selectors sui-box-selectors-col-5",style:{margin:0}},c().createElement("ul",{id:"forminator-form-fields-to-insert",className:`sui-spacing-slim ${l}-field-selectors`},o.map((e=>c().createElement("li",{key:e.slug},c().createElement("label",{htmlFor:`forminator-form-field-${e.slug}`,className:"sui-box-selector sui-box-selector-vertical"},c().createElement("input",{type:"checkbox",id:`forminator-form-field-${e.slug}`,"data-field":e.slug,onChange:t=>this.toggleField(e.slug,t)}),c().createElement("span",null,c().createElement("i",{className:e.icon,"aria-hidden":"true"}),e.name,"stripe-ocs"===e.slug&&c().createElement("span",{className:"sui-tag sui-tag-beta forminator-small-blue-tag",style:s},fr("New"))))))),!forminatorData.isPro&&a.map((e=>{if("signature"!==e.field_type||"signature"===e.field_type&&_.isEmpty(i))return c().createElement("li",{key:e.slug},c().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},c().createElement("input",{type:"radio",disabled:!0}),c().createElement("span",null,c().createElement("span",{className:e.icon,"aria-hidden":"true"}),e.name,c().createElement("span",{className:"sui-tag sui-tag-pro"},"Pro"))))})),_.isEmpty(i)&&!forminatorData.isPro&&_.isEmpty(a)&&"pdf-form"!==l&&c().createElement("li",null,c().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},c().createElement("input",{type:"radio",disabled:!0}),c().createElement("span",null,c().createElement("span",{className:"sui-icon-pencil","aria-hidden":"true"}),fr("E-Signature"),c().createElement("span",{className:"sui-tag sui-tag-pro"},"Pro")))),"pdf-form"===l&&c().createElement(Rr.Fragment,null,c().createElement("li",{className:"pdf-field-coming-soon sui-tooltip","data-tooltip":fr("Coming soon")},c().createElement("label",{className:"sui-box-selector sui-box-selector-vertical sui-disabled"},c().createElement("input",{type:"radio",disabled:!0}),c().createElement("span",null,c().createElement("span",{className:"sui-icon-code","aria-hidden":"true"}),fr("Quotation")))))),"pdf-form"!==l&&c().createElement("div",{role:"alert",id:"fui-notice-pro-fields",className:`sui-notice sui-notice-purple ${!forminatorData.isPro&&!this.props.skipProNotice&&" sui-active"}`,style:r,"aria-live":"assertive"},_.isEmpty(i)&&!forminatorData.isPro&&!this.props.skipProNotice&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Need access to pro form fields? {{link}}Upgrade to Pro{{/link}}",{components:{link:c().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"}})}}))),c().createElement("div",{className:"sui-notice-actions"},c().createElement(vn,{icon:"check",iconSize:"sm",label:fr("Dismiss"),onClick:this.skipProNotice})))),"pdf-form"===l&&this.missingPaymentField&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block",marginTop:"15px"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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.")))))),c().createElement(mn,{alignment:"separated"},c().createElement(pn,{label:fr("Cancel"),customClass:"sui-button-ghost forminator-builder-fields-close",closeModal:this.closeModal}),c().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},c().createElement("span",{className:"sui-loading-text"},fr("Insert Fields")),c().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var _n=a(8055),wn=a.n(_n);class xn extends Rr.Component{constructor(e){super(e)}render(){const e=c().Children.map(this.props.children,(e=>e));return c().createElement("div",{className:"sui-row"+(_.isUndefined(this.props.class)?"":" "+this.props.class)},e)}}class Nn extends Rr.Component{constructor(e){super(e)}render(){const e=c().Children.map(this.props.children,(e=>e)),t=this.props.customClass?this.props.customClass:"";return c().createElement("div",{className:`sui-col-md-${this.props.cols} ${t}`},e)}}function kn(){return kn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},kn.apply(null,arguments)}class Sn extends Rr.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)?fr("This field is required!"):this.props.requiredError,r=this.isValid(e)&&this.isMaxValid(e)?"":"sui-form-field-error",a=_.isUndefined(this.props.maxValidError)?fr("Please enter valid number."):this.props.maxValidError,n=_.isUndefined(this.props.fieldClass)?"sui-form-field":"sui-form-field "+this.props.fieldClass;let i="sui-form-control";_.isUndefined(this.props.inputClass)||""===this.props.inputClass||(i+=" "+this.props.inputClass),_.isUndefined(this.props.prefix)||""===this.props.prefix||(i+=" sui-field-has-prefix"),_.isUndefined(this.props.suffix)||""===this.props.suffix||(i+=" sui-field-has-suffix");const o=_.isUndefined(this.props.inputId)?this.props.property:this.props.inputId;let l;this.props.label&&(l=c().createElement("label",{htmlFor:`forminator-field-${o}`,className:this.props.darkLabel?"sui-settings-label sui-dark":"sui-label"},this.props.label,this.props.isRequired&&c().createElement(Rr.Fragment,null," ",c().createElement("span",{className:"sui-error"},"*")),this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note)));const p=c().createElement("input",kn({type:t,placeholder:this.props.placeholder,value:e||"",id:`forminator-field-${o}`,className:i},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},{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)}})),u=c().createElement("div",{className:`${n} ${r}`},l,!_.isUndefined(this.props.prefix)&&""!==this.props.prefix&&c().createElement("span",{className:"sui-field-prefix"},this.props.prefix),this.props.canTrash?c().createElement("div",{className:"sui-with-button sui-with-button-icon"},p,c().createElement("button",{className:"sui-button-icon sui-tooltip sui-tooltip-top-right","data-tooltip":fr("Delete")},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}))):p,this.props.suffix&&c().createElement("span",{className:"sui-field-suffix"},this.props.suffix),this.props.isRequired&&!this.isValid(e)&&c().createElement("span",{className:"sui-error-message"},s),!_.isUndefined(this.props.isPositive)&&!this.isValid(e)&&c().createElement("span",{className:"sui-error-message"},fr("Please enter valid number.")),!this.isMaxValid(e)&&c().createElement("span",{className:"sui-error-message"},a),this.props.description&&c().createElement("span",{className:"sui-description"},this.props.description));return this.props.simple?p:u}}function Cn(){return Cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Cn.apply(null,arguments)}class Pn extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Cn({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,Cn({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:"placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Cn({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))))}}function Fn(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function On(e){return e.replace(/</g,"<")}function Dn(e){return On(Fn(e))}class An extends Rr.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)}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,r=_.isUndefined(this.props.elementId)?this.props.property:this.props.elementId;let a="";this.props.label&&(a=c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,id:`forminator-field-${this.props.property}-label`,className:"sui-label"},this.props.label," ",this.props.required&&c().createElement("span",{className:"sui-error"}," *"),this.props.note&&c().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 n=c().createElement("select",{defaultValue:e,id:`forminator-field-${r}`,className:s,"aria-labelledby":`forminator-field-${r}-label`,ref:e=>this.el=e,style:{maxWidth:"none"}},this.props.children);let i=n;"md"===this.props.fieldsize||"medium"===this.props.fieldsize?i=c().createElement("div",{className:"sui-form-field sui-input-md"},n):"sm"===this.props.fieldsize||"small"===this.props.fieldsize?i=c().createElement("div",{className:"sui-form-field sui-input-sm"},n):""!==this.props.fieldsize&&(i=c().createElement("div",{style:{width:"100%",maxWidth:this.props.fieldsize+"px"}},n));let o=i;return this.props.simple||(o=c().createElement("div",{className:t},a,i,this.props.description&&c().createElement("span",{className:"sui-description",style:{marginTop:"10px"}},this.props.description))),o}}function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Tn.apply(null,arguments)}class jn extends Rr.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);let e=_.isUndefined(this.props.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property];const t=this.props.dateFormat?this.props.dateFormat:"d MM yy",s=_.isUndefined(this.props.id)?`forminator-field-${this.props.property}`:`forminator-field-${this.props.id}`;this.hasWordFormat||this.$el.val(e),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:t,dayNamesMin:forminatorl10n.calendar.day_names_min,monthNames:forminatorl10n.calendar.month_names,onSelect:e=>{this.updateValue(e)}}),this.hasWordFormat&&(this.$el.datepicker("option","altField","#"+s+"-altfield"),this.$el.datepicker("option","altFormat","@"),_.isUndefined(e)||(isNaN(e)&&(e=new Date(e).getTime()),jQuery("#"+s+"-altfield").val(e),this.$el.datepicker("setDate",new Date(parseInt(e))))),this.updateValue=this.updateValue.bind(this)}updateValue(e){if(this.hasWordFormat)if(!_.isUndefined(this.props.rule)&&["is_before","is_after"].includes(this.props.rule.rule)){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,r,a="sui-form-field";_.isUndefined(this.props.fieldClass)||(a+=" "+this.props.fieldClass),this.props.mediumSize&&(a+=" sui-input-md"),this.props.label&&(s=c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note))),this.props.canTrash&&(r=c().createElement("button",{className:"sui-button-icon"},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Remove this date range")))),this.props.canAdd&&(r=c().createElement("button",{className:"sui-button-icon"},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Add selected date"))));const n=_.isUndefined(this.props.id)?`forminator-field-${this.props.property}`:`forminator-field-${this.props.id}`,i=c().createElement(Rr.Fragment,null,c().createElement("input",Tn({ref:e=>this.el=e,id:n,className:e,placeholder:this.props.placeholder,type:"text",autoComplete:"off"},this.props.onlyRead&&{'readonly="readonly"':""})),this.hasWordFormat&&c().createElement("input",{id:n+"-altfield",style:{display:"none"}}));let o=c().createElement("div",{className:a},s,this.props.noCalendar?i:c().createElement("div",{className:"sui-date"},"left"===t&&c().createElement("i",{className:"sui-icon-calendar","aria-hidden":"true"}),i,"right"===t&&c().createElement("i",{className:"sui-icon-calendar","aria-hidden":"true"})),c().createElement("div",{id:n+"-calendar",className:"sui-date-calendar"}),this.props.description&&c().createElement("span",{className:"sui-description"},this.props.description));return this.props.multiDate&&(o=c().createElement("div",{className:"sui-multi-date"},c().createElement("div",{className:a},s,this.props.noCalendar?i:c().createElement("div",{className:"sui-date"},i,c().createElement("i",{className:"sui-icon-calendar","aria-hidden":"true"})),this.props.description&&c().createElement("span",{className:"sui-description"},this.props.description)),r)),o}}function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Mn.apply(null,arguments)}class Un extends Rr.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 fr("null");let e=this.props.rule.value;return["is_before","is_after"].includes(this.props.rule.rule)&&(e=yr(e)),e}render(){const e="condition-"+this.props.counter,t=_.where(this.fields,{element_id:this.props.rule.element_id})[0]||{},s="consent"===t.field_type;s&&(this.props.rule.value=fr("checked"));const r=this.getRuleValue();return c().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},c().createElement("h4",{className:"fui-visibility-rule-header"},c().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},c().createElement("i",{className:"sui-icon-link fui-visibility-rule-icon","aria-hidden":"true"}),c().createElement("span",{className:"fui-visibility-rule-text"},c().createElement("strong",null,Dn(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)&&c().createElement(Rr.Fragment,null,kr(this.props.rule.rule,t.field_type,r)),!("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)&&c().createElement(Rr.Fragment,null,kr(this.props.rule.rule,t.field_type)," ",c().createElement("strong",null,r))),c().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),c().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},c().createElement(An,Mn({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:fr("Field")}),_.map(this.fields,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(An,Mn({key:"visibility-condition-"+Js()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,label:fr("Condition (required)"),options:this.disableSearch()}),c().createElement("option",{value:""},fr("Select rule")),"signature"===t.field_type&&!s&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is null")),c().createElement("option",{value:"is_not"},fr("Is not null"))),"signature"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is")),c().createElement("option",{value:"is_not"},fr("Is not"))),(t.isNumber||"rating"===t.field_type)&&!s&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is_great"},fr("Is greater than")),c().createElement("option",{value:"is_less"},fr("Is less than"))),!t.isNumber&&!t.hasOptions&&!s&&"signature"!==t.field_type&&"rating"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"contains"},fr("Contains")),c().createElement("option",{value:"does_not_contain"},fr("Does not contain")),c().createElement("option",{value:"starts"},fr("Starts with")),c().createElement("option",{value:"ends"},fr("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&!s&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"day_is"},fr("Day is")),c().createElement("option",{value:"day_is_not"},fr("Day is not"))),"date"===t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&!s&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"month_is"},fr("Month is")),c().createElement("option",{value:"month_is_not"},fr("Month is not"))),"date"===t.field_type&&"date"===t.field_slug&&!s&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is_before"},fr("Is before")),c().createElement("option",{value:"is_after"},fr("Is after")),c().createElement("option",{value:"is_before_n_or_more_days"},fr("Is before n or more days")),c().createElement("option",{value:"is_before_less_than_n_days"},fr("Is before less than n days")),c().createElement("option",{value:"is_after_n_or_more_days"},fr("Is after n or more days")),c().createElement("option",{value:"is_after_less_than_n_days"},fr("Is after less than n days"))))),c().createElement(Nn,{cols:"6"},c().createElement(Rr.Fragment,null,t.hasOptions&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select option")),_.map(t.values,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)))))),!t.hasOptions&&s&&c().createElement(Sn,Mn({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("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)&&c().createElement(Sn,Mn({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule||"month_is_not"===this.props.rule.rule)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],(e=>c().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)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],(e=>c().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)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"},fr("Select date")),c().createElement(jn,Mn({},this.props,{settings:this.props.rule,property:"value",hasWordFormat:!0,id:e+"-value",placeholder:fr("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)&&c().createElement(Sn,Mn({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("Number of days"),placeholder:fr("E.g. 10"),type:"number",minValue:"0"}))))),c().createElement("div",{className:"fui-visibility-rule-footer"},c().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},fr("Done")))))}}function In(){return In=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},In.apply(null,arguments)}class $n extends Rr.Component{constructor(e){super(e),this.radioContainer=c().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=c().Children.map(this.props.children,(t=>c().createElement("button",In({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=c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note)));let r="";this.props.description&&""!==this.props.description&&(r=c().createElement("span",{className:"sui-description"},this.props.description));let a="";!this.props.label&&this.props.settingsLabel&&(a=c().createElement("label",{className:"sui-settings-label"},this.props.settingsLabel));let n="";!this.props.label&&this.props.settingsDesc&&(n=c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},this.props.settingsDesc));const i=c().createElement("div",{className:`sui-side-tabs ${this.props.property}`,style:this.props.description&&{marginBottom:"5px"},ref:e=>this.radioContainer=e},c().createElement("div",{className:"sui-tabs-menu",role:"tablist"},t));let o=c().createElement(Rr.Fragment,null,s,i);return this.props.noWrapper||(o=c().createElement("div",{className:"sui-form-field"},s,a,n,i,r)),o}}function Vn(){return Vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Vn.apply(null,arguments)}class Rn extends Rr.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=vr(this.props.wrappers,["stripe","stripe-ocs","paypal","page-break","pagination","section","html"],{main_date_field:!0}),this.fields=_.filter(this.fields,(e=>e.element_id!==this.props.state.element_id)),_.contains(["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=_.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!_.contains(e,t.element_id)}));this.updateState(s)}render(){let e=c().createElement("div",{className:"fui-visibility-options"},c().createElement("div",{className:"fui-visibility-option"},c().createElement($n,Vn({},this.props,{settings:this.props.state,property:"condition_action",defaultValue:"show",noWrapper:!0}),c().createElement("span",{value:"show"},fr("Show")),c().createElement("span",{value:"hide"},fr("Hide"))),c().createElement("span",{className:"sui-description"},fr("this field if"))),c().createElement("div",{className:"fui-visibility-option"},c().createElement($n,Vn({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),c().createElement("span",{value:"all"},fr("All")),c().createElement("span",{value:"any"},fr("Any"))),c().createElement("span",{className:"sui-description"},fr("of the following rules match:"))));this.props.isPayment&&(e=c().createElement("div",{className:"fui-visibility-options"},c().createElement("div",{className:"fui-visibility-option"},c().createElement("span",{className:"sui-description"},fr("Process this plan if"))),c().createElement("div",{className:"fui-visibility-option"},c().createElement($n,Vn({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),c().createElement("span",{value:"all"},fr("All")),c().createElement("span",{value:"any"},fr("Any"))),c().createElement("span",{className:"sui-description"},fr("of the following conditions match:")))));const t=c().createElement("div",{className:"fui-visibility-group"},this.props.wrappers.length<2&&this.fields.length<2&&_.isEmpty(this.fields)&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active fui-visibility-notice",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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)&&c().createElement("div",{className:"fui-visibility-header"},e,c().createElement("label",{className:"sui-label"},this.props.isPayment?fr("Conditions"):fr("Rules"))),c().createElement("div",{className:"fui-visibility"},c().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&c().createElement("button",{accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.props.isPayment?fr("Add conditions"):fr("Add Rule")),c().createElement("p",null,!this.props.isPayment&&fr("By default field will always be visible. If you want to hide or show fields based on user input you can add conditions."),this.props.isPayment&&fr("Add conditions for how this plan will be processed based on your form field data.")))));return(_.isUndefined(this.props.state.conditions)||0===this.props.state.conditions.length)&&Rr.Fragment,!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0&&!_.isEmpty(this.fields)?c().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>0)&&c().createElement("div",{className:"fui-visibility-header"},e,c().createElement("label",{className:"sui-label"},this.props.isPayment?fr("Conditions"):fr("Rules"))),c().createElement("div",{className:"fui-visibility"},c().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,((e,t)=>c().createElement(Un,Vn({},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})))))),c().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),this.props.isPayment?fr("Add conditions"):fr("Add Rule"))):c().createElement(Rr.Fragment,null,t)}}const Ln=["formType","updateProperty","noWrapper","fieldClass","staticContext","formDesign","fieldSize"];function Bn(){return Bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Bn.apply(null,arguments)}class zn extends Rr.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,r=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&&(r.data=this.props.data),this.props.loading&&(r.dropdownCssClass="sui-select-dropdown-sm sui-select-dropdown-loading"),this.props.placeholder&&(r.placeholder=this.props.placeholder),"function"==typeof this.$el.SUIselect2)this.$el.SUIselect2(r);else{if("function"!=typeof this.$el.FUIselect2)throw Error("SUI Select2 not initiated");this.$el.FUIselect2(r)}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")}}}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 r;this.props.label&&(r=c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label," ",this.props.required&&c().createElement("span",{className:"sui-error"}," *"),this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note)));const a=this.props.multiple,n=this.props,{formType:i,updateProperty:o,noWrapper:l,fieldClass:p,staticContext:u,formDesign:d,fieldSize:m}=n,h=function(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;s[r]=e[r]}return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],t.includes(s)||{}.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}(n,Ln),f=c().createElement("select",Bn({id:`forminator-field-${s}`,className:"sui-select",ref:e=>this.el=e,value:e,multiple:a},h),this.props.children);let b=c().createElement("select",{id:`forminator-field-${s}`,className:"sui-select",ref:e=>this.el=e,defaultValue:e,multiple:a},this.props.children);return"md"===this.props.fieldsize||"medium"===this.props.fieldsize?b=c().createElement("div",{className:"sui-form-field sui-input-md"},f):"sm"===this.props.fieldsize||"small"===this.props.fieldsize?b=c().createElement("div",{className:"sui-form-field sui-input-sm"},f):_.isUndefined(this.props.fieldsize)||""===this.props.fieldsize||(b=c().createElement("div",{style:{width:"100%",maxWidth:this.props.fieldsize+"px"}},f)),this.props.noWrapper?f:c().createElement("div",{className:t},r,b,this.props.description&&c().createElement("span",{className:"sui-description",style:{marginTop:"10px"}},this.props.description))}}function Wn(){return Wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Wn.apply(null,arguments)}class qn extends Rr.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.state.type)||"group"!==this.props.state.type?"default":"above";return c().createElement(zn,Wn({},this.props,{settings:this.props.state,property:"description-position",defaultValue:e}),c().createElement("option",{value:"default"},(t=this.props,_.isUndefined(t.descriptionPosition)||"above"!==t.descriptionPosition?fr("Use form settings (Below inputs)"):fr("Use form settings (Above inputs)"))),c().createElement("option",{value:"above"},fr("Above Inputs")),c().createElement("option",{value:"below"},fr("Below Inputs")));var t}}class Hn extends Rr.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.state["custom-class"])?"":this.props.state["custom-class"];return c().createElement(p.Fragment,null,c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Additional CSS Classes")),c().createElement("span",{className:"sui-description"},fr("Add classes that will be output on this field's container to aid your theme's default styling."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("input",{type:"text",placeholder:fr("E.g. form-field"),className:"sui-form-control",value:e,onChange:e=>{this.props.updateProperty("custom-class",e.target.value)}}),c().createElement("span",{className:"sui-description"},fr("These will be output as you see them here.")))),Tr(this.props)&&c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Field Description Placement")),c().createElement("span",{className:"sui-description"},fr("Select where the description of this field should appear."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(qn,this.props))))}}class Qn extends Rr.Component{constructor(e){super(e)}render(){const e=c().Children.map(this.props.children,(e=>e));let t="";this.props.label&&""!==this.props.label&&(t=c().createElement("span",{className:"sui-settings-label"+(!0===this.props.labelDark?" sui-dark":"")},this.props.label));let s="",r=10;_.isUndefined(this.props.descriptionSpacing)||""===this.props.descriptionSpacing||(r=this.props.descriptionSpacing),_.isUndefined(this.props.description)||""===this.props.description||(s=!1===this.props.sidebar?c().createElement("span",{className:"sui-description",style:{marginBottom:r+"px"}},this.props.description):c().createElement("span",{className:"sui-description"},this.props.description));let a="";(this.props.label&&""!==this.props.label||this.props.description&&""!==this.props.description)&&(a=c().createElement("div",{className:"sui-box-settings-col-1"},t,s));const n=this.props.lastChild?{marginBottom:0,borderBottom:"unset"}:{};return c().createElement("div",{className:"sui-box-settings-row",style:n},(_.isUndefined(this.props.sidebar)||!1!==this.props.sidebar)&&a,c().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 Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Yn.apply(null,arguments)}class Gn extends Rr.Component{constructor(e){super(e);const t=_.isUndefined(this.props.prefix)?"":this.props.prefix+"_";this.requiredProp=t+"required",this.requiredValProp=t+"required_message",this.requiredCValProp=t+"required_confirm_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],r=_.isUndefined(this.props.state.type)?"":this.props.state.type,a="password"===r&&!_.isUndefined(this.props.state["confirm-password"])&&this.props.state["confirm-password"];return c().createElement(Qn,{label:fr("Require"),labelDark:!0,description:fr("Force users to fill out this field, otherwise it will be optional."),descriptionSpacing:20,sidebar:!1},c().createElement("div",{className:"sui-tabs sui-side-tabs",style:{marginTop:"10px"}},c().createElement("div",{className:"sui-tabs-menu"},c().createElement("div",{className:"sui-tab-item"+(e?"":" active"),onClick:this.toggleValue.bind(this,!1)},fr("Optional")),c().createElement("div",{className:"sui-tab-item"+(e?" active":""),onClick:this.toggleValue.bind(this,!0)},fr("Required"))),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-boxed"+(e?" active":"")},c().createElement("div",Yn({className:"sui-form-field"},!a&&!(e&&"select"===r)&&{style:{marginBottom:0}}),"password"===r&&c().createElement("label",{htmlFor:"forminator-field-name-error-msg",className:"sui-label"},fr("Password error message")),"password"!==r&&c().createElement("label",{htmlFor:"forminator-field-name-error-msg",className:"sui-label"},fr("Error message")),c().createElement("input",{type:"text",value:t,placeholder:fr("Enter required message"),id:"forminator-field-name-error-msg",className:"sui-form-control",onChange:e=>{this.props.updateProperty(this.requiredValProp,e.target.value)}})),a&&c().createElement("div",Yn({className:"sui-form-field"},!(e&&"select"===r)&&{style:{marginBottom:0}}),c().createElement("label",{htmlFor:"forminator-field-name-error-msg",className:"sui-label"},fr("Confirm Password error message")),c().createElement("input",{type:"text",value:s,placeholder:fr("Enter confirm password message"),id:"forminator-field-name-error-msg",className:"sui-form-control",onChange:e=>{this.props.updateProperty(this.requiredCValProp,e.target.value)}})),c().createElement("div",Yn({role:"alert",className:"sui-notice sui-notice-warning "+(e&&"select"===r?" sui-active":""),"aria-live":"assertive"},e&&"select"===r&&{style:{display:"block"}}))))))}}class Kn extends Rr.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 c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Validate")),c().createElement("span",{className:"sui-description"},fr("Make sure the user has filled out this field correctly and warn them when they haven't.")),c().createElement("div",{className:"sui-side-tabs",style:{marginTop:"10px"}},c().createElement("div",{className:"sui-tabs-menu"},c().createElement("div",{className:"sui-tab-item"+(e?"":" active"),onClick:this.toggleValue.bind(this,!1)},fr("None")),c().createElement("div",{className:"sui-tab-item"+(e?" active":""),onClick:this.toggleValue.bind(this,!0)},fr("Validate Field"))),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content sui-tab-boxed"+(e?" active":"")},c().createElement("div",{className:"sui-form-field"},c().createElement("label",{htmlFor:"forminator-field-name-error-msg",className:"sui-label"},fr("Validation message")),c().createElement("input",{type:"text",id:"forminator-field-name-error-msg",className:"sui-form-control",placeholder:fr("Enter validation message"),value:t,onChange:e=>{this.props.updateProperty(this.validTextProp,e.target.value)}})))))))}}function Jn(){return Jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Jn.apply(null,arguments)}class Xn extends Rr.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.prefix)?"":this.props.prefix+"_",t=_.isUndefined(this.props.notice)||""===this.props.notice?fr("{{strong}}Note:{{/strong}} 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:{strong:c().createElement("strong",null),link:c().createElement("a",{href:"https://codex.wordpress.org/Reserved_Terms",target:"_blank"}),icon:c().createElement("span",{className:"sui-icon-open-new-window","aria-hidden":"true"})}}):this.props.notice;return c().createElement(Qn,{label:fr("Pre-populate"),labelDark:!0,description:fr("You can pre-populate this field dynamically using the query parameter passed in your form URL. Enter the query parameter key to fetch its value from your form URL below."),descriptionSpacing:20,sidebar:!1},c().createElement(Sn,Jn({},this.props,{settings:this.props.state,label:fr("Query parameter (optional)"),description:t,placeholder:fr("E.g. query_parameter_key"),property:`${e}prefill`,inputStyles:{maxWidth:"240px"}})))}}class Zn extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(Pn,this.props);case"settings":return c().createElement("div",null,c().createElement(Gn,this.props),c().createElement(Kn,this.props),c().createElement(Xn,this.props));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null,fr("Wrong field type!"))}}}class ei extends Rr.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=c().Children.map(this.props.children,(t=>{if(!t)return c().createElement(Rr.Fragment,null);const s=_.isUndefined(t.props.label)?t.props.children:t.props.label,r=_.isUndefined(this.props.tooltip)?"":this.props.tooltip;return this.props.disabled?r?c().createElement("div",{className:"sui-tooltip","data-tooltip":r},c().createElement("div",{className:"sui-tab-item"+(t.props.value===e?" active":""),style:{opacity:.5,cursor:"not-allowed"}},s)):c().createElement("div",{className:"sui-tab-item"+(t.props.value===e?" active":""),style:{opacity:.5,cursor:"not-allowed"}},s):this.props.disabled?void 0:c().createElement("div",{className:"sui-tab-item"+(t.props.value===e?" active":"")+(r?" sui-tooltip":""),onClick:this.toggleValue.bind(this,t.props.value),"data-tooltip":r},s)})),s=_.isUndefined(this.props.divClass)?"sui-tabs-content":"sui-tabs-content "+this.props.divClass,r=c().Children.map(this.props.children,(t=>{if(!t)return c().createElement(Rr.Fragment,null);const s=_.isUndefined(t.props.boxClass)?"":t.props.boxClass;if("Empty"!==t.type.name){let r="";return t.props.hasImage&&(t.props.image1x&&t.props.image2x&&(r=c().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=c().createElement("img",{src:`${forminatorData.imagesUrl}/${t.props.image1x}`,"aria-hidden":"true"})),t.props.image2x&&!t.props.image1x&&(r=c().createElement("img",{src:`${forminatorData.imagesUrl}/${t.props.image2x}`,srcSet:`${forminatorData.imagesUrl}/${t.props.image2x} 2x`}))),c().createElement("div",{className:s+" sui-tab-content"+(t.props.value===e?" active":"")},r,t.props.value===e&&t)}return c().createElement(Rr.Fragment,null)}));let a="";this.props.label&&""!==this.props.label&&(a=c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"}," ",this.props.note)));let n="";if(this.props.settingsLabel&&""!==this.props.settingsLabel){const e=this.props.labelClass?this.props.labelClass:"sui-settings-label";n=c().createElement("label",{className:e},this.props.settingsLabel)}let i="";this.props.description&&""!==this.props.description&&(i=c().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=c().createElement("div",{className:o},c().createElement("div",{className:"sui-tabs-menu"},t),c().createElement("div",{className:s},r));return this.props.simple||(l=c().createElement("div",{className:"sui-form-field"},n,a,i,c().createElement("div",{className:o},c().createElement("div",{className:"sui-tabs-menu"},t),c().createElement("div",{className:s},r)))),l}}class ti extends Rr.Component{constructor(e){super(e)}render(){const e=c().Children.map(this.props.children,(e=>e));return c().createElement("div",null,e)}}function si(){return""}function ri(){return ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ri.apply(null,arguments)}class ai extends Rr.Component{constructor(e){super(e)}render(){const e={action:"forminator_geolocation_check_api",_ajax_nonce:forminatorData.geolocation.nonce};Na().post(forminatorData.ajaxUrl,Sa().stringify(e)).then((e=>{e.data.success||jQuery("#forminator-geolocation-api-invalid").show()}));vr(this.props.wrappers);const t=Or(forminatorData.userPermissions.manage_forminator_settings)||Or(forminatorData.userPermissions.manage_options);return c().createElement(Rr.Fragment,null,c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",id:"forminator-geolocation-api-invalid","aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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?c().createElement("a",{href:forminatorData.settingsUrl+"§ion=geolocation",target:"_blank"}):c().createElement("b",null)}}))))),c().createElement(Qn,{label:fr("Autocomplete"),labelDark:!0,description:fr("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},c().createElement(ei,ri({},this.props,{property:"auto_suggest",settings:this.props.state,default:"disable",simple:!0}),c().createElement(si,{value:"enable"},fr("Enable")),c().createElement(si,{value:"disable"},fr("Disable")))),c().createElement(Qn,{label:fr("Display address on Map"),labelDark:!0,description:fr("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},c().createElement(ei,ri({},this.props,{property:"show_map",settings:this.props.state,default:"hide",simple:!0}),c().createElement(ti,ri({},this.props,{label:fr("Show"),settings:this.props.state,value:"show",boxClass:"sui-tab-boxed"}),c().createElement(Qn,{label:fr("Map position"),labelDark:!0,description:fr("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},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(zn,ri({},this.props,{settings:this.props.state,property:"map_placement",defaultValue:"after"}),c().createElement("option",{value:"before"},fr("Above Address field(s)")),c().createElement("option",{value:"after"},fr("Below Address field(s)")))))),c().createElement(Qn,{label:fr("Map Size"),labelDark:!0,description:fr("Set the size of your map."),descriptionSpacing:20,sidebar:!1},c().createElement(ei,ri({},this.props,{property:"map_size",settings:this.props.state,default:"responsive",simple:!0}),c().createElement(si,{value:"responsive"},fr("Responsive")),c().createElement(ti,ri({},this.props,{label:fr("Custom Size"),settings:this.props.state,value:"custom",boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,ri({},this.props,{settings:this.props.state,label:fr("Height"),note:"px",type:"number",isPositive:"true",placeholder:fr("Enter Height"),property:"map_height",defaultValue:"300"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,ri({},this.props,{settings:this.props.state,label:fr("Width"),note:"px",type:"number",isPositive:"true",placeholder:fr("Enter Width"),property:"map_width",defaultValue:"300"}))))))),c().createElement(Qn,{label:fr("Default map location"),labelDark:!0,description:fr("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},c().createElement(ei,ri({},this.props,{property:"map_location",settings:this.props.state,default:"default",simple:!0}),c().createElement(si,{value:"default"},fr("Default location")),c().createElement(ti,ri({},this.props,{label:fr("Custom location"),settings:this.props.state,value:"custom",boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,ri({},this.props,{settings:this.props.state,property:"default_coordinates",label:fr("Enter coordinates"),placeholder:fr("E.g., 1.234567, 9.876543"),description:fr("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:c().createElement("a",{href:"https://map.google.com",target:"_blank"})}})})))))))),c().createElement(si,{value:"hide"},fr("Hide")))))}}class ni extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(xn,null,forminatorData.showBranding&&c().createElement(Nn,{cols:"12"},c().createElement("p",{className:"sui-block-content-center"},c().createElement("img",{src:e,srcSet:`${e} 1x, ${t} 2x`,className:"sui-image sui-image-center",style:{borderRadius:"50%",width:forminatorData.isPro?"auto":"60px"}}))),c().createElement(Nn,{cols:"12"},c().createElement("p",{className:"sui-block-content-center",style:{maxWidth:"600px",margin:"15px auto"}},c().createElement("small",null,this.props.text))),c().createElement(Nn,{cols:"12"},c().createElement("p",{className:"sui-block-content-center"},forminatorData.isPro&&c().createElement("a",{href:forminatorData.adminUrl+"admin.php?page=forminator-addons",target:"_blank",className:"sui-button sui-button-blue"},fr("Get the Add-on")),!forminatorData.isPro&&c().createElement("a",{href:this.props.addonUrl,target:"_blank",className:"sui-button sui-button-purple"},fr("Upgrade to PRO{{icon/}}",{components:{icon:c().createElement("span",{className:"sui-icon-open-new-window sui-sm","aria-hidden":"true",style:{margin:0}})}}))))))}}class ii extends Rr.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,r=_.isUndefined(this.props.settings[this.props.property])?"":this.props.settings[this.props.property];r||(t="sui-accordion-item--disabled"),r&&s&&(t="sui-accordion-item--open");const a=c().Children.map(this.props.children,(e=>e));let n=s&&a;return this.props.noBoxBody||(n=c().createElement("div",{className:"sui-box"},c().createElement("div",{className:"sui-box-body"},s&&a))),c().createElement("div",{className:"sui-accordion-item "+t},c().createElement("div",{className:"sui-accordion-item-header",onClick:()=>this.toggleState()},c().createElement("div",{className:"sui-accordion-item-title"},c().createElement("label",{htmlFor:"forminator-"+this.props.property,className:"sui-toggle"},c().createElement("input",{type:"checkbox",id:"forminator-"+this.props.property,onChange:e=>{this.updateValue(e.target.checked)},checked:r?"checked":""}),c().createElement("span",{className:"sui-toggle-slider"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Enable")," ",e),c().createElement("span",{className:"sui-toggle-label"},e,this.props.required&&c().createElement("span",{className:"sui-error"}," *")))),c().createElement("div",{className:"sui-accordion-col-auto"},c().createElement("button",{className:"sui-button-icon sui-accordion-open-indicator",onClick:()=>this.toggleState()},c().createElement("i",{className:"sui-icon-chevron-down","aria-hidden":"true"})))),c().createElement("div",{className:"sui-accordion-item-body"},n))}}class oi extends Rr.Component{constructor(e){super(e),this.state={active:this.props.default?this.props.default:""}}toggleValue(e){this.setState({active:e})}render(){this.props.default&&this.props.default;const e=this.props.type?this.props.type:"side-tabs",t=this.props.extraClass?this.props.extraClass:"",s=c().Children.map(this.props.children,(e=>{if(!_.isUndefined(e)&&!_.isNull(e))return c().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&&c().createElement("span",{className:"sui-error"},"*"))})),r=c().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 c().createElement("div",{className:t+(e.props.value===this.state.active?" active":"")},e.props.value===this.state.active&&e)}));return c().createElement("div",{className:`sui-${e} ${t}`},c().createElement("div",{className:"sui-tabs-menu"},s),c().createElement("div",{className:"sui-tabs-content"},r))}}function li(){return li=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},li.apply(null,arguments)}class pi extends Rr.Component{constructor(e){super(e),this.multiFields=[{slug:"street_address",label:fr("Address")},{slug:"address_line",label:fr("Apartment, suite, etc.")},{slug:"address_city",label:fr("City")},{slug:"address_state",label:fr("State / Province")},{slug:"address_zip",label:fr("ZIP / Postal code")},{slug:"address_country",label:fr("Country")}]}hasChildrens(e){const t=_.filter(e,(e=>!_.isUndefined(e)));return!_.isEmpty(t)}render(){const{type:e}=this.props;fr("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:c().createElement("a",{href:"https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes",target:"_blank"})}});switch(e){case"labels":return c().createElement("div",{className:"sui-accordion sui-accordion-flushed",value:"multiple"},this.multiFields.map(((e,t)=>"address_country"===e.slug?c().createElement(ii,li({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,li({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:e.slug+"_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(An,li({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),"data-placeholder":fr("Enter Placeholder"),property:e.slug+"_placeholder"}),c().createElement("option",null),_.map(forminatorData.countries,((e,t)=>c().createElement("option",{value:e,key:t},e)))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,li({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:e.slug+"_description"})))))):"address_country"!==e.slug?c().createElement(ii,li({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,li({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:e.slug+"_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,li({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:e.slug+"_placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,li({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("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),c().createElement(Nn,{cols:"12",label:Dn(t.label),settings:this.props.state,value:t.slug,required:this.props.state[t.slug+"_required"],boxClass:"sui-tab-boxed",key:s},c().createElement(Gn,li({},this.props,{prefix:t.slug})),c().createElement(Xn,li({},this.props,{prefix:t.slug})))}));return this.hasChildrens(t)?c().createElement(oi,{default:e},t):c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"none"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("At least one field must be enabled")))));case"geolocation":return forminatorData.geolocation?c().createElement(ai,this.props):c().createElement(ni,li({},this.props,{text:forminatorData.isPro?fr("The Autocomplete feature simplifies entering addresses by offering real-time suggestions as you type. This feature requires the Forminator Geolocation Add-on."):fr("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 c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}class ci extends Rr.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=c().Children.map(this.props.children,(s=>{let r="";const a=_.isUndefined(s.props.label)?s.props.children:s.props.label;return s.props.image1x&&s.props.image2x&&(r=c().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&&(r=c().createElement("img",{src:`${forminatorData.imagesUrl}/${s.props.image1x}`,"aria-hidden":"true"})),s.props.image2x&&!s.props.image1x&&(r=c().createElement("img",{src:`${forminatorData.imagesUrl}/${s.props.image2x}`,srcSet:`${forminatorData.imagesUrl}/${s.props.image2x} 2x`,"aria-hidden":"true"})),s.props.hasImage?c().createElement("label",{htmlFor:`forminator-field-${s.props.value}`,className:"sui-radio-image"},r,c().createElement("span",{className:e},c().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)}),c().createElement("span",{"aria-hidden":"true"}),c().createElement("span",null,a))):s.props.hasImage?void 0:c().createElement("label",{htmlFor:`forminator-field-${s.props.value}`,className:e},c().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)}),c().createElement("span",{"aria-hidden":"true"}),c().createElement("span",null,a))})),r=c().Children.map(this.props.children,(e=>"true"!==this.props.radioContent||_.isUndefined(e.props.children)?c().createElement(Rr.Fragment,null):c().createElement("div",{className:"sui-border-frame"+(e.props.value===t?"":" sui-hidden"),style:{marginLeft:"0"}},e.props.value===t&&e)));let a="";this.props.label&&""!==this.props.label&&(a=c().createElement("label",{className:"sui-label"},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note)));let n="";this.props.description&&""!==this.props.description&&(n=c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},this.props.description));let i="";this.props.settingsLabel&&""!==this.props.settingsLabel&&(i=c().createElement("label",{className:"sui-settings-label"},this.props.settingsLabel));let o="";return this.props.settingsDesc&&""!==this.props.settingsDesc&&(o=c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},this.props.settingsDesc)),this.props.noWrapper?s:c().createElement(Rr.Fragment,null,c().createElement("div",{role:"radiogroup",className:"sui-form-field"},a,i,n,o,s,r))}}function ui(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function di(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?ui(Object(s),!0).forEach((function(t){mi(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):ui(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}function mi(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 r=s.call(e,t||"default");if("object"!=typeof r)return r;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 hi extends Rr.Component{constructor(e){super(e),this.textEditor=c().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=di(di({},t),{ADD_TAGS:["iframe"]})),"function"==typeof this.props.updateProperty?this.props.updateProperty(this.props.property,Ks.sanitize(e,t)):this.props.actions.settingsActions.updateSetting(this.props.property,Ks.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"),r=t.prop("selectionEnd"),a=t.val();t.val(a.substring(0,s)+"{"+e+"}"+a.substring(r,a.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),vr(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 c().createElement("li",{className:"wpmudev-dropdown--option",key:s},c().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,e.element_id)},Dn(e.label)))})),r=_.isUndefined(this.props.settings.type)?"":this.props.settings.type,a=_.map(e,((e,s)=>{if(!e.required&&r!==e.field_type&&(t||!t&&_.isEmpty(e.parent_group)))return c().createElement("li",{className:"wpmudev-dropdown--option",key:s},c().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,e.element_id)},Dn(e.label)))}));return c().createElement(Rr.Fragment,null,s&&s.some((function(e){return void 0!==e}))&&c().createElement(Rr.Fragment,null,c().createElement("li",{className:"wpmudev-dropdown--option"},c().createElement("strong",null,fr("Required Fields"))),c().createElement(Rr.Fragment,null,s)),a&&a.some((function(e){return void 0!==e}))&&c().createElement(Rr.Fragment,null,c().createElement("li",{className:"wpmudev-dropdown--option"},c().createElement("strong",null,fr("Optional Fields"))),c().createElement(Rr.Fragment,null,a)))}getMiscData(){const e=_.isEmpty(this.props.editorOptions)?[]:this.props.editorOptions;return c().createElement(Rr.Fragment,null,c().createElement("li",{className:"wpmudev-dropdown--option"},c().createElement("strong",null,fr("Misc Data"))),_.map(e,((e,t)=>c().createElement("li",{className:"wpmudev-dropdown--option",key:t},c().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=lr("paypal",e),s=lr("stripe",e),r=_.isEmpty(this.props.paymentOptions)?[]:this.props.paymentOptions,a=_.isEmpty(this.props.stripeSubscriptionOptions)?[]:this.props.stripeSubscriptionOptions;if(!_.isEmpty(t)||!_.isEmpty(s))return c().createElement(Rr.Fragment,null,this.props.paymentOptions&&c().createElement("li",{className:"wpmudev-dropdown--option"},c().createElement("strong",null,fr("Payment Data"))),_.map(r,((e,t)=>c().createElement("li",{className:"wpmudev-dropdown--option",key:t},c().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,t)},e)))),!_.isEmpty(s)&&this.hasSubscriptionPlans(s)&&_.map(a,((e,t)=>c().createElement("li",{className:"wpmudev-dropdown--option",key:t},c().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():"",r=this.props.mainOptions?this.props.mainOptions:{form_name:fr("Form Name")};return c().createElement("ul",{className:this.state.editorOptionsOpen?"sui-active":""},this.props.enableAllFormFields&&c().createElement("li",{className:"wpmudev-dropdown--option"},c().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,"all_fields")},fr("All Form Fields"))),this.props.enableAllNonFormFields&&c().createElement("li",{className:"wpmudev-dropdown--option"},c().createElement("a",{className:"wpmudev-insert-content",onClick:this.insertContent.bind(this,"all_non_empty_fields")},fr("All Non Empty Fields"))),s,c().createElement(Rr.Fragment,null,this.props.mainOptionsLabel&&c().createElement("li",{className:"wpmudev-dropdown--option"},c().createElement("strong",null,this.props.mainOptionsLabel)),_.map(r,((e,t)=>c().createElement("li",{className:"wpmudev-dropdown--option",key:t},c().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)?fr("This field is required!"):this.props.requiredError,r=this.isValid(e)?"":"sui-form-field-error";let a;_.isEmpty(t)||(a=c().createElement("div",{className:"sui-editor-options"},c().createElement("button",{className:this.state.editorOptionsOpen?"sui-tooltip sui-active":"sui-tooltip","data-tooltip":_.isUndefined(this.props.tooltipLabel)?fr("Add form data"):this.props.tooltipLabel,onClick:this.toggleOptions},c().createElement("i",{className:"sui-icon-plus sui-sm","aria-hidden":"true"}),_.isUndefined(this.props.selectLabel)?fr("Insert form fields"):this.props.selectLabel),t));let n="";return this.props.label&&(n=c().createElement("label",{htmlFor:`forminator-field-${this.props.property+!_.isUndefined(this.props.extraId)?this.props.extraId:""}`,className:"sui-label"},this.props.label," ",this.props.isRequired&&c().createElement("span",{className:"sui-error"}," *"),this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note))),c().createElement("div",{className:`sui-form-field ${r}`},n,this.props.descriptionTop&&c().createElement("span",{className:"sui-description",style:{marginBottom:"20px"}},this.props.descriptionTop),c().createElement("div",{className:"sui-editor"+(_.isEmpty(t)?"":" sui-editor-with-options")},a,c().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)&&c().createElement("span",{className:"sui-error-message"},s),this.props.description&&c().createElement("span",{className:"sui-description"},this.props.description))}}function fi(){return fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},fi.apply(null,arguments)}class bi extends Rr.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)?fr("hCaptcha verification failed. Please try again."):this.props.state.hcaptcha_error_message,r=Or(forminatorData.userPermissions.manage_forminator_settings)||Or(forminatorData.userPermissions.manage_options)?fr("Add your API keys {{link}}here{{/link}} and then come back to configure this field.",{components:{link:c().createElement("a",{href:forminatorData.settingsUrl+"§ion=captcha",target:"_blank"})}}):"",a=fr("You haven't added hCaptcha API keys in your global settings."),n=fr("You haven't added API keys for this reCAPTCHA type in your global settings.");switch(e){case"labels":case"visibility":default:return c().createElement("div",null);case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Qn,{label:fr("Captcha Provider"),labelDark:!0,description:fr("Select your preferred CAPTCHA provider below."),sidebar:!1},c().createElement(ei,fi({},this.props,{settings:this.props.state,property:"captcha_provider",default:"recaptcha"}),c().createElement(ti,{value:"recaptcha",label:fr("reCAPTCHA")}),c().createElement(ti,fi({settings:this.props.state,value:"hcaptcha",label:fr("hCaptcha")},this.props),!forminatorData.hasHCaptcha&&c().createElement("div",{role:"alert",className:`sui-notice sui-notice-red ${!forminatorData.hasHCaptcha&&"sui-active"}`,style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,a," ",r))))))),c().createElement(Qn,{label:fr("Alignment"),labelDark:!0,description:fr("Select the alignment of CAPTCHA."),sidebar:!1},c().createElement($n,fi({},this.props,{settings:this.props.state,property:"captcha_alignment",defaultValue:"left"}),c().createElement("span",{value:"left"},fr("Left")),c().createElement("span",{value:"center"},fr("Center")),c().createElement("span",{value:"right"},fr("Right")))),"recaptcha"===t&&c().createElement(Qn,{label:fr("reCAPTCHA type"),labelDark:!0,description:fr("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:c().createElement("a",{href:"https://developers.google.com/recaptcha/docs/versions",target:"_blank"})}}),sidebar:!1},c().createElement(ei,fi({},this.props,{property:"captcha_type",settings:this.props.state,default:"v2_checkbox",label:""}),c().createElement(ti,fi({settings:this.props.state},this.props,{value:"v2_checkbox",label:fr("V2 Checkbox"),boxClass:forminatorData.hasV2Captcha?"sui-tab-boxed":""}),!forminatorData.hasV2Captcha&&c().createElement("div",{role:"alert",className:`sui-notice sui-notice-red ${!forminatorData.hasV2Captcha&&" sui-active"}`,style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,n," ",r)))),forminatorData.hasV2Captcha&&c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,fi({},this.props,{settings:this.props.state,label:fr("Size"),property:"captcha_size",fieldClass:"sui-input-md"}),c().createElement("option",{value:"normal"},fr("Normal")),c().createElement("option",{value:"compact"},fr("Compact")))),c().createElement(Nn,{cols:"6"},c().createElement(zn,fi({},this.props,{settings:this.props.state,label:fr("Theme"),property:"captcha_theme",fieldClass:"sui-input-md"}),c().createElement("option",{value:"light"},fr("Light")),c().createElement("option",{value:"dark"},fr("Dark")))))),c().createElement(ti,fi({settings:this.props.state},this.props,{value:"v2_invisible",label:fr("V2 Invisible"),boxClass:forminatorData.hasV2InvisibleCaptcha?"sui-tab-boxed":""}),!forminatorData.hasV2InvisibleCaptcha&&c().createElement("div",{role:"alert",className:`sui-notice sui-notice-red${!forminatorData.hasV2InvisibleCaptcha&&" sui-acitve"}`,style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,n," ",r)))),forminatorData.hasV2InvisibleCaptcha&&c().createElement(zn,fi({},this.props,{settings:this.props.state,label:fr("Theme"),property:"captcha_theme",fieldClass:"sui-input-md"}),c().createElement("option",{value:"light"},fr("Light")),c().createElement("option",{value:"dark"},fr("Dark")))),c().createElement(ti,fi({settings:this.props.state},this.props,{value:"v3_recaptcha",label:fr("reCAPTCHA V3"),boxClass:forminatorData.hasV3Captcha?"sui-tab-boxed":""}),!forminatorData.hasV3Captcha&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,n," ",r)))),forminatorData.hasV3Captcha&&c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("span",{className:"sui-description"},fr("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.")),c().createElement(zn,fi({},this.props,{settings:this.props.state,label:fr("Score Threshold"),property:"score_threshold",fieldClass:"sui-input-md"}),c().createElement("option",{value:"0.0"},fr("0.0")),c().createElement("option",{value:"0.1"},fr("0.1")),c().createElement("option",{value:"0.2"},fr("0.2")),c().createElement("option",{value:"0.3"},fr("0.3")),c().createElement("option",{value:"0.4"},fr("0.4")),c().createElement("option",{value:"0.5"},fr("0.5")),c().createElement("option",{value:"0.6"},fr("0.6")),c().createElement("option",{value:"0.7"},fr("0.7")),c().createElement("option",{value:"0.8"},fr("0.8")),c().createElement("option",{value:"0.9"},fr("0.9")),c().createElement("option",{value:"1.0"},fr("1.0")))))))),"hcaptcha"===t&&forminatorData.hasHCaptcha&&c().createElement(Qn,{label:fr("hCaptcha type"),labelDark:!0,description:fr("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},c().createElement(ei,fi({},this.props,{property:"hcaptcha_type",settings:this.props.state,default:"hc_checkbox",label:""}),c().createElement(ti,fi({settings:this.props.state},this.props,{value:"hc_checkbox",label:fr("Checkbox"),boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,fi({},this.props,{settings:this.props.state,label:fr("Size"),property:"hcaptcha_size",fieldClass:"sui-input-md"}),c().createElement("option",{value:"normal"},fr("Normal")),c().createElement("option",{value:"compact"},fr("Compact")))),c().createElement(Nn,{cols:"6"},c().createElement(zn,fi({},this.props,{settings:this.props.state,label:fr("Theme"),property:"hcaptcha_theme",fieldClass:"sui-input-md"}),c().createElement("option",{value:"light"},fr("Light")),c().createElement("option",{value:"dark"},fr("Dark")))))),c().createElement(ti,fi({settings:this.props.state},this.props,{value:"hc_invisible",label:fr("Invisible"),boxClass:"sui-tab-boxed"}),c().createElement(hi,fi({},this.props,{settings:this.props.state,property:"hc_invisible_notice",hideEditorOptions:"true",descriptionTop:fr("To comply with online privacy laws, users should be informed that this form includes an invisible CAPTCHA field.")}))))),c().createElement(Qn,{label:fr("Language"),labelDark:!0,description:fr("By default, the global CAPTCHA language setting will be used. However, you can manually select a different language here."),sidebar:!1},c().createElement(zn,fi({},this.props,{settings:this.props.state,property:"language",fieldClass:"sui-input-md","data-placeholder":fr("Automatic"),hasSearch:!0}),c().createElement("option",{value:""},fr("Automatic")),_.map(forminatorData.captchaLangs,((e,t)=>c().createElement("option",{value:t,key:t},e))))),"recaptcha"===t&&"v3_recaptcha"===this.props.state.captcha_type&&forminatorData.hasV3Captcha&&c().createElement(Qn,{label:fr("Theme"),labelDark:!0,description:fr("Select the theme for the captcha."),sidebar:!1},c().createElement(zn,fi({},this.props,{settings:this.props.state,label:fr("Theme"),property:"captcha_theme",fieldClass:"sui-input-md"}),c().createElement("option",{value:"light"},fr("Light")),c().createElement("option",{value:"dark"},fr("Dark")))),"recaptcha"===t&&("v2_invisible"===this.props.state.captcha_type&&forminatorData.hasV2InvisibleCaptcha||"v3_recaptcha"===this.props.state.captcha_type&&forminatorData.hasV3Captcha)&&c().createElement(Qn,{label:fr("Badge Position"),labelDark:!0,description:fr("Select where the reCAPTCHA badge will be displayed on your page."),sidebar:!1},c().createElement(ci,fi({},this.props,{settings:this.props.state,property:"captcha_badge",defaultValue:"inline",radioClass:"sui-radio-sm"}),c().createElement(si,{value:"bottomright",hasImage:!0,image1x:"recaptcha-bottomright.png",image2x:"recaptcha-bottomright@2x.png",label:fr("Bottom Right")}),c().createElement(si,{value:"bottomleft",hasImage:!0,image1x:"recaptcha-bottomleft.png",image2x:"recaptcha-bottomleft@2x.png",label:fr("Bottom Left")}),c().createElement(si,{value:"inline",hasImage:!0,image1x:"recaptcha-inline.png",image2x:"recaptcha-inline@2x.png",label:fr("Inline in Form")}))),c().createElement(Qn,{label:fr("Error Message"),labelDark:!0,sidebar:!1},"recaptcha"===t&&c().createElement(Rr.Fragment,null,c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Choose the error message you want to display on your form when reCAPTCHA verification fails.")),c().createElement(Sn,fi({},this.props,{type:"text",property:"recaptcha_error_message",settings:this.props.state}))),"hcaptcha"===t&&c().createElement(Rr.Fragment,null,c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Choose the error message you want to display on your form when hCaptcha verification fails.")),c().createElement(Sn,fi({},this.props,{type:"text",property:"hcaptcha_error_message",settings:this.props.state,defaultValue:s})))));case"styling":return c().createElement(Hn,this.props)}}}class gi extends Rr.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 r=!(!_.isUndefined(this.props.boxedContent)&&""!==this.props.boxedContent)||this.props.boxedContent,a=!_.isUndefined(this.props.defaultContentRender)&&this.props.defaultContentRender,n=c().Children.map(this.props.children,(e=>e));return c().createElement("div",{className:"sui-accordion-item "+s},c().createElement("span",{className:"sui-accordion-item-header",onClick:()=>this.toggleState()},c().createElement("div",{className:"sui-accordion-item-title"},c().createElement("span",null,e),c().createElement("button",{className:"sui-button-icon sui-accordion-open-indicator",onClick:()=>this.toggleState()},c().createElement("i",{className:"sui-icon-chevron-down","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},!1===this.state.open?"Open":"Close")))),c().createElement("div",{className:"sui-accordion-item-body"},!1===r?(a||t)&&n:c().createElement("div",{className:"sui-box"},c().createElement("div",{className:"sui-box-body"},(a||t)&&n),r)))}}class yi extends Rr.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 r="";return this.props.itemClass&&""!==this.props.itemClass&&(r=" "+this.props.itemClass),c().createElement("label",{htmlFor:`forminator-field-${t}`,className:`sui-checkbox${r}`},c().createElement("input",{type:"checkbox",id:`forminator-field-${t}`,value:"true",checked:e?"checked":"",disabled:s,onChange:e=>{this.updateValue(e.target.checked)}}),c().createElement("span",{"aria-hidden":"true"}),this.props.label&&c().createElement("span",null,this.props.label,!_.isUndefined(this.props.tooltip)&&""!==this.props.tooltip&&c().createElement("span",{className:"sui-tooltip sui-tooltip-constrained",style:{marginLeft:10,verticalAlign:"middle","--tooltip-width":"165px"},"data-tooltip":this.props.tooltip},c().createElement("span",{className:"sui-icon-info","aria-hidden":"true",style:{pointerEvents:"none"}}))))}}class vi extends Rr.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 r=Object.assign({allowClear:!0,dropdownCssClass:"sui-select-dropdown",placeholder:fr("Click here to add a date…")},this.props.options);"function"==typeof this.$el.SUIselect2?this.$el.SUIselect2(r):"function"==typeof this.$el.FUIselect2?this.$el.FUIselect2(r):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?c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-settings-label"+("dark"===this.props.hasSettingsLabel?" sui-dark":"")},this.props.label):c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note))),this.props.description&&""!==this.props.description&&(s=c().createElement("p",{className:"sui-description",style:{marginBottom:10}},this.props.description)),c().createElement("div",{className:"sui-form-field"},t,s,c().createElement("div",{className:"fui-datepicker-tags"},c().createElement("select",{ref:e=>this.el=e,className:"sui-select sui-select-lg",defaultValue:e,multiple:"multiple"},this.props.children),c().createElement("input",{ref:e=>this.elDate=e,className:"sui-input"})))}}class Ei extends Rr.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 r=Object.assign({allowClear:!0,dropdownCssClass:"sui-select-dropdown",placeholder:fr("Click here to add a date range...")},this.props.options);"function"==typeof this.$el.SUIselect2?this.$el.SUIselect2(r):"function"==typeof this.$el.FUIselect2?this.$el.FUIselect2(r):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,r){const a=_.isUndefined(e.props.settings[e.props.property])?[]:e.props.settings[e.props.property];a.push(r.startDate.format(t)+" - "+r.endDate.format(t)),e.updateValue(a),e.$el.html(""),_.each(a,(function(t){e.$el.append(jQuery('<option value="'+t+'">'+t+"</option>"))})),e.$el.val(a).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?c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-settings-label"+("dark"===this.props.hasSettingsLabel?" sui-dark":"")},this.props.label):c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note))),this.props.description&&""!==this.props.description&&(s=c().createElement("p",{className:"sui-description",style:{marginBottom:10}},this.props.description)),c().createElement("div",{className:"sui-form-field"},t,s,c().createElement("div",{className:"fui-datepicker-tags"},c().createElement("select",{ref:e=>this.el=e,className:"sui-select sui-select-lg",defaultValue:e,multiple:"multiple"},this.props.children),c().createElement("div",{className:"fui-daterange-calendar"}),c().createElement("input",{id:`forminator-field-${this.props.property}`,style:{visibility:"hidden"},ref:e=>this.elDate=e,className:"sui-input",autoComplete:"off"})))}}function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},_i.apply(null,arguments)}class wi extends Rr.Component{constructor(e){super(e)}getDateFields(){const e=[];return lr("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),c().createElement(Rr.Fragment,null,c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Start & End date")),c().createElement("span",{className:"sui-description"},fr("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:c().createElement("a",{href:forminatorData.adminUrl+"options-general.php",target:"_blank"})}})),c().createElement("div",{className:"fui-form-field--row"},c().createElement("div",{className:"fui-form-field--col",style:{maxWidth:240}},c().createElement(zn,_i({},this.props,{label:fr("Start Date"),settings:this.props.state,property:"start-date",options:this.disableSearch()}),c().createElement("option",{value:""},fr("No limit")),c().createElement("option",{value:"specific"},fr("Specific date")),c().createElement("option",{value:"today"},fr("Today")),this.getDateFields().length>0&&c().createElement("optgroup",{label:fr("Date fields")},_.map(this.getDateFields(),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))))),"specific"===e&&c().createElement("div",{className:"fui-form-field--col"},c().createElement(jn,_i({},this.props,{label:" ",settings:this.props.state,property:"start-specific-date",dateFormat:"mm/dd/yy",placeholder:fr("Pick a date"),calendarIcon:"left"}))),""!==e&&"specific"!==e&&c().createElement("div",{className:"fui-form-field--col"},c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Offset (optional)")),c().createElement("div",{className:"sui-form-field-inline"},c().createElement(zn,_i({},this.props,{settings:this.props.state,property:"start-offset-operator",fieldClass:"sui-input-sm",defaultValue:"+",options:this.disableSearch()}),c().createElement("option",{value:"+"},fr("+")),c().createElement("option",{value:"-"},fr("-"))),c().createElement(Sn,_i({},this.props,{settings:this.props.state,placeholder:fr("0"),property:"start-offset-value",fieldClass:"sui-input-sm",defaultValue:"0"})),c().createElement(zn,_i({},this.props,{settings:this.props.state,property:"start-offset-duration",fieldClass:"fui-field-full",defaultValue:"days",options:this.disableSearch()}),c().createElement("option",{value:"days"},fr("days")),c().createElement("option",{value:"weeks"},fr("weeks")),c().createElement("option",{value:"months"},fr("months")),c().createElement("option",{value:"years"},fr("years"))))))),c().createElement("div",{className:"fui-form-field--row"},c().createElement("div",{className:"fui-form-field--col",style:{maxWidth:240}},c().createElement(zn,_i({},this.props,{label:fr("End Date"),settings:this.props.state,property:"end-date",options:this.disableSearch()}),c().createElement("option",{value:""},fr("No limit")),c().createElement("option",{value:"specific"},fr("Specific date")),c().createElement("option",{value:"today"},fr("Today")),this.getDateFields().length>0&&c().createElement("optgroup",{label:fr("Date fields")},_.map(this.getDateFields(),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))))),"specific"===t&&c().createElement("div",{className:"fui-form-field--col"},c().createElement(jn,_i({},this.props,{settings:this.props.state,property:"end-specific-date",dateFormat:"mm/dd/yy",placeholder:fr("Pick a date"),calendarIcon:"left"}))),""!==t&&"specific"!==t&&c().createElement("div",{className:"fui-form-field--col"},c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Offset (optional)")),c().createElement("div",{className:"sui-form-field-inline"},c().createElement(zn,_i({},this.props,{settings:this.props.state,property:"end-offset-operator",fieldClass:"sui-input-sm",defaultValue:"+",options:this.disableSearch()}),c().createElement("option",{value:"+"},fr("+")),c().createElement("option",{value:"-"},fr("-"))),c().createElement(Sn,_i({},this.props,{settings:this.props.state,placeholder:fr("0"),property:"end-offset-value",fieldClass:"sui-input-sm",defaultValue:"0"})),c().createElement(zn,_i({},this.props,{settings:this.props.state,property:"end-offset-duration",fieldClass:"fui-field-full",defaultValue:"days",options:this.disableSearch()}),c().createElement("option",{value:"days"},fr("days")),c().createElement("option",{value:"weeks"},fr("weeks")),c().createElement("option",{value:"months"},fr("months")),c().createElement("option",{value:"years"},fr("years")))))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Days of the week")),c().createElement("span",{className:"sui-description"},fr("Choose which days of the week should be available on the calendar.")),c().createElement(ei,_i({},this.props,{property:"howto-restrict",settings:this.props.state,default:"all"}),c().createElement(si,{value:"all"},fr("All days")),c().createElement(ti,_i({},this.props,{settings:this.props.state,value:"week",label:fr("Selected days"),boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"4"},c().createElement(yi,_i({},this.props,{settings:this.props.state,property:"sunday",label:fr("Sunday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,_i({},this.props,{settings:this.props.state,property:"wednesday",label:fr("Wednesday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,_i({},this.props,{settings:this.props.state,property:"saturday",label:fr("Saturday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),c().createElement(Nn,{cols:"4"},c().createElement(yi,_i({},this.props,{settings:this.props.state,property:"monday",label:fr("Monday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,_i({},this.props,{settings:this.props.state,property:"thursday",label:fr("Thursday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),c().createElement(Nn,{cols:"4"},c().createElement(yi,_i({},this.props,{settings:this.props.state,property:"tuesday",label:fr("Tuesday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,_i({},this.props,{settings:this.props.state,property:"friday",label:fr("Friday"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))))))),c().createElement(Qn,null,c().createElement(vi,_i({},this.props,{label:fr("Disable dates"),hasSettingsLabel:"dark",description:fr("Use this setting to disable specific dates on the calendar."),settings:this.props.state,property:"disabled-dates",dateFormat:"mm/dd/yy",placeholder:fr("Pick a date")}))),c().createElement(Qn,null,c().createElement(Ei,_i({},this.props,{label:fr("Disable date ranges"),hasSettingsLabel:"dark",description:fr("Use this setting to disable specific dates ranges on the calendar."),settings:this.props.state,property:"disable-date-range",dateFormat:"MM/DD/YYYY",placeholder:fr("Pick a date")}))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Error Message")),c().createElement("span",{className:"sui-description"},fr("Choose an error message to be used when visitor enters a date that is disabled.")),c().createElement(Sn,_i({},this.props,{settings:this.props.state,property:"restrict_message"}))))}}function xi(){return xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},xi.apply(null,arguments)}class Ni extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props,{field_type:t}=this.props.state,s=fr("Note: The query parameter's value passed in URL should match with the selected date format.");switch(e){case"labels":return c().createElement(ei,xi({},this.props,{property:"field_type",settings:this.props.state,default:"picker",label:fr("Type"),divClass:"sui-tabs-content-lg"}),c().createElement(ti,xi({settings:this.props.state},this.props,{value:"picker",label:fr("Calendar")}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:"placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(zn,xi({},this.props,{settings:this.props.state,label:fr("Date Format"),placeholder:fr("Date Format"),property:"date_format"}),c().createElement("option",{value:"yy-mm-dd"},fr("Y-m-d")),c().createElement("option",{value:"mm-dd-yy"},fr("m-d-Y")),c().createElement("option",{value:"dd-mm-yy"},fr("d-m-Y")),c().createElement("option",{value:"yy/mm/dd"},fr("Y/m/d")),c().createElement("option",{value:"mm/dd/yy"},fr("m/d/Y")),c().createElement("option",{value:"dd/mm/yy"},fr("d/m/Y")),c().createElement("option",{value:"yy.mm.dd"},fr("Y.m.d")),c().createElement("option",{value:"mm.dd.yy"},fr("m.d.Y")),c().createElement("option",{value:"dd.mm.yy"},fr("d.m.Y"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement($n,xi({property:"icon",settings:this.props.state},this.props,{label:fr("Calendar Icon")}),c().createElement("span",{value:"true"},fr("Show")),c().createElement("span",{value:"false"},fr("Hide")))))),c().createElement(ti,xi({settings:this.props.state},this.props,{value:"select",label:fr("Dropdowns")}),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(zn,xi({},this.props,{settings:this.props.state,label:fr("Date Format"),placeholder:fr("Date Format"),property:"date_format"}),c().createElement("option",{value:"yy-mm-dd"},fr("Y-m-d")),c().createElement("option",{value:"mm-dd-yy"},fr("m-d-Y")),c().createElement("option",{value:"dd-mm-yy"},fr("d-m-Y")),c().createElement("option",{value:"yy/mm/dd"},fr("Y/m/d")),c().createElement("option",{value:"mm/dd/yy"},fr("m/d/Y")),c().createElement("option",{value:"dd/mm/yy"},fr("d/m/Y")),c().createElement("option",{value:"yy.mm.dd"},fr("Y.m.d")),c().createElement("option",{value:"mm.dd.yy"},fr("m.d.Y")),c().createElement("option",{value:"dd.mm.yy"},fr("d.m.Y"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))),c().createElement("label",{className:"sui-label"},fr("Fields")),c().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginTop:"10px"}},c().createElement(gi,xi({},this.props,{label:fr("Month")}),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label (optional)"),placeholder:fr("Enter label"),property:"month_label"}))))),c().createElement(gi,xi({},this.props,{label:fr("Day")}),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label (optional)"),placeholder:fr("Enter label"),property:"day_label"}))))),c().createElement(gi,xi({},this.props,{label:fr("Year")}),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label (optional)"),placeholder:fr("Enter label"),property:"year_label"}))))))),c().createElement(ti,xi({settings:this.props.state},this.props,{value:"input",label:fr("Text inputs")}),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(zn,xi({},this.props,{settings:this.props.state,label:fr("Date Format"),placeholder:fr("Date Format"),property:"date_format"}),c().createElement("option",{value:"yy-mm-dd"},fr("Y-m-d")),c().createElement("option",{value:"mm-dd-yy"},fr("m-d-Y")),c().createElement("option",{value:"dd-mm-yy"},fr("d-m-Y")),c().createElement("option",{value:"yy/mm/dd"},fr("Y/m/d")),c().createElement("option",{value:"mm/dd/yy"},fr("m/d/Y")),c().createElement("option",{value:"dd/mm/yy"},fr("d/m/Y")),c().createElement("option",{value:"yy.mm.dd"},fr("Y.m.d")),c().createElement("option",{value:"mm.dd.yy"},fr("m.d.Y")),c().createElement("option",{value:"dd.mm.yy"},fr("d.m.Y"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))),c().createElement("label",{className:"sui-label"},fr("Fields")),c().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginTop:"10px"}},c().createElement(gi,xi({},this.props,{label:fr("Month")}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label (optional)"),placeholder:fr("Enter label"),property:"month_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter placeholder"),property:"month_placeholder"}))))),c().createElement(gi,xi({},this.props,{label:fr("Day")}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label (optional)"),placeholder:fr("Enter label"),property:"day_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter placeholder"),property:"day_placeholder"}))))),c().createElement(gi,xi({},this.props,{label:fr("Year")}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Label (optional)"),placeholder:fr("Enter label"),property:"year_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter placeholder"),property:"year_placeholder"}))))))));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),"input"!==t&&c().createElement(Qn,{label:fr("Default Date"),labelDark:!0,description:fr("Use this feature to specify a default selected date."),sidebar:!1},c().createElement(ei,xi({},this.props,{property:"default_date",settings:this.props.state,default:"none",label:""}),c().createElement(si,{value:"none"},fr("None")),c().createElement(si,{value:"today"},fr("Today")),c().createElement(ti,xi({},this.props,{settings:this.props.state,value:"custom",label:fr("Future Date"),boxClass:"sui-tab-boxed"}),c().createElement(jn,xi({},this.props,{settings:this.props.state,property:"date",dateFormat:this.props.state.date_format||"",placeholder:fr("20 April 2018")}))))),"select"===t&&c().createElement(Qn,{label:fr("Year Range"),labelDark:!0,description:fr("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},c().createElement("div",{className:"fui-form-field--row"},c().createElement(xn,null,c().createElement(Nn,{cols:"4"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("From"),placeholder:fr("1920"),property:"min_year",type:"number"}))),c().createElement(Nn,{cols:"4"},c().createElement(Sn,xi({},this.props,{settings:this.props.state,label:fr("To"),placeholder:fr("2030"),property:"max_year",type:"number"})))))),c().createElement(Xn,xi({},this.props,{notice:s})));case"limits":return c().createElement(wi,this.props);case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function ki(){return ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ki.apply(null,arguments)}class Si extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(Pn,this.props);case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement(Qn,{label:fr("Signature Filetype"),labelDark:!0,description:fr("Choose the filetype to save your users' signature in."),descriptionSpacing:20,sidebar:!1},c().createElement("div",{className:"sui-form-field-inline"},c().createElement(zn,ki({},this.props,{property:"filetype",settings:this.props.state,"data-width":"100",fieldsize:"100"}),c().createElement("option",{value:"png"},fr("PNG")),c().createElement("option",{value:"jpg"},fr("JPG"))))),c().createElement(Qn,{label:fr("Height"),labelDark:!0,description:fr("Choose the height of your signature field. The default value is 180px."),descriptionSpacing:20,sidebar:!1},c().createElement(Sn,ki({},this.props,{type:"number",settings:this.props.state,placeholder:"180",property:"height",suffix:"px"}))),c().createElement(Qn,{label:fr("Stroke Thickness"),labelDark:!0,description:fr("Choose the thickness in pixels for signature strokes. The default value is 2px."),descriptionSpacing:20,sidebar:!1},c().createElement(Sn,ki({},this.props,{type:"number",settings:this.props.state,placeholder:"2",property:"thickness",suffix:"px"}))));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function Ci(){return Ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ci.apply(null,arguments)}class Pi extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(Sn,Ci({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("E.g. Consent"),property:"field_label"})),c().createElement(hi,Ci({},this.props,{settings:this.props.state,boxClass:"sui-tab-boxed",property:"consent_description",editorOptions:t,description:fr("Describe what your users should consent to.")})));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function Fi(){return Fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Fi.apply(null,arguments)}class Oi extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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:c().createElement("strong",null)}}))))),c().createElement(Sn,Fi({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})),c().createElement(hi,Fi({},this.props,{settings:this.props.state,boxClass:"sui-tab-boxed",property:"gdpr_description",editorOptions:forminatorData.variables,description:fr("Note, the form will not submit until the user has accepted the terms.")})));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Sn,Fi({},this.props,{settings:this.props.state,label:fr("Error message"),placeholder:fr("Enter required message"),property:"required_message",id:"forminator-field-name-error-msg"})));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function Di(){return Di=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Di.apply(null,arguments)}class Ai extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Di({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(zn,Di({},this.props,{settings:this.props.state,label:fr("Default Value (optional)"),placeholder:fr("Enter default value"),property:"default_value"}),_.map(forminatorData.variablesForHiddenField,((e,t)=>c().createElement("option",{value:t,key:t},e)))))),"custom_value"===this.props.state.default_value&&c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Di({},this.props,{settings:this.props.state,label:fr("Custom Value"),placeholder:fr("Enter custom value"),property:"custom_value"})))),"query"===this.props.state.default_value&&c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Di({},this.props,{settings:this.props.state,label:fr("Query parameter"),placeholder:fr("E.g. query_parameter_key"),property:"prefill"})))));case"settings":case"visibility":default:return c().createElement("div",null);case"styling":return c().createElement(Hn,this.props)}}}function Ti(){return Ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ti.apply(null,arguments)}class ji extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(Sn,Ti({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})),c().createElement(hi,Ti({},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 c().createElement("div",null);case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props)}}}function Mi(){return Mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Mi.apply(null,arguments)}class Ui extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement("span",{className:"sui-description"},fr("Use this field to group Forminator fields together and collect repeating data in your form. Learn more about grouping and repeating use cases in {{link}}this tutorial. {{icon/}}{{/link}}",{components:{strong:c().createElement("strong",null),link:c().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#field-group",target:"_blank"}),icon:c().createElement("span",{className:"sui-icon-open-new-window sui-sm","aria-hidden":"true"})}})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Mi({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Mi({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))))}}function Ii(){return Ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ii.apply(null,arguments)}class $i extends Rr.Component{constructor(e){super(e)}getVariables(){return vr(this.props.wrappers,[],{},["calculation","currency","number","slider"])}render(){const e=this.getVariables();return c().createElement(ei,Ii({},this.props,{property:"is_repeater",settings:this.props.state,default:"true",label:fr("Field Repeater"),description:fr("Allow fields in this group to be repeated.")}),c().createElement(ti,Ii({},this.props,{settings:this.props.state,value:"true",label:fr("Enable"),boxClass:"sui-tab-boxed"}),c().createElement(ei,Ii({},this.props,{property:"min_limit_type",settings:this.props.state,default:"custom",label:fr("Minimum repeater limit"),wrapperClass:"forminator-float",description:fr("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.")}),c().createElement(ti,Ii({},this.props,{settings:this.props.state,value:"custom",label:fr("Custom"),boxClass:""}),c().createElement(Sn,Ii({},this.props,{settings:this.props.state,defaultValue:"",minValue:"1",property:"min_limit",placeholder:fr("Enter minimum limit"),type:"number"}))),c().createElement(ti,Ii({},this.props,{settings:this.props.state,value:"variable",label:fr("Variable"),boxClass:""}),c().createElement(zn,Ii({},this.props,{settings:this.props.state,property:"min_limit_field",noWrapper:!0}),c().createElement("option",{value:""},fr("Choose form field")),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label+" {"+e.element_id+"}"))))))),c().createElement(ei,Ii({},this.props,{property:"max_limit_type",settings:this.props.state,default:"custom",label:fr("Maximum repeater limit"),wrapperClass:"forminator-float",description:fr("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.")}),c().createElement(ti,Ii({},this.props,{settings:this.props.state,value:"custom",label:fr("Custom"),boxClass:""}),c().createElement(Sn,Ii({},this.props,{settings:this.props.state,defaultValue:"",minValue:"1",property:"max_limit",placeholder:fr("Enter maximum limit"),type:"number"}))),c().createElement(ti,Ii({},this.props,{settings:this.props.state,value:"variable",label:fr("Variable"),boxClass:""}),c().createElement(zn,Ii({},this.props,{settings:this.props.state,property:"max_limit_field",noWrapper:!0}),c().createElement("option",{value:""},fr("Choose form field")),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label+" {"+e.element_id+"}"))))))),c().createElement(ei,Ii({},this.props,{property:"action_element_type",settings:this.props.state,default:"button",label:fr("Repeater Element Type"),description:fr("Choose the element type and label text for your repeater actions.")}),c().createElement(ti,Ii({},this.props,{settings:this.props.state,value:"button",label:fr("Buttons"),boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Ii({},this.props,{settings:this.props.state,label:fr("Add Button Text (optional)"),placeholder:fr("Add item"),defaultValue:fr("Add item"),property:"add_action_text"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,Ii({},this.props,{settings:this.props.state,label:fr("Remove Button Text (optional)"),placeholder:fr("Remove item"),defaultValue:fr("Remove item"),property:"remove_action_text"}))))),c().createElement(si,Ii({},this.props,{settings:this.props.state,value:"icon",label:fr("Icons")})),c().createElement(ti,Ii({},this.props,{settings:this.props.state,value:"link",label:fr("Text links"),boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Ii({},this.props,{settings:this.props.state,label:fr("Add Link Text (optional)"),placeholder:fr("Add item"),defaultValue:fr("Add item"),property:"add_action_text"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,Ii({},this.props,{settings:this.props.state,label:fr("Add Link Text (optional)"),placeholder:fr("Remove item"),defaultValue:fr("Remove item"),property:"remove_action_text"}))))))),c().createElement(si,Ii({},this.props,{settings:this.props.state,value:"false",label:fr("Disable")})))}}function Vi(){return Vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Vi.apply(null,arguments)}class Ri extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(Hn,this.props),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Group Field Styling")),c().createElement("span",{className:"sui-description"},fr("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."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(ei,Vi({},this.props,{property:"group_styles",settings:this.props.state,default:"default"}),c().createElement(si,Vi({},this.props,{settings:this.props.state,value:"default",label:fr("Apply")})),c().createElement(si,Vi({},this.props,{settings:this.props.state,value:"custom",label:fr("Remove")}))))))}}class Li extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(Ui,this.props);case"settings":return c().createElement($i,this.props);case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Ri,this.props);default:return c().createElement("div",null)}}}function Bi(){return Bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Bi.apply(null,arguments)}class zi extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(ci,Bi({},this.props,{settings:this.props.state,property:"slider_type",label:fr("Type"),defaultValue:"single",radioClass:"sui-radio-sm"}),c().createElement(si,{value:"single",hasImage:!0,image1x:"slider-single.png",image2x:"slider-single@2x.png",label:fr("Single Slider")}),c().createElement(si,{value:"range",hasImage:!0,image1x:"slider-range.png",image2x:"slider-range@2x.png",label:fr("Range Slider")})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Bi({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Bi({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))))}}class Wi extends Rr.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,r=e&&!s,a=c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-toggle"},c().createElement("input",{type:"checkbox",value:"true",id:`forminator-field-${this.props.property}`,className:t,disabled:s?"disabled":"",checked:r?"checked":"",onChange:e=>{this.updateValue(e.target.checked)}}),c().createElement("span",{className:"sui-toggle-slider"}),this.props.label&&c().createElement(Rr.Fragment,null,c().createElement("span",{className:"sui-screen-reader-text"},fr("Enable")," ",this.props.label),c().createElement("span",{className:"sui-toggle-label"},this.props.label)),this.props.description&&c().createElement("span",{className:"sui-description sui-toggle-description"},this.props.description));let n="";return this.props.children&&this.props.settings[this.props.property]&&(n=c().createElement(Rr.Fragment,null,c().createElement("div",{tabIndex:"0",className:"sui-toggle-content sui-border-frame","aria-label":this.props.label},this.props.children))),this.props.unWrap?c().createElement(Rr.Fragment,null,a,n):this.props.unWrap?void 0:c().createElement("div",{className:"sui-form-field"},a,n)}}function qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},qi.apply(null,arguments)}class Hi extends Rr.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),r="range"===this.props.state.slider_type;const a="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=!1;_.isUndefined(this.props.state.slider_limits)||"show"!==this.props.state.slider_limits||(e=!0),this.props.updateProperty("display_step_value",e)}const n=c().createElement(Qn,{label:fr("Appearance"),labelDark:!0,sidebar:!1},c().createElement("div",{style:{marginTop:"20px"}},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement($n,qi({},this.props,{settings:this.props.state,property:"slider_width",defaultValue:"full",settingsLabel:fr("Slider width"),settingsDesc:fr("The Slider takes the full-width of its container by default, but you can select a different size below.")}),c().createElement("div",{value:"small"},fr("Small")),c().createElement("div",{value:"medium"},fr("Medium")),c().createElement("div",{value:"large"},fr("Large")),c().createElement("div",{value:"full"},fr("Full width"))))),!a&&c().createElement(c().Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement($n,qi({},this.props,{settings:this.props.state,property:"slider_scale",defaultValue:"small",settingsLabel:fr("Slider scale"),settingsDesc:fr("Adjust the slider base and the height of the draggable thumb/handle.")}),c().createElement("div",{value:"small"},fr("Small")),c().createElement("div",{value:"large"},fr("Large"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement($n,qi({},this.props,{settings:this.props.state,property:"show_slider_handle",defaultValue:"true",settingsLabel:fr("Slider Handle icon"),settingsDesc:fr("Choose whether to show an icon on the slider handle.")}),c().createElement("div",{value:"true"},fr("Show")),c().createElement("div",{value:"false"},fr("Hide")))))))),i=c().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginBottom:"-30px"}},c().createElement(gi,qi({},this.props,{label:fr("Advanced settings")}),c().createElement(Qn,{label:fr("Display and Labels"),labelDark:!0,sidebar:!1},c().createElement("div",{style:{marginTop:"20px"}},c().createElement(xn,null,c().createElement(Nn,null,c().createElement(Wi,qi({},this.props,{settings:this.props.state,label:fr("Display selected value"),property:"display_selected_value",unWrap:!0}),c().createElement(xn,{boxClass:"sui-tab-boxed"},c().createElement(Nn,null,c().createElement(zn,qi({},this.props,{settings:this.props.state,label:fr("Selected value position"),property:"value_position",defaultValue:"bottom"}),c().createElement(Rr.Fragment,null,c().createElement("option",{value:"top"},fr("Above slider track")),c().createElement("option",{value:"bottom"},fr("Below slider track"))))))))),c().createElement(xn,null,c().createElement(Nn,null,c().createElement(Wi,qi({},this.props,{settings:this.props.state,label:fr("Display step values"),property:"display_step_value",unWrap:!0}),c().createElement(xn,{boxClass:"sui-tab-boxed"},c().createElement(Nn,null,c().createElement(zn,qi({},this.props,{settings:this.props.state,label:fr("Display type"),property:"display_step_type",defaultValue:"min_max"}),c().createElement(Rr.Fragment,null,c().createElement("option",{value:"min_max"},fr("Min & Max values only")),c().createElement("option",{value:"all"},fr("All values"))))))))),c().createElement(Qn,{label:fr("Prefix and Suffix"),labelDark:!1,description:fr("Use these fields to display texts (e.g., currency symbols or units of measure) before and after the slider values."),descriptionSpacing:20,sidebar:!1},c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,qi({},this.props,{settings:this.props.state,label:fr("Prefix"),placeholder:fr('E.g. "$"'),property:"prefix"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,qi({},this.props,{settings:this.props.state,label:fr("Suffix"),placeholder:fr('E.g. "%"'),property:"suffix"}))))))),n)),o=c().createElement(Qn,{label:fr("Values"),labelDark:!0,sidebar:!1,lastChild:!0},c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,qi({},this.props,{settings:this.props.state,type:"number",maxValue:t,step:s,label:fr("Minimum value"),placeholder:fr("Enter value"),property:"slider_min",defaultValue:e}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,qi({},this.props,{settings:this.props.state,type:"number",minValue:e,value:t,step:s,label:fr("Maximum value"),placeholder:fr("Enter value"),property:"slider_max"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,qi({},this.props,{settings:this.props.state,type:"number",label:fr("Step (Increment between values)"),minValue:"0",placeholder:fr("Enter value"),property:"slider_step",defaultValue:s}))),c().createElement(Nn,{cols:"6"},c().createElement(xn,null,c().createElement(Nn,r&&{cols:"6"},c().createElement(Sn,qi({},this.props,{settings:this.props.state,type:"number",minValue:e,maxValue:_.min([t,this.props.state.slider_default_2]),step:s,label:fr(r?"Start value":"Default selected value"),placeholder:fr("Enter value"),property:"slider_default",defaultValue:e}))),r&&c().createElement(Nn,{cols:"6"},c().createElement(Sn,qi({},this.props,{settings:this.props.state,type:"number",minValue:_.max([e,this.props.state.slider_default]),maxValue:t,step:s,label:fr("End value"),placeholder:fr("Enter value"),property:"slider_default_2",defaultValue:t})))))));return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),o,i)}}function Qi(){return Qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Qi.apply(null,arguments)}class Yi extends Rr.Component{constructor(e){super(e)}render(){return c().createElement($n,Qi({},this.props,{settings:this.props.state,property:"hidden_behavior",defaultValue:"ignore",label:fr("When this field is hidden, should its value be null (zero), or should the field be ignored in calculations?"),noWrapper:!0}),c().createElement("span",{value:"zero"},fr("Null (zero)")),c().createElement("span",{value:"ignore"},fr("Ignore this field")))}}class Gi extends Rr.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?c().createElement("div",null):c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-form-field"},c().createElement("span",{className:"sui-description"},fr("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 c().createElement("div",{key:t,className:`sui-form-field ${s}`},c().createElement("label",{htmlFor:`calculation-option-${t}`,className:"sui-label"},Dn(e.label)),c().createElement("input",{type:"number",placeholder:fr("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)&&c().createElement("span",{className:"sui-error-message"},fr("Calculation value is required!")))})),c().createElement(Yi,this.props))}}function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ki.apply(null,arguments)}class Ji extends Rr.Component{constructor(e){super(e)}isElementUsedInCalculationFields(){let e=!1;const t=this,s=Sr(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,r=new RegExp(`\\{${s}\\}|\\{${s}\\-\\*\\}`,"g");null!==e.match(r)&&(t=!0)}return t}getUsedCalculationFieldNames(){const e=this,t=Sr(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 r="";if(s){r=`${fr("It is impossible to disable calculation for this field because it is in use in %(names)s field(s).",{args:{names:this.getUsedCalculationFieldNames()}})}`}let a=c().createElement("span",{className:"sui-description"},fr("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&&(a=c().createElement("span",{className:"sui-description"},this.props.description)),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Calculations")),a,e.length>0&&c().createElement(ei,Ki({},this.props,{settings:this.props.state,disabled:s,property:"calculations",description:"",default:"false",noWrapper:!0,tooltip:r}),c().createElement(Gi,Ki({},this.props,{value:"true",boxClass:t,label:fr("Enable")})),c().createElement(si,{value:"false",label:fr("Disable")})),0===e.length&&c().createElement(ei,Ki({},this.props,{settings:this.props.state,disabled:s,property:"calculations",default:"false",noWrapper:!0,tooltip:r}),c().createElement(ti,Ki({},this.props,{value:"true",label:fr("Enable"),settings:this.props.state,boxClass:"sui-tab-boxed"}),c().createElement(Yi,this.props)),c().createElement(si,{value:"false",label:fr("Disable")}))))}}class Xi extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(zi,this.props);case"settings":return c().createElement(Hi,this.props);case"calculations":return c().createElement(Ji,this.props);case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}class Zi extends Rr.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:fr("Select image"),button:{text:fr("Select")},multiple:!1}).on("select",(function(){let s;const r=t.state().get("selection").first().toJSON();s=_.isUndefined(e.props.imageSize)?r.url:"thumbnail"===e.props.imageSize?r.sizes.thumbnail.url:"medium"===e.props.imageSize?_.isUndefined(r.sizes.medium)?r.sizes.full.url:r.sizes.medium.url:"large"===e.props.imageSize?_.isUndefined(r.sizes.large)?r.sizes.full.url:r.sizes.large.url:r.sizes.full.url,"function"==typeof e.props.updateProperty?(e.props.updateProperty(e.props.property,s),e.props.updateProperty(e.props.property+"_filename",r.filename),e.props.updateProperty(e.props.property+"_alt",r.alt)):(e.props.actions.settingsActions.updateSetting(e.props.property,s),e.props.actions.settingsActions.updateSetting(e.props.property+"_filename",r.filename),e.props.actions.settingsActions.updateSetting(e.props.property+"_alt",r.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 r="";this.props.label&&(r=c().createElement("label",{className:"sui-label"},this.props.label));let a="";this.props.description&&(a=c().createElement("span",{className:"sui-description"},this.props.description));let n="";if("image"===this.props.type){let t="";e&&(t="url("+e+")"),n=c().createElement("div",{className:"sui-upload-image","aria-hidden":"true"},c().createElement("div",{className:"sui-image-mask"}),c().createElement("div",{role:"button",onClick:this.openMedia.bind(this),className:"sui-image-preview",style:{backgroundImage:t}}))}const i=this.props.fieldClass?" "+this.props.fieldClass:"";return c().createElement("div",{className:`sui-form-field${i}`},r,c().createElement("div",{className:`sui-upload ${t}`},c().createElement("input",{type:"file",value:"",readOnly:"readonly"}),n,c().createElement("button",{className:"sui-upload-button",onClick:this.openMedia.bind(this)},c().createElement("i",{className:"sui-icon-upload-cloud","aria-hidden":"true"}),"image"===this.props.type?`${fr("Upload image")}`:`${fr("Upload file")}`),c().createElement("div",{className:"sui-upload-file"},c().createElement("span",{title:s},s),c().createElement("button",{className:"sui-upload-button--remove",onClick:this.clearImage.bind(this)},c().createElement("i",{className:"sui-icon-close","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},"image"===this.props.type?`${fr("Remove uploaded image")}`:`${fr("Remove uploaded file")}`)))),a)}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},eo.apply(null,arguments)}class to extends Rr.Component{constructor(e){super(e),this.labelInput=c().createRef(),this.valueInput=c().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=function(e){return e.trim().replace(/\s+|\//g,"-")}(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,r,a=0,n=0;clearTimeout(s),s=setTimeout((function(){t.each((function(){jQuery(this).find(".sui-accordion-item").hasClass("sui-accordion-item--open")?a++:n++})),clearTimeout(r),r=setTimeout((function(){0===a?e.props.updateProperty("options_expanded",!1):0===n&&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})}render(){const e=this.state.focus?"fui-on_focus":"",t=_.isEmpty(this.props.option.label)||this.props.option.error?"sui-form-field-error":"",{open:s}=this.state,r=this.props.state.enable_images;let a="";const n=void 0!==this.props.option.image?"url("+this.props.option.image+")":"";return a=s?"sui-accordion-item--open":"",c().createElement("div",{className:`fui-option ${e}`,ref:e=>this.opt=e},c().createElement("div",{className:"fui-option-settings"},c().createElement("div",{className:"sui-accordion-item "+a,style:{boxShadow:"none"}},c().createElement("div",{className:"sui-accordion-item-header",style:{minHeight:"0",padding:"0"}},c().createElement("div",{className:"fui-option-settings--main",style:{padding:"0"}},!s&&r&&c().createElement("div",{className:"sui-upload"},c().createElement("div",{className:"sui-upload-image","aria-hidden":"true"},c().createElement("div",{className:"sui-image-mask"}),c().createElement("div",{role:"button",className:"sui-image-preview",style:{display:"block",backgroundImage:n}}))),c().createElement("div",{className:`sui-form-field ${t}`},c().createElement("input",{type:"text",size:"1",placeholder:fr("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:fr("Label")})),!s&&c().createElement("label",{htmlFor:`option-selected-${this.props.counter}`,className:"sui-checkbox",title:fr("Selected"),style:{marginLeft:"15px"}},c().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)}),c().createElement("span",{"aria-hidden":"true"})),c().createElement("button",{className:"sui-button-icon sui-button-red fui-option-remove",title:fr("Delete option"),"aria-label":fr("Delete option"),onClick:this.removeOption.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"})),c().createElement("div",{style:{borderLeft:"1px solid #E6E6E6",width:"1px",height:"30px"}}),c().createElement("button",{className:"sui-button-icon sui-accordion-open-indicator",title:fr("Toggle"),"aria-label":"Open item",onClick:()=>this.toggleState()},c().createElement("i",{className:"sui-icon-chevron-down","aria-hidden":"true"})))),c().createElement("div",{className:"sui-accordion-item-body",style:{padding:"10px 10px 0 0"}},c().createElement("div",{className:"fui-option-settings--extra"},c().createElement("input",{type:"text",value:this.props.option.value,placeholder:fr("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&&c().createElement("input",{type:"text",value:this.props.option.limit,placeholder:fr("Submission limit"),className:"sui-form-control",onChange:this.updateLimit.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)}),s&&c().createElement("label",{htmlFor:`option-selected-${this.props.counter}`,className:"sui-checkbox"},c().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)}),c().createElement("span",{"aria-hidden":"true"}),c().createElement("span",{className:"sui-description sui-description-sm"},fr("Selected")))),r&&c().createElement("div",{className:"fui-option-settings--extra"},c().createElement(Zi,eo({},this.props,{settings:this.props.option,type:"image",fieldClass:"sui-auto",property:"image",updateProperty:this.updateImage})))))))}}class so extends Rr.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 r=t.target.value;0!==s.length&&(r=s+"\n"+r),this.updateValue(r),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(fr("+ 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)?fr("This field is required!"):this.props.requiredError,r=this.isValid(t)?"":"sui-form-field-error",a=!_.isUndefined(this.props.state.enable_images)&&this.props.state.enable_images,n=fr("My Label; my-value; 0; https://mysite.com/my-image-url.jpg"),i=fr("My Label; my-value; 0");return c().createElement("div",{className:`sui-form-field ${r}`},c().createElement("div",{className:"sui-row"},c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-col-sm-6 sui-label"},this.props.label," ",(this.props.isRequired||this.props.required)&&c().createElement("span",{className:"sui-error"}," *")),c().createElement("div",{id:"add-predefined",className:"sui-col-sm-6 sui-insert-variables",ref:e=>this.addPredefined=e},c().createElement("select",{className:"predefined-options sui-variables",ref:e=>this.el=e},c().createElement("option",{value:i},fr("New option")),a&&c().createElement("option",{value:n},fr("New option with image")),c().createElement("option",{value:fr("Under 1 year\n1-17\n18-24\n25-34\n35-44\n45-54\n55-64\n65 and Above")},fr("Age")),c().createElement("option",{value:fr("Male\nFemale\nNon-binary\nOther")},fr("Gender")),c().createElement("option",{value:fr("Primary School\nHigh School\nSome College\nAssociate's Degree\nBachelor's Degree\nMaster's degree\nProfessional degree\nDoctoral degree\nOther")},fr("Educational Attainment")),c().createElement("option",{value:fr("Full-time employed\nPart-time employed\nSelf-employed\nContract Worker\nHomemaker\nRetired\nStudent\nUnemployed")},fr("Employment Status")),c().createElement("option",{value:fr("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")},fr("Occupation")),c().createElement("option",{value:fr("Single\nMarried\nDivorced\nSeparated\nWidowed")},fr("Marital Status")),c().createElement("option",{value:fr("Africa\nAntarctica\nAsia\nAustralia\nEurope\nNorth America\nSouth America")},fr("Continents")),c().createElement("option",{value:fr("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")},fr("Countries")),c().createElement("option",{value:fr("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")},fr("American States")),c().createElement("option",{value:fr("Alberta\nBritish Columbia\nManitoba\nNew Brunswick\nNewfoundland and Labrador\nNorthwest Territories\nNova Scotia\nNunavut\nOntario\nPrince Edward Island\nQuebec\nSaskatchewan\nYukon")},fr("Canadian Provinces"))))),c().createElement("div",{className:"sui-insert-variables"},c().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)&&c().createElement("span",{className:"sui-error-message"},s),this.props.description&&c().createElement("span",{className:"sui-description bulk-editor-description"},this.props.description)))}}function ro(){return ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ro.apply(null,arguments)}class ao extends Rr.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);const t=!_.isUndefined(this.props.state.bulk_edit)&&this.props.state.bulk_edit;this.state={options:_.isUndefined(this.props.state.options)?[]:[...this.props.state.options],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}}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,r=this.state.options,a=this.props.state.bulk_edit,n=this.state.is_loading;let i,o;if(a||!e.state.bulk_edit||n||this.setState({is_loading:!0}),!a&&n){const e=r.length<50?400:700;clearTimeout(o),o=setTimeout((function(){s.setState({is_loading:!1,show_standard:!0})}),e)}return clearTimeout(i),a&&this.props.state.options_bulk_editor!==e.state.options_bulk_editor?i=setTimeout((function(){s.convertToStandard()}),500):a||this.props.state.options===e.state.options||(i=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,r){t&&(e.$el.find(".fui-multi-options").sortable("refreshPositions"),t=!1)},stop:function(t,s){const r=s.item.index();e.$el.find(".fui-multi-options").sortable("cancel");const a=s.item.index();e.moveOption(a,r)}})}if(t){e.setState({show_standard:!1}),window.File&&window.FileReader&&window.FileList&&window.Blob||this.showError(fr("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"),r=this.$el.find(".uploaded-csv-file"),a=r.find(".remove-file"),n=this.$el.find("#upload-csv-input");this.$el.find(".upload-csv-btn, .uploaded-csv-file > span").on("click",(function(){n.trigger("click"),e.hideError()})),a.on("click",(function(){n.val("").trigger("change")})),n.on("change",(function(){const i=n.val();if(i.length>0){e.setState({csv_file:n.get(0).files[0]});"csv"!==i.slice(2+(i.lastIndexOf(".")-1>>>0))?(a.trigger("click"),e.showError(fr("Whoops, only .csv filetype is allowed."))):(s.prop("disabled",!1),t.hide(),r.show(),r.find("> span").html(i.replace(/^.*[\\\/]/,"")),0!==e.props.state.options_bulk_editor.length&&e.showError(fr("Importing this will replace your current options. Click import to continue."),"warning"))}else s.prop("disabled",!0),t.show(),r.hide(),r.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 r=s,a=new FileReader;this.setState({options_bulk_editor:""}),a.onload=function(){let t=a.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()},a.readAsText(r),this.setState({csv_file:null}),t.trigger("change")}else e.showError(fr("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){this.setState({options:e}),this.props.updateProperty("options",e),this.convertToBulk()}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 r=this.state.options;"image"===s&&(r[e].image=t),"image"!==s&&(r[e].image_filename=t),this.updateState(r)}addOption(){const e=this.state.options,t=Js()+"-"+Js();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").next(".fui-multi-options");jQuery(".standard-editor").outerHeight()>460?e.addClass("add-option-box"):e.removeClass("add-option-box")}),50)}generateUniqId(){return Js()+"-"+Js()}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 r="",a=!1;_.map(e,((e,n)=>{n>0&&(r+="\n");const i=e.label,o=e.value;r+=i,r+=";",_.isUndefined(o)?_.isUndefined(i)?r+="":r+=i:r+=o,_.isUndefined(e.default)||!e.default||("radio"===t||"select"===t&&"single"===s)&&a?(r+="; ",r+="0"):e.default&&(r+="; ",r+="1",a=!0),"select"===t?_.isUndefined(e.limit)||_.isEmpty(e.limit)||(r+="; ",r+=e.limit):_.isUndefined(e.image)||_.isEmpty(e.image)||(r+="; ",r+=e.image)})),this.setState({options_bulk_editor:r}),this.props.updateProperty("options_bulk_editor",r)}convertToStandard(){const e=this.props.state.type,t=this.props.state.value_type,s=[];let r=this.props.state.options_bulk_editor;if(!_.isUndefined(r)&&r.length>0){let a=0,n=!1;r=r.split(/\r\n|\r|\n/),_.map(r,((r,i)=>{if(Boolean(r)){const i=r.split(";"),o=!_.isUndefined(i[2])&&1==i[2],l=_.isEmpty(i[0])?fr("Option ")+(a+1):i[0];let p=_.isUndefined(i[1])?"":i[1];if(_.isEmpty(p)&&(p=l),s[a]={key:this.generateUniqId(),label:l,value:p},s[a].default=("radio"!==e&&("select"!==e||"single"!==t)||!n)&&o,o&&(n=!0),_.isEmpty(i[3])||("select"===e?"enable"===this.props.state.limit_status&&(s[a].limit=i[3]):(s[a].image=i[3],s[a].image_filename=i[3].replace(/^.*[\\\/]/,""))),this.props.state.calculations){const e=_.find(this.state.options_calcs,(function(e){return e.label===l}));s[a].calculation=_.isUndefined(e)?"":e.calculation}a++}}))}this.setState({options:s}),this.props.updateProperty("options",s)}findDuplicateOptions(e){let t=null;return _.map(e,(s=>{const r=_.filter(e,{label:s.label}).length,a=_.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 r>1&&a>1:t="Warning! You've added options with same label and value.",s.error=!0;break;case r>1:t="Warning! You've added options with same label.",s.error=!0;break;case a>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?fr("Expand All"):fr("Collapse All"),t=!_.isUndefined(this.props.state.bulk_edit)&&this.props.state.bulk_edit,s=this.props.state.type,r="select"!==s?"checkbox_radio_bulk_template.csv":"select_bulk_template.csv",[a,n]=this.findDuplicateOptions(this.state.options),i=this.state.options_bulk_editor,o=this.state.is_loading,l=this.state.show_standard,p=a.length>1e3,u=0===a.length?"no-option":"";let d="";switch(s){case"select":d=fr("Select");break;case"radio":d=fr("Radio");break;case"checkbox":d=fr("Checkbox")}let m=fr("Label; value; selection (0 or 1); image-url");"select"===s&&(m="enable"===this.props.state.limit_status?fr("Label; value; selection (0 or 1); submission limit"):fr("Label; value; selection (0 or 1)"));const h=forminatorData.pluginUrl+"assets/csv/"+r;return c().createElement("div",{id:"demo-multi-options--radio",className:"sui-form-field multi-options-bulk",ref:e=>this.el=e},p&&t||n&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-yellow sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr(n||"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."))))),c().createElement(xn,null,c().createElement(Nn,{cols:"3"},c().createElement("label",{id:"label-options",className:"sui-label"},fr("Options"))),c().createElement(Nn,{cols:"9"},c().createElement("div",{className:"switch-box"},!t&&c().createElement(yi,ro({},this.props,{settings:this.props.state,label:e,property:"options_expanded",itemClass:"sui-checkbox sui-checkbox-sm collapse-options"})),"select"!==s&&c().createElement(yi,ro({},this.props,{settings:this.props.state,label:fr("Enable Images"),property:"enable_images",itemClass:"sui-checkbox-sm "})),c().createElement("span",{className:"bulk-edit-toggle "},c().createElement(Wi,ro({},this.props,{settings:this.props.state,property:"bulk_edit",label:fr("Bulk Edit"),unWrap:!0})))))),o&&c().createElement("div",{className:"multi-opts-preloader"},c().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}," ",fr("Loading"),"...")),!t&&l&&c().createElement("div",{className:"sui-accordion sui-accordion-block"},c().createElement("div",{className:`fui-multi-options standard-editor ${u}`},_.map(a,((e,t)=>c().createElement(to,ro({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))))),c().createElement("div",{className:"fui-multi-options"},c().createElement("button",{className:"fui-add-option",onClick:this.addOption},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Option")))),t&&c().createElement("div",{className:"fui-multi-options"},c().createElement("div",{className:"sui-box sui-message sui-message-lg fui-multi-options-bulk"},c().createElement(so,ro({},this.props,{settings:this.props.state,property:"options_bulk_editor",defaultValue:i,value:i,updateValue:this.updateBulkValue,label:fr("Enter field options (one per line)"),description:fr('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:c().createElement("b",null)}})})),c().createElement("div",{className:"sui-form-field bulk-importer"},c().createElement("label",{className:"sui-label"},fr("Import options from CSV")),c().createElement("div",{className:"sui-upload"},c().createElement("input",{id:"upload-csv-input",type:"file",value:"",readOnly:"readonly",accept:".csv"}),c().createElement("button",{className:"sui-upload-button upload-csv-btn"},c().createElement("span",{className:"sui-icon-upload-cloud","aria-hidden":"true"}),fr("Upload file")),c().createElement("div",{className:"sui-upload-file uploaded-csv-file"},c().createElement("span",null),c().createElement("button",{className:"remove-file","aria-label":"Remove file"},c().createElement("span",{className:"sui-icon-close","aria-hidden":"true"}))),c().createElement("button",{role:"button",className:"sui-button sui-button-blue import-csv-btn",disabled:!0},c().createElement("span",{className:"sui-icon-download-cloud","aria-hidden":"true"}),fr("Import"))),c().createElement("div",{role:"alert",className:"sui-notice sui-notice-error","aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null)))),c().createElement("span",{className:"sui-description"},fr("Choose a CSV (.csv) file to import field options and values.")+" ",h&&c().createElement("a",{className:"blue",href:h,target:"_blank",download:r},fr("Download csv template")))))))}}function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},no.apply(null,arguments)}class io extends Rr.Component{constructor(e){super(e)}toggleValue(e){this.props.updateProperty(this.requiredProp,e)}render(){const e=fr("radio"===(_.isUndefined(this.props.state.type)?"radio":this.props.state.type)?"radio button":"checkbox"),t=e.charAt(0).toUpperCase()+e.slice(1);return c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},t+" "+fr("visibility")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr(`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.`)),c().createElement($n,no({},this.props,{settings:this.props.state,property:"input_visibility",defaultValue:"true",noWrapper:!0}),c().createElement("div",{value:"true"},fr("Show")),c().createElement("div",{value:"false"},fr("Hide"))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},oo.apply(null,arguments)}class lo extends Rr.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 c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},t+" "+fr("options display order")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr(`By default, ${e} options are displayed orderly to users. However, you can use the below option to display them randomly upon refreshing the page.`)),c().createElement($n,oo({},this.props,{settings:this.props.state,property:"options_order",defaultValue:"orderly",noWrapper:!0}),c().createElement("div",{value:"orderly"},fr("Orderly")),c().createElement("div",{value:"random"},fr("Random"))))}}function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},po.apply(null,arguments)}class co extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,po({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,po({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))),c().createElement(ao,this.props));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Layout")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("By default, we stack the options vertically. However, you can change the options layout below.")),c().createElement($n,po({},this.props,{settings:this.props.state,property:"layout",defaultValue:"vertical",noWrapper:!0}),c().createElement("div",{value:"vertical"},fr("Vertical")),c().createElement("div",{value:"horizontal"},fr("Horizontal")))),t&&c().createElement(io,this.props),c().createElement(lo,this.props),c().createElement(Xn,this.props));case"calculations":return c().createElement(Ji,po({},this.props,{description:fr("Choose whether to allow this field to be used in calculations or not.")}));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},uo.apply(null,arguments)}class mo extends Rr.Component{constructor(e){super(e)}render(){const e=[{slug:"fname",label:fr("First Name")},{slug:"mname",label:fr("Middle Name")},{slug:"lname",label:fr("Last Name")}];return c().createElement("div",{className:"sui-accordion sui-accordion-flushed",value:"multiple"},c().createElement(ii,uo({},this.props,{label:fr("Prefix"),property:"prefix",required:this.props.state.prefix_required,settings:this.props.state}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,uo({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"prefix_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(An,uo({property:"prefix_placeholder",label:fr("Default value"),settings:this.props.state},this.props),c().createElement("option",{value:"Mr"},fr("Mr.")),c().createElement("option",{value:"Mrs"},fr("Mrs.")),c().createElement("option",{value:"Ms"},fr("Ms.")),c().createElement("option",{value:"Mx"},fr("Mx.")),c().createElement("option",{value:"Miss"},fr("Miss")),c().createElement("option",{value:"Dr"},fr("Dr.")),c().createElement("option",{value:"Prof"},fr("Prof."))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,uo({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"prefix_description"})))))),e.map(((e,t)=>c().createElement(ii,uo({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,uo({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:e.slug+"_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,uo({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:e.slug+"_placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,uo({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:e.slug+"_description"})))))))))}}function ho(){return ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ho.apply(null,arguments)}class fo extends Rr.Component{constructor(e){super(e),this.multiFields=[{slug:"prefix",label:fr("Prefix")},{slug:"fname",label:fr("First Name")},{slug:"mname",label:fr("Middle Name")},{slug:"lname",label:fr("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 c().createElement(ei,ho({},this.props,{property:"multiple_name",settings:this.props.state,default:"false",divClass:"sui-tabs-content-lg"}),c().createElement(Pn,ho({settings:this.props.state},this.props,{value:"false"}),fr("Single")),c().createElement(mo,ho({settings:this.props.state},this.props,{value:"true"}),fr("Multiple")));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 c().createElement(Nn,{cols:"12",label:Dn(t.label),value:t.slug,settings:this.props.state,boxClass:"sui-tab-boxed",key:s},c().createElement(Xn,ho({},this.props,{prefix:t.slug})));if("prefix"!==t.slug)return c().createElement(Nn,{cols:"12",label:Dn(t.label),settings:this.props.state,value:t.slug,required:this.props.state[t.slug+"_required"],boxClass:"sui-tab-boxed",key:s},c().createElement(Gn,ho({},this.props,{prefix:t.slug})),c().createElement(Xn,ho({},this.props,{prefix:t.slug})))}}));return this.hasChildrens(t)?c().createElement("div",null,c().createElement(oi,{default:e},t),c().createElement(Qn,{label:fr("Layout"),labelDark:!0,description:fr('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},c().createElement(ei,ho({},this.props,{property:"default_layout",settings:this.props.state,default:"default",label:""}),c().createElement(si,{value:"default"},fr("Default")),c().createElement(ti,ho({},this.props,{settings:this.props.state,value:"custom",label:fr("Custom"),boxClass:"sui-tab-boxed"}),c().createElement("div",{className:"fui-form-field--row"},c().createElement("div",{className:"fui-form-field--col",style:{maxWidth:160}},c().createElement(zn,ho({},this.props,{settings:this.props.state,label:fr("Number of columns"),placeholder:"1",property:"layout_columns"}),c().createElement("option",{value:"1"},"1"),c().createElement("option",{value:"2"},"2"),c().createElement("option",{value:"3"},"3"),c().createElement("option",{value:"4"},"4")))))))):c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("At least one field must be enabled")))))}if("true"!==this.props.state.multiple_name)return c().createElement("div",null,c().createElement(Gn,this.props),c().createElement(Xn,this.props));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},bo.apply(null,arguments)}class go extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,bo({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,bo({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:"placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,bo({},this.props,{settings:this.props.state,label:fr("Default Value (optional)"),placeholder:fr("Enter default value"),property:"default_value"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,bo({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement(Qn,{label:fr("Limits"),labelDark:!0,description:fr("Set the minimum and maximum values the user can choose. Leave the fields blank to allow any number including negatives."),descriptionSpacing:20,sidebar:!1},c().createElement("div",{className:"sui-form-field-inline"},c().createElement(Sn,bo({type:"number"},this.props,{settings:this.props.state,placeholder:"0",property:"limit_min",label:fr("Minimum"),fieldClass:"sui-input-md"})),c().createElement(Sn,bo({type:"number"},this.props,{settings:this.props.state,placeholder:"0",property:"limit_max",label:fr("Maximum"),fieldClass:"sui-input-md"}))),c().createElement(ei,bo({},this.props,{property:"limit_message",settings:this.props.state,default:"false",label:fr("Error Messages"),divClass:"sui-tabs-content-lg"}),c().createElement(si,{value:"false",label:fr("Default")}),c().createElement(ti,{value:"true",label:fr("Custom"),boxClass:"sui-tab-boxed"},c().createElement(Sn,bo({},this.props,{settings:this.props.state,type:"text",property:"limit_min_message",label:fr("When number is smaller than the min limit"),placeholder:fr("E.g. Please enter a number greater than 0.")})),c().createElement(Sn,bo({},this.props,{settings:this.props.state,type:"text",property:"limit_max_message",label:fr("When number is greater than the max limit"),placeholder:fr("E.g. Please enter a number lower than 1000.")}))))),c().createElement(Qn,{label:fr("Formatting"),labelDark:!0,description:fr("Choose how do you want to format the value of this field."),descriptionSpacing:20,sidebar:!1},c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,bo({},this.props,{property:"separators",settings:this.props.state,defaultValue:"1234567.89",label:fr("Separators"),fieldClass:"sui-input-md"}),c().createElement("option",{value:"blank"},fr("1234567.89")),c().createElement("option",{value:"comma_dot"},fr("1,234,567.89")),c().createElement("option",{value:"dot_comma"},fr("1.234.567,89")),c().createElement("option",{value:"space_comma"},fr("1 234 567,89")))),"custom"!==t&&c().createElement(Nn,{cols:"6"},c().createElement(zn,bo({},this.props,{property:"precision",settings:this.props.state,defaultValue:"0",label:fr("Round To"),fieldClass:"sui-input-md"}),c().createElement("option",{value:"0"},fr("0 decimals")),c().createElement("option",{value:"1"},fr("1 decimals")),c().createElement("option",{value:"2"},fr("2 decimals")),c().createElement("option",{value:"3"},fr("3 decimals")),c().createElement("option",{value:"4"},fr("4 decimals"))))),"custom"===t&&c().createElement("div",{className:"sui-form-field-inline sui-border-frame",style:{marginBottom:"5px"}},c().createElement(Sn,bo({type:"text"},this.props,{settings:this.props.state,placeholder:fr("E.g. $"),property:"thousand-separators",defaultValue:",",label:fr("Thousand Separator"),fieldClass:"sui-input-md"})),c().createElement(Sn,bo({type:"text"},this.props,{settings:this.props.state,placeholder:fr("E.g. $"),property:"decimal-separators",defaultValue:".",label:fr("Decimal Separator"),fieldClass:"sui-input-md"}))),"custom"===t&&c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,bo({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:fr("Round To"),fieldClass:"sui-input-md"}),c().createElement("option",{value:"0"},fr("0 decimals")),c().createElement("option",{value:"1"},fr("1 decimals")),c().createElement("option",{value:"2"},fr("2 decimals")),c().createElement("option",{value:"3"},fr("3 decimals")),c().createElement("option",{value:"4"},fr("4 decimals")))))),c().createElement(Xn,this.props));case"calculations":return c().createElement(Ji,this.props);case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function yo(){return yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},yo.apply(null,arguments)}class vo extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;return"labels"===e?c().createElement(Rr.Fragment,null,c().createElement(Sn,yo({},this.props,{settings:this.props.state,label:fr("Step label"),placeholder:fr("Enter step label"),property:"pagination-label"})),c().createElement(ei,yo({},this.props,{property:"pagination-labels",settings:this.props.state,settingsLabel:fr("Buttons Text"),default:"none",description:fr("Choose whether you want to use default text for the Previous and Next button or use custom text.")}),c().createElement(si,{value:"none"},fr("Default")),c().createElement(ti,yo({},this.props,{value:"custom",boxClass:"sui-tab-boxed",label:fr("Custom")}),c().createElement(Sn,yo({},this.props,{settings:this.props.state,label:fr("Previous Button"),placeholder:fr("Enter text"),property:"pagination-footer-button-text"})),c().createElement(Sn,yo({},this.props,{settings:this.props.state,label:fr("Next Button"),placeholder:fr("Enter text"),property:"pagination-right-button-text"}))))):c().createElement("div",null)}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Eo.apply(null,arguments)}class _o extends Rr.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 c().createElement(Pn,this.props);case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Validation")),c().createElement("span",{className:"sui-description"},fr("Make sure the users fill this field as per the selected validation and warn them when they haven't")),c().createElement(ei,Eo({},this.props,{property:"validation",settings:this.props.state,default:"none",label:fr("Type"),divClass:"sui-tabs-content-lg"}),c().createElement(si,{value:"none",label:fr("None")}),c().createElement(ti,{value:"standard",label:fr("National"),boxClass:"sui-tab-boxed"},c().createElement(An,Eo({},this.props,{settings:this.props.state,label:fr("Select the country to validate phone number for"),property:"phone_national_country"}),_.map(s,((e,t)=>c().createElement("option",{value:t,key:t},e)))),c().createElement(Sn,Eo({},this.props,{settings:this.props.state,label:fr("Validation message"),type:"text",placeholder:fr("Enter validation message"),property:"validation_message"}))),c().createElement(ti,{value:"international",label:fr("International"),boxClass:"sui-tab-boxed"},c().createElement(An,Eo({},this.props,{settings:this.props.state,label:fr("Default country"),property:"phone_international_country",defaultValue:"US"}),_.map(s,((e,t)=>c().createElement("option",{value:t,key:t},e)))),c().createElement(Sn,Eo({},this.props,{settings:this.props.state,label:fr("Validation message"),type:"text",placeholder:fr("Enter validation message"),property:"validation_message"}))),c().createElement(ti,{value:"character_limit",label:fr("Character Limit"),boxClass:"sui-tab-boxed"},c().createElement(Sn,Eo({},this.props,{settings:this.props.state,label:fr("Limit field to"),type:"text",placeholder:fr("10"),property:"limit",suffix:fr("Characters"),inputClass:"sui-field-has-suffix"})),c().createElement(Sn,Eo({},this.props,{settings:this.props.state,label:fr("Validation message"),type:"text",placeholder:fr("Enter validation message"),property:"validation_message"})))))),c().createElement(Xn,this.props));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}class wo extends Rr.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(fr("+ 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)?fr("This field is required!"):this.props.requiredError,r=this.isValid(t)?"":" sui-form-field-error",a=_.isUndefined(this.props.customClass)?"":" "+this.props.customClass;let n="",i="input",o="";"textarea"===this.props.type&&(i="textarea",o="textarea-type"),this.props.label&&(n=c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label," ",(this.props.isRequired||this.props.required)&&c().createElement("span",{className:"sui-error"}," *"),this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note)));const l=c().createElement(Rr.Fragment,null,"input"===i&&c().createElement("input",{type:"text",value:this.state.value,placeholder:this.props.placeholder,className:"sui-form-control",onChange:e=>{this.updateValue(e.target.value)}}),"textarea"===i&&c().createElement("textarea",{value:this.state.value,placeholder:this.props.placeholder,className:"sui-form-control",onChange:e=>{this.updateValue(e.target.value)},rows:this.props.rows}));return c().createElement("div",{className:`sui-form-field${a}${r}`},n,c().createElement("div",{className:`sui-insert-variables ${o}`},l,c().createElement("select",{className:"sui-variables",ref:e=>this.el=e},this.props.children.length<=0&&c().createElement("optgroup",{label:fr("No available options")}),this.props.children),this.props.isRequired&&!this.isValid(t)&&c().createElement("span",{className:"sui-error-message"},s),this.props.description&&c().createElement("span",{className:"sui-description"},this.props.description)))}}function xo(){return xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},xo.apply(null,arguments)}class No extends Rr.Component{constructor(e){super(e),this.state={focus:!1}}getNameOptions(){const e=[];return vr(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 c().createElement("div",{className:`sui-builder-field sui-can_move sui-react ${e}`},c().createElement("div",{className:"sui-field-info",style:{overflow:"inherit"}},c().createElement("i",{className:"sui-icon-drag sui-align_top","aria-hidden":"true"}),c().createElement("div",{className:"sui-builder-field-form"},c().createElement("div",{className:"sui-form-field-row"},c().createElement("input",{type:"text",placeholder:fr("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)})),c().createElement("div",{className:"sui-form-field-row"},c().createElement(wo,xo({},this.props,{settings:this.props.option,property:"value",placeholder:fr("Value"),className:"sui-form-control",onChange:this.updateValue.bind(this)}),this.getNameOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label)))))))),c().createElement("div",{className:"sui-field-actions sui-align_top"},c().createElement("button",{className:"sui-button-icon sui-button-red",onClick:this.removeOption.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Delete meta")))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ko.apply(null,arguments)}class So extends Rr.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,r){t&&(e.$el.find(".sui-builder-fields").sortable("refreshPositions"),t=!1)},stop:function(t,s){const r=s.item.index();e.$el.find(".sui-builder-fields").sortable("cancel");const a=s.item.index();e.moveOption(a,r)}})}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 c().createElement("div",{className:"sui-box-builder"},c().createElement("div",{className:"sui-box-builder-body",ref:e=>this.el=e},c().createElement("div",{className:"sui-builder-fields"},_.map(e,((e,t)=>c().createElement(No,ko({key:t,counter:t,option:e,removeOption:this.removeOption,updateValue:this.updateValue,updateLabel:this.updateLabel},this.props))))),c().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addOption},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Custom User Meta")),this.props.metaDescription&&e.length<=0&&c().createElement("span",{className:"sui-description",style:{marginTop:"30px"}},this.props.metaDescription)))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Co.apply(null,arguments)}class Po extends Rr.Component{constructor(e){super(e),this.multiFields=[{slug:"post_title",label:fr("Title"),placeholder:!1},{slug:"post_content",label:fr("Content"),placeholder:!0},{slug:"post_excerpt",label:fr("Excerpt"),placeholder:!1},{slug:"post_image",label:fr("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:fr("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 c().createElement(Rr.Fragment,null,c().createElement("p",{className:"sui-description"},fr("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:c().createElement("strong",null)}})),c().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?c().createElement(ii,Co({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Co({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:e.slug+"_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,Co({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:e.slug+"_placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Co({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:e.slug+"_description"})))))):!0===e.placeholder&&"post_custom_fields"!==e.slug?c().createElement(ii,Co({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Co({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:e.slug+"_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Co({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:e.slug+"_description"})))))):"post_custom_fields"===e.slug?c().createElement(ii,Co({},this.props,{label:e.label,property:e.slug,settings:this.props.state,key:t,noBoxBody:!0}),c().createElement(Rr.Fragment,null,c().createElement(So,Co({wrappers:this.props.wrappers},this.props)))):void 0))));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement(Qn,null,c().createElement("p",{className:"sui-settings-label sui-dark"},fr("Post type")),c().createElement("p",{className:"sui-description"},fr("Choose the post type associated with this field.")),c().createElement(An,Co({},this.props,{settings:this.props.state,label:fr("Assigned post type"),placeholder:fr("post"),property:"post_type",fieldClass:"sui-input-md"}),_.map(forminatorData.postTypeList,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)))))),c().createElement(Qn,null,c().createElement("p",{className:"sui-settings-label sui-dark"},fr("Default status")),c().createElement("p",{className:"sui-description"},fr("When a user submits this form, choose what status this post data is.")),c().createElement(An,Co({},this.props,{settings:this.props.state,label:fr("Status"),placeholder:fr("pending"),property:"data_status",fieldClass:"sui-input-md"}),c().createElement("option",{value:"draft"},fr("Draft")),c().createElement("option",{value:"pending"},fr("Pending Review")),c().createElement("option",{value:"publish"},fr("Published")))),c().createElement(Qn,null,c().createElement("p",{className:"sui-settings-label sui-dark"},fr("Default author")),c().createElement("p",{className:"sui-description"},fr("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.")),c().createElement(An,Co({},this.props,{settings:this.props.state,label:fr("Default author"),property:"select_author",fieldClass:"sui-input-md fui-reduce-spacing"}),_.map(forminatorData.userList,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))),c().createElement(yi,Co({},this.props,{settings:this.props.state,property:"default_author",label:fr("Always assign posts to this user"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),t.length>0&&c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Taxonomies limits")),c().createElement("span",{className:"sui-description"},fr("Choose whether to allow single or multiple categories or tags on this post.")),c().createElement("div",{className:"sui-form-field"},c().createElement(xn,null,_.map(t,((e,t)=>c().createElement(Nn,{cols:"6",key:t},c().createElement($n,Co({},this.props,{settings:this.props.state,property:e.value+"_multiple",defaultValue:"0",label:e.label}),c().createElement("div",{value:"0"},fr("Single")),c().createElement("div",{value:"1"},fr("Multiple")))))))))));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}class Fo extends Rr.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","#17A8E3","#E1F6FF","#666666","#AAAAAA","#E6E6E6"]});const e=this.$el,t=e.closest(".sui-colorpicker-wrap"),s=t.find(".sui-colorpicker-value span[role=button]"),r=t.find(".sui-colorpicker-value"),a=r.find("button"),n=e.closest(".wp-picker-container"),i=n.find(".wp-color-result"),o=i.find(".color-alpha"),l=n.find(".wp-picker-clear");let p=o;p=!0===e.data("alpha")?o:i,e.bind("change",(function(){s.find("span").css({"background-color":p.css("background-color")}),r.find("input").val(e.val())})),t.find(".sui-button, span[role=button]").on("click",(function(e){e.preventDefault(),e.stopPropagation(),i.click()})),a.on("click",(function(e){e.preventDefault(),e.stopPropagation(),l.click(),r.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=c().createElement("label",{className:"sui-label",htmlFor:`forminator-color-${this.props.property}`},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"}," ",this.props.note))),c().createElement("div",{className:"sui-form-field"},t,c().createElement("div",{className:"sui-colorpicker-wrap"},c().createElement("div",{className:"sui-colorpicker sui-colorpicker-"+(this.props.isAlpha?"rgba":"hex"),"aria-hidden":"true"},c().createElement("div",{className:"sui-colorpicker-value"},c().createElement("span",{role:"button"},c().createElement("span",{style:{backgroundColor:e}})),c().createElement("input",{type:"text",defaultValue:e,readOnly:"readonly"}),c().createElement("button",null,c().createElement("i",{className:"sui-icon-close","aria-hidden":"true"}))),c().createElement("button",{className:"sui-button"},fr("Select"))),c().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&&c().createElement("span",{className:"sui-description"},this.props.description))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Oo.apply(null,arguments)}class Do extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Oo({},this.props,{settings:this.props.state,label:fr("Title"),placeholder:fr("Enter title"),property:"section_title"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,Oo({},this.props,{settings:this.props.state,label:fr("Subtitle (optional)"),placeholder:fr("Enter subtitle"),property:"section_subtitle"}))));case"settings":return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Border")),c().createElement("span",{className:"sui-description"},fr("Add a border to this section.")),c().createElement(ei,Oo({},this.props,{property:"section_border",settings:this.props.state,default:"none"}),c().createElement(si,{value:"none"},fr("None")),c().createElement(ti,Oo({settings:this.props.state},this.props,{value:"solid",label:fr("Solid"),boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"3"},c().createElement(Sn,Oo({},this.props,{type:"number",settings:this.props.state,label:fr("Width"),note:"px",placeholder:"0",property:"cform-section-border-width"}))),c().createElement(Nn,{cols:"9"},c().createElement(Fo,Oo({},this.props,{settings:this.props.state,label:fr("Color"),property:"cform-section-border-color",defaultValue:"rgba(233,233,233,1)",isAlpha:!0}))))),c().createElement(ti,Oo({settings:this.props.state},this.props,{value:"dashed",label:fr("Dashed"),boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"3"},c().createElement(Sn,Oo({},this.props,{type:"number",settings:this.props.state,label:fr("Width"),note:"px",placeholder:"0",property:"cform-section-border-width"}))),c().createElement(Nn,{cols:"9"},c().createElement(Fo,Oo({},this.props,{settings:this.props.state,label:fr("Color"),property:"cform-section-border-color",defaultValue:"rgba(233,233,233,1)",isAlpha:!0}))))))));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function Ao(){return Ao=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ao.apply(null,arguments)}class To extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props,{value_type:t}=this.props.state,s="multiselect"===t?"false":"true",{limit_status:r}=this.props.state,a="enable"===r?"true":"false",{required:n}=this.props.state,{multiselect_style:i}=this.props.state,o="multiselect"!==t||"multiselect"===t&&"modern"===i,l=fr("Note: Pass comma-separated values for this query parameter to pre-populate multiple options.");switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement($n,Ao({},this.props,{settings:this.props.state,defaultValue:"single",label:fr("Type"),property:"value_type",clearOptions:"true"}),c().createElement("span",{value:"single"},fr("Single")),c().createElement("span",{value:"multiselect"},fr("Multiple"))))),o&&c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Ao({},this.props,{settings:this.props.state,label:fr("Placeholder"),placeholder:fr("Enter Placeholder"),property:"placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Ao({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Ao({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))),c().createElement(ao,Ao({},this.props,{isRadio:s,isLimit:a})));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),"multiselect"===t&&c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Multi Select Style")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Choose whether you want to use the Standard or Modern style.")),c().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},c().createElement(ci,Ao({},this.props,{settings:this.props.state,radioClass:"sui-radio-sm",defaultValue:"standard",property:"multiselect_style"}),c().createElement("div",{value:"standard",hasImage:!0,image1x:"multiselect-standard.png",image2x:"multiselect-standard@2x.png"},fr("Standard")),c().createElement("div",{value:"modern",hasImage:!0,image1x:"multiselect-modern.png",image2x:"multiselect-modern@2x.png"},fr("Modern"))))),("multiselect"!==t||"multiselect"===t&&"modern"===i)&&c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Search")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Display the search box in a dropdown")),c().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},c().createElement($n,Ao({},this.props,{settings:this.props.state,defaultValue:"disable",property:"search_status",clearOptions:"true",noWrapper:!0}),c().createElement("span",{value:"enable"},fr("Enable")),c().createElement("span",{value:"disable"},fr("Disable"))))),"multiselect"===t&&"modern"===i&&c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Checkbox In Dropdown Options")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Select if you want to show or hide checkboxes in the Multi Select dropdown options")),c().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},c().createElement($n,Ao({},this.props,{settings:this.props.state,defaultValue:"hide",property:"checkbox_in_dropdown",clearOptions:"true",noWrapper:!0}),c().createElement("span",{value:"hide"},fr("Hide")),c().createElement("span",{value:"show"},fr("Show"))))),c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Limit Submission")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},c().createElement(ei,Ao({},this.props,{settings:this.props.state,default:"disable",property:"limit_status",simple:!0}),c().createElement(si,{value:"disable",label:fr("Disable")}),c().createElement(xn,Ao({},this.props,{settings:this.props.state,value:"enable",label:fr("Enable")}),c().createElement(Nn,{cols:"12"},c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("You can set a limit for your options in the LABELS tab. Options for which limit field is left empty can have unlimited submissions."))))))))),c().createElement(lo,this.props),c().createElement(Xn,Ao({},this.props,{notice:"multiselect"===t&&l})));case"calculations":return c().createElement(Ji,this.props);case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},jo.apply(null,arguments)}class Mo extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,jo({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,jo({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:"placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,jo({},this.props,{settings:this.props.state,label:fr("Default Value (optional)"),placeholder:fr("Enter default value"),property:"default"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,jo({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Max characters")),c().createElement("span",{className:"sui-description"},fr("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.")),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Character limit")),c().createElement("div",{className:"sui-form-field-inline"},c().createElement(Sn,jo({},this.props,{settings:this.props.state,placeholder:fr("E.g. 100"),property:"limit",fieldClass:"sui-input-sm"})),c().createElement(An,jo({property:"limit_type",settings:this.props.state},this.props),c().createElement("option",{value:"characters"},fr("Characters")),c().createElement("option",{value:"words"},fr("Words"))))))),c().createElement(Xn,this.props));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}class Uo extends Rr.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={minHeight:this.props.height?this.props.height:"auto"};let s="";return this.props.label&&(s=c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note))),c().createElement("div",{className:"sui-form-field"},s,c().createElement("textarea",{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)}}),this.props.description&&c().createElement("span",{className:"sui-description"},this.props.description))}}function Io(){return Io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Io.apply(null,arguments)}class $o extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(Sn,Io({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})),!Or(this.props.state["editor-type"])&&c().createElement(Uo,Io({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:`${fr("Enter Placeholder")}\n${fr("You can add new line")}`,property:"placeholder"})),c().createElement(Uo,Io({},this.props,{settings:this.props.state,label:fr("Default Value (optional)"),placeholder:fr("Enter default value"),property:"default"})),c().createElement(Sn,Io({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Rich-Text editor")),c().createElement("span",{className:"sui-description"},fr("Enable TinyMCE editor to allow the formatted text.")),c().createElement($n,Io({},this.props,{settings:this.props.state,property:"editor-type",defaultValue:"false"}),c().createElement("div",{value:"false"},fr("Disable")),c().createElement("div",{value:"true"},fr("Enable"))))),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Max characters")),c().createElement("span",{className:"sui-description"},fr("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.")),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Character limit")),c().createElement("div",{className:"sui-form-field-inline"},c().createElement(Sn,Io({},this.props,{settings:this.props.state,placeholder:fr("E.g. 100"),property:"limit",inputClass:"sui-input-sm"})),c().createElement(An,Io({},this.props,{property:"limit_type",settings:this.props.state}),c().createElement("option",{value:"characters"},fr("Characters")),c().createElement("option",{value:"words"},fr("Words"))))))),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Default height")),c().createElement("span",{className:"sui-description"},fr("Choose the default minimum height of your textarea field.")),c().createElement("div",{className:"sui-form-field-inline"},c().createElement(Sn,Io({},this.props,{settings:this.props.state,defaultValue:"140",property:"default-height",inputClass:"sui-input-sm"})),c().createElement("span",{className:"sui-description"},fr("px"))))),c().createElement(Xn,this.props));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function Vo(){return Vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Vo.apply(null,arguments)}class Ro extends Rr.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 r=_.isUndefined(this.props.state.restrict_start_hour)?0:this.props.state.restrict_start_hour,a=_.isUndefined(this.props.state.restrict_start_minute)?0:this.props.state.restrict_start_minute,n=_.isUndefined(this.props.state.restrict_start_ampm)?"AM":this.props.state.restrict_start_ampm,i=_.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(r+":"+a+("twelve"===e?n:""),s),b=moment(i+":"+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 r=parseInt(e.restrict_start_hour),a=_.isUndefined(e.restrict_start_ampm)?"":e.restrict_start_ampm,n=parseInt(e.restrict_end_hour),i=_.isUndefined(e.restrict_end_ampm)?"":e.restrict_end_ampm;"twelve"===e.time_type?("pm"===a&&(r+=12,a=""),"pm"===i&&(n+=12,i=""),this.updateProperty("restrict_start_hour",r),this.updateProperty("restrict_start_minute",t),this.updateProperty("restrict_start_ampm",a),this.updateProperty("restrict_end_hour",n),this.updateProperty("restrict_end_minute",s),this.updateProperty("restrict_end_ampm",i)):(r>12?(r-=12,a="pm"):a="am",n>12?(n-=12,i="pm"):i="am",this.updateProperty("restrict_start_hour",r),this.updateProperty("restrict_start_minute",t),this.updateProperty("restrict_start_ampm",a),this.updateProperty("restrict_end_hour",n),this.updateProperty("restrict_end_minute",s),this.updateProperty("restrict_end_ampm",i))}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,r="twelve"===t?12:24,a=fr("{{strong}}Note:{{/strong}} The query parameter's value passed in URL should match with the selected time format.",{components:{strong:c().createElement("strong",null)}}),n=this.isTimeValid(t),i="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,u=_.isUndefined(o.restrict_start_ampm)?"":o.restrict_start_ampm,d=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+u,i).format(i),b=moment(d+":"+m+h,i).format(i);switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement($n,Vo({},this.props,{settings:this.props.state,property:"field_type",label:fr("Type")}),c().createElement("span",{value:"select"},fr("Dropdowns")),c().createElement("span",{value:"input"},fr("Number inputs")))),c().createElement(Nn,{cols:"6"},c().createElement($n,Vo({},this.props,{settings:this.props.state,property:"time_type",label:fr("Format"),timeType:this.checkTimeTypeChange}),c().createElement("span",{value:"twelve"},fr("12 hour")),c().createElement("span",{value:"twentyfour"},fr("24 hour"))))),this.timeTypeChanged&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-grey sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr(`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.`))))),c().createElement(Sn,Vo({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})),c().createElement(Sn,Vo({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})),c().createElement("label",{className:"sui-label"},fr("Fields")),c().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginTop:"10px"}},c().createElement(gi,Vo({},this.props,{label:fr("Hours")}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Vo({},this.props,{settings:this.props.state,label:fr("Label (optional)"),placeholder:fr("Enter label"),property:"hh_label"}))),"select"!==s&&c().createElement(Nn,{cols:"6"},c().createElement(Sn,Vo({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter placeholder"),property:"hh_placeholder"}))))),c().createElement(gi,Vo({},this.props,{label:fr("Minutes")}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Vo({},this.props,{settings:this.props.state,label:fr("Label (optional)"),placeholder:fr("Enter label"),property:"mm_label"}))),"select"!==s&&c().createElement(Nn,{cols:"6"},c().createElement(Sn,Vo({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter placeholder"),property:"mm_placeholder"})))))));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement(Qn,{label:fr("Increments"),labelDark:!0,description:fr("Choose what time increments you want to use for the hour and minute timepickers."),descriptionSpacing:20,sidebar:!1},c().createElement("div",{className:"sui-form-field-inline"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,label:fr("Hour"),property:"increment_hour","data-width":"86"}),[...Array(r)].map(((e,t)=>c().createElement("option",{value:t,key:t},t)))),c().createElement(zn,Vo({},this.props,{settings:this.props.state,label:fr("Minute"),property:"increment_minute","data-width":"86"}),[...Array(60)].map(((e,t)=>c().createElement("option",{value:t,key:t},t)))))),c().createElement(Qn,{label:fr("Limits"),labelDark:!0,description:fr("Choose a time limit for the time picker field to restrict the time selection between specific hours."),descriptionSpacing:20,sidebar:!1},c().createElement(ei,Vo({},this.props,{property:"restrict_time",settings:this.props.state,default:"none",simple:!0}),c().createElement(ti,Vo({settings:this.props.state},this.props,{value:"specific",label:fr("Specific Hours"),boxClass:"sui-tab-boxed"}),c().createElement("label",{className:"sui-label"},fr("Start Time")),c().createElement(xn,null,c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,placeholder:"1",property:"restrict_start_hour"}),[...Array(r)].map(((e,t)=>c().createElement("option",{value:t,key:t},t))))),c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,placeholder:"0",property:"restrict_start_minute"}),[...Array(60)].map(((e,t)=>c().createElement("option",{value:t,key:t},t))))),"twelve"===t&&c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,property:"restrict_start_ampm"}),c().createElement("option",{value:"am"},fr("AM")),c().createElement("option",{value:"pm"},fr("PM"))))),c().createElement("label",{className:"sui-label"},fr("End Time")),c().createElement(xn,null,c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,placeholder:"1",property:"restrict_end_hour"}),[...Array(r)].map(((e,t)=>c().createElement("option",{value:t,key:t},t))))),c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,placeholder:"0",property:"restrict_end_minute"}),[...Array(60)].map(((e,t)=>c().createElement("option",{value:t,key:t},t))))),"twelve"===t&&c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,property:"restrict_end_ampm"}),c().createElement("option",{value:"am"},fr("AM")),c().createElement("option",{value:"pm"},fr("PM"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Vo({},this.props,{settings:this.props.state,label:fr("Error Message"),property:"restrict_message",description:fr("This error message will be used when time entered is out of the set limits.")}))))),c().createElement(si,{value:"none"},fr("None")))),c().createElement(Qn,{label:fr("Default Time"),labelDark:!0,description:fr("Use this feature to specify a default selected time."),descriptionSpacing:20,sidebar:!1},c().createElement(ei,Vo({},this.props,{property:"default_time",settings:this.props.state,default:"none",simple:!0}),c().createElement(ti,Vo({},this.props,{label:fr("Default"),settings:this.props.state,value:"default",boxClass:"sui-tab-boxed"}),c().createElement(xn,null,c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,label:fr("Hour"),placeholder:"1",property:"default_time_hour"}),[...Array(r)].map(((e,t)=>c().createElement("option",{value:t,key:t},t))))),c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,label:fr("Minute"),placeholder:"0",property:"default_time_minute"}),[...Array(60)].map(((e,t)=>c().createElement("option",{value:t,key:t},t))))),"twelve"===t&&c().createElement(Nn,{cols:"3"},c().createElement(zn,Vo({},this.props,{settings:this.props.state,label:" ",property:"default_time_ampm"}),c().createElement("option",{value:"am"},fr("AM")),c().createElement("option",{value:"pm"},fr("PM"))))),!n&&c().createElement("span",{className:"sui-error-message"},fr("Default time can't be outside the allowed time limit."))),c().createElement(si,{value:"none"},fr("None")))),c().createElement(Xn,Vo({},this.props,{notice:a})));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}class Lo extends Rr.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 r=_.isUndefined(this.props.settings[this.props.property])||!_.isArray(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];s.map((s=>{t?(r=r.concat(e),r.indexOf(s.value)<0&&(r=r.concat(s.value))):(r=r.filter((t=>t!==e)),r.indexOf(s.value)>=0&&(r=r.filter((e=>e!==s.value))))})),this.updateValue(r)}updateCheckboxItem(e,t,s){let r=_.isUndefined(this.props.settings[this.props.property])||!_.isArray(this.props.settings[this.props.property])?[]:this.props.settings[this.props.property];if(t?r.indexOf(e)<0&&(r=r.concat(e)):!t&&r.indexOf(e)>=0&&(r=r.filter((t=>t!==e))),!_.isUndefined(this.props.fileType)){let e=s.filter((e=>r.includes(e.value)));r=e.length===s.length?r.concat(this.props.fileType):r.filter((e=>e!==this.props.fileType))}this.updateValue(r)}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 c().createElement(Rr.Fragment,null,c().createElement("label",{htmlFor:`forminator-field-${this.props.property}`,className:"sui-label"},this.props.label),c().createElement("label",{htmlFor:`forminator-field-${this.props.property}-${this.props.fileType}`,className:"sui-checkbox sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"},c().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)}}),c().createElement("span",{"aria-hidden":"true"}),c().createElement("span",null,fr("All"))),t.map(((s,r)=>c().createElement("label",{key:r,htmlFor:`forminator-field-${this.props.property}-${s.value}`,className:"sui-checkbox "+s.itemClass},c().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)}}),c().createElement("span",{"aria-hidden":"true"}),c().createElement("span",null,Dn(s.label))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Bo.apply(null,arguments)}class zo extends Rr.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=[],r=[],a=[],n=[],i=[],o=[],l=[];return _.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=>{r.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})})),_.isUndefined(forminatorData.fileExts.video)||forminatorData.fileExts.video.map((e=>{a.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})})),_.isUndefined(forminatorData.fileExts.archive)||forminatorData.fileExts.archive.map((e=>{n.push({value:e,label:"."+e,itemClass:"sui-checkbox-stacked sui-checkbox-sm sui-checkbox-pre"})})),_.isUndefined(forminatorData.fileExts.text)||forminatorData.fileExts.text.map((e=>{i.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"})})),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Allowed filetypes")),c().createElement("span",{className:"sui-description"},fr("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:c().createElement("a",{href:"https://developer.wordpress.org/reference/functions/get_allowed_mime_types",target:"_blank"})}})),c().createElement("div",{className:"sui-tabs sui-side-tabs",style:{marginTop:"10px"}},c().createElement("div",{className:"sui-tabs-menu"},c().createElement("div",{className:"sui-tab-item "+(e?"":"active"),onClick:this.toggleValue.bind(this,!1)},fr("Default")),c().createElement("div",{className:"sui-tab-item "+(e?"active":""),onClick:this.toggleValue.bind(this,!0)},fr("Specific filetypes"))),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-boxed "+(e?"active":"")},c().createElement(xn,null,c().createElement(Nn,{cols:"3"},c().createElement(Lo,Bo({},this.props,{label:fr("Images"),settings:this.props.state,fileType:"all-image",property:"filetypes",checkboxes:r}))),c().createElement(Nn,{cols:"3"},c().createElement(Lo,Bo({},this.props,{label:fr("Documents"),settings:this.props.state,fileType:"all-document",property:"filetypes",checkboxes:s}))),c().createElement(Nn,{cols:"3"},c().createElement(Lo,Bo({},this.props,{label:fr("Audio"),settings:this.props.state,fileType:"all-audio",property:"filetypes",checkboxes:t}))),c().createElement(Nn,{cols:"3"},c().createElement(Lo,Bo({},this.props,{label:fr("Video"),settings:this.props.state,fileType:"all-video",property:"filetypes",checkboxes:a})))),c().createElement(xn,null,c().createElement(Nn,{cols:"3"},c().createElement(Lo,Bo({},this.props,{label:fr("Archive"),settings:this.props.state,fileType:"all-archive",property:"filetypes",checkboxes:n}))),c().createElement(Nn,{cols:"3"},c().createElement(Lo,Bo({},this.props,{label:fr("Text"),settings:this.props.state,fileType:"all-text",property:"filetypes",checkboxes:i}))),c().createElement(Nn,{cols:"3"},c().createElement(Lo,Bo({},this.props,{label:fr("Spreadsheet"),settings:this.props.state,fileType:"all-spreadsheet",property:"filetypes",checkboxes:o}))),c().createElement(Nn,{cols:"3"},c().createElement(Lo,Bo({},this.props,{label:fr("Interactive"),settings:this.props.state,fileType:"all-interactive",property:"filetypes",checkboxes:l})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Uo,Bo({},this.props,{settings:this.props.state,label:fr("Additional filetypes"),placeholder:fr("E.g. .dts|audio/vnd.dts, .ai|application/postscript"),property:"additional-type",description:fr("Add a comma-separated list of additional file types with their MIME types separated by '|'")})),c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Note that if you're having trouble uploading one of the enabled filetypes, that filetype may be restricted by your hosting provider.")))))))))),c().createElement("div",{role:"alert",className:"sui-notice sui-notice-warning",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-warning-alert","aria-hidden":"true"}),c().createElement("p",null,fr("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 Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Wo.apply(null,arguments)}class qo extends Rr.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,r="KB"===s?1e3*parseInt(forminatorData.maxUpload):"B"===s?1e6*parseInt(forminatorData.maxUpload):parseInt(forminatorData.maxUpload),a=_.isUndefined(this.props.state["file-type"])?0:this.props.state["file-type"];switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement($n,Wo({},this.props,{settings:this.props.state,defaultValue:"single",label:fr("Type"),property:"file-type",clearOptions:"true"}),c().createElement("span",{value:"single"},fr("Single")),c().createElement("span",{value:"multiple"},fr("Multiple"))),c().createElement(Sn,Wo({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})),c().createElement(Sn,Wo({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement(zo,this.props),"multiple"===a&&c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Limit number of files")),c().createElement("span",{className:"sui-description"},fr("Choose the maximum number of files that can be uploaded using this field.")),c().createElement(ei,Wo({},this.props,{settings:this.props.state,property:"file-limit",defaultValue:"unlimited"}),c().createElement(si,{value:"unlimited",label:fr("Unlimited")}),c().createElement(ti,{value:"custom",label:fr("Custom"),boxClass:"sui-tab-boxed"},c().createElement(Sn,Wo({},this.props,{type:"number",placeholder:"5",defaultValue:"5",property:"file-limit-input",inputClass:"sui-input-sm",label:fr("File upload limit"),settings:this.props.state}))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("multiple"===a?"Filesize limit per file":"Filesize limit")),c().createElement("span",{className:"sui-description"},fr("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}})),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Upload limit per file")),c().createElement("div",{className:"sui-form-field-inline"},c().createElement(Sn,Wo({},this.props,{settings:this.props.state,defaultValue:"8",property:"upload-limit",fieldClass:"sui-input-sm"+(parseInt(t)>r?" sui-form-field-error":"")})),c().createElement(An,Wo({},this.props,{property:"filesize",settings:this.props.state,defaultValue:"MB",elementClass:"sui-select-inline",simple:!0}),c().createElement("option",{value:"MB"},fr("MB")),c().createElement("option",{value:"KB"},fr("KB")),c().createElement("option",{value:"B"},fr("B")))),c().createElement("div",{role:"alert",className:`sui-notice${parseInt(t)>r&&" sui-active"}`,style:{display:parseInt(t)>r?"block":"none"},"aria-live":"assertive"},parseInt(t)>r&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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"===a&&c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Upload method")),c().createElement("span",{className:"sui-description"},fr("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.")),c().createElement("div",{className:"sui-form-field-inline"},c().createElement($n,Wo({},this.props,{settings:this.props.state,property:"upload-method",defaultValue:"ajax"}),c().createElement("div",{value:"ajax"},fr("AJAX")),c().createElement("div",{value:"submission"},fr("On form submission"))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Show files in media library")),c().createElement("span",{className:"sui-description"},fr("Choose whether you want to show the files uploaded by your visitors using this field in your media library.")),c().createElement("div",{className:"sui-form-field-inline"},c().createElement($n,Wo({},this.props,{settings:this.props.state,property:"use_library",defaultValue:""}),c().createElement("div",{value:"true"},fr("Enable")),c().createElement("div",{value:""},fr("Disable"))))));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function Ho(){return Ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ho.apply(null,arguments)}class Qo extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Ho({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,Ho({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:"placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Ho({},this.props,{settings:this.props.state,label:fr("Default Value (optional)"),placeholder:fr("Enter default value"),property:"default"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Ho({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))));case"settings":return c().createElement("div",null,c().createElement(Gn,this.props),c().createElement(Kn,this.props),c().createElement(Xn,this.props));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Yo.apply(null,arguments)}class Go extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Yo({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Yo({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))),c().createElement(ao,Yo({},this.props,{isRadio:"true"})));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Layout")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("By default, we stack the options vertically. However, you can change the options layout below.")),c().createElement($n,Yo({},this.props,{settings:this.props.state,property:"layout",defaultValue:"vertical",noWrapper:!0}),c().createElement("div",{value:"vertical"},fr("Vertical")),c().createElement("div",{value:"horizontal"},fr("Horizontal")))),t&&c().createElement(io,this.props),c().createElement(lo,this.props),c().createElement(Xn,this.props));case"calculations":return c().createElement(Ji,Yo({},this.props,{description:fr("Choose whether to allow this field to be used in calculations or not.")}));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}class Ko extends Rr.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],r=this.$el.find("textarea"),a=r.prop("selectionStart"),n=s.slice(0,a)+t+s.slice(a);this.updateValue(n),r.val(n),r.focus(),r.prop("selectionStart",a+t.length),r.prop("selectionEnd",a+t.length)}deleteChar(e){if(8===e.which){const t=this.$el.find("textarea"),s=t.prop("selectionStart"),r=t.val(),a=s-1;if("}"===r.substr(a,1)&&-1!==a){e.preventDefault();let a=s;const n=s;for(;"{"!==r.substr(a-1,1)&&a-1>=0;)a-=1;const i=r.slice(0,a-1)+r.slice(n,r.length);this.updateValue(i),t.val(i),t.prop("selectionStart",a-1),t.prop("selectionEnd",a-1)}}}insertChar(e){_.contains([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=>{_.contains(e,s.type)||t.push(s.type)})),t}getFields(){const e=this.getDisabledFields();return vr(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 r=_.map(forminatorData.fields,(e=>e.type)).join("|"),a=new RegExp("\\{("+("("+r+")-\\d+")+")(\\-[A-Za-z-_]+)?(\\-[0-9\\*]+)?\\}","g");let n=Dn(e);for(;t=a.exec(e);){const e=t[0];if(_.isUndefined(e))continue;if(!this.isCalculationEnabled(t[1]))return{error:fr("%s is disabled for calculations. Please insert a valid field from the merged tags option.",{args:[e]}),result:!1};if(!ur(t[1],this.props.wrappers))return{error:fr("%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=cr(t[1],this.props.wrappers),r=t[3]||"";n=n.replace(e,'<span className="forminator-preview-label">'+Dn(s)+Dn(r)+"</span>")}else n=Dn(n.replace(e,"(1)"))}return n}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=fr("Calculation formula is required!"),t;const s=window.forminatorCalculator(t),r={};let a;try{if(a=s.calculate(),!isFinite(a))return r.error=fr("Infinity calculation result."),r.result=!1,this.props.modal.isValid=!1,this.props.modal.validationError=r.error,r;r.result=Number(a.toFixed(2)),this.props.modal.isValid=!0}catch(e){r.error=e,r.result=!1,this.props.modal.isValid=!1,this.props.modal.validationError=r.error}return r}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?c().createElement(Rr.Fragment,null,c().createElement("li",{className:"wpmudev-dropdown--option",key:s},c().createElement("button",{onClick:t=>this.insert(t,"{"+e.element_id+"}")},Dn(e.label))),e.parent_group&&!t&&c().createElement("li",{className:"wpmudev-dropdown--option",key:s},c().createElement("button",{onClick:t=>this.insert(t,"{"+e.element_id+"-*}")},e.label+fr(" (all)")))):void 0})),r=_.map(["abs","avg","ceil","floor","max","min","round"],(e=>c().createElement("li",{className:"wpmudev-dropdown--option",key:e},c().createElement("button",{onClick:t=>this.insert(t,e+"()")},e+"()")))),a=_.isUndefined(this.props.settings[this.props.property])?"":this.props.settings[this.props.property],n=this.validateFormula(a),i=this.previewFormula(a),o=!1===n.result?" fui-error":"";return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Calculation Formula")),c().createElement("div",{className:`fui-calculations${o}`,ref:e=>this.el=e},c().createElement("div",{className:"fui-calcs-bar"},c().createElement("div",{className:"sui-dropdown sui-dropdown-right"},c().createElement("button",{className:"sui-button-icon sui-button-blue sui-tooltip sui-tooltip-top-left sui-dropdown-anchor","data-tooltip":fr("Add Form Fields")},c().createElement("i",{className:"sui-icon-layout","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Open list of fields"))),c().createElement("ul",null,s)),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"+")},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Sum"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"-")},c().createElement("b",{"aria-hidden":"true"},"-"),c().createElement("span",{className:"sui-screen-reader-text"},fr("Minus"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"*")},c().createElement("b",{"aria-hidden":"true"},"*"),c().createElement("span",{className:"sui-screen-reader-text"},fr("Multiply"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"/")},c().createElement("b",{"aria-hidden":"true"},"/"),c().createElement("span",{className:"sui-screen-reader-text"},fr("Divide"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"^")},c().createElement("b",{"aria-hidden":"true"},"^"),c().createElement("span",{className:"sui-screen-reader-text"},fr("Exponentiate"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"%")},c().createElement("b",{"aria-hidden":"true"},"%"),c().createElement("span",{className:"sui-screen-reader-text"},fr("Modulus"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"(")},c().createElement("b",{"aria-hidden":"true"},"("),c().createElement("span",{className:"sui-screen-reader-text"},fr("Open parenthesis"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,")")},c().createElement("b",{"aria-hidden":"true"},")"),c().createElement("span",{className:"sui-screen-reader-text"},fr("Close parenthesis"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,",")},c().createElement("b",{"aria-hidden":"true"},","),c().createElement("span",{className:"sui-screen-reader-text"},fr("Comma"))),c().createElement("button",{className:"sui-button-icon",onClick:e=>this.insert(e,"PI")},c().createElement("b",{"aria-hidden":"true"},"PI"),c().createElement("span",{className:"sui-screen-reader-text"},fr("PI constant"))),c().createElement("div",{className:"sui-dropdown sui-dropdown-right"},c().createElement("button",{className:"sui-button-icon sui-tooltip sui-tooltip-top-left sui-dropdown-anchor","data-tooltip":fr("Add Function")},c().createElement("i",{className:"sui-icon-more","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Open function list"))),c().createElement("ul",null,r))),c().createElement("div",{className:"fui-calcs-editor"},c().createElement("textarea",{autoFocus:!0,onKeyPress:e=>this.insertChar(e),onKeyDown:e=>this.deleteChar(e),defaultValue:a,onChange:e=>{this.updateValue(e.target.value)}}))),!1===n.result&&c().createElement("span",{className:"sui-error-message"},n.error),c().createElement("span",{className:"sui-description"},fr("You can preview your form and check if the formula is generating expected results."))),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Formula Preview")),c().createElement("div",{className:"fui-calculations-preview",dangerouslySetInnerHTML:{__html:i}})),c().createElement(Yi,this.props))}}function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Jo.apply(null,arguments)}class Xo extends Rr.Component{constructor(e){super(e),this.updateHidden=this.updateHidden.bind(this)}updateHidden(e,t){this.props.updateProperty("hidden",t),this.removeConditions()}removeConditions(){Or(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,r=_.isUndefined(this.props.state.separators)?"":this.props.state.separators;switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Jo({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Jo({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Qn,null,c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Field Type")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement(yi,Jo({},this.props,{property:"read-only",settings:this.props.state,label:fr("Read-only"),disabled:"true",defaultValue:"true",itemClass:"sui-checkbox-sm sui-checkbox-stacked"})),c().createElement(yi,Jo({},this.props,{property:"hidden",settings:this.props.state,label:fr("Hidden"),itemClass:"sui-checkbox-sm sui-checkbox-stacked",updateProperty:this.updateHidden.bind(this)})),!t&&!_.isEmpty(s)&&c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Visibility rules have been added for this field. Enabling the Hidden option will remove the existing visibility rules."))))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Formatting")),c().createElement("span",{className:"sui-description",style:{marginBottom:"20px"}},fr("Choose how do you want to format the value of this field.")),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Jo({type:"text"},this.props,{settings:this.props.state,placeholder:fr("E.g., $"),property:"prefix",label:fr("Prefix")}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,Jo({type:"text"},this.props,{settings:this.props.state,placeholder:fr("E.g., Kg"),property:"suffix",label:fr("Suffix")})))),"custom"===r&&c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement("div",{className:"sui-form-field sui-input-md",style:{marginBottom:"5px"}},c().createElement("label",{className:"sui-label"},fr("Separators")),c().createElement(zn,Jo({},this.props,{property:"separators",settings:this.props.state,defaultValue:"blank",simple:!0}),c().createElement("option",{value:"blank"},fr("1234567.89")),c().createElement("option",{value:"comma_dot"},fr("1,234,567.89")),c().createElement("option",{value:"dot_comma"},fr("1.234.567,89")),c().createElement("option",{value:"space_comma"},fr("1 234 567,89")))),c().createElement("div",{className:"sui-border-frame"},c().createElement("div",{className:"sui-form-field-inline"},c().createElement(Sn,Jo({type:"text"},this.props,{settings:this.props.state,placeholder:fr("E.g. $"),property:"thousand-separators",defaultValue:",",label:fr("Thousand Separator")})),c().createElement(Sn,Jo({type:"text"},this.props,{settings:this.props.state,placeholder:fr("E.g. $"),property:"decimal-separators",defaultValue:".",label:fr("Decimal Separator")})))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(zn,Jo({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:fr("Round To"),fieldClass:"sui-input-md"}),c().createElement("option",{value:"0"},fr("0 decimals")),c().createElement("option",{value:"1"},fr("1 decimals")),c().createElement("option",{value:"2"},fr("2 decimals")),c().createElement("option",{value:"3"},fr("3 decimals")),c().createElement("option",{value:"4"},fr("4 decimals")))))),"custom"!==r&&c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,Jo({},this.props,{property:"separators",settings:this.props.state,defaultValue:"blank",label:fr("Separators")}),c().createElement("option",{value:"blank"},fr("1234567.89")),c().createElement("option",{value:"comma_dot"},fr("1,234,567.89")),c().createElement("option",{value:"dot_comma"},fr("1.234.567,89")),c().createElement("option",{value:"space_comma"},fr("1 234 567,89")))),c().createElement(Nn,{cols:"6"},c().createElement(zn,Jo({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:fr("Round To")}),c().createElement("option",{value:"0"},fr("0 decimals")),c().createElement("option",{value:"1"},fr("1 decimals")),c().createElement("option",{value:"2"},fr("2 decimals")),c().createElement("option",{value:"3"},fr("3 decimals")),c().createElement("option",{value:"4"},fr("4 decimals")))))));case"calculations":return c().createElement(Ko,Jo({property:"formula",settings:this.props.state},this.props));case"visibility":return c().createElement(Rr.Fragment,null,t&&c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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&&c().createElement(Rn,this.props));case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}class Zo extends Rr.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),vr(this.props.wrappers,["stripe-ocs","stripe","paypal","upload","section"]));return c().createElement("div",{className:`sui-builder-field sui-can_move sui-react ${e}`},c().createElement("div",{className:"sui-field-info"},c().createElement("i",{className:"sui-icon-drag sui-align_top","aria-hidden":"true"}),c().createElement("div",{className:"sui-builder-field-form"},c().createElement("div",{className:"sui-form-field-row"},c().createElement("div",{className:"sui-form-field"},c().createElement("input",{type:"text",size:"1",placeholder:fr("Label"),value:Dn(this.props.option.label),className:"sui-form-control",onChange:this.updateLabel.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)})),c().createElement("select",{className:"fui-select",value:this.props.option.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select a Field")),_.map(t,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id))))))),c().createElement("div",{className:"sui-field-actions sui-align_top"},c().createElement("button",{className:"sui-button-icon sui-button-red",onClick:this.removeOption.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Delete MetaData")))))}}function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},el.apply(null,arguments)}class tl extends Rr.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,r){t&&(e.$el.find(".sui-builder-fields").sortable("refreshPositions"),t=!1)},stop:function(t,s){const r=s.item.index();e.$el.find(".sui-builder-fields").sortable("cancel");const a=s.item.index();e.moveOption(a,r)}})}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 c().createElement("div",{className:"sui-box-builder sui-flushed",ref:e=>this.el=e},c().createElement("div",{className:"sui-box-builder-body"},c().createElement("div",{className:"sui-builder-fields"},_.map(e,((e,t)=>c().createElement(Zo,el({key:t,counter:t,option:e,removeOption:this.removeOption,updateValue:this.updateValue,updateLabel:this.updateLabel},this.props)))),c().createElement("div",{className:"sui-form-field"},c().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addOption},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Custom Meta"))),0===e.length&&c().createElement("div",{className:"sui-form-field sui-block-content-center"},c().createElement("span",{className:"sui-description"},fr('No custom meta data created yet. Click on "+ Add Custom to create custom meta and map form fields to it.'))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},sl.apply(null,arguments)}class rl extends Rr.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=>{_.contains(e,s.type)||t.push(s.type)})),t}getFields(){const e=this.getDisabledFields();return vr(this.props.wrappers,e)}render(){const e=fr("In %s",{args:[this.props.state.currency]}),t=this.getFields();return c().createElement(ei,sl({},this.props,{property:"amount_type",settings:this.props.payment,updateProperty:this.updatePayment,defaultValue:"fixed",wrapperClass:"fui-plan-amount",label:fr("Plan amount"),description:fr("Enter an amount or select a value from a form field in the Variable tab.")}),c().createElement(ti,sl({},this.props,{value:"fixed",label:fr("Fixed")}),c().createElement(Sn,sl({},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:fr("E.g., 20.00"),isRequired:"true",requiredError:fr("Enter an amount or choose a form field.")}))),c().createElement(ti,sl({},this.props,{value:"variable",label:fr("Variable"),boxClass:""}),c().createElement(zn,sl({},this.props,{settings:this.props.payment,updateProperty:this.updatePayment,property:"variable",note:e}),c().createElement("option",{value:""},fr("Select field")),_.map(t,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},al.apply(null,arguments)}class nl extends Rr.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=>{_.contains(e,s.type)||t.push(s.type)})),t}getFields(){const e=this.getDisabledFields();return vr(this.props.wrappers,e)}render(){const e=fr("In %s",{args:[this.props.state.currency]}),t=this.getFields(),s=_.isUndefined(this.props.payment.bill_input)?1:this.props.payment.bill_input;return c().createElement(Rr.Fragment,null,c().createElement(ei,al({},this.props,{property:"subscription_amount_type",settings:this.props.payment,updateProperty:this.updatePayment,wrapperClass:"fui-plan-amount",default:"fixed",label:fr("Plan amount"),description:fr("Enter an amount or select a value from a form field in the Variable tab.")}),c().createElement(ti,al({},this.props,{value:"fixed",label:fr("Fixed"),boxClass:"sui-border-frame"}),c().createElement(Sn,al({},this.props,{property:"subscription_amount",settings:this.props.payment,updateProperty:this.updatePayment,type:"number",placeholder:fr("E.g. 20.00"),suffix:this.props.state.currency,fieldClass:"fui-fixed-plan",inputClass:"sui-field-has-suffix",label:fr("Amount"),isRequired:"true",requiredError:fr("Enter an amount or choose a form field.")}))),c().createElement(ti,al({},this.props,{value:"variable",label:fr("Variable"),boxClass:"sui-border-frame"}),c().createElement(zn,al({},this.props,{settings:this.props.payment,updateProperty:this.updatePayment,property:"subscription_variable",label:fr("Choose form field"),note:e}),c().createElement("option",{value:""},fr("Select field")),_.map(t,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label))))))),c().createElement(ei,al({},this.props,{property:"quantity_type",settings:this.props.payment,updateProperty:this.updatePayment,default:"fixed",label:fr("Quantity"),description:fr("Enter the quantity or let your users set the quantity in a form field.")}),c().createElement(ti,al({},this.props,{value:"fixed",label:fr("Fixed"),boxClass:"sui-border-frame"}),c().createElement(Sn,al({},this.props,{property:"quantity",settings:this.props.payment,updateProperty:this.updatePayment,type:"number",defaultValue:"1",placeholder:fr("E.g., 1"),fieldClass:"sui-input-md",label:fr("Quantity"),isRequired:"true",requiredError:fr("Please enter a quantity or select a form field.")}))),c().createElement(ti,al({},this.props,{value:"variable",label:fr("Variable"),boxClass:"sui-border-frame"}),c().createElement(zn,al({},this.props,{settings:this.props.payment,updateProperty:this.updatePayment,property:"variable_quantity",label:fr("Choose form field"),note:e}),c().createElement("option",{value:""},fr("Select field")),_.map(t,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label))))))),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Bill every")," ",c().createElement("span",{className:"sui-error","aria-hidden":"true"},"*")),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,al({},this.props,{property:"bill_input",settings:this.props.payment,updateProperty:this.updatePayment,type:"number",defaultValue:"1",placeholder:fr("E.g., 1"),isRequired:"true",requiredError:fr("Duration cannot be empty."),fieldClass:parseInt(s)<=0?" sui-form-field-error":""}))),c().createElement(Nn,{cols:"6"},c().createElement(zn,al({},this.props,{property:"bill_period",settings:this.props.payment,updateProperty:this.updatePayment,defaultValue:"years"}),c().createElement("option",{value:"day"},fr("Day(s)")),c().createElement("option",{value:"week"},fr("Week(s)")),c().createElement("option",{value:"month"},fr("Month(s)")),c().createElement("option",{value:"year"},fr("Year(s)")))))),c().createElement("div",{style:{marginBottom:this.props.payment.allow_trial?20:0}},c().createElement(yi,al({},this.props,{property:"allow_trial",settings:this.props.payment,fieldId:"allow-trial"+this.props.counter,updateProperty:this.updatePayment,label:fr("Allow Trial Period"),tooltip:fr("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&&c().createElement(Sn,al({},this.props,{property:"trial_days",settings:this.props.payment,updateProperty:this.updatePayment,inputClass:"sui-field-has-suffix",label:fr("Trial Duration"),description:fr("Enter the number of days that users will try your product for free before they start paying."),type:"number",defaultValue:"14",placeholder:fr("E.g., 14"),suffix:fr("Days")})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},il.apply(null,arguments)}class ol extends Rr.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?fr("Stripe Subscription Add-on is required to use this feature. Install it from the Add-ons page."):fr("Collect recurring/subscription Stripe payments with Forminator Pro on your WordPress sites."),t=forminatorData.isPro?fr("Subscription"):fr("Subscription {{span}}Pro{{/span}}",{components:{span:c().createElement("span",{className:"sui-tag sui-tag-pro"})}});return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,il({},this.props,{settings:this.props.payment,label:fr("Plan name"),placeholder:fr("Plan"),description:fr("This will be displayed on the submissions as well as the Stripe dashboard."),property:"plan_name",isRequired:"true",requiredError:fr("Plan Name is required."),updateProperty:this.updatePayment})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(ei,il({},this.props,{settings:this.props.payment,property:"payment_method",default:"single",label:fr("Payment type"),updateProperty:this.updatePayment}),c().createElement(ti,il({},this.props,{value:"single",label:fr("One Time"),boxClass:"sui-tab-boxed"}),c().createElement(rl,il({},this.props,{payment:this.props.payment,updatePayment:this.updatePayment}))),c().createElement(ti,il({},this.props,{value:"subscription",label:t,boxClass:"sui-tab-boxed"}),forminatorData.hasStripePro&&forminatorData.isPro&&c().createElement(nl,il({},this.props,{payment:this.props.payment,updatePayment:this.updatePayment})),(!forminatorData.hasStripePro||!forminatorData.isPro)&&c().createElement(ni,il({},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 ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ll.apply(null,arguments)}class pl extends Rr.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=fr("Fixed");return"variable"===this.props.payment.amount_type&&(e=fr("Variable")),fr("One Time")+" ("+e+")"}if("subscription"===this.props.payment.payment_method)return fr("Subscription")}conditionMarkup(){const e=vr(this.props.wrappers),t="hide"===this.props.payment.condition_action?fr("Hide"):fr("Show");if(_.isUndefined(this.props.payment.conditions))return;const s=this.props.payment.conditions[0];if(_.isUndefined(s))return;const r=_.filter(e,(e=>e.element_id===s.element_id));if(_.isUndefined(r)||_.isEmpty(r))return;const a=r[0].label,n=kr(s.rule,r.field_type),i=gr(r[0],s),o=this.props.payment.conditions.length;let l="";return o-1>0&&(l="+ "+(o-1)+" "+fr("more condition(s)")),c().createElement("span",{className:"fui-has_conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${t} ${fr("if")} ${a} ${n} ${i} ${l}`},c().createElement("span",{className:"sui-icon-link sui-sm","aria-hidden":"true"}))}render(){const e="plan-"+this.props.counter,t=this.conditionMarkup();return c().createElement("div",{className:"sui-accordion-item"+(this.props.counter===this.props.activePayment?" sui-accordion-item--open":"")+(this.props.errorStateClass?" validation-error":"")},c().createElement("div",{className:"sui-accordion-item-header",onClick:()=>this.toggleState()},c().createElement("div",{className:"sui-accordion-item-title sui-trim-title"},c().createElement("span",{className:"sui-trim-text"},this.props.payment.plan_name)),c().createElement("div",{className:"sui-accordion-item-tag sui-trim-title"},c().createElement("span",{className:"sui-tag sui-tag-sm"},this.showPlanLabel())),c().createElement("div",{className:"sui-accordion-col-auto"},this.props.state.payments.length>1&&c().createElement("button",{className:"sui-button-icon sui-button-red",onClick:()=>this.removePayment()},c().createElement("span",{className:"sui-icon-trash","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Remove This Plan"))),c().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()},c().createElement("span",{className:"sui-icon-chevron-down","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Open Plan Settings"))),!_.isUndefined(this.props.payment.conditions)&&this.props.payment.conditions.length>0&&c().createElement(Rr.Fragment,null,t))),c().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},c().createElement("div",{className:"sui-tabs sui-tabs-flushed"},c().createElement("div",{role:"tablist",className:"sui-tabs-menu"},c().createElement(da,{to:this.route+"plan",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Plan setup")),c().createElement(da,{to:this.route+"conditions",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Conditions"))),c().createElement(xt,null,c().createElement(_t,{path:"/",element:c().createElement(Et,{to:this.route+"plan",replace:!0})})),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content active",role:"tabpanel"},c().createElement(xt,null,c().createElement(_t,{path:"/stripe/plan",element:c().createElement(ol,ll({},this.props,{payment:this.props.payment,updatePayment:this.updatePayment}))}),c().createElement(_t,{path:"/stripe/conditions",element:c().createElement(Rn,ll({},this.props,{state:this.props.payment,updateProperty:this.updateProperty,updatePayment:this.updatePayment,isPayment:!0}))})))))))}}var cl=ga(pl);function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ul.apply(null,arguments)}class dl extends Rr.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 r=this.getPropState();r[e][t]=s,this.updateState(r)}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:fr("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 c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-box-builder sui-flushed",style:{marginTop:30}},c().createElement("div",{className:"sui-box-builder-body"},c().createElement("div",{id:"fui-stripe-plans",className:"sui-accordion sui-accordion-block"},_.map(this.props.state.payments,((e,t)=>c().createElement(cl,ul({},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}))))))),c().createElement("button",{className:"sui-button sui-button-ghost",accessKey:"a",onClick:this.addPayment},c().createElement("span",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Another Plan")))}}var ml=ga(dl);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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},hl.apply(null,arguments)}class fl extends Rr.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this)}updateProperty(e,t){this.props.state[e]=t}getNameOptions(){const e=[];return vr(this.props.wrappers,["page-break","postdata","upload","captcha","date","time","consent","gdprcheckbox"]).map((t=>{e.push({value:"{"+t.element_id+"}",label:t.label})})),e}getDisabledFields(){const e=["calculation","currency"],t=[];return _.each(forminatorData.fields,(s=>{_.contains(e,s.type)||t.push(s.type)})),t}requireErrorState(){let e={isValid:!0,error:!1,paymentKey:[]};return e=Fr(e,this.props.state.payments),e}getEmailFields(){const e=[];return lr("email",this.props.wrappers).map((t=>{e.push({value:"{"+t.element_id+"}",label:t.field_label})})),e}getFieldsByType(e){const t=[];return lr(e,this.props.wrappers).map((s=>{let r=s.field_label;"address"===e&&(r=s.element_id),t.push({value:s.element_id,label:r})})),t}getFields(){const e=this.getDisabledFields();return vr(this.props.wrappers,e)}getZipFields(){return vr(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(),r=this.conditionNotes(),a=Or(forminatorData.userPermissions.manage_forminator_settings)||Or(forminatorData.userPermissions.manage_options);switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,hl({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),defaulValue:fr("Credit / Debit Card"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,hl({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(An,hl({},this.props,{settings:this.props.state,property:"language",label:fr("Language"),description:fr("Choose your preferred language for the Stripe field. This will affect the placeholders language, and the card validation errors returned by the Stripe.")}),c().createElement("option",{value:"auto"},fr("Auto")),c().createElement("option",{value:"en"},fr("English (en)")),c().createElement("option",{value:"zh"},fr("Simplified Chinese (zh)")),c().createElement("option",{value:"da"},fr("Danish (da)")),c().createElement("option",{value:"nl"},fr("Dutch (nl)")),c().createElement("option",{value:"fi"},fr("Finnish (fi)")),c().createElement("option",{value:"fr"},fr("French (fr)")),c().createElement("option",{value:"de"},fr("German (de)")),c().createElement("option",{value:"it"},fr("Italian (it)")),c().createElement("option",{value:"ja"},fr("Japanese (ja)")),c().createElement("option",{value:"no"},fr("Norwegian (no)")),c().createElement("option",{value:"es"},fr("Spanish (es)")),c().createElement("option",{value:"sv"},fr("Swedish (sv)"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement($n,hl({},this.props,{settings:this.props.state,property:"card_icon",defaultValue:"true",label:fr("Card icon"),description:fr("Choose whether you want to show the card icon on the Stripe field.")}),c().createElement("div",{value:"true"},fr("Show")),c().createElement("div",{value:"false"},fr("Hide"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(ei,hl({},this.props,{property:"verify_zip",settings:this.props.state,default:"false",label:fr("Postal code"),description:fr("Choose whether you want to collect the postal code on the Stripe field.")}),c().createElement(ti,hl({},this.props,{settings:this.props.state,value:"true",label:fr("Enable"),boxClass:"sui-tab-boxed"}),c().createElement("div",{className:"sui-form-field sui-input-md",style:{marginBottom:"10px"}},c().createElement("label",{className:"sui-label"},fr("Prefill (optional)")),c().createElement(zn,hl({},this.props,{settings:this.props.state,property:"zip_field",noWrapper:!0}),c().createElement("option",{value:""},fr("Select field")),_.map(t,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)))))),c().createElement("span",{className:"sui-description"},fr("If you are already collecting ZIP code on your form, you can pre-fill it on the Stripe field."))),c().createElement(si,hl({},this.props,{settings:this.props.state,value:"false",label:fr("Disable")}))))));case"settings":return c().createElement(Rr.Fragment,null,c().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&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("You have not connected your Stripe account with Forminator. ")," ",a&&fr("Connect your Stripe account {{link}}here{{/link}} and then come back to configure this field.",{components:{link:c().createElement("a",{href:forminatorData.settingsUrl+"§ion=payments",target:"_blank"})}}))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Payment Mode")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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. ")),c().createElement($n,hl({},this.props,{settings:this.props.state,defaultValue:"test",property:"mode",clearOptions:"true"}),c().createElement("span",{value:"test"},fr("Test")),c().createElement("span",{value:"live"},fr("Live"))),c().createElement(zn,hl({},this.props,{settings:this.props.state,label:fr("Charge currency"),property:"currency",description:fr("Choose the currency your users will be charged in."),fieldsize:"240"}),_.map(forminatorData.currencies,((e,t)=>c().createElement("option",{value:t,key:t},t))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Payment Plan")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement("div",{role:"alert",className:`sui-notice sui-notice-blue ${this.props.state.payments.length>1&&r&&" sui-active"}`,style:{display:this.props.state.payments.length>1&&r?"block":"none"},"aria-live":"assertive"},this.props.state.payments.length>1&&r&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Note: You'll need to configure conditions on each plan to let Forminator know when to process each of the payment plans below."))))),c().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&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("There is an error in one or more of your payment plans. Please review the error and try again."))))),c().createElement(ml,hl({},this.props,{errorState:s.paymentKey}))));case"advanced-settings":return c().createElement(Rr.Fragment,null,c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Payment Receipt")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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:c().createElement("a",{href:"https://dashboard.stripe.com/account/branding",target:"_blank"})}})),c().createElement(ei,hl({},this.props,{property:"receipt",settings:this.props.state,defaultValue:"true"}),c().createElement(ti,hl({},this.props,{settings:this.props.state,value:"true",label:fr("Enable"),boxClass:"sui-tab-boxed"}),c().createElement(zn,hl({},this.props,{property:"customer_email",settings:this.props.state,label:fr("Email address"),defaultValue:"",placeholder:fr("E.g. john@doe.com")}),c().createElement("option",{selected:!0,value:""},fr("Select an email field")),_.map(this.getEmailFields(),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)," ",e.value))))),c().createElement(si,hl({},this.props,{settings:this.props.state,value:"false",label:fr("Disable")})))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Payment Details (optional)")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("You can add a statement decipher and a description to help you and your customers recognise the transactions made on this form.")),c().createElement(Sn,hl({},this.props,{settings:this.props.state,label:fr("Statement decipher"),type:"text",maxLength:"22",placeholder:fr("E.g. Company Name"),property:"company_name",description:fr("This is the business name your customers will see on their card statement."),note:fr("Up to 22 characters only")})),c().createElement(wo,hl({},this.props,{settings:this.props.state,property:"product_description",placeholder:fr("Enter your payment description here"),description:fr("This appears on your Stripe account and on the payment receipt sent to your customers."),label:fr("Payment description"),updateProperty:this.updateProperty}),this.getNameOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label)))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Card Validation")),c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Note: Stripe field automatically validates the card as the user fills the card details regardless of the validation behavior set on the Behaviours tab.")))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Billing Details")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement(ei,hl({},this.props,{settings:this.props.state,property:"billing",default:"false"}),c().createElement(ti,hl({},this.props,{settings:this.props.state,value:"true",label:fr("Enable"),boxClass:"sui-tab-boxed"}),c().createElement(zn,hl({},this.props,{settings:this.props.state,property:"billing_name",label:fr("Customer name (optional)")}),c().createElement("option",{value:""},fr("Select a name field")),_.map(this.getFieldsByType("name"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))),c().createElement(zn,hl({},this.props,{settings:this.props.state,property:"billing_email",label:fr("Customer email address (optional)")}),c().createElement("option",{value:""},fr("Select an email field")),_.map(this.getFieldsByType("email"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))),c().createElement(zn,hl({},this.props,{settings:this.props.state,property:"billing_address",label:fr("Billing address (optional)")}),c().createElement("option",{value:""},fr("Select an address field")),_.map(this.getFieldsByType("address"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)))))),c().createElement(si,hl({},this.props,{value:"false",label:fr("Disable")})))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Meta Data")),c().createElement("span",{className:"sui-description",style:{marginBottom:"55px"}},fr("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.")),c().createElement(tl,hl({},this.props,{settings:this.props.state}))));case"meta":return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label"},fr("Meta Data")),c().createElement("span",{className:"sui-description"},fr("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."))),c().createElement("div",{className:"sui-form-field"},c().createElement("span",{className:"sui-label"},fr("MetaData"))),c().createElement(tl,hl({},this.props,{settings:this.props.state})));case"styling":return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Additional CSS Classes")),c().createElement("span",{className:"sui-description"},fr("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:c().createElement("a",{href:"https://stripe.com/docs/stripe-js/reference#element-options",target:"_blank"})}}))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(Sn,hl({},this.props,{property:"base_class",defaultValue:"StripeElement",settings:this.props.state,label:fr("Base class")})),c().createElement(Sn,hl({},this.props,{property:"complete_class",defaultValue:"StripeElement--complete",settings:this.props.state,label:fr("Complete")})),c().createElement(Sn,hl({},this.props,{property:"empty_class",defaultValue:"StripeElement--empty",settings:this.props.state,label:fr("Empty")})),c().createElement(Sn,hl({},this.props,{property:"focused_class",defaultValue:"StripeElement--focus",settings:this.props.state,label:fr("Focused")})),c().createElement(Sn,hl({},this.props,{property:"invalid_class",defaultValue:"StripeElement--invalid",settings:this.props.state,label:fr("Invalid")})),c().createElement(Sn,hl({},this.props,{property:"autofilled_class",defaultValue:"StripeElement--webkit-autofill",settings:this.props.state,label:fr("Autofilled (Chrome and Safari only)")}))));case"visibility":return c().createElement(Rn,this.props);default:return c().createElement("div",null)}}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},bl.apply(null,arguments)}class gl extends p.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this)}updateProperty(e,t){this.props.state[e]=t}getNameOptions(){const e=[];return vr(this.props.wrappers,["page-break","postdata","upload","captcha","date","time","consent","gdprcheckbox","paypal","stripe","stripe-ocs"]).map((t=>{e.push({value:"{"+t.element_id+"}",label:t.label})})),e}getDisabledFields(){const e=["calculation","currency"],t=[];return _.each(forminatorData.fields,(s=>{_.contains(e,s.type)||t.push(s.type)})),t}requireErrorState(){let e={isValid:!0,error:!1,paymentKey:[]};return e=Fr(e,this.props.state.payments),e}getEmailFields(){const e=[];return lr("email",this.props.wrappers).map((t=>{e.push({value:"{"+t.element_id+"}",label:t.field_label})})),e}getFieldsByType(e){const t=[];return lr(e,this.props.wrappers).map((s=>{let r=s.field_label;"address"===e&&(r=s.element_id),t.push({value:s.element_id,label:r})})),t}getFields(){const e=this.getDisabledFields();return vr(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(),r=Or(forminatorData.userPermissions.manage_forminator_settings)||Or(forminatorData.userPermissions.manage_options);switch(e){case"labels":return c().createElement(c().Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,bl({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),defaulValue:fr("Credit / Debit Card"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,bl({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(An,bl({},this.props,{settings:this.props.state,property:"language",label:fr("Language"),description:fr("Choose your preferred language for the Stripe field. This will affect the placeholders language, and the card validation errors returned by the Stripe.")}),c().createElement("option",{value:"auto"},fr("Auto")),c().createElement("option",{value:"en"},fr("English (en)")),c().createElement("option",{value:"zh"},fr("Simplified Chinese (zh)")),c().createElement("option",{value:"da"},fr("Danish (da)")),c().createElement("option",{value:"nl"},fr("Dutch (nl)")),c().createElement("option",{value:"fi"},fr("Finnish (fi)")),c().createElement("option",{value:"fr"},fr("French (fr)")),c().createElement("option",{value:"de"},fr("German (de)")),c().createElement("option",{value:"it"},fr("Italian (it)")),c().createElement("option",{value:"ja"},fr("Japanese (ja)")),c().createElement("option",{value:"no"},fr("Norwegian (no)")),c().createElement("option",{value:"es"},fr("Spanish (es)")),c().createElement("option",{value:"sv"},fr("Swedish (sv)"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(zn,bl({},this.props,{settings:this.props.state,label:fr("Charge currency"),property:"currency",description:fr("Choose the currency your users will be charged in.")}),_.map(forminatorData.currencies,((e,t)=>c().createElement("option",{value:t,key:t},t)))))));case"products":return c().createElement(c().Fragment,null,c().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&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("You have not connected your Stripe account with Forminator. ")," ",r&&fr("Connect your Stripe account {{link}}here{{/link}} and then come back to configure this field.",{components:{link:c().createElement("a",{href:forminatorData.settingsUrl+"§ion=payments",target:"_blank"})}}))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Payment Mode")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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. ")),c().createElement($n,bl({},this.props,{settings:this.props.state,defaultValue:"test",property:"mode",clearOptions:"true"}),c().createElement("span",{value:"test"},fr("Test")),c().createElement("span",{value:"live"},fr("Live")))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Payment Plan")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Add your products, services and plans below. You can add multiple products and conditionally process each one based on your form data.")),c().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&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Note: You'll need to configure conditions on each product to let Forminator know when to process each of the products below."))))),c().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&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("There is an error in one or more of your products. Please review the error and try again."))))),c().createElement(ml,bl({},this.props,{isOCS:!0,errorState:t.paymentKey}))));case"settings":return c().createElement(c().Fragment,null,c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Payment Methods")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement(ei,bl({},this.props,{settings:this.props.state,default:"true",property:"automatic_payment_methods"}),c().createElement(ti,bl({},this.props,{settings:this.props.state,value:"true",label:fr("Dynamic Payment Methods"),boxClass:"sui-tab-boxed"}),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("You’ve selected dynamic payment methods. Please configure accepted payment methods on your {{link}}Stripe Dashboard{{/link}}.",{components:{link:c().createElement("a",{href:"https://dashboard.stripe.com/settings/payment_methods",target:"_blank"})}})),c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Note: Only payment methods with immediate confirmation are supported. {{link}}Learn more{{/link}}.",{components:{link:c().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#stripe",target:"_blank"})}})))))),c().createElement(si,bl({},this.props,{settings:this.props.state,value:"false",label:fr("Cards Only")})))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Payment Details (optional)")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("You can add a statement decipher and a description to help you and your customers recognise the transactions made on this form.")),c().createElement(Sn,bl({},this.props,{settings:this.props.state,label:fr("Statement decipher"),type:"text",maxLength:"22",placeholder:fr("E.g. Company Name"),property:"company_name",description:fr("This is the business name your customers will see on their card statement."),note:fr("Up to 22 characters only")})),c().createElement(wo,bl({},this.props,{settings:this.props.state,property:"product_description",placeholder:fr("Enter your payment description here"),description:fr("This appears on your Stripe account and on the payment receipt sent to your customers."),label:fr("Payment description"),updateProperty:this.updateProperty}),this.getNameOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label)))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Additional Settings")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Use these below options to enable and configure additional options for your Stripe payment.")),c().createElement(Wi,bl({},this.props,{label:fr("Send Payment Receipt"),description:fr("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:c().createElement("a",{href:"https://dashboard.stripe.com/account/branding",target:"_blank"})}}),property:"receipt",settings:this.props.state}),c().createElement(zn,bl({},this.props,{property:"customer_email",settings:this.props.state,label:fr("Email address"),defaultValue:"",placeholder:fr("E.g. john@doe.com")}),c().createElement("option",{value:""},fr("Select an email field")),_.map(this.getEmailFields(),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)," ",e.value))))),c().createElement(Wi,bl({},this.props,{label:fr("Enable Billing Details"),description:fr("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}),c().createElement(zn,bl({},this.props,{settings:this.props.state,property:"billing_name",label:fr("Customer name (optional)")}),c().createElement("option",{value:""},fr("Select a name field")),_.map(this.getFieldsByType("name"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))),c().createElement(zn,bl({},this.props,{settings:this.props.state,property:"billing_email",label:fr("Customer email address (optional)")}),c().createElement("option",{value:""},fr("Select an email field")),_.map(this.getFieldsByType("email"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))),c().createElement(zn,bl({},this.props,{settings:this.props.state,property:"billing_phone",label:fr("Customer phone number (optional)")}),c().createElement("option",{value:""},fr("Select a phone field")),_.map(this.getFieldsByType("phone"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))),c().createElement(zn,bl({},this.props,{settings:this.props.state,property:"billing_address",label:fr("Billing address (optional)")}),c().createElement("option",{value:""},fr("Select an address field")),_.map(this.getFieldsByType("address"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Meta Data")),c().createElement("span",{className:"sui-description",style:{marginBottom:"55px"}},fr("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.")),c().createElement(tl,bl({},this.props,{settings:this.props.state}))));case"meta":return c().createElement(c().Fragment,null,c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label"},fr("Meta Data")),c().createElement("span",{className:"sui-description"},fr("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."))),c().createElement("div",{className:"sui-form-field"},c().createElement("span",{className:"sui-label"},fr("MetaData"))),c().createElement(tl,bl({},this.props,{settings:this.props.state})));case"customize":return c().createElement(c().Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement("label",{className:"sui-settings-label"},fr("Payment Element Layout")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Choose the Payment Element’s layout that fits your checkout flow.")),c().createElement(ei,bl({},this.props,{settings:this.props.state,property:"layout",default:"tabs"}),c().createElement(ti,bl({},this.props,{settings:this.props.state,value:"tabs",label:fr("Tabs"),hasImage:!0,image1x:"stripe-tabs.png",image2x:"stripe-tabs@2x.png"})),c().createElement(ti,bl({},this.props,{settings:this.props.state,value:"accordion+radio",label:fr("Accordion with radio buttons"),hasImage:!0,image1x:"stripe-radios.png",image2x:"stripe-radios@2x.png"})),c().createElement(ti,bl({},this.props,{settings:this.props.state,value:"accordion",label:fr("Accordion without radio buttons"),hasImage:!0,image1x:"stripe-accordions.png",image2x:"stripe-accordions@2x.png"}))))),Tr(this.props)&&c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement("label",{className:"sui-settings-label"},fr("Field Description Placement")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Select where the description of this field should appear.")),c().createElement(qn,this.props))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement("label",{className:"sui-settings-label"},fr("Appearance")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Select a theme from the Stripe Appearance API to control the style of all elements.")),c().createElement(zn,bl({},this.props,{settings:this.props.state,property:"theme"}),c().createElement("option",{value:"stripe"},fr("Default")),c().createElement("option",{value:"night"},fr("Night")),c().createElement("option",{value:"flat"},fr("Flat"))))),c().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginBottom:"-30px"}},c().createElement(ii,bl({},this.props,{label:fr("Customize Appearance"),property:"custom_appearance",settings:this.props.state}),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Customize Colors")),c().createElement(Fo,bl({},this.props,{label:fr("Primary color"),property:"primary_color",defaultValue:"#0570DE",settings:this.props.state})),c().createElement(Fo,bl({},this.props,{label:fr("Background color"),property:"background_color",defaultValue:"#FFFFFF",settings:this.props.state})),c().createElement(Fo,bl({},this.props,{label:fr("Text color"),property:"text_color",defaultValue:"#30313D",settings:this.props.state})),c().createElement(Fo,bl({},this.props,{label:fr("Error"),property:"error",defaultValue:"#DF1B41",settings:this.props.state}))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Other options")),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Spacing")),c().createElement("div",{style:{width:"100%",maxWidth:"100px",display:"inline-block"}},c().createElement(Sn,bl({},this.props,{type:"number",property:"spacing_unit",minValue:"0",defaultValue:"2",settings:this.props.state,simple:!0}))),c().createElement("span",{className:"sui-field-suffix"},fr("px"))),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Border radius")),c().createElement("div",{style:{width:"100%",maxWidth:"100px",display:"inline-block"}},c().createElement(Sn,bl({},this.props,{type:"number",property:"border_radius",minValue:"0",defaultValue:"4",settings:this.props.state,simple:!0}))),c().createElement("span",{className:"sui-field-suffix"},fr("px")))))));case"visibility":return c().createElement(Rn,this.props);default:return c().createElement("div",null)}}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},yl.apply(null,arguments)}class vl extends Rr.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,r=_.isUndefined(this.props.state.separators)?"":this.props.state.separators;switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,yl({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,yl({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:"placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,yl({},this.props,{settings:this.props.state,label:fr("Default Value (optional)"),placeholder:fr("Enter default value"),property:"default_value"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,yl({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))));case"settings":return c().createElement(Rr.Fragment,null,c().createElement(Gn,this.props),c().createElement(Qn,{label:fr("Currency"),labelDark:!0,description:fr("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},c().createElement(zn,yl({},this.props,{settings:this.props.state,property:"currency",hasSearch:!0}),_.map(forminatorData.currencies,((e,t)=>c().createElement("option",{value:t,key:t},e[0]))))),c().createElement(Qn,{label:fr("Limit"),labelDark:!0,description:fr("Restrict the value that your users can enter in this field within a custom range."),descriptionSpacing:20,sidebar:!1},c().createElement("div",{className:"sui-form-field-inline"},c().createElement(Sn,yl({type:"number"},this.props,{settings:this.props.state,placeholder:"0",property:"limit_min",label:fr("Min"),fieldClass:"sui-input-sm"+(parseInt(t)>=parseInt(s)?" sui-form-field-error":"")})),c().createElement(Sn,yl({type:"number"},this.props,{settings:this.props.state,placeholder:"0",property:"limit_max",label:fr("Max"),fieldClass:"sui-input-sm"+(parseInt(t)>=parseInt(s)?" sui-form-field-error":"")}))),c().createElement("div",{className:"sui-form-field"},c().createElement(ei,yl({},this.props,{property:"limit_message",settings:this.props.state,default:"false",label:fr("Error Messages")}),c().createElement(si,{value:"false",label:fr("Default")}),c().createElement(ti,{value:"true",label:fr("Custom"),boxClass:"sui-tab-boxed"},c().createElement(Sn,yl({},this.props,{settings:this.props.state,property:"limit_min_message",type:"text",label:fr("When number is smaller than the min limit"),placeholder:fr("E.g. Please enter a number greater than 0.")})),c().createElement(Sn,yl({},this.props,{settings:this.props.state,type:"text",property:"limit_max_message",label:fr("When number is greater than the max limit"),placeholder:fr("E.g. Please enter a number lower than 1000.")})))))),c().createElement(Qn,{label:fr("Formatting"),labelDark:!0,description:fr("Choose how do you want to format the value of this field."),descriptionSpacing:20,sidebar:!1},c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,yl({},this.props,{property:"separators",settings:this.props.state,defaultValue:"1234567.89",label:fr("Separators"),fieldClass:"sui-input-md"}),c().createElement("option",{value:"blank"},fr("1234567.89")),c().createElement("option",{value:"comma_dot"},fr("1,234,567.89")),c().createElement("option",{value:"dot_comma"},fr("1.234.567,89")),c().createElement("option",{value:"space_comma"},fr("1 234 567,89")))),"custom"!==r&&c().createElement(Nn,{cols:"6"},c().createElement(zn,yl({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:fr("Round To"),fieldClass:"sui-input-md"}),c().createElement("option",{value:"0"},fr("0 decimals")),c().createElement("option",{value:"1"},fr("1 decimals")),c().createElement("option",{value:"2"},fr("2 decimals")),c().createElement("option",{value:"3"},fr("3 decimals")),c().createElement("option",{value:"4"},fr("4 decimals"))))),"custom"===r&&c().createElement("div",{className:"sui-border-frame"},c().createElement("div",{className:"sui-form-field-inline",style:{marginBottom:"5px"}},c().createElement(Sn,yl({type:"text"},this.props,{settings:this.props.state,placeholder:fr("E.g. $"),property:"thousand-separators",defaultValue:",",label:fr("Thousand Separator"),fieldClass:"sui-input-md"})),c().createElement(Sn,yl({type:"text"},this.props,{settings:this.props.state,placeholder:fr("E.g. $"),property:"decimal-separators",defaultValue:".",label:fr("Decimal Separator"),fieldClass:"sui-input-md"})))),"custom"===r&&c().createElement("div",{className:"sui-form-field"},c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,yl({},this.props,{property:"precision",settings:this.props.state,defaultValue:"2",label:fr("Round To"),fieldClass:"sui-input-md"}),c().createElement("option",{value:"0"},fr("0 decimals")),c().createElement("option",{value:"1"},fr("1 decimals")),c().createElement("option",{value:"2"},fr("2 decimals")),c().createElement("option",{value:"3"},fr("3 decimals")),c().createElement("option",{value:"4"},fr("4 decimals"))))))),c().createElement(Xn,this.props));case"calculations":return c().createElement(Ji,this.props);case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},El.apply(null,arguments)}class _l extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props;switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,El({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,El({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Enter Placeholder"),property:"placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(hi,El({},this.props,{settings:this.props.state,extraId:"password",label:fr("Description (optional)"),property:"description",hideEditorOptions:"true",cutomTinymce:"bold,italic,underline,link,alignleft,aligncenter,alignright"})))),"registration"===this.props.formType&&c().createElement("div",{className:"sui-accordion sui-accordion-flushed",value:"multiple"},c().createElement(ii,El({},this.props,{label:fr("Confirm Password"),property:"confirm-password",settings:this.props.state}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,El({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Confirm password"),property:"confirm-password-label"}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,El({},this.props,{settings:this.props.state,label:fr("Placeholder (optional)"),placeholder:fr("Confirm new password"),property:"confirm-password-placeholder"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(hi,El({},this.props,{settings:this.props.state,extraId:"confirm-password",label:fr("Description (optional)"),property:"confirm-password-description",hideEditorOptions:"true",cutomTinymce:"bold,italic,underline,link,alignleft,aligncenter,alignright"}))))))));case"settings":return c().createElement(Rr.Fragment,null,"registration"===this.props.formType&&c().createElement(Qn,{label:fr("Minimum password strength"),labelDark:!0,description:fr("Choose a minimum password strength required to force your users to sign up with a password stronger than the minimum requirement."),sidebar:!1},c().createElement("div",{style:{marginTop:"10px",marginBottom:"0"}},c().createElement(zn,El({property:"strength",settings:this.props.state},this.props,{defaultValue:"none",fieldClass:"sui-input-md"}),c().createElement("option",{value:"none"},fr("None")),c().createElement("option",{value:"short"},fr("Short")),c().createElement("option",{value:"bad"},fr("Bad")),c().createElement("option",{value:"good"},fr("Good")),c().createElement("option",{value:"strong"},fr("Strong")))),"none"!==this.props.state.strength&&c().createElement("div",{className:"sui-border-frame"},c().createElement(Sn,El({},this.props,{settings:this.props.state,label:fr("Error message"),type:"text",className:"sui-form-control",property:"strength_validation_message",description:fr("This is displayed when the user's password is weaker than the minimum requirement.")})))),c().createElement(Gn,this.props),Or(this.props.state["confirm-password"])&&c().createElement(Qn,{label:fr("Password validation error message"),labelDark:!0,description:fr("Enter an error message to be displayed when the passwords do not match."),sidebar:!1},c().createElement(Sn,El({},this.props,{settings:this.props.state,type:"text",placeholder:fr("Passwords do not match. Please try again."),property:"validation_message"}))));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},wl.apply(null,arguments)}class xl extends Rr.Component{constructor(e){super(e)}getDisabledFields(){const e=["calculation","currency","number","slider"],t=[];return _.each(forminatorData.fields,(s=>{_.contains(e,s.type)||t.push(s.type)})),t}getFields(){const e=this.getDisabledFields();return vr(this.props.wrappers,e)}getFieldsByType(e){const t=[];return lr(e,this.props.wrappers).map((s=>{let r=s.field_label;"address"===e&&(r=s.element_id),t.push({value:s.element_id,label:r})})),t}isCountryRequired(e){let t;return this.props.wrappers.map((s=>{s.fields.map((s=>{s.element_id===e&&(t=s.address_country_required)}))})),Or(t)}render(){const e=Or(forminatorData.userPermissions.manage_forminator_settings)||Or(forminatorData.userPermissions.manage_options),{type:t}=this.props,{layout:s}=this.props.state,{card:r}=this.props.state,a=fr("In %s",{args:[this.props.state.currency]}),n=this.getFields(),i=[];for(let e=25;e<56;e++)i.push(e);switch(t){case"settings":return c().createElement(Rr.Fragment,null,!forminatorData.hasPayPal&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("You have not connected your PayPal account with Forminator. ")," ",e&&fr("Connect your PayPal account {{link}}here{{/link}} and then come back to configure this field.",{components:{link:c().createElement("a",{href:forminatorData.settingsUrl+"§ion=payments",target:"_blank"})}}))))),c().createElement($n,wl({},this.props,{settings:this.props.state,defaultValue:"sandbox",label:fr("Mode of payment"),property:"mode",clearOptions:"true",description:fr("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:c().createElement("strong",null)}})}),c().createElement("span",{value:"sandbox"},fr("Sandbox")),c().createElement("span",{value:"live"},fr("Live"))),c().createElement(zn,wl({},this.props,{settings:this.props.state,label:fr("Charge currency"),property:"currency",description:fr("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)=>c().createElement("option",{value:t,key:t},t)))),c().createElement(ei,wl({},this.props,{property:"amount_type",settings:this.props.state,default:"fixed",label:fr("Payment amount")}),c().createElement(ti,wl({},this.props,{settings:this.props.state,value:"fixed",label:fr("Fixed"),boxClass:"sui-tab-boxed"}),c().createElement(Sn,wl({},this.props,{type:"number",property:"amount",settings:this.props.state,inputClass:"sui-field-has-suffix",label:fr("Fixed amount"),suffix:this.props.state.currency,placeholder:fr("E.g. 20.00"),isRequired:"true",requiredError:fr("Enter an amount or choose a form field.")}))),c().createElement(ti,wl({},this.props,{settings:this.props.state,value:"variable",label:fr("Variable"),boxClass:"sui-tab-boxed"}),c().createElement("div",{className:"sui-form-field sui-input-md",style:{marginBottom:"10px"}},c().createElement("label",{className:"sui-label"},fr("Variable amount"),c().createElement("span",{className:"sui-label-note"},a)),c().createElement(zn,wl({},this.props,{settings:this.props.state,property:"variable",note:a,noWrapper:!0}),c().createElement("option",{value:""},fr("Select field")),_.map(n,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)))))),c().createElement("span",{className:"sui-description"},fr("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 c().createElement(Rr.Fragment,null,c().createElement(zn,wl({},this.props,{settings:this.props.state,label:fr("Label"),property:"label",description:fr("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"}),c().createElement("option",{value:"checkout"},fr("PayPal Checkout")),c().createElement("option",{value:"pay"},fr("Pay with PayPal")),c().createElement("option",{value:"paypal"},fr("PayPal"))),c().createElement(An,wl({},this.props,{settings:this.props.state,property:"color",elementClass:"sui-select-colors",fieldsize:"240",label:fr("Color"),description:fr("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.")}),c().createElement("option",{value:"gold","data-color":"#FFC439"},fr("Gold")),c().createElement("option",{value:"blue","data-color":"#009CDE"},fr("Blue")),c().createElement("option",{value:"silver","data-color":"#EEEEEE"},fr("Silver")),c().createElement("option",{value:"white","data-color":"#FFFFFF"},fr("White")),c().createElement("option",{value:"black","data-color":"#2C2E2F"},fr("Black"))),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Width")),c().createElement("div",{style:{width:"100%",maxWidth:"100px",display:"inline-block"}},c().createElement(Sn,wl({},this.props,{type:"number",property:"width",minValue:"150",maxValue:"750",settings:this.props.state,placeholder:fr("E.g. 250"),simple:!0}))),c().createElement("span",{className:"sui-field-suffix"},fr("px")),c().createElement("span",{className:"sui-description"},fr("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."))),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Height")),c().createElement("div",{style:{width:"100%",maxWidth:"100px",display:"inline-block",verticalAlign:"middle"}},c().createElement(zn,wl({},this.props,{settings:this.props.state,property:"height",noWrapper:!0}),i.map(((e,t)=>c().createElement("option",{value:e,key:t},e))))),c().createElement("span",{className:"sui-field-suffix"},fr("px")),c().createElement("span",{className:"sui-description"},fr("Choose the height of PayPal Smart Buttons. It can be anywhere between 25px to 55px"))),c().createElement($n,wl({},this.props,{settings:this.props.state,defaultValue:"rect",label:fr("Shape"),property:"shape",clearOptions:"true",description:fr("Choose your preferred shape from your PayPal Smart Buttons.")}),c().createElement("span",{value:"rect"},fr("Rectangular")),c().createElement("span",{value:"pill"},fr("Pill"))),c().createElement($n,wl({},this.props,{settings:this.props.state,defaultValue:"vertical",label:fr("Layout"),property:"layout",clearOptions:"true",description:fr("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:c().createElement("a",{href:"https://developer.paypal.com/docs/checkout/integration-features/customize-button/#layout",target:"_blank"})}})}),c().createElement("span",{value:"vertical"},fr("Vertical")),c().createElement("span",{value:"horizontal"},fr("Horizontal"))),"vertical"!==s&&c().createElement($n,wl({},this.props,{settings:this.props.state,defaultValue:"true",label:fr("Tagline"),property:"tagline",clearOptions:"true",description:fr('Choose whether to show the default PayPal tagline {{strong}}"The safer, easier way to pay"{{/strong}} below your PayPal button.',{components:{strong:c().createElement("strong",null)}})}),c().createElement("span",{value:"true"},fr("Show")),c().createElement("span",{value:"false"},fr("Hide"))));case"advanced-settings":return c().createElement(Rr.Fragment,null,c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Disable Funding Sources")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(yi,wl({},this.props,{property:"card",settings:this.props.state,label:fr("Credit or debit cards"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"credit",settings:this.props.state,label:fr("PayPal Credit"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"bancontact",settings:this.props.state,label:fr("Bancontact"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"blik",settings:this.props.state,label:fr("BLIK"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"eps",settings:this.props.state,label:fr("eps"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"giropay",settings:this.props.state,label:fr("giropay"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"ideal",settings:this.props.state,label:fr("iDEAL"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),c().createElement(Nn,{cols:"6"},c().createElement(yi,wl({},this.props,{property:"mercadopago",settings:this.props.state,label:fr("Mercado Pago"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"mybank",settings:this.props.state,label:fr("MyBank"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"p24",settings:this.props.state,label:fr("Przelewy24"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"sepa",settings:this.props.state,label:fr("SEPA-Lastschrift"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"sofort",settings:this.props.state,label:fr("Sofort"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"})),c().createElement(yi,wl({},this.props,{property:"venmo",settings:this.props.state,label:fr("Venmo"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Pre-fill Billing Details")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(ei,wl({},this.props,{property:"billing-details",settings:this.props.state,default:"false"}),c().createElement(ti,wl({},this.props,{settings:this.props.state,value:"true",label:fr("Enable"),boxClass:"sui-tab-boxed"}),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Customer name (optional)")),c().createElement(zn,wl({},this.props,{settings:this.props.state,property:"billing-name",noWrapper:!0}),c().createElement("option",{value:""},fr("Select a name field")),_.map(this.getFieldsByType("name"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)))))),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Customer email address (optional)")),c().createElement(zn,wl({},this.props,{settings:this.props.state,property:"billing-email",noWrapper:!0}),c().createElement("option",{value:""},fr("Select an email field")),_.map(this.getFieldsByType("email"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)))))),c().createElement("div",{className:"sui-form-field",style:{marginBottom:"10px"}},c().createElement("label",{className:"sui-label"},fr("Billing address (optional)")),c().createElement(zn,wl({},this.props,{settings:this.props.state,property:"billing-address",noWrapper:!0}),c().createElement("option",{value:""},fr("Select an address field")),_.map(this.getFieldsByType("address"),((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)))))),!_.isEmpty(this.props.state["billing-address"])&&!this.isCountryRequired(this.props.state["billing-address"])&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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:c().createElement("strong",null)}})))))),c().createElement(si,wl({},this.props,{settings:this.props.state,value:"false",label:fr("Disable")})))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Shipping Address")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement($n,wl({},this.props,{settings:this.props.state,property:"shipping_address",defaultValue:"disable",noWrapper:!0}),c().createElement("div",{value:"enable"},fr("Enable")),c().createElement("div",{value:"disable"},fr("Disable")))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Language")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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:c().createElement("a",{href:"https://developer.paypal.com/docs/api/reference/locale-codes/#supported-locale-codes",target:"_blank"})}})),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,wl({},this.props,{settings:this.props.state,placeholder:fr("Eg. en_US"),property:"locale"}))))),c().createElement(Qn,null,c().createElement("label",{className:"sui-settings-label"},fr("Debug Mode")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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.")),c().createElement($n,wl({},this.props,{settings:this.props.state,property:"debug_mode",defaultValue:"disable",noWrapper:!0}),c().createElement("div",{value:"disable"},fr("Disable")),c().createElement("div",{value:"enable"},fr("Enable")))));case"visibility":return c().createElement(Rn,this.props);default:return c().createElement("div",null)}}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Nl.apply(null,arguments)}class kl extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props,t={};switch(_.assign(t,forminatorData.variables),e){case"settings":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Nl({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),property:"field_label"})),c().createElement(Wi,Nl({},this.props,{settings:this.props.state,label:fr("Hide label"),property:"hide-label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(hi,Nl({},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:fr("Site Information"),mainOptions:{site_title:fr("Site Title"),site_url:fr("Site URL"),date_dmy:fr("Date")},paymentOptions:forminatorData.payment_variables,stripeSubscriptionOptions:forminatorData.stripe_subscription_variables,label:fr("Value")})))));case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Sl.apply(null,arguments)}class Cl extends Rr.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 vr(forminatorData.parentFormFields,e,void 0,void 0,!0)}render(){const{type:e}=this.props;switch(e){case"settings":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement($n,Sl({},this.props,{settings:this.props.state,property:"input_label",label:fr("Hide or show input labels")}),c().createElement("span",{value:"true"},fr("Show")),c().createElement("span",{value:"false"},fr("Hide"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,Sl({},this.props,{settings:this.props.state,property:"exclusion-field",type:"textarea",placeholder:fr("Enter form fields to remove from PDF."),boxClass:"sui-tab-boxed",label:fr("Form field exclusion"),description:fr("Use the input option to remove specific field(s) from your PDF file."),customClass:"sui-variables-select-text"}),_.map(this.getFields(),((e,t)=>c().createElement("option",{key:t,value:`{${e.element_id}}`,"data-content":e.element_id},Dn(e.label))))))));case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Pl.apply(null,arguments)}class Fl extends Rr.Component{constructor(e){super(e),this.updateProperty=this.updateProperty.bind(this),this.multiFields=[{slug:"payment_amount",label:fr("Price")},{slug:"quantity",label:fr("Quantity")},{slug:"payment_type",label:fr("Payment Type")},{slug:"payment_method",label:fr("Payment Method")},{slug:"transaction_id",label:fr("Transaction/Payment ID")},{slug:"payment_status",label:fr("Payment Status")},{slug:"subtotal",label:fr("Subtotal")},{slug:"tax",label:fr("Tax")},{slug:"total_amount",label:fr("Total Amount")}]}updateProperty(e,t){this.setState({[e]:t})}getNameOptions(){const e=[];return vr(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 c().createElement(Rr.Fragment,null,c().createElement("div",{id:"pdf-payment-modal",className:"sui-accordion sui-accordion-flushed fui-modal-accordion-flushed"},c().createElement(ii,Pl({},this.props,{label:fr("Product name"),property:"product_name",settings:this.props.state,required:this.props.state.product_name_required}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,Pl({},this.props,{settings:this.props.state,type:"input",property:"product_label",placeholder:fr("Enter Label"),defaultValue:fr("Product Name"),label:fr("Label")}),this.getNameOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value},Dn(e.label))))),c().createElement(Wi,Pl({},this.props,{settings:this.props.state,label:fr("Hide label"),property:"hide-label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(hi,Pl({},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:fr("Value"),selectLabel:fr("Insert dynamic data"),tooltipLabel:fr("Add dynamic data")})))))),this.multiFields.map(((e,t)=>c().createElement(ii,Pl({},this.props,{label:e.label,property:e.slug,settings:this.props.state,required:this.props.state[e.slug+"_required"],key:t}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Pl({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter label"),defaultValue:e.label,property:e.slug+"_label"}))))))))));case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null)}}}function Ol(){return Ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ol.apply(null,arguments)}class Dl extends Rr.Component{constructor(e){super(e)}render(){const{type:e}=this.props,{icon:t,size:s,suffix:r,max_rating:a}=this.props.state,n=Math.max(0,Math.min(Math.floor(Number(a)),50)),i=Math.ceil(n/2);switch(e){case"labels":return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Ol({},this.props,{settings:this.props.state,label:fr("Label"),placeholder:fr("Enter Label"),property:"field_label"})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Ol({},this.props,{settings:this.props.state,label:fr("Description (optional)"),placeholder:fr("Enter description"),property:"description"})))));case"settings":return c().createElement("div",null,c().createElement(Gn,this.props),c().createElement(Qn,{label:fr("Maximum Rating"),labelDark:!0,description:fr("Specify the maximum rating number."),sidebar:!1},c().createElement(Sn,Ol({},this.props,{settings:this.props.state,type:"number",isPositive:!0,maxValid:50,maxValidError:fr("Max value should be 50."),placeholder:fr("Enter Maximum Rating"),property:"max_rating",minValue:"0",maxValue:"50",step:"1"}))),c().createElement(Qn,{sidebar:!1},c().createElement("div",{className:"sui-form-field"},c().createElement("div",{style:{display:"flex",justifyContent:"space-between"}},c().createElement("div",null,c().createElement("span",{className:"sui-settings-label sui-dark"},fr("Rating Icon")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Select the style and size of the rating icon."))),c().createElement(Wi,Ol({},this.props,{label:fr("Show suffix"),property:"suffix",settings:this.props.state,unWrap:!0}))),c().createElement("div",{style:{border:"1px solid #e6e6e6",padding:"30px",borderRadius:"4px"}},c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,Ol({},this.props,{property:"icon",defaultValue:"star",settings:this.props.state}),c().createElement("option",{value:"star"},fr("Star")),c().createElement("option",{value:"heart"},fr("Heart")),c().createElement("option",{value:"like"},fr("Thumb")),c().createElement("option",{value:"smile"},fr("Smiley face")))),c().createElement(Nn,{cols:"6"},c().createElement(zn,Ol({},this.props,{property:"size",defaultValue:"md",settings:this.props.state}),c().createElement("option",{value:"sm"},fr("Small - 16px")),c().createElement("option",{value:"md"},fr("Medium - 24px")),c().createElement("option",{value:"lg"},fr("Large - 32px"))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement("div",{className:`forminator-rating-field forminator-rating-preview forminator-rating-size--${s}`},c().createElement("div",{className:"forminator-rating-items"},[...Array(n)].map(((e,s)=>c().createElement("span",{key:s,className:`forminator-icon-${t} ${s<i?"forminator-rating-active":""}`,"aria-hidden":"true"}))),r&&c().createElement("span",{className:"forminator-rating-suffix"},`(${i}/${n})`)))))))));case"visibility":return c().createElement(Rn,this.props);case"styling":return c().createElement(Hn,this.props);default:return c().createElement("div",null,fr("Wrong field type!"))}}}var Al={emailSettings:Zn,addressSettings:pi,captchaSettings:bi,dateSettings:Ni,signatureSettings:Si,consentSettings:Pi,gdprcheckboxSettings:Oi,hiddenSettings:Ai,htmlSettings:ji,groupSettings:Li,sliderSettings:Xi,multivalueSettings:co,nameSettings:fo,numberSettings:go,paginationSettings:vo,phoneSettings:_o,postdataSettings:Po,sectionSettings:Do,singlevaluesettings:To,textSettings:Mo,textareaSettings:$o,timeSettings:Ro,uploadSettings:qo,websiteSettings:Qo,radioSettings:Go,calculationSettings:Xo,stripeSettings:fl,stripeOCSSettings:gl,currencySettings:vl,passwordSettings:_l,paypalSettings:xl,richTextSettings:kl,allFormDataSettings:Cl,paymentSettings:Fl,ratingSettings:Dl};function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Tl.apply(null,arguments)}class jl extends Rr.Component{constructor(e){super(e);const t=mr(this.props.state);this.settings=t.settings}render(){const e=_.map(this.settings,((e,t)=>{switch(e.type){case"Toggle":return c().createElement(Nn,{cols:e.size,customClass:e.className,key:t},c().createElement(Wi,Tl({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default})));case"Text":return c().createElement(Nn,{cols:e.size,key:t},c().createElement(Sn,Tl({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default})));case"Color":return c().createElement(Nn,{cols:e.size,key:t},c().createElement(Fo,Tl({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default})));case"Select":return c().createElement(Nn,{cols:e.size,key:t},c().createElement(An,Tl({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default}),_.map(e.values,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label))))));case"Radio":return c().createElement(Nn,{cols:e.size,key:t},c().createElement($n,Tl({},this.props,{settings:this.props.state,label:e.label||"",placeholder:e.placeholder||"",property:e.name,defaultValue:e.default}),_.map(e.values,((e,t)=>c().createElement(ti,{value:e.value,key:t},Dn(e.label))))));default:return c().createElement("div",null,fr("Unknown setting"))}}));return c().createElement("div",{className:"forminator-advanced-settings"},c().createElement(xn,null,e))}}function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ml.apply(null,arguments)}const Ul={email:Al.emailSettings,address:Al.addressSettings,captcha:Al.captchaSettings,date:Al.dateSettings,signature:Al.signatureSettings,consent:Al.consentSettings,gdprcheckbox:Al.gdprcheckboxSettings,hidden:Al.hiddenSettings,html:Al.htmlSettings,group:Al.groupSettings,slider:Al.sliderSettings,checkbox:Al.multivalueSettings,radio:Al.radioSettings,name:Al.nameSettings,number:Al.numberSettings,pagination:Al.paginationSettings,phone:Al.phoneSettings,postdata:Al.postdataSettings,section:Al.sectionSettings,select:Al.singlevaluesettings,text:Al.textSettings,textarea:Al.textareaSettings,time:Al.timeSettings,upload:Al.uploadSettings,url:Al.websiteSettings,calculation:Al.calculationSettings,stripe:Al.stripeSettings,"stripe-ocs":Al.stripeOCSSettings,currency:Al.currencySettings,password:Al.passwordSettings,paypal:Al.paypalSettings,"rich-text":Al.richTextSettings,"all-form-data":Al.allFormDataSettings,payment:Al.paymentSettings,rating:Al.ratingSettings};class Il extends Rr.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=wn()(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=hr(e.fields,t,this.state),this.props.actions.builderActions.updateFieldSettings(e,this.state.element_id),this.closeModal()}getDateDuration(e,t,s,r){return"-"===e?moment().subtract(t,s).format(r):moment().add(t,s).format(r)}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=fr("At least one field must be enabled"),e.isValid=!1}if(this.props.modal.modalProps.isValid||(e.error=fr("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=fr("Calculation values are required!"),e.isValid=!1);_.some(this.state.options,(function(e){return _.isEmpty(e.label)}))&&(e.error=fr("Option labels are required!"),e.isValid=!1)}if("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=fr("Please add a placeholder or select a default option."),e.isValid=!1)}if("postdata"===this.state.type&&(Or(this.state.post_title)||Or(this.state.post_content)||Or(this.state.post_excerpt)||(e.error=fr("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=fr("Please, connect your Stripe account first!"),e.isValid=!1),_.isEmpty(this.state.payments)&&(e.error=fr("You need at least one payment plan!"),e.isValid=!1),"true"!==this.state.receipt||this.state.customer_email||(e.error=fr("Please select an email address for payment receipt."),e.isValid=!1);_.some(this.state.options,(function(e){return _.isEmpty(e.label)}))&&(e.error=fr("Empty labels are not allowed for meta values!"),e.isValid=!1)}e=Fr(e,this.state.payments),"paypal"===this.state.type&&(forminatorData.hasPayPal||(e.error=fr("Please connect your PayPal account first!"),e.isValid=!1),"fixed"!==this.state.amount_type||this.state.amount||(e.error=fr("Please enter PayPal payment amount!"),e.isValid=!1),"variable"!==this.state.amount_type||this.state.variable||(e.error=fr("Please select PayPal payment variable field!"),e.isValid=!1)),"calculation"===this.state.type&&(_.isUndefined(this.state.formula)||_.isEmpty(this.state.formula))&&(e.error=fr("Calculation formula is required!"),e.isValid=!1),"currency"===this.state.type&&parseInt(this.state.limit_min)>=parseInt(this.state.limit_max)&&(e.error=fr("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=fr("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=fr("Please enter API keys."),e.isValid=!1)),"hcaptcha"===t&&(forminatorData.hasHCaptcha||(e.error=fr("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",r=_.isUndefined(this.state.restrict_start_hour)?0:this.state.restrict_start_hour,a=_.isUndefined(this.state.restrict_start_minute)?0:this.state.restrict_start_minute,n=_.isUndefined(this.state.restrict_start_ampm)?"AM":this.state.restrict_start_ampm,i=_.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=r+":"+a+("twelve"===t?n:"").toLowerCase(),b=moment(f,s),g=i+":"+o+m.toLowerCase(),y=moment(g,s),v=moment(c+":"+u+h,s);y.isBefore(b)?(e.error=fr("Please select a valid end time limit."),e.isValid=!1):"default"===p&&(v.isBefore(b)||y.isBefore(v))?(e.error=fr("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=fr("Please fix the Start or End time."),e.isValid=!1)}if(_.isUndefined(this.state.conditions)||_.isEmpty(this.state.conditions)||_.isUndefined(this.state.hidden)||Or(this.state.hidden)||_.each(this.state.conditions,(t=>{_.isEmpty(t.rule)&&(e.error=fr("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"],r="MM/DD/YYYY";let a=!0;if("specific"!==t||"specific"!==s||_.isUndefined(this.state["start-specific-date"])||_.isUndefined(this.state["end-specific-date"])||!moment(this.state["end-specific-date"],r).isBefore(moment(this.state["start-specific-date"],r)))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"],n=this.getDateDuration(e,t,s,r),i=_.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(i,o,l,r);moment(p,r).isBefore(moment(n,r))&&(a=!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"],n=this.getDateDuration(e,t,s,r);moment(this.state["end-specific-date"],r).isBefore(moment(n,r))&&(a=!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"],n=this.getDateDuration(e,t,s,r);moment(n,r).isBefore(moment(this.state["start-specific-date"],r))&&(a=!1)}else a=!1;a||(e.error=fr("Please fix the limit Start or End date."),e.isValid=!1)}return"rating"===this.state.type&&(parseInt(this.state.max_rating)<0?(e.error=fr("Please enter valid number."),e.isValid=!1):parseInt(this.state.max_rating)>50&&(e.error=fr("Maximum Rating value should be less than 50."),e.isValid=!1)),e}cancelModal(){this.closeModal()}render(){const e=mr(this.state),t=Ul[e.type],s=!_.contains(["captcha","paypal","rich-text","all-form-data","payment"],e.type),r="address"===e.type,a="stripe-ocs"===e.type,n=!_.contains(["submit","hidden","html","page-break"],e.type),i=!_.contains(["captcha","page-break","hidden","rich-text","all-form-data","payment"],e.type),o=!_.contains(["page-break","paypal","stripe-ocs"],e.type),l=_.contains(["calculation","number","slider","radio","checkbox","select","currency"],e.type),p=_.contains(["stripe","paypal"],e.type),u=_.contains(["paypal","stripe-ocs"],e.type),d=_.contains(["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),v=_.isUndefined(this.props.settings["description-position"])||"above"!==this.props.settings["description-position"]?"below":"above";return c().createElement(Rr.Fragment,null,c().createElement(dn,{closeType:"icon",closeModal:this.closeModal},c().createElement(hn,{id:this.props.modal.modalProps.id,label:fr("Edit Field"),tag:e.name})),c().createElement("div",{id:"forminator-modal-body--"+e.type,className:"sui-box-body"},c().createElement("div",{className:"sui-tabs sui-tabs-flushed"},c().createElement("div",{role:"tablist",className:"sui-tabs-menu"},s>0&&c().createElement(da,{to:"/builder/labels",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Labels")),r&&c().createElement(da,{to:"/builder/geolocation/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},forminatorData.isPro?fr("Geolocation"):fr("Geolocation {{span}}Pro{{/span}}",{components:{span:c().createElement("span",{className:"sui-tag sui-tag-pro"})}})),a&&c().createElement(da,{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"},fr("Products/Plans")),n>0&&c().createElement(da,{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?fr("Repeater"):fr("Settings")),d>0&&"picker"===m&&c().createElement(da,{to:"/builder/limits/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Limits")),l>0&&c().createElement(da,{to:"/builder/calculations/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Calculations")),p&&c().createElement(da,{to:"/builder/advanced-settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Advanced")),o>0&&c().createElement(da,{to:"/builder/styling/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Styling")),u>0&&c().createElement(da,{to:"/builder/customize/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Customize")),i>0&&c().createElement(da,{to:"/builder/visibility/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Visibility")),!_.isEmpty(e.settings)&&c().createElement(da,{to:"/builder/advanced/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"},role:"tab"},fr("Advanced"))),c().createElement(xt,null,c().createElement(_t,{path:"/builder/",element:c().createElement(Et,{to:g,replace:!0})})),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content active",role:"tabpanel"},c().createElement(xt,null,c().createElement(_t,{path:"/builder/labels",element:c().createElement(t,{type:"labels",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers,formType:this.props.formType||""})}),c().createElement(_t,{path:"/builder/products/*",element:c().createElement(t,{type:"products",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),c().createElement(_t,{path:"/builder/settings/*",element:c().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&&c().createElement(_t,{path:"/builder/limits",element:c().createElement(t,{type:"limits",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),c().createElement(_t,{path:"/builder/advanced-settings",element:c().createElement(t,{type:"advanced-settings",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),c().createElement(_t,{path:"/builder/calculations",element:c().createElement(t,{type:"calculations",updateProperty:this.updateProperty,modal:this.props.modal.modalProps,state:this.state,wrappers:this.props.wrappers})}),c().createElement(_t,{path:"/builder/geolocation",element:c().createElement(t,{type:"geolocation",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),c().createElement(_t,{path:"/builder/visibility",element:c().createElement(t,{type:"visibility",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers})}),c().createElement(_t,{path:"/builder/styling",element:c().createElement(t,{type:"styling",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers,descriptionPosition:v,descriptionExist:y})}),c().createElement(_t,{path:"/builder/advanced",element:c().createElement(jl,Ml({},this.props,{updateProperty:this.updateProperty,state:this.state}))}),c().createElement(_t,{path:"/builder/customize",element:c().createElement(t,{type:"customize",updateProperty:this.updateProperty,state:this.state,wrappers:this.props.wrappers,descriptionPosition:v,descriptionExist:y})})))))),c().createElement(mn,{customClass:"sui-content-separated"},c().createElement(pn,{icon:"undo",label:fr("Discard Changes"),customClass:"sui-button-ghost forminator-discard-field-settings",closeModal:this.closeModal}),f&&c().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Apply")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),!f&&c().createElement("div",{className:"sui-tooltip","data-tooltip":b},c().createElement("button",{className:"sui-button forminator-save-field-settings sui-tooltip",disabled:"disabled","data-tooltip":b},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Apply")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}var $l=ga(Il);class Vl extends Rr.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"),jQuery(document).on("after.load.forminator",this.previewLoaded)}componentWillUnmount(){this.mounted=!1,or("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 c().createElement(Rr.Fragment,null,c().createElement(dn,{closeType:"icon",closeModal:this.closeModal},c().createElement(hn,{label:fr("Preview")})),c().createElement("div",{className:"sui-box-body",ref:e=>this.body=e},c().createElement("div",{role:"alert",className:"sui-notice sui-notice-loading sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-loader sui-loading","aria-hidden":"true"}),c().createElement("p",null,fr("Loading preview…"))))),("basic"===e||"none"===e)&&c().createElement("div",{role:"alert","aria-live":"polite",className:"sui-notice sui-notice-style-basic sui-active","aria-hidden":"true"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"}),c().createElement("p",null,c().createElement("strong",null,fr("Note:"))," ",fr("Appearance of some fields may vary depending on the form styles you select in Appearance > Form styles. For the best viewing experience, ensure to preview your changes on a page or post."))))),c().createElement("form",{ref:e=>this.el=e,id:`forminator-module-${this.props.id}`,"data-forminator-render":"0",className:"sui-hidden"})))}}function Rl(){return Rl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Rl.apply(null,arguments)}class Ll extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(dn,{closeType:"icon",closeModal:this.closeModal},c().createElement(hn,{label:fr("Edit Field"),tag:fr("Submit")})),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-tabs sui-tabs-flushed"},c().createElement("div",{className:"sui-tabs-menu"},c().createElement(da,{to:"/builder/labels",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Labels")),c().createElement(da,{to:"/builder/visibility/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Visibility")),c().createElement(da,{to:"/builder/styling/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Styling"))),c().createElement(xt,null,c().createElement(_t,{path:"/builder/",element:c().createElement(Et,{to:"/builder/labels",replace:!0})})),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content active"},c().createElement(xt,null,c().createElement(_t,{path:"/builder/labels",element:c().createElement("div",{key:"builder-labels"},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Rl({},this.props,{settings:this.state,label:fr("Button text"),placeholder:fr("Enter text"),property:"custom-submit-text",updateProperty:this.updateProperty})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Rl({},this.props,{settings:this.state,label:fr("Error message"),placeholder:fr("Enter message"),property:"custom-invalid-form-message",updateProperty:this.updateProperty})))))}),c().createElement(_t,{path:"/builder/visibility",element:c().createElement(Rn,Rl({},this.props,{updateProperty:this.updateProperty,settings:this.state,state:this.state}))}),c().createElement(_t,{path:"/builder/styling",element:c().createElement(Hn,Rl({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),c().createElement(mn,{alignment:"separated"},c().createElement(pn,{icon:"undo",label:fr("Discard Changes"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),c().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Apply")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var Bl=ga(Ll);class zl extends Rr.Component{constructor(e){super(e),this.closeModal=this.props.modal.modalProps.closeModal.bind(this)}render(){return c().createElement(Rr.Fragment,null,c().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")},c().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}),c().createElement("h3",{className:"sui-box-title sui-lg",id:"dialogTitle"},fr("Publishing form…")),c().createElement("p",{className:"sui-description"},fr("Great work! Please hold tight a few moments while we publish your form to the world."))))}}class Wl extends Rr.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=or("stripe",this.props.wrappers)||or("stripe-ocs",this.props.wrappers),t=or("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")))),r=Sr(this.props.wrappers),a=[];if(_.each(r,(e=>{(_.isUndefined(e.formula)||!1===e.formula)&&(e.formula=""),e.formula.indexOf("{"+this.props.modal.modalProps.field.element_id+"}")>=0&&a.push({id:e.element_id,label:e.label,field:e})})),_.isEmpty(a)){const e="group"===this.props.modal.modalProps.field.type?fr("Delete Field Group"):fr("Delete Field"),r="group"===this.props.modal.modalProps.field.type?fr("Are you sure you want to delete this group and all the fields it contains?"):fr("Deleting this field {%(name)s} will also remove associated values from existing submissions.",{args:{name:this.props.modal.modalProps.field.element_id}});return c().createElement(Rr.Fragment,null,c().createElement(dn,{flatten:!0,alignment:"center",closeType:"icon",closeModal:this.closeModal,customClass:"sui-spacing-top--60"},c().createElement(hn,{id:this.props.modal.modalProps.id,label:e,size:"lg"}),c().createElement("p",{id:`modal-desc-${this.props.modal.modalProps.id}`,className:"sui-description"},r),s.length>0&&-1!==s.indexOf(this.props.modal.modalProps.field.element_id)&&c().createElement("p",{className:"sui-description"},fr("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:c().createElement("a",{onClick:()=>t("registration"),style:{cursor:"pointer"}})}}))),c().createElement(mn,{customClass:"sui-flatten sui-content-center"},c().createElement(pn,{label:fr("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost"}),c().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.trashField},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}if(!_.isEmpty(a)){const e=_.map(a,((e,t)=>c().createElement("li",{className:"wpmudev-dropdown--option",key:t},c().createElement("i",{className:"fui-list-icon sui-icon-calculator","aria-hidden":"true"}),c().createElement("span",{className:"fui-list-label"},Dn(e.label)),c().createElement("button",{className:"sui-button-icon",onClick:this.editSettings.bind(this,e)},c().createElement("i",{className:"sui-icon-pencil","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Edit Field"))))));return c().createElement(Rr.Fragment,null,c().createElement(dn,{flatten:!0,alignment:"center",closeType:"icon",closeModal:this.closeModal,customClass:"sui-spacing-top--60"},c().createElement(hn,{id:this.props.modal.modalProps.id,label:fr("Delete Field")}),c().createElement("p",{id:`modal-desc-${this.props.modal.modalProps.id}`,className:"sui-description"},fr("Please remove the references to this field from the following form fields first."))),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-label"},fr("Form Fields")),c().createElement("ul",{className:"fui-list-fields"},e))),c().createElement(mn,{flatten:!0,alignment:"center"},c().createElement(pn,{label:fr("Got It"),closeModal:this.closeModal})))}}}var ql=ga(Wl);class Hl extends Rr.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 Gr({type:"success",text:fr("Shortcode has been copied successfully."),time:4e3}).open()}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"sui-button-float--right forminator-cancel-create-form",onClick:this.closeModal}),c().createElement("span",{className:"sui-icon-check sui-lg","aria-hidden":"true"}),c().createElement("h3",{id:"dialogTitle",className:"sui-box-title sui-lg"},fr("Ready to go!")),c().createElement("p",{className:"sui-description"},fr("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!"))),c().createElement("div",{className:"sui-box-body"+(forminatorData.showBranding?"":" sui-spacing-bottom--60")},c().createElement("div",{id:"forminator-form-name-input",className:"sui-form-field"},c().createElement("label",{htmlFor:"forminator-form-name",className:"sui-label"},fr("Shortcode")),c().createElement("div",{className:"sui-with-button sui-with-button-icon"},c().createElement("input",{type:"text",defaultValue:`[forminator_form id="${this.props.id}"]`,id:"forminator-form-shortcode",className:"sui-form-control",ref:e=>this.input=e}),c().createElement(vn,{icon:"copy",iconSize:"sm",label:fr("Copy shortcode"),onClick:this.copyToClipboard})))))}}function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ql.apply(null,arguments)}class Yl extends Rr.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],r=jQuery("#forminator-field-appearance_preset").val();t.addClass("sui-button-onload-text");const a={action:"forminator_apply_appearance_preset",_ajax_nonce:forminatorData.modules.ApplyPreset.nonce,edit_form:!0,settings:JSON.stringify(e),preset_id:r,ids:s};Na().post(forminatorData.ajaxUrl,Sa().stringify(a)).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 Gr({type:"success",text:fr("Appearance preset successfully applied."),time:4e3}).open()}else{new Gr({type:"error",text:e.data.data}).open()}})).catch((e=>{new Gr({type:"error",text:fr("Something went wrong. Please try again.")}).open(),console.log(e)})).then((()=>{setTimeout((()=>{t.removeClass("sui-button-onload-text")}),1e3)}))}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60",style:{paddingBottom:"0"}},c().createElement("button",{className:"sui-button-icon sui-button-float--right forminator-popup-close forminator-cancel-create-form","aria-label":fr("Close this dialog window"),onClick:this.closeModal},c().createElement("span",{className:"sui-icon-close sui-md","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Close this dialog window"))),c().createElement("h3",{className:"sui-box-title sui-lg",id:"dialogTitle"},forminatorData.modules.ApplyPreset.title),c().createElement("span",{className:"sui-description",style:{marginTop:"15px"}},fr("Select an appearance preset from the list below to apply the appearance to your form. You can edit or create new presets in {{link}}Settings > Appearance Preset{{/link}}",{components:{link:c().createElement("a",{href:forminatorData.modules.ApplyPreset.presetUrl,target:"_blank"})}}))),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-form-field",style:{marginBottom:"10px"}},c().createElement(zn,Ql({},this.props,{property:"appearance_preset"}),_.map(forminatorData.modules.ApplyPreset.presets,((e,t)=>c().createElement("option",{value:t,key:t},e))))),c().createElement("div",{className:"sui-notice",style:{marginTop:"10px"}},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"}),c().createElement("p",null,fr("Your form's current appearance configurations will be overwritten.")))))),c().createElement("div",{className:"sui-box-footer sui-flatten sui-content-center",style:{paddingTop:"0"}},c().createElement("button",{id:"forminator-apply-preset",className:"sui-button sui-button-blue",onClick:()=>this.applyPreset()},c().createElement("span",{className:"sui-button-text-default"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"})," ",forminatorData.modules.ApplyPreset.button),c().createElement("span",{className:"sui-button-text-onload"},c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}),fr("Applying preset…")))))}}class Gl extends Rr.Component{constructor(e){super(e)}render(){return c().createElement("table",{className:"sui-table fui-table--pagination"},c().createElement("thead",null,c().createElement("tr",null,c().createElement("th",null,fr("Page")),c().createElement("th",null,fr("Previous Button")),c().createElement("th",null,fr("Next Button")))),c().createElement("tbody",null,_.map(this.props.field,((e,t)=>c().createElement("tr",null,c().createElement("td",{className:"sui-table-item-title"},"Page "+(t+1)),c().createElement("td",null,t<=0&&c().createElement("strong",{style:{color:"#888888"}},fr("No Previous button")),t>0&&c().createElement("input",{type:"text",placeholder:fr("Previous"),className:"sui-form-control",value:_.isUndefined(this.props.state[e.element_id+"-previous"])?fr("Previous"):this.props.state[e.element_id+"-previous"],onChange:t=>{this.props.updateProperty(e.element_id+"-previous",t.target.value)}})),c().createElement("td",null,c().createElement("input",{type:"text",placeholder:fr("Next"),className:"sui-form-control",value:_.isUndefined(this.props.state[e.element_id+"-next"])?fr("Next"):this.props.state[e.element_id+"-next"],onChange:t=>{this.props.updateProperty(e.element_id+"-next",t.target.value)}}))))),c().createElement("tr",null,c().createElement("td",{className:"sui-table-item-title"},"Page "+(this.props.length+1)),c().createElement("td",null,c().createElement("input",{type:"text",placeholder:fr("Previous"),className:"sui-form-control",value:_.isUndefined(this.props.state["last-previous"])?fr("Previous"):this.props.state["last-previous"],onChange:e=>{this.props.updateProperty("last-previous",e.target.value)}})),c().createElement("td",null,c().createElement("strong",{style:{color:"#888888"}},fr("No Next button"))))))}}function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Kl.apply(null,arguments)}class Jl extends Rr.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=vr(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 c().createElement(Rr.Fragment,null,c().createElement(dn,{closeType:"icon",closeModal:this.closeModal},c().createElement(hn,{label:fr("Edit Field"),tag:fr("Pagination")})),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-tabs sui-tabs-flushed"},c().createElement("div",{className:"sui-tabs-menu"},c().createElement(da,{to:"/builder/labels",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Labels")),c().createElement(da,{to:"/builder/settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Settings"))),c().createElement(xt,null,c().createElement(_t,{path:"/builder/",element:c().createElement(Et,{to:"/builder/labels",replace:!0})})),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content active"},c().createElement(xt,null,c().createElement(_t,{path:"/builder/labels",element:c().createElement("div",{key:"builder-labels"},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement("span",{className:"sui-description"},fr("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)=>c().createElement(xn,{key:e.element_id},c().createElement(Nn,{cols:"12"},c().createElement(Sn,Kl({},this.props,{settings:this.state,label:"Page "+(t+1),defaultValue:"Page "+(t+1),property:e.element_id+"-steps",updateProperty:this.updateProperty})))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Kl({},this.props,{settings:this.state,label:fr("Finish"),defaultValue:"Finish",property:"last-steps",updateProperty:this.updateProperty})))))}),c().createElement(_t,{path:"/builder/settings",element:c().createElement("div",{key:"builder-settings"},c().createElement(Qn,null,c().createElement(ei,Kl({},this.props,{settings:this.state,property:"pagination-header-design",settingsLabel:fr("Progress Indicator"),default:"show",description:fr("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}),c().createElement(ti,Kl({},this.props,{value:"show",boxClass:"sui-tab-boxed",label:fr("Show")}),c().createElement(ci,Kl({},this.props,{settings:this.state,defaultValue:"nav",radioClass:"sui-radio-sm",property:"pagination-header",updateProperty:this.updateProperty}),c().createElement("div",{value:"nav",hasImage:!0,image1x:"pagination-steps.png",image2x:"pagination-steps@2x.png"},fr("Steps")),c().createElement("div",{value:"bar",hasImage:!0,image1x:"pagination-progress-bar.png",image2x:"pagination-progress-bar@2x.png"},fr("Progress Bar")))),c().createElement(si,{value:"off"},fr("Hide")))),c().createElement(Qn,null,c().createElement(ei,Kl({},this.props,{settings:this.state,property:"pagination-labels",settingsLabel:fr("Buttons Text"),default:"default",description:fr("Choose whether you want to use default text for the Previous and Next button or use custom text."),updateProperty:this.updateProperty}),c().createElement(si,{value:"default"},fr("Default")),c().createElement(ti,Kl({},this.props,{value:"custom",label:fr("Custom")}),c().createElement(Gl,Kl({},this.props,{field:this.fields,length:e,updateProperty:this.updateProperty,state:this.state}))))))})))))),c().createElement(mn,{alignment:"separated"},c().createElement(pn,{icon:"undo",label:fr("Discard Changes"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),c().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Apply")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var Xl=ga(Jl);function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Zl.apply(null,arguments)}class ep extends Rr.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 vr(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=_.where(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?fr("null"):this.props.rule.value,r=_.isEmpty(this.props.rule.email)?"":this.props.rule.email;return c().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},c().createElement("h4",{className:"fui-visibility-rule-header"},c().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},c().createElement("i",{className:"sui-icon-sitemap fui-visibility-rule-icon","aria-hidden":"true"}),c().createElement("span",{className:"fui-visibility-rule-text"},fr('Send to {{strong}}"%(label)s"{{/strong}} if {{strong}}%(field)s{{/strong}} %(rule)s {{strong}}%(value)s{{/strong}}',{args:{label:r,field:t.label,rule:kr(this.props.rule.rule,t.field_type),value:s},components:{strong:c().createElement("strong",null)}})),c().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),c().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},c().createElement(wo,Zl({},this.props,{property:"email",placeholder:fr("E.g. sales@website.com"),label:fr("Recipients"),settings:this.props.rule,value:this.props.rule.email,required:"true",note:fr("Separate multiple emails with a comma"),onChange:this.updateValue.bind(this)}),this.getEmailOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label))))),c().createElement(xn,{class:"sui-align-bottom sui-spacing-10"},c().createElement(Nn,{cols:"6",customClass:"sui-padding-right-10"},c().createElement(An,Zl({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:fr("Routing Condition")}),_.map(this.fields,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id))))),c().createElement(Nn,{cols:"6",customClass:"sui-padding-left-10"},c().createElement(zn,Zl({key:"visibility-condition-"+Js()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,options:this.disableSearch()}),c().createElement("option",{value:""},fr("Select rule")),"signature"===t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is null")),c().createElement("option",{value:"is_not"},fr("Is not null"))),"signature"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is")),c().createElement("option",{value:"is_not"},fr("Is not"))),(t.isNumber||"rating"===t.field_type)&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is_great"},fr("Is greater than")),c().createElement("option",{value:"is_less"},fr("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"contains"},fr("Contains")),c().createElement("option",{value:"does_not_contain"},fr("Does not contain")),c().createElement("option",{value:"starts"},fr("Starts with")),c().createElement("option",{value:"ends"},fr("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"day_is"},fr("Day is")),c().createElement("option",{value:"day_is_not"},fr("Day is not"))),"date"===t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"month_is"},fr("Month is")),c().createElement("option",{value:"month_is_not"},fr("Month is not")))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},t.hasOptions&&c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},c().createElement("option",{value:""},fr("Select option")),_.map(t.values,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(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)&&c().createElement(Sn,Zl({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,placeholder:fr("Enter value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule==="month_is"||"month_is_not"===this.props.rule.rule)&&c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},c().createElement("option",{value:""},fr("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],(e=>c().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)&&c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},c().createElement("option",{value:""},fr("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],(e=>c().createElement("option",{value:e,key:e},e)))))),c().createElement("div",{className:"fui-visibility-rule-footer"},c().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},fr("Done")))))}}function tp(){return tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},tp.apply(null,arguments)}class sp extends Rr.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=vr(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=_.pluck(this.props.state.routing,"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!_.contains(e,t.element_id)}));this.updateState(s)}render(){const e=c().createElement("div",{className:"fui-visibility-group"},c().createElement("div",{className:"fui-visibility",style:{marginTop:"0"}},c().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>1)&&!_.isEmpty(this.fields)&&c().createElement("button",{accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Rule")),c().createElement("p",null,fr('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)&&Rr.Fragment,!_.isUndefined(this.props.state.routing)&&this.props.state.routing.length>0&&!_.isEmpty(this.fields)?c().createElement("div",{className:"fui-visibility-group"},c().createElement("div",{className:"fui-visibility",style:{marginTop:"0"}},c().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.routing,((e,t)=>c().createElement(ep,tp({},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})))))),c().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Rule"))):c().createElement(Rr.Fragment,null,e)}}function rp(){return rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},rp.apply(null,arguments)}class ap extends Rr.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=_.where(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?fr("null"):this.props.rule.value;return c().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},c().createElement("h4",{className:"fui-visibility-rule-header"},c().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},c().createElement("i",{className:"sui-icon-link fui-visibility-rule-icon","aria-hidden":"true"}),c().createElement("span",{className:"fui-visibility-rule-text"},c().createElement("strong",null,Dn(t.label))," ",kr(this.props.rule.rule,t.field_type)," ",c().createElement("strong",null,s)),c().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),c().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},c().createElement(An,rp({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:fr("Field")}),_.map(this.fields,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,rp({key:"visibility-condition-"+Js()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,label:fr("Condition (required)"),options:this.disableSearch()}),c().createElement("option",{value:""},fr("Select rule")),"signature"===t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is null")),c().createElement("option",{value:"is_not"},fr("Is not null"))),"signature"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is")),c().createElement("option",{value:"is_not"},fr("Is not"))),(t.isNumber||"rating"===t.field_type)&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is_great"},fr("Is greater than")),c().createElement("option",{value:"is_less"},fr("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"contains"},fr("Contains")),c().createElement("option",{value:"does_not_contain"},fr("Does not contain")),c().createElement("option",{value:"starts"},fr("Starts with")),c().createElement("option",{value:"ends"},fr("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"day_is"},fr("Day is")),c().createElement("option",{value:"day_is_not"},fr("Day is not"))),"date"===t.field_type&&"signature"!==t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"month_is"},fr("Month is")),c().createElement("option",{value:"month_is_not"},fr("Month is not"))))),c().createElement(Nn,{cols:"6"},c().createElement(Rr.Fragment,null,t.hasOptions&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select option")),_.map(t.values,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(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)&&c().createElement(Sn,rp({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule==="month_is"||"month_is_not"===this.props.rule.rule)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],(e=>c().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)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],(e=>c().createElement("option",{value:e,key:e},e)))))))),c().createElement("div",{className:"fui-visibility-rule-footer"},c().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},fr("Done")))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},np.apply(null,arguments)}class ip extends Rr.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=vr(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!_.contains(e,t.element_id)}));this.updateState(s)}render(){const e=c().createElement("div",{className:"fui-visibility-options"},c().createElement("div",{className:"fui-visibility-option"},c().createElement($n,np({},this.props,{settings:this.props.state,property:"condition_action",defaultValue:"send",noWrapper:!0}),c().createElement("span",{value:"send"},fr("Send")),c().createElement("span",{value:"dont-send"},fr("Don't Send"))),c().createElement("span",{className:"sui-description"},fr("this email if"))),c().createElement("div",{className:"fui-visibility-option"},c().createElement($n,np({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),c().createElement("span",{value:"all"},fr("All")),c().createElement("span",{value:"any"},fr("Any"))),c().createElement("span",{className:"sui-description"},fr("of the following rules match:")))),t=c().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&c().createElement("div",{className:"fui-visibility-header"},e,c().createElement("label",{className:"sui-label"},fr("Conditions"))),c().createElement("div",{className:"fui-visibility"},c().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&c().createElement("button",{accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Conditions")),c().createElement("p",null,fr("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)&&Rr.Fragment,!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0&&!_.isEmpty(this.fields)?c().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>1)&&c().createElement("div",{className:"fui-visibility-header"},e,c().createElement("label",{className:"sui-label"},fr("Conditions"))),c().createElement("div",{className:"fui-visibility"},c().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,((e,t)=>c().createElement(ap,np({},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})))))),c().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Rule"))):c().createElement(Rr.Fragment,null,t)}}class op extends Rr.Component{constructor(e){super(e)}render(){const e=this.props.color,t=Or(forminatorData.userPermissions.manage_forminator_addons)||Or(forminatorData.userPermissions.manage_options);return c().createElement("div",{role:"alert",className:`sui-notice sui-notice-${e} sui-active`,style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,this.props.text),t&&c().createElement("p",null,c().createElement("a",{className:`sui-button sui-button-${e}`,href:this.props.buttonUrl,target:"_blank"},this.props.buttonText)))))}}class lp extends Rr.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 c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("No PDF file available for this form yet. Go to the {{link}}PDF tab{{/link}} to create one.",{components:{link:c().createElement("a",{onClick:()=>this.goToSection("pdf"),href:"#"})}})))))}}var pp=ga(lp);class cp extends Rr.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 c().createElement("div",{className:"sui-form-field"},e.map(((e,r)=>c().createElement("label",{htmlFor:`forminator-pdf-${e.pdfId}`,className:"sui-checkbox sui-checkbox-stacked",key:`forminator-pdf-${e.pdfId}-${Js()}`,disabled:s?"":"disabled"},c().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)}}),c().createElement("span",{"aria-hidden":"true"}),c().createElement("span",{id:`label-pdf-${e.pdfId}`},e.pdfFilename+".pdf")))))}}function up(){return up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},up.apply(null,arguments)}class dp extends Rr.Component{constructor(e){super(e)}render(){const e=forminatorData.isPro,t=forminatorData.pdfAddonActive,s=c().createElement(op,up({},this.props,{text:e?fr("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:c().createElement("strong",null)}}):fr("Generate and send PDF files (e.g. forms entries, receipts, invoices, quotations) to users after form submission."),buttonText:e?fr("Get the Add-on"):fr("Upgrade to PRO{{icon/}}",{components:{icon:c().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 r;return r=e?t?_.isEmpty(this.props.pdfs)?c().createElement("div",{className:"sui-border-frame",style:{marginTop:"0"}},c().createElement(pp,this.props)):c().createElement("div",{className:"sui-border-frame"},c().createElement(cp,up({},this.props,{pdfs:this.props.pdfs}))):c().createElement("div",{className:"sui-border-frame"},s):s,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement("div",{className:"sui-form-field"},c().createElement("label",{htmlFor:"forminator-field-email-pdf-attachment",className:"sui-label"},fr("PDF Attachments"),!e&&c().createElement("span",{className:"sui-tag sui-tag-pro"},fr("Pro"))),c().createElement("span",{className:"sui-description",style:{padding:"5px 0 7px"}},fr("Select PDF file(s) to attach to this email notification.")),r)))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},mp.apply(null,arguments)}class hp extends Rr.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 vr(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}getEmailOptions(){const e=[];return vr(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 fr("Searching")},noResults:function(){return fr("No Result Found")}},placeholder:fr("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 r=s.length;for(let e=0;e<r;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=or("upload",this.props.wrappers),s=_.isUndefined(this.state.type)?"default":this.state.type;let r=!0,a="",n={};"default"===e&&_.isEmpty(this.state.recipients)&&(r=!1,a=fr("Please enter recipients")),"routing"===e&&(_.isUndefined(this.state.routing)||_.isEmpty(this.state.routing)?(a=fr("Please add email routing"),r=!1):_.each(this.state.routing,(e=>{_.isEmpty(e.email)&&(a=fr("Please enter recipients"),r=!1),_.isEmpty(e.rule)&&(a=fr("Please select rule"),r=!1)})));let i="",o="email-subject",l="email-editor";if("registration"===this.props.formType)switch(i=_.isUndefined(this.props.settings["activation-method"])?"":this.props.settings["activation-method"],i){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]))&&(r=!1,a=fr("Please fix the error(s) in the EMAIL tab.")),(_.isUndefined(this.state[o])||_.isEmpty(this.state[o]))&&(r=!1,a=fr("Please fix the error(s) in the EMAIL tab.")),_.isEmpty(this.state["form-email"])||(n={display:"block"}),c().createElement(Rr.Fragment,null,c().createElement(dn,{closeType:"icon",closeModal:this.closeModal,customClass:"forminator-builder-fields-close"},c().createElement(hn,{id:"",label:fr("Add Email Notification")})),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-tabs sui-tabs-flushed"},c().createElement("div",{className:"sui-tabs-menu"},c().createElement(da,{to:"/notifications/email/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Email")),"save_draft"!==s&&c().createElement(da,{to:"/notifications/recipients/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Recipients")),c().createElement(da,{to:"/notifications/advanced/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Advanced")),"save_draft"!==s&&c().createElement(da,{to:"/notifications/conditions/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Conditions"))),c().createElement(xt,null,c().createElement(_t,{path:"/notifications/",element:c().createElement(Et,{to:"/notifications/email/",replace:!0})})),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content active"},c().createElement(xt,null,c().createElement(_t,{path:"/notifications/email",element:c().createElement("div",{key:"notifications-email"},c().createElement(xn,{key:"index-1"},c().createElement(Nn,{cols:"12"},c().createElement(Sn,mp({},this.props,{settings:this.state,label:fr("Label"),description:fr("The label is to help you identify this email and won't appear anywhere in the email."),placeholder:fr("E.g. Sales Team Notification"),property:"label",updateProperty:this.updateProperty})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,mp({},this.props,{settings:this.state,property:o,placeholder:fr("E.g. New Form Submission"),label:fr("Subject"),required:"true",isRequired:"true",requiredError:fr("Email subject can't be empty"),updateProperty:this.updateProperty}),this.getNameOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label))))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(hi,mp({},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:fr("Body"),isRequired:"true",requiredError:fr("Email body can't be empty"),updateProperty:this.updateProperty})))),t&&c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement($n,mp({},this.props,{settings:this.state,property:"email-attachment",defaultValue:"false",label:fr("Attachments"),description:fr("Choose whether you want to attach the files uploaded via the File Upload fields to this email."),updateProperty:this.updateProperty}),c().createElement("div",{value:"false"},fr("None")),c().createElement("div",{value:"true"},fr("Uploaded files"))))),"save_draft"!==s&&c().createElement(dp,mp({},this.props,{settings:this.state,property:"email-pdfs",updateProperty:this.updateProperty})))}),c().createElement(_t,{path:"/notifications/recipients",element:c().createElement("div",{key:"notifications-recipients"},c().createElement("span",{className:"sui-description",style:{marginTop:"0",marginBottom:"10px"}},fr("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.")),c().createElement("div",{className:"sui-form-field",style:{marginTop:"0"}},c().createElement(ei,mp({},this.props,{property:"email-recipients",default:"default",settings:this.state,updateProperty:this.updateProperty,simple:!0}),c().createElement(ti,mp({},this.props,{value:"default",label:fr("Default"),boxClass:"sui-tab-boxed"}),c().createElement(wo,mp({},this.props,{settings:this.state,property:"recipients",placeholder:fr("E.g. sales@website.com"),label:fr("Recipients"),required:"true",type:"textarea",updateProperty:this.updateProperty,note:fr("(Separate multiple emails with a comma)"),customClass:"sui-variables-select-text"}),this.getEmailOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label)))))),c().createElement(ti,mp({},this.props,{value:"routing",label:fr("Email Routing")}),c().createElement(sp,mp({},this.props,{updateProperty:this.updateProperty,state:this.state}))))))}),c().createElement(_t,{path:"/notifications/advanced",element:c().createElement("div",{key:"notifications-advanced"},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,mp({},this.props,{settings:this.state,property:"from-name",placeholder:fr("Enter from name here"),label:fr("From Name"),updateProperty:this.updateProperty}),this.getNameOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value},Dn(e.label))))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,mp({},this.props,{settings:this.state,property:"form-email",placeholder:fr("Enter from email here"),label:fr("From Email"),updateProperty:this.updateProperty}),this.getEmailOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label))))),c().createElement("div",{role:"alert",className:`sui-notice sui-notice-blue${!_.isEmpty(this.state["form-email"])&&" sui-active"}`,"aria-live":"assertive",style:n},!_.isEmpty(this.state["form-email"])&&c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr('Some hosts do not allow "from email" to be overridden or replaced due to spam issues.'))))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,mp({},this.props,{settings:this.state,property:"replyto-email",placeholder:fr("Enter reply-to email here"),label:fr("Reply-to Email"),updateProperty:this.updateProperty}),this.getEmailOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label))))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,mp({},this.props,{settings:this.state,property:"cc-email",placeholder:fr("Enter CC email here"),label:fr("CC Emails"),updateProperty:this.updateProperty}),this.getEmailOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label))))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,mp({},this.props,{settings:this.state,property:"bcc-email",placeholder:fr("Enter BCC email here"),label:fr("BCC Emails"),updateProperty:this.updateProperty}),this.getEmailOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label))))))))}),c().createElement(_t,{path:"/notifications/conditions",element:c().createElement(ip,mp({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),c().createElement(mn,{alignment:"separated"},c().createElement(pn,{icon:"undo",label:fr("Discard Changes"),closeModal:this.closeModal}),r&&c().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Add")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),!r&&c().createElement("div",{className:"sui-tooltip","data-tooltip":a},c().createElement("button",{className:"sui-button forminator-save-field-settings sui-tooltip",disabled:"disabled","data-tooltip":a},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Add")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}var fp=ga(hp);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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},bp.apply(null,arguments)}class gp extends Rr.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=_.where(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?fr("null"):this.props.rule.value,r="consent"===t.field_type;return r&&(this.props.rule.value=fr("checked")),c().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},c().createElement("h4",{className:"fui-visibility-rule-header"},c().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},c().createElement("span",{className:"sui-icon-link fui-visibility-rule-icon","aria-hidden":"true"}),c().createElement("span",{className:"fui-visibility-rule-text"},c().createElement("strong",null,Dn(t.label))," ",kr(this.props.rule.rule,t.field_type)," ",c().createElement("strong",null,s)),c().createElement("span",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),c().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},c().createElement(zn,bp({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:fr("Field"),hasSearch:!0}),_.map(this.fields,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,bp({key:"visibility-condition-"+Js()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,label:fr("Condition (required)"),"data-placeholder":fr("Select rule"),hasSearch:!0}),c().createElement("option",null),"signature"===t.field_type&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is null")),c().createElement("option",{value:"is_not"},fr("Is not null"))),"signature"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is")),c().createElement("option",{value:"is_not"},fr("Is not"))),(t.isNumber||"rating"===t.field_type)&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is_great"},fr("Is greater than")),c().createElement("option",{value:"is_less"},fr("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"contains"},fr("Contains")),c().createElement("option",{value:"does_not_contain"},fr("Does not contain")),c().createElement("option",{value:"starts"},fr("Starts with")),c().createElement("option",{value:"ends"},fr("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"day_is"},fr("Day is")),c().createElement("option",{value:"day_is_not"},fr("Day is not"))),"date"===t.field_type&&"signature"!==t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"month_is"},fr("Month is")),c().createElement("option",{value:"month_is_not"},fr("Month is not"))))),c().createElement(Nn,{cols:"6"},c().createElement(Rr.Fragment,null,t.hasOptions&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select option")),_.map(t.values,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)))))),!t.hasOptions&&r&&c().createElement(Sn,bp({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("Status"),disabled:!0})),!t.hasOptions&&"signature"!==t.field_type&&!r&&(!["day_is","day_is_not","month_is","month_is_not"].includes(this.props.rule.rule)||"date"!==t.field_type)&&c().createElement(Sn,bp({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule||"month_is_not"===this.props.rule.rule)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],(e=>c().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)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],(e=>c().createElement("option",{value:e,key:e},e)))))))),c().createElement("div",{className:"fui-visibility-rule-footer"},c().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},fr("Done")))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},yp.apply(null,arguments)}class vp extends Rr.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=vr(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!_.contains(e,t.element_id)}));this.updateState(s)}render(){const e=c().createElement("div",{className:"fui-visibility-options"},c().createElement("div",{className:"fui-visibility-option"},c().createElement("span",{className:"sui-description",style:{marginRight:"10px"}},fr("Process behavior if ")),c().createElement($n,yp({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),c().createElement("span",{value:"all"},fr("All")),c().createElement("span",{value:"any"},fr("Any"))),c().createElement("span",{className:"sui-description"},fr("of the conditions below match.")))),t=c().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&c().createElement("div",{className:"fui-visibility-header"},e,c().createElement("label",{className:"sui-label"},fr("Conditions"))),c().createElement("div",{className:"fui-visibility"},c().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&c().createElement("button",{accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Conditions")),c().createElement("p",null,fr("Add conditions for when this behavior will be processed.")))));return(_.isUndefined(this.props.state.conditions)||0===this.props.state.conditions.length)&&Rr.Fragment,!_.isUndefined(this.props.state.conditions)&&this.props.state.conditions.length>0&&!_.isEmpty(this.fields)?c().createElement("div",{className:"fui-visibility-group"},(this.props.wrappers.length>1||this.fields.length>1)&&c().createElement("div",{className:"fui-visibility-header"},e,c().createElement("label",{className:"sui-label"},fr("Conditions"))),c().createElement("div",{className:"fui-visibility"},c().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,((e,t)=>c().createElement(gp,yp({},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})))))),c().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Condition"))):c().createElement(Rr.Fragment,null,t)}}function Ep(){return Ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ep.apply(null,arguments)}class _p extends Rr.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 vr(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",r=rr(),a=Object.values(r),n=Object.keys(r);return"email"!==e&&"manual"!==e||(s=e+"-"+s),c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-box-header"},c().createElement("h3",{id:"dialogTitle",className:"sui-box-title"},fr("After Submission")),c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"forminator-builder-fields-close",onClick:this.closeModal}))),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-tabs sui-tabs-flushed"},c().createElement("div",{className:"sui-tabs-menu"},c().createElement(da,{to:"/behaviour/behavior",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Behavior")),c().createElement(da,{to:"/behaviour/conditions/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Conditions"))),c().createElement(xt,null,c().createElement(_t,{path:"/behaviour/",element:c().createElement(Et,{to:"/behaviour/behavior",replace:!0})})),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content active"},c().createElement(xt,null,c().createElement(_t,{path:"/behaviour/behavior",element:c().createElement("div",{key:"behaviour-behaviour"},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,Ep({},this.props,{settings:this.state,label:fr("Label"),description:fr("Only used to identify this behavior, and not displayed to users."),placeholder:fr("E.g., Inline Message"),property:"label",updateProperty:this.updateProperty})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(ei,Ep({},this.props,{settings:this.state,updateProperty:this.updateProperty,property:"submission-behaviour",label:fr("Behavior"),default:n[0]}),c().createElement(ti,{value:n[0],boxClass:"sui-tab-boxed",label:a[0]},c().createElement(hi,Ep({},this.props,{settings:this.state,updateProperty:this.updateProperty,property:s,descriptionTop:fr("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"}),a[0]),c().createElement("div",{className:"sui-form-field"},c().createElement("div",{style:{display:"inline-block"}},c().createElement(yi,Ep({},this.props,{property:"autoclose",settings:this.state,updateProperty:this.updateProperty,defaultValue:"true",itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),c().createElement("span",{className:"sui-field-prefix sui-field-suffix",style:{fontWeight:"500",fontSize:"13px"}},fr("Auto-close success message after")),c().createElement(Sn,Ep({},this.props,{property:"autoclose-time",settings:this.state,updateProperty:this.updateProperty,placeholder:fr("E.g. 5"),inputClass:"sui-input-sm sui-field-has-suffix",disabled:!this.state.autoclose,simple:!0})),c().createElement("span",{className:"sui-field-suffix",style:{fontWeight:"500",fontSize:"13px"}},fr("seconds.")))),c().createElement(ti,{value:n[1],boxClass:"sui-tab-boxed",label:a[1]},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,Ep({},this.props,{placeholder:fr("https://www.mywebsite.com"),property:"redirect-url",settings:this.state,updateProperty:this.updateProperty,label:fr("Redirect URL"),boxClass:"sui-tab-boxed",customClass:"redirect-url",description:fr("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:c().createElement("strong",null)}})}),this.getNameOptions().map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label))))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(An,Ep({},this.props,{property:"newtab",settings:this.state,updateProperty:this.updateProperty,label:fr("Redirection Option"),itemClass:"sui-checkbox-stacked sui-checkbox-sm"}),c().createElement("option",{value:"sametab"},fr("Redirect on the same tab")),c().createElement("option",{value:"newtab_thankyou"},fr("Redirect on new tab and show thank you message on form page")),c().createElement("option",{value:"newtab_hide"},fr("Redirect on new tab and hide form on the form page")))))),c().createElement(ti,{value:n[2],boxClass:"sui-tab-boxed",label:a[2]},c().createElement(hi,Ep({},this.props,{property:s,settings:this.state,updateProperty:this.updateProperty,extraId:"-hide",descriptionTop:fr("Hide the form after submission, and display a success message to the user."),editorOptions:t,enableFormData:"true"}),fr("Submit Message")),c().createElement("div",{className:"sui-form-field"},c().createElement("div",{style:{display:"inline-block"}},c().createElement(yi,Ep({},this.props,{property:"autoclose",settings:this.state,updateProperty:this.updateProperty,defaultValue:"true",itemClass:"sui-checkbox-stacked sui-checkbox-sm"}))),c().createElement("span",{className:"sui-field-prefix sui-field-suffix",style:{fontWeight:"500",fontSize:"13px"}},fr("Auto-close success message after")),c().createElement(Sn,Ep({},this.props,{property:"autoclose-time",settings:this.state,updateProperty:this.updateProperty,defaultValue:"5",placeholder:fr("E.g. 5"),inputClass:"sui-input-sm sui-field-has-suffix",disabled:!this.state.autoclose,simple:!0})),c().createElement("span",{className:"sui-field-suffix",style:{fontWeight:"500",fontSize:"13px"}},fr("seconds."))))))))}),c().createElement(_t,{path:"/behaviour/conditions",element:c().createElement(vp,Ep({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button sui-button-ghost forminator-discard-field-settings",onClick:this.closeModal},c().createElement("i",{className:"sui-icon-close","aria-hidden":"true"}),fr("Cancel")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Apply")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),!1)))}}var xp=ga(_p);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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Np.apply(null,arguments)}class kp extends Rr.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=_.where(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?fr("null"):this.props.rule.value,r="consent"===t.field_type;return r&&(this.props.rule.value=fr("checked")),c().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},c().createElement("h4",{className:"fui-visibility-rule-header"},c().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},c().createElement("i",{className:"sui-icon-link fui-visibility-rule-icon","aria-hidden":"true"}),c().createElement("span",{className:"fui-visibility-rule-text"},c().createElement("strong",null,Dn(t.label))," ",kr(this.props.rule.rule,t.field_type)," ",c().createElement("strong",null,s)),c().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),c().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},c().createElement(An,Np({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:fr("Field")}),_.map(this.fields,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,Np({key:"visibility-condition-"+Js()},this.props,{elementId:e+"-condrule",settings:this.props.rule,property:"rule",updateProperty:this.updateRule,label:fr("Condition (required)"),options:this.disableSearch()}),c().createElement("option",{value:""},fr("Select rule")),"signature"===t.field_type&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is null")),c().createElement("option",{value:"is_not"},fr("Is not null"))),"signature"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is")),c().createElement("option",{value:"is_not"},fr("Is not"))),(t.isNumber||"rating"===t.field_type)&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is_great"},fr("Is greater than")),c().createElement("option",{value:"is_less"},fr("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"contains"},fr("Contains")),c().createElement("option",{value:"does_not_contain"},fr("Does not contain")),c().createElement("option",{value:"starts"},fr("Starts with")),c().createElement("option",{value:"ends"},fr("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"day_is"},fr("Day is")),c().createElement("option",{value:"day_is_not"},fr("Day is not"))),"date"===t.field_type&&"signature"!==t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&!r&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"month_is"},fr("Month is")),c().createElement("option",{value:"month_is_not"},fr("Month is not"))))),c().createElement(Nn,{cols:"6"},c().createElement(Rr.Fragment,null,t.hasOptions&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select option")),_.map(t.values,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(e.label)))))),!t.hasOptions&&r&&c().createElement(Sn,Np({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("Status"),disabled:!0})),!t.hasOptions&&"signature"!==t.field_type&&!r&&(!["day_is","day_is_not","month_is","month_is_not"].includes(this.props.rule.rule)||"date"!==t.field_type)&&c().createElement(Sn,Np({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule==="month_is"||"month_is_not"===this.props.rule.rule)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],(e=>c().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)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateValue.bind(this)},c().createElement("option",{value:""},fr("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],(e=>c().createElement("option",{value:e,key:e},e)))))))),c().createElement("div",{className:"fui-visibility-rule-footer"},c().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},fr("Done")))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Sp.apply(null,arguments)}class Cp extends Rr.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=vr(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,"slug"),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!_.contains(e,t.element_id)}));this.updateState(s)}render(){const e=c().createElement("div",{className:"fui-visibility-options"},c().createElement("div",{className:"fui-visibility-option"},c().createElement($n,Sp({},this.props,{settings:this.props.state,property:"condition_action",defaultValue:"send",noWrapper:!0}),c().createElement("span",{value:"send"},fr("Send")),c().createElement("span",{value:"dont-send"},fr("Don't Send"))),c().createElement("span",{className:"sui-description"},fr("data if"))),c().createElement("div",{className:"fui-visibility-option"},c().createElement($n,Sp({},this.props,{settings:this.props.state,property:"condition_rule",defaultValue:"all",noWrapper:!0}),c().createElement("span",{value:"all"},fr("All")),c().createElement("span",{value:"any"},fr("Any"))),c().createElement("span",{className:"sui-description"},fr("of the conditions below are met.")))),t=c().createElement("div",{className:"fui-visibility-header"},e,c().createElement("label",{className:"sui-label"},fr("Conditions"))),s=c().createElement("div",{className:"sui-description",style:{margin:"0 0 30px"}},fr("Use conditional logic to send data to this app based on submitted form data.")),r=c().createElement("div",{className:"fui-visibility-group"},s,(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&t,c().createElement("div",{className:"fui-visibility"},c().createElement("div",{className:"fui-visibility-empty-message"},(this.props.wrappers.length>1||this.fields.length>=1)&&!_.isEmpty(this.fields)&&c().createElement("button",{accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Conditions")),c().createElement("p",null,fr("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)?c().createElement("div",{className:"fui-visibility-group"},s,(this.props.wrappers.length>1||this.fields.length>1)&&t,c().createElement("div",{className:"fui-visibility"},c().createElement("div",{className:"fui-visibility-rules"},_.map(this.props.state.conditions,((e,t)=>c().createElement(kp,Sp({},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})))))),c().createElement("button",{className:"sui-button sui-button-blue",accessKey:"a",onClick:this.addRule},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Condition"))):c().createElement(Rr.Fragment,null,r)}}function Pp(){return Pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Pp.apply(null,arguments)}class Fp extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-box-header"},c().createElement("h3",{id:"dialogTitle",className:"sui-box-title"},fr("Conditions")),c().createElement("div",{className:"sui-actions-left"},c().createElement("span",{className:"sui-tag sui-tag-draft"},this.data.integrationTitle)),c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"forminator-builder-fields-close",onClick:this.closeModal}))),c().createElement("div",{className:"sui-box-body"},c().createElement(Cp,Pp({},this.props,{updateProperty:this.updateProperty,state:this.state}))),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button sui-button-ghost forminator-discard-field-settings",onClick:this.closeModal},c().createElement("i",{className:"sui-icon-close","aria-hidden":"true"}),fr("Cancel")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Apply")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}var Op=ga(Fp);class Dp extends Rr.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 c().createElement(Rr.Fragment,null,c().createElement(dn,{flatten:!0,alignment:"center",closeModal:this.closeModal,closeType:"icon",customClass:"sui-spacing-top--60"},c().createElement(hn,{id:"",label:fr("Delete Notification"),size:"lg"}),c().createElement("p",{id:"",className:"sui-description"},fr("Are you sure you wish to delete this Notification?"))),c().createElement(mn,{customClass:"sui-flatten sui-content-center"},c().createElement(pn,{label:fr("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),c().createElement("button",{className:"sui-button sui-button-ghost sui-button-red",onClick:this.trashField},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class Ap extends Rr.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};Na().post(forminatorData.ajaxUrl,Sa().stringify(e)).then((e=>{e.data.success?(this.showNotification("success",fr("PDF file successfully deleted.")),this.trashPDF(e.data.data)):this.showNotification("error",e.data)})).catch((e=>{this.showNotification("error",e)}))}showNotification(e,t){new Gr({type:e,text:"error"===e?fr("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 c().createElement(Rr.Fragment,null,c().createElement(dn,{flatten:!0,alignment:"center",closeModal:this.closeModal,closeType:"icon",customClass:"sui-spacing-top--60"},c().createElement(hn,{id:"forminator-delete-pdf-modal__title",label:fr("Delete PDF File"),size:"sm"}),c().createElement("p",{className:"sui-description"},fr("Are you sure you wish to delete"),c().createElement("b",null," ",this.data.pdf.pdfFilename,".pdf"),"?")),c().createElement(mn,{customClass:"sui-flatten sui-content-center"},c().createElement(pn,{label:fr("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost"}),c().createElement("button",{className:"sui-button sui-button-ghost sui-button-red pdf-delete-button",onClick:this.deletePdf},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class Tp extends Rr.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(),Ar(t),setTimeout((()=>{this.closeModal()}),500)}render(){const e=encodeURIComponent(forminatorData.siteUrl);return c().createElement(Rr.Fragment,null,c().createElement(dn,{alignment:"center",closeModal:this.closeModal,closeType:"icon",closeColor:"white",flatten:!0,imageName:"connect-to-wpmudev"},c().createElement(hn,{id:"forminator-delete-pdf-modal__title",label:fr("Access PDF Generator Add-on"),size:"lg"}),c().createElement("p",{className:"sui-description"},fr("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!"))),c().createElement("div",{className:"sui-box-body sui-content-center sui-spacing-bottom--20"},c().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}`)}},c().createElement("span",{className:"sui-loading-text"},fr("Connect to WPMU DEV")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))),c().createElement(mn,{customClass:"sui-flatten sui-content-center"},c().createElement("small",{style:{fontWeight:"500"}},fr("Already a member? {{link}}Connect site{{/link}}",{components:{link:c().createElement("a",{onClick:t=>{this.onClickCallback(t,`https://wpmudev.com/login/?signin=forminator-pdf-addon&forminator_url=${e}`)},target:"_blank"})}}))))}}function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},jp.apply(null,arguments)}class Mp extends Rr.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 vr(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 c().createElement(Rr.Fragment,null,t&&c().createElement("optgroup",{label:fr("Misc Data")},_.map(t,((e,t)=>c().createElement("option",{key:t,value:"{"+t+"}","data-content":"{"+t+"}"},e)))))}render(){const e=c().createElement(Rr.Fragment,null,c().createElement("optgroup",{label:fr("Site Information")},[{value:"{site_title}",label:"Site Title"},{value:"{site_url}",label:"Site URL"},{value:"{date_dmy}",label:"Date"}].map(((e,t)=>c().createElement("option",{key:t,value:e.value,"data-content":e.value},Dn(e.label))))),this.getMiscData());return c().createElement(Rr.Fragment,null,c().createElement(dn,{closeType:"icon",closeModal:this.closeModal},c().createElement(hn,{label:fr("Edit Field"),tag:fr("Header")})),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-tabs sui-tabs-flushed"},c().createElement("div",{className:"sui-tabs-menu"},c().createElement(da,{to:"/builder/settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Settings")),c().createElement(da,{to:"/builder/styling/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Styling"))),c().createElement(xt,null,c().createElement(_t,{path:"/builder/",element:c().createElement(Et,{to:"/builder/settings/",replace:!0})})),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content active"},c().createElement(xt,null,c().createElement(_t,{path:"/builder/settings",element:c().createElement("div",{key:"builder-settings",className:"sui-accordion sui-accordion-flushed",style:{marginTop:"-30px",marginBottom:"-30px"},value:"multiple"},c().createElement(ii,jp({},this.props,{settings:this.state,label:fr("Logo"),property:"pdf_logo_enabled",open:!0,updateProperty:this.updateProperty}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(ei,jp({},this.props,{label:fr("Logo Type"),property:"pdf_logo_type",default:"text",settings:this.state,updateProperty:this.updateProperty}),c().createElement(ti,{value:"text",label:fr("Text")},c().createElement("div",{style:{marginTop:"20px"}},c().createElement(wo,jp({},this.props,{label:fr("Logo Text"),settings:this.state,property:"pdf_logo_text",placeholder:fr("Value"),className:"sui-form-control",updateProperty:this.updateProperty}),e))),c().createElement(ti,{value:"image",label:fr("Image")},c().createElement("div",{style:{marginTop:"20px"}},c().createElement(ei,jp({},this.props,{label:fr("Logo image source"),property:"pdf_logo_image_type",default:"image_site_logo",settings:this.state,updateProperty:this.updateProperty}),c().createElement(ti,{value:"image_site_logo",label:fr("Use site logo")},c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block",marginTop:"20px"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Your site’s logo will be used as the logo for this PDF file."))))),!forminatorData.hasSiteLogo&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-yellow sui-active",style:{display:"block",marginTop:"20px"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Your site doesn’t have any logo image set. You can set a site logo or upload a new logo for your PDF file.")))))),c().createElement(ti,{value:"image_upload_logo",label:fr("Use logo image"),boxClass:"sui-tab-boxed"},c().createElement(Zi,jp({},this.props,{settings:this.state,updateProperty:this.updateProperty,type:"image",fieldClass:"sui-auto",property:"image_upload_logo_value",label:fr("Upload Image"),description:fr("Supported formats (.png, .gif, .jpg, and .svg). For best output, please upload an image with a height of 80px.")}))),c().createElement(ti,{value:"image_logo_url",label:fr("Logo URL"),boxClass:"sui-tab-boxed"},c().createElement(Sn,jp({},this.props,{property:"image_logo_url_value",settings:this.state,updateProperty:this.updateProperty,label:fr("Image URL"),placeholder:fr("E.g. https://domain.com/images/logo.png"),requiredError:fr("Please enter the image URL for the logo."),description:fr("For best output, image height is constrained to 80px. You can adjust this size using custom CSS.")}))))))))))),c().createElement(ii,jp({},this.props,{settings:this.state,label:fr("Title"),property:"pdf_title_enabled",open:!0,updateProperty:this.updateProperty}),c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(wo,jp({},this.props,{settings:this.state,property:"pdf_title",placeholder:fr("Value"),className:"sui-form-control",updateProperty:this.updateProperty}),e))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(ei,jp({},this.props,{label:fr("Title alignment"),property:"pdf_title_alignment",default:"left",settings:this.state,updateProperty:this.updateProperty}),c().createElement(si,{value:"left"},fr("Left")),c().createElement(si,{value:"center"},fr("Center")),c().createElement(si,{value:"right"},fr("Right"))))))))}),c().createElement(_t,{path:"/builder/styling",element:c().createElement(Hn,jp({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),c().createElement(mn,{alignment:"separated"},c().createElement(pn,{icon:"undo",label:fr("Discard Changes"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),c().createElement("button",{className:"sui-button forminator-save-field-settings",disabled:Or(this.state.pdf_title_enabled)&&_.isEmpty(this.state.pdf_title),onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Apply")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var Up=ga(Mp);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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ip.apply(null,arguments)}class $p extends Rr.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 vr(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 c().createElement(Rr.Fragment,null,c().createElement(dn,{closeType:"icon",closeModal:this.closeModal},c().createElement(hn,{label:fr("Edit Field"),tag:fr("Footer")})),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-tabs sui-tabs-flushed"},c().createElement("div",{className:"sui-tabs-menu"},c().createElement(da,{to:"/builder/settings/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Settings")),c().createElement(da,{to:"/builder/styling/",className:e=>{let{isActive:t}=e;return(t?"active ":"")+"sui-tab-item"}},fr("Styling"))),c().createElement(xt,null,c().createElement(_t,{path:"/builder/",element:c().createElement(Et,{to:"/builder/settings/",replace:!0})})),c().createElement("div",{className:"sui-tabs-content"},c().createElement("div",{className:"sui-tab-content active"},c().createElement(xt,null,c().createElement(_t,{path:"/builder/settings",element:c().createElement("div",{key:"builder-settings"},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(hi,Ip({},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:fr("Value"),updateProperty:this.updateProperty})))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Wi,Ip({},this.props,{settings:this.state,label:fr("Show page number"),property:"show_page_number",updateProperty:this.updateProperty,unWrap:!0})))))}),c().createElement(_t,{path:"/builder/styling",element:c().createElement(Hn,Ip({},this.props,{updateProperty:this.updateProperty,state:this.state}))})))))),c().createElement(mn,{alignment:"separated"},c().createElement(pn,{icon:"undo",label:fr("Discard Changes"),closeModal:this.closeModal,customClass:"sui-button-ghost forminator-discard-field-settings"}),c().createElement("button",{className:"sui-button forminator-save-field-settings",onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-check","aria-hidden":"true"}),fr("Apply")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}var Vp=ga($p);function Rp(){return Rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Rp.apply(null,arguments)}class Lp extends Rr.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}),Na().post(ajaxurl,Sa().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 Gr({type:"error",text:e.data||fr("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 c().createElement(Rr.Fragment,null,c().createElement(dn,{alignment:"center",closeModal:this.closeModal,closeType:"icon",flatten:!0,customClass:"sui-spacing-top--60"},c().createElement(hn,{id:"forminator-save-template-modal__title",label:fr("Save Template"),size:"lg"}),c().createElement("p",{className:"sui-description"},fr("Enter a name to save this form as a template or select an existing template to overwrite."))),c().createElement("div",{className:"sui-box-body sui-spacing-bottom--20"},c().createElement(ei,Rp({},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)}}),c().createElement(ti,{value:"form-template-name",boxClass:"sui-tab-boxed",label:fr("New Template")},c().createElement(Sn,Rp({},this.props,{type:"text",label:fr("Name"),placeholder:fr("E.g., Registration form template"),property:"form-template-name",updateProperty:(e,t)=>{this.updateProperty(e,t),this.onChange(t)}}))),c().createElement(ti,{value:"form-existing-template",boxClass:"sui-tab-boxed",label:fr("Update Existing Template")},c().createElement(zn,Rp({},this.props,{label:fr("Choose template"),property:"form-existing-template",hasSearch:e,updateProperty:(e,t)=>{this.updateProperty(e,t),this.onChange(t)},placeholder:fr("Select a template"),data:e?this.state.options:[{id:"searching",text:fr("Searching…"),disabled:!0}],loading:!e,fetchOptions:()=>this.getOptions}),c().createElement("option",null)),this.state.showLoadMore&&c().createElement("a",{href:"#",onClick:this.getOptions,style:{display:"block",marginTop:"-15px",marginBottom:"15px"}},fr("Load more")),c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block",marginTop:"-15px"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Warning! The selected template will be overwritten by this form.")))))))),c().createElement(mn,{customClass:"sui-flatten sui-content-center"},c().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},c().createElement("span",{class:"sui-loading-text"},c().createElement("span",{class:"sui-icon-save","aria-hidden":"true"}),fr("Save Template")),c().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class Bp extends Rr.Component{constructor(e){super(e),this.closeModal=this.closeModal.bind(this)}closeModal(){this.props.actions.modalActions.showModal({open:!1},"savedTemplateSuccessModal")}render(){return c().createElement(Rr.Fragment,null,c().createElement(dn,{alignment:"center",closeModal:this.closeModal,closeType:"icon",flatten:!0,customClass:"sui-spacing-top--60"},c().createElement("span",{class:"sui-icon-check sui-lg","aria-hidden":"true"}),c().createElement(hn,{id:"forminator-save-template-modal__title",label:fr("Template Saved"),size:"lg"}),c().createElement("p",{className:"sui-description"},fr("Template successfully saved to your Hub account. You can access the saved template in the "),c().createElement("a",{href:"admin.php?page=forminator-templates&tab=cloud",target:"_blank"},fr("Templates Page.")))),c().createElement(mn,{customClass:"sui-flatten sui-content-center"},c().createElement("button",{className:"sui-button sui-button-grey",onClick:this.closeModal},fr("Close"))))}}class zp extends Rr.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(),Ar(t),setTimeout((()=>{this.closeModal()}),500)}render(){return c().createElement(Rr.Fragment,null,c().createElement(dn,{alignment:"center",closeModal:this.closeModal,closeType:"icon",closeColor:"white",flatten:!0,imageName:"saved-form-template"},c().createElement(hn,{id:"forminator-save-pro-modal__title",label:forminatorData.hubConnectTitle,size:"lg",tagSize:"sm"}),c().createElement("p",{className:"sui-description"},forminatorData.hubConnectDescription)),c().createElement("div",{className:"sui-box-body sui-content-center sui-spacing-bottom--20"},c().createElement("a",{href:forminatorData.hubConnectUrl,className:"sui-button sui-button-icon-right sui-button-blue"},forminatorData.hubConnectButton)),c().createElement(mn,{customClass:"sui-flatten sui-content-center"}))}}class Wp extends Rr.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-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-track-hover","slider-track-border-hover","slider-track-fill-hover","slider-handle-hover","slider-handle-drag"]}applyProceed(){const{settings:e}=this.props,t=this,s=this.getColorFieldNames();_.forEach(s,(function(s){_.isUndefined(e[tr(t.props)+s])||delete e[tr(t.props)+s]})),this.props.actions.settingsActions.resetSettings(e),jQuery(".sui-accordion-item--open .sui-accordion-item-header").trigger("click"),this.closeModal()}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60",style:{paddingBottom:"0"}},c().createElement("button",{className:"sui-button-icon sui-button-float--right forminator-popup-close forminator-cancel-create-form","aria-label":fr("Close this dialog window"),onClick:this.closeModal},c().createElement("span",{className:"sui-icon-close sui-md","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Close this dialog window"))),c().createElement("h3",{className:"sui-box-title sui-lg",id:"dialogTitle"},fr("Clear Color Customization?")),c().createElement("span",{className:"sui-description",style:{marginTop:"15px"}},fr("Are you sure you want to clear your form's color customization? All customized color options will be lost."))),c().createElement("div",{className:"sui-box-footer sui-flatten sui-content-center",style:{paddingTop:"10"}},c().createElement(pn,{label:fr("Cancel"),closeModal:this.closeModal,customClass:"sui-button-ghost"}),c().createElement("button",{id:"forminator-apply-preset",className:"sui-button sui-button-gray",onClick:()=>this.applyProceed()},c().createElement("span",{className:"sui-button-text-default"},fr("Proceed")))))}}var qp={fieldsModal:En,settingsModal:$l,previewModal:Vl,submitModal:Bl,publishModal:zl,deleteModal:ql,shortcodeModal:Hl,applyPresetModal:Yl,paginationModal:Xl,notificationModal:fp,behaviorModal:xp,integrationConditionsModal:Op,deleteNotificationModal:Dp,deletePdfModal:Ap,accessPdfAddonModal:Tp,pageHeaderModal:Up,pageFooterModal:Vp,savedTemplateModal:Lp,savedTemplateProModal:zp,savedTemplateSuccessModal:Bp,clearColorCustomizationModal:Wp},Hp=a(7337),Qp=a.n(Hp);class Yp extends Rr.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,Rr.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=c().Children.only(this.props.children);return c().cloneElement(e,{ref:t=>{this.setFocusTrapElement(t),"function"==typeof e.ref&&e.ref(t)}})}}Yp.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:Qp()};const Gp=["renderTo"];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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Kp.apply(null,arguments)}const Jp={"insert-fields":qp.fieldsModal,"field-settings":qp.settingsModal,preview:qp.previewModal,submit:qp.submitModal,publish:qp.publishModal,delete:qp.deleteModal,shortcode:qp.shortcodeModal,applyPreset:qp.applyPresetModal,pagination:qp.paginationModal,notification:qp.notificationModal,behavior:qp.behaviorModal,integration:qp.integrationConditionsModal,deleteNotification:qp.deleteNotificationModal,deletePdf:qp.deletePdfModal,accessPdfAddon:qp.accessPdfAddonModal,pageHeader:qp.pageHeaderModal,pageFooter:qp.pageFooterModal,savedTemplateProModal:qp.savedTemplateProModal,savedTemplateModal:qp.savedTemplateModal,savedTemplateSuccessModal:qp.savedTemplateSuccessModal,clearColorCustomizationModal:qp.clearColorCustomizationModal};class Xp extends Rr.Component{constructor(e){super(e),this.modelRef=c().createRef()}componentDidUpdate(e){this.$el=jQuery(this.el);const t=this;if(e.modal.modalProps.open!==this.props.modal.modalProps.open){const e=this.modelRef.current;if(this.props.modal.modalProps.open){this.focusAfterClosed=this.props.modal.modalProps.activeElement;const e=this.props.modal.modalProps.focusFirst;setTimeout((function(){t.focusFirst="string"==typeof e?t.$el.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(){t.setFocus(t.focusAfterClosed)}),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)}componentWillUnmount(){clearTimeout(this.hideModalTimeout)}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,r=Jp[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"].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 a=jQuery(".sui-color-accessible").length?"sui-wrap sui-color-accessible":"sui-wrap";return c().createElement("div",{className:a},c().createElement("div",{id:"forminator-modal",className:`sui-modal sui-active ${e} ${s}`},c().createElement("div",Kp({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}),c().createElement("div",{className:"sui-box",style:{marginBottom:0}},c().createElement(r,this.props)))))}}const Zp=e=>{let{renderTo:t=document.body}=e,s=function(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;s[r]=e[r]}return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],t.includes(s)||{}.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}(e,Gp);return(0,Rr.createPortal)(c().createElement(Xp,s),t)};Zp.renderTo=function(e){return t=>c().createElement(Zp,Kp({},t,{renderTo:e}))};var ec=Zp;const tc=e=>t=>{t({type:"UPDATE_PDFS",pdfs:e})};var sc=le((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:Tt(t,s),builderActions:Tt(r,s),settingsActions:Tt(e,s),integrationActions:Tt(n,s),behaviorsActions:Tt(i,s),notificationsActions:Tt(o,s),pdfsActions:Tt(l,s)}}}))(ec);class rc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement("div",{className:"sui-notice sui-notice-info"},c().createElement("p",null,fr("This form will inherit its styles from your WordPress theme. You can always overwrite those styles anytime with the settings below.")))}}class ac extends Rr.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.settings[this.props.property])?this.props.defaultValue:this.props.settings[this.props.property],t=c().Children.map(this.props.children,(t=>{const s=c().createElement(Rr.Fragment,null,c().createElement("span",{tabIndex:"-1",className:"fui-demo-form","data-design":t.props.value,"aria-hidden":"true"},c().createElement("span",{className:"fui-demo-form--field"},"material"!==t.props.value&&c().createElement("span",{className:"fui-demo-form--label"},fr("Field Label")),c().createElement("span",{className:"fui-demo-form--input"},"material"===t.props.value?fr("Field Label"):fr("Placeholder"))),c().createElement("span",{className:"fui-demo-form--field"},c().createElement("span",{className:"fui-demo-form--label"},fr("Field Label")),c().createElement("span",{className:"fui-demo-form--input fui-is_filled"},fr("Text"))))),r=c().createElement("span",{className:"sui-radio sui-radio-sm sui-radio-stacked"},c().createElement("input",{type:"radio",name:`forminator-${this.props.value}`,value:t.props.value,id:`forminator-field-${t.props.value}`,checked:e===t.props.value,onChange:this.updateValue.bind(this,t.props.value)}),c().createElement("span",{"aria-hidden":"true"}),c().createElement("span",null,t.props.label));return c().createElement("label",{htmlFor:`forminator-field-${t.props.value}`,className:"fui-subdesign-option"+(e===t.props.value?" fui-selected":"")},c().createElement("span",{className:"fui-subdesign-option--wrapper"},s,r))}));let s="";return this.props.label&&""!==this.props.label&&(s=c().createElement("label",{className:"sui-label"},this.props.label,this.props.note&&c().createElement("span",{className:"sui-label-note"},this.props.note))),c().createElement(Rr.Fragment,null,c().createElement("div",{role:"radiogroup",className:"sui-form-field fui-subdesign-options"},s,t))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},nc.apply(null,arguments)}class ic extends Rr.Component{constructor(e){super(e)}render(){let e="default";switch(this.props.formSubDesign){case"default":case"flat":case"bold":case"material":e=this.props.formSubDesign}return c().createElement(ac,nc({},this.props,{defaultValue:e,property:"form-substyle"}),c().createElement("div",{value:"default",label:fr("Default")}),c().createElement("div",{value:"flat",label:fr("Flat")}),c().createElement("div",{value:"bold",label:fr("Bold")}),c().createElement("div",{value:"material",label:fr("Material")}))}}class oc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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 lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},lc.apply(null,arguments)}class pc extends Rr.Component{render(){return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Design Style")),c().createElement("span",{className:"sui-description"},fr("Choose a pre-made style for your form and further customize it's appearance below."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(ei,lc({},this.props,{property:"form-style",default:"default"}),c().createElement(ic,lc({value:"default",boxClass:"sui-tab-content sui-tab-boxed"},this.props),fr("Forminator Styles")),c().createElement(rc,{value:"basic",boxClass:"sui-tab-content sui-tab-boxed"},fr("Basic Styles")),c().createElement(oc,{value:"none",boxClass:"sui-tab-content"},fr("None")))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},cc.apply(null,arguments)}class uc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active","aria-live":"assertive",style:{display:"block"}},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Note: If value is empty or zero, image will fallback to default size."))))),c().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},c().createElement(Nn,{cols:"3"},c().createElement(Sn,cc({},this.props,{label:fr("Width"),type:"number",placeholder:"0",defaultValue:70,property:`${tr(this.props)}field-image-width`}))),c().createElement(Nn,{cols:"3"},c().createElement(Sn,cc({},this.props,{label:fr("Height"),type:"number",placeholder:"0",defaultValue:70,property:`${tr(this.props)}field-image-height`})))),c().createElement("span",{className:"sui-description"},fr("Set your custom dimensions in pixels.")))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},dc.apply(null,arguments)}class mc extends Rr.Component{render(){return c().createElement(Qn,{label:fr("Layout"),labelDark:!0,description:fr("Adjust the layout of fields.")},c().createElement("label",{className:"sui-settings-label"},fr("Field description position")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Select the default position for field descriptions. You can override this setting in each individual field.")),c().createElement(zn,dc({},this.props,{property:"description-position",defaultValue:"below",fieldsize:"md"}),c().createElement("option",{value:"above"},fr("Above Inputs")),c().createElement("option",{value:"below"},fr("Below Inputs"))),c().createElement(ei,dc({},this.props,{property:`${tr(this.props)}field-image-size`,default:"custom",settingsLabel:fr("Radio/Checkbox Image Size"),description:fr("Set radio/checkbox image size.")}),c().createElement(si,{value:"auto"},fr("Automatic")),c().createElement(uc,dc({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),fr("Custom"))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},hc.apply(null,arguments)}class fc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(Fo,hc({},this.props,{defaultValue:`${Zs(this.props,"#00000000")}`,property:`${tr(this.props)}cform-form-border`,label:fr("Border color"),isAlpha:!0})),c().createElement(Fo,hc({},this.props,{defaultValue:`${Zs(this.props,"#00000000")}`,property:`${tr(this.props)}cform-form-background`,label:fr("Background color"),isAlpha:!0})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},bc.apply(null,arguments)}class gc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(Fo,bc({},this.props,{defaultValue:`${Zs(this.props,"#777771")}`,property:`${tr(this.props)}cform-label-color`,label:fr("Label")})),c().createElement(Fo,bc({},this.props,{defaultValue:`${Zs(this.props,"#E04562",!0)}`,property:`${tr(this.props)}cform-asterisk-color`,label:fr("Required asterisk")})),c().createElement(Fo,bc({},this.props,{defaultValue:`${Zs(this.props,"#777771")}`,property:`${tr(this.props)}label-helper-color`,label:fr("Description")})),"material"!==this.props.formDesign&&c().createElement(Fo,bc({},this.props,{defaultValue:`${Zs(this.props,"#F9E4E8",!0)}`,property:`${tr(this.props)}label-validation-background`,label:fr("Error message BG"),isAlpha:!0})),c().createElement(Fo,bc({},this.props,{defaultValue:`${Zs(this.props,"#E04562",!0)}`,property:`${tr(this.props)}label-validation-color`,label:"material"!==this.props.formDesign?fr("Error message color"):fr("Global error color"),description:"material"===this.props.formDesign?fr("This color will be used when fields throw an error as text color, border color, etc."):""})))}}function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},yc.apply(null,arguments)}class vc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,"material"!==this.props.formDesign&&c().createElement(Fo,yc({},this.props,{defaultValue:`${Zs(this.props,"#F8F8F8",!0)}`,property:`${tr(this.props)}response-loading-background`,label:fr("Background color"),isAlpha:!0})),c().createElement(Fo,yc({},this.props,{defaultValue:`${Zs(this.props,"#666666")}`,property:`${tr(this.props)}response-loading-color`,label:fr("Text color")})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ec.apply(null,arguments)}class _c extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,"flat"!==this.props.formDesign&&c().createElement(Fo,Ec({},this.props,{defaultValue:`${Zs(this.props,"#E04562",!0)}`,property:`${tr(this.props)}response-error-border`,label:fr("Border color"),isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,Ec({},this.props,{defaultValue:`${Zs(this.props,"#F9E4E8",!0)}`,property:`${tr(this.props)}response-error-background`,label:fr("Background color"),isAlpha:!0})),c().createElement(Fo,Ec({},this.props,{defaultValue:`${Zs(this.props,"#333333")}`,property:`${tr(this.props)}response-error-color`,label:fr("Text color")})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},wc.apply(null,arguments)}class xc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,"flat"!==this.props.formDesign&&c().createElement(Fo,wc({},this.props,{defaultValue:`${Zs(this.props,"#1ABCA1",!0)}`,property:`${tr(this.props)}response-success-border`,label:fr("Border color"),isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,wc({},this.props,{defaultValue:`${Zs(this.props,"#BCEEE6",!0)}`,property:`${tr(this.props)}response-success-background`,label:fr("Background color"),isAlpha:!0})),c().createElement(Fo,wc({},this.props,{defaultValue:`${Zs(this.props,"#333333")}`,property:`${tr(this.props)}response-success-color`,label:fr("Text color")})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Nc.apply(null,arguments)}class kc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(Fo,Nc({},this.props,{label:fr("Title color"),property:`${tr(this.props)}cform-title-color`,defaultValue:`${Zs(this.props,"#333333")}`})),c().createElement(Fo,Nc({},this.props,{label:fr("Subtitle color"),property:`${tr(this.props)}cform-subtitle-color`,defaultValue:`${Zs(this.props,"#333333")}`})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Sc.apply(null,arguments)}class Cc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},"flat"!==this.props.formDesign&&c().createElement(Fo,Sc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}input-border`,defaultValue:`${Zs(this.props,"#777771")}`,isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,Sc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}input-bg`,defaultValue:`${Zs(this.props,"#EDEDED")}`,isAlpha:!0})),c().createElement(Fo,Sc({},this.props,{label:fr("Placeholder"),property:`${tr(this.props)}input-placeholder`,defaultValue:`${Zs(this.props,"#888888")}`})),c().createElement(Fo,Sc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}input-color`,defaultValue:`${Zs(this.props,"#000000")}`}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},"flat"!==this.props.formDesign&&c().createElement(Fo,Sc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}input-border-hover`,defaultValue:`${Zs(this.props,"#17A8E3")}`,isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,Sc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}input-hover-bg`,defaultValue:`${Zs(this.props,"#E6E6E6")}`,isAlpha:!0})),c().createElement(Fo,Sc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}input-hover-color`,defaultValue:`${Zs(this.props,"#000000")}`}))),c().createElement(ti,{label:fr("Focus"),value:"focus"},"flat"!==this.props.formDesign&&c().createElement(Fo,Sc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}input-border-active`,defaultValue:`${Zs(this.props,"#17A8E3")}`,isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,Sc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}input-active-bg`,defaultValue:`${Zs(this.props,"#E6E6E6")}`,isAlpha:!0})),c().createElement(Fo,Sc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}input-active-color`,defaultValue:`${Zs(this.props,"#000000")}`}))),"material"!==this.props.formDesign&&c().createElement(ti,{label:fr("Error"),value:"error"},c().createElement(Fo,Sc({},this.props,{defaultValue:`${Zs(this.props,"#E04562")}`,property:`${tr(this.props)}input-border-error`,label:fr("Border color"),isAlpha:!0}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Pc.apply(null,arguments)}class Fc extends Rr.Component{constructor(e){super(e)}render(){const e=Pr(this.props.wrappers,"date","field_type","picker"),t=or("calculation",this.props.wrappers),s=or("currency",this.props.wrappers),r=or("stripe",this.props.wrappers)||or("stripe-ocs",this.props.wrappers);let a=c().createElement(Rr.Fragment,null,(e||r)&&c().createElement(Fo,Pc({},this.props,{property:`${tr(this.props)}input-icon`,defaultValue:`${Zs(this.props,"#777771")}`,label:fr("Icon color")})),t&&c().createElement(Fo,Pc({},this.props,{property:`${tr(this.props)}prefix-color`,defaultValue:`${Zs(this.props,"#000000")}`,label:fr("Prefix color")})),(s||t)&&c().createElement(Fo,Pc({},this.props,{property:`${tr(this.props)}suffix-color`,defaultValue:`${Zs(this.props,"#000000")}`,label:fr("Suffix color")})));return r&&(a=c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},(e||r)&&c().createElement(Fo,Pc({},this.props,{property:`${tr(this.props)}input-icon`,defaultValue:`${Zs(this.props,"#777771")}`,label:fr("Icon color")})),t&&c().createElement(Fo,Pc({},this.props,{property:`${tr(this.props)}prefix-color`,defaultValue:`${Zs(this.props,"#000000")}`,label:fr("Prefix color")})),(s||t)&&c().createElement(Fo,Pc({},this.props,{property:`${tr(this.props)}suffix-color`,defaultValue:`${Zs(this.props,"#000000")}`,label:fr("Suffix color")}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},r&&c().createElement(Fo,Pc({},this.props,{property:`${tr(this.props)}input-icon-hover`,defaultValue:`${Zs(this.props,"#17A8E3")}`,label:fr("Icon color")}))),c().createElement(ti,{label:fr("Focus"),value:"focus"},r&&c().createElement(Fo,Pc({},this.props,{property:`${tr(this.props)}input-icon-focus`,defaultValue:`${Zs(this.props,"#17A8E3")}`,label:fr("Icon color")}))))),a}}function Oc(){return Oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Oc.apply(null,arguments)}class Dc extends Rr.Component{constructor(e){super(e)}render(){const e="basic"===this.props.formDesign;return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},"flat"!==this.props.formDesign&&!e&&c().createElement(Fo,Oc({},this.props,{defaultValue:`${Zs(this.props,"#777771",!0)}`,property:`${tr(this.props)}radio-border-static`,label:fr("Border color"),isAlpha:!0})),!e&&c().createElement(Fo,Oc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}radio-background-static`,defaultValue:`${Zs(this.props,"#EDEDED",!0)}`,isAlpha:!0})),c().createElement(Fo,Oc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}radio-label`,defaultValue:`${Zs(this.props,"#000000")}`})),"flat"!==this.props.formDesign||"material"!==this.props.formDesign&&c().createElement(Fo,Oc({},this.props,{label:fr("Image border"),property:`${tr(this.props)}radio-image-border-static`,defaultValue:`${Zs(this.props,"#777771",!0)}`,isAlpha:!0})),"material"!==this.props.formDesign&&!e&&c().createElement(Fo,Oc({},this.props,{label:fr("Image background"),property:`${tr(this.props)}radio-image-background`,defaultValue:`${Zs(this.props,"#EDEDED",!0)}`,isAlpha:!0}))),!e&&c().createElement(ti,{label:fr("Checked"),value:"checked"},"flat"!==this.props.formDesign&&c().createElement(Fo,Oc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}radio-border-active`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),c().createElement(Fo,Oc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}radio-background-active`,defaultValue:`${Zs(this.props,"#EDEDED",!0)}`,isAlpha:!0})),c().createElement(Fo,Oc({},this.props,{label:fr("Icon color"),property:`${tr(this.props)}radio-icon`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`})),"flat"!==this.props.formDesign||"material"!==this.props.formDesign&&c().createElement(Fo,Oc({},this.props,{label:fr("Image border"),property:`${tr(this.props)}radio-image-border-active`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,Oc({},this.props,{label:fr("Image background"),property:`${tr(this.props)}radio-image-background-active`,defaultValue:`${Zs(this.props,"#E1F6FF",!0)}`,isAlpha:!0}))),"material"!==this.props.formDesign&&!e&&c().createElement(ti,{label:fr("Error"),value:"error"},"flat"!==this.props.formDesign&&c().createElement(Fo,Oc({},this.props,{defaultValue:`${Zs(this.props,"#E04562",!0)}`,property:`${tr(this.props)}radio-border-error`,label:fr("Border color"),isAlpha:!0})),"flat"===this.props.formDesign&&c().createElement(Fo,Oc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}radio-background-error`,defaultValue:`${Zs(this.props,"#F9E4E8",!0)}`,isAlpha:!0}))))}}function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ac.apply(null,arguments)}class Tc extends Rr.Component{constructor(e){super(e)}render(){const e="basic"===this.props.formDesign;return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},"flat"!==this.props.formDesign&&!e&&c().createElement(Fo,Ac({},this.props,{defaultValue:`${Zs(this.props,"#777771",!0)}`,property:`${tr(this.props)}consent-cbox-border-static`,label:fr("Border color"),isAlpha:!0})),!e&&c().createElement(Fo,Ac({},this.props,{label:fr("Background color"),property:`${tr(this.props)}consent-cbox-background-static`,defaultValue:`${Zs(this.props,"#EDEDED",!0)}`,isAlpha:!0})),c().createElement(Fo,Ac({},this.props,{label:fr("Text color"),property:`${tr(this.props)}consent-cbox-label`,defaultValue:`${Zs(this.props,"#000000")}`}))),!e&&c().createElement(ti,{label:fr("Checked"),value:"checked"},"flat"!==this.props.formDesign&&c().createElement(Fo,Ac({},this.props,{label:fr("Border color"),property:`${tr(this.props)}consent-cbox-border-active`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),c().createElement(Fo,Ac({},this.props,{label:fr("Background color"),property:`${tr(this.props)}consent-cbox-background-active`,defaultValue:`${Zs(this.props,"#EDEDED",!0)}`,isAlpha:!0})),c().createElement(Fo,Ac({},this.props,{label:fr("Icon color"),property:`${tr(this.props)}consent-cbox-icon`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`}))),"material"!==this.props.formDesign&&!e&&c().createElement(ti,{label:fr("Error"),value:"error"},"flat"!==this.props.formDesign&&c().createElement(Fo,Ac({},this.props,{defaultValue:`${Zs(this.props,"#E04562",!0)}`,property:`${tr(this.props)}consent-cbox-border-error`,label:fr("Border color"),isAlpha:!0})),"flat"===this.props.formDesign&&c().createElement(Fo,Ac({},this.props,{label:fr("Background color"),property:`${tr(this.props)}consent-cbox-background-error`,defaultValue:`${Zs(this.props,"#F9E4E8",!0)}`,isAlpha:!0}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},jc.apply(null,arguments)}class Mc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},"flat"!==this.props.formDesign&&c().createElement(Fo,jc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}select-border-static`,defaultValue:`${Zs(this.props,"#777771",!0)}`,isAlpha:!0})),c().createElement(Fo,jc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}select-background-static`,defaultValue:`${Zs(this.props,"#EDEDED",!0)}`,isAlpha:!0})),c().createElement(Fo,jc({},this.props,{label:fr("Icon color"),property:`${tr(this.props)}select-icon-static`,defaultValue:`${Zs(this.props,"#777771",!0)}`})),c().createElement(Fo,jc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}select-value-static`,defaultValue:`${Zs(this.props,"#000000",!0)}`}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},"flat"!==this.props.formDesign&&c().createElement(Fo,jc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}select-border-hover`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,jc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}select-background-hover`,defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),c().createElement(Fo,jc({},this.props,{label:fr("Icon color"),property:`${tr(this.props)}select-icon-hover`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`})),c().createElement(Fo,jc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}select-value-hover`,defaultValue:`${Zs(this.props,"#000000",!0)}`}))),c().createElement(ti,{label:fr("Focus"),value:"focus"},"flat"!==this.props.formDesign&&c().createElement(Fo,jc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}select-border-active`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,jc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}select-background-active`,defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),c().createElement(Fo,jc({},this.props,{label:fr("Icon color"),property:`${tr(this.props)}select-icon-active`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`})),c().createElement(Fo,jc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}select-value-active`,defaultValue:`${Zs(this.props,"#000000",!0)}`}))),"material"!==this.props.formDesign&&c().createElement(ti,{label:fr("Error"),value:"error"},c().createElement(Fo,jc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}select-border-error`,defaultValue:`${Zs(this.props,"#E04562",!0)}`,isAlpha:!0}))))}}function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Uc.apply(null,arguments)}class Ic extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},"flat"!==this.props.formDesign&&"material"!==this.props.formDesign&&c().createElement(Fo,Uc({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}dropdown-border`,label:fr("Container border"),isAlpha:!0})),c().createElement(Fo,Uc({},this.props,{defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`,property:`${tr(this.props)}dropdown-background`,label:fr("Container BG"),isAlpha:!0})),c().createElement(Fo,Uc({},this.props,{defaultValue:`${Zs(this.props,"#777771",!0)}`,property:`${tr(this.props)}dropdown-option-color-static`,label:fr("Option color")}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},c().createElement(Fo,Uc({},this.props,{defaultValue:`${Zs(this.props,"#DDDDDD",!0)}`,property:`${tr(this.props)}dropdown-option-background-hover`,label:fr("Option background"),isAlpha:!0})),c().createElement(Fo,Uc({},this.props,{defaultValue:`${Zs(this.props,"#000000",!0)}`,property:`${tr(this.props)}dropdown-option-color-hover`,label:fr("Option color")}))),c().createElement(ti,{label:fr("Selected"),value:"selected"},c().createElement(Fo,Uc({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}dropdown-option-background-active`,label:fr("Option background"),isAlpha:!0})),c().createElement(Fo,Uc({},this.props,{defaultValue:`${Zs(this.props,"#FFFFFF",!0)}`,property:`${tr(this.props)}dropdown-option-color-active`,label:fr("Option color")}))))}}function $c(){return $c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},$c.apply(null,arguments)}class Vc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,"flat"!==this.props.formDesign&&"material"!==this.props.formDesign&&c().createElement(Fo,$c({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3")}`,property:`${tr(this.props)}dropdown-search-border`,label:fr("Border color"),isAlpha:!0})),c().createElement(Fo,$c({},this.props,{defaultValue:`${Zs(this.props,"#FFFFFF")}`,property:`${tr(this.props)}dropdown-search-background`,label:fr("Background color"),isAlpha:!0})),c().createElement(Fo,$c({},this.props,{defaultValue:`${Zs(this.props,"#000000")}`,property:`${tr(this.props)}dropdown-search-color`,label:fr("Text color")})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Rc.apply(null,arguments)}class Lc extends Rr.Component{constructor(e){super(e)}render(){const e=Pr(this.props.wrappers,"select","multiselect_style","modern");let t=Pr(this.props.wrappers,"select","multiselect_style","standard");return!1===e&&!1===t&&(t=!0),c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},t&&c().createElement(Qn,null,"flat"!==this.props.formDesign&&c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#777771",!0)}`,property:`${tr(this.props)}multiselect-border`,label:"material"!==this.props.formDesign?fr("Container border"):fr("Option border"),isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`,property:`${tr(this.props)}multiselect-background`,label:fr("Container BG"),isAlpha:!0})),c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#777771",!0)}`,property:`${tr(this.props)}multiselect-item-color-static`,label:fr("Option color")}))),e&&c().createElement(Qn,null,c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#888888",!0)}`,property:`${tr(this.props)}multiselect-tag-background-static`,label:fr("Tag background color")})),c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#FFFFFF",!0)}`,property:`${tr(this.props)}multiselect-tag-color-static`,label:fr("Tag text color")})),c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#FFFFFF",!0)}`,property:`${tr(this.props)}multiselect-tag-remove-color-static`,label:fr("Remove tag color")})))),t&&c().createElement(ti,{label:fr("Hover"),value:"hover"},"material"===this.props.formDesign&&c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#000000",!0)}`,property:`${tr(this.props)}multiselect-border-hover`,label:fr("Option border"),isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#DDDDDD",!0)}`,property:`${tr(this.props)}multiselect-item-bg-hover`,label:fr("Option background"),isAlpha:!0})),c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#000000",!0)}`,property:`${tr(this.props)}multiselect-item-color-hover`,label:fr("Option color")}))),t&&c().createElement(ti,{label:fr("Selected"),value:"selected"},"material"===this.props.formDesign&&c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}multiselect-border-active`,label:fr("Option border"),isAlpha:!0})),"material"!==this.props.formDesign&&c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}multiselect-item-bg-active`,label:fr("Option background"),isAlpha:!0})),c().createElement(Fo,Rc({},this.props,{defaultValue:"material"!==this.props.formDesign?Zs(this.props,"#FFFFFF",!0):Zs(this.props,"#17A8E3",!0),property:`${tr(this.props)}multiselect-item-color-active`,label:fr("Option color")}))),t&&"material"!==this.props.formDesign&&c().createElement(ti,{label:fr("Error"),value:"error"},c().createElement(Fo,Rc({},this.props,{defaultValue:`${Zs(this.props,"#E04562",!0)}`,property:`${tr(this.props)}multiselect-border-error`,label:fr("Container border"),isAlpha:!0}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Bc.apply(null,arguments)}class zc extends Rr.Component{constructor(e){super(e)}render(){const e=this.props.formDesign,t=tr(this.props);this.props.settings[`${t}cform-color-option`];return c().createElement(oi,{default:"container",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Container"),value:"container"},"flat"!==e&&c().createElement(Fo,Bc({},this.props,{label:fr(""!==e?"Border":"Header background"),property:`${tr(this.props)}calendar-border`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),c().createElement(Fo,Bc({},this.props,{label:fr(""!==e?"Background":"Main background"),property:`${tr(this.props)}calendar-background`,defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`,isAlpha:!0}))),c().createElement(ti,{label:fr("Navigation"),value:"navigation"},"material"!==e&&c().createElement(Fo,Bc({},this.props,{label:fr("Arrows background"),property:`${tr(this.props)}calendar-arrows-bg`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),c().createElement(Fo,Bc({},this.props,{label:fr("Arrows color"),property:`${tr(this.props)}calendar-arrows-static`,defaultValue:`${Zs(this.props,"#FFFFFF",!0)}`,isAlpha:!0}))),c().createElement(ti,{label:fr("Select"),value:"select"},"flat"!==e&&c().createElement(Fo,Bc({},this.props,{label:fr("Border"),property:`${tr(this.props)}calendar-select-border`,defaultValue:`${Zs(this.props,"#BBBBBB",!0)}`,isAlpha:!0})),c().createElement(Fo,Bc({},this.props,{label:fr("Background"),property:`${tr(this.props)}calendar-select-bg`,defaultValue:`${Zs(this.props,"#FFFFFF",!0)}`,isAlpha:!0})),c().createElement(Fo,Bc({},this.props,{label:fr("Color"),property:`${tr(this.props)}calendar-select-color`,defaultValue:`${Zs(this.props,"#777771",!0)}`,isAlpha:!0}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Wc.apply(null,arguments)}class qc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{value:"default",label:fr("Default")},"flat"!==this.props.formDesign&&c().createElement(Fo,Wc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}signature-border-default`,defaultValue:`${Zs(this.props,"#777771",!0)}`})),"material"!==this.props.formDesign&&c().createElement(Fo,Wc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}signature-background-default`,defaultValue:`${Zs(this.props,"#EDEDED",!0)}`})),c().createElement(Fo,Wc({},this.props,{label:fr("Placeholder"),property:`${tr(this.props)}signature-placeholder`,defaultValue:`${Zs(this.props,"#888888")}`})),c().createElement(Fo,Wc({},this.props,{label:fr("Signature Color"),property:`${tr(this.props)}signature-color`,defaultValue:`${Zs(this.props,"#000000",!0)}`})),c().createElement(Fo,Wc({},this.props,{label:fr("Reset icon color"),property:`${tr(this.props)}signature-reset-icon-default`,defaultValue:`${Zs(this.props,"#888888",!0)}`}))),c().createElement(ti,{value:"hover",label:fr("Hover")},"flat"!==this.props.formDesign&&c().createElement(Fo,Wc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}signature-border-hover`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`})),"material"!==this.props.formDesign&&c().createElement(Fo,Wc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}signature-background-hover`,defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`})),c().createElement(Fo,Wc({},this.props,{label:fr("Reset icon color"),property:`${tr(this.props)}signature-reset-icon-hover`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`}))),c().createElement(ti,{value:"error",label:fr("Error")},c().createElement(Fo,Wc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}signature-border-error`,defaultValue:`${Zs(this.props,"#E04562",!0)}`}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Hc.apply(null,arguments)}class Qc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(Fo,Hc({},this.props,{defaultValue:`${Zs(this.props,"rgba(248,248,248,.5)",!0)}`,property:`${tr(this.props)}group-background`,label:fr("Background color"),isAlpha:!0})),c().createElement(Fo,Hc({},this.props,{defaultValue:`${Zs(this.props,"rgba(221,221,221,.5)",!0)}`,property:`${tr(this.props)}group-border`,label:fr("Border color"),isAlpha:!0})),c().createElement(Fo,Hc({},this.props,{defaultValue:`${Zs(this.props,"rgba(170,170,170,.5)",!0)}`,property:`${tr(this.props)}group-divider`,label:fr("Divider color"),isAlpha:!0})))}}function Yc(){return Yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Yc.apply(null,arguments)}class Gc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement("div",{className:"sui-box"},c().createElement(gi,Yc({},this.props,{label:fr("Button")}),c().createElement(oi,{default:"default",extraClass:"sui-tabs-flushed",type:"tabs"},c().createElement(ti,{value:"default",label:fr("Default")},c().createElement(Fo,Yc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}repeater-button-background`,defaultValue:`${Zs(this.props,"#F8F8F8")}`})),c().createElement(Fo,Yc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}repeater-button`,defaultValue:`${Zs(this.props,"#666666")}`})),c().createElement(Fo,Yc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}repeater-border`,defaultValue:`${Zs(this.props,"#AAAAAA")}`}))),c().createElement(ti,{value:"hover",label:fr("Hover")},c().createElement(Fo,Yc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}repeater-button-background-hover`,defaultValue:`${Zs(this.props,"#F1F1F1")}`})),c().createElement(Fo,Yc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}repeater-button-hover`,defaultValue:`${Zs(this.props,"#666666")}`})),c().createElement(Fo,Yc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}repeater-border-hover`,defaultValue:`${Zs(this.props,"#AAAAAA")}`}))),c().createElement(ti,{value:"focus",label:fr("Focus")},c().createElement(Fo,Yc({},this.props,{label:fr("Background color"),property:`${tr(this.props)}repeater-button-background-focus`,defaultValue:`${Zs(this.props,"#F1F1F1")}`})),c().createElement(Fo,Yc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}repeater-button-focus`,defaultValue:`${Zs(this.props,"#666666")}`})),c().createElement(Fo,Yc({},this.props,{label:fr("Border color"),property:`${tr(this.props)}repeater-border-focus`,defaultValue:`${Zs(this.props,"#AAAAAA")}`}))))),c().createElement(gi,Yc({},this.props,{label:fr("Icon")}),c().createElement(oi,{default:"default",extraClass:"sui-tabs-flushed",type:"tabs"},c().createElement(ti,{value:"default",label:fr("Default")},c().createElement(Fo,Yc({},this.props,{label:fr("Color"),property:`${tr(this.props)}repeater-icon`,defaultValue:`${Zs(this.props,"#888888")}`}))),c().createElement(ti,{value:"hover",label:fr("Hover")},c().createElement(Fo,Yc({},this.props,{label:fr("Color"),property:`${tr(this.props)}repeater-icon-hover`,defaultValue:`${Zs(this.props,"#888888")}`}))),c().createElement(ti,{value:"focus",label:fr("Focus")},c().createElement(Fo,Yc({},this.props,{label:fr("Color"),property:`${tr(this.props)}repeater-icon-focus`,defaultValue:`${Zs(this.props,"#888888")}`}))))),c().createElement(gi,Yc({},this.props,{label:fr("Link")}),c().createElement(oi,{default:"default",extraClass:"sui-tabs-flushed",type:"tabs"},c().createElement(ti,{value:"default",label:fr("Default")},c().createElement(Fo,Yc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}repeater-link`,defaultValue:`${Zs(this.props,"#17A8E3")}`}))),c().createElement(ti,{value:"hover",label:fr("Hover")},c().createElement(Fo,Yc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}repeater-link-hover`,defaultValue:`${Zs(this.props,"#17A8E3")}`}))),c().createElement(ti,{value:"focus",label:fr("Focus")},c().createElement(Fo,Yc({},this.props,{label:fr("Text color"),property:`${tr(this.props)}repeater-link-focus`,defaultValue:`${Zs(this.props,"#17A8E3")}`}))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Kc.apply(null,arguments)}class Jc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},c().createElement(Fo,Kc({},this.props,{label:fr("Table head color"),property:`${tr(this.props)}calendar-dweek`,defaultValue:`${Zs(this.props,"#333333",!0)}`,isAlpha:!0})),"flat"!==this.props.formDesign&&c().createElement(Fo,Kc({},this.props,{label:fr("Table cell border"),property:`${tr(this.props)}calendar-days-border-static`,defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),c().createElement(Fo,Kc({},this.props,{label:fr("Table cell BG"),property:`${tr(this.props)}calendar-days-background-static`,defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),c().createElement(Fo,Kc({},this.props,{label:fr("Table cell color"),property:`${tr(this.props)}calendar-days-color-static`,defaultValue:`${Zs(this.props,"#777771",!0)}`,isAlpha:!0}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},"flat"!==this.props.formDesign&&c().createElement(Fo,Kc({},this.props,{label:fr("Table cell border"),property:`${tr(this.props)}calendar-days-border-hover`,defaultValue:`${Zs(this.props,"#DDDDDD",!0)}`,isAlpha:!0})),c().createElement(Fo,Kc({},this.props,{label:fr("Table cell BG"),property:`${tr(this.props)}calendar-days-background-hover`,defaultValue:`${Zs(this.props,"#DDDDDD",!0)}`,isAlpha:!0})),c().createElement(Fo,Kc({},this.props,{label:fr("Table cell color"),property:`${tr(this.props)}calendar-days-color-hover`,defaultValue:`${Zs(this.props,"#777771",!0)}`}))),c().createElement(ti,{label:fr("Active"),value:"active"},"flat"!==this.props.formDesign&&c().createElement(Fo,Kc({},this.props,{label:fr("Table cell border"),property:`${tr(this.props)}calendar-days-border-active`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),c().createElement(Fo,Kc({},this.props,{label:fr("Table cell BG"),property:`${tr(this.props)}calendar-days-background-active`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),c().createElement(Fo,Kc({},this.props,{label:fr("Table cell color"),property:`${tr(this.props)}calendar-days-color-active`,defaultValue:`${Zs(this.props,"#FFFFFF",!0)}`}))),c().createElement(ti,{label:fr("Current"),value:"current"},"flat"!==this.props.formDesign&&c().createElement(Fo,Kc({},this.props,{label:fr("Table cell border"),property:`${tr(this.props)}calendar-days-border-current`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),c().createElement(Fo,Kc({},this.props,{label:fr("Table cell BG"),property:`${tr(this.props)}calendar-days-background-current`,defaultValue:`${Zs(this.props,"#C8DEE7",!0)}`,isAlpha:!0})),c().createElement(Fo,Kc({},this.props,{label:fr("Table cell color"),property:`${tr(this.props)}calendar-days-color-current`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Xc.apply(null,arguments)}class Zc extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"border",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Border"),value:"border"},c().createElement(Fo,Xc({},this.props,{label:fr("Default"),property:`${tr(this.props)}timeline-border`,defaultValue:`${Zs(this.props,"#777771",!0)}`,isAlpha:!0})),"bold"!==this.props.formDesign&&"material"!==this.props.formDesign&&c().createElement(Fo,Xc({},this.props,{label:fr("Current"),property:`${tr(this.props)}timeline-border-current`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0}))),c().createElement(ti,{label:fr("Label"),value:"label"},c().createElement(Fo,Xc({},this.props,{label:fr("Default"),property:`${tr(this.props)}timeline-text`,defaultValue:`${Zs(this.props,"#777771",!0)}`})),c().createElement(Fo,Xc({},this.props,{label:fr("Current"),property:`${tr(this.props)}timeline-text-current`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`}))),c().createElement(ti,{label:fr("Dot"),value:"dot"},c().createElement(Qn,null,c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Default state colors"))),"material"!==this.props.formDesign&&c().createElement(Fo,Xc({},this.props,{label:fr("Border"),property:`${tr(this.props)}timeline-dot-border`,defaultValue:`${Zs(this.props,"#777771",!0)}`,isAlpha:!0})),c().createElement(Fo,Xc({},this.props,{label:fr("Background"),property:`${tr(this.props)}timeline-dot-background`,defaultValue:`${Zs(this.props,"#777771",!0)}`,isAlpha:!0})),"material"===this.props.formDesign&&c().createElement(Fo,Xc({},this.props,{label:fr("Page number color"),property:`${tr(this.props)}timeline-dot-color`,defaultValue:`${Zs(this.props,"#FFFFFF",!0)}`}))),c().createElement(Qn,null,c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label sui-dark"},fr("Current state colors"))),"material"!==this.props.formDesign&&c().createElement(Fo,Xc({},this.props,{label:fr("Border"),property:`${tr(this.props)}timeline-dot-border-current`,defaultValue:`${Zs(this.props,"#777771",!0)}`,isAlpha:!0})),c().createElement(Fo,Xc({},this.props,{label:fr("Background"),property:`${tr(this.props)}timeline-dot-background-current`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})),"material"===this.props.formDesign&&c().createElement(Fo,Xc({},this.props,{label:fr("Page number color"),property:`${tr(this.props)}timeline-dot-color-current`,defaultValue:`${Zs(this.props,"#FFFFFF",!0)}`})))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},eu.apply(null,arguments)}class tu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement(Fo,eu({},this.props,{label:fr("Label"),property:`${tr(this.props)}progress-label`,defaultValue:`${Zs(this.props,"#777771",!0)}`})),c().createElement(Fo,eu({},this.props,{label:fr("Progress bar BG"),property:`${tr(this.props)}progress-background`,defaultValue:`${Zs(this.props,"#E6E6E6",!0)}`,isAlpha:!0})),c().createElement(Fo,eu({},this.props,{label:fr("Progress status BG"),property:`${tr(this.props)}progress-background-status`,defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,isAlpha:!0})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},su.apply(null,arguments)}class ru extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},c().createElement(Fo,su({},this.props,{label:fr("Background color"),property:`${tr(this.props)}prev-background-static`,defaultValue:`${Zs(this.props,"#1ABCA1")}`,isAlpha:!0})),c().createElement(Fo,su({},this.props,{label:fr("Label color"),property:`${tr(this.props)}prev-color-static`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},c().createElement(Fo,su({},this.props,{label:fr("Background color"),property:`${tr(this.props)}prev-background-hover`,defaultValue:`${Zs(this.props,"#159C85")}`,isAlpha:!0})),c().createElement(Fo,su({},this.props,{label:fr("Label color"),property:`${tr(this.props)}prev-color-hover`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))),c().createElement(ti,{label:fr("Focus"),value:"focus"},c().createElement(Fo,su({},this.props,{label:fr("Background color"),property:`${tr(this.props)}prev-background-active`,defaultValue:`${Zs(this.props,"#159C85")}`,isAlpha:!0})),c().createElement(Fo,su({},this.props,{label:fr("Label color"),property:`${tr(this.props)}prev-color-active`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))))}}function au(){return au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},au.apply(null,arguments)}class nu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},c().createElement(Fo,au({},this.props,{label:fr("Background color"),property:`${tr(this.props)}next-background-static`,defaultValue:`${Zs(this.props,"#1ABCA1")}`,isAlpha:!0})),c().createElement(Fo,au({},this.props,{label:fr("Label color"),property:`${tr(this.props)}next-color-static`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},c().createElement(Fo,au({},this.props,{label:fr("Background color"),property:`${tr(this.props)}next-background-hover`,defaultValue:`${Zs(this.props,"#159C85")}`,isAlpha:!0})),c().createElement(Fo,au({},this.props,{label:fr("Label color"),property:`${tr(this.props)}next-color-hover`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))),c().createElement(ti,{label:fr("Focus"),value:"focus"},c().createElement(Fo,au({},this.props,{label:fr("Background color"),property:`${tr(this.props)}next-background-active`,defaultValue:`${Zs(this.props,"#159C85")}`,isAlpha:!0})),c().createElement(Fo,au({},this.props,{label:fr("Label color"),property:`${tr(this.props)}next-color-active`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},iu.apply(null,arguments)}class ou extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},c().createElement(Fo,iu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}button-submit-background-static`,defaultValue:`${Zs(this.props,"#17A8E3")}`,isAlpha:!0})),c().createElement(Fo,iu({},this.props,{label:fr("Text color"),property:`${tr(this.props)}button-submit-color-static`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},c().createElement(Fo,iu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}button-submit-background-hover`,defaultValue:`${Zs(this.props,"#008FCA")}`,isAlpha:!0})),c().createElement(Fo,iu({},this.props,{label:fr("Text color"),property:`${tr(this.props)}button-submit-color-hover`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))),c().createElement(ti,{label:fr("Focus"),value:"focus"},c().createElement(Fo,iu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}button-submit-background-active`,defaultValue:`${Zs(this.props,"#008FCA")}`,isAlpha:!0})),c().createElement(Fo,iu({},this.props,{label:fr("Text color"),property:`${tr(this.props)}button-submit-color-active`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))))}}function lu(){return lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},lu.apply(null,arguments)}class pu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},c().createElement(Fo,lu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}button-upload-background-static`,defaultValue:`${Zs(this.props,"#1ABC9C")}`,isAlpha:!0})),c().createElement(Fo,lu({},this.props,{label:fr("Text color"),property:`${tr(this.props)}button-upload-color-static`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},c().createElement(Fo,lu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}button-upload-background-hover`,defaultValue:`${Zs(this.props,"#01A383")}`,isAlpha:!0})),c().createElement(Fo,lu({},this.props,{label:fr("Text color"),property:`${tr(this.props)}button-upload-color-hover`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))),c().createElement(ti,{label:fr("Focus"),value:"focus"},c().createElement(Fo,lu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}button-upload-background-active`,defaultValue:`${Zs(this.props,"#01A383")}`,isAlpha:!0})),c().createElement(Fo,lu({},this.props,{label:fr("Text color"),property:`${tr(this.props)}button-upload-color-active`,defaultValue:`${Zs(this.props,"#FFFFFF")}`}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},cu.apply(null,arguments)}class uu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{value:"default",label:fr("Default")},"material"!==this.props.formDesign&&c().createElement(Fo,cu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}multiupload-panel-background-default`,defaultValue:`${Zs(this.props,"#EDEDED")}`,isAlpha:!0})),"flat"!==this.props.formDesign&&c().createElement(Fo,cu({},this.props,{label:fr("Border color"),property:`${tr(this.props)}multiupload-panel-border-default`,defaultValue:`${Zs(this.props,"#777771")}`,isAlpha:!0})),c().createElement(Fo,cu({},this.props,{label:fr("Cloud icon color"),property:`${tr(this.props)}multiupload-panel-icon-default`,defaultValue:`${Zs(this.props,"#777771")}`,isAlpha:!0})),c().createElement(Fo,cu({},this.props,{label:fr("Message text color"),property:`${tr(this.props)}multiupload-panel-text-default`,defaultValue:`${Zs(this.props,"#666666")}`})),c().createElement(Fo,cu({},this.props,{label:fr("Message link color"),property:`${tr(this.props)}multiupload-panel-link-default`,defaultValue:`${Zs(this.props,"#17A8E3")}`}))),c().createElement(ti,{value:"hover",label:fr("Hover")},"material"!==this.props.formDesign&&c().createElement(Fo,cu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}multiupload-panel-background-hover`,defaultValue:`${Zs(this.props,"#E6E6E6")}`,isAlpha:!0})),"flat"!==this.props.formDesign&&c().createElement(Fo,cu({},this.props,{label:fr("Border color"),property:`${tr(this.props)}multiupload-panel-border-hover`,defaultValue:`${Zs(this.props,"#17A8E3")}`,isAlpha:!0})),c().createElement(Fo,cu({},this.props,{label:fr("Cloud icon color"),property:`${tr(this.props)}multiupload-panel-icon-hover`,defaultValue:`${Zs(this.props,"#777771")}`,isAlpha:!0}))),c().createElement(ti,{value:"drop",label:fr("Drop")},"material"!==this.props.formDesign&&c().createElement(Fo,cu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}multiupload-panel-background-drop`,defaultValue:`${Zs(this.props,"#E1F6FF")}`,isAlpha:!0})),"flat"!==this.props.formDesign&&c().createElement(Fo,cu({},this.props,{label:fr("Border color"),property:`${tr(this.props)}multiupload-panel-border-drop`,defaultValue:`${Zs(this.props,"#17A8E3")}`,isAlpha:!0})),c().createElement(Fo,cu({},this.props,{label:fr("Cloud icon color"),property:`${tr(this.props)}multiupload-panel-icon-drop`,defaultValue:`${Zs(this.props,"#17A8E3")}`,isAlpha:!0}))),c().createElement(ti,{value:"error",label:fr("Error")},"material"!==this.props.formDesign&&c().createElement(Fo,cu({},this.props,{label:fr("Background color"),property:`${tr(this.props)}multiupload-panel-background-error`,defaultValue:`${Zs(this.props,"#EDEDED")}`,isAlpha:!0})),c().createElement(Fo,cu({},this.props,{label:"flat"===this.props.formDesign?fr("Left border color"):fr("Border color"),property:`${tr(this.props)}multiupload-panel-border-error`,defaultValue:`${Zs(this.props,"#E04562")}`,isAlpha:!0})),c().createElement(Fo,cu({},this.props,{label:fr("Cloud icon color"),property:`${tr(this.props)}multiupload-panel-icon-error`,defaultValue:`${Zs(this.props,"#777771")}`,isAlpha:!0}))))}}function du(){return du=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},du.apply(null,arguments)}class mu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{value:"default",label:fr("Default")},"flat"!==this.props.formDesign&&c().createElement(Fo,du({},this.props,{label:fr("File preview border color"),description:fr("Default state border will not appear when file uploaded is an image."),property:`${tr(this.props)}multiupload-file-preview-border-default`,defaultValue:`${Zs(this.props,"#777771")}`})),"material"!==this.props.formDesign&&c().createElement(Fo,du({},this.props,{label:fr("File preview background color"),property:`${tr(this.props)}multiupload-file-preview-background-default`,defaultValue:"flat"===this.props.formDesign?Zs(this.props,"#EDEDED"):Zs(this.props,"#FFFFFF")})),c().createElement(Fo,du({},this.props,{label:fr("File preview icon color"),property:`${tr(this.props)}multiupload-file-preview-icon-default`,defaultValue:`${Zs(this.props,"#777771")}`})),c().createElement(Fo,du({},this.props,{label:fr("File name color"),property:`${tr(this.props)}multiupload-file-name-default`,defaultValue:`${Zs(this.props,"#333333")}`})),c().createElement(Fo,du({},this.props,{label:fr("File size color"),property:`${tr(this.props)}multiupload-file-size-default`,defaultValue:`${Zs(this.props,"#888888")}`})),c().createElement(Fo,du({},this.props,{label:fr("Loading icon color"),property:`${tr(this.props)}multiupload-file-loader-color`,defaultValue:`${Zs(this.props,"#888888")}`}))),c().createElement(ti,{value:"error",label:fr("Error")},c().createElement(Fo,du({},this.props,{label:fr("File preview border color"),property:`${tr(this.props)}multiupload-file-preview-border-error`,defaultValue:`${Zs(this.props,"#E04562")}`})),"material"!==this.props.formDesign&&c().createElement(Fo,du({},this.props,{label:fr("File preview background color"),property:`${tr(this.props)}multiupload-file-preview-background-error`,defaultValue:"flat"===this.props.formDesign?Zs(this.props,"#EDEDED"):Zs(this.props,"#FFFFFF")})),c().createElement(Fo,du({},this.props,{label:fr("File preview icon color"),property:`${tr(this.props)}multiupload-file-preview-icon-error`,defaultValue:`${Zs(this.props,"#777771")}`})),c().createElement(Fo,du({},this.props,{label:fr("File size icon color"),property:`${tr(this.props)}multiupload-file-error-color`,defaultValue:`${Zs(this.props,"#E04562")}`}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},hu.apply(null,arguments)}class fu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},c().createElement(Fo,hu({},this.props,{defaultValue:`${Zs(this.props,"#00000000")}`,property:`${tr(this.props)}button-upload-delete-background-static`,label:fr("Background color"),isAlpha:!0})),c().createElement(Fo,hu({},this.props,{defaultValue:`${Zs(this.props,"#E04562")}`,property:`${tr(this.props)}button-upload-delete-color-static`,label:fr("Icon color")}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},c().createElement(Fo,hu({},this.props,{defaultValue:`${Zs(this.props,"#F9E4E8")}`,property:`${tr(this.props)}button-upload-delete-background-hover`,label:fr("Background color"),isAlpha:!0})),c().createElement(Fo,hu({},this.props,{defaultValue:`${Zs(this.props,"#E04562")}`,property:`${tr(this.props)}button-upload-delete-color-hover`,label:fr("Icon color")}))),c().createElement(ti,{label:fr("Focus"),value:"focus"},c().createElement(Fo,hu({},this.props,{defaultValue:`${Zs(this.props,"#F9E4E8")}`,property:`${tr(this.props)}button-upload-delete-background-active`,label:fr("Background color"),isAlpha:!0})),c().createElement(Fo,hu({},this.props,{defaultValue:`${Zs(this.props,"#E04562")}`,property:`${tr(this.props)}button-upload-delete-color-active`,label:fr("Icon color")}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},bu.apply(null,arguments)}class gu extends Rr.Component{constructor(e){super(e)}render(){const e=Pr(this.props.wrappers,"upload","file-type","single")||Pr(this.props.wrappers,"postdata","post_image","false"),t=Pr(this.props.wrappers,"upload","file-type","multiple");return c().createElement("div",{className:"sui-box"},e&&c().createElement(Rr.Fragment,null,c().createElement(gi,bu({},this.props,{label:fr("Single File Uploader")}),c().createElement(pu,this.props))),t&&c().createElement(Rr.Fragment,null,c().createElement(gi,bu({},this.props,{label:fr("Multiple Files Uploader")}),c().createElement(uu,this.props)),c().createElement(gi,bu({},this.props,{label:fr("Uploaded File")}),c().createElement(mu,this.props))),c().createElement(gi,bu({},this.props,{label:fr("Uploaded File Delete Button")}),c().createElement(fu,this.props)))}}function yu(){return yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},yu.apply(null,arguments)}class vu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},"flat"!==this.props.formDesign&&"material"!==this.props.formDesign&&c().createElement(Fo,yu({},this.props,{defaultValue:`${Zs(this.props,"#AAAAAA",!0)}`,property:`${tr(this.props)}rating-icon`,label:fr("Rating icon color"),isAlpha:!0})),c().createElement(Fo,yu({},this.props,{defaultValue:`${Zs(this.props,"#888888",!0)}`,property:`${tr(this.props)}rating-suffix`,label:fr("Suffix text color"),isAlpha:!0}))),c().createElement(ti,{label:fr("Hover"),value:"hover"},c().createElement(Fo,yu({},this.props,{defaultValue:`${Zs(this.props,"#FF7E41",!0)}`,property:`${tr(this.props)}rating-icon-hover`,label:fr("Rating icon color"),isAlpha:!0}))),c().createElement(ti,{label:fr("Selected"),value:"selected"},c().createElement(Fo,yu({},this.props,{defaultValue:`${Zs(this.props,"#FF7E41",!0)}`,property:`${tr(this.props)}rating-icon-active`,label:fr("Rating icon color"),isAlpha:!0}))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Eu.apply(null,arguments)}class _u extends Rr.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"),c().createElement(oi,{default:"default",type:"tabs",extraClass:"sui-tabs-flushed"},c().createElement(ti,{label:fr("Default"),value:"default"},!e&&c().createElement(c().Fragment,null,c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,s,!0)}`,property:`${tr(this.props)}slider-track`,label:fr("Slider track color"),isAlpha:!0})),!t&&c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#777771",!0)}`,property:`${tr(this.props)}slider-track-border`,label:fr("Slider track border color"),isAlpha:!0})),c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}slider-track-fill`,label:fr("Slider track fill color"),isAlpha:!0})),c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}slider-handle`,label:fr("Handle color"),isAlpha:!0}))),c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#333333",!0)}`,property:`${tr(this.props)}slider-selected-value`,label:fr("Selected value color"),isAlpha:!0})),c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#888888",!0)}`,property:`${tr(this.props)}slider-steps-value`,label:fr("Step values color"),isAlpha:!0}))),!e&&c().createElement(ti,{label:fr("Hover"),value:"hover"},c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,s,!0)}`,property:`${tr(this.props)}slider-track-hover`,label:fr("Slider track color"),isAlpha:!0})),!t&&c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#777771",!0)}`,property:`${tr(this.props)}slider-track-border-hover`,label:fr("Slider track border color"),isAlpha:!0})),c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}slider-track-fill-hover`,label:fr("Slider track fill color"),isAlpha:!0})),c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}slider-handle-hover`,label:fr("Handle color"),isAlpha:!0}))),!e&&c().createElement(ti,{label:fr("Pressed"),value:"drag"},c().createElement(Fo,Eu({},this.props,{defaultValue:`${Zs(this.props,"#17A8E3",!0)}`,property:`${tr(this.props)}slider-handle-drag`,label:fr("Handle color"),isAlpha:!0}))))}}function wu(){return wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},wu.apply(null,arguments)}class xu extends Rr.Component{constructor(e){super(e)}componentDidMount(){this.loadFonts();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")}))}componentDidUpdate(){this.loadFonts()}loadFonts(){if(!_.isUndefined(window.forminatorFonts))return;const e={action:"forminator_load_google_fonts",data:{isObject:!0},_wpnonce:forminatorData.gFontNonce};Na().post(forminatorData.ajaxUrl,Sa().stringify(e)).then((e=>{window.forminatorFonts=e.data.data})).catch((e=>{console.log(e)}))}hasIndicatorEnabled(e){return void 0!==e["submission-indicator"]&&"show"===e["submission-indicator"]}toggleAccordion(){jQuery(".sui-accordion-item--open .sui-accordion-item-header").trigger("click")}render(){const e=or("page-break",this.props.wrappers),t=or("section",this.props.wrappers),s=Pr(this.props.wrappers,"radio","value_type","radio"),r=Pr(this.props.wrappers,"select","value_type","single"),a=Pr(this.props.wrappers,"checkbox","value_type","checkbox"),n=Pr(this.props.wrappers,"select","value_type","multiselect"),i=n&&Pr(this.props.wrappers,"select","multiselect_style","modern"),o=i&&Pr(this.props.wrappers,"select","checkbox_in_dropdown","show"),l=Pr(this.props.wrappers,"date","field_type","picker"),p=or("signature",this.props.wrappers),u=or("group",this.props.wrappers),d=Pr(this.props.wrappers,"date","field_type","select"),m=Pr(this.props.wrappers,"time","field_type","select")||Pr(this.props.wrappers,"time","time_type","twelve"),h=Pr(this.props.wrappers,"address","address_country","true"),f=Pr(this.props.wrappers,"name","prefix","true"),b=or("gdprcheckbox",this.props.wrappers),g=or("upload",this.props.wrappers),y=or("currency",this.props.wrappers),v=or("stripe",this.props.wrappers),E=or("calculation",this.props.wrappers),w=or("consent",this.props.wrappers),x=or("rating",this.props.wrappers),N=or("slider",this.props.wrappers),k=function(e){let t=0;return!!ir(e)||(e.map((e=>{e.fields.map((e=>{const s=forminatorData.postCategories[e.post_type];void 0!==s&&s.map((s=>{const r=s.value+"_multiple";1===parseInt(e[r])&&t++}))}))})),t>0)}(this.props.wrappers),S=!_.isUndefined(this.props.preset),C="basic"===this.props.formDesign,P=S||this.hasIndicatorEnabled(this.props.settings),F=_.isUndefined(this.props.settings.paginationData)||_.isUndefined(this.props.settings.paginationData["pagination-header-design"])?"":this.props.settings.paginationData["pagination-header-design"],O=_.isUndefined(this.props.settings.paginationData)||_.isUndefined(this.props.settings.paginationData["pagination-header"])?"":this.props.settings.paginationData["pagination-header"],D=_.isUndefined(this.props.settings[`${tr(this.props)}cform-color-option`])?"forminator":"theme",A=_.isUndefined(this.props.settings[`${tr(this.props)}cform-color-option`])?D:this.props.settings[`${tr(this.props)}cform-color-option`];return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Colors")),c().createElement("span",{className:"sui-description"},fr("Adjust the default color combinations to match your theme styling."))),c().createElement("div",{className:"sui-box-settings-col-2"},!C&&c().createElement(Rr.Fragment,null,c().createElement("div",{style:{marginBottom:"20px"}},c().createElement(ei,wu({},this.props,{property:"cform-color-option",default:D,onChange:this.toggleAccordion}),c().createElement(si,{value:"theme",boxClass:""},fr("Use Theme Colors")),c().createElement(si,{value:"forminator",boxClass:""},fr("Use Default Colors")))),c().createElement("span",{className:"sui-description"},fr("theme"===A?"Form will inherit colors from your WordPress theme. You can customize the color of specific elements using the options below.":"Form will use the default Forminator colors."))),c().createElement("div",{className:"sui-form-field"},c().createElement("div",{style:{marginBottom:"10px",marginTop:"20px"}},c().createElement(Wi,wu({},this.props,{label:fr("Customize colors"),property:`${tr(this.props)}cform-color-settings`,unWrap:!0}))),!_.isUndefined(this.props.settings[`${tr(this.props)}cform-color-settings`])&&this.props.settings[`${tr(this.props)}cform-color-settings`]&&c().createElement("div",{className:"sui-accordion"},c().createElement("div",{className:"sui-accordion-header"},c().createElement("div",null,c().createElement("div",null,fr("Element")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{id:"forminator-clear-color-options",className:"sui-button sui-button-ghost"},c().createElement("span",{className:"sui-icon-update","aria-hidden":"true"}),fr("Clear Customization"))))),c().createElement(gi,wu({},this.props,{label:fr("Form Container")}),c().createElement(fc,this.props)),P&&c().createElement(gi,wu({},this.props,{label:fr("Submission Indicator")}),c().createElement(vc,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Response Success")}),c().createElement("p",{className:"sui-description"},fr("Successful response message will be displayed after form submission succeeds.")),c().createElement(xc,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Response Error")}),c().createElement("p",{className:"sui-description"},fr("Error response message will be displayed after form submission fails.")),c().createElement(_c,this.props)),(S||e&&"show"===F&&"nav"===O)&&c().createElement(gi,wu({},this.props,{label:fr("Pagination Steps")}),c().createElement(Zc,this.props)),(S||e&&"show"===F&&"bar"===O)&&c().createElement(gi,wu({},this.props,{label:fr("Pagination Progress Bar")}),c().createElement(tu,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Fields Basics")}),c().createElement(gc,this.props)),t&&c().createElement(gi,wu({},this.props,{label:fr("Section")}),c().createElement(kc,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Input and Textarea")}),c().createElement(Cc,this.props)),(l||y||v||E)&&c().createElement(gi,wu({},this.props,{label:fr("Input Extras")}),c().createElement(Fc,this.props)),(a||s||b||o)&&c().createElement(gi,wu({},this.props,{label:fr("Radio and Checkbox")}),c().createElement(Dc,this.props)),(r||d||m||h||f||i)&&c().createElement(Rr.Fragment,null,c().createElement(gi,wu({},this.props,{label:fr("Select")}),c().createElement(Mc,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Dropdown List")}),c().createElement(Ic,this.props))),h&&c().createElement(gi,wu({},this.props,{label:fr("Dropdown Search")}),c().createElement(Vc,this.props)),(n||k)&&c().createElement(gi,wu({},this.props,{label:fr("Multi Select")}),c().createElement(Lc,this.props)),x&&c().createElement(gi,wu({},this.props,{label:fr("Rating")}),c().createElement(vu,this.props)),N&&c().createElement(gi,wu({},this.props,{label:fr("Slider")}),c().createElement(_u,this.props)),l&&!C&&c().createElement(Rr.Fragment,null,c().createElement(gi,wu({},this.props,{label:fr("Calendar Basics")}),c().createElement(zc,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Calendar Table")}),c().createElement(Jc,this.props))),g&&c().createElement(gi,wu({},this.props,{label:fr("File Upload"),boxedContent:!1}),c().createElement(gu,this.props)),p&&c().createElement(Rr.Fragment,null,c().createElement(gi,wu({},this.props,{label:fr("E-Signature")}),c().createElement(qc,this.props))),u&&c().createElement(Rr.Fragment,null,c().createElement(gi,wu({},this.props,{label:fr("Field Group")}),c().createElement(Qc,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Repeater Button"),boxedContent:!1}),c().createElement(Gc,this.props))),e&&c().createElement(Rr.Fragment,null,c().createElement(gi,wu({},this.props,{label:fr("Button Back")}),c().createElement(ru,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Button Next")}),c().createElement(nu,this.props))),w&&c().createElement(gi,wu({},this.props,{label:fr("Consent")}),c().createElement(Tc,this.props)),c().createElement(gi,wu({},this.props,{label:fr("Submit Button")}),c().createElement(ou,this.props))))))}}function Nu(){return Nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Nu.apply(null,arguments)}class ku extends Rr.Component{constructor(e){super(e)}backwardsCompat(e,t){return _.contains(t,e)||t.push(e),t}render(){const e=tr(this.props),t=e+this.props.prefix,s="basic-"===e?"":this.props.defaultFont,r=_.isUndefined(this.props.settings[t+"-font-family"])?s:this.props.settings[t+"-font-family"],a=_.isUndefined(this.props.settings[t+"-custom-family"])?this.props.defaultCustom:this.props.settings[t+"-custom-family"],n="basic-"===e?"":this.props.defaultWeight,i=_.isUndefined(this.props.settings[t+"-font-weight"])?n: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)?[fr("None")]:s[0].variants}(r,window.forminatorFonts),u=this.backwardsCompat(i,p);return c().createElement(Rr.Fragment,null,c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(zn,Nu({},this.props,{label:fr("Font Family"),placeholder:fr("Roboto"),property:`${t}-font-family`,defaultValue:`${er(this.props,r)}`}),_.map(window.forminatorFonts,(e=>c().createElement("option",{value:e.family,key:e.family},e.family))),c().createElement("option",{value:"",key:"inherit"},fr("inherit")),c().createElement("option",{value:"custom",key:"custom"},fr("Custom user font"))),"custom"===r&&c().createElement(Sn,Nu({},this.props,{type:"text",property:`${t}-custom-family`,defaultValue:`${er(this.props,a)}`,placeholder:fr("E.g., Arial, sans-serif"),label:fr("Custom font family"),prefix:""})))),!this.props.familyOnly&&c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Nu({},this.props,{type:"number",property:`${t}-font-size`,defaultValue:`${er(this.props,l)}`,placeholder:fr("E.g., 16"),label:fr("Font Size"),note:"in px",prefix:""}))),c().createElement(Nn,{cols:"6"},c().createElement(zn,Nu({},this.props,{label:fr("Font Weight"),placeholder:fr("Select font weight"),property:`${t}-font-weight`,defaultValue:`${er(this.props,i)}`}),c().createElement("option",{value:"",key:"inherit"},fr("inherit")),_.map(u,(e=>c().createElement("option",{value:e,key:e},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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Su.apply(null,arguments)}class Cu extends Rr.Component{constructor(e){super(e)}render(){const e=or("page-break",this.props.wrappers),t=or("section",this.props.wrappers),s=Pr(this.props.wrappers,"radio","value_type","radio"),r=Pr(this.props.wrappers,"select","value_type","single"),a=Pr(this.props.wrappers,"checkbox","value_type","checkbox"),n=Pr(this.props.wrappers,"select","value_type","multiselect"),i=Pr(this.props.wrappers,"select","multiselect_style","modern"),o=Pr(this.props.wrappers,"date","field_type","picker"),l=Pr(this.props.wrappers,"date","field_type","select"),p=Pr(this.props.wrappers,"time","field_type","select")||Pr(this.props.wrappers,"time","time_type","twelve"),u=Pr(this.props.wrappers,"address","address_country","true"),d=Pr(this.props.wrappers,"name","prefix","true"),m=or("gdprcheckbox",this.props.wrappers),h=or("currency",this.props.wrappers),f=Pr(this.props.wrappers,"upload","file-type","single")||Pr(this.props.wrappers,"postdata","post_image","false"),b=Pr(this.props.wrappers,"upload","file-type","multiple"),g=or("signature",this.props.wrappers),y=or("calculation",this.props.wrappers),v=or("group",this.props.wrappers),E=or("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 c().createElement(Qn,{label:fr("Fonts"),description:fr("By default this form will inherit the fonts your theme uses. You can overwrite these fonts with custom ones from {{link}}Bunny Fonts{{/link}}.",{components:{link:c().createElement("a",{href:"https://fonts.bunny.net/about",target:"_blank"})}})},c().createElement(ei,Su({},this.props,{property:`${tr(this.props)}form-font-family`,default:""}),c().createElement(si,{value:""},fr("Use Theme Fonts")),c().createElement(ti,{value:"custom",label:fr("Custom")},c().createElement("div",{className:"sui-accordion"},c().createElement(gi,Su({},this.props,{label:fr("Response Message")}),c().createElement(ku,Su({},this.props,{prefix:"cform-response",defaultSize:"15",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),(w||e&&"show"===x&&"nav"===N)&&c().createElement(gi,Su({},this.props,{label:fr("Pagination Steps")}),c().createElement(ku,Su({},this.props,{prefix:"cform-timeline",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),(w||e&&"show"===x&&"bar"===N)&&c().createElement(gi,Su({},this.props,{label:fr("Pagination Progress Bar")}),c().createElement(ku,Su({},this.props,{prefix:"cform-progress",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),c().createElement(gi,Su({},this.props,{label:fr("Fields Label")}),c().createElement(ku,Su({},this.props,{prefix:"cform-label",defaultSize:"13",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"700"}))),c().createElement(gi,Su({},this.props,{label:fr("Fields Description")}),c().createElement(ku,Su({},this.props,{prefix:"cform-description",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),c().createElement(gi,Su({},this.props,{label:fr("Fields Error Message")}),c().createElement(ku,Su({},this.props,{prefix:"cform-validation",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),t&&c().createElement(c().Fragment,null,c().createElement(gi,Su({},this.props,{label:fr("Section Title")}),c().createElement(ku,Su({},this.props,{prefix:"cform-title",defaultSize:"45",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),c().createElement(gi,Su({},this.props,{label:fr("Section Subtitle")}),c().createElement(ku,Su({},this.props,{prefix:"cform-subtitle",defaultSize:"18",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"})))),c().createElement(gi,Su({},this.props,{label:fr("Input and Textarea")}),c().createElement(ku,Su({},this.props,{prefix:"cform-input",defaultSize:"16",defaultFont:"Roboto",defaultWeight:"400"}))),y&&c().createElement(gi,Su({},this.props,{label:fr("Input Prefix")}),c().createElement(ku,Su({},this.props,{prefix:"cform-input-prefix",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),(h||y)&&c().createElement(gi,Su({},this.props,{label:fr("Input Suffix")}),c().createElement(ku,Su({},this.props,{prefix:"cform-input-suffix",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),(a||s||m)&&c().createElement(gi,Su({},this.props,{label:fr("Radio and Checkbox")}),c().createElement(ku,Su({},this.props,{prefix:"cform-radio",defaultSize:"14",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),(r||l||p||u||d)&&c().createElement(c().Fragment,null,c().createElement(gi,Su({},this.props,{label:fr("Select")}),c().createElement(ku,Su({},this.props,{prefix:"cform-select",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),c().createElement(gi,Su({},this.props,{label:fr("Dropdown")}),c().createElement(ku,Su({},this.props,{prefix:"cform-dropdown",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"})))),o&&c().createElement(gi,Su({},this.props,{label:fr("Calendar")}),c().createElement(ku,Su({},this.props,{prefix:"cform-calendar",defaultFont:"custom",defaultCustom:"inherit",familyOnly:!0}))),n&&c().createElement(c().Fragment,null,c().createElement(gi,Su({},this.props,{label:fr("Multi Select")}),c().createElement(ku,Su({},this.props,{prefix:"cform-multiselect",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),i&&c().createElement(gi,Su({},this.props,{label:"material"!==this.props.formDesign?fr("Multi Select Tag"):fr("Multi Select Chip")}),c().createElement(ku,Su({},this.props,{prefix:"cform-multiselect-tag",defaultSize:"12",defaultFont:"inherit",defaultCustom:"inherit",defaultWeight:"medium"})))),f&&c().createElement(gi,Su({},this.props,{label:fr("Single File Upload")}),c().createElement(oi,Su({},this.props,{type:"tabs",default:"upload-single-button",extraClass:"sui-tabs-flushed"}),c().createElement(ku,Su({},this.props,{value:"upload-single-button",label:fr("Upload Button"),prefix:"upload-single-button",defaultSize:"14",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"700"})),c().createElement(ku,Su({},this.props,{value:"upload-single-text",label:fr("File Name"),prefix:"upload-single-text",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"700"})))),b&&c().createElement(gi,Su({},this.props,{label:fr("Multiple Files Upload")}),c().createElement(oi,Su({},this.props,{type:"tabs",default:"upload-multiple-panel",extraClass:"sui-tabs-flushed"}),c().createElement(ku,Su({},this.props,{value:"upload-multiple-panel",label:fr("Upload Panel"),prefix:"upload-multiple-panel",defaultSize:"13",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"})),c().createElement(ku,Su({},this.props,{value:"upload-multiple-file-name",label:fr("File Name"),prefix:"upload-multiple-file-name",defaultSize:"13",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"})),c().createElement(ku,Su({},this.props,{value:"upload-multiple-file-size",label:fr("File Size"),prefix:"upload-multiple-file-size",defaultSize:"12",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"})))),g&&c().createElement(gi,Su({},this.props,{label:fr("E-Signature Placeholder")}),c().createElement(ku,Su({},this.props,{prefix:"cform-esign-placeholder",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"400"}))),v&&c().createElement(gi,Su({},this.props,{label:fr("Repeater Button")}),c().createElement(ku,Su({},this.props,{prefix:"cform-repeater-button",defaultSize:"12",defaultFont:"Roboto",defaultWeight:"500"}))),e&&c().createElement(gi,Su({},this.props,{label:fr("Pagination Buttons")}),c().createElement(ku,Su({},this.props,{prefix:"cform-pagination-buttons",defaultSize:"14",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"}))),E&&c().createElement(c().Fragment,null,c().createElement(gi,Su({},this.props,{label:fr("Slider selected value")}),c().createElement(ku,Su({},this.props,{prefix:"cform-slider-selected",defaultSize:"16",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"normal"}))),c().createElement(gi,Su({},this.props,{label:fr("Slider step values")}),c().createElement(ku,Su({},this.props,{prefix:"cform-slider-steps",defaultSize:"15",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"normal"})))),c().createElement(gi,Su({},this.props,{label:fr("Submit Button")}),c().createElement(ku,Su({},this.props,{prefix:"cform-button",defaultSize:"14",defaultFont:"custom",defaultCustom:"inherit",defaultWeight:"500"})))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Pu.apply(null,arguments)}class Fu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},c().createElement(Nn,{cols:"3"},c().createElement(Sn,Pu({},this.props,{label:fr("Top"),type:"number",placeholder:"0",property:`${tr(this.props)}form-padding-top`}))),c().createElement(Nn,{cols:"3"},c().createElement(Sn,Pu({},this.props,{label:fr("Bottom"),type:"number",placeholder:"0",property:`${tr(this.props)}form-padding-bottom`}))),c().createElement(Nn,{cols:"3"},c().createElement(Sn,Pu({},this.props,{label:fr("Left"),type:"number",placeholder:"0",property:`${tr(this.props)}form-padding-left`}))),c().createElement(Nn,{cols:"3"},c().createElement(Sn,Pu({},this.props,{label:fr("Right"),type:"number",placeholder:"0",property:`${tr(this.props)}form-padding-right`})))),c().createElement("span",{className:"sui-description"},fr("Set your custom padding in pixels.")))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ou.apply(null,arguments)}class Du extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},c().createElement(Nn,{cols:"4"},c().createElement(Sn,Ou({},this.props,{label:fr("Radius"),note:fr("in px"),type:"number",placeholder:"0",property:`${tr(this.props)}form-border-radius`}))),c().createElement(Nn,{cols:"4"},c().createElement(Sn,Ou({},this.props,{label:fr("Thickness"),note:fr("in px"),type:"number",placeholder:"0",property:`${tr(this.props)}form-border-width`}))),c().createElement(Nn,{cols:"4"},c().createElement(zn,Ou({},this.props,{property:`${tr(this.props)}form-border-style`,label:fr("Style"),defaultValue:"none"}),c().createElement("option",{value:"solid"},fr("Solid")),c().createElement("option",{value:"dashed"},fr("Dashed")),c().createElement("option",{value:"dotted"},fr("Dotted")),c().createElement("option",{value:"none"},fr("None"))))),c().createElement("span",{className:"sui-description"},fr("Note: Set the color of the border in the Colors settings area above.")))}}function Au(){return Au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Au.apply(null,arguments)}class Tu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Sn,Au({},this.props,{label:fr("Spacing"),note:fr("in pixels"),type:"number",placeholder:fr("0"),property:`${tr(this.props)}spacing`}))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ju.apply(null,arguments)}class Mu extends Rr.Component{render(){return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Form Container")),c().createElement("span",{className:"sui-description"},fr("Customize the form container's padding and border."))),c().createElement("div",{className:"sui-box-settings-col-2"},"none"!==this.props.formDesign&&c().createElement(Rr.Fragment,null,c().createElement(ei,ju({},this.props,{property:`${tr(this.props)}form-padding`,settingsLabel:fr("Padding"),description:fr("By default the form will fill the available space where you insert it. You can add some padding here to better suit your theme.")}),c().createElement(si,{value:""},fr("None")),c().createElement(Fu,ju({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),fr("Custom"))),c().createElement(ei,ju({},this.props,{property:`${tr(this.props)}form-border`,settingsLabel:fr("Border"),description:fr("Add an optional border around the form.")}),c().createElement(si,{value:""},fr("None")),c().createElement(Du,ju({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),fr("Custom")))),c().createElement(ei,ju({},this.props,{property:`${tr(this.props)}fields-style`,settingsLabel:fr("Spacing"),default:"open",description:fr("Choose how much spacing you want between each form field.")}),c().createElement(si,{value:"open"},fr("Comfortable")),c().createElement(si,{value:"enclosed"},fr("Compact")),c().createElement(Tu,ju({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),fr("Custom")),c().createElement(si,{value:""},fr("Disable")))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Uu.apply(null,arguments)}class Iu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},c().createElement(Nn,{cols:"6"},c().createElement(Sn,Uu({},this.props,{label:fr("Radius"),note:fr("in px"),type:"number",placeholder:"0",property:`${tr(this.props)}field-border-radius`}))),c().createElement(Nn,{cols:"6"},c().createElement(Sn,Uu({},this.props,{label:fr("Thickness"),note:fr("in px"),type:"number",placeholder:"0",property:`${tr(this.props)}field-border-width`})))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},$u.apply(null,arguments)}class Vu extends Rr.Component{render(){return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Field Container")),c().createElement("span",{className:"sui-description"},fr("Customize the field container's border."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(ei,$u({},this.props,{property:`${tr(this.props)}field-border`,settingsLabel:fr("Border"),description:fr("Add a border style around the field.")}),c().createElement(si,{value:""},fr("None")),c().createElement(Iu,$u({},this.props,{value:"custom",boxClass:"sui-tab-boxed"}),fr("Custom")))))}}class Ru extends Rr.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.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];let t=_.isUndefined(this.props.type)?"form":this.props.type;"pdf-form"===this.props.formType&&(t=this.props.formType);const s=c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"},fr("Basic selectors")),c().createElement("div",{className:"sui-ace-selectors"},c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" ")},fr("Form")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-title ")},fr("Section Title")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-subtitle ")},fr("Section Subtitle")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-label ")},fr("Field Label")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-description ")},fr("Field Description")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-input ")},fr("Input")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-textarea ")},fr("Textarea")))),r=c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"},fr("Basic selectors")),c().createElement("div",{className:"sui-ace-selectors"},c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" ")},fr("Poll")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-poll--question ")},fr("Question")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-radio .forminator-radio-bullet ")},fr("Answer Input")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-radio .forminator-radio-label ")},fr("Answer Label")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-button ")},fr("Submit Button")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" .forminator-poll-footer a.forminator-link, .forminator-poll-footer a.forminator-link:visited ")},fr("View Results Link")))),a=c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"},fr("Basic selectors")),c().createElement("div",{className:"sui-ace-selectors"},c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(" ")},fr("Quiz")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-quiz--title ")},fr("Title")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-quiz--description p ")},fr("Description")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-question .forminator-legend ")},fr("Question")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-answer .forminator-answer--design ")},fr("Answer Container")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-answer .forminator-answer--name ")},fr("Answer Text")))),n=c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"},fr("PDF selectors")),c().createElement("div",{className:"sui-ace-selectors"},c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector("body")},fr("Body")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-pdf-header")},fr("PDF Header")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".pdf-logo")},fr("Logo")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".pdf-title")},fr("Title")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-row-heading td")},fr("Field Label")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-row-content td")},fr("Field Value")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-pdf-footer-text td")},fr("Footer")),c().createElement("a",{className:"sui-selector sui-insert-selector",onClick:()=>this.insertSelector(".forminator-pdf-pagination td")},fr("Pagination"))));return c().createElement(Rr.Fragment,null,"form"===t&&s,"poll"===t&&r,"quiz"===t&&a,"pdf-form"===t&&n,c().createElement("div",{id:`forminator-field-${this.props.property}`,"data-value":e,style:{height:"210px"}},e),"pdf-form"===t&&c().createElement("span",{className:"sui-description"},fr("Learn more about using custom CSS in your PDF file {{link}}here{{/link}}.",{components:{link:c().createElement("a",{href:"https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#pdf-custom-css",target:"_blank"})}})))}}function Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Lu.apply(null,arguments)}class Bu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Custom CSS")),c().createElement("span",{className:"sui-description"},fr("For more advanced customization options use custom CSS."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("div",{className:"sui-form-field"},c().createElement("div",{style:{marginBottom:"10px"}},c().createElement(Wi,Lu({},this.props,{label:fr("Enable custom CSS"),property:"use-custom-css",unWrap:!0}))),!_.isUndefined(this.props.settings["use-custom-css"])&&this.props.settings["use-custom-css"]&&c().createElement(Ru,Lu({},this.props,{property:"custom_css",type:"form"})))))}}function zu(){return zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},zu.apply(null,arguments)}class Wu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(ei,zu({},this.props,{property:"pdf_margin",divClass:"pdf-page-margin",settingsLabel:fr("Page Margin"),default:"default",description:fr("Default margin for all paper sizes is 30px. Use the custom tab to set a different value.")}),c().createElement(ti,{value:"default",label:fr("Default")}),c().createElement(ti,{value:"custom",label:fr("Custom")},c().createElement("div",{className:"sui-border-frame"},c().createElement("div",{className:"sui-row",style:{marginBottom:"10px"}},c().createElement(Nn,{cols:"12"},c().createElement(zn,zu({},this.props,{label:fr("Margin"),property:"pdf_margin_unit",fieldClass:"fui-select-inline",fieldsize:"100"}),c().createElement("option",{value:"pt"},"pt"),c().createElement("option",{value:"px"},"px"),c().createElement("option",{value:"mm"},"mm"),c().createElement("option",{value:"in"},"in"))),c().createElement(Nn,{cols:"3"},c().createElement(Sn,zu({},this.props,{label:fr("Top"),type:"number",placeholder:"0",property:"pdf_margin_top"}))),c().createElement(Nn,{cols:"3"},c().createElement(Sn,zu({},this.props,{label:fr("Bottom"),type:"number",placeholder:"0",property:"pdf_margin_bottom"}))),c().createElement(Nn,{cols:"3"},c().createElement(Sn,zu({},this.props,{label:fr("Left"),type:"number",placeholder:"0",property:"pdf_margin_left"}))),c().createElement(Nn,{cols:"3"},c().createElement(Sn,zu({},this.props,{label:fr("Right"),type:"number",placeholder:"0",property:"pdf_margin_right"})))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},qu.apply(null,arguments)}class Hu extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active","aria-live":"assertive",style:{display:"block"}},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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."))))),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Page settings")),c().createElement("span",{className:"sui-description"},fr("Configure the PDF file settings"))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label"},fr("Page size")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("Choose the standard paper size for your PDF document. The default resolution for each page is set at 96dpi.")),c().createElement(zn,qu({},this.props,{property:"paper_size",defaultValue:"A4"}),_.map(forminatorData.pdf_page_sizes,((e,t)=>c().createElement("option",{key:t,value:t},e)))),c().createElement("div",{className:"sui-form-field"},c().createElement(Wi,qu({},this.props,{label:fr("Enable RTL (right-to-left)"),property:"enable_rtl",unWrap:!0}))),c().createElement("hr",null),c().createElement(Wu,this.props))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Qu.apply(null,arguments)}class Yu extends Rr.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast");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=e=>{this.props.router.navigate("/"+e)},t=_.isUndefined(this.props.settings["form-style"])?"default":this.props.settings["form-style"],s=forminatorData.currentForm.settings["form-type"]||"default",r="pdf-form"===s?"pdf-appearance":"";return c().createElement("div",{id:"forminator-form-appearance",className:`sui-box ${r}`},c().createElement("div",{className:"sui-box-header"},c().createElement("h2",{className:"sui-box-title"},fr("Appearance")),"pdf-form"!==s&&c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{id:"forminator-open-apply-preset",className:"sui-button sui-button-ghost"},c().createElement("span",{className:"sui-icon-brush","aria-hidden":"true"}),fr("Apply Preset")))),c().createElement("div",{className:"sui-box-body"},"pdf-form"===s&&c().createElement(Hu,this.props),"pdf-form"!==s&&c().createElement(pc,this.props),"pdf-form"!==s&&c().createElement(mc,this.props),"pdf-form"!==s&&"none"!==t&&c().createElement(Rr.Fragment,{key:`${tr(this.props)}themeKey`},c().createElement(xu,this.props),c().createElement(Cu,this.props),c().createElement(Mu,this.props),c().createElement(Vu,this.props)),"none"===t&&c().createElement(Mu,this.props),c().createElement(Bu,Qu({},this.props,{formType:s}))),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button",onClick:()=>e("")},c().createElement("span",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("Fields")),c().createElement("div",{className:"sui-actions-right"},"registration"!==s&&"login"!==s&&"pdf-form"!==s&&c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("behaviour")},fr("Behavior"),c().createElement("span",{className:"sui-icon-arrow-right","aria-hidden":"true"})),"registration"===s&&c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("registration")},fr("User Registration"),c().createElement("span",{className:"sui-icon-arrow-right","aria-hidden":"true"})),"login"===s&&c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("login")},fr("User Login"),c().createElement("span",{className:"sui-icon-arrow-right","aria-hidden":"true"})))))}}var Gu=ga(Yu);var Ku=le((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:Tt(e,s),modalActions:Tt(t,s)}}}))(Gu);class Ju extends zn{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 Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Xu.apply(null,arguments)}class Zu extends Rr.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 vr(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=_.where(this.fields,{element_id:this.props.rule.element_id})[0]||{},s=_.isEmpty(this.props.rule.value)?fr("null"):this.props.rule.value,r=_.isEmpty(this.props.rule.role)?"subscriber":this.props.rule.role;let a,n;const i=Object.assign({},forminatorData.userRoles);return forminatorData.isMainSite?(a=fr("Network's Main Site Role"),n=fr("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:c().createElement("strong",null)}}),i.notCreate={name:"Don't create a user in the network's main site",capabilities:{read:!0}}):(a=fr("User Role"),n=""),c().createElement("div",{className:"sui-box fui-visibility-rule"+(!0===this.state.open?" fui-open":"")},c().createElement("h4",{className:"fui-visibility-rule-header"},c().createElement("button",{id:"forminator-field-"+e,className:"sui-box-header","aria-controls":"forminator-field-"+e+"-content","aria-expanded":this.state.open,onClick:()=>this.toggleState()},c().createElement("i",{className:"sui-icon-sitemap fui-visibility-rule-icon","aria-hidden":"true"}),c().createElement("span",{className:"fui-visibility-rule-text"},fr('{{strong}}"%(label)s"{{/strong}} when {{strong}}%(field)s{{/strong}} %(rule)s {{strong}}%(value)s{{/strong}}',{args:{label:br(r),field:t.label,rule:kr(this.props.rule.rule,t.field_type),value:s},components:{strong:c().createElement("strong",null)}})),c().createElement("i",{className:"sui-icon-chevron-down fui-visibility-rule-arrow","aria-hidden":"true"}))),c().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},c().createElement(An,Xu({},this.props,{property:"role",settings:this.props.rule,label:a,defaultValue:"subscriber",value:this.props.rule.role,description:n,updateProperty:this.updateValue,required:!0}),_.map(i,((e,t)=>c().createElement("option",{value:t,key:t},e.name)))),c().createElement(xn,{className:"sui-align-bottom sui-spacing-10"},c().createElement(Nn,{cols:"6",customClass:"sui-padding-right-10"},c().createElement(An,Xu({},this.props,{elementId:e+"-field",property:"element_id",updateProperty:this.updateField,settings:this.props.rule,label:fr("Field")}),_.map(this.fields,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id))))),c().createElement(Nn,{cols:"6",customClass:"sui-padding-left-10"},c().createElement(zn,Xu({key:"visibility-condition-"+Js()},this.props,{elementId:e+"-condrule",label:fr("Condition (Required)"),settings:this.props.rule,property:"rule",updateProperty:this.updateRule,options:this.disableSearch()}),c().createElement("option",{value:""},fr("Select rule")),"signature"===t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is null")),c().createElement("option",{value:"is_not"},fr("Is not null"))),"signature"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is"},fr("Is")),c().createElement("option",{value:"is_not"},fr("Is not"))),t.isNumber&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"is_great"},fr("Is greater than")),c().createElement("option",{value:"is_less"},fr("Is less than"))),!t.isNumber&&!t.hasOptions&&"signature"!==t.field_type&&"rating"!==t.field_type&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"contains"},fr("Contains")),c().createElement("option",{value:"does_not_contain"},fr("Does not contain")),c().createElement("option",{value:"starts"},fr("Starts with")),c().createElement("option",{value:"ends"},fr("Ends with"))),"date"===t.field_type&&("date-day"===t.field_slug||"date"===t.field_slug)&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"day_is"},fr("Day is")),c().createElement("option",{value:"day_is_not"},fr("Day is not"))),"date"===t.field_type&&("date-month"===t.field_slug||"date"===t.field_slug)&&c().createElement(Rr.Fragment,null,c().createElement("option",{value:"month_is"},fr("Month is")),c().createElement("option",{value:"month_is_not"},fr("Month is not")))))),c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Rr.Fragment,null,t.hasOptions&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},c().createElement("option",{value:""},fr("Select option")),_.map(t.values,((e,t)=>c().createElement("option",{value:e.value,key:t},Dn(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)&&c().createElement(Sn,Xu({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,placeholder:fr("Enter value"),label:fr("Value")})),!t.hasOptions&&"date"===t.field_type&&("month_is"===this.props.rule.rule==="month_is"||"month_is_not"===this.props.rule.rule)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},c().createElement("option",{value:""},fr("Select month")),_.map(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],(e=>c().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)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"}," "),c().createElement("select",{className:"fui-select",value:this.props.rule.value,onChange:this.updateRuleValue.bind(this)},c().createElement("option",{value:""},fr("Select day")),_.map(["Su","Mo","Tu","We","Th","Fr","Sa"],(e=>c().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)&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-label"},fr("Select date")),c().createElement(jn,Xu({},this.props,{settings:this.props.rule,property:"value",id:e+"-value",placeholder:fr("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)&&c().createElement(Sn,Xu({},this.props,{settings:this.props.rule,inputId:e+"-value",property:"value",updateProperty:this.updateInputValue,label:fr("Number of days"),placeholder:fr("E.g. 10"),type:"number",minValue:"0"}))))),c().createElement("div",{className:"fui-visibility-rule-footer"},c().createElement("button",{className:"sui-button sui-button-red sui-button-ghost",onClick:this.removeRule.bind(this)},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")),c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>this.toggleState()},fr("Done")))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ed.apply(null,arguments)}class td extends Rr.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=vr(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=_.pluck(this.props.state.user_role,"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!_.contains(e,t.element_id)}));this.updateState(s)}render(){return c().createElement("div",{className:"sui-box-builder"},c().createElement("div",{className:"fui-visibility sui-box-builder-body",style:{margin:0}},c().createElement("div",{className:"sui-builder-fields"},_.map(this.props.state.user_role,((e,t)=>c().createElement(Zu,ed({},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}))))),c().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addRule},c().createElement("span",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add User Role"))))}}function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},sd.apply(null,arguments)}class rd extends Rr.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=vr(this.props.wrappers,["password"]),t=pr("password",this.props.wrappers),s=Object.assign({},forminatorData.userRoles),r=e=>{this.props.router.navigate("/"+e)};let a,n;forminatorData.isMainSite?(a=fr("Network's Main Site Role"),n=fr("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:c().createElement("strong",null)}}),s.notCreate={name:"Don't create a user in the network's main site",capabilities:{read:!0}}):(a=fr("User Role"),n="");let i=!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?i=!0:o||_.isUndefined(this.props.settings.user_role)||_.each(this.props.settings.user_role,(e=>{_.isUndefined(e.role)||"administrator"!==e.role||(i=!0)})),c().createElement(Qn,{label:fr("User Meta Mapping"),description:fr("Assign your form fields to the user meta keys to use the data collected from the visitor to create a user profile.")},c().createElement("div",{className:"sui-form-field"},c().createElement("h4",{className:"sui-settings-label"},fr("Default Meta Keys")),c().createElement("p",{className:"sui-description",style:{marginBottom:10}},fr("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.")),c().createElement("div",{className:"sui-border-frame"},c().createElement(Ju,sd({},this.props,{property:"registration-username-field",label:fr("Username"),defaultValue:"text-1",fieldClass:"field-required",required:!0}),c().createElement("option",{value:""},fr("Select a field")),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(Ju,sd({},this.props,{property:"registration-email-field",label:fr("Email"),defaultValue:"email-1",fieldClass:"field-required",required:!0}),c().createElement("option",{value:""},fr("Select a field")),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(zn,sd({},this.props,{property:"registration-first-name-field",label:fr("First Name"),defaultValue:""}),c().createElement("option",{value:""},fr("Select a field")),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(zn,sd({},this.props,{property:"registration-last-name-field",label:fr("Last Name"),defaultValue:""}),c().createElement("option",{value:""},fr("Select a field")),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(zn,sd({},this.props,{property:"registration-website-field",label:fr("Website"),defaultValue:""}),c().createElement("option",{value:""},fr("Select a field")),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(Ju,sd({},this.props,{property:"registration-password-field",label:fr("Password"),defaultValue:"password-1",fieldClass:"field-required",required:!0}),c().createElement("option",{value:""},fr("Select a field")),_.map(t,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id))),c().createElement("option",{value:"auto"},fr("Auto Generated Password"))),t.length>0&&"auto"===this.props.settings["registration-password-field"]&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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:c().createElement("strong",null)}}))))),0===t.length&&"auto"===this.props.settings["registration-password-field"]&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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:c().createElement("strong",null),link:c().createElement("a",{onClick:()=>r("builder"),style:{cursor:"pointer"}})}}))))))),c().createElement("div",{style:{marginBottom:"10px"}},c().createElement(ei,sd({},this.props,{property:"registration-user-role",settingsLabel:a,default:"fixed",description:fr("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.")}),c().createElement(si,{value:"fixed",boxClass:""},fr("Fixed Role to All")),c().createElement(si,{value:"conditionally",boxClass:""},fr("Assign Role Conditionally")))),i&&c().createElement("div",{style:{marginBottom:"10px"}},c().createElement("div",{role:"alert",className:"sui-notice sui-notice-warning sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,c().createElement("b",null,fr("Caution")+": "),fr("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"]?c().createElement("div",{className:"sui-border-frame"},c().createElement("div",{className:"sui-form-field"},c().createElement(An,sd({},this.props,{property:"registration-role-field",label:a,defaultValue:"subscriber",description:n,required:!0}),_.map(s,((e,t)=>c().createElement("option",{value:t,key:t},e.name)))))):c().createElement("div",{className:"sui-form-field"},c().createElement(td,sd({},this.props,{updateProperty:this.updateProperty,settings:this.state,state:this.state,metaDescription:fr('No custom user meta created yet. Click on "+ Add Custom User Meta" to create custom user meta and map form fields to it.')}))),c().createElement(ei,sd({},this.props,{property:"custom-mapping",settingsLabel:fr("Custom User Meta"),default:"none",description:fr("Create custom user meta keys and assign your form fields to them to set additional user meta keys upon successful user registration.")}),c().createElement(si,{value:"none",label:fr("None")}),c().createElement(ti,{value:"custom",label:fr("Add Custom User Meta")},c().createElement(So,sd({},this.props,{updateProperty:this.updateProperty,settings:this.state,state:this.state,metaDescription:fr('No custom user meta created yet. Click on "+ Add Custom User Meta" to create custom user meta and map form fields to it.')})))))}}var ad=ga(rd);function nd(){return nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},nd.apply(null,arguments)}class id extends Rr.Component{render(){const e=vr(this.props.wrappers,["password"]),t=forminatorData.isSubdomainNetwork?"http://sitename.website.com":"http://website.com/network-name/sitename";return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Site Registration")),c().createElement("span",{className:"sui-description"},fr("Choose whether to allow site registrations on your multisite network and different related settings."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("div",{className:"sui-form-field"},c().createElement(ei,nd({},this.props,{property:"site-registration",default:"enable"}),c().createElement(ti,{value:"enable",label:fr("Enable")},c().createElement("div",{className:"sui-border-frame"},c().createElement(Rr.Fragment,null,c().createElement("span",{className:"sui-description",style:{marginTop:"0",marginBottom:"10px"}},fr("Assign form fields to the default WordPress site meta keys below.")),c().createElement(Ju,nd({},this.props,{property:"site-registration-name-field",label:fr("Site Name"),defaultValue:"",fieldClass:"field-required",required:!0,description:fr("Site address meta key will be automatically set based on this field as {{strong}}"+t+"{{/strong}}",{components:{strong:c().createElement("strong",null)}})}),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(Ju,nd({},this.props,{property:"site-registration-title-field",label:fr("Site Title"),defaultValue:"",fieldClass:"field-required",required:!0}),_.map(e,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(An,nd({},this.props,{property:"site-registration-role-field",label:fr("Site Role"),defaultValue:"",required:!0}),_.map(forminatorData.userRoles,((e,t)=>c().createElement("option",{value:t,key:t},e.name))))))),c().createElement(si,{value:"disable",label:fr("Disable")})))))}}function od(){return od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},od.apply(null,arguments)}class ld extends Rr.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 c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("User Account Activation")),c().createElement("span",{className:"sui-description"},fr("Choose the activation method and other settings for the user accounts."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(ei,od({},this.props,{property:"activation-method",settingsLabel:fr("Activation Method"),default:"default",description:fr("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:c().createElement("strong",null)}})}),c().createElement(si,{value:"default",label:fr("Default")}),c().createElement(ti,{value:"email",label:fr("Email Activation"),boxClass:"sui-tab-boxed"},c().createElement(zn,od({},this.props,{property:"confirmation-page",label:fr("Confirmation Page"),defaultValue:"",triggerChange:"1",description:fr("Choose the page to redirect users to when they click on the confirmation link.")}),_.map(forminatorData.pages,((e,t)=>c().createElement("option",{value:e.ID,key:t},_.isEmpty(e.post_title)?fr("page ID: ")+e.ID:e.post_title))))),c().createElement(ti,{value:"manual",label:fr("Manual Approval")},c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("A site admin will have to manually approve each entry from the submissions page to activate the user accounts."))))))),c().createElement($n,od({},this.props,{property:"activation-email",settingsLabel:fr("Activation Email"),default:"default",settingsDesc:fr("By default, WordPress sends an activation email containing user account information after the account activation. However, you can choose not to send this email.")}),c().createElement("div",{value:"default"},fr("Default")),c().createElement("div",{value:"none"},fr("None"))),"auto"===e&&c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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:c().createElement("strong",null)}}))))),"manual"===t&&c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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:c().createElement("strong",null)}})))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},pd.apply(null,arguments)}class cd extends Rr.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.settings["hide-registration-form"])?"":this.props.settings["hide-registration-form"];return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Additional Settings")),c().createElement("span",{className:"sui-description"},fr("These settings will add some extra control on your registration process."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("div",{className:"sui-form-field"},c().createElement("div",{style:{marginBottom:"10px"}},"manual"!==this.props.settings["activation-method"]&&c().createElement(Wi,pd({},this.props,{label:fr("Automatically log in newly activated users"),description:fr("This will automatically log in a user upon successful activation of their account."),property:"automatic-login"})),c().createElement(Wi,pd({},this.props,{label:fr("Hide the form if a user is already logged in"),description:fr("Enabling this will hide the form from logged-in users."),property:"hide-registration-form",unWrap:!0}))),e&&c().createElement("div",{className:"sui-border-frame sui-toggle-content"},c().createElement(hi,pd({},this.props,{property:"hidden-registration-form-message",label:fr("Message (optional)"),hideEditorOptions:"true",cutomTinymce:"bold,italic,underline,link,alignleft,aligncenter,alignright",placeholder:fr("Type a message for logged in users here…"),description:fr("You can optionally add a message for logged in users, which appears when the form is hidden.")}))))))}}class ud extends Rr.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=e=>{this.props.router.navigate("/"+e)};return c().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},c().createElement("div",{className:"sui-box-header"},c().createElement("h2",{className:"sui-box-title"},fr("User Registration"))),c().createElement("div",{className:"sui-box-body"},c().createElement(ad,this.props),forminatorData.isMainSite&&c().createElement(id,this.props),c().createElement(ld,this.props),c().createElement(cd,this.props)),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button",onClick:()=>e("appearance")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("Appearance")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("behaviour")},fr("Behavior"),c().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"})))))}}var dd=ga(ud);var md=le((function(e){return{settings:e.settings,wrappers:e.wrappers}}),(function(s){return{actions:{settingsActions:Tt(e,s),modalActions:Tt(t,s),builderActions:Tt(r,s)}}}))(dd);function hd(){return hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},hd.apply(null,arguments)}class fd extends Rr.Component{render(){vr(this.props.wrappers,["password"]);const e=pr("email",this.props.wrappers),t=pr("text",this.props.wrappers),s=pr("name",this.props.wrappers),r=e.concat(t,s),a=pr("password",this.props.wrappers),n=_.isEmpty(r)?"":r[0].element_id,i=this.props.settings["login-username-field"],o=_.find(r,(function(e){return i===e.element_id}));return this.props.settings["login-username-field"]=o?i:n,c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Login Fields")),c().createElement("span",{className:"sui-description"},fr("Map your form fields to the meta keys and have additional control over the login form fields."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label"},fr("Form Fields Mapping")),c().createElement("span",{className:"sui-description"},fr("Assign your form fields to the meta keys required to login a user.")),c().createElement("div",{className:"sui-border-frame"},c().createElement(Rr.Fragment,null,c().createElement(Ju,hd({},this.props,{property:"login-username-field",label:fr("Username"),defaultValue:n,fieldClass:"field-required",required:!0}),_.map(r,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))),c().createElement(Ju,hd({},this.props,{property:"login-password-field",label:fr("Password"),defaultValue:"password-1",fieldClass:"field-required",required:!0}),_.map(a,((e,t)=>c().createElement("option",{value:e.element_id,key:t},Dn(e.label)," | ",e.element_id)))))),c().createElement(ei,hd({},this.props,{property:"remember-me",settingsLabel:fr("Remember Me Field"),default:"true",description:fr("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:c().createElement("strong",null)}})}),c().createElement(ti,{value:"true",label:fr("Show"),boxClass:"sui-tab-boxed"},c().createElement(xn,null,c().createElement(Nn,{cols:"12"},c().createElement(Sn,hd({},this.props,{property:"remember-me-label",placeholder:fr("Remember me"),label:fr("Label")})))),c().createElement(xn,null,c().createElement(Nn,{cols:"4"},c().createElement(Sn,hd({},this.props,{type:"number",defaultValue:"0",property:"remember-me-cookie-number",placeholder:"10",label:fr("Cookie Expiration")}))),c().createElement(Nn,{cols:"4"},c().createElement(An,hd({},this.props,{defaultValue:"days",property:"remember-me-cookie-type",label:" "}),c().createElement("option",{value:"days"},fr("day(s)")),c().createElement("option",{value:"weeks"},fr("week(s)")),c().createElement("option",{value:"months"},fr("month(s)")),c().createElement("option",{value:"years"},fr("year(s)")))),c().createElement(Nn,{cols:"12"},c().createElement("span",{className:"sui-description sui-description-toggle"},fr("Users will have to provide login details again after the selected period."))))),c().createElement(si,{value:"false",label:fr("Hide")})))))}}function bd(){return bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},bd.apply(null,arguments)}class gd extends Rr.Component{constructor(e){super(e)}render(){const e=_.isUndefined(this.props.settings["hide-login-form"])?"":this.props.settings["hide-login-form"];return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Additional Settings")),c().createElement("span",{className:"sui-description"},fr("These settings will add some extra control on your login process."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("div",{className:"sui-form-field"},c().createElement("div",{style:{marginBottom:"10px"}},c().createElement(Wi,bd({},this.props,{label:fr("Hide the form if a user is already logged in"),description:fr("Enabling this will hide the form from logged-in users."),property:"hide-login-form",unWrap:!0}))),e&&c().createElement("div",{className:"sui-border-frame sui-toggle-content"},c().createElement(hi,bd({},this.props,{property:"hidden-login-form-message",label:fr("Message (optional)"),hideEditorOptions:"true",cutomTinymce:"bold,italic,underline,link,alignleft,aligncenter,alignright",placeholder:fr("Type a message for logged in users here…"),description:fr("You can optionally add a message for logged in users, which appears when the form is hidden.")}))))))}}class yd extends Rr.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=e=>{this.props.router.navigate("/"+e)};return c().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},c().createElement("div",{className:"sui-box-header"},c().createElement("h2",{className:"sui-box-title"},fr("Login User"))),c().createElement("div",{className:"sui-box-body"},c().createElement(fd,this.props),c().createElement(gd,this.props)),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button",onClick:()=>e("appearance")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("Appearance")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("behaviour")},fr("Behavior"),c().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"})))))}}var vd=ga(yd);var Ed=le((function(e){return{settings:e.settings,wrappers:e.wrappers}}),(function(s){return{actions:{settingsActions:Tt(e,s),modalActions:Tt(t,s),builderActions:Tt(r,s)}}}))(vd);class _d extends Rr.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=vr(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 r=s[0].label,a=kr(t.rule,s.field_type),n=gr(s[0],t),i=this.props.behavior.conditions.length;let o="";return i-1>0&&(o="+ "+(i-1)+" "+fr("more condition(s)")),c().createElement("span",{className:"fui-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${fr("Process behavior if")} ${r} ${a} ${n} ${o}`,"aria-hidden":"true"},c().createElement("i",{className:"sui-icon-link sui-sm"}))}render(){let e="",t="",s=rr(),r=Object.keys(s)[0];_.isUndefined(this.props.behavior["submission-behaviour"])||_.isEmpty(this.props.behavior["submission-behaviour"])||(r=this.props.behavior["submission-behaviour"]),e=this.props.behavior.label?this.props.behavior.label:s[r],t=r===Object.keys(s)[1]?this.props.behavior["redirect-url"]:this.props.behavior["thankyou-message"]?jQuery("<div>"+this.props.behavior["thankyou-message"]+"</div>").text():"";const a=this.conditionMarkup();return c().createElement("div",{className:"sui-builder-field sui-react sui-can_open"},!_.isUndefined(this.props.behavior.conditions)&&this.props.behavior.conditions.length>0&&c().createElement(c().Fragment,null,a),c().createElement("div",{className:"sui-field-info fui-behaviors-info",onClick:this.editModal},c().createElement("div",{className:"sui-builder-field-label fui-behaviors-label",style:{minWidth:"90px"}},c().createElement("i",{className:"","aria-hidden":"true"}),c().createElement("span",null,e)),c().createElement("div",{className:"sui-builder-field-label fui-notifications-recipient"},c().createElement("span",null,t))),c().createElement("div",{className:"sui-field-actions"},c().createElement("div",{className:"sui-dropdown"},c().createElement("button",{className:"sui-button-icon sui-dropdown-anchor"},c().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Open condition settings"))),c().createElement("ul",null,c().createElement("li",null,c().createElement("button",{onClick:this.editModal},c().createElement("i",{className:"sui-icon-pencil","aria-hidden":"true"}),fr("Edit Behavior"))),this.props.behaviors.length>1&&c().createElement("li",null,c().createElement("button",{className:"sui-option-red",onClick:this.deleteBehavior},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete")))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},wd.apply(null,arguments)}class xd extends Rr.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-"+Js(),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 c().createElement("div",{className:"sui-box-builder sui-flushed",ref:e=>this.el=e},c().createElement("div",{className:"sui-box-builder-body"},this.props.behaviors.length>0&&c().createElement("div",{className:"sui-builder-fields"},_.map(this.props.behaviors,((e,t)=>c().createElement(_d,wd({key:e.slug,behavior:e},this.props,{counter:t}))))),c().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addBehavior},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Behavior"))))}}function Nd(){return Nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Nd.apply(null,arguments)}class kd extends Rr.Component{render(){return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Submission Behavior")),c().createElement("span",{className:"sui-description"},fr("Configure what should happen when a user submits this form."))),c().createElement("div",{className:"sui-box-settings-col-2"},"leads"!==this.props.formType&&c().createElement(Rr.Fragment,null,c().createElement("label",{className:"sui-settings-label"},fr("After submission")),c().createElement("span",{className:"sui-description",style:{marginBottom:10}},fr("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&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{style:"block",margin:"10px 0 20px"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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."))))),c().createElement("div",{className:"sui-box-body",style:{marginBottom:30}},c().createElement(xd,this.props)),c().createElement(ei,Nd({},this.props,{property:"enable-ajax",defaultValue:"true",settingsLabel:fr("Method"),disabled:or("stripe",this.props.wrappers)||or("stripe-ocs",this.props.wrappers),description:fr("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.")}),c().createElement(ti,{value:"true",label:fr("Ajax")},(or("stripe",this.props.wrappers)||or("stripe-ocs",this.props.wrappers))&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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.")))))),c().createElement(ti,{value:"false",label:fr("Page Reload")},(or("stripe",this.props.wrappers)||or("stripe-ocs",this.props.wrappers))&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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.")))))))),c().createElement($n,Nd({},this.props,{property:"validation",defaultValue:"true",settingsLabel:fr("Validation"),settingsDesc:fr("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.")}),c().createElement("div",{value:"on_submit"},fr("On Submit")),c().createElement("div",{value:"server"},fr("Server Side"))),c().createElement(Wi,Nd({},this.props,{label:fr("Enable inline validation (as user types)"),property:"validation-inline",unWrap:!0})),c().createElement("div",{style:{marginTop:"30px"}},c().createElement(ei,Nd({},this.props,{property:"submission-indicator",settingsLabel:fr("Submission Indicator"),default:"",description:fr("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.")}),c().createElement(ti,{value:"show",boxClass:"sui-tab-boxed",label:fr("Show Loader")},c().createElement(Sn,Nd({},this.props,{property:"indicator-label",placeholder:fr("E.g. Submitting…"),defaultValue:"Submitting...",description:fr("Choose the text to show on the right of loading icon")}))),c().createElement(si,{label:fr("None"),value:""})))))}}function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Sd.apply(null,arguments)}class Cd extends Rr.Component{getFieldsWithAutofill(){this.fields=vr(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 r={element_id:"",provider:"",is_editable:"no"},a=this.savedFieldsAutofill.filter((t=>t.element_id===e.element_id)),n=!1;_.isUndefined(a)||_.isEmpty(a)||(a=a[0],r={element_id:a.element_id,provider:a.provider,is_editable:a.is_editable},n=!0),e.selectedProvider=r,e.isActive=n,e.autofillProviders=t[s].values,this.fieldsWithAutoFill.push(e)}}))}maybeGetNoFieldsMarkup(){return _.isEmpty(this.fieldsWithAutoFill)?c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Form does not have fields that can be autofilled."))))):""}updateProvider(e,t,s){let r=this.savedFieldsAutofill.filter((e=>e.element_id===s));_.isEmpty(r)?(r={element_id:s,provider:t,is_editable:"no"},this.savedFieldsAutofill.push(r)):(r=r[0],r.provider=t,this.savedFieldsAutofill=this.savedFieldsAutofill.map((e=>e.element_id===s?r:e))),this.props.actions.settingsActions.updateSetting("fields-autofill",this.savedFieldsAutofill)}updateEditable(e,t,s){let r=this.savedFieldsAutofill.filter((e=>e.element_id===s));_.isEmpty(r)?(r={element_id:s,provider:"",is_editable:t},this.savedFieldsAutofill.push(r)):(r=r[0],r.is_editable=t,this.savedFieldsAutofill=this.savedFieldsAutofill.map((e=>e.element_id===s?r:e))),this.props.actions.settingsActions.updateSetting("fields-autofill",this.savedFieldsAutofill)}renderProviderOptions(e){const t=[];return Object.entries(e).forEach((e=>{let[s,r]=e;const a=[];Object.entries(r.attributes).forEach((e=>{let[t,s]=e;a.push(c().createElement("option",{value:t,key:t},s.name))})),t.push(c().createElement("optgroup",{label:r.name,key:s},a))})),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"])&&_.contains(["registration","login"],this.props.settings["form-type"]))&&c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Autofill")),c().createElement("span",{className:"sui-description"},fr("If the user filling out the form is logged in, we can auto-fill fields with any available data."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(Wi,Sd({},this.props,{label:fr("Enable Autofill"),property:"use-autofill",unWrap:!0})),c().createElement("div",{className:t,style:{marginTop:"10px"}},this.maybeGetNoFieldsMarkup(),c().createElement("div",{className:"sui-accordion"},this.fieldsWithAutoFill.map((e=>c().createElement(gi,Sd({},this.props,{label:e.label,key:e.element_id}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(zn,{property:"provider",updateProperty:(t,s)=>{this.updateProvider(t,s,e.element_id)},defaultValue:"",label:fr("Autofill source"),settings:e.selectedProvider,hasSearch:!0,elementId:e.element_id},c().createElement("option",{value:""},fr("Disable Autofill")),this.renderProviderOptions(e.autofillProviders))),c().createElement(Nn,{cols:"6"},c().createElement(zn,{property:"is_editable",updateProperty:(t,s)=>{this.updateEditable(t,s,e.element_id)},defaultValue:"no",label:fr("Editable"),settings:e.selectedProvider,elementId:e.element_id+"_editable"},c().createElement("option",{value:"no"},fr("No")),c().createElement("option",{value:"yes"},fr("Yes"))))))))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Pd.apply(null,arguments)}class Fd extends Rr.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"]=0),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Security")),c().createElement("span",{className:"sui-description"},fr("Added layers of security to prevent spam submissions."))),c().createElement("div",{className:"sui-box-settings-col-2"},"form"===this.props.moduleSlug&&c().createElement(Wi,Pd({},this.props,{label:fr("Enable Honeypot protection"),property:"honeypot",description:fr("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.")})),c().createElement(Wi,Pd({},this.props,{label:fr("Enable Akismet spam protection"),property:"akismet-protection",disabled:!forminatorData.akismetEnabled,description:fr("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:c().createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/akismet/"})}})}),c().createElement(ei,Pd({},this.props,{property:"akismet-protection-behavior",default:"fail",label:fr("How should Forminator handle spam submissions?")}),c().createElement(ti,{value:"fail",boxClass:"sui-tab-boxed",label:fr("Fail Submission")},c().createElement(Sn,Pd({},this.props,{label:fr("Custom error message"),placeholder:fr("Something went wrong."),property:"spam-fail-message",description:fr("Enter a custom error message to let your visitors know why the submission failed.")}))),c().createElement(ti,{value:"mark_spam",label:fr("Mark as Spam")},c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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&&c().createElement(Wi,Pd({},this.props,{label:fr("Enable logged in submission only"),property:"logged-users",description:fr("Lock down your form submissions to registered users only.")}),c().createElement("div",null,c().createElement(Sn,Pd({},this.props,{label:fr("Submissions limit per logged in user"),description:fr("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"}))),c().createElement("div",{style:{marginTop:"20px"}},c().createElement(Sn,Pd({},this.props,{label:fr("Message when user has already reached submissions limit"),placeholder:fr("You’ve already reached submissions limit."),property:"limit-per-user-error"}))))))}}function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Od.apply(null,arguments)}class Dd extends Rr.Component{render(){return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Lifespan")),c().createElement("span",{className:"sui-description"},fr("By default this form will always be available for submissions. However you can lock down if need be."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label",style:{marginBottom:"10px"}},fr("Expiry")),c().createElement(ei,Od({},this.props,{property:"form-expire",default:"no_expire",simple:!0}),c().createElement(si,{value:"no_expire"},fr("None")),c().createElement(ti,{value:"date",boxClass:"sui-tab-boxed",label:fr("Date")},c().createElement(jn,Od({},this.props,{property:"expire_date",placeholder:fr("20 April 2018"),hasWordFormat:!0})),c().createElement(Sn,Od({},this.props,{label:fr("Expiration Message"),placeholder:fr("Whoops! This form has expired."),property:"expire_message",description:fr("Add some custom message for users to see when your form stops appearing or leave empty to show nothing (just an empty space).")}))),c().createElement(ti,{value:"submits",boxClass:"sui-tab-boxed",label:fr("Submissions")},c().createElement(Sn,Od({},this.props,{placeholder:"10",property:"expire_submits",type:"number"})),c().createElement(Sn,Od({},this.props,{label:fr("Expiration Message"),placeholder:fr("Whoops! This form has expired."),property:"expire_message",description:fr("Add some custom message for users to see when your form stops appearing or leave empty to show nothing (just an empty space).")}))))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ad.apply(null,arguments)}class Td extends Rr.Component{render(){return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Rendering")),c().createElement("span",{className:"sui-description"},fr("Choose how you want your form to be rendered for users."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(Wi,Ad({},this.props,{property:"use_ajax_load",label:fr("Load form using AJAX"),description:fr("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.")})),c().createElement(Wi,Ad({},this.props,{property:"use_donotcachepage",label:fr("Prevent page caching on form pages"),description:fr("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:c().createElement("strong",null)}})}))))}}function jd(){return jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},jd.apply(null,arguments)}class Md extends Rr.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:fr("Save and Continue"),"email-subject":fr("Your {form_name} form on {site_title} has been saved as draft"),"email-editor":fr("<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:#17A8E3;'>{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:#17A8E3;'>{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=fr("<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"]?"":c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Save and Continue")),c().createElement("span",{className:"sui-description"},fr("Enable this option if you want to allow users save their progress and return to complete the form at a later time."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(Wi,jd({},this.props,{property:"use_save_and_continue",label:fr("Enable save and continue"),unWrap:!0})),s&&c().createElement(Rr.Fragment,null,c().createElement(ei,jd({},this.props,{property:"sc_tab",default:"configuration",wrapperClass:"save-continue-wrap mtop10",simple:!0,basicTabs:!0}),c().createElement(ti,{value:"configuration",boxClass:"sui-tab-boxed",label:fr("Configuration")},c().createElement(Sn,jd({},this.props,{property:"sc_draft_retention",label:fr("Draft retention period"),defaultValue:"30",description:fr("Enter the number of days a form's draft will be stored on your server before they are automatically deleted."),suffix:"days"})),c().createElement(Sn,jd({},this.props,{property:"sc_link_text",label:fr("Save form link text"),defaultValue:fr("Save as Draft"),description:fr("Edit text for the save draft link.")})),c().createElement(hi,jd({},this.props,{property:"sc_message",extraId:"-draft",updateProperty:this.updateProperty,label:fr("Resume message"),description:fr("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"})),c().createElement("div",{role:"alert",className:"sui-notice sui-active","aria-live":"assertive",style:{display:"block"}},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("These fields will not be saved in the submission draft: Paypal, Stripe, Signature, Password, Captcha, and Upload."))))),c().createElement(Wi,jd({},this.props,{property:"sc_email_link",label:fr("Allow send draft link to email"),description:fr("Enable to allow users send the draft form's link to their email."),unWrap:!0})),t.sc_email_link&&c().createElement("div",{className:"sui-border-frame"},c().createElement("p",null,c().createElement("small",null,fr("Configure the send link email form below. You can edit the email contents in the {{link}}Email Notifications{{/link}} tab.",{components:{link:c().createElement("a",{onClick:()=>e("notifications"),href:"#"})}}))),c().createElement(Sn,jd({},this.props,{property:"sc_email_input_label",label:fr("Email input label"),defaultValue:fr("Send draft link to")})),c().createElement(Sn,jd({},this.props,{property:"sc_email_placeholder",label:fr("Placeholder (Optional)"),defaultValue:fr("E.g., johndoe@gmail.com")})),c().createElement(Sn,jd({},this.props,{property:"sc_email_button_label",label:fr("Send link button label"),defaultValue:fr("Send draft link")})))),c().createElement(ti,{value:"permission",boxClass:"sui-tab-boxed",label:fr("Permission")},c().createElement("p",{style:{marginBottom:"20px"}},c().createElement("small",null,fr("Select which users can save their forms as draft."))),c().createElement(ei,jd({},this.props,{property:"sc_permission",default:"public",simple:!0}),c().createElement(ti,{value:"public",boxClass:"sui-tab-boxed",label:fr("Public")},c().createElement("p",null,c().createElement("small",null,fr("Every user can save their forms as draft.")))),c().createElement(ti,{value:"registered",boxClass:"sui-tab-boxed",label:fr("Registered Users")},c().createElement("p",null,c().createElement("small",null,fr("Only registered users can save their forms as draft."))))))))))}}var Ud=ga(Md);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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Id.apply(null,arguments)}class $d extends Rr.Component{render(){return c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Payments")),c().createElement("span",{className:"sui-description"},fr("Choose how you want the form to behave when you are collecting payments."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(Wi,Id({},this.props,{label:fr("Require SSL certificate to submit this form"),property:"payment_require_ssl",description:fr("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 Vd(){return Vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Vd.apply(null,arguments)}class Rd extends Rr.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=e=>{this.props.router.navigate("/"+e)},t=or("stripe",this.props.wrappers),s=or("paypal",this.props.wrappers),r=forminatorData.currentForm.settings["form-type"]||"default";return c().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},c().createElement("div",{className:"sui-box-header"},c().createElement("h2",{className:"sui-box-title"},fr("Behavior"))),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-box-settings-row"},"leads"===this.props.formType&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-blue sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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.")))))),c().createElement(kd,this.props),(t||s)&&c().createElement($d,this.props),c().createElement(Cd,this.props),c().createElement(Fd,Vd({},this.props,{moduleSlug:"form"})),"leads"!==this.props.formType&&c().createElement(Rr.Fragment,null,c().createElement(Dd,this.props),c().createElement(Td,this.props),c().createElement(Ud,this.props))),c().createElement("div",{className:"sui-box-footer"},"registration"!==r&&"login"!==r&&c().createElement("button",{className:"sui-button",onClick:()=>e("appearance")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("Appearance")),"registration"===r&&c().createElement("button",{className:"sui-button",onClick:()=>e("registration")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("User Registration")),"login"===r&&c().createElement("button",{className:"sui-button",onClick:()=>e("login")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("User Login")),c().createElement("div",{className:"sui-actions-right"},"leads"===this.props.formType&&c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("settings")},fr("Settings"),c().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"})),"leads"!==this.props.formType&&c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("pdf")},fr("PDF"),c().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"})))))}}var Ld=ga(Rd);var Bd=le((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:Tt(e,s),behaviorsActions:Tt(i,s),modalActions:Tt(t,s)}}}))(Ld);class zd extends Rr.Component{constructor(e){super(e)}render(){return c().createElement(Rr.Fragment,null,forminatorData.showBranding&&c().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"}),c().createElement("p",{className:"sui-block-content-center",style:{maxWidth:"600px",margin:"15px auto"}},c().createElement("small",null,fr("Generate and send PDF files (e.g. forms entries, receipts, invoices, quotations) to users after form submission."))),c().createElement("p",{className:"sui-block-content-center"},c().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"},fr("Upgrade to PRO{{icon/}}",{components:{icon:c().createElement("span",{className:"sui-icon-open-new-window sui-sm","aria-hidden":"true",style:{margin:0}})}}))))}}class Wd extends Rr.Component{render(){const e=forminatorData.pluginUrl+"assets/images/",t=Or(forminatorData.userPermissions.manage_forminator_addons)||Or(forminatorData.userPermissions.manage_options);return c().createElement(Rr.Fragment,null,forminatorData.showBranding&&c().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"}),c().createElement("p",{className:"sui-block-content-center",style:{marginTop:"30px"}},c().createElement("small",null,fr("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:c().createElement("b",null)}}))),t&&c().createElement("p",{className:"sui-block-content-center"},c().createElement("button",{className:"sui-button sui-button-blue",href:forminatorData.addonsUrl,onClick:e=>{Ar(forminatorData.addonsUrl)}},fr("Get the Add-on"))))}}class qd extends Rr.Component{render(){return c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("You haven't created any PDF files yet. When you do, you'll be able to view them all here.")))))}}class Hd extends Rr.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){Ar(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 c().createElement("tr",{key:this.props.pdf.pdfId,className:`pdf-${this.props.pdf.pdfId}`},c().createElement("td",{className:"sui-table-item-title",colSpan:2},c().createElement("span",{className:"sui-icon-page-pdf","aria-hidden":"true"}),this.props.pdf.pdfFilename+".pdf"),c().createElement("td",{colSpan:1,style:{textAlign:"right"}},c().createElement("button",{role:"button",disabled:!Or(forminatorData.pdfExtensionsEnabled),className:"sui-button-icon sui-tooltip sui-tooltip-left","data-tooltip":fr("Preview this PDF"),onClick:()=>{this.showPreview(this.props.pdf.pdfId)}},c().createElement("span",{className:"sui-icon-eye","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Preview this PDF"))),c().createElement("button",{role:"button",className:"sui-button-icon sui-tooltip sui-tooltip","data-tooltip":fr("Edit PDF File"),onClick:()=>{this.editPdf(this.props.pdf.pdfId)}},c().createElement("span",{className:"sui-icon-pencil","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Edit PDF File"))),c().createElement("button",{role:"button",className:"sui-button-icon sui-button-red sui-tooltip","data-tooltip":fr("Delete PDF File"),onClick:()=>{this.deletePdf(this.props.pdf)}},c().createElement("span",{className:"sui-icon-trash","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Delete PDF File")))))}}class Qd extends Rr.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,r=_.isUndefined(e.settings.form_id)?-1:e.settings.form_id;let a="draft";"publish"===t&&(a="publish");const n={action:"forminator_save_builder",_wpnonce:forminatorData.formNonce,formName:s,form_id:r,status:a,version:forminatorData.version,data:JSON.stringify(e)};Na().post(forminatorData.ajaxUrl,Sa().stringify(n)).then((s=>{const r=lr("stripe",e.wrappers);if(s.data.success)this.reloadPageForSubscriptionPlans(r),-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",a),this.props.slideTo("pdfFilenameSlide","right");else{let e=!1,t=fr("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 Gr({type:"error",text:t,dismiss:e}).open(),this.closeModal()}})).catch((e=>{new Gr({type:"error",text:fr("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},location.reload())}render(){const{closeModal:e}=this.props;return c().createElement("div",{className:"sui-box",style:{marginBottom:0}},c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),c().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},fr("You have unsaved changes")),c().createElement("p",{id:"forminator-settings__description",className:"sui-description"},fr("Your form contains unsaved changes. Please save your form before proceeding."))),c().createElement("div",{className:"sui-box-body sui-flatten sui-content-center sui-spacing-top--20 sui-spacing-bottom--40"},c().createElement("button",{className:"sui-button sui-button-ghost forminator-discard-pdf-settings",onClick:e},fr("Cancel")),c().createElement("button",{className:"sui-button forminator-pdf-save-continue",onClick:this.saveForm},c().createElement("span",{className:"sui-loading-text"},fr("Save and Continue")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class Yd extends Rr.Component{constructor(e){super(e),this.filename_input=c().createRef(),this.createBtn=c().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;s=s.replace(" ","-"),e.currentTarget.value=s,this.setState({fileName:s}),s.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 c().createElement("div",{className:"sui-box",style:{marginBottom:0}},c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),c().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},fr("Enter PDF filename")),c().createElement("p",{id:"forminator-settings__description",className:"sui-description"},fr("Give your file a name so you can identify it later."))),c().createElement("div",{className:"sui-box-body sui-content-center"},c().createElement("div",{className:"sui-form-field"},c().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})),c().createElement("button",{id:"forminator-pdf-create-btn",className:"sui-button pdf-btn-next",onClick:this.setFilename,ref:this.createBtn},c().createElement("span",{className:"sui-loading-text"},fr("Next")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"}))))}}class Gd extends Rr.Component{constructor(e){super(e),this.templates=c().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=or("stripe",this.props.wrappers)||or("stripe-ocs",this.props.wrappers),r=or("paypal",this.props.wrappers);return c().createElement("div",{className:"sui-box",style:{marginBottom:0}},c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),c().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},fr("Choose a template")),c().createElement("p",{id:"forminator-settings__description",className:"sui-description"},fr("Select a template below to get started."))),c().createElement("div",{className:"sui-box-body sui-spacing-sides--0 sui-spacing-bottom--0"},c().createElement("div",{className:"sui-box-selectors sui-box-selectors-col-3",ref:this.templates},c().createElement("ul",{role:"radiogroup"},[{name:"basic",disabled:!1},{name:"receipt",disabled:!1},{name:"quotation",disabled:!0}].map(((e,t)=>c().createElement("li",{key:"template-"+Js()},c().createElement("label",{htmlFor:`pdf-template-${e.name}`,className:"sui-box-selector "+(e.disabled?"sui-disabled":"")},c().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}),c().createElement("span",{"aria-hidden":"true",className:"box-select-head"},c().createElement("span",{id:`pdf-template-${e.name}-label`,"aria-hidden":"true",style:{textTransform:"capitalize"}},fr(e.name)),e.disabled&&c().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"}},fr("Coming Soon"))),c().createElement("span",{"aria-hidden":"true",className:"pdf-template-img"},c().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&&!r&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active",style:{display:"block",paddingTop:"30px"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("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."))))))),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>t("pdfFilenameSlide","left")},fr("Back")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button pdf-btn-next",onClick:e=>this.saveTemplate(e),disabled:"receipt"===this.state.pdfTemplate&&!s&&!r},c().createElement("span",{className:"sui-loading-text"},fr("Next")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}class Kd extends Rr.Component{constructor(e){super(e),this.contentTypes=c().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:fr("Preload form fields in PDF file"),value:"preload"},{name:fr("Start with a blank PDF file"),value:"blank"}];return c().createElement("div",{className:"sui-box",style:{marginBottom:0}},c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),c().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},fr("Preload PDF Content")),c().createElement("p",{id:"forminator-settings__description",className:"sui-description"},fr("Choose if you want to load form data into your PDF file or start with a blank PDF file."))),c().createElement("div",{className:"sui-box-body sui-content-center sui-spacing-sides--0 sui-spacing-bottom--0"},c().createElement("div",{className:"sui-box-selectors sui-box-selectors-col-2",style:{marginBottom:"0"},ref:this.contentTypes},c().createElement("ul",{role:"radiogroup"},s.map(((e,t)=>c().createElement("li",{key:"content-"+Js()},c().createElement("label",{htmlFor:`pdf-content-${e.value}`,className:"sui-box-selector"},c().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)}),c().createElement("span",{"aria-hidden":"true",className:"box-select-head"},c().createElement("span",{id:`pdf-content-${e.value}-label`,"aria-hidden":"true"},e.name))))))))),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>t("pdfChooseTemplateSlide","left")},fr("Back")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button sui-button-blue pdf-btn-next",onClick:e=>this.createPdf(e)},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Create")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}class Jd extends Rr.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),Na().post(forminatorData.ajaxUrl,Sa().stringify(e)).then((e=>{e.data.success?(this.props.updateProperty("pdfId",e.data.data.pdf_id),setTimeout((()=>{this.props.slideTo("pdfFileCreatedSlide","right")}),20)):this.showError(e.data)})).catch((e=>{this.showError(e)}))}showError(e){new Gr({type:"error",text:fr("Something went wrong while creating your PDF. Please try again.")}).open(),console.log(e),this.props.closeModal()}render(){const{closeModal:e}=this.props;return c().createElement("div",{className:"sui-box",style:{marginBottom:0}},c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e}))),c().createElement("div",{className:"sui-box-body sui-content-center"},c().createElement("p",null,c().createElement("span",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})),c().createElement("p",null,fr("Hold tight a few moments while we create your PDF file."))))}}class Xd extends Rr.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 c().createElement("div",{className:"sui-box",style:{marginBottom:0}},c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:this.closeModal})),c().createElement("p",null,c().createElement("span",{className:"sui-icon-check sui-lg","aria-hidden":"true"})),c().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},fr("PDF File Created!")),c().createElement("p",{id:"forminator-settings__description",className:"sui-description"},fr("The PDF file has been created. Click “Edit PDF” to customize the created PDF or “Continue” to continue building your form."))),c().createElement("div",{className:"sui-box-body sui-content-center"},c().createElement("button",{className:"sui-button forminator-customize-pdf-settings","data-pdf-id":"",onClick:()=>this.customizePdf(this.props.state.pdfId)},fr("Edit PDF")),c().createElement("button",{className:"sui-button sui-button-ghost",onClick:this.applyChanges},c().createElement("span",{className:"sui-loading-text"},fr("Continue")))))}}function Zd(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function em(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?Zd(Object(s),!0).forEach((function(t){nm(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Zd(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}function tm(e){return tm="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},tm(e)}function sm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rm(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function am(e,t,s){return t&&rm(e.prototype,t),s&&rm(e,s),Object.defineProperty(e,"prototype",{writable:!1}),e}function nm(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function im(){return im=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},im.apply(this,arguments)}function om(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&&pm(e,t)}function lm(e){return lm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},lm(e)}function pm(e,t){return pm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},pm(e,t)}function cm(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s,r,a={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(a[s]=e[s]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function um(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dm(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,r=lm(e);if(t){var a=lm(this).constructor;s=Reflect.construct(r,arguments,a)}else s=r.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 um(e)}(this,s)}}function mm(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 r,a,n=[],i=!0,o=!1;try{for(s=s.call(e);!(i=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||hm(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 hm(e,t){if(e){if("string"==typeof e)return fm(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)?fm(e,t):void 0}}function fm(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=new Array(t);s<t;s++)r[s]=e[s];return r}var bm,gm,ym=!1;function vm(){if("undefined"!=typeof document&&!ym){var e=document.documentElement;gm=window.pageYOffset,document.documentElement.scrollHeight>window.innerHeight?e.style.width="calc(100% - "+function(){if(void 0!==bm)return bm;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),bm=t.offsetWidth-t.clientWidth,e.removeChild(t),bm}()+"px)":e.style.width="100%",e.style.position="fixed",e.style.top=-gm+"px",e.style.overflow="hidden",ym=!0}}function Em(){if("undefined"!=typeof document&&ym){var e=document.documentElement;e.style.width="",e.style.position="",e.style.top="",e.style.overflow="","number"==typeof gm&&window.scroll(0,gm),ym=!1}}var _m=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],wm=_m.join(","),xm="undefined"==typeof Element?function(){return!1}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function Nm(e,t){var s,r=[],a=function(e,t){var s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!s){if(Array.isArray(e)||(s=hm(e))||t&&e&&"number"==typeof e.length){s&&(e=s);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 n,i=!0,o=!1;return{s:function(){s=s.call(e)},n:function(){var e=s.next();return i=e.done,e},e:function(e){o=!0,n=e},f:function(){try{i||null==s.return||s.return()}finally{if(o)throw n}}}}(e.querySelectorAll(t));try{for(a.s();!(s=a.n()).done;){var n=s.value;n instanceof HTMLElement&&r.push(n)}}catch(e){a.e(e)}finally{a.f()}return r}function km(e,t){var s,r,a=t||{},n=[],i=[],o=Nm(e,wm);a.includeContainer&&xm.call(e,wm)&&(o=Array.prototype.slice.apply(o)).unshift(e);for(var l=0;l<o.length;l++)Sm(s=o[l])&&(0===(r=Om(s))?n.push(s):i.push({documentOrder:l,tabIndex:r,node:s}));return i.sort(Dm).map((function(e){return e.node})).concat(n)}function Sm(e){return!(!Cm(e)||function(e){return function(e){return Am(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)||Om(e)<0)}function Cm(e){return!(e.disabled||function(e){return Am(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}km.isTabbable=function(e){if(!e)throw new Error("No node provided");if(!1===xm.call(e,wm))return!1;return Sm(e)},km.isFocusable=function(e){if(!e)throw new Error("No node provided");if(!(e instanceof HTMLElement))return!1;if(!1===xm.call(e,Fm))return!1;return Cm(e)};var Pm,Fm=_m.concat("iframe").join(",");function Om(e){var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function Dm(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function Am(e){return"INPUT"===e.tagName}var Tm,jm=(Tm=[],{activateTrap:function(e){if(Tm.length>0){var t=Tm[Tm.length-1];t!==e&&t.pause()}var s=Tm.indexOf(e);-1===s||Tm.splice(s,1),Tm.push(e)},deactivateTrap:function(e){var t=Tm.indexOf(e);-1!==t&&Tm.splice(t,1),Tm.length>0&&Tm[Tm.length-1].unpause()}});function Mm(e){return window.setTimeout(e,0)}var Um=function(e){om(s,e);var t=dm(s);function s(e){var r;return sm(this,s),(r=t.call(this,e)).setFocusTrapElement=function(e){r.focusTrapElement=e},"undefined"!=typeof document&&(r.previouslyFocusedElement=document.activeElement),r}return am(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 r=sa.findDOMNode(this.focusTrapElement);if(!(r instanceof HTMLElement))throw new Error("Focus trap element DOM node is not an HTML element!");this.focusTrap=this.props._createFocusTrap(r,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=c().Children.only(this.props.children);return c().cloneElement(t,{ref:function(s){e.setFocusTrapElement(s),"function"==typeof t.ref&&t.ref(s)}})}}]),s}(c().Component);function Im(e,t){var s=t||{},r=function(t){om(a,t);var r=dm(a);function a(){return sm(this,a),r.apply(this,arguments)}return am(a,[{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 r=document.createElement("div");return document.body.appendChild(r),r}(),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&&sa.createPortal(c().createElement(e,this.props,this.props.children),this.container)}}]),a}(c().Component);return r}Um.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:function(e,t){var s=document,r="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,a=em({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),n={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},i={activate:function(e){if(n.active)return;g(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=s.activeElement;var t=e&&e.onActivate?e.onActivate:a.onActivate;t&&t();return p(),i},deactivate:o,pause:function(){if(n.paused||!n.active)return;n.paused=!0,c()},unpause:function(){if(!n.paused||!n.active)return;n.paused=!1,g(),p()}};return i;function o(e){if(n.active){clearTimeout(Pm),c(),n.active=!1,n.paused=!1,jm.deactivateTrap(i);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:a.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:a.returnFocusOnDeactivate)&&Mm((function(){var e;y((e=n.nodeFocusedBeforeActivation,u("setReturnFocus")||e))})),i}}function l(e){return!!(e&&e instanceof Node)&&r.contains(e)}function p(){if(n.active)return jm.activateTrap(i),Pm=Mm((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}),i}function c(){if(n.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),i}function u(e){var t=a[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=s.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function d(){var e;if(!(e=null!==u("initialFocus")?u("initialFocus"):r.contains(s.activeElement)?s.activeElement:n.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)||(a.clickOutsideDeactivates?o({returnFocus:!km.isFocusable(e.target)}):a.allowOutsideClick&&a.allowOutsideClick(e)||e.preventDefault())}function h(e){l(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),y(n.mostRecentlyFocusedNode||d()))}function f(e){if(!1!==a.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===n.firstTabbableNode)return e.preventDefault(),void y(n.lastTabbableNode);if(!e.shiftKey&&e.target===n.lastTabbableNode)e.preventDefault(),y(n.firstTabbableNode)}(e)}function b(e){a.clickOutsideDeactivates||l(e.target)||a.allowOutsideClick&&a.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=km(r);n.firstTabbableNode=e[0]||d(),n.lastTabbableNode=e[e.length-1]||d()}function y(e){e!==s.activeElement&&(e&&e.focus?(e.focus({preventScroll:t.preventScroll}),n.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):y(d()))}}};var $m=function(e){om(s,e);var t=dm(s);function s(e){var r;if(sm(this,s),nm(um(r=t.call(this,e)),"clearTimer",(function(){var e;null===(e=r.timeout)||void 0===e||e.forEach((function(e){clearTimeout(e)}))})),r.getApplicationNode=function(){return r.props.getApplicationNode?r.props.getApplicationNode():r.props.applicationNode},r.checkUnderlayClick=function(e){r.dialogNode&&e.target instanceof Node&&r.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)||r.exit(e)},r.checkDocumentKeyDown=function(e){!r.props.escapeExits||"Escape"!==e.key&&"Esc"!==e.key&&27!==e.keyCode||r.exit(e)},r.exit=function(e){r.props.onExit&&r.props.onExit(e)},!r.props.titleText&&!r.props.titleId)throw new Error("react-aria-modal instances should have a `titleText` or `titleId`");return r.timeout=[],r}return am(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&&vm()}},{key:"componentDidUpdate",value:function(e){e.scrollDisabled&&!this.props.scrollDisabled?Em():!e.scrollDisabled&&this.props.scrollDisabled&&vm(),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&&Em();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 r in t.underlayStyle)Object.prototype.hasOwnProperty.call(t.underlayStyle,r)&&(s[r]=t.underlayStyle[r]);var a={className:t.underlayClass,style:s};for(var n in t.underlayClickExits&&(a.onMouseDown=this.checkUnderlayClick),this.props.underlayProps)a[n]=this.props.underlayProps[n];var i={};if(t.dialogStyle)for(var o in t.dialogStyle)Object.prototype.hasOwnProperty.call(t.dialogStyle,o)&&(i[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:i};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 u=[c().createElement("div",em({},l),t.children)];t.verticallyCenter&&u.unshift(c().createElement("div",{key:"a",style:{}}));var d=t.focusTrapOptions||{};return(t.focusDialog||t.initialFocus)&&(d.initialFocus=t.focusDialog?"#".concat(this.props.dialogId):t.initialFocus),d.escapeDeactivates=t.escapeExits,c().createElement(Um,{focusTrapOptions:d,paused:t.focusTrapPaused},c().createElement("div",em({},a),u))}}]),s}(c().Component);$m.defaultProps={underlayProps:{},dialogId:"react-aria-modal-dialog",escapeExits:!0,focusTrapPaused:!1,scrollDisabled:!0};var Vm=Im($m);Vm.renderTo=function(e){return Im($m,{renderTo:e})};var Rm=["modalContent","triggerContent"],Lm=function(e){var t=e.modalContent,s=e.triggerContent,r=cm(e,Rm),a=mm(c().useState(!1),2),n=a[0],i=a[1],o=mm(c().useState(!1),2),l=o[0],p=o[1],u=mm(c().useState(r.firstSlide),2),d=u[0],m=u[1],h=mm(c().useState(null),2),f=h[0],b=h[1];c().useEffect((function(){if(!r.dialogId)throw new Error("SUI Modal instances should have a `dialogId`")}),[r.dialogId]);var g,y,v,E="object"===tm(t)&&null!==t,_=r.getApplicationNode,w=void 0===_?function(){return document.getElementsByClassName("sui-wrap")[0]}:_,x="sui-modal-content sui-content-".concat(l?"fade-out":"fade-in"," ").concat(r.dialogClass||"");E?(g=t[d].render,v=t[d].focus||!1,y=t[d].size,f&&!l&&(x+="sui-modal-slide sui-active sui-fadein-".concat(f))):(g=t,y=r.size,v=r.initialFocus||!1),void 0===r.mounted&&(r.mounted=n);var N=r.renderToNode?r.renderToNode:".sui-wrap",k=N?Vm.renderTo(N):Vm;return c().createElement(c().Fragment,null,c().createElement(k,im({getApplicationNode:w,dialogClass:x,underlayClass:"sui-modal sui-modal-".concat(y||"md"," sui-active ").concat(r.underlayClass||""),includeDefaultStyle:!1,initialFocus:v},r),g({closeModal:function(){p(!0),setTimeout((function(){i(!1),p(!1),E&&(b(null),m(r.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 i(!0)}}))};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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Bm.apply(null,arguments)}class zm extends Rr.Component{constructor(e){super(e),this.contentTypes=c().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 vr(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=lr(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:fr("Site Title"),site_url:fr("Site URL"),date_dmy:fr("Date")},r=this.getFieldElementId("name"),a=this.getFieldElementId("email"),n=this.getFieldElementId("address"),i={};return _.assign(i,forminatorData.variables),c().createElement("div",{className:"sui-box",style:{marginBottom:0}},c().createElement("div",{className:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},c().createElement("div",{className:"sui-actions-right"},c().createElement(vn,{icon:"close",iconSize:"md",label:fr("Close this dialog window"),className:"sui-button-float--right forminator-pdf-create-close",onClick:e})),c().createElement("h2",{id:"forminator-pdf-modal__title",className:"sui-box-title sui-lg"},fr("Payee and Payer Details")),c().createElement("p",{id:"forminator-settings__description",className:"sui-description"},fr("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."))),c().createElement("div",{className:"sui-accordion sui-accordion-flushed",style:{marginTop:"30px"}},c().createElement(gi,Bm({},this.props,{label:fr("Payee details"),expanded:!0,defaultContentRender:!0}),c().createElement(hi,Bm({},this.props,{extraId:"payee-info",settings:this.props.state,boxClass:"sui-tab-boxed",property:"payeeInfo",disableMiscData:!1,editorOptions:i,allowRepeater:!1,excludeSubFields:!0,enableFormData:!0,enableAllFormFields:!1,enableAllNonFormFields:!1,enablePostData:!1,enableUpload:"true",allowButtonOnclick:"true",enableParentForm:"true",mainOptionsLabel:fr("Site Information"),mainOptions:s,paymentOptions:forminatorData.payment_variables,stripeSubscriptionOptions:forminatorData.stripe_subscription_variables,label:fr("Payee details"),updateProperty:this.updateProperty,selectLabel:fr("Insert dynamic data"),tooltipLabel:fr("Add dynamic data"),defaultValue:`<strong>${fr("Company:")}</strong> {site_title}<br><strong>${fr("Address:")}</strong> ${n}<br><strong>${fr("Invoice No:")}</strong> INV-{date_dmy}-{submission_id}`}))),c().createElement(gi,Bm({},this.props,{label:fr("Payer details"),defaultContentRender:!0}),c().createElement(hi,Bm({},this.props,{extraId:"payer-info",settings:this.props.state,boxClass:"sui-tab-boxed",property:"payerInfo",disableMiscData:!1,editorOptions:i,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:fr("Payer details"),updateProperty:this.updateProperty,selectLabel:fr("Insert dynamic data"),tooltipLabel:fr("Add dynamic data"),defaultValue:`<strong>${fr("Name / Company:")}</strong> ${r}<br><strong>${fr("Address:")}</strong> ${n}<br><strong>${fr("Email:")}</strong> ${a}<br><strong>${fr("Date:")}</strong> {date_dmy}`}))),c().createElement(gi,Bm({},this.props,{label:fr("Payment note or other instructions (Optional)")}),c().createElement(hi,Bm({},this.props,{extraId:"payment-note",settings:this.props.state,boxClass:"sui-tab-boxed",property:"paymentNote",disableMiscData:!1,editorOptions:i,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:fr("Payment note or other instructions (Optional)"),updateProperty:this.updateProperty,selectLabel:fr("Insert dynamic data"),tooltipLabel:fr("Add dynamic data")})))),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button sui-button-ghost",onClick:()=>t("pdfChooseTemplateSlide","left")},fr("Back")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button sui-button-blue pdf-btn-next",onClick:e=>this.saveReceiptInfo(e)},c().createElement("span",{className:"sui-loading-text"},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Create")),c().createElement("i",{className:"sui-icon-loader sui-loading","aria-hidden":"true"})))))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Wm.apply(null,arguments)}class qm extends Rr.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 c().createElement(Kd,Wm({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},s=e=>{let{closeModal:t,slideTo:s}=e;return c().createElement(zm,Wm({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},r=forminatorData.pdfExtensionsEnabled,a={pdfUnsavedSlide:{render:e=>{let{closeModal:t,slideTo:s}=e;return c().createElement(Qd,Wm({},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 c().createElement(Yd,Wm({},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 c().createElement(Gd,Wm({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},size:"xl"}};return"receipt"===this.state.pdfTemplate?a.invoiceInfoSlide={render:s,size:"lg"}:a.pdfPreloadContentSlide={render:t,size:"lg"},a.pdfLoadingSlide={render:e=>{let{closeModal:t,slideTo:s}=e;return c().createElement(Jd,Wm({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},size:"sm"},a.pdfFileCreatedSlide={render:e=>{let{closeModal:t,slideTo:s}=e;return c().createElement(Xd,Wm({},this.props,{closeModal:t,slideTo:s,state:this.state,updateProperty:this.updateProperty}))},size:"sm"},c().createElement("p",{id:"create-new-pdf-btn"},c().createElement(Lm,Wm({},this.props,{dialogId:"create-pdf-modal",firstSlide:e?"pdfUnsavedSlide":"pdfFilenameSlide",titleId:"forminator-pdf-modal__title",modalContent:a,triggerContent:e=>{let{openModal:t}=e;return c().createElement("button",{className:"sui-button sui-button-blue",onClick:t,disabled:!Or(r)},c().createElement("span",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Create New PDF"))},focusTrapPaused:"receipt"===this.state.pdfTemplate})))}}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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Hm.apply(null,arguments)}class Qm extends Rr.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 c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Manage PDF files")),c().createElement("span",{className:"sui-description"},fr("Create one or more PDF file templates that will be generated and populated with user data on form submissions. "))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("label",{className:"sui-settings-label"},fr("Available PDF files")),!Or(e)&&c().createElement("div",{role:"alert",className:"sui-notice sui-notice-red sui-active","aria-live":"assertive",style:{display:"block",margin:"10px 0 20px"}},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("{{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:c().createElement("b",null)}}))))),c().createElement("div",{className:"pdf-files-box",style:{marginTop:"10px"}},this.props.pdfs.length>0&&c().createElement("table",{className:"sui-table"},c().createElement("tbody",null,_.map(this.props.pdfs,((e,t)=>c().createElement(Hd,Hm({},this.props,{key:t,pdf:e})))))),this.props.pdfs.length<=0&&c().createElement(qd,this.props)),c().createElement(qm,this.props)))}}class Ym extends Rr.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=e=>{this.props.router.navigate("/"+e)},t=forminatorData.isPro,s=forminatorData.pdfAddonActive;let r;return r=t?s?c().createElement(Qm,this.props):c().createElement(Wd,this.props):c().createElement(zd,this.props),c().createElement("div",{id:"forminator-form-pdf",className:"sui-box"},c().createElement("div",{className:"sui-box-header"},c().createElement("h2",{className:"sui-box-title"},fr("PDF")),c().createElement("div",{className:"sui-actions-left"},!t&&c().createElement("span",{className:"sui-tag sui-tag-pro"},fr("Pro")))),c().createElement("div",{className:"sui-box-body"},r),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button",onClick:()=>e("behaviour")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("Behavior")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("notifications")},fr("Email Notifications"),c().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"})))))}}var Gm=ga(Ym);var Km=le((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:Tt(e,s),modalActions:Tt(t,s),pdfsActions:Tt(l,s)}}}))(Gm);class Jm extends Rr.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-"+Js()+"-"+Js();const t=[...this.props.notifications,e];this.props.actions.notificationsActions.updateNotifications(t)}conditionMarkup(){const e=vr(this.props.wrappers),t="hide"===this.props.notification.condition_action?fr("Hide"):fr("Show");if(_.isUndefined(this.props.notification.conditions))return;const s=this.props.notification.conditions[0];if(_.isUndefined(s))return;const r=_.filter(e,(e=>e.element_id===s.element_id));if(_.isUndefined(r))return;if(_.isUndefined(r[0]))return;const a=r[0].label,n=kr(s.rule,r.field_type),i=gr(r[0],s),o=this.props.notification.conditions.length;let l="";return o-1>0&&(l="+ "+(o-1)+" "+fr("more condition(s)")),c().createElement("span",{className:"fui-conditions sui-tooltip sui-tooltip-left sui-tooltip-top-right-mobile","data-tooltip":`${t} ${fr("if")} ${a} ${n} ${i} ${l}`,"aria-hidden":"true"},c().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(","),r=s.length;t=r>2?s[0]+", "+s[1]+" + "+(r-2)+" "+fr("more recipient(s)"):this.props.notification.recipients,e=t}}else e=fr("Email routing is enabled");const t=this.conditionMarkup();return c().createElement("div",{className:"sui-builder-field sui-react sui-can_open"},!_.isUndefined(this.props.notification.conditions)&&this.props.notification.conditions.length>0&&c().createElement(Rr.Fragment,null,t),c().createElement("div",{className:"sui-field-info fui-notifications-info",onClick:this.editModal},c().createElement("div",{className:"sui-builder-field-label fui-notifications-label"},c().createElement("i",{className:"sui-icon-mail","aria-hidden":"true"}),c().createElement("span",null,this.props.notification.label)),c().createElement("div",{className:"sui-builder-field-label fui-notifications-recipient"},c().createElement("span",null,e))),c().createElement("div",{className:"sui-field-actions"},c().createElement("div",{className:"sui-dropdown"},c().createElement("button",{className:"sui-button-icon sui-dropdown-anchor"},c().createElement("i",{className:"sui-icon-widget-settings-config","aria-hidden":"true"}),c().createElement("span",{className:"sui-screen-reader-text"},fr("Open field settings"))),c().createElement("ul",null,c().createElement("li",null,c().createElement("button",{onClick:this.editModal},c().createElement("i",{className:"sui-icon-pencil","aria-hidden":"true"}),fr("Edit"))),"notification-0008-7000"!==this.props.notification.slug&&c().createElement(Rr.Fragment,null,c().createElement("li",null,c().createElement("button",{onClick:this.duplicateNotification},c().createElement("i",{className:"sui-icon-copy","aria-hidden":"true"}),fr("Duplicate"))),c().createElement("li",null,c().createElement("button",{className:"sui-option-red",onClick:this.deleteNotification},c().createElement("i",{className:"sui-icon-trash","aria-hidden":"true"}),fr("Delete"))))))))}}function Xm(){return Xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Xm.apply(null,arguments)}class Zm extends Rr.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-"+Js()+"-"+Js()};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 c().createElement("div",{className:"sui-box-builder sui-flushed",ref:e=>this.el=e},c().createElement("div",{className:"sui-box-builder-body"},this.props.notifications.length>0&&c().createElement("div",{className:"sui-builder-fields"},_.map(this.props.notifications,((e,t)=>c().createElement(Jm,Xm({key:e.slug,notification:e},this.props,{counter:t}))))),c().createElement("button",{className:"sui-button sui-button-dashed",onClick:this.addNotification},c().createElement("i",{className:"sui-icon-plus","aria-hidden":"true"}),fr("Add Email Notification"))))}}class eh extends Rr.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=e=>{this.props.router.navigate("/"+e)};return c().createElement("div",{id:"forminator-form-notifications",className:"sui-box"},c().createElement("div",{className:"sui-box-header"},c().createElement("h2",{className:"sui-box-title"},fr("Email Notifications"))),c().createElement("div",{className:"sui-box-body"},c().createElement("p",{className:"sui-description"},fr("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."))),c().createElement("div",{className:"sui-box-body"},c().createElement(Zm,this.props)),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button",onClick:()=>e("pdf")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("PDF")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>e("integrations")},fr("Integrations"),c().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"})))))}}var th=ga(eh);var sh=le((function(e){return{settings:e.settings,wrappers:e.wrappers,notifications:e.notifications}}),(function(e){return{actions:{notificationsActions:Tt(o,e),modalActions:Tt(t,e)}}}))(th);class rh 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 r=this,a={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("")),r.applyLoader(r.$el),this.ajax=jQuery.post({url:forminatorData.ajaxUrl,type:"post",data:e}).done((function(e){if(e&&e.success){r.renderBody(e),r.renderFooter(e);const s=e.data.data;if(r.onRender(s),r.resetLoader(r.$el),(t||!_.isUndefined(s.is_close)&&s.is_close)&&r.close(r),r.$el.find(".forminator-addon-close").on("click",(function(){r.close(r)})),!_.isUndefined(s.notification)&&!_.isUndefined(s.notification.type)&&!_.isUndefined(s.notification.text)){new Gr({type:s.notification.type,text:s.notification.text,time:4e3}).open()}if(_.isUndefined(s.has_back)?r.$el.find(".forminator-addon-back").hide():s.has_back?r.$el.find(".forminator-addon-back").show():r.$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(r.request(a.data,a.close,a.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",r.scrollbar_width+"px"):jQuery("#forminator-integration-popup .sui-modal-overlay").css("right",0)}if("mailchimp"===r.slug){const e=r.$el.find("#group");e.length&&e.trigger("change")}r.$el.find("form").on("submit",(function(e){e.preventDefault(),r.submitNextStep()}))})),this.ajax.always((function(){r.$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=_.defaults(s,{allowClear:!0,dropdownCssClass:"sui-select-dropdown"}),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),r=jQuery(this);r.append(s),r.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,r=this.global_id,a=this.nonce,n={slug:s,global_id:r};t.addClass("sui-button-onload"),jQuery.ajax({url:ajaxurl,type:"POST",data:{action:"forminator_refresh_email_lists",data:n,_ajax_nonce:a}}).done((function(e){if(e.success&&void 0!==e.data.options){const s=t.siblings(".sui-select"),r=s.closest(".sui-modal-content"),a=r.attr("id"),n=r.length?jQuery("#"+a):jQuery("body"),i="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:n,minimumResultsForSearch:i,dropdownCssClass:o})}})).fail((function(){})).always((function(){t.removeClass("sui-button-onload")}))}showInterests(e){const t=this,s=jQuery(e.currentTarget).data("nonce"),r={},a=t.$el.find("form"),n={slug:t.slug,global_id:this.global_id,module_id:this.module_id,module_type:this.type};let i=a.serialize();i=i+"&"+jQuery.param(n),r.action="forminator_mailchimp_get_group_interests",r._ajax_nonce=s,r.data=i,t.applyLoader(t.$el),jQuery.ajax({url:ajaxurl,type:"POST",data:r}).done((function(e){e.success&&(a.find(".sui-form-field").slice(1).remove(),a.find(".sui-form-field:first-child").after(e.data),a.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 r={slug:this.slug,step:this.getStep(),global_id:this.global_id,current_step:this.step},a=s.serialize();r=this.getAjaxModuleData(r,!1),a=a+"&"+jQuery.param(r),t.action=this.action,t._ajax_nonce=this.nonce,t.data=a,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},r=t.serialize();s=this.getAjaxModuleData(s,!1),r=r+"&"+jQuery.param(s),e.action=this.action,e._ajax_nonce=this.nonce,e.data=r,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 r={slug:this.slug,step:this.getStep(),global_id:this.global_id,current_step:this.step},a=s.serialize();r=this.getAjaxModuleData(r,!0),a=a+"&"+jQuery.param(r),t.action=this.action,t._ajax_nonce=this.nonce,t.data=a,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},r=t.serialize();s=this.getAjaxModuleData(s,!0),r=r+"&"+jQuery.param(s),e.action=this.action,e._ajax_nonce=this.nonce,e.data=r,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 r=function(){return t.close(),!1},a=s.data("nonce"),n=s.data("slug"),i=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:n,nonce:a,action:c,multi_id:d,global_id:i,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 rh(b).on("modal:closed",(function(){t.close()})),this.$popup.find(".forminator-popup-action").remove(),this.$popup.find(".forminator-popup-close").on("click",r),this.$popup.on("click",".forminator-popup-cancel",r),SUI.openModal("forminator-integration-popup","forminator-form-appearance",undefined,!0,!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 ah="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==a.g&&a.g||{},nh="URLSearchParams"in ah,ih="Symbol"in ah&&"iterator"in Symbol,oh="FileReader"in ah&&"Blob"in ah&&function(){try{return new Blob,!0}catch(e){return!1}}(),lh="FormData"in ah,ph="ArrayBuffer"in ah;if(ph)var ch=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],uh=ArrayBuffer.isView||function(e){return e&&ch.indexOf(Object.prototype.toString.call(e))>-1};function dh(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 mh(e){return"string"!=typeof e&&(e=String(e)),e}function hh(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return ih&&(t[Symbol.iterator]=function(){return t}),t}function fh(e){this.map={},e instanceof fh?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 bh(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function gh(e){return new Promise((function(t,s){e.onload=function(){t(e.result)},e.onerror=function(){s(e.error)}}))}function yh(e){var t=new FileReader,s=gh(t);return t.readAsArrayBuffer(e),s}function vh(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Eh(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:oh&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:lh&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:nh&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():ph&&oh&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=vh(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):ph&&(ArrayBuffer.prototype.isPrototypeOf(e)||uh(e))?this._bodyArrayBuffer=vh(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):nh&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},oh&&(this.blob=function(){var e=bh(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=bh(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(oh)return this.blob().then(yh);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,s,r,a,n=bh(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,s=gh(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),a=r?r[1]:"utf-8",t.readAsText(e,a),s;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),s=new Array(t.length),r=0;r<t.length;r++)s[r]=String.fromCharCode(t[r]);return s.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},lh&&(this.formData=function(){return this.text().then(xh)}),this.json=function(){return this.text().then(JSON.parse)},this}fh.prototype.append=function(e,t){e=dh(e),t=mh(t);var s=this.map[e];this.map[e]=s?s+", "+t:t},fh.prototype.delete=function(e){delete this.map[dh(e)]},fh.prototype.get=function(e){return e=dh(e),this.has(e)?this.map[e]:null},fh.prototype.has=function(e){return this.map.hasOwnProperty(dh(e))},fh.prototype.set=function(e,t){this.map[dh(e)]=mh(t)},fh.prototype.forEach=function(e,t){for(var s in this.map)this.map.hasOwnProperty(s)&&e.call(t,this.map[s],s,this)},fh.prototype.keys=function(){var e=[];return this.forEach((function(t,s){e.push(s)})),hh(e)},fh.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),hh(e)},fh.prototype.entries=function(){var e=[];return this.forEach((function(t,s){e.push([s,t])})),hh(e)},ih&&(fh.prototype[Symbol.iterator]=fh.prototype.entries);var _h=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function wh(e,t){if(!(this instanceof wh))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var s,r,a=(t=t||{}).body;if(e instanceof wh){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new fh(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=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 fh(t.headers)),this.method=(s=t.method||this.method||"GET",r=s.toUpperCase(),_h.indexOf(r)>-1?r:s),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in ah)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function xh(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var s=e.split("="),r=s.shift().replace(/\+/g," "),a=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function Nh(e,t){if(!(this instanceof Nh))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 fh(t.headers),this.url=t.url||"",this._initBody(e)}wh.prototype.clone=function(){return new wh(this,{body:this._bodyInit})},Eh.call(wh.prototype),Eh.call(Nh.prototype),Nh.prototype.clone=function(){return new Nh(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new fh(this.headers),url:this.url})},Nh.error=function(){var e=new Nh(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var kh=[301,302,303,307,308];Nh.redirect=function(e,t){if(-1===kh.indexOf(t))throw new RangeError("Invalid status code");return new Nh(null,{status:t,headers:{location:e}})};var Sh=ah.DOMException;try{new Sh}catch(e){(Sh=function(e,t){this.message=e,this.name=t;var s=Error(e);this.stack=s.stack}).prototype=Object.create(Error.prototype),Sh.prototype.constructor=Sh}function Ch(e,t){return new Promise((function(s,r){var a=new wh(e,t);if(a.signal&&a.signal.aborted)return r(new Sh("Aborted","AbortError"));var n=new XMLHttpRequest;function i(){n.abort()}if(n.onload=function(){var e,t,r={statusText:n.statusText,headers:(e=n.getAllResponseHeaders()||"",t=new fh,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(":"),r=s.shift().trim();if(r){var a=s.join(":").trim();try{t.append(r,a)}catch(e){console.warn("Response "+e.message)}}})),t)};0===a.url.indexOf("file://")&&(n.status<200||n.status>599)?r.status=200:r.status=n.status,r.url="responseURL"in n?n.responseURL:r.headers.get("X-Request-URL");var i="response"in n?n.response:n.responseText;setTimeout((function(){s(new Nh(i,r))}),0)},n.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},n.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request timed out"))}),0)},n.onabort=function(){setTimeout((function(){r(new Sh("Aborted","AbortError"))}),0)},n.open(a.method,function(e){try{return""===e&&ah.location.href?ah.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?n.withCredentials=!0:"omit"===a.credentials&&(n.withCredentials=!1),"responseType"in n&&(oh?n.responseType="blob":ph&&(n.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof fh||ah.Headers&&t.headers instanceof ah.Headers)){var o=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){o.push(dh(e)),n.setRequestHeader(e,mh(t.headers[e]))})),a.headers.forEach((function(e,t){-1===o.indexOf(t)&&n.setRequestHeader(t,e)}))}else a.headers.forEach((function(e,t){n.setRequestHeader(t,e)}));a.signal&&(a.signal.addEventListener("abort",i),n.onreadystatechange=function(){4===n.readyState&&a.signal.removeEventListener("abort",i)}),n.send(void 0===a._bodyInit?null:a._bodyInit)}))}Ch.polyfill=!0,ah.fetch||(ah.fetch=Ch,ah.Headers=fh,ah.Request=wh,ah.Response=Nh);class Ph extends Rr.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=vr(this.props.wrappers);Object.entries(this.props.integrationConditions).forEach((t=>{let[s,r]=t;if(!jQuery(".fui-connected").length)return;const a=jQuery('.fui-conditions[data-integration-id="'+s+'"]');if(!a.length)return void delete this.props.integrationConditions[s];if(a.hide(),_.isUndefined(r.conditions))return;const n=r.conditions[0];if(_.isUndefined(n))return;const i=_.filter(e,(e=>e.element_id===n.element_id));if(_.isUndefined(i))return;if(_.isUndefined(i[0]))return;const o="send"===r.condition_action||_.isUndefined(r.condition_action)?fr("Send"):fr("Don't send"),l=i[0].label,p=kr(n.rule,i.field_type),c=gr(i[0],n),u=r.conditions.length;let d="";u-1>0&&(d="+ "+(u-1)+" "+fr("more condition(s)"));const m=o+" "+fr("data if")+" "+l+" "+p+" "+c+" "+d;a.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,e=>{this.props.router.navigate("/"+e)}),r=Or(forminatorData.userPermissions.manage_forminator_integrations)||Or(forminatorData.userPermissions.manage_options);let a="";return a=e?c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-loader sui-loading","aria-hidden":"true"}),c().createElement("p",null,fr("Fetching integration list…"))))):c().createElement("span",{className:"form-integrations-wrapper",dangerouslySetInnerHTML:{__html:t}}),c().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},c().createElement("div",{className:"sui-box-header"},c().createElement("h2",{className:"sui-box-title"},fr("Integrations"))),c().createElement("div",{className:"sui-box-body"},c().createElement(Qn,{label:fr("Applications"),description:fr("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:r?c().createElement("a",{href:forminatorData.integrationsUrl}):c().createElement("b",null)}})},a)),c().createElement("div",{className:"sui-box-footer"},c().createElement("button",{className:"sui-button",onClick:()=>s("notifications")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"}),fr("Email Notifications")),c().createElement("div",{className:"sui-actions-right"},c().createElement("button",{className:"sui-button sui-button-icon-right",onClick:()=>s("settings")},fr("Settings"),c().createElement("i",{className:"sui-icon-arrow-right","aria-hidden":"true"})))))}}var Fh=ga(Ph);var Oh=le((function(e){return{integrationConditions:e.integrationConditions,wrappers:e.wrappers}}),(function(e){return{actions:{integrationActions:Tt(n,e),modalActions:Tt(t,e)}}}))(Fh);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 r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Dh.apply(null,arguments)}class Ah extends Rr.Component{constructor(e){super(e)}componentDidMount(){jQuery("html, body").animate({scrollTop:0},"fast")}render(){const e=e=>{this.props.router.navigate("/"+e)},t=_.isEmpty(forminatorData.retain_number)||"0"===forminatorData.retain_number,s=c().createElement(Rr.Fragment,null,t&&c().createElement(Rr.Fragment,null,fr("forever")),!t&&c().createElement(Rr.Fragment,null,forminatorData.retain_number," ",forminatorData.retain_unit)),r=forminatorData.erasure?fr("remove"):fr("retain"),a=Or(forminatorData.userPermissions.manage_forminator_settings)||Or(forminatorData.userPermissions.manage_options)?c().createElement("a",{href:forminatorData.settingsUrl+"§ion=submissions",target:"_blank"},fr("global privacy settings.")):fr("global privacy settings.");return c().createElement("div",{id:"forminator-form-appearance",className:"sui-box"},c().createElement("div",{className:"sui-box-header"},c().createElement("h2",{className:"sui-box-title"},fr("Settings"))),c().createElement("div",{className:"sui-box-body"},c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Data Storage")),c().createElement("span",{className:"sui-description"},fr("By default we will store all submissions in your database."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(Wi,Dh({},this.props,{label:fr("Store Submissions in Database"),property:"store_submissions",description:fr("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&&c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("User’s Geolocation")),c().createElement("span",{className:"sui-description"},fr("Enabling this option will attempt to collect and store users' location information when this form is submitted."))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement(Wi,Dh({},this.props,{label:fr("Enable current user’s Geolocation"),property:"geolocation_field",unWrap:!0}),c().createElement("span",{className:"sui-description"},fr("Enable the checkbox to make it mandatory for users to grant access to the location permission to submit this form.")),c().createElement(yi,Dh({},this.props,{label:fr("Require access to users' location"),property:"geolocation_field_required",itemClass:"sui-checkbox-sm sui-checkbox-stacked"})),c().createElement(Sn,Dh({},this.props,{label:fr("Error message"),placeholder:fr("Enter message"),property:"require_geolocation_field",fieldClass:"sui-margin-top"}))))),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Multiple Option Value")),c().createElement("span",{className:"sui-description"},c().createElement("div",null,fr("Choose how you want to handle multiple option values in form submissions and email notifications.")))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label"},fr("Default Stored Value")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("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:c().createElement("strong",null)}})),c().createElement("div",{className:"sui-side-tabs"},c().createElement(ei,Dh({},this.props,{property:"print_value",default:"false"}),c().createElement(si,{value:"false"},fr("Option labels")),c().createElement(si,{value:"true"},fr("Option values"))))))),c().createElement("div",{className:"sui-box-settings-row"},c().createElement("div",{className:"sui-box-settings-col-1"},c().createElement("span",{className:"sui-settings-label"},fr("Privacy")),c().createElement("span",{className:"sui-description"},c().createElement("div",null,fr("Choose how you want to handle this form's data storage.")),c().createElement("div",null,fr("By default we will use the configuration you have set in your")),c().createElement("div",null,a))),c().createElement("div",{className:"sui-box-settings-col-2"},c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label"},fr("Submissions")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("How long do you want to retain this form's submissions for?")),c().createElement("div",{className:"sui-side-tabs"},c().createElement(ei,Dh({},this.props,{default:"false",property:"enable-submissions-retention"}),c().createElement(ti,{value:"false",label:fr("Use default")},c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Your default setting value is to keep the submissions")," ",s))))),c().createElement(ti,Dh({},this.props,{value:"true",boxClass:"sui-tab-boxed",label:fr("Custom")}),c().createElement(xn,null,c().createElement(Nn,{cols:"6"},c().createElement(Sn,Dh({},this.props,{type:"number",placeholder:"10",property:"submissions-retention-number"}))),c().createElement(Nn,{cols:"6"},c().createElement(zn,Dh({},this.props,{property:"submissions-retention-unit",defaultValue:"days"}),c().createElement("option",{value:"days"},fr("Days")),c().createElement("option",{value:"weeks"},fr("Weeks")),c().createElement("option",{value:"months"},fr("Months")),c().createElement("option",{value:"years"},fr("Years"))))),c().createElement("span",{className:"sui-description"},fr("Leave the field blank to retain submissions forever.")))))),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label"},fr("Account Erasure Requests")),c().createElement("span",{className:"sui-description",style:{marginBottom:"10px"}},fr("When handling an account erasure request that contains an email associated with a submission, what do you want to do?")),c().createElement("div",{className:"sui-side-tabs"},c().createElement(ei,Dh({},this.props,{property:"enable-submissions-erasure",default:"false"}),c().createElement(ti,{value:"false",label:fr("Use default")},c().createElement("div",{role:"alert",className:"sui-notice sui-active",style:{display:"block"},"aria-live":"assertive"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Your default setting value is to ")," ",r," ",fr(" the submission.")))))),c().createElement(ti,Dh({},this.props,{value:"true",boxClass:"sui-tab-boxed",label:fr("Custom")}),c().createElement(zn,Dh({property:"submission-erasure-remove",defaultValue:"false"},this.props),c().createElement("option",{value:"false"},fr("Retain Submissions")),c().createElement("option",{value:"true"},fr("Remove Submissions"))))))),c().createElement("div",{className:"sui-form-field"},c().createElement("label",{className:"sui-settings-label"},fr("Submission Files")),c().createElement("span",{className:"sui-description"},fr("If your form has file upload field(s), choose whether to delete the file(s) related to a submission when that submission gets deleted.")),c().createElement($n,Dh({},this.props,{property:"submission-file",defaultValue:"delete"}),c().createElement("div",{value:"delete"},fr("Delete")),c().createElement("div",{value:"keep"},fr("Keep"))))))),c().createElement("div",{className:"sui-box-footer"},"leads"===this.props.formType&&c().createElement("button",{className:"sui-button",onClick:()=>e("behaviour")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"})," ",fr("Behavior")),"leads"!==this.props.formType&&c().createElement("button",{className:"sui-button",onClick:()=>e("integrations")},c().createElement("i",{className:"sui-icon-arrow-left","aria-hidden":"true"})," ",fr("Integrations"))))}}var Th=ga(Ah);var jh=le((function(e){return{settings:e.settings,formType:e.settings["form-type"]||"default"}}),(function(s){return{actions:{settingsActions:Tt(e,s),modalActions:Tt(t,s)}}}))(Th);class Mh extends Rr.Component{constructor(e){super(e),this.stickyHeaderRef=c().createRef()}componentDidMount(){this.goToSectionFromUrl(),window.addEventListener("beforeunload",this.handleBeforeunload),window.addEventListener("scroll",this.applySticky.bind(this))}componentWillUnmount(){window.removeEventListener("beforeunload",this.handleBeforeunload)}goToSectionFromUrl(){const e=Dr().gotosection;if(!_.isUndefined(e)){const e=window.location.href;this.props.router.navigate("/"+Dr().gotosection),window.history.replaceState({},document.title,e.slice(0,e.indexOf("&gotosection")))}}applySticky(){const e=this.stickyHeaderRef.current;e.getBoundingClientRect().top<=parseInt(window.getComputedStyle(e).top.replace("px",""))?e.classList.add("sui-is-sticky"):e.classList.remove("sui-is-sticky")}handleBeforeunload(e){if(window.forminatorChanges.length>0||!0===window.forminatorChanges.settings)return e.preventDefault(),e.returnValue=fr("You have unsaved changes, are you sure want to leave this page"),fr("You have unsaved changes, are you sure want to leave this page")}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";return!0===this.disableRegistrationForm()?c().createElement("div",{className:"sui-notice sui-notice-red sui-active"},c().createElement("div",{className:"sui-notice-content"},c().createElement("div",{className:"sui-notice-message"},c().createElement("span",{className:"sui-notice-icon sui-icon-info","aria-hidden":"true"}),c().createElement("p",null,fr("Sorry, you are not allowed to access this page."))))):c().createElement("div",null,c().createElement(ta,null),c().createElement("div",{className:"sui-row-with-sidenav"},c().createElement(wa,this.props),c().createElement("div",{className:`forminator-${e}-builder`},c().createElement("div",{id:"forminator-builder-status",className:"sui-box sui-box-sticky",ref:this.stickyHeaderRef},c().createElement(Ta,null)),c().createElement(xt,null,c().createElement(_t,{path:"/",element:c().createElement(Et,{to:"/builder",replace:!0})}),c().createElement(_t,{path:"/builder",element:c().createElement(ln,null)}),c().createElement(_t,{path:"/builder/:tab",element:c().createElement(ln,null)}),c().createElement(_t,{path:"/appearance",element:c().createElement(Ku,null)}),"registration"===e&&c().createElement(_t,{path:"/registration",element:c().createElement(md,null)}),"login"===e&&c().createElement(_t,{path:"/login",element:c().createElement(Ed,null)}),c().createElement(_t,{path:"/behaviour",element:c().createElement(Bd,null)}),c().createElement(_t,{path:"/behaviour/:tab",element:c().createElement(Bd,null)}),c().createElement(_t,{path:"/pdf",element:c().createElement(Km,null)}),c().createElement(_t,{path:"/notifications",element:c().createElement(sh,null)}),c().createElement(_t,{path:"/notifications/:tab",element:c().createElement(sh,null)}),c().createElement(_t,{path:"/integrations",element:c().createElement(Oh,null)}),c().createElement(_t,{path:"/settings",element:c().createElement(jh,null)})))),c().createElement(sc,this.props))}}var Uh=ga(Mh);const Ih=function(e){return zt({reducer:Vr,middleware:e=>e(),preloadedState:e})}(forminatorData.currentForm);Qt().setLocale(forminatorl10n.locale),window.forminatorChanges={fields:[],settings:!1},window.jQueryFormi=jQuery.noConflict(),function(e,t){const s=document.getElementById(e);if(_.isNull(s))return;(0,u.H)(s).render(t)}("forminator-form-builder",c().createElement(pe,{store:Ih},c().createElement(vt,null,c().createElement(xt,null,c().createElement(_t,{path:"*",element:c().createElement(Uh,null)})))))}()}();