PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | assets/build/blocks/form-builder/view.js +7 -1 2.9.1 → 2.14.0 View file →
@@ -1 +1,7 @@
1 -(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{hasBrowserEnv:()=>he,hasStandardBrowserEnv:()=>me,hasStandardBrowserWebWorkerEnv:()=>be,navigator:()=>pe,origin:()=>ye});const n=window.wp.date,r=window.wp.i18n;function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:i}=Object,a=(c=Object.create(null),e=>{const t=s.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const l=e=>(e=e.toLowerCase(),t=>a(t)===e),u=e=>t=>typeof t===e,{isArray:d}=Array,f=u("undefined"),h=l("ArrayBuffer"),p=u("string"),m=u("function"),b=u("number"),y=e=>null!==e&&"object"==typeof e,g=e=>{if("object"!==a(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},w=l("Date"),E=l("File"),S=l("Blob"),O=l("FileList"),R=l("URLSearchParams"),[T,A,v,_]=["ReadableStream","Request","Response","Headers"].map(l);function x(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),d(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function k(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,j=e=>!f(e)&&e!==C,N=(P="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>P&&e instanceof P);var P;const L=l("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),D=l("RegExp"),F=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};x(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",q="0123456789",I={DIGIT:q,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+q},M=l("AsyncFunction"),H=(z="function"==typeof setImmediate,J=m(C.postMessage),z?setImmediate:J?(W=`axios@${Math.random()}`,V=[],C.addEventListener("message",(({source:e,data:t})=>{e===C&&t===W&&V.length&&V.shift()()}),!1),e=>{V.push(e),C.postMessage(W,"*")}):e=>setTimeout(e));var z,J,W,V;const Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(C):"undefined"!=typeof process&&process.nextTick||H,K={isArray:d,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=a(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:p,isNumber:b,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:g,isReadableStream:T,isRequest:A,isResponse:v,isHeaders:_,isUndefined:f,isDate:w,isFile:E,isBlob:S,isRegExp:D,isFunction:m,isStream:e=>y(e)&&m(e.pipe),isURLSearchParams:R,isTypedArray:N,isFileList:O,forEach:x,merge:function e(){const{caseless:t}=j(this)&&this||{},n={},r=(r,o)=>{const s=t&&k(n,o)||o;g(n[s])&&g(r)?n[s]=e(n[s],r):g(r)?n[s]=e({},r):d(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&x(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(x(t,((t,r)=>{n&&m(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:l,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!b(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:L,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:F,freezeMethods:e=>{F(e,((t,n)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];m(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return d(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:k,global:C,isContextDefined:j,ALPHABET:I,generateString:(e=16,t=I.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=d(e)?[]:{};return x(e,((e,t)=>{const s=n(e,r+1);!f(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:M,isThenable:e=>e&&(y(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:H,asap:Y};function $(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}K.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const G=$.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties($,X),Object.defineProperty(G,"isAxiosError",{value:!0}),$.from=(e,t,n,r,o,s)=>{const i=Object.create(G);return K.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),$.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Q=$;function Z(e){return K.isPlainObject(e)||K.isArray(e)}function ee(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function te(e,t,n){return e?e.concat(t).map((function(e,t){return e=ee(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ne=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)})),re=function(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!a&&K.isBlob(e))throw new Q("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(Z)}(e)||(K.isFileList(e)||K.endsWith(n,"[]"))&&(a=K.toArray(e)))return n=ee(n),a.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===i?te([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!Z(e)||(t.append(te(o,n,s),c(e)),!1)}const u=[],d=Object.assign(ne,{defaultVisitor:l,convertValue:c,isVisitable:Z});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!K.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),K.forEach(n,(function(n,s){!0===(!(K.isUndefined(n)||null===n)&&o.call(t,n,K.isString(s)?s.trim():s,r,d))&&e(n,r?r.concat(s):[s])})),u.pop()}}(e),t};function oe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function se(e,t){this._pairs=[],e&&re(e,this,t)}const ie=se.prototype;ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){const t=e?function(t){return e.call(this,t,oe)}:oe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ae=se;function ce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function le(e,t,n){if(!t)return e;const r=n&&n.encode||ce,o=n&&n.serialize;let s;if(s=o?o(t,n):K.isURLSearchParams(t)?t.toString():new ae(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},de={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ae,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},he="undefined"!=typeof window&&"undefined"!=typeof document,pe="object"==typeof navigator&&navigator||void 0,me=he&&(!pe||["ReactNative","NativeScript","NS"].indexOf(pe.product)<0),be="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ye=he&&window.location.href||"http://localhost",ge={...t,...fe},we=function(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;return s=!s&&K.isArray(r)?r.length:s,a?(K.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i):(r[s]&&K.isObject(r[s])||(r[s]=[]),t(e,n,r[s],o)&&K.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,((e,r)=>{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},Ee={transitional:de,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=K.isObject(e);if(o&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r?JSON.stringify(we(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return re(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ge.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return re(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ee.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Q.from(e,Q.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(e=>{Ee.headers[e]={}}));const Se=Ee,Oe=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Re=Symbol("internals");function Te(e){return e&&String(e).trim().toLowerCase()}function Ae(e){return!1===e||null==e?e:K.isArray(e)?e.map(Ae):String(e)}function ve(e,t,n,r,o){return K.isFunction(r)?r.call(this,t,n):(o&&(t=n),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Te(t);if(!o)throw new Error("header name must be a non-empty string");const s=K.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Ae(e))}const s=(e,t)=>K.forEach(e,((e,n)=>o(e,n,t)));if(K.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Oe[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(K.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Te(e)){const n=K.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(K.isFunction(t))return t.call(this,e,n);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Te(e)){const n=K.findKey(this,e);return!(!n||void 0===this[n]||t&&!ve(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Te(e)){const o=K.findKey(n,e);!o||t&&!ve(0,n[o],o,t)||(delete n[o],r=!0)}}return K.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ve(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return K.forEach(this,((r,o)=>{const s=K.findKey(n,o);if(s)return t[s]=Ae(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=Ae(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&K.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Re]=this[Re]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Te(e);t[r]||(function(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(_e.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),K.freezeMethods(_e);const xe=_e;function ke(e,t){const n=this||Se,r=t||n,o=xe.from(r.headers);let s=r.data;return K.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function Ce(e){return!(!e||!e.__CANCEL__)}function je(e,t,n){Q.call(this,null==e?"canceled":e,Q.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(je,Q,{__CANCEL__:!0});const Ne=je;function Pe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Q("Request failed with status code "+n.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Le=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[i];o||(o=c),n[s]=a,r[s]=c;let u=i,d=0;for(;u!==s;)d+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const f=l&&c-l;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout((()=>{r=null,i(n)}),s-a)))},()=>n&&i(n)]}((n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},Be=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},De=e=>(...t)=>K.asap((()=>e(...t))),Fe=ge.hasStandardBrowserEnv?function(){const e=ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=K.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Ue=ge.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];K.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),K.isString(r)&&i.push("path="+r),K.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ie=e=>e instanceof xe?{...e}:e;function Me(e,t){t=t||{};const n={};function r(e,t,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function o(e,t,n){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!K.isUndefined(t))return r(void 0,t)}function i(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o(Ie(e),Ie(t),!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);K.isUndefined(i)&&s!==a||(n[r]=i)})),n}const He=e=>{const t=Me({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=xe.from(a),t.url=le(qe(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(r))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ge.hasStandardBrowserEnv&&(o&&K.isFunction(o)&&(o=o(t)),o||!1!==o&&Fe(t.url))){const e=s&&i&&Ue.read(i);e&&a.set(s,e)}return t},ze="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=He(e);let o=r.data;const s=xe.from(r.headers).normalize();let i,a,c,l,u,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function b(){if(!m)return;const r=xe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Pe((function(e){t(e),p()}),(function(e){n(e),p()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(b)},m.onabort=function(){m&&(n(new Q("Request aborted",Q.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Q("Network Error",Q.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||de;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Q(t,o.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&K.forEach(s.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),K.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([c,u]=Le(h,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,l]=Le(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Ne(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===ge.protocols.indexOf(y)?n(new Q("Unsupported protocol "+y+":",Q.ERR_BAD_REQUEST,e)):m.send(o||null)}))},Je=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Q?t:new Ne(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new Q(`timeout ${t} of ms exceeded`,Q.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=()=>K.asap(i),a}},We=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Ve=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*We(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Ye="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ke=Ye&&"function"==typeof ReadableStream,$e=Ye&&("function"==typeof TextEncoder?(Ge=new TextEncoder,e=>Ge.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ge;const Xe=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Qe=Ke&&Xe((()=>{let e=!1;const t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ze=Ke&&Xe((()=>K.isReadableStream(new Response("").body))),et={stream:Ze&&(e=>e.body)};var tt;Ye&&(tt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!et[e]&&(et[e]=K.isFunction(tt[e])?t=>t[e]():(t,n)=>{throw new Q(`Response type '${e}' is not supported`,Q.ERR_NOT_SUPPORT,n)})})));const nt={http:null,xhr:ze,fetch:Ye&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:f}=He(e);l=l?(l+"").toLowerCase():"text";let h,p=Je([o,s&&s.toAbortSignal()],i);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(c&&Qe&&"get"!==n&&"head"!==n&&0!==(b=await(async(e,t)=>{const n=K.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new Request(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await $e(e)).byteLength:void 0)})(t):n})(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(K.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Be(b,Le(De(c)));r=Ve(n.body,65536,e,t)}}K.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;h=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let s=await fetch(h);const i=Ze&&("stream"===l||"response"===l);if(Ze&&(a||i&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=K.toFiniteNumber(s.headers.get("content-length")),[n,r]=a&&Be(t,Le(De(a),!0))||[];s=new Response(Ve(s.body,65536,n,(()=>{r&&r(),m&&m()})),e)}l=l||"text";let y=await et[K.findKey(et,l)||"text"](s,e);return!i&&m&&m(),await new Promise(((t,n)=>{Pe(t,n,{data:y,headers:xe.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:h})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Q("Network Error",Q.ERR_NETWORK,e,h),{cause:t.cause||t});throw Q.from(t,t&&t.code,e,h)}})};K.forEach(nt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const rt=e=>`- ${e}`,ot=e=>K.isFunction(e)||null===e||!1===e,st=e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!ot(n)&&(r=nt[(t=String(n)).toLowerCase()],void 0===r))throw new Q(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(rt).join("\n"):" "+rt(e[0]):"as no adapter specified";throw new Q("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function it(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ne(null,e)}function at(e){return it(e),e.headers=xe.from(e.headers),e.data=ke.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),st(e.adapter||Se.adapter)(e).then((function(t){return it(e),t.data=ke.call(e,e.transformResponse,t),t.headers=xe.from(t.headers),t}),(function(t){return Ce(t)||(it(e),t&&t.response&&(t.response.data=ke.call(e,e.transformResponse,t.response),t.response.headers=xe.from(t.response.headers))),Promise.reject(t)}))}const ct={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ct[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const lt={};ct.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new Q(r(o," has been removed"+(t?" in "+t:"")),Q.ERR_DEPRECATED);return t&&!lt[o]&&(lt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};const ut={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new Q("option "+s+" must be "+n,Q.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Q("Unknown option "+s,Q.ERR_BAD_OPTION)}},validators:ct},dt=ut.validators;class ft{constructor(e){this.defaults=e,this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Me(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ut.assertOptions(n,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean)},!1),null!=r&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:ut.assertOptions(r,{encode:dt.function,serialize:dt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&K.merge(o.common,o[t.method]);o&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=xe.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[at.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=i.length;let f=t;for(d=0;d<u;){const e=i[d++],t=i[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=at.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return le(qe((e=Me(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}K.forEach(["delete","get","head","options"],(function(e){ft.prototype[e]=function(t,n){return this.request(Me(n||{},{method:e,url:t,data:(n||{}).data}))}})),K.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Me(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ft.prototype[e]=t(),ft.prototype[e+"Form"]=t(!0)}));const ht=ft;class pt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Ne(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new pt((function(t){e=t})),cancel:e}}}const mt=pt,bt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bt).forEach((([e,t])=>{bt[t]=e}));const yt=bt,gt=function e(t){const n=new ht(t),r=o(ht.prototype.request,n);return K.extend(r,ht.prototype,n,{allOwnKeys:!0}),K.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Me(t,n))},r}(Se);gt.Axios=ht,gt.CanceledError=Ne,gt.CancelToken=mt,gt.isCancel=Ce,gt.VERSION="1.7.7",gt.toFormData=re,gt.AxiosError=Q,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=Me,gt.AxiosHeaders=xe,gt.formToJSON=e=>we(K.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=st,gt.HttpStatusCode=yt,gt.default=gt;const wt=gt;var Et;window.lodash;const{ajax_url:St,namespace:Ot,plugin_root_path:Rt,plugin_root_url:Tt,is_pro:At,route_path:vt,menu:_t,nonce:xt,addons:kt,ablocks_nonce:Ct,rest_url:jt,toplevel_menu_icon_url:Nt,third_party_plugin_status:Pt,settings:Lt,site_url:Bt,blocks_status:Dt,theme_builder:Ft,admin_url:Ut,is_fse_theme:qt}=null!==(Et=window.ABlocksGlobal)&&void 0!==Et?Et:{};wt.create({baseURL:jt,headers:{"content-type":"application/json","X-WP-Nonce":xt,"Cache-Control":"no-cache"}}),(0,n.dateI18n)("M j, Y",new Date),(0,n.dateI18n)("F j, Y",new Date),(0,n.dateI18n)("m/d/Y",new Date),(0,n.dateI18n)("m-d-Y",new Date),(0,n.dateI18n)("m.d.Y",new Date),(0,n.dateI18n)("d M Y",new Date),(0,n.dateI18n)("d F Y",new Date),(0,n.dateI18n)("d-m-Y",new Date),(0,n.dateI18n)("d.m.Y",new Date),(0,n.dateI18n)("d/m/Y",new Date),(0,n.dateI18n)("Y-m-d",new Date),(0,n.dateI18n)("Y.m.d",new Date),(0,n.dateI18n)("Y/m/d",new Date),(0,n.dateI18n)("M, Y",new Date),(0,n.dateI18n)("M Y",new Date),(0,n.dateI18n)("F, Y",new Date),(0,n.dateI18n)("F Y",new Date),(0,r.__)("Normal Text","ablocks");const It=class{constructor(e){this.form=e?.querySelector("form.ablocks-form-builder"),this.formParent=this.form?.parentNode,this.submitButtonDiv=e?.querySelector(".ablocks-form-builder__submit-button"),this.submitButton=this.form.querySelector('button[type="submit"]'),this.submitButtonText=this.submitButton?.innerText,this.init()}init(){this.form.querySelector('input[name="security"]').setAttribute("value",Ct),this.feedbackContainer=this.formParent.querySelector(".ablocks-block--form-builder__feedback-message"),this.feedbackContainer.style.display="none",this.form.addEventListener("submit",this.handleSubmit.bind(this))}async handleSubmit(e){if(e.preventDefault(),!this.validateFields()){const e=this.form?.querySelector(".ablocks-block--form-multi-step");e||this.setLoadingState(!0);const t=new FormData(this.form),n=Object.fromEntries(t);this.collectCheckedOptionsText(n);try{const e=await(async(e={},t=!1)=>{let n=new FormData;return n.append("security",Ct),Object.entries(e).forEach((([e,r])=>{t||"object"!=typeof r||null===r?n.append(e,r):n.append(e,JSON.stringify(r))})),await wt.post(St,n).then((e=>e),(e=>e.response))})(n);e&&this.handleResponse(e)}catch(e){this.showFeedbackMessage("An error occurred. Please try again.","error")}finally{this.setLoadingState(!1)}}}validateFields(){let e=!1;return this.form.querySelectorAll(".ablocks-form-builder__field").forEach((t=>{const n="true"===t.getAttribute("data-required"),r=t.querySelector("input, textarea"),o=t.querySelector("select"),s=t.querySelector('input[type="checkbox"]'),i=t.querySelector('input[type="radio"]'),a=t.querySelectorAll(".ablocks-form-builder__radio-option"),c=t.querySelector('input[type="radio"]:checked');let l=!0;if(a?.length>=1){const e=parseInt(t?.getAttribute("data-minimum-value")),r=parseInt(t?.getAttribute("data-maximum-value")),o=Array.from(a).filter((e=>e.classList.contains("checked"))).length;e>o&&n?(this.showFeedbackMessage(`At Least Select ${e} Value`,"error"),l=!1):r<o&&n?(l=!1,this.showFeedbackMessage(`Never Select More Than ${r} Value`,"error")):n&&o<1&&(this.showFeedbackMessage("Checkbox Field Are Required","error"),l=!1)}n&&(s&&!s.checked||i&&!c||r&&""===r.value.trim()||o&&""===o.value)&&(l=!1),t.classList.toggle("error-msg",!l),l||(e=!0)})),e}collectCheckedOptionsText(e){this.form.querySelectorAll(".ablocks-form-builder__field").forEach((t=>{const n=t.querySelectorAll(".ablocks-form-builder__radio-option"),r=t.querySelectorAll('input[type="radio"]');if(n.length>0){const r=[];if(n.forEach((e=>{e.classList.contains("checked")&&r.push(e.innerText.trim())})),r.length>0){const n=t.querySelector('input[type="checkbox"]')?.name;n&&(e[n]=r.join(", "))}}if(r.length>0){const t=Array.from(r).find((e=>e.checked));if(t){const n=t.name,r=t.parentElement.innerText.trim();e[n]=r}}}))}setLoadingState(e){!this.originalButtonHeight&&this.submitButton&&(this.originalButtonHeight=this.submitButton.offsetHeight),e?(this.submitButton.innerText="",this.submitButton.classList.add("loading"),this.submitButton.style.height=`${this.originalButtonHeight}px`):(this.submitButton.innerText=this.submitButtonText,this.submitButton.classList.remove("loading"),this.submitButton.style.height="")}handleResponse(e){const t=e?.data?.success,n=e?.data?.data?.message,r=t?"success":"error",o=n;this.showFeedbackMessage(o,r);const s=e?.data?.data?.redirect_url,i=e?.data?.data?.link_target;t&&s?i?window.open(s,"_blank"):window.location.href=s:!0===t&&setTimeout((()=>{window.location.reload()}),1e3)}showFeedbackMessage(e,t){this.feedbackContainer.style.display="block",this.feedbackContainer.innerHTML=`<p class="${t}-msg">${e}</p>`,this.feedbackContainer.className="ablocks-block--form-builder__feedback-message",this.feedbackContainer.classList.add("ablocks-block--form-builder__"+t)}};document.addEventListener("DOMContentLoaded",(()=>{!function(){const e=document.querySelectorAll(".ablocks-block--form-builder");e?.forEach((e=>{new It(e)}))}()}))})();
1 +(()=>{"use strict";const t={baseURL:window.ABlocksGlobal?.rest_url,async request(t,{method:e="GET",params:i={},data:s=null,headers:o={}}={}){let a=`${this.baseURL}${t}`;Object.keys(i).length&&(a+=`?${new URLSearchParams(i).toString()}`);const r={method:e,headers:{"X-WP-Nonce":window.ABlocksGlobal?.nonce,...o},credentials:"same-origin"};"GET"!==e&&s&&(s instanceof FormData?r.body=s:(r.headers["Content-Type"]="application/json",r.body=JSON.stringify(s)));const n=await fetch(a,r);if(!n.ok)throw new Error(`HTTP error: ${n.status}`);return{data:await n.json()}},get(t,e={},i={}){return this.request(t,{method:"GET",params:e,...i})},post(t,e={},i={}){return this.request(t,{method:"POST",data:e,...i})},delete(t,e={},i={}){return this.request(t,{method:"DELETE",data:e,...i})},put(t,e={},i={}){return this.request(t,{method:"PUT",data:e,...i})},patch(t,e={},i={}){return this.request(t,{method:"PATCH",data:e,...i})}},e=class{constructor(t){this.form=t?.querySelector("form.ablocks-form-builder"),
2 +this.formParent=this.form?.parentNode,this.submitButtonDiv=t?.querySelector(".ablocks-form-builder__submit-button"),this.submitButton=this.form.querySelector('button[type="submit"]'),this.submitButtonText=this.submitButton?.innerText,this.isSubmitting=!1,this.init()}init(){this.feedbackContainer=this.formParent.querySelector(".ablocks-block--form-builder__feedback-message"),this.feedbackContainer.style.display="none",this.form.addEventListener("submit",this.handleSubmit.bind(this))}async handleSubmit(e){if(e.preventDefault(),this.submitButton=this.form.querySelector('button[type="submit"]'),this.submitButtonText=this.submitButton?.innerText,this.submitButton&&!this.isSubmitting)if(this.isSubmitting=!0,this.submitButton.disabled=!0,this.validateFields())this.isSubmitting=!1,this.submitButton.disabled=!1;else try{this.setLoadingState(!0);const e=new FormData(this.form);this.collectCheckedOptionsText(e);const i=e.get("action").replace("ablocks/form_builder_","").replace("_handler","")
3 +;e.delete("security"),e.delete("action");const s=new FormData,o={};for(const[t,i]of e.entries())if(t.endsWith("[]")){const e=t.slice(0,-2),a=o[e]||0;s.append(`${e}[${a}]`,i),o[e]=a+1}else s.has(t)||s.append(t,i);const a=await t.post(window.ABlocksGlobal?.namespace+`form-builder/${i}`,s);this.handleResponse(a)}catch(t){t.response?this.handleResponse(t.response):this.showFeedbackMessage("An error occurred. Please try again.","error")}finally{this.setLoadingState(!1),this.isSubmitting=!1,this.submitButton.disabled=!1}}collectFieldLabels(t){this.form.querySelectorAll(".ablocks-form-builder__field").forEach(e=>{const i=e.querySelectorAll("input, textarea, select"),s=e.querySelector(".ablocks-form-builder__label");i.forEach(e=>{if(e&&e.name){let i="";const o=e.tagName.toLowerCase();i=s&&s.textContent.trim()?s.textContent.trim():e.placeholder?e.placeholder:e.name,t.append(`${e.name}_label`,i),t.append(`${e.name}_inputType`,o)}})})}validateFields(){let t=!1
4 +;return this.form.querySelectorAll(".ablocks-form-builder__field").forEach(e=>{const i="true"===e.getAttribute("data-required"),s=e.querySelector("input, textarea"),o=e.querySelector("select"),a=e.querySelector('input[type="checkbox"]'),r=e.querySelector('input[type="radio"]'),n=e.querySelectorAll(".ablocks-form-builder__radio-option"),l=e.querySelector('input[type="radio"]:checked');let c=!0;if(n?.length>=1){const t=parseInt(e?.getAttribute("data-minimum-value")),s=parseInt(e?.getAttribute("data-maximum-value")),o=Array.from(n).filter(t=>t.classList.contains("checked")).length;t>o&&i?(this.showFeedbackMessage(`At Least Select ${t} Value`,"error"),c=!1):s<o&&i?(c=!1,this.showFeedbackMessage(`Never Select More Than ${s} Value`,"error")):i&&o<1&&(this.showFeedbackMessage("Checkbox Field Are Required","error"),c=!1)}i&&(a&&0===n.length&&!a.checked||r&&!l||s&&""===s.value.trim()||o&&""===o.value)&&(c=!1),e.classList.toggle("error-msg",!c),c||(t=!0)}),t}collectCheckedOptionsText(t){
5 +this.form.querySelectorAll(".ablocks-form-builder__field").forEach(e=>{const i=e.querySelectorAll(".ablocks-form-builder__radio-option"),s=e.querySelectorAll('input[type="radio"]');if(i.length>0){const s=[];if(i.forEach(t=>{t.classList.contains("checked")&&s.push(t.innerText.trim())}),s.length>0){const i=e.querySelector('input[type="checkbox"]')?.name;i&&(t[i]=s.join(", "))}}if(s.length>0){const e=Array.from(s).find(t=>t.checked);if(e){const i=e.name,s=e.parentElement.innerText.trim();t[i]=s}}})}setLoadingState(t){this.submitButton&&(!this.originalButtonHeight&&this.submitButton&&(this.originalButtonHeight=this.submitButton.offsetHeight),t?(this.originalButtonWidth=this.submitButton.offsetWidth,this.submitButton.style.width=`${this.originalButtonWidth}px`,this.submitButton.disabled=!0,this.submitButton.innerText="",this.submitButton.classList.add("loading"),this.submitButton.style.height=`${this.originalButtonHeight}px`):(this.submitButton.disabled=!1,this.submitButton.style.width="",
6 +this.submitButton.innerText=this.submitButtonText,this.submitButton.classList.remove("loading"),this.submitButton.style.height=""))}handleResponse(t){const e=t?.data?.success,i=e?t?.data?.data?.confirmationNotice:t?.data?.data?.message,s=t?.data?.data?.afterFormSubmission,o=t?.data?.data?.confirmationType,a=e?"success":"error",r=i,n=t?.data?.data?.redirect_url,l=t?.data?.data?.link_target,c=t?.data?.data?.formType;("success"===o||l)&&this.showFeedbackMessage(r,a),e&&n&&"redirect"===o?l?(this.form.reset(),window.open(n,"_blank"),"hide"===s&&(this.form.style.display="none"),"login"!==c&&"registration"!==c||setTimeout(()=>{window.location.reload()},2e3)):"login"===c||"registration"===c?(this.showFeedbackMessage(r,a),setTimeout(()=>{window.location.href=n},2e3)):window.location.href=n:!0===e&&"reset"===s?(this.form.reset(),"login"===c||"registration"===c?setTimeout(()=>{window.location.reload()},2e3):setTimeout(()=>{this.feedbackContainer.style.display="none"
7 +},2e4)):!0===e&&"hide"===s&&(this.form.reset(),this.form.style.display="none",setTimeout(()=>{this.form.style.display="flex",this.feedbackContainer.style.display="none"},2e4))}showFeedbackMessage(t,e){this.feedbackContainer.style.display="block",this.feedbackContainer.innerHTML=`<p class="${e}-msg">${t}</p>`,this.feedbackContainer.className="ablocks-block--form-builder__feedback-message",this.feedbackContainer.classList.add("ablocks-block--form-builder__"+e)}};document.addEventListener("DOMContentLoaded",function(){!function(t,e,i="ablocksInitialized"){t&&("function"==typeof t.forEach?t:[t]).forEach(t=>{t&&t.dataset&&!t.dataset[i]&&(t.dataset[i]="1",e(t))})}(document.querySelectorAll(".ablocks-block--form-builder"),t=>{new e(t)},"ablocksFormBuilderInit")})})();