%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/itworks/wp-content/plugins/wp-smushit/app/assets/js/
Upload File :
Create Path :
Current File : /var/www/html/itworks/wp-content/plugins/wp-smushit/app/assets/js/smush-rd.min.js.map

{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./_src/js/frontend/public-resize-detection.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","WP_Smush_IRS","bar","document","getElementById","toggle","images","bigger","smaller","init","wp_smush_resize_vars","this","strings","detectImages","generateMarkup","removeEmptyDivs","querySelector","classList","add","remove","addEventListener","handleToggleClick","shouldSkipImage","image","contains","dataset","resizeDetection","clientWidth","clientHeight","getTooltipText","props","tooltip_text","bigger_width","bigger_height","large_image","smaller_width","smaller_height","small_image","replace","real_width","real_height","type","_this","forEach","index","item","createElement","tooltip","setAttribute","class","e","highlightImage","innerHTML","concat","computed_width","computed_height","appendChild","_this2","length","style","display","removeSelection","el","getElementsByClassName","currentTarget","scrollIntoView","behavior","block","inline","opacity","setTimeout","items","Array","from","div","_this3","getElementsByTagName","keys","map","naturalWidth","naturalHeight","imgType","imageClass","push","src","window"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,C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AAmBL,EAAMM,eAAvF,CAIA,IAAM6C,EAAUnD,EAAME,cAAgBF,EAAMG,cAAgB,SAAW,UACtEiD,EAAc,gBAAgBP,EAAKrE,OAAO2E,GAASvB,OAAS,GAG7DiB,EAAKrE,OAAO2E,GAASE,KAAK,CACzBC,IAAK7D,EACLO,MAAOA,EACPmB,MAAOiC,IAQR3D,EAAMN,UAAUC,IAAI,sBACpBK,EAAMN,UAAUC,IAAIgE,SASpBG,OAAOjE,iBAAiB,OAAQ,kBAAMnB,EAAaQ,SA9NrD","file":"smush-rd.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 21);\n","/**\n * Image resize detection (IRD).\n *\n * Show all wrongly scaled images with a highlighted border and resize box.\n *\n * Made in pure JS.\n * DO NOT ADD JQUERY SUPPORT!!!\n *\n * @since 2.9\n */\n( function() {\n\t'use strict';\n\n\tconst WP_Smush_IRS = {\n\t\tbar: document.getElementById('smush-image-bar'),\n\t\ttoggle: document.getElementById('smush-image-bar-toggle'),\n\t\timages: {\n\t\t\tbigger: [],\n\t\t\tsmaller: []\n\t\t},\n\n\t\t/**\n\t\t * Init scripts.\n\t\t */\n\t\tinit: function () {\n\t\t\t/** @var {array} wp_smush_resize_vars */\n\t\t\tif ( wp_smush_resize_vars ) {\n\t\t\t\tthis.strings = wp_smush_resize_vars;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Make sure these are set, before we proceed.\n\t\t\t */\n\t\t\tif ( ! this.bar )\n\t\t\t\tthis.bar = document.getElementById('smush-image-bar');\n\t\t\tif ( ! this.toggle )\n\t\t\t\tthis.toggle = document.getElementById('smush-image-bar-toggle');\n\n\t\t\tthis.detectImages();\n\t\t\tthis.generateMarkup('bigger');\n\t\t\tthis.generateMarkup('smaller');\n\t\t\tthis.removeEmptyDivs();\n\n            this.toggle.querySelector('i').classList.add('sui-icon-info');\n            this.toggle.querySelector('i').classList.remove('sui-icon-loader');\n\n\t\t\t// Register the event handler after everything is done.\n            this.toggle.addEventListener('click', this.handleToggleClick.bind(this));\n\t\t},\n\n\t\t/**\n\t\t * Various checks to see if the image should be processed.\n\t\t *\n\t\t * @param {object} image\n\t\t * @returns {boolean}\n\t\t */\n\t\tshouldSkipImage: function(image) {\n\t\t\t// Skip avatars.\n\t\t\tif ( image.classList.contains('avatar') ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Skip images from Smush CDN with auto-resize feature.\n\t\t\tif ( 'undefined' !== typeof image.dataset.resizeDetection && '0' === image.dataset.resizeDetection ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// If width attribute is not set, do not continue.\n\t\t\treturn null === image.clientWidth || null === image.clientHeight;\n\t\t},\n\n\t\t/**\n\t\t * Get tooltip text.\n\t\t *\n\t\t * @param {object} props\n\t\t * @returns {string}\n\t\t */\n\t\tgetTooltipText: function(props) {\n\t\t\tlet tooltip_text = '';\n\n\t\t\tif ( props.bigger_width || props.bigger_height ) {\n\t\t\t\t/** @var {string} strings.large_image */\n\t\t\t\ttooltip_text = this.strings.large_image;\n\t\t\t} else if ( props.smaller_width || props.smaller_height ) {\n\t\t\t\t/** @var {string} strings.small_image */\n\t\t\t\ttooltip_text = this.strings.small_image;\n\t\t\t}\n\n\t\t\treturn tooltip_text.replace('width', props.real_width)\n\t\t\t\t.replace('height', props.real_height);\n\t\t},\n\n\t\t/**\n\t\t * Generate markup.\n\t\t *\n\t\t * @param {string} type  Accepts: 'bigger' or 'smaller'.\n\t\t */\n\t\tgenerateMarkup: function(type) {\n\t\t\tthis.images[type].forEach((image, index) => {\n\t\t\t\tconst item = document.createElement('div'),\n\t\t\t\t\ttooltip = this.getTooltipText(image.props);\n\n\t\t\t\titem.setAttribute('class', 'smush-resize-box smush-tooltip smush-tooltip-constrained');\n\t\t\t\titem.setAttribute('data-tooltip', tooltip);\n\t\t\t\titem.setAttribute('data-image', image.class);\n\t\t\t\titem.addEventListener('click', (e) => this.highlightImage(e));\n\n\t\t\t\titem.innerHTML = `\n\t\t\t\t\t<div class=\"smush-image-info\">\n\t\t\t\t\t\t<span>${index + 1}</span>\n\t\t\t\t\t\t<span class=\"smush-tag\">${image.props.computed_width} x ${image.props.computed_height}px</span>\n\t\t\t\t\t\t<i class=\"smush-front-icons smush-front-icon-arrows-in\" aria-hidden=\"true\">&nbsp;</i>\n\t\t\t\t\t\t<span class=\"smush-tag smush-tag-success\">${image.props.real_width} × ${image.props.real_height}px</span>\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"smush-image-description\">${tooltip}</div>\n\t\t\t\t`;\n\n\t\t\t\tdocument.getElementById('smush-image-bar-items-'+type).appendChild(item);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Remove sections that don't have images.\n\t\t */\n\t\tremoveEmptyDivs: function() {\n\t\t\tconst types = ['bigger', 'smaller'];\n\t\t\ttypes.forEach(type => {\n\t\t\t\tif ( 0 === this.images[type].length ) {\n\t\t\t\t\tconst div = document.getElementById('smush-image-bar-items-'+type);\n\t\t\t\t\tdiv.style.display = 'none';\n\t\t\t\t}\n\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Scroll the selected image into view and highlight it.\n\t\t */\n\t\thighlightImage: function(e) {\n\t\t\tthis.removeSelection();\n\n\t\t\tconst el = document.getElementsByClassName(e.currentTarget.dataset.image);\n\t\t\tif ('undefined' !== typeof el[0]) {\n\t\t\t\t// Display description box.\n\t\t\t\te.currentTarget.classList.toggle('show-description');\n\n\t\t\t\t// Scroll and flash image.\n\t\t\t\tel[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'nearest'});\n\t\t\t\tel[0].style.opacity = '0.5';\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tel[0].style.opacity = '1';\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle click on the toggle item.\n\t\t */\n\t\thandleToggleClick: function() {\n\t\t\tthis.bar.classList.toggle('closed');\n\t\t\tthis.toggle.classList.toggle('closed');\n\t\t\tthis.removeSelection();\n\t\t},\n\n\t\t/**\n\t\t * Remove selected items.\n\t\t */\n\t\tremoveSelection: function() {\n\t\t\tconst items = document.getElementsByClassName('show-description');\n\t\t\tif ( items.length > 0 ) {\n\t\t\t\tArray.from(items).forEach(div => div.classList.remove('show-description'));\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Function to highlight all scaled images.\n\t\t *\n\t\t * Add yellow border and then show one small box to\n\t\t * resize the images as per the required size, on fly.\n\t\t */\n\t\tdetectImages: function() {\n\t\t\tconst images = document.getElementsByTagName('img');\n\n            Object.keys(images).map( e => {\n            \tconst image = images[e];\n\n\t\t\t\tif ( this.shouldSkipImage(image) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get defined width and height.\n\t\t\t\tconst props = {\n\t\t\t\t\treal_width:      image.clientWidth,\n\t\t\t\t\treal_height:     image.clientHeight,\n\t\t\t\t\tcomputed_width:  image.naturalWidth,\n\t\t\t\t\tcomputed_height: image.naturalHeight,\n\t\t\t\t\tbigger_width:  ( image.clientWidth * 1.5 ) < image.naturalWidth,\n\t\t\t\t\tbigger_height: ( image.clientHeight * 1.5 ) < image.naturalHeight,\n\t\t\t\t\tsmaller_width:   image.clientWidth > image.naturalWidth,\n\t\t\t\t\tsmaller_height:  image.clientHeight > image.naturalHeight\n\t\t\t\t};\n\n\t\t\t\t// In case image is in correct size, do not continue.\n\t\t\t\tif ( ! props.bigger_width && ! props.bigger_height && ! props.smaller_width && ! props.smaller_height ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst imgType = props.bigger_width || props.bigger_height ? 'bigger' : 'smaller',\n\t\t\t\t\timageClass =  'smush-image-'+(this.images[imgType].length + 1);\n\n\t\t\t\t// Fill the images arrays.\n\t\t\t\tthis.images[imgType].push({\n\t\t\t\t\tsrc: image,\n\t\t\t\t\tprops: props,\n\t\t\t\t\tclass: imageClass\n\t\t\t\t});\n\n\t\t\t\t/**\n\t\t\t\t * Add class to original image.\n\t\t\t\t * Can't add two classes in single add(), because no support in IE11.\n\t\t\t\t * image.classList.add('smush-detected-img', imageClass);\n\t\t\t\t */\n\t\t\t\timage.classList.add('smush-detected-img');\n\t\t\t\timage.classList.add(imageClass);\n\t\t\t});\n\t\t} // End detectImages()\n\n\t}; // End WP_Smush_IRS\n\n\t/**\n\t * After page load, initialize toggle event.\n\t */\n    window.addEventListener('load', () => WP_Smush_IRS.init());\n\n}());"],"sourceRoot":""}

Zerion Mini Shell 1.0