!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.i18n}()},,function(e,t,n){"use strict";t.a=function(){document.querySelectorAll("tr[id]").forEach((function(e){var t=e.querySelector(".amp-validation-error-new");t&&e.classList.toggle("new",Boolean(parseInt(t.value)))}))}},,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),c=n(1),a=n(3),l="show-all-errors";o()((function(){y(),v(),h(),Object(a.a)(),g(),E(),d(),b()}));var u=!1,i=function(){u||(window.addEventListener("beforeunload",s),document.querySelector("#major-publishing-actions").addEventListener("click",(function(){window.removeEventListener("beforeunload",s)})),u=!0)},d=function(){document.getElementById("post").addEventListener("change",(function e(t){t.target.matches("select")&&"amp_validation_error_type"!==t.target.getAttribute("id")&&(document.getElementById("post").removeEventListener("change",e),i())}))},s=function(e){return e.preventDefault(),e.returnValue=Object(c.__)("You have unsaved changes. Are you sure you want to leave?","amp"),Object(c.__)("You have unsaved changes. Are you sure you want to leave?","amp")},m=function(e,t){var n,r,o=document.getElementById(l),a=document.getElementById("number-errors"),u=document.getElementsByTagName("thead");u[0]&&!a&&(n=u[0],a=document.createElement("tr"),(r=document.createElement("th")).setAttribute("id","number-errors"),r.setAttribute("colspan","6"),a.appendChild(r),n.appendChild(a)),e===t?(o&&o.classList.add("hidden"),a.classList.add("hidden")):null!==e&&(document.getElementById("number-errors").innerText=Object(c.sprintf)(
/* translators: 1: number of errors being displayed. 2: total number of errors found. */
Object(c._n)("Showing %1$s of %2$s validation error","Showing %1$s of %2$s validation errors",t,"amp"),e,t),document.getElementById("number-errors").classList.remove("hidden"),f(),document.getElementById(l)&&document.getElementById(l).classList.remove("hidden"))},f=function(){var e=document.getElementById("url-post-filter"),t=document.getElementById(l);!t&&e&&((t=document.createElement("button")).id=l,t.classList.add("button"),t.innerText=Object(c.__)("Show all","amp"),e.appendChild(t))},y=function(){document.getElementById("url-post-filter").addEventListener("click",(function(e){if(e.target.matches("#"+l)){e.preventDefault();var t=document.querySelectorAll("[data-error-type]");t.forEach((function(e){e.parentElement.parentElement.classList.remove("hidden")})),m(t.length,t.length),e.target.classList.add("hidden"),document.getElementById("amp_validation_error_type").selectedIndex=0}}))},v=function(){document.getElementById("amp_validation_error_type").addEventListener("change",(function(e){if(e.target.matches("select")){e.preventDefault();var t=document.getElementById(l),n="-1"===e.target.value,r=document.querySelectorAll("[data-error-type]");n&&t&&t.classList.add("hidden");var o=0;r.forEach((function(t){var r=t.getAttribute("data-error-type");n||!e.target.value||e.target.value===r?(t.parentElement.parentElement.classList.remove("hidden"),o++):t.parentElement.parentElement.classList.add("hidden")})),m(o,r.length)}}))},h=function(){document.getElementById("search-submit").addEventListener("click",(function(e){if(e.preventDefault(),e.target.matches("input")){var t=document.getElementById("invalid-url-search-search-input").value,n=document.querySelectorAll("tbody .column-details"),r=0;n.forEach((function(e){var n=!1;e.querySelectorAll(".detailed").forEach((function(e){-1!==e.innerText.indexOf(t)&&(n=!0)})),n?(e.parentElement.classList.remove("hidden"),r++):e.parentElement.classList.add("hidden")})),m(r,n.length)}}))},p=function(e){var t=e.options[e.selectedIndex];if(t){var n=t.getAttribute("data-status-icon");e.parentNode.querySelector("img").setAttribute("src",n)}},g=function(){document.querySelectorAll('tr[id^="tag-"]').forEach((function(e){var t=e.querySelector(".amp-validation-error-status");t&&t.addEventListener("change",(function(n){!function(e){var t=e.event;t.target.matches("select")&&p(t.target)}({event:n,row:e,select:t})}))}))},E=function(){var e=document.querySelector("button.action.accept"),t=document.querySelector("button.action.reject"),n=document.getElementById("accept-reject-buttons"),r=function(e){var t;e.target.matches("[type=checkbox]")&&(e.target.checked?n.classList.remove("hidden"):(t=!1,document.querySelectorAll(".check-column [type=checkbox]").forEach((function(e){e.checked&&(t=!0)})),t||n.classList.add("hidden")))};document.querySelectorAll(".check-column [type=checkbox]").forEach((function(e){e.addEventListener("change",r)})),e.addEventListener("click",(function(){Array.prototype.forEach.call(document.querySelectorAll("select.amp-validation-error-status"),(function(e){e.closest("tr").querySelector(".check-column input[type=checkbox]").checked&&(e.value="3",p(e),i())}))})),t.addEventListener("click",(function(){Array.prototype.forEach.call(document.querySelectorAll("select.amp-validation-error-status"),(function(e){e.closest("tr").querySelector(".check-column input[type=checkbox]").checked&&(e.value="2",p(e),i())}))}))},b=function(){var e=document.getElementById("amp_stylesheets"),t=!0,n=!1,r=void 0;try{for(var o,c=function(){var e=o.value,t=e.closest("tr");e.addEventListener("click",(function(){t.classList.toggle("expanded")}))},a=e.querySelectorAll(".toggle-stylesheet-details")[Symbol.iterator]();!(t=(o=a.next()).done);t=!0)c()}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}var l=!0,u=!1,i=void 0;try{for(var d,s=function(){var e=d.value,t=e.querySelector(".shaken-stylesheet"),n=e.querySelector(".show-removed-styles");n&&n.addEventListener("click",(function(){t.classList.toggle("removed-styles-shown",n.checked)}))},m=e.querySelectorAll(".stylesheet-details")[Symbol.iterator]();!(l=(d=m.next()).done);l=!0)s()}catch(e){u=!0,i=e}finally{try{l||null==m.return||m.return()}finally{if(u)throw i}}}}]);