File Editor
Directories:
.. (Back)
admin
packages
Files:
addons-page.js
bootstrap-multiselect.js
bootstrap.min.js
form-templates.js
formidable.js
formidable.min.js
formidable_admin.js
formidable_admin_global.js
formidable_blocks.js
formidable_dashboard.js
formidable_overlay.js
formidable_styles.js
onboarding-wizard.js
plugin-search.js
popper.min.js
Create New File
Create
Edit File: onboarding-wizard.js
/*! For license information please see onboarding-wizard.js.LICENSE.txt */ !function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,r(o.key),o)}}function r(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}var n=function(){return t=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.elements=e,this.type=r,this.prepareElements()},r=[{key:"fadeIn",value:function(){var t=this;this.applyStyleToElements((function(e){e.classList.add("frm-fadein-up"),e.addEventListener("animationend",(function(){t.resetOpacity(),e.classList.remove("frm-fadein-up")}),{once:!0})}))}},{key:"cascadeFadeIn",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.03;setTimeout((function(){t.applyStyleToElements((function(t,r){t.classList.remove("frm-animate"),t.style.transitionDelay=(r+1)*e+"s"}))}),200)}},{key:"prepareElements",value:function(){var t=this;this.applyStyleToElements((function(e){"default"===t.type&&(e.style.opacity="0.0"),"cascade"===t.type&&e.classList.add("frm-init-cascade-animation"),"cascade-3d"===t.type&&e.classList.add("frm-init-fadein-3d"),e.classList.add("frm-animate")}))}},{key:"resetOpacity",value:function(){this.applyStyleToElements((function(t){return t.style.opacity="1.0"}))}},{key:"applyStyleToElements",value:function(t){this.elements instanceof Element?t(this.elements,0):0<this.elements.length&&this.elements.forEach((function(e,r){return t(e,r)}))}}],r&&e(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(),o=Promise.resolve(),i=window.frmDom.util.onClickPreventDefault;function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}var c=new URL(window.location.href),u=c.searchParams,l=function(t){return u.get(t)},s=function(t){return u.delete(t),c.search=u.toString(),c.toString()},f=window.frmGlobal,p=(f.url,f.nonce),h="frm_hidden",y="frm-current";function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){m(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function m(t,e,r){return(e=function(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}var b=window.frmOnboardingWizardVars.INITIAL_STEP,w="frm-onboarding",S={INITIAL:b,INSTALL_ADDONS:"install-addons",SUCCESS:"success",UNSUCCESSFUL:"unsuccessful"};function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){j(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function j(t,e,r){return(e=function(t){var e=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==O(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}var x=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("object"!==O(t)||null===t)throw new Error("createPageState: initialState must be a non-null object");var e=t;return{getState:function(){return e},getSingleState:function(t){var r=Reflect.get(e,t);return void 0===r?null:r},setState:function(t){if("object"!==O(t)||null===t)throw new Error("setState: newState must be a non-null object");e=L(L({},e),t)},setSingleState:function(t,r){Reflect.has(e,t)&&Reflect.set(e,t,r)}}}({processedSteps:[],installedAddons:[]}),P=x.getState,_=(x.getSingleState,x.setState,x.setSingleState),k=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("object"!==g(t)||null===t)throw new Error("createPageElements: initialElements must be a non-null object");var e=t;return{getElements:function(){return e},addElements:function(t){if("object"!==g(t)||null===t)throw new Error("addElements: newElements must be a non-null object");e=v(v({},e),t)}}}({onboardingWizardPage:document.getElementById("".concat(w,"-wizard-page")),container:document.getElementById("".concat(w,"-container")),rootline:document.getElementById("".concat(w,"-rootline")),steps:document.querySelectorAll(".".concat(w,"-step")),skipStepButtons:document.querySelectorAll(".".concat(w,"-skip-step")),backButtons:document.querySelectorAll(".".concat(w,"-back-button")),consentTrackingButton:document.getElementById("".concat(w,"-consent-tracking")),installAddonsButton:document.getElementById("".concat(w,"-install-addons-button")),hiddenLicenseKeyInput:document.getElementById("frm-license-key")}),T=k.getElements;k.addElements;var A=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pushState",o=document.querySelector(".".concat(w,'-step[data-step-name="').concat(t,'"]'));if(o){var i=document.querySelector(".".concat(w,"-step.").concat(y));i&&(i.classList.remove(y),null==(e=i)||e.classList.add(h)),o.classList.add(y),function(t){null==t||t.classList.remove(h)}(o),new n(o).fadeIn(),T().onboardingWizardPage.setAttribute("data-current-step",t),function(t,e){var r,n,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"pushState";if(u.set(t,e),c.search=u.toString(),["pushState","replaceState"].includes(i)){var l=(r={},o=e,(n=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(n=t))in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,r);window.history[i](l,"",c)}c.toString()}("step",t,r),function(t){t===S.UNSUCCESSFUL&&(t=S.SUCCESS);var e=T().rootline,r=e.querySelector('.frm-rootline-item[data-step="'.concat(t,'"]'));e.querySelectorAll(".frm-rootline-item").forEach((function(t){t.classList.remove(N),t.classList.remove(y)}));var n=r.previousElementSibling;if(n)for(;n;)n.classList.add(N),n=n.previousElementSibling;t===S.SUCCESS?r.classList.add(N):r.classList.add(y)}(t)}},I=function(){var t=document.querySelector(".".concat(w,"-step.").concat(y)),e=null==t?void 0:t.nextElementSibling;if(e){var r=t.dataset.stepName,n=e.dataset.stepName,o=P().processedSteps;o.includes(r)||(o.push(r),_("processedSteps",o)),function(t,e){var r=function(t,e){var r;if(S.SUCCESS===e||S.UNSUCCESSFUL===e){var n=P().processedSteps;n.length>1&&(n.includes(e)||n.push(e),(r=new FormData).append("processed_steps",n.join(",")),r.append("completed_steps",!0))}if(S.INSTALL_ADDONS===t){var o,i=P().installedAddons;i.length>0&&(r=null!==(o=r)&&void 0!==o?o:new FormData).append("installed_addons",i.join(","))}return r}(t,e);r&&(0,frmDom.ajax.doJsonPost)("onboarding_setup_usage_data",r)}(r,n),A(n)}};var N="frm-completed-step",D=".frm-option-box";function C(t){"input"===t.target.tagName.toLowerCase()&&t.currentTarget.closest(D).classList.toggle("frm-checked")}var F=function(){I()},U=function(){var t,e;(e=null==(t=document.querySelector(".".concat(w,"-step.").concat(y)))?void 0:t.previousElementSibling)&&A(e.dataset.stepName)};function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function B(){B=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:x(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(A([])));E&&E!==r&&n.call(E,a)&&(w=E);var L=b.prototype=m.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==G(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function x(e,r,n){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:h,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(G(e)+" is not iterable")}return g.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function q(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var Y=function(){var t,e=(t=B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(0,frmDom.ajax.doJsonPost)("onboarding_consent_tracking",new FormData).then(I);case 2:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){q(i,n,o,a,c,"next",t)}function c(t){q(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();function z(t){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z(t)}function R(){R=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new T(n||[]);return o(a,"_invoke",{value:x(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(A([])));E&&E!==r&&n.call(E,a)&&(w=E);var L=b.prototype=m.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==z(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function x(e,r,n){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:h,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(z(e)+" is not iterable")}return g.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function W(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return J(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function K(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function M(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){K(i,n,o,a,c,"next",t)}function c(t){K(i,n,o,a,c,"throw",t)}a(void 0)}))}}var V=function(){var t=M(R().mark((function t(e){var r,n,i,a,c,u,l;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=document.querySelectorAll(".frm-option-box.frm-checked:not(.frm-disabled)"),n=P(),i=n.installedAddons,(a=e.currentTarget).classList.add("frm_loading_button"),c=W(r),t.prev=5,l=R().mark((function t(){var e,r;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=u.value,t.prev=1,t.next=4,n=function(){return $(e.getAttribute("rel"),e.dataset)},o=o.then(n).catch(n);case 4:r=e.dataset.title,i.includes(r)||i.push(r),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("An error occurred:",t.t0);case 11:case"end":return t.stop()}var n}),t,null,[[1,8]])})),c.s();case 8:if((u=c.n()).done){t.next=12;break}return t.delegateYield(l(),"t0",10);case 10:t.next=8;break;case 12:t.next=17;break;case 14:t.prev=14,t.t1=t.catch(5),c.e(t.t1);case 17:return t.prev=17,c.f(),t.finish(17);case 20:a.classList.remove("frm_loading_button"),_("installedAddons",i),I();case 23:case"end":return t.stop()}}),t,null,[[5,14,17,20]])})));return function(e){return t.apply(this,arguments)}}();function $(t,e){return H.apply(this,arguments)}function H(){return(H=M(R().mark((function t(e,r){var n,o,i,a,c;return R().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.isVendor,o=r.isInstalled,(i=new FormData).append("nonce",p),i.append("plugin",e),a=o?"frm_activate_addon":"frm_install_addon",i.append("action",n?"frm_install_plugin":a),t.prev=6,t.next=9,fetch(ajaxurl,{method:"POST",body:i});case 9:if((c=t.sent).ok){t.next=12;break}throw new Error("Server responded with status ".concat(c.status));case 12:return t.next=14,c.json();case 14:return t.abrupt("return",t.sent);case 17:t.prev=17,t.t0=t.catch(6),console.error("An error occurred:",t.t0);case 20:case"end":return t.stop()}}),t,null,[[6,17]])})))).apply(this,arguments)}function Q(){var t,e;T().skipStepButtons.forEach((function(t){i(t,F)})),T().backButtons.forEach((function(t){i(t,U)})),e=T().consentTrackingButton,i(e,Y),t=T().installAddonsButton,i(t,V),document.querySelectorAll(D).forEach((function(t){t.addEventListener("click",C)}))}window.addEventListener("popstate",(function(t){var e,r=(null===(e=t.state)||void 0===e?void 0:e.step)||l("step");A(r,"replaceState")}));var X,Z=function(){var t,e,r;e="0"===(t=l("success"))?S.UNSUCCESSFUL:T().hiddenLicenseKeyInput||t?S.INSTALL_ADDONS:l("step")||S.INITIAL,s("key"),s("success"),A(e,"replaceState"),r=T().container,new n(r).fadeIn(),Q()};X=function(){Z()},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",X):X())}();
Save Changes
Rename File
Rename