AlkantarClanX12
Current Path : /home/thanudqk/thepball.com/wp-content/plugins/wp-smushit/app/assets/js/ |
Current File : /home/thanudqk/thepball.com/wp-content/plugins/wp-smushit/app/assets/js/smush-blocks.min.js |
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(n,s,function(t){return e[t]}.bind(null,s));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=26)}({26:function(e,t,r){"use strict";r.r(t),r.d(t,"smushStats",(function(){return u})),r.d(t,"fetchProps",(function(){return o}));var n=wp.compose.createHigherOrderComponent,s=wp.element.Fragment,a=wp.blockEditor.InspectorControls,i=wp.components.PanelBody;function u(e,t){return void 0===t?window.smush_vars.strings.gb.select_image:"string"==typeof t?t:React.createElement("div",{id:"smush-stats",className:"sui-smush-media smush-stats-wrapper hidden",style:{display:"block"}},React.createElement("table",{className:"wp-smush-stats-holder"},React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{className:"smush-stats-header"},window.smush_vars.strings.gb.size),React.createElement("th",{className:"smush-stats-header"},window.smush_vars.strings.gb.savings))),React.createElement("tbody",null,Object.keys(t.sizes).filter((function(e){return 0<t.sizes[e].percent})).map((function(e,r){return React.createElement("tr",{key:r},React.createElement("td",null,e.toUpperCase()),React.createElement("td",null,function(e){var t=["kB","MB","GB","TB"];if(Math.abs(e)<1024)return e+" B";var r=-1;do{e/=1024,++r}while(Math.abs(e)>=1024&&r<t.length-1);return e.toFixed(1)+" "+t[r]}(t.sizes[e].bytes)," ","( ",t.sizes[e].percent,"% )"))})))))}function o(e){var t=new wp.api.models.Media({id:e.attributes.id}),r=e.attributes.smush;t.fetch({attribute:"smush"}).done((function(t){"string"==typeof t.smush?e.setAttributes({smush:t.smush}):void 0===t.smush||void 0!==r&&JSON.stringify(r)===JSON.stringify(t.smush)||e.setAttributes({smush:t.smush})}))}var c=n((function(e){return function(t){if("core/image"!==t.name||!t.isSelected||void 0===t.attributes.id)return React.createElement(s,null,React.createElement(e,t));var r=t.attributes.smush;return o(t),React.createElement(s,null,React.createElement(e,t),React.createElement(a,null,React.createElement(i,{title:window.smush_vars.strings.gb.stats},u(t.attributes.id,r))))}}),"withInspectorControl");wp.hooks.addFilter("editor.BlockEdit","wp-smush/smush-data-control",c)}}); //# sourceMappingURL=smush-blocks.min.js.map