'+(void 0===n?'':n)+''+("undefined"===t||void 0===t?"undefined":t)+''+e+"
";return"media"===s&&(r=r+'
'),r+="
"}},{key:"updateSmushIds",value:function(e){if(void 0!==wp_smushit_data.unsmushed&&wp_smushit_data.unsmushed.length>0){var t=wp_smushit_data.unsmushed.indexOf(e);t>-1&&wp_smushit_data.unsmushed.splice(t,1)}if(void 0!==wp_smushit_data.resmush&&wp_smushit_data.resmush.length>0){var n=wp_smushit_data.resmush.indexOf(e);n>-1&&wp_smushit_data.resmush.splice(n,1)}}}],(n=[{key:"start",value:function(){this.button.attr("disabled","disabled"),this.button.addClass("wp-smush-started"),this.bulkStart(),this.singleStart()}},{key:"bulkStart",value:function(){this.is_bulk&&(jQuery(".wp-smush-bulk-wrapper").hide(),jQuery(".sui-notice-top").remove(),jQuery(".wp-smush-bulk-progress-bar-wrapper .sui-notice-warning:first-of-type").hide(),0>=jQuery("div.smush-final-log .smush-bulk-error-row").length&&jQuery("div.smush-final-log").hide(),jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper").show())}},{key:"singleStart",value:function(){this.is_bulk||(e.progressBar(this.button,wp_smush_msgs.smushing,"show"),this.status.removeClass("error"))}},{key:"enableButton",value:function(){this.button.prop("disabled",!1),jQuery(".wp-smush-all").removeAttr("disabled"),jQuery("button.wp-smush-scan, a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#wp-smush-save-settings").removeAttr("disabled")}},{key:"singleDone",value:function(){if(!this.is_bulk){e.progressBar(this.button,wp_smush_msgs.smushing,"hide");var t=this;this.request.done((function(n){if(void 0!==n.data){var i=t.status.parent();n.data.status&&(i.find(".smush-status-links").remove(),t.status.replaceWith(n.data.status)),e.membershipValidity(n.data),n.success&&"Not processed"!==n.data?(t.status.removeClass("sui-hidden"),t.button.parent().removeClass("unsmushed").addClass("smushed"),t.button.remove()):(t.status.addClass("error"),t.status.html(n.data.error_msg),t.status.show()),i.append(n.data.stats),e.updateImageStats(n.data.new_size)}t.enableButton()})).fail((function(e){t.status.html(e.data),t.status.addClass("error"),t.enableButton()}))}}},{key:"syncStats",value:function(){var t=jQuery("div.wp-smush-bulk-progress-bar-wrapper div.wp-smush-count.tc"),n=t.html();t.html(wp_smush_msgs.sync_stats),jQuery.ajax({type:"GET",url:this.url,data:{action:"get_stats"},success:function(t){t&&void 0!==t&&(t=t.data,jQuery.extend(wp_smushit_data,{count_images:t.count_images,count_smushed:t.count_smushed,count_total:t.count_total,count_resize:t.count_resize,count_supersmushed:t.count_supersmushed,savings_bytes:t.savings_bytes,savings_conversion:t.savings_conversion,savings_resize:t.savings_resize,size_before:t.size_before,size_after:t.size_after}),e.updateStats(this.smush_type))}}).always((function(){return t.html(n)}))}},{key:"bulkDone",value:function(){if(this.is_bulk){this.enableButton();var e=jQuery(".sui-summary-smush .smush-stats-icon");if(0===this.ids.length)e.addClass("sui-hidden"),jQuery(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").show(),jQuery(".wp-smush-bulk-wrapper").hide(),jQuery(".wp-smush-bulk-progress-bar-wrapper").hide();else{e.removeClass("sui-icon-loader sui-loading sui-hidden").addClass("sui-icon-info sui-warning");var t=jQuery(".bulk-smush-wrapper .wp-smush-resmush-notice");t.length>0?t.show():jQuery(".bulk-smush-wrapper .wp-smush-remaining").show()}jQuery(".wp-resmush.wp-smush-action, .wp-smush-scan").removeAttr("disabled")}}},{key:"freeExceeded",value:function(){var e=jQuery(".wp-smush-bulk-progress-bar-wrapper");e.addClass("wp-smush-exceed-limit"),e.find(".sui-progress-block .wp-smush-cancel-bulk").addClass("sui-hidden"),e.find(".sui-progress-block .wp-smush-all").removeClass("sui-hidden"),e.find("i.sui-icon-loader").addClass("sui-icon-info").removeClass("sui-icon-loader").removeClass("sui-loading"),document.getElementById("bulk-smush-resume-button").classList.remove("sui-hidden")}},{key:"updateRemainingCount",value:function(){if(this.is_bulk_resmush){var e=jQuery(".wp-smush-resmush-notice .wp-smush-remaining-count");e.length&&void 0!==this.ids&&e.html(this.ids.length)}else{var t=jQuery(".bulk-smush-wrapper .wp-smush-remaining-count");t.length&&void 0!==this.ids&&t.html(this.ids.length)}var n=jQuery(".smush-sidenav .wp-smush-remaining-count");n.length&&void 0!==this.ids&&(this.ids.length>0?n.html(this.ids.length):(jQuery(".sui-summary-smush .smush-stats-icon").addClass("sui-hidden"),n.removeClass("sui-tag sui-tag-warning").html("")))}},{key:"updateProgress",value:function(t){if(this.is_bulk_resmush||this.is_bulk){var n="";t&&void 0!==t.data&&void 0!==t.data.stats&&e.updateLocalizedStats(t.data.stats,this.smush_type),this.is_bulk_resmush?(t.success&&(wp_smushit_data.resmush.length>0?jQuery(".wp-smush-images-remaining").html(wp_smushit_data.resmush.length):0===wp_smushit_data.resmush.length&&0===this.ids.length&&(jQuery(".bulk-resmush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-resmush-wrap, .wp-smush-bulk-progress-bar-wrapper").hide())),void 0!==this.ids&&void 0!==this.total&&this.total>0&&(n=(this.smushed+this.errors.length)/this.total*100)):n=(this.smushed+this.errors.length)/this.total*100,0===this.ids.length&&("nextgen"!==this.smush_type&&this.syncStats(),jQuery(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").show(),jQuery(".wp-smush-bulk-wrapper").hide()),this.updateRemainingCount(),this._updateProgress(this.smushed+this.errors.length,WP_Smush.helpers.precise_round(n,1)),e.updateStats(this.smush_type)}}},{key:"_updateProgress",value:function(e,t){(this.is_bulk||this.is_bulk_resmush)&&(jQuery("span.wp-smush-images-percent").html(t+"%"),jQuery(".bulk-smush-wrapper .wp-smush-progress-inner").css("width",t+"%"),jQuery(".bulk-smush-wrapper .sui-progress-state-text").find("span:first-child").html(e).find("span:last-child").html(this.total))}},{key:"continue",value:function(){var e=this.button.attr("continue_smush");return void 0===e&&(e=!0),"false"!==e&&e||(e=!1),e&&this.ids.length>0&&this.is_bulk}},{key:"callAjax",value:function(){var t="";this.current_id=this.is_bulk?this.ids.shift():this.button.data("id"),e.updateSmushIds(this.current_id);var n=this.button.parent().find("#_wp_smush_nonce");n&&(t=n.val());var i=this;return this.request=e.ajax(this.is_bulk_resmush,this.current_id,this.url,t).done((function(t){if(void 0===t.success||void 0!==t.success&&!1===t.success&&void 0!==t.data&&"limit_exceeded"!==t.data.error){i.errors.push(i.current_id);var n=e.prepareErrorRow(t.data.error_message,t.data.file_name,t.data.thumbnail,i.current_id,i.smush_type);i.log.show(),i.errors.length>5?jQuery(".smush-bulk-errors-actions").removeClass("sui-hidden"):i.log.find(".smush-bulk-errors").append(n)}else void 0!==t.success&&t.success&&i.smushed++;e.membershipValidity(t.data),void 0!==t.data&&"limit_exceeded"===t.data.error&&"resolved"!==i.deferred.state()?(document.getElementById("bulk_smush_warning").classList.remove("sui-hidden"),i.button.attr("continue_smush",!1),wp_smushit_data.unsmushed.unshift(i.current_id),i.ids.unshift(i.current_id),i.freeExceeded()):i.is_bulk?i.updateProgress(t):0===i.ids.length&&i.syncStats(),i.singleDone()})).always((function(){i.continue()&&i.is_bulk?i.callAjax():i.deferred.resolve()})),this.deferred.errors=this.errors,this.deferred}},{key:"run",value:function(){this.is_bulk&&this.ids.length>0&&this.callAjax(),this.is_bulk||this.callAjax()}},{key:"bindDeferredEvents",value:function(){var e=this;this.deferred.done((function(){if(e.button.removeAttr("continue_smush"),e.errors.length){var t=wp_smush_msgs.error_in_bulk.replace("{{errors}}",e.errors.length).replace("{{total}}",e.total).replace("{{smushed}}",e.smushed);jQuery(".wp-smush-all-done").addClass("sui-notice-warning").removeClass("sui-notice-success").find("p").html(t)}e.bulkDone(),jQuery(".wp-smush-all:not(.wp-smush-finished), .wp-smush-scan").removeAttr("disabled")}))}},{key:"cancelAjax",value:function(){var t=this;jQuery(".wp-smush-cancel-bulk").on("click",(function(){t.button.attr("continue_smush",!1),t.syncStats(),e.updateStats(this.smush_type),t.request.abort(),t.enableButton(),t.button.removeClass("wp-smush-started"),wp_smushit_data.unsmushed.unshift(t.current_id),jQuery(".wp-smush-bulk-wrapper").show(),jQuery(".wp-smush-bulk-progress-bar-wrapper").hide()}))}}])&&s(t.prototype,n),r&&s(t,r),e}();t.a=r},function(e,t,n){(function(n){var i;!function(n){"use strict";var s,r=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];function o(e,t){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.node=e,this._listeners={},this.create(t)}function a(e){return Array.prototype.slice.call(e)}function u(e,t){return a((t||document).querySelectorAll(e))}function l(e){var t=d(e);t.length&&t[0].focus()}function d(e){return u(r.join(","),e).filter((function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}))}o.prototype.create=function(e){var t,n;return this._targets=this._targets||function(e){if(NodeList.prototype.isPrototypeOf(e))return a(e);if(Element.prototype.isPrototypeOf(e))return[e];if("string"==typeof e)return u(e)}(e)||(t=this.node,(n=a(t.parentNode.childNodes).filter((function(e){return 1===e.nodeType}))).splice(n.indexOf(t),1),n),this.node.setAttribute("aria-hidden",!0),this.shown=!1,this._openers=u('[data-a11y-dialog-show="'+this.node.id+'"]'),this._openers.forEach(function(e){e.addEventListener("click",this._show)}.bind(this)),this._closers=u("[data-a11y-dialog-hide]",this.node).concat(u('[data-a11y-dialog-hide="'+this.node.id+'"]')),this._closers.forEach(function(e){e.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},o.prototype.show=function(e){return this.shown?this:(this.node.classList.add("sui-fade-in"),this.node.classList.remove("sui-fade-out"),this.node.getElementsByClassName("sui-dialog-content")[0].className="sui-dialog-content sui-content-fade-in",this._fire("show",e),this.shown=!0,this.node.removeAttribute("aria-hidden"),this._targets.forEach((function(e){var t=e.getAttribute("aria-hidden");t&&e.setAttribute("data-a11y-dialog-original",t),e.setAttribute("aria-hidden","true")})),s=document.activeElement,l(this.node),document.addEventListener("keydown",this._bindKeypress),document.getElementsByTagName("html")[0].classList.add("sui-has-overlay"),this)},o.prototype.hide=function(e){if(!this.shown)return this;this.node.getElementsByClassName("sui-dialog-content")[0].className="sui-dialog-content sui-content-fade-out",this.node.classList.add("sui-fade-out"),this.node.classList.remove("sui-fade-in"),this._fire("hide",e),this.shown=!1;var t=this.node;return setTimeout((function(){t.setAttribute("aria-hidden","true")}),300),this._targets.forEach((function(e){var t=e.getAttribute("data-a11y-dialog-original");t?(e.setAttribute("aria-hidden",t),e.removeAttribute("data-a11y-dialog-original")):e.removeAttribute("aria-hidden")})),s&&s.focus(),document.removeEventListener("keydown",this._bindKeypress),document.getElementsByTagName("html")[0].classList.remove("sui-has-overlay"),this},o.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(e){e.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(e){e.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},o.prototype.on=function(e,t){return void 0===this._listeners[e]&&(this._listeners[e]=[]),this._listeners[e].push(t),this},o.prototype.off=function(e,t){var n=this._listeners[e].indexOf(t);return n>-1&&this._listeners[e].splice(n,1),this},o.prototype._fire=function(e,t){(this._listeners[e]||[]).forEach(function(e){e(this.node,t)}.bind(this))},o.prototype._bindKeypress=function(e){this.shown&&27===e.which&&(e.preventDefault(),this.hide()),this.shown&&9===e.which&&function(e,t){var n=d(e),i=n.indexOf(document.activeElement);t.shiftKey&&0===i?(n[n.length-1].focus(),t.preventDefault()):t.shiftKey||i!==n.length-1||(n[0].focus(),t.preventDefault())}(this.node,e)},o.prototype._maintainFocus=function(e){this.shown&&!this.node.contains(e.target)&&l(this.node)},void 0!==e.exports?e.exports=o:void 0===(i=function(){return o}.apply(t,[]))||(e.exports=i)}(void 0!==n||window)}).call(this,n(2))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.a=function(e,t){e=parseInt(e),t=parseInt(t);var n=!1,i=0,s={scan:function(){var n=e-t;0!==t?r(n):jQuery.post(ajaxurl,{action:"directory_smush_start"},(function(){return r(n)}))},cancel:function(){return n=!0,jQuery.post(ajaxurl,{action:"directory_smush_cancel"})},getProgress:function(){if(n)return 0;var i=e-t;return Math.min(Math.round(100*parseInt(e-i)/e),99)},onFinishStep:function(n){jQuery(".wp-smush-progress-dialog .sui-progress-state-text").html(t-i+"/"+e+" "+wp_smush_msgs.progress_smushed),WP_Smush.directory.updateProgressBar(n)},onFinish:function(){WP_Smush.directory.updateProgressBar(100),window.location.href=wp_smush_msgs.directory_url+"&scan=done"},limitReached:function(){var e=jQuery("#wp-smush-progress-dialog");e.addClass("wp-smush-exceed-limit"),e.find("#cancel-directory-smush").attr("data-tooltip",wp_smush_msgs.bulk_resume),e.find(".sui-icon-close").removeClass("sui-icon-close").addClass("sui-icon-play"),e.find("#cancel-directory-smush").attr("id","cancel-directory-smush-disabled")},resume:function(){var e=jQuery("#wp-smush-progress-dialog"),t=e.find("#cancel-directory-smush-disabled");e.removeClass("wp-smush-exceed-limit"),e.find(".sui-icon-play").removeClass("sui-icon-play").addClass("sui-icon-close"),t.attr("data-tooltip","Cancel"),t.attr("id","cancel-directory-smush"),s.scan()}},r=function n(r){r>=0?(t=e-r,jQuery.post(ajaxurl,{action:"directory_smush_check_step",step:t},(function(e){void 0!==e.success&&e.success?(t++,r-=1,s.onFinishStep(s.getProgress()),n(r)):void 0!==e.data.error&&"dir_smush_limit_exceeded"===e.data.error?s.limitReached():(i++,t++,r-=1,s.onFinishStep(s.getProgress()),n(r))}))):jQuery.post(ajaxurl,{action:"directory_smush_finish",items:e-i,failed:i},(function(e){return s.onFinish(e)}))};return s}},function(e,t,n){var i;
/*!
* jQuery JavaScript Library v3.4.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2019-05-01T21:04Z
*/!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,s){"use strict";var r=[],o=n.document,a=Object.getPrototypeOf,u=r.slice,l=r.concat,d=r.push,c=r.indexOf,h={},p=h.toString,f=h.hasOwnProperty,m=f.toString,g=m.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},_=function(e){return null!=e&&e===e.window},w={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var i,s,r=(n=n||o).createElement("script");if(r.text=e,t)for(i in w)(s=t[i]||t.getAttribute&&t.getAttribute(i))&&r.setAttribute(i,s);n.head.appendChild(r).parentNode.removeChild(r)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[p.call(e)]||"object":typeof e}var k=function(e,t){return new k.fn.init(e,t)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function S(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!y(e)&&!_(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}k.fn=k.prototype={jquery:"3.4.1",constructor:k,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n