D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
aramrprl
/
www
/
wp-content
/
plugins
/
seo-by-rank-math
/
assets
/
admin
/
js
/
Filename :
instantIndexingSettings.js
back
Copy
"use strict";(self.webpackChunkrank_math=self.webpackChunkrank_math||[]).push([[654],{9829:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(5311),a=n.n(r);function i(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];t=t||"error",r=r||!1;var l=a()('<div class="notice notice-'+t+" "+i+' is-dismissible"><p>'+e+"</p></div>").hide();o||n.siblings(".notice").remove(),n.after(l),l.slideDown(),a()(document).trigger("wp-updates-notice-added"),a()("html,body").animate({scrollTop:l.offset().top-50},"slow"),r&&setTimeout((function(){l.fadeOut((function(){l.remove()}))}),r)}},6494:function(e,t,n){var r=n(8085);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.Z=(0,r.map)((0,r.entries)(rankMath.choices.postTypes),(function(e){var t=a(e,2);return{id:t[0],label:t[1]}}))},6361:function(e,t,n){n.r(t),n.d(t,{default:function(){return x}});var r=n(8003),a=n(8264),i=n(5311),o=n.n(i),l=n(2610),s=n(6179),c=n.n(s),m=n(142),u=n(9829);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=[{id:"console",type:"component",Component:function(){var e=d((0,l.useState)(""),2),t=e[0],n=e[1],a=d((0,l.useState)(!1),2),i=a[0],s=a[1],h=o()(".instant-indexing-notice");return wp.element.createElement(React.Fragment,null,wp.element.createElement("div",{className:"bing-api-description description"},wp.element.createElement("p",null,(0,r.__)("Insert URLs to send to the IndexNow API (one per line, up to 10,000):","rank-math"))),wp.element.createElement(m.TextareaControl,{value:t,onChange:n,id:"indexnow_urls",className:"instant-indexing-urls",placeholder:window.location.origin+"/"+(0,r._x)("hello-world","URL slug placeholder","rank-math")}),i&&wp.element.createElement("span",{className:"spinner is-active",id:"indexnow_spinner"}),wp.element.createElement(m.Button,{variant:"primary",id:"indexnow_sumit",disabled:i,onClick:function(){s(!0),c()({method:"POST",path:"/rankmath/v1/in/submitUrls",data:{urls:t}}).catch((function(e){var t=void 0!==e.responseJSON.message?e.responseJSON.message:(0,r.__)("An error occurred while submitting the URL.","rank-math");(0,u.Z)(t,"error",h,5e3),n(""),s(!1)})).then((function(e){e.success?((0,u.Z)(e.message,"success",h,5e3),n("")):(0,u.Z)(e.message,"error",h,5e3),s(!1)}))}},(0,r.__)("Submit URLs","rank-math")),wp.element.createElement("div",{className:"instant-indexing-notice"}))}}],p={name:"url-submission",header:{title:(0,r.__)("Submit URLs","rank-math"),description:(0,r.__)("Send URLs directly to the IndexNow API.","rank-math"),link:(0,a.Z)("instant-indexing","Indexing Submit URLs")},title:wp.element.createElement(React.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-instant-indexing"}),(0,r.__)("Submit URLs","rank-math")),fields:f},y=n(6494);function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var k=[{id:"bing_post_types",type:"checkboxlist",name:(0,r.__)("Auto-Submit Post Types","rank-math"),desc:(0,r.__)("Submit posts from these post types automatically to the IndexNow API when a post is published, updated, or trashed.","rank-math"),options:y.Z,toggleAll:!0,default:[]},{id:"indexnow_api_key_location",type:"component",Component:function(){var e=_((0,l.useState)(rankMath.data.indexnow_api_key),2),t=e[0],n=e[1],a=window.location.origin+"/"+t+".txt";return wp.element.createElement(React.Fragment,null,wp.element.createElement("div",{className:"field-row field-id-indexnow_api_key_location"},wp.element.createElement("div",{className:"field-th"},wp.element.createElement("label",{htmlFor:"indexnow_api_key_location"},(0,r.__)("API Key","rank-math"))),wp.element.createElement("div",{className:"field-td"},wp.element.createElement(m.TextControl,{value:t,onChange:n,readOnly:!0}),wp.element.createElement(l.RawHTML,{className:"field-description"},(0,r.__)("The IndexNow API key proves the ownership of the site. It is generated automatically. You can change the key if it becomes known to third parties.","rank-math")),wp.element.createElement(m.Button,{onClick:function(){c()({method:"POST",path:"/rankmath/v1/in/resetKey"}).then((function(e){n(e.key)}))},id:"indexnow_reset_key",className:"button button-secondary large-button"},wp.element.createElement("span",{className:"dashicons dashicons-update"}),(0,r.__)("Change Key","rank-math")))),wp.element.createElement("div",{className:"field-row field-id-indexnow-api-key-location rank-math-advanced-option"},wp.element.createElement("div",{className:"field-th"},wp.element.createElement("label",{htmlFor:"indexnow_api_key_location"},(0,r.__)("API Key Location","rank-math"))),wp.element.createElement("div",{className:"field-td"},wp.element.createElement("code",{id:"indexnow_api_key_location"},a),wp.element.createElement(l.RawHTML,{className:"field-description"},(0,r.sprintf)((0,r.__)("Use the %1$s button to verify that the key is accessible for search engines. Clicking on it should open the key file in your browser and show the API key.","rank-math"),"<strong>"+(0,r.__)("Check Key","rank-math")+"</strong>")),wp.element.createElement(m.Button,{href:a,id:"indexnow_check_key",className:"button button-secondary large-button",target:"_blank",rel:"noreferrer"},wp.element.createElement("span",{className:"dashicons dashicons-search"}),(0,r.__)("Check Key","rank-math")))))}}],b={name:"settings",header:{title:(0,r.__)("Settings","rank-math"),description:(0,r.__)("Instant Indexing module settings.","rank-math"),link:(0,a.Z)("instant-indexing","Indexing Settings")},title:wp.element.createElement(React.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-settings"}),(0,r.__)("Settings","rank-math")),fields:k},g=n(8085);function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S=[{id:"indexnow_history",type:"component",Component:function(){var e=v((0,l.useState)(!1),2),t=e[0],n=e[1],a=v((0,l.useState)([]),2),i=a[0],s=a[1],d=v((0,l.useState)("all"),2),h=d[0],f=d[1];(0,l.useEffect)((function(){c()({method:"POST",path:"/rankmath/v1/in/getLog",data:{filter:"all"}}).catch((function(e){alert(e.message)})).then((function(e){s(e.data)}))}),[]);var p=[[(0,r.__)("Time","rank-math"),(0,r.__)("URL","rank-math"),(0,r.__)("Response","rank-math")]];(0,g.isEmpty)(i)||(0,g.forEach)(i,(function(e){"all"!==h&&("manual"===h&&!e.manual_submission||"auto"===h&&e.manual_submission)||p.push([e.timeHumanReadable,e.url,e.status.toString()])})),p.length<2&&p.push([(0,r.__)("No submissions yet.","rank-math")]);var y={all:(0,r.__)("All","rank-math"),manual:(0,r.__)("Manual","rank-math"),auto:(0,r.__)("Auto","rank-math")};return wp.element.createElement(React.Fragment,null,!(0,g.isEmpty)(i)&&wp.element.createElement("div",{className:"indexnow-history-filter-wrapper"},wp.element.createElement("div",{className:"history-filter-links",id:"indexnow_history_filters"},(0,g.map)(y,(function(e,t){var n=t===h?"button current":"button";return wp.element.createElement(m.Button,{variant:"link",className:n,onClick:function(){return f(t)},key:t},e)}))),wp.element.createElement(m.Button,{variant:"tertiary",className:"{ classes }",onClick:function(){c()({method:"POST",path:"/rankmath/v1/in/clearLog",data:{filter:"all"}}).catch((function(){(0,u.Z)((0,r.__)("Error: could not clear history.","rank-math"),"error",o()(".rank-math-header"))})).then((function(){s([])}))}},(0,r.__)("Clear History","rank-math"))),wp.element.createElement(m.Table,{id:"indexnow_history",fields:p}),wp.element.createElement(m.Button,{variant:"link",iconPosition:"right",icon:t?"dashicons dashicons-arrow-down":"dashicons dashicons-arrow-up",onClick:function(){return n(!t)}},(0,r.__)("Response Code Help","rank-math")),t&&wp.element.createElement(m.Table,{id:"indexnow_response_codes",fields:[[(0,r.__)("Response Code","rank-math"),(0,r.__)("Response Message","rank-math"),(0,r.__)("Reasons","rank-math")],["200",(0,r.__)("OK","rank-math"),(0,r.__)("The URL was successfully submitted to the IndexNow API.","rank-math")],["202",(0,r.__)("Accepted","rank-math"),(0,r.__)("The URL was successfully submitted to the IndexNow API, but the API key will be checked later.","rank-math")],["400",(0,r.__)("Bad Request","rank-math"),(0,r.__)("The request was invalid.","rank-math")],["403",(0,r.__)("Forbidden","rank-math"),(0,r.__)("The key was invalid (e.g. key not found, file found but key not in the file).","rank-math")],["422",(0,r.__)("Unprocessable Entity","rank-math"),(0,r.__)("The URLs don't belong to the host or the key is not matching the schema in the protocol.","rank-math")],["429",(0,r.__)("Too Many Requests","rank-math"),(0,r.__)("Too Many Requests (potential Spam).","rank-math")]]}))}}],x={"url-submission":p,settings:b,history:{name:"history",header:{title:(0,r.__)("History","rank-math"),description:(0,r.__)("The last 100 IndexNow API requests.","rank-math"),link:(0,a.Z)("instant-indexing","Indexing Settings")},title:wp.element.createElement(React.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-htaccess"}),(0,r.__)("History","rank-math")),fields:S}}}}]);