File "general-options.js"

Full Path: /home/diablzlo/glucosebalnce.com/wp-content/plugins/seo-by-rank-math-pro/assets/admin/js/general-options.js
File size: 9.35 KB
MIME-type: text/plain
Charset: utf-8

(()=>{"use strict";var t={n:e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=jQuery;var r=t.n(e);const n=lodash,o=wp.i18n,a=wp.hooks,i=wp.element,s=wp.apiFetch;var u=t.n(s);function c(t,e,n){return r().ajax({url:rankMath.ajaxurl,type:n||"POST",dataType:"json",data:r().extend(!0,{action:"rank_math_"+t,security:rankMath.security},e)})}function h(t){return h="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},h(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(e,r,n,o){var a=r&&r.prototype instanceof d?r:d,i=Object.create(a.prototype);return u(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var u=x(s,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var c=f(e,r,n);if("normal"===c.type){if(o=n.done?4:2,c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=4,n.method="throw",n.arg=c.arg)}}}(e,n,new O(o||[])),!0),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var p={};function d(){}function v(){}function m(){}var y={};u(y,a,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(S([])));w&&w!==r&&n.call(w,a)&&(y=w);var b=m.prototype=d.prototype=Object.create(y);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,s){var u=f(t[o],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==h(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(l).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,s)}))}s(u.arg)}var o;u(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var a=f(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,p;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function E(t){this.tryEntries.push(t)}function j(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function O(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function S(e){if(null!=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(h(e)+" is not iterable")}return v.prototype=m,u(b,"constructor",m),u(m,"constructor",v),v.displayName=u(m,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},_(k.prototype),u(k.prototype,i,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(c(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(b),u(b,s,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,O.prototype={constructor:O,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],s=this.prev,u=a[1],c=a[2];if(-1===a[0])return n("end"),!1;if(!u&&!c)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=s){if(s<u)return this.method="next",this.arg=t,n(u),!0;if(s<c)return n(c),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],p):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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),p}},e}function f(t,e,r,n,o,a,i){try{var s=t[a](i),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}var p=window.RttTool||{};r()((function(){r()("#image_replacements_repeat").find("input").on("keyup",(function(){var t=!1;r()(this).parents(".cmb-nested").find('input[type="text"]').each((function(){if(!r()(this).val())return t=!0,void r()(this).addClass("is-blank");r()(this).removeClass("is-blank")})),t||r()(this).parents(".cmb-nested").removeClass("error")})),r()(document).on("cmb2_add_row",(function(t){"image_replacements_repeat"===t.target.id&&rankMathAdmin.variableInserter(!1)})),(0,a.addFilter)("rank_math_test_connections","rank-math-pro",(function(t){return t.push({class:".rank-math-connect-adsense",canTest:rankMath.isAdsenseConnected,action:"check_adsense_request"}),t})),(0,a.addFilter)("rank_math_save_adsense_account","rank-math-pro",function(){var t,e=(t=l().mark((function t(e){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c("save_adsense_account",e,"post");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){f(a,n,o,i,s,"next",t)}function s(t){f(a,n,o,i,s,"throw",t)}i(void 0)}))});return function(t){return e.apply(this,arguments)}}()),(0,a.addAction)("rank_math_fill_select","rank-math-pro",(function(t){var e=t.response.adsenseAccounts,r=void 0!==e&&e;!1!==r&&((0,n.map)(r,(function(e,r){t.adsenseSelect.append('<option value="'+r+'">'+e.name+" ("+r+")</option>")})),t.adsenseSelect.data("selected")&&t.adsenseSelect.val(t.adsenseSelect.data("selected")),t.adsenseSelect.prop("disabled",!1),t.adsenseSelect.select2())}));var t,e=document.getElementById("rank-math-admin-rtt");if(e){var s=document.getElementById("robots_txt_content"),h=s.value?s.value:s.getAttribute("placeholder"),d=s.getAttribute("readonly");(0,i.createRoot)(e).render(wp.element.createElement(p,{siteUrl:rankMath.siteUrl,editorDisabled:d,robotsTxtContent:h,isLocal:!0,onChange:function(t){s.value=t}}))}t=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";t="<p>"+t+"</p>",r.removeClass("notice-info info").addClass("notice-"+e).html(t),"error"===e&&setTimeout((function(){r.removeClass("notice-error error").addClass("notice-info info").html(n)}),5e3)},r()(document).on("click",".rank-math-plugin-cross-sell a.action",(function(e){e.preventDefault();var a=r()(e.currentTarget).parents(".rank-math-notice"),i=a.html();a.html("<p>"+(0,o.sprintf)((0,o.__)("%s Please wait while the plugin is being installed and activated.","rank-math-pro"),"<strong>"+(0,o.__)("Installing Imagify…","rank-math-pro")+"</strong>")+"</p>"),u()({method:"POST",path:"/rankmath/v1/activateImagify"}).catch((function(e){var r=(0,n.isEmpty)(e.message)?(0,o.__)("Unable to install the Imagify plugin. Please try again later.","rank-math-pro"):e.message;t(r,"error",a,i)})).then((function(e){var r=e.success,n=e.message;t(n,r?"success":"error",a,i)}))}))}))})();