← Back
Editing: fluent_forms_global.js
(()=>{var t,e={68882(t,e,r){"use strict";var i=r(42275).isSafeRestUrl;function n(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=window.fluent_forms_global_var.rest.url,s="".concat(n,"/").concat(e),o=t,a={"X-WP-Nonce":window.fluent_forms_global_var.rest.nonce,Accept:"application/json"};r._locale="user",r.query_timestamp=Date.now(),-1!==["PUT","PATCH","DELETE"].indexOf(t.toUpperCase())&&(a["X-HTTP-Method-Override"]=t,t="POST");var u=r;if("GET"===t.toUpperCase()){var l=window.jQuery.param(window.jQuery.extend(!0,{},r));s+=(-1!==s.indexOf("?")?"&":"?")+l,u=void 0}return i(s,n)?new Promise(function(i,n){window.jQuery.ajax({url:s,type:t,data:u,headers:a,dataType:"json"}).then(function(t){return i(t)}).fail(function(t){if(t&&404===t.status&&-1!==s.indexOf("/fluentform/v1/")&&t.responseJSON&&"rest_no_route"===t.responseJSON.code&&!document.getElementById("ff-rest-unreachable")){var a=window.fluent_forms_global_var&&window.fluent_forms_global_var.i18n_rest_404||"Fluent Forms REST endpoints are unreachable on this site. This sometimes happens after a plugin update — try reloading the page, clearing your site cache, or asking your host to clear PHP OpCache. If the issue persists, check whether a security plugin is blocking REST requests.";jQuery("#wpbody-content").prepend('<div id="ff-rest-unreachable" class="ff_alert danger-soft" style="margin: 20px;"><p class="text" style="margin:0"></p></div>'),document.querySelector("#ff-rest-unreachable .text").textContent=a}t.responseJSON&&"rest_cookie_invalid_nonce"==t.responseJSON.code?window.FluentFormsGlobal.$get({action:"fluentform_renew_rest_nonce"}).then(function(t){if(t.nonce){window.fluent_forms_global_var.rest.nonce=t.nonce;var s=o.toLowerCase();window.FluentFormsGlobal.$rest[s](e,r).then(function(t){i(t)}).fail(function(t){return n(t.responseJSON)})}}):n(t.responseJSON)})}):Promise.reject({message:"Invalid REST URL",responseJSON:{code:"invalid_rest_url"}})}function s(t){return s="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},s(t)}function o(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,u(i.key),i)}}function a(t,e,r){return(e=u(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}var l=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,"getForms","forms"),a(this,"storeForms",this.getForms),a(this,"getTemplates",this.getForms+"/templates"),a(this,"findForm",this.getForms+"/{param}"),a(this,"updateForm",this.findForm),a(this,"deleteForm",this.findForm),a(this,"duplicateForm",this.findForm+"/duplicate"),a(this,"convertForm",this.findForm+"/convert"),a(this,"getFormResources",this.findForm+"/resources"),a(this,"getFormPages",this.findForm+"/pages"),a(this,"getFormFields",this.findForm+"/fields"),a(this,"getFormShortcodes",this.findForm+"/shortcodes"),a(this,"findFormShortCodePage",this.findForm+"/findShortCodePage"),a(this,"getFormEditHistory",this.findForm+"/editHistory"),a(this,"clearFormEditHistory",this.findForm+"/clearHistory"),a(this,"getFormSettings","settings/{param}"),a(this,"storeFormSettings",this.getFormSettings),a(this,"deleteFormSettings",this.getFormSettings),a(this,"getPresetSettings",this.getFormSettings+"/preset"),a(this,"savePresetSettings",this.getFormSettings+"/save-preset"),a(this,"getGeneralFormSettings",this.getFormSettings+"/general"),a(this,"storeGeneralFormSettings",this.getGeneralFormSettings),a(this,"getFormSettingsCustomizer",this.getFormSettings+"/customizer"),a(this,"storeFormSettingsCustomizer",this.getFormSettingsCustomizer),a(this,"storeEntryColumns",this.getFormSettings+"/entry-columns"),a(this,"getFormSettingsConversationalDesign",this.getFormSettings+"/conversational-design"),a(this,"storeFormSettingsConversationalDesign",this.getFormSettings+"/store-conversational-design"),a(this,"getSubmissions","submissions"),a(this,"getSubmissionsResources",this.getSubmissions+"/resources"),a(this,"handleSubmissionsBulkActions",this.getSubmissions+"/bulk-actions"),a(this,"getAllSubmissions",this.getSubmissions+"/all"),a(this,"printSubmissions",this.getSubmissions+"/print"),a(this,"findSubmission",this.getSubmissions+"/{param}"),a(this,"deleteSubmission",this.findSubmission),a(this,"updateSubmissionStatus",this.findSubmission+"/status"),a(this,"toggleSubmissionIsFavorite",this.findSubmission+"/is-favorite"),a(this,"getSubmissionLogs",this.findSubmission+"/logs"),a(this,"deleteSubmissionLogs",this.findSubmission+"/logs"),a(this,"getSubmissionNotes",this.findSubmission+"/notes"),a(this,"storeSubmissionNote",this.findSubmission+"/notes"),a(this,"getSubmissionUsers",this.findSubmission+"/submission-users"),a(this,"updateSubmissionUser",this.findSubmission+"/update-submission-user"),a(this,"getLogs","logs"),a(this,"getLogFilters",this.getLogs+"/filters"),a(this,"deleteLogs",this.getLogs),a(this,"integrations","integrations"),a(this,"getGlobalIntegration",this.integrations),a(this,"updateGlobalIntegration",this.integrations),a(this,"updateGlobalIntegrationStatus",this.integrations+"/update-status"),a(this,"findIntegration",this.integrations+"/{param}"),a(this,"getFormIntegrationSettings",this.findIntegration),a(this,"updateFormIntegrationSettings",this.findIntegration),a(this,"deleteFormIntegration",this.findIntegration),a(this,"getIntegrations",this.findIntegration+"/form-integrations"),a(this,"getFormIntegrationList",this.findIntegration+"/integration-list-id"),a(this,"getGlobalSettings","global-settings"),a(this,"storeGlobalSettings",this.getGlobalSettings),a(this,"getRoles","roles"),a(this,"storeRoles",this.getRoles),a(this,"getManagers","managers"),a(this,"storeManager",this.getManagers),a(this,"deleteManager",this.storeManager),a(this,"getUsers",this.getManagers+"/users"),a(this,"analytics","analytics"),a(this,"getFormAnalytics",this.analytics+"/{param}"),a(this,"resetFormAnalytics",this.analytics+"/{param}/reset/"),a(this,"report","report"),a(this,"selectFormsForReport",this.report+"/select-forms"),a(this,"formsReport",this.report+"/forms"),a(this,"formReport",this.formsReport+"/{param}"),a(this,"submissionsReport",this.report+"/submissions"),a(this,"submissionsAnalysisReport",this.report+"/submissions-analysis"),a(this,"netRevenueReport",this.report+"/net-revenue"),a(this,"reportOverviewChart",this.report+"/overview-chart"),a(this,"reportRevenueChart",this.report+"/revenue-chart"),a(this,"reportCompletionRate",this.report+"/completion-rate"),a(this,"reportFormStats",this.report+"/form-stats"),a(this,"reportHeatmapData",this.report+"/heatmap-data"),a(this,"reportCountryHeatmap",this.report+"/country-heatmap"),a(this,"reportApiLogs",this.report+"/api-logs"),a(this,"reportTopPerformingForms",this.report+"/top-performing-forms"),a(this,"reportSubscriptions",this.report+"/subscriptions"),a(this,"reportPaymentTypes",this.report+"/payment-types"),a(this,"inventory","inventory"),a(this,"getInventoryList",this.inventory),a(this,"storeInventory",this.inventory),a(this,"noticeAction","notice"),a(this,"globalSearch","global-search"),a(this,"suggestedPlugins","suggested-plugins"),a(this,"suggestedPluginsCheckStatuses",this.suggestedPlugins+"/check-plugin-statuses"),a(this,"suggestedPluginsInstallPlugin",this.suggestedPlugins+"/install-plugin"),a(this,"suggestedPluginsActivatePlugin",this.suggestedPlugins+"/activate-plugin")},e=[{key:"get",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];var n=this[t];if(!n)throw"".concat(t,":Route Not Found");var s=0;return n.replace(/{param}/g,function(){var t=r[s];return s++,encodeURIComponent(t)})}}],e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();const h=new l,g={get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return window.FluentFormsGlobal.request("GET",t,e)},post:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return window.FluentFormsGlobal.request("POST",t,e)},delete:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return window.FluentFormsGlobal.request("DELETE",t,e)},put:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return window.FluentFormsGlobal.request("PUT",t,e)},patch:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return window.FluentFormsGlobal.request("PATCH",t,e)},route:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return h.get.apply(h,[t].concat(r))}};function f(t){return f="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},f(t)}function m(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,p(i.key),i)}}function c(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t){var e=function(t,e){if("object"!=f(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=f(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==f(e)?e:e+""}jQuery(function(t){t.ajaxSetup({success:function(t,e,r){var i=r.getResponseHeader("X-WP-Nonce");i&&(window.fluent_forms_global_var.rest.nonce=i)}})}),setInterval(function(){FluentFormsGlobal.$rest.get("forms/ping")},6e4),function(t){var e=function(){return e=function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"request",n),c(this,"$rest",g),this.fluent_forms_global_var=window.fluent_forms_global_var,this.url=fluent_forms_global_var.ajaxurl,t.ajaxSetup({data:{fluent_forms_admin_nonce:this.fluent_forms_global_var.fluent_forms_admin_nonce}}),jQuery(".update-nag,.notice, #wpbody-content > .updated, #wpbody-content > .error").not(".fluentform-admin-notice").remove()},r=[{key:"$get",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return r=r||this.url,t.get(r,e)}},{key:"$post",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return r=r||this.url,t.post(r,e)}}],r&&m(e.prototype,r),i&&m(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();window.FluentFormsGlobal=new e}(jQuery)},42275(t){function e(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return r(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}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 o,a=!0,u=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(u)throw o}}}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}var i=["_method","_jsonp","_envelope"],n=new Map;function s(t){var e=t.split("\0")[0].replace(/^ +/,""),r=e.indexOf("[");return-1!==r&&-1!==e.indexOf("]",r)?e.slice(0,r).replace(/[ .]/g,"_"):e.replace(/[ .[]/g,"_")}t.exports={isSafeRestUrl:function(t,r){if(!t||"string"!=typeof t||!r)return!1;if(/[#\\]/.test(t)||t.split(/[?#]/)[0].split("/").some(function(t){var e=t.replace(/%2e/gi,".");return"."===e||".."===e}))return!1;try{var o,a=function(t){var e=n.get(t);if(e)return e;var r=new URL(t,window.location.href),i=r.searchParams.get("rest_route");return e={origin:r.origin,pathname:r.pathname,plain:null!==i,prefix:(null!==i?i:r.pathname).replace(/\/$/,"")+"/"},n.set(t,e),e}(r),u=new URL(t,window.location.href),l=0,h=e(u.searchParams.keys());try{for(h.s();!(o=h.n()).done;){var g=s(o.value);if(i.includes(g))return!1;"rest_route"===g&&l++}}catch(t){h.e(t)}finally{h.f()}var f=(a.plain?u.searchParams.get("rest_route"):u.pathname)||"";return u.origin===a.origin&&l===(a.plain?1:0)&&(!a.plain||u.pathname===a.pathname)&&f.startsWith(a.prefix)&&!f.split("/").some(function(t){return"."===t||".."===t})}catch(t){return!1}},normalizeParamName:s,OVERRIDE_PARAMS:i}},22219(){},45337(){},82008(){},27250(){},18415(){},97006(){},62152(){},79709(){},81804(){},64223(){},16449(){},2762(){},86097(){},43582(){},12940(){},69174(){},62466(){},33289(){},66548(){},13826(){},72602(){}},r={};function i(t){var n=r[t];if(void 0!==n)return n.exports;var s=r[t]={exports:{}};return e[t](s,s.exports,i),s.exports}i.m=e,t=[],i.O=(e,r,n,s)=>{if(!r){var o=1/0;for(h=0;h<t.length;h++){for(var[r,n,s]=t[h],a=!0,u=0;u<r.length;u++)(!1&s||o>=s)&&Object.keys(i.O).every(t=>i.O[t](r[u]))?r.splice(u--,1):(a=!1,s<o&&(o=s));if(a){t.splice(h--,1);var l=n();void 0!==l&&(e=l)}}return e}s=s||0;for(var h=t.length;h>0&&t[h-1][2]>s;h--)t[h]=t[h-1];t[h]=[r,n,s]},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={22:0,291:0,114:0,182:0,665:0,485:0,778:0,417:0,957:0,972:0,237:0,973:0,717:0,734:0,100:0,205:0,917:0,743:0,728:0,766:0,866:0,382:0};i.O.j=e=>0===t[e];var e=(e,r)=>{var n,s,[o,a,u]=r,l=0;if(o.some(e=>0!==t[e])){for(n in a)i.o(a,n)&&(i.m[n]=a[n]);if(u)var h=u(i)}for(e&&e(r);l<o.length;l++)s=o[l],i.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return i.O(h)},r=self.webpackChunk=self.webpackChunk||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(68882)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(33289)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(66548)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(13826)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(72602)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(22219)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(45337)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(82008)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(27250)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(18415)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(97006)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(62152)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(79709)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(81804)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(64223)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(16449)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(2762)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(86097)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(43582)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(12940)),i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(69174));var n=i.O(void 0,[291,114,182,665,485,778,417,957,972,237,973,717,734,100,205,917,743,728,766,866,382],()=>i(62466));n=i.O(n)})();
Save File
Cancel