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AAWA,GAAY,CAAC,EAC9BkB,OAAOlB,SAAWA,EAYXw1C,OAAOlpB,UAAU3P,WACvB64B,OAAOlpB,UAAU3P,SAAW,SAAUrI,EAAQ7M,GAK7C,MAJsB,iBAAVA,IACXA,EAAQ,KAGJA,EAAQ6M,EAAOvP,OAASxB,KAAKwB,UAGQ,IAAnCxB,KAAKgR,QAASD,EAAQ7M,EAC9B,GAGD6tD,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MAaTA,EAAS,I","sources":["webpack://wp-smushit/./_src/js/common/globalStats.js","webpack://wp-smushit/./_src/js/common/media-library-scanner.js","webpack://wp-smushit/./_src/js/common/progressbar.js","webpack://wp-smushit/./_src/js/mixpanel.js","webpack://wp-smushit/./_src/js/modules/admin-common.js","webpack://wp-smushit/./_src/js/modules/admin.js","webpack://wp-smushit/./_src/js/modules/background-process.js","webpack://wp-smushit/./_src/js/modules/bulk-restore.js","webpack://wp-smushit/./_src/js/modules/bulk-smush.js","webpack://wp-smushit/./_src/js/modules/directory-smush.js","webpack://wp-smushit/./_src/js/smush/directory-scanner.js","webpack://wp-smushit/./_src/js/modules/helpers.js","webpack://wp-smushit/./_src/js/modules/media-library-scanner-on-bulk-smush.js","webpack://wp-smushit/./_src/js/modules/media-library-scanner-on-dashboard.js","webpack://wp-smushit/./_src/js/modules/nextgen-bulk.js","webpack://wp-smushit/./_src/js/modules/notice.js","webpack://wp-smushit/./_src/js/modules/onboarding.js","webpack://wp-smushit/./_src/js/smush/cdn.js","webpack://wp-smushit/./_src/js/smush/lazy-load.js","webpack://wp-smushit/./_src/js/smush/product-analytics.js","webpack://wp-smushit/./_src/js/smush/settings.js","webpack://wp-smushit/./_src/js/smush/smush.js","webpack://wp-smushit/./_src/js/smush/webp.js","webpack://wp-smushit/./_src/js/utils/fetcher.js","webpack://wp-smushit/./node_modules/jquery.fancytree/dist/modules/jquery.fancytree.js","webpack://wp-smushit/./node_modules/jquery.fancytree/dist/modules/jquery.fancytree.ui-deps.js","webpack://wp-smushit/./node_modules/lodash/_Symbol.js","webpack://wp-smushit/./node_modules/lodash/_apply.js","webpack://wp-smushit/./node_modules/lodash/_arrayLikeKeys.js","webpack://wp-smushit/./node_modules/lodash/_assignValue.js","webpack://wp-smushit/./node_modules/lodash/_baseAssignValue.js","webpack://wp-smushit/./node_modules/lodash/_baseGetTag.js","webpack://wp-smushit/./node_modules/lodash/_baseIsArguments.js","webpack://wp-smushit/./node_modules/lodash/_baseIsNative.js","webpack://wp-smushit/./node_modules/lodash/_baseIsTypedArray.js","webpack://wp-smushit/./node_modules/lodash/_baseKeys.js","webpack://wp-smushit/./node_modules/lodash/_baseRest.js","webpack://wp-smushit/./node_modules/lodash/_baseSetToString.js","webpack://wp-smushit/./node_modules/lodash/_baseTimes.js","webpack://wp-smushit/./node_modules/lodash/_baseUnary.js","webpack://wp-smushit/./node_modules/lodash/_copyObject.js","webpack://wp-smushit/./node_modules/lodash/_coreJsData.js","webpack://wp-smushit/./node_modules/lodash/_createAssigner.js","webpack://wp-smushit/./node_modules/lodash/_defineProperty.js","webpack://wp-smushit/./node_modules/lodash/_freeGlobal.js","webpack://wp-smushit/./node_modules/lodash/_getNative.js","webpack://wp-smushit/./node_modules/lodash/_getRawTag.js","webpack://wp-smushit/./node_modules/lodash/_getValue.js","webpack://wp-smushit/./node_modules/lodash/_isIndex.js","webpack://wp-smushit/./node_modules/lodash/_isIterateeCall.js","webpack://wp-smushit/./node_modules/lodash/_isMasked.js","webpack://wp-smushit/./node_modules/lodash/_isPrototype.js","webpack://wp-smushit/./node_modules/lodash/_nativeKeys.js","webpack://wp-smushit/./node_modules/lodash/_nodeUtil.js","webpack://wp-smushit/./node_modules/lodash/_objectToString.js","webpack://wp-smushit/./node_modules/lodash/_overArg.js","webpack://wp-smushit/./node_modules/lodash/_overRest.js","webpack://wp-smushit/./node_modules/lodash/_root.js","webpack://wp-smushit/./node_modules/lodash/_setToString.js","webpack://wp-smushit/./node_modules/lodash/_shortOut.js","webpack://wp-smushit/./node_modules/lodash/_toSource.js","webpack://wp-smushit/./node_modules/lodash/assign.js","webpack://wp-smushit/./node_modules/lodash/constant.js","webpack://wp-smushit/./node_modules/lodash/eq.js","webpack://wp-smushit/./node_modules/lodash/identity.js","webpack://wp-smushit/./node_modules/lodash/isArguments.js","webpack://wp-smushit/./node_modules/lodash/isArray.js","webpack://wp-smushit/./node_modules/lodash/isArrayLike.js","webpack://wp-smushit/./node_modules/lodash/isBuffer.js","webpack://wp-smushit/./node_modules/lodash/isFunction.js","webpack://wp-smushit/./node_modules/lodash/isLength.js","webpack://wp-smushit/./node_modules/lodash/isObject.js","webpack://wp-smushit/./node_modules/lodash/isObjectLike.js","webpack://wp-smushit/./node_modules/lodash/isTypedArray.js","webpack://wp-smushit/./node_modules/lodash/keys.js","webpack://wp-smushit/./node_modules/lodash/stubFalse.js","webpack://wp-smushit/./node_modules/mixpanel-browser/dist/mixpanel.cjs.js","webpack://wp-smushit/external var \"jQuery\"","webpack://wp-smushit/webpack/bootstrap","webpack://wp-smushit/webpack/runtime/compat get default export","webpack://wp-smushit/webpack/runtime/define property getters","webpack://wp-smushit/webpack/runtime/global","webpack://wp-smushit/webpack/runtime/hasOwnProperty shorthand","webpack://wp-smushit/webpack/runtime/make namespace object","webpack://wp-smushit/webpack/runtime/node module decorator","webpack://wp-smushit/./_src/js/app.js"],"sourcesContent":["/* global WP_Smush */\nexport const UpsellManger = ( () => {\n\treturn {\n\t\tmaybeShowCDNActivationNotice() {\n\t\t\tif ( ! wp_smush_msgs.smush_cdn_activation_notice ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tWP_Smush.helpers.renderActivationCDNNotice( wp_smush_msgs.smush_cdn_activation_notice );\n\t\t},\n\t\tmaybeShowCDNUpsellForPreSiteOnStart() {\n\t\t\tconst upsellCdn = document.querySelector( '.wp-smush-upsell-cdn' );\n\t\t\tif ( upsellCdn ) {\n\t\t\t\tupsellCdn.querySelector( 'p' ).innerHTML = wp_smush_msgs.processing_cdn_for_free;\n\t\t\t\tupsellCdn.classList.remove( 'sui-hidden' );\n\t\t\t}\n\t\t},\n\t\tmaybeShowCDNUpsellForPreSiteOnCompleted() {\n\t\t\tconst upsellCdn = document.querySelector( '.wp-smush-upsell-cdn' );\n\t\t\tif ( upsellCdn ) {\n\t\t\t\tupsellCdn.querySelector( 'p' ).innerHTML = wp_smush_msgs.processed_cdn_for_free;\n\t\t\t\tupsellCdn.classList.remove( 'sui-hidden' );\n\t\t\t}\n\t\t}\n\t};\n} )();\nexport const GlobalStats = ( () => {\n\tconst $ = document.querySelector.bind( document );\n\tconst summarySmush = $( '.sui-summary-smush-metabox' );\n\tif ( ! summarySmush ) {\n\t\treturn {};\n\t}\n\t// Cache initial stats.\n\tlet boStats = window.wp_smushit_data.bo_stats;\n\tlet globalStats = {\n\t\tcount_images: 0,\n\t\tcount_total: 0,\n\t\tcount_resize: 0,\n\t\tcount_skipped: 0,\n\t\tcount_smushed: 0,\n\t\tsavings_bytes: 0,\n\t\tsavings_resize: 0,\n\t\tsize_after: 0,\n\t\tsize_before: 0,\n\t\tsavings_percent: 0,\n\t\tpercent_grade: 'sui-grade-dismissed',\n\t\tpercent_metric: 0,\n\t\tpercent_optimized: 0,\n\t\tremaining_count: 0,\n\t\thuman_bytes: '',\n\t\tsavings_conversion_human: '',\n\t\tsavings_conversion: 0,\n\t};\n\n\tconst imageScore = $( '#smush-image-score' );\n\tconst logBulk = $( '.smush-final-log .smush-bulk-errors' );\n\tconst bulkSmushCountContent = $( '#wp-smush-bulk-content' );\n\tlet allErrors = {};\n\n\tconst generateGlobalStatsFromSmushData = ( smushScriptData ) => {\n\t\twindow.wp_smushit_data = Object.assign( window.wp_smushit_data, smushScriptData || {} );\n\t\tglobalStats = Object.keys( globalStats ).reduce( function( newStats, key ) {\n\t\t\tif ( key in window.wp_smushit_data ) {\n\t\t\t\tnewStats[ key ] = window.wp_smushit_data[ key ];\n\t\t\t}\n\t\t\treturn newStats;\n\t\t}, {} );\n\t}\n\n\tgenerateGlobalStatsFromSmushData( window.wp_smushit_data );\n\n\treturn {\n\t\tisChangedStats( newBoStats ) {\n\t\t\tconst primaryKeys = [ 'total_items', 'processed_items', 'failed_items', 'is_cancelled', 'is_completed' ];\n\t\t\treturn primaryKeys.some( ( key ) => {\n\t\t\t\treturn newBoStats[ key ] !== boStats[ key ];\n\t\t\t} );\n\t\t},\n\t\tsetBoStats( newBoStats ) {\n\t\t\tboStats = Object.assign( boStats, newBoStats || {} );\n\t\t\treturn this;\n\t\t},\n\t\tgetBoStats() {\n\t\t\treturn boStats;\n\t\t},\n\t\tsetGlobalStats( newGlobalStats ) {\n\t\t\tglobalStats = Object.assign( globalStats, newGlobalStats || {} );\n\t\t\treturn this;\n\t\t},\n\t\tgetGlobalStats() {\n\t\t\treturn globalStats;\n\t\t},\n\t\t/**\n\t\t * Circle progress bar.\n\t\t */\n\t\trenderScoreProgress() {\n\t\t\timageScore.className = imageScore.className.replace( /(^|\\s)sui-grade-\\S+/g, '' );\n\t\t\timageScore.classList.add( globalStats.percent_grade );\n\t\t\timageScore.dataset.score = globalStats.percent_optimized;\n\t\t\timageScore.querySelector( '.sui-circle-score-label' ).innerHTML = globalStats.percent_optimized;\n\n\t\t\timageScore\n\t\t\t\t.querySelector( 'circle:last-child' )\n\t\t\t\t.setAttribute( 'style', '--metric-array:' + ( 2.63893782902 * globalStats.percent_metric ) + ' ' + ( 263.893782902 - globalStats.percent_metric ) );\n\t\t},\n\t\t/**\n\t\t * Summary detail - center meta box.\n\t\t */\n\t\trenderSummaryDetail() {\n\t\t\tthis.renderTotalStats();\n\t\t\tthis.renderResizedStats();\n\t\t\tthis.renderConversionSavings();\n\t\t},\n\t\trenderTotalStats() {\n\t\t\t// Total savings.\n\t\t\tsummarySmush.querySelector( '.sui-summary-large.wp-smush-stats-human' ).innerHTML = globalStats.human_bytes;\n\t\t\t// Update the savings percent.\n\t\t\tsummarySmush.querySelector( '.wp-smush-savings .wp-smush-stats-percent' ).innerHTML = globalStats.savings_percent;\n\t\t\t// To total smushed images files.\n\t\t\tsummarySmush.querySelector( '.wp-smush-count-total .wp-smush-total-optimised' ).innerHTML = globalStats.count_images;\n\t\t},\n\t\trenderResizedStats() {\n\t\t\tconst resizeCountElement = summarySmush.querySelector( '.wp-smush-count-resize-total' );\n\t\t\tif ( ! resizeCountElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( globalStats.count_resize > 0 ) {\n\t\t\t\tresizeCountElement.classList.remove( 'sui-hidden' );\n\t\t\t} else {\n\t\t\t\tresizeCountElement.classList.add( 'sui-hidden' );\n\t\t\t}\n\t\t\tresizeCountElement.querySelector( '.wp-smush-total-optimised' ).innerHTML = globalStats.count_resize;\n\t\t},\n\t\trenderConversionSavings() {\n\t\t\t// PNG2JPG Savings.\n\t\t\tconst conversionSavingsElement = summarySmush.querySelector( '.smush-conversion-savings .wp-smush-stats' );\n\t\t\tif ( ! conversionSavingsElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconversionSavingsElement.innerHTML = globalStats.savings_conversion_human;\n\t\t\tif ( globalStats.savings_conversion > 0 ) {\n\t\t\t\tconversionSavingsElement.parentElement.classList.remove( 'sui-hidden' );\n\t\t\t} else {\n\t\t\t\tconversionSavingsElement.parentElement.classList.add( 'sui-hidden' );\n\t\t\t}\n\t\t},\n\t\trenderBoxSummary() {\n\t\t\t// Circle core progress.\n\t\t\tthis.renderScoreProgress();\n\t\t\t// Summary detail.\n\t\t\tthis.renderSummaryDetail();\n\t\t},\n\t\tsetErrors( newErrors ) {\n\t\t\tallErrors = newErrors || {};\n\t\t},\n\t\tgetErrors() {\n\t\t\treturn allErrors;\n\t\t},\n\t\trenderErrors() {\n\t\t\tif ( ! Object.keys( allErrors ).length || ! boStats.is_completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst errors = [];\n\t\t\tconst errorKeys = Object.keys( allErrors );\n\t\t\t// Cache error code to avoid double upsell notice.\n\t\t\tlet showAnimatedUpsell = false;\n\t\t\terrorKeys.map( ( image_id, index ) => {\n\t\t\t\tconst upsellErrorCode = allErrors[ image_id ].error_code;\n\t\t\t\tif ( index < 5 && 'animated' === upsellErrorCode ) {\n\t\t\t\t\tshowAnimatedUpsell = true;\n\t\t\t\t}\n\t\t\t\terrors.push( WP_Smush.helpers.prepareBulkSmushErrorRow(\n\t\t\t\t\tallErrors[ image_id ].error_message,\n\t\t\t\t\tallErrors[ image_id ].file_name,\n\t\t\t\t\tallErrors[ image_id ].thumbnail,\n\t\t\t\t\timage_id,\n\t\t\t\t\t'media',\n\t\t\t\t\tallErrors[ image_id ].error_code,\n\t\t\t\t) );\n\t\t\t}\n\t\t\t);\n\t\t\tlogBulk.innerHTML = errors.join( '' );\n\t\t\tlogBulk.parentElement.classList.remove( 'sui-hidden' );\n\t\t\tlogBulk.parentElement.style.display = null;\n\t\t\t// Show view all.\n\t\t\tif ( errorKeys.length > 1 ) {\n\t\t\t\t$( '.smush-bulk-errors-actions' ).classList.remove( 'sui-hidden' );\n\t\t\t}\n\n\t\t\t// Show animated upsell CDN if user disabled CDN and found an animated error in first 5 errors.\n\t\t\tif ( showAnimatedUpsell ) {\n\t\t\t\tUpsellManger.maybeShowCDNActivationNotice();\n\t\t\t}\n\t\t},\n\t\tresetAndHideBulkErrors() {\n\t\t\tif ( ! logBulk ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.resetErrors();\n\t\t\tlogBulk.parentElement.classList.add( 'sui-hidden' );\n\t\t\tlogBulk.innerHTML = '';\n\t\t},\n\t\tresetErrors() {\n\t\t\tallErrors = {};\n\t\t},\n\t\trenderStats() {\n\t\t\t// Render Smush box summary.\n\t\t\tthis.renderBoxSummary();\n\t\t\t// Render Errors.\n\t\t\tthis.renderErrors();\n\t\t},\n\t\tmaybeUpdateBulkSmushCountContent( newContent ) {\n\t\t\tif ( newContent && bulkSmushCountContent ) {\n\t\t\t\tbulkSmushCountContent.innerHTML = newContent;\n\t\t\t}\n\t\t},\n\t\tupdateGlobalStatsFromSmushScriptData( smushScriptData ) {\n\t\t\tthis.maybeUpdateBulkSmushCountContent( smushScriptData?.content );\n\t\t\tgenerateGlobalStatsFromSmushData( smushScriptData );\n\t\t\treturn this;\n\t\t},\n\t};\n} )();\n","/* global WP_Smush */\n\n/**\n * Abstract Media Library Scanner.\n *\n */\nimport Fetcher from '../utils/fetcher';\nimport { scanProgressBar } from './progressbar';\nimport { GlobalStats } from './globalStats';\nconst { __ } = wp.i18n;\nexport default class MediaLibraryScanner {\n\tconstructor() {\n\t\tthis.autoSyncDuration = 1500;\n\t\tthis.progressTimeoutId = 0;\n\t\tthis.scanProgress = scanProgressBar( this.autoSyncDuration );\n\t}\n\n\tstartScan( optimizeOnScanCompleted = false ) {\n\t\tthis.onStart();\n\t\treturn Fetcher.scanMediaLibrary.start( optimizeOnScanCompleted ).then( ( response ) => {\n\t\t\tif ( ! response?.success ) {\n\t\t\t\tthis.onStartFailure( response );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.showProgressBar().autoSyncStatus();\n\t\t} );\n\t}\n\n\tonStart() {\n\t\t// Do nothing at the moment.\n\t}\n\n\tonStartFailure( response ) {\n\t\tWP_Smush.helpers.showNotice( response, {\n\t\t\tshowdismiss: true,\n\t\t\tautoclose: false,\n\t\t} );\n\t}\n\n\tshowProgressBar() {\n\t\tthis.onShowProgressBar();\n\t\tthis.scanProgress.reset().setOnCancelCallback( this.showStopScanningModal.bind( this ) ).open();\n\t\treturn this;\n\t}\n\n\tonShowProgressBar() {\n\t\t// Do nothing at the moment.\n\t}\n\n\tshowStopScanningModal() {\n\t\tif ( ! window.SUI ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.onShowStopScanningModal();\n\n\t\twindow.SUI.openModal(\n\t\t\t'smush-stop-scanning-dialog',\n\t\t\t'wpbody-content',\n\t\t\tundefined,\n\t\t\tfalse\n\t\t);\n\t}\n\n\tonShowStopScanningModal() {\n\t\tthis.registerCancelProcessEvent();\n\t}\n\n\tregisterCancelProcessEvent() {\n\t\tconst stopScanButton = document.querySelector( '.smush-stop-scanning-dialog-button' );\n\t\tif ( ! stopScanButton ) {\n\t\t\treturn;\n\t\t}\n\n\t\tstopScanButton.addEventListener( 'click', this.cancelProgress.bind( this ) );\n\t}\n\n\tcloseStopScanningModal() {\n\t\tif ( ! window.SUI ) {\n\t\t\treturn;\n\t\t}\n\t\tconst stopScanningElement = document.querySelector( '#smush-stop-scanning-dialog' );\n\t\tconst isModalClosed = ( ! stopScanningElement ) || ! stopScanningElement.classList.contains( 'sui-content-fade-in' );\n\t\tif ( isModalClosed ) {\n\t\t\treturn;\n\t\t}\n\t\twindow.SUI.closeModal( 'smush-stop-scanning-dialog' );\n\t}\n\n\tcloseProgressBar() {\n\t\tthis.onCloseProgressBar();\n\t\tthis.scanProgress.close();\n\t}\n\n\tonCloseProgressBar() {\n\t\t// Do nothing at the moment.\n\t}\n\n\tupdateProgress( stats ) {\n\t\tconst totalItems = this.getTotalItems( stats );\n\t\tconst processedItems = this.getProcessedItems( stats );\n\n\t\treturn this.scanProgress.update( processedItems, totalItems );\n\t}\n\n\tgetProcessedItems( stats ) {\n\t\treturn stats?.processed_items || 0;\n\t}\n\n\tgetTotalItems( stats ) {\n\t\treturn stats?.total_items || 0;\n\t}\n\n\tcancelProgress() {\n\t\tthis.scanProgress.setCancelButtonOnCancelling();\n\t\treturn Fetcher.scanMediaLibrary.cancel().then( ( response ) => {\n\t\t\tif ( ! response?.success ) {\n\t\t\t\tthis.onCancelFailure( response );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.onCancelled( response.data );\n\t\t} );\n\t}\n\n\tonCancelFailure( response ) {\n\t\tWP_Smush.helpers.showNotice( response, {\n\t\t\tshowdismiss: true,\n\t\t\tautoclose: false,\n\t\t} );\n\t\tthis.scanProgress.resetCancelButtonOnFailure();\n\t}\n\n\tgetErrorProgressMessage() {\n\t\treturn __( 'Unfortunately the scan hit an error due to limited resources on your site, we have adjusted the scan to use fewer resources the next time.', 'wp-smushit' );\n\t}\n\n\tonDead( stats ) {\n\t\tthis.clearProgressTimeout();\n\t\tthis.closeProgressBar();\n\t\tthis.closeStopScanningModal();\n\t\tthis.showRetryScanModal();\n\t}\n\n\tshowRetryScanModal() {\n\t\tconst retryScanModalElement = document.getElementById( 'smush-retry-scan-notice' );\n\t\tif ( ! window.SUI || ! retryScanModalElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tretryScanModalElement.querySelector('.smush-retry-scan-notice-button').onclick = (e) => {\n\t\t\twindow.SUI.closeModal( 'smush-retry-scan-notice' );\n\t\t\tconst recheckImagesBtn = document.querySelector( '.wp-smush-scan' );\n\t\t\tif ( ! recheckImagesBtn ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\trecheckImagesBtn.click();\n\t\t}\n\n\t\twindow.SUI.openModal(\n\t\t\t'smush-retry-scan-notice',\n\t\t\t'wpbody-content',\n\t\t\tundefined,\n\t\t\tfalse\n\t\t);\n\t}\n\n\tonCompleted( stats ) {\n\t\tthis.onFinish( stats );\n\t}\n\n\tonCancelled( stats ) {\n\t\tthis.onFinish( stats );\n\t}\n\n\tonFinish( stats ) {\n\t\tthis.clearProgressTimeout();\n\t\tconst globalStats = stats?.global_stats;\n\t\tthis.updateGlobalStatsAndBulkContent( globalStats );\n\t\tthis.closeProgressBar();\n\t\tthis.closeStopScanningModal();\n\t}\n\n\tclearProgressTimeout() {\n\t\tif ( this.progressTimeoutId ) {\n\t\t\tclearTimeout( this.progressTimeoutId );\n\t\t}\n\t}\n\n\tupdateGlobalStatsAndBulkContent( globalStats ) {\n\t\tif ( ! globalStats ) {\n\t\t\treturn;\n\t\t}\n\t\tGlobalStats.updateGlobalStatsFromSmushScriptData( globalStats );\n\t\tGlobalStats.renderStats();\n\t}\n\n\tgetStatus() {\n\t\treturn Fetcher.scanMediaLibrary.getScanStatus();\n\t}\n\n\tautoSyncStatus() {\n\t\tconst startTime = new Date().getTime();\n\t\tthis.getStatus().then( ( response ) => {\n\t\t\tif ( ! response?.success ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst stats = response.data;\n\n\t\t\tif ( stats.is_dead ) {\n\t\t\t\tthis.onDead( response.data );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.beforeUpdateStatus( stats );\n\n\t\t\tthis.updateProgress( stats ).then( () => {\n\t\t\t\tthis.scanProgress.increaseDurationToHaveChangeOnProgress( new Date().getTime() - startTime );\n\n\t\t\t\tconst isCompleted = stats?.is_completed;\n\t\t\t\tif ( isCompleted ) {\n\t\t\t\t\tthis.onCompleted( stats );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst isCancelled = stats?.is_cancelled;\n\t\t\t\tif ( isCancelled ) {\n\t\t\t\t\tthis.onCancelled( stats );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.progressTimeoutId = setTimeout( () => this.autoSyncStatus(), this.autoSyncDuration );\n\t\t\t} );\n\t\t} );\n\t}\n\n\tbeforeUpdateStatus() {\n\t\t// Do nothing at the moment.\n\t}\n\n\tsetInnerText( element, newText ) {\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\t\telement.dataset.originalText = element.dataset.originalText || element.innerText.trim();\n\t\telement.innerText = newText;\n\t}\n\n\trevertInnerText( element ) {\n\t\tif ( ! element || ! element.dataset.originalText ) {\n\t\t\treturn;\n\t\t}\n\t\telement.innerText = element.dataset.originalText.trim();\n\t}\n\n\thideAnElement( element ) {\n\t\tif ( element ) {\n\t\t\telement.classList.add( 'sui-hidden' );\n\t\t}\n\t}\n\n\tshowAnElement( element ) {\n\t\tif ( element ) {\n\t\t\telement.classList.remove( 'sui-hidden' );\n\t\t}\n\t}\n}\n","/* global WP_Smush */\n\n/**\n * SmushProgressBar\n * TODO: Update progressbar for free version.\n *\n * @param autoSyncDuration\n */\nexport const scanProgressBar = ( autoSyncDuration ) => {\n\tconst { __, _n } = wp.i18n;\n\tconst scanProgressBar = document.querySelector( '.wp-smush-scan-progress-bar-wrapper' );\n\tconst percentElement = scanProgressBar.querySelector( '.wp-smush-progress-percent' );\n\tconst progressElement = scanProgressBar.querySelector( '.wp-smush-progress-inner' );\n\tconst remainingTimeElement = scanProgressBar.querySelector( '.wp-smush-remaining-time' );\n\tconst cancelBtn = scanProgressBar.querySelector( '.wp-smush-cancel-scan-progress-btn' );\n\tconst holdOnNoticeElement = scanProgressBar.querySelector( '.wp-smush-scan-hold-on-notice' );\n\tlet onCancelCallback = () => {};\n\tlet intervalProgressAnimation = 0;\n\t// It should be smaller than autoSyncDuration.\n\tconst progressTransitionDuration = autoSyncDuration - 300;//1200\n\tscanProgressBar.style.setProperty( '--progress-transition-duration', progressTransitionDuration / 1000 + 's' );\n\n\tlet prevProcessedItems = window.wp_smushit_data?.media_library_scan?.processed_items || 0;\n\tconst cacheProcessTimePerItem = [];\n\tlet durationToHaveChangeOnProgress = autoSyncDuration;\n\tlet timeLimitToShowNotice = autoSyncDuration * 10;// 15s.\n\treturn {\n\t\tupdate( processedItems, totalItems ) {\n\t\t\tthis.updateRemainingTime( processedItems, totalItems );\n\n\t\t\tlet width = ( totalItems && Math.floor( processedItems / totalItems * 100 ) ) || 0;\n\t\t\twidth = Math.min( width, 100 );\n\n\t\t\tlet currentWidth = progressElement.style.width;\n\t\t\tcurrentWidth = ( currentWidth && currentWidth.replace( '%', '' ) ) || 0;\n\t\t\tprogressElement.style.width = width + '%';\n\n\t\t\treturn this.animateProgressBar( currentWidth, width );\n\t\t},\n\t\tanimateProgressBar( currentWidth, width ) {\n\t\t\tif ( intervalProgressAnimation ) {\n\t\t\t\tclearInterval( intervalProgressAnimation );\n\t\t\t}\n\t\t\treturn new Promise( ( resolve ) => {\n\t\t\t\tconst delayTime = progressTransitionDuration / ( width - currentWidth );\n\t\t\t\tintervalProgressAnimation = setInterval( () => {\n\t\t\t\t\t// Progress bar label.\n\t\t\t\t\tpercentElement.innerHTML = currentWidth + '%';\n\t\t\t\t\tcurrentWidth++;\n\t\t\t\t\tif ( currentWidth > width ) {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t\tclearInterval( intervalProgressAnimation );\n\t\t\t\t\t}\n\t\t\t\t}, delayTime );\n\t\t\t} );\n\t\t},\n\t\tupdateRemainingTime( processedItems, totalItems ) {\n\t\t\tif ( ! remainingTimeElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst processTimePerItem = this.calcProcessTimePerItem( processedItems ) || 500;\n\t\t\tconst remainingTime = processTimePerItem * ( totalItems - processedItems );\n\t\t\tremainingTimeElement.innerText = this.formatTime( remainingTime );\n\t\t},\n\t\tcalcProcessTimePerItem( processedItems ) {\n\t\t\tif ( ! processedItems ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tprevProcessedItems = prevProcessedItems <= processedItems ? prevProcessedItems : 0;\n\t\t\tif ( prevProcessedItems != processedItems ) {\n\t\t\t\tconst processTimePerItem = Math.floor( durationToHaveChangeOnProgress / ( processedItems - prevProcessedItems ) );\n\n\t\t\t\tprevProcessedItems = processedItems;\n\t\t\t\tcacheProcessTimePerItem.push( processTimePerItem );\n\t\t\t\tthis.resetDurationToHaveChangeOnProgress();\n\t\t\t} else {\n\t\t\t\tthis.increaseDurationToHaveChangeOnProgress( autoSyncDuration );\n\t\t\t}\n\n\t\t\tif ( ! cacheProcessTimePerItem.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn cacheProcessTimePerItem.reduce(\n\t\t\t\t( accumulator, processTime ) => accumulator + processTime, 0\n\t\t\t) / cacheProcessTimePerItem.length;\n\t\t},\n\t\tincreaseDurationToHaveChangeOnProgress( increaseTime ) {\n\t\t\tdurationToHaveChangeOnProgress += increaseTime;\n\t\t\tif ( durationToHaveChangeOnProgress > timeLimitToShowNotice ) {\n\t\t\t\tthis.showHoldOnNotice();\n\t\t\t}\n\t\t},\n\t\tshowHoldOnNotice() {\n\t\t\tholdOnNoticeElement.classList.remove( 'sui-hidden' );\n\t\t\ttimeLimitToShowNotice = 100000000;\n\t\t},\n\t\tresetHoldOnNoticeVisibility() {\n\t\t\tholdOnNoticeElement.classList.add( 'sui-hidden' );\n\t\t},\n\t\tresetDurationToHaveChangeOnProgress() {\n\t\t\tdurationToHaveChangeOnProgress = autoSyncDuration;\n\t\t},\n\t\tformatTime( totalMilliSeconds ) {\n\t\t\tconst totalSeconds = Math.floor( ( totalMilliSeconds + progressTransitionDuration ) / 1000 );\n\t\t\tconst seconds = totalSeconds % 60;\n\t\t\tconst minutes = Math.floor( totalSeconds / 60 );\n\n\t\t\tlet timeString = '';\n\t\t\tif ( minutes ) {\n\t\t\t\ttimeString += minutes + ' ' + _n( 'minute', 'minutes', minutes, 'wp-smushit' );\n\t\t\t}\n\n\t\t\ttimeString += ' ' + seconds + ' ' + _n( 'second', 'seconds', seconds, 'wp-smushit' );\n\n\t\t\treturn timeString.trim();\n\t\t},\n\t\treset() {\n\t\t\tprogressElement.style.width = '0%';\n\t\t\tpercentElement.innerHTML = '0%';\n\n\t\t\tthis.resetCancelButton();\n\t\t\tthis.resetHoldOnNoticeVisibility();\n\t\t\treturn this;\n\t\t},\n\t\topen() {\n\t\t\tcancelBtn.onclick = onCancelCallback;\n\t\t\tscanProgressBar.classList.remove( 'sui-hidden' );\n\t\t},\n\t\tclose() {\n\t\t\tscanProgressBar.classList.add( 'sui-hidden' );\n\t\t\tthis.reset();\n\t\t},\n\t\tsetOnCancelCallback( callBack ) {\n\t\t\tif ( 'function' !== typeof callBack ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonCancelCallback = callBack;\n\t\t\treturn this;\n\t\t},\n\t\tsetCancelButtonLabel( textContent ) {\n\t\t\tcancelBtn.textContent = textContent;\n\t\t\treturn this;\n\t\t},\n\t\tsetCancelButtonOnCancelling() {\n\t\t\tthis.setCancelButtonLabel( wp_smush_msgs.cancelling );\n\t\t\tthis.setOnCancelCallback( () => false );\n\t\t\tcancelBtn.setAttribute( 'disabled', true );\n\t\t},\n\t\tresetCancelButton() {\n\t\t\tthis.setOnCancelCallback( () => {} );\n\t\t\tthis.resetCancelButtonLabel();\n\t\t\tcancelBtn.removeAttribute( 'disabled' );\n\t\t},\n\t\tresetCancelButtonLabel() {\n\t\t\tthis.setCancelButtonLabel( __( 'Cancel Scan', 'wp-smushit' ) );\n\t\t},\n\t\tresetCancelButtonOnFailure() {\n\t\t\tthis.resetCancelButtonLabel();\n\t\t\tcancelBtn.removeAttribute( 'disabled' );\n\t\t}\n\t};\n};\n\nconst SmushProgressBar = () => {\n\t'use strict';\n\tconst progressBar = document.querySelector( '.wp-smush-bulk-progress-bar-wrapper' );\n\tif ( ! progressBar ) {\n\t\treturn {\n\t\t\tisEmptyObject: true,\n\t\t};\n\t}\n\tconst cancelBtn = progressBar.querySelector( '.wp-smush-cancel-btn' );\n\tconst bulkSmushDescription = document.querySelector( '.wp-smush-bulk-wrapper' );\n\tconst bulkRunningNotice = progressBar.querySelector( '#wp-smush-running-notice' );\n\tconst bulkSmushAllDone = document.querySelector( '.wp-smush-all-done' );\n\tlet isStateHidden = false;\n\tlet onCancelCallback = () => {};\n\n\treturn {\n\t\t/**\n\t\t * Update progress bar.\n\t\t *\n\t\t * @param {number} processedItems\n\t\t * @param {number} totalItems\n\t\t */\n\t\tupdate( processedItems, totalItems ) {\n\t\t\tlet width = totalItems && Math.floor( processedItems / totalItems * 100 ) || 0;\n\t\t\twidth = Math.min( width, 100 );\n\n\t\t\t// Progress bar label.\n\t\t\tprogressBar.querySelector( '.wp-smush-images-percent' ).innerHTML = width + '%';\n\t\t\t// Progress bar.\n\t\t\tprogressBar.querySelector( '.wp-smush-progress-inner' ).style.width = width + '%';\n\n\t\t\t// Update processed/total.\n\t\t\tconst processStateStats = progressBar.querySelector( '.sui-progress-state-text' );\n\t\t\tprocessStateStats.firstElementChild.innerHTML = processedItems;\n\t\t\tprocessStateStats.lastElementChild.innerHTML = totalItems;\n\n\t\t\treturn this;\n\t\t},\n\t\tclose() {\n\t\t\tprogressBar.classList.add( 'sui-hidden' );\n\t\t\tthis.setCancelButtonLabel( window.wp_smush_msgs.cancel )\n\t\t\t\t.setOnCancelCallback( () => {} )\n\t\t\t\t.update( 0, 0 );\n\t\t\tthis.resetOriginalNotice();\n\t\t\treturn this;\n\t\t},\n\t\tshow() {\n\t\t\t// Show progress bar.\n\t\t\tcancelBtn.onclick = onCancelCallback;\n\t\t\tprogressBar.classList.remove( 'sui-hidden' );\n\t\t\tthis.hideBulkSmushDescription();\n\t\t\tthis.hideBulkSmushAllDone();\n\t\t\tthis.hideRecheckImagesNotice();\n\t\t},\n\t\tsetCancelButtonLabel( textContent ) {\n\t\t\tcancelBtn.textContent = textContent;\n\t\t\treturn this;\n\t\t},\n\t\tshowBulkSmushDescription() {\n\t\t\tbulkSmushDescription.classList.remove( 'sui-hidden' );\n\t\t},\n\t\thideBulkSmushDescription() {\n\t\t\tbulkSmushDescription.classList.add( 'sui-hidden' );\n\t\t},\n\t\tshowBulkSmushAllDone() {\n\t\t\tbulkSmushAllDone.classList.remove( 'sui-hidden' );\n\t\t},\n\t\thideBulkSmushAllDone() {\n\t\t\tbulkSmushAllDone.classList.add( 'sui-hidden' );\n\t\t},\n\t\thideState() {\n\t\t\tif ( isStateHidden ) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tisStateHidden = true;\n\t\t\tprogressBar.querySelector( '.sui-progress-state' ).classList.add( 'sui-hidden' );\n\t\t\treturn this;\n\t\t},\n\t\tshowState() {\n\t\t\tif ( ! isStateHidden ) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tisStateHidden = false;\n\t\t\tprogressBar.querySelector( '.sui-progress-state' ).classList.remove( 'sui-hidden' );\n\t\t\treturn this;\n\t\t},\n\t\tsetNotice( inProcessNotice ) {\n\t\t\tconst progressMessage = bulkRunningNotice.querySelector( '.sui-notice-message p' );\n\t\t\tthis.cacheOriginalNotice( progressMessage );\n\t\t\tprogressMessage.innerHTML = inProcessNotice;\n\t\t\treturn this;\n\t\t},\n\t\tcacheOriginalNotice( progressMessage ) {\n\t\t\tif ( bulkRunningNotice.dataset.progressMessage ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbulkRunningNotice.dataset.progressMessage = progressMessage.innerHTML;\n\t\t},\n\t\tresetOriginalNotice() {\n\t\t\tif ( ! bulkRunningNotice.dataset.progressMessage ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst progressMessage = bulkRunningNotice.querySelector( '.sui-notice-message p' );\n\t\t\tprogressMessage.innerHTML = bulkRunningNotice.dataset.progressMessage;\n\t\t},\n\t\thideBulkProcessingNotice() {\n\t\t\tbulkRunningNotice.classList.add( 'sui-hidden' );\n\t\t\treturn this;\n\t\t},\n\t\tshowBulkProcessingNotice() {\n\t\t\tbulkRunningNotice.classList.remove( 'sui-hidden' );\n\t\t\treturn this;\n\t\t},\n\t\tsetCountUnitText( unitText ) {\n\t\t\tconst progressUnit = progressBar.querySelector( '.sui-progress-state-unit' );\n\t\t\tprogressUnit.innerHTML = unitText;\n\t\t},\n\t\tsetOnCancelCallback( callBack ) {\n\t\t\tif ( 'function' !== typeof callBack ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonCancelCallback = callBack;\n\t\t\treturn this;\n\t\t},\n\t\tdisableExceedLimitMode() {\n\t\t\tprogressBar.classList.remove( 'wp-smush-exceed-limit' );\n\t\t\tprogressBar.querySelector( '#bulk-smush-resume-button' ).classList.add( 'sui-hidden' );\n\t\t},\n\t\thideRecheckImagesNotice() {\n\t\t\tconst recheckImagesNoticeElement = document.querySelector( '.wp-smush-recheck-images-notice-box' );\n\t\t\tif ( recheckImagesNoticeElement ) {\n\t\t\t\trecheckImagesNoticeElement.classList.add( 'sui-hidden' );\n\t\t\t}\n\t\t}\n\n\t};\n};\nexport default new SmushProgressBar();\n","/* global wp_smush_mixpanel */\n\nimport mixpanel from \"mixpanel-browser\";\n\nclass MixPanel {\n\tconstructor() {\n\t\t// Opt out event is not triggered via js so only initial mixpanel when it's enabled.\n\t\tthis.mixpanelInstance = this.allowToTrack() && mixpanel.init(wp_smush_mixpanel.token, {\n\t\t\topt_out_tracking_by_default: ! this.allowToTrack(),\n\t\t\tloaded: (mixpanel) => {\n\t\t\t\tmixpanel.identify(wp_smush_mixpanel.unique_id);\n\t\t\t\tmixpanel.register(wp_smush_mixpanel.super_properties);\n\n\t\t\t\tif (mixpanel.has_opted_in_tracking() !== this.allowToTrack()) {\n\t\t\t\t\t// The status cached by MixPanel in the local storage is different from the settings. Clear the cache.\n\t\t\t\t\tmixpanel.clear_opt_in_out_tracking();\n\t\t\t\t}\n\t\t\t}\n\t\t}, 'smush');\n\t}\n\n\tallowToTrack() {\n\t\treturn !! wp_smush_mixpanel.opt_in;\n\t}\n\n\ttrack(event, properties = {}) {\n\t\tif ( wp_smush_mixpanel.debug ) {\n\t\t\tconsole.log( 'Event:', event, properties );\n\t\t}\n\t\tthis.mixpanelInstance && this.mixpanelInstance.track(event, properties);\n\t}\n\n\ttrackBulkSmushCompleted( globalStats ) {\n\t\tconst {\n\t\t\tsavings_bytes,\n\t\t\tcount_images,\n\t\t\tpercent_optimized,\n\t\t\tsavings_percent,\n\t\t\tcount_resize,\n\t\t\tsavings_resize\n\t\t } = globalStats;\n\t\tthis.track('Bulk Smush Completed', {\n\t\t\t'Total Savings': this.convertToMegabytes( savings_bytes ),\n\t\t\t'Total Images': count_images,\n\t\t\t'Media Optimization Percentage': parseFloat( percent_optimized ),\n\t\t\t'Percentage of Savings': parseFloat( savings_percent ),\n\t\t\t'Images Resized': count_resize,\n\t\t\t'Resize Savings': this.convertToMegabytes( savings_resize )\n\t\t});\n\t}\n\n\ttrackBulkSmushCancel() {\n\t\tthis.track('Bulk Smush Cancelled');\n\t}\n\n\tconvertToMegabytes( sizeInBytes ) {\n\t\tconst unitMB = Math.pow( 1024, 2 );\n\t\tconst sizeInMegabytes = sizeInBytes/unitMB;\n\t\treturn sizeInMegabytes && parseFloat(sizeInMegabytes.toFixed(2)) || 0;\n\t}\n}\n\nconst mixPanelInstance = () => {\n\tlet instance;\n\treturn {\n\t\tgetInstance: () => {\n\t\t\tif ( ! instance ) {\n\t\t\t\tinstance = new MixPanel();\n\t\t\t}\n\t\t\treturn instance;\n\t\t}\n\t}\n}\n\nexport default mixPanelInstance();","jQuery(function ($) {\n\t'use strict';\n\n /**\n\t * Handle the Smush Stats link click\n\t */\n $('body').on('click', 'a.smush-stats-details', function (e) {\n //If disabled\n if ($(this).prop('disabled')) {\n return false;\n }\n\n // prevent the default action\n e.preventDefault();\n //Replace the `+` with a `-`\n const slide_symbol = $(this).find('.stats-toggle');\n $(this).parents().eq(1).find('.smush-stats-wrapper').slideToggle();\n slide_symbol.text(slide_symbol.text() == '+' ? '-' : '+');\n });\n});","/* global ajaxurl */\n\nimport Smush from '../smush/smush';\nimport {GlobalStats} from \"../common/globalStats\";\nimport SmushProgress from \"../common/progressbar\";\n\nconst remove_element = function (el, timeout) {\n\tif (typeof timeout === 'undefined') {\n\t\ttimeout = 100;\n\t}\n\tel.fadeTo(timeout, 0, function () {\n\t\tel.slideUp(timeout, function () {\n\t\t\tel.remove();\n\t\t});\n\t});\n};\n\njQuery(function ($) {\n\t'use strict';\n\n\t/**\n\t * Disable the action links *\n\t *\n\t * @param c_element\n\t */\n\tconst disable_links = function (c_element) {\n\t\tconst parent = c_element.parent();\n\t\t//reduce parent opacity\n\t\tparent.css({ opacity: '0.5' });\n\t\t//Disable Links\n\t\tparent.find('a').prop('disabled', true);\n\t};\n\n\t/**\n\t * Enable the Action Links *\n\t *\n\t * @param c_element\n\t */\n\tconst enable_links = function (c_element) {\n\t\tconst parent = c_element.parent();\n\n\t\t//reduce parent opacity\n\t\tparent.css({ opacity: '1' });\n\t\t//Disable Links\n\t\tparent.find('a').prop('disabled', false);\n\t};\n\n\t/**\n\t * Restore image request with a specified action for Media Library / NextGen Gallery\n\t *\n\t * @param {Object} e\n\t * @param {string} currentButton\n\t * @param {string} smushAction\n\t * @param {string} action\n\t */\n\tconst process_smush_action = function (\n\t\te,\n\t\tcurrentButton,\n\t\tsmushAction,\n\t\taction\n\t) {\n\t\te.preventDefault();\n\n\t\t// If disabled.\n\t\tif ( currentButton.attr( 'disabled' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove Error.\n\t\t$('.wp-smush-error').remove();\n\n\t\t// Hide stats.\n\t\t$('.smush-stats-wrapper').hide();\n\n\t\tlet mode = 'grid';\n\t\tif ('smush_restore_image' === smushAction) {\n\t\t\tif ($(document).find('div.media-modal.wp-core-ui').length > 0) {\n\t\t\t\tmode = 'grid';\n\t\t\t} else {\n\t\t\t\tmode =\n\t\t\t\t\twindow.location.search.indexOf('item') > -1\n\t\t\t\t\t\t? 'grid'\n\t\t\t\t\t\t: 'list';\n\t\t\t}\n\t\t}\n\n\t\t// Get the image ID and nonce.\n\t\tconst params = {\n\t\t\taction: smushAction,\n\t\t\tattachment_id: currentButton.data('id'),\n\t\t\tmode,\n\t\t\t_nonce: currentButton.data('nonce'),\n\t\t};\n\n\t\t// Reduce the opacity of stats and disable the click.\n\t\tdisable_links(currentButton);\n\n\t\tconst oldLabel = currentButton.html();\n\n\t\tcurrentButton.html(\n\t\t\t'' +\n\t\t\t\twp_smush_msgs[action] +\n\t\t\t\t''\n\t\t);\n\n\t\t// Restore the image.\n\t\t$.post(ajaxurl, params, function (r) {\n\t\t\t// Reset all functionality.\n\t\t\tenable_links(currentButton);\n\n\t\t\tif (r.success && 'undefined' !== typeof r.data) {\n\t\t\t\t// Replace in immediate parent for NextGEN.\n\t\t\t\tif (\n\t\t\t\t\t'undefined' !== typeof this.data &&\n\t\t\t\t\tthis.data.indexOf('nextgen') > -1\n\t\t\t\t) {\n\t\t\t\t\t// Show the smush button, and remove stats and restore option.\n\t\t\t\t\tcurrentButton.parents().eq(1).html(r.data.stats);\n\t\t\t\t} else if ('restore' === action) {\n\t\t\t\t\t// Show the smush button, and remove stats and restore option.\n\t\t\t\t\tcurrentButton.parents().eq(1).html(r.data.stats);\n\t\t\t\t} else {\n\t\t\t\t\tconst wrapper = currentButton.parents().eq(1);\n\t\t\t\t\tif ( wp_smush_msgs.failed_item_smushed && wrapper.hasClass('smush-failed-processing') ) {\n\t\t\t\t\t\twrapper.html( '

' + wp_smush_msgs.failed_item_smushed + '

' );\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\twrapper.html( r.data );\n\t\t\t\t\t\t}, 2000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twrapper.html(r.data);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ('undefined' !== typeof r.data && 'restore' === action) {\n\t\t\t\t\tSmush.updateImageStats(r.data.new_size);\n\t\t\t\t}\n\t\t\t} else if (r.data && r.data.error_msg) {\n\t\t\t\tif (\n\t\t\t\t\t-1 === this.data.indexOf('nextgen')\n\t\t\t\t) {\n\t\t\t\t\tcurrentButton.closest( '.smushit' ).find('.smush-status').addClass('smush-warning').html(r.data.error_msg);\n\t\t\t\t} else {\n\t\t\t\t\t// Show error.\n\t\t\t\t\tcurrentButton.parent().append(r.data.error_msg);\n\t\t\t\t}\n\n\t\t\t\t// Reset label and disable button on error.\n\t\t\t\tcurrentButton.attr('disabled', true);\n\t\t\t\tcurrentButton.html( oldLabel );\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Validates the Resize Width and Height against the Largest Thumbnail Width and Height\n\t *\n\t * @param wrapper_div jQuery object for the whole setting row wrapper div\n\t * @param width_only Whether to validate only width\n\t * @param height_only Validate only Height\n\t * @return {boolean} All Good or not\n\t */\n\tconst validate_resize_settings = function (\n\t\twrapper_div,\n\t\twidth_only,\n\t\theight_only\n\t) {\n\t\tconst resize_checkbox = wrapper_div.find('#resize');\n\n\t\tif (!height_only) {\n\t\t\tvar width_input = wrapper_div.find('#wp-smush-resize_width');\n\t\t\tvar width_error_note = wrapper_div.find(\n\t\t\t\t'.sui-notice-info.wp-smush-update-width'\n\t\t\t);\n\t\t}\n\t\tif (!width_only) {\n\t\t\tvar height_input = wrapper_div.find('#wp-smush-resize_height');\n\t\t\tvar height_error_note = wrapper_div.find(\n\t\t\t\t'.sui-notice-info.wp-smush-update-height'\n\t\t\t);\n\t\t}\n\n\t\tlet width_error = false;\n\t\tlet height_error = false;\n\n\t\t//If resize settings is not enabled, return true\n\t\tif (!resize_checkbox.is(':checked')) {\n\t\t\treturn true;\n\t\t}\n\n\t\t//Check if we have localised width and height\n\t\tif (\n\t\t\t'undefined' === typeof wp_smushit_data.resize_sizes ||\n\t\t\t'undefined' === typeof wp_smushit_data.resize_sizes.width\n\t\t) {\n\t\t\t//Rely on server validation\n\t\t\treturn true;\n\t\t}\n\n\t\t//Check for width\n\t\tif (\n\t\t\t!height_only &&\n\t\t\t'undefined' !== typeof width_input &&\n\t\t\tparseInt(wp_smushit_data.resize_sizes.width) >\n\t\t\t\tparseInt(width_input.val())\n\t\t) {\n\t\t\twidth_input.parent().addClass('sui-form-field-error');\n\t\t\twidth_error_note.show('slow');\n\t\t\twidth_error = true;\n\t\t} else {\n\t\t\t//Remove error class\n\t\t\twidth_input.parent().removeClass('sui-form-field-error');\n\t\t\twidth_error_note.hide();\n\t\t\tif (height_input.hasClass('error')) {\n\t\t\t\theight_error_note.show('slow');\n\t\t\t}\n\t\t}\n\n\t\t//Check for height\n\t\tif (\n\t\t\t!width_only &&\n\t\t\t'undefined' !== typeof height_input &&\n\t\t\tparseInt(wp_smushit_data.resize_sizes.height) >\n\t\t\t\tparseInt(height_input.val())\n\t\t) {\n\t\t\theight_input.parent().addClass('sui-form-field-error');\n\t\t\t//If we are not showing the width error already\n\t\t\tif (!width_error) {\n\t\t\t\theight_error_note.show('slow');\n\t\t\t}\n\t\t\theight_error = true;\n\t\t} else {\n\t\t\t//Remove error class\n\t\t\theight_input.parent().removeClass('sui-form-field-error');\n\t\t\theight_error_note.hide();\n\t\t\tif (width_input.hasClass('error')) {\n\t\t\t\twidth_error_note.show('slow');\n\t\t\t}\n\t\t}\n\n\t\tif (width_error || height_error) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t};\n\n\t/**\n\t * Update the progress bar width if we have images that needs to be resmushed\n\t *\n\t * @param unsmushed_count\n\t * @return {boolean}\n\t */\n\tconst update_progress_bar_resmush = function (unsmushed_count) {\n\t\tif ('undefined' === typeof unsmushed_count) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst smushed_count = wp_smushit_data.count_total - unsmushed_count;\n\n\t\t//Update the Progress Bar Width\n\t\t// get the progress bar\n\t\tconst $progress_bar = jQuery(\n\t\t\t'.bulk-smush-wrapper .wp-smush-progress-inner'\n\t\t);\n\t\tif ($progress_bar.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst width = (smushed_count / wp_smushit_data.count_total) * 100;\n\n\t\t// increase progress\n\t\t$progress_bar.css('width', width + '%');\n\t};\n\n\tconst runRecheck = function (process_settings) {\n\t\tconst button = $('.wp-smush-scan');\n\n\t\t// Add a \"loading\" state to the button.\n\t\tbutton.addClass('sui-button-onload');\n\n\t\t// Check if type is set in data attributes.\n\t\tlet scan_type = button.data('type');\n\t\tscan_type = 'undefined' === typeof scan_type ? 'media' : scan_type;\n\n\t\t// Remove the Skip resmush attribute from button.\n\t\t$('.wp-smush-all').removeAttr('data-smush');\n\n\t\t// Disable Bulk smush button and itself.\n\t\t$('.wp-smush-all').prop('disabled', true);\n\n\t\t// Hide Settings changed Notice.\n\t\t$('.wp-smush-settings-changed').hide();\n\n\t\t// Ajax params.\n\t\tconst params = {\n\t\t\taction: 'scan_for_resmush',\n\t\t\ttype: scan_type,\n\t\t\tget_ui: true,\n\t\t\tprocess_settings,\n\t\t\twp_smush_options_nonce: jQuery('#wp_smush_options_nonce').val(),\n\t\t};\n\n\t\t// Send ajax request and get ids if any.\n\t\t$.get(ajaxurl, params, function (response) {\n\t\t\tif ( ! response?.success ) {\n\t\t\t\tWP_Smush.helpers.showNotice( response, {\n\t\t\t\t\tshowdismiss: true,\n\t\t\t\t\tautoclose: false,\n\t\t\t\t} );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst stats = response.data;\n\t\t\tshowRecheckImagesNotice( stats );\n\t\t\tGlobalStats.updateGlobalStatsFromSmushScriptData( stats );\n\t\t\tGlobalStats.renderStats();\n\t\t\tupdateBulkSmushContentAfterReCheck( stats );\n\t\t}).always(function () {\n\t\t\t// Hide the progress bar.\n\t\t\tjQuery(\n\t\t\t\t'.bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper'\n\t\t\t).addClass('sui-hidden');\n\n\t\t\t// Add check complete status to button.\n\t\t\tbutton\n\t\t\t\t.removeClass('sui-button-onload')\n\t\t\t\t.addClass('smush-button-check-success');\n\n\t\t\tconst $defaultText = button.find('.wp-smush-default-text'),\n\t\t\t\t$completedText = button.find('.wp-smush-completed-text');\n\n\t\t\t$defaultText.addClass('sui-hidden-important');\n\t\t\t$completedText.removeClass('sui-hidden');\n\n\t\t\t// Remove success message from button.\n\t\t\tsetTimeout(function () {\n\t\t\t\tbutton.removeClass('smush-button-check-success');\n\n\t\t\t\t$defaultText.removeClass('sui-hidden-important');\n\t\t\t\t$completedText.addClass('sui-hidden');\n\t\t\t}, 2000);\n\n\t\t\t$('.wp-smush-all').prop('disabled', false);\n\t\t});\n\t};\n\n\tconst showRecheckImagesNotice = ( stats ) => {\n\t\tif ( ! stats.notice ) {\n\t\t\treturn;\n\t\t}\n\t\tlet type = 'success';\n\t\tif ( 'undefined' !== typeof stats.noticeType ) {\n\t\t\ttype = stats.noticeType;\n\t\t}\n\t\twindow.SUI.openNotice(\n\t\t\t'wp-smush-ajax-notice',\n\t\t\t'

' + stats.notice + '

',\n\t\t\t{ type, icon: 'check-tick' }\n\t\t);\n\t};\n\n\tconst updateBulkSmushContentAfterReCheck = ( stats ) => {\n\t\tif ( SmushProgress.isEmptyObject ) {\n\t\t\treturn;\n\t\t}\n\n\t\tSmushProgress.update( 0, stats.remaining_count );\n\t\tif ( stats.remaining_count < 1 ) {\n\t\t\tSmushProgress.hideBulkSmushDescription();\n\t\t\tSmushProgress.showBulkSmushAllDone();\n\t\t} else {\n\t\t\tSmushProgress.showBulkSmushDescription();\n\t\t\tSmushProgress.hideBulkSmushAllDone();\n\t\t}\n\t}\n\n\tconst updateDisplayedContentAfterReCheck = function (count) {\n\t\tconst $pendingImagesWrappers = jQuery(\n\t\t\t'.bulk-smush-wrapper .wp-smush-bulk-wrapper'\n\t\t);\n\t\tconst $allDoneWrappers = jQuery(\n\t\t\t'.bulk-smush-wrapper .wp-smush-all-done'\n\t\t);\n\n\t\tif ($pendingImagesWrappers.length && $allDoneWrappers.length) {\n\t\t\tif (count === 0) {\n\t\t\t\t$pendingImagesWrappers.addClass('sui-hidden');\n\t\t\t\t$allDoneWrappers.find('p').html( wp_smush_msgs.all_smushed );\n\t\t\t\t$allDoneWrappers.find('.sui-notice-icon').removeClass('sui-icon-info').addClass('sui-icon-check-tick');\n\t\t\t\t$allDoneWrappers.removeClass('sui-notice-warning').addClass('sui-notice-success');\n\t\t\t\t$allDoneWrappers.removeClass('sui-hidden');\n\t\t\t} else {\n\t\t\t\t$pendingImagesWrappers.removeClass('sui-hidden');\n\t\t\t\t$allDoneWrappers.addClass('sui-hidden');\n\n\t\t\t\t// Update texts mentioning the amount of unsmushed imagesin the summary icon tooltip.\n\t\t\t\tconst $unsmushedTooltip = jQuery(\n\t\t\t\t\t'.sui-summary-smush .sui-summary-details .sui-tooltip'\n\t\t\t\t);\n\n\t\t\t\t// The tooltip doesn't exist in the NextGen page.\n\t\t\t\tif ($unsmushedTooltip.length) {\n\t\t\t\t\tconst textForm = 1 === count ? 'singular' : 'plural',\n\t\t\t\t\t\ttooltipText = $unsmushedTooltip\n\t\t\t\t\t\t\t.data(textForm)\n\t\t\t\t\t\t\t.replace('{count}', count);\n\t\t\t\t\t$unsmushedTooltip.attr('data-tooltip', tooltipText);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Total count in the progress bar.\n\t\tjQuery('.wp-smush-total-count').text(count);\n\t};\n\n\t// Scroll the element to top of the page.\n\tconst goToByScroll = function (selector) {\n\t\t// Scroll if element found.\n\t\tif ($(selector).length > 0) {\n\t\t\t$('html, body').animate(\n\t\t\t\t{\n\t\t\t\t\tscrollTop: $(selector).offset().top - 100,\n\t\t\t\t},\n\t\t\t\t'slow'\n\t\t\t);\n\t\t}\n\t};\n\n\tconst update_cummulative_stats = function (stats) {\n\t\t//Update Directory Smush Stats\n\t\tif ('undefined' !== typeof stats.dir_smush) {\n\t\t\tconst stats_human = $(\n\t\t\t\t'li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-human'\n\t\t\t);\n\t\t\tconst stats_percent = $(\n\t\t\t\t'li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-percent'\n\t\t\t);\n\n\t\t\t// Do not replace if 0 savings.\n\t\t\tif (stats.dir_smush.bytes > 0) {\n\t\t\t\t$('.wp-smush-dir-link').addClass('sui-hidden');\n\n\t\t\t\t// Hide selector.\n\t\t\t\t$('li.smush-dir-savings .wp-smush-stats-label-message').hide();\n\t\t\t\t//Update Savings in bytes\n\t\t\t\tif (stats_human.length > 0) {\n\t\t\t\t\tstats_human.html(stats.dir_smush.human);\n\t\t\t\t}\n\n\t\t\t\t//Percentage section\n\t\t\t\tif (stats.dir_smush.percent > 0) {\n\t\t\t\t\t// Show size and percentage separator.\n\t\t\t\t\t$(\n\t\t\t\t\t\t'li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-sep'\n\t\t\t\t\t).removeClass('sui-hidden');\n\t\t\t\t\t//Update Optimisation percentage\n\t\t\t\t\tif (stats_percent.length > 0) {\n\t\t\t\t\t\tstats_percent.html(stats.dir_smush.percent + '%');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$('.wp-smush-dir-link').removeClass('sui-hidden');\n\t\t\t}\n\t\t}\n\n\t\t//Update Combined stats\n\t\tif (\n\t\t\t'undefined' !== typeof stats.combined_stats &&\n\t\t\tstats.combined_stats.length > 0\n\t\t) {\n\t\t\tconst c_stats = stats.combined_stats;\n\n\t\t\tlet smush_percent = (c_stats.smushed / c_stats.total_count) * 100;\n\t\t\tsmush_percent = WP_Smush.helpers.precise_round(smush_percent, 1);\n\n\t\t\t//Smushed Percent\n\t\t\tif (smush_percent) {\n\t\t\t\t$('div.wp-smush-count-total span.wp-smush-images-percent').html(\n\t\t\t\t\tsmush_percent\n\t\t\t\t);\n\t\t\t}\n\t\t\t//Update Total Attachment Count\n\t\t\tif (c_stats.total_count) {\n\t\t\t\t$(\n\t\t\t\t\t'span.wp-smush-count-total span.wp-smush-total-optimised'\n\t\t\t\t).html(c_stats.total_count);\n\t\t\t}\n\t\t\t//Update Savings and Percent\n\t\t\tif (c_stats.savings) {\n\t\t\t\t$('span.wp-smush-savings span.wp-smush-stats-human').html(\n\t\t\t\t\tc_stats.savings\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (c_stats.percent) {\n\t\t\t\t$('span.wp-smush-savings span.wp-smush-stats-percent').html(\n\t\t\t\t\tc_stats.percent\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * When 'All' is selected for the Image Sizes setting, select all available sizes.\n\t *\n\t * @since 3.2.1\n\t */\n\t$('#all-image-sizes').on('change', function () {\n\t\t$('input[name^=\"wp-smush-image_sizes\"]').prop('checked', true);\n\t});\n\n\t/**\n\t * Handles the tabs navigation on mobile.\n\t *\n\t * @since 3.8.4\n\t */\n\t$('.sui-mobile-nav').on('change', (e) => {\n\t\twindow.location.assign($(e.currentTarget).val());\n\t});\n\n\t/**\n\t * Handle re-check api status button click (Settings)\n\t *\n\t * @since 3.2.0.2\n\t */\n\t$('#update-api-status').on('click', function (e) {\n\t\te.preventDefault();\n\n\t\t//$(this).prop('disabled', true);\n\t\t$(this).addClass('sui-button-onload');\n\n\t\t$.post(ajaxurl, { action: 'recheck_api_status' }, function () {\n\t\t\tlocation.reload();\n\t\t});\n\t});\n\n\t/** Handle smush button click **/\n\t$('body').on(\n\t\t'click',\n\t\t'.wp-smush-send:not(.wp-smush-resmush)',\n\t\tfunction (e) {\n\t\t\t// prevent the default action\n\t\t\te.preventDefault();\n\t\t\tnew Smush($(this), false);\n\t\t}\n\t);\n\n\t/**\n\t * Handle show in bulk smush button click.\n\t */\n\t$( 'body' ).on( 'click', '.wp-smush-remove-skipped', function( e ) {\n\t\te.preventDefault();\n\n\t\tconst self = $( this );\n\n\t\t// Send ajax request to remove the image from the skip list.\n\t\t$.post( ajaxurl, {\n\t\t\taction: 'remove_from_skip_list',\n\t\t\tid: self.attr( 'data-id' ),\n\t\t\t_ajax_nonce: self.attr( 'data-nonce' ),\n\t\t} ).done( ( response ) => {\n\t\t\tif ( response.success && 'undefined' !== typeof response.data.html ) {\n\t\t\t\tself.parent().parent().html( response.data.html );\n\t\t\t}\n\t\t} );\n\t} );\n\t/** Restore: Media Library **/\n\t$('body').on('click', '.wp-smush-action.wp-smush-restore', function (e) {\n\t\tconst current_button = $(this);\n\t\tprocess_smush_action(\n\t\t\te,\n\t\t\tcurrent_button,\n\t\t\t'smush_restore_image',\n\t\t\t'restore'\n\t\t);\n\t});\n\n\t/** Resmush: Media Library **/\n\t$('body').on('click', '.wp-smush-action.wp-smush-resmush', function (e) {\n\t\tprocess_smush_action(e, $(this), 'smush_resmush_image', 'smushing');\n\t});\n\n\t/** Restore: NextGen Gallery **/\n\t$('body').on(\n\t\t'click',\n\t\t'.wp-smush-action.wp-smush-nextgen-restore',\n\t\tfunction (e) {\n\t\t\tprocess_smush_action(\n\t\t\t\te,\n\t\t\t\t$(this),\n\t\t\t\t'smush_restore_nextgen_image',\n\t\t\t\t'restore'\n\t\t\t);\n\t\t}\n\t);\n\n\t/** Resmush: NextGen Gallery **/\n\t$('body').on(\n\t\t'click',\n\t\t'.wp-smush-action.wp-smush-nextgen-resmush',\n\t\tfunction (e) {\n\t\t\tprocess_smush_action(\n\t\t\t\te,\n\t\t\t\t$(this),\n\t\t\t\t'smush_resmush_nextgen_image',\n\t\t\t\t'smushing'\n\t\t\t);\n\t\t}\n\t);\n\n\t//Scan For resmushing images\n\t$('.wp-smush-scan').on('click', function (e) {\n\t\te.preventDefault();\n\t\tif ( $(this).hasClass('wp-smush-background-scan') ) {\n\t\t\treturn;\n\t\t}\n\t\trunRecheck(false);\n\t});\n\n\t//Remove Notice\n\t$('body').on('click', '.wp-smush-notice .icon-fi-close', function (e) {\n\t\te.preventDefault();\n\t\tconst $el = $(this).parent();\n\t\tremove_element($el);\n\t});\n\n\t// On re-Smush click.\n\t// TODO: This can be removed, but follow the logic and remove all excess code as well.\n\t$('body').on('click', '.wp-smush-skip-resmush', function (e) {\n\t\te.preventDefault();\n\n\t\tconst self = jQuery(this),\n\t\t\tcontainer = self.parents().eq(1),\n\t\t\tel = self.parent();\n\n\t\t// Remove Parent div.\n\t\tremove_element(el);\n\n\t\t// Set button attribute to skip re-smush ids.\n\t\tcontainer.find('.wp-smush-all').attr('data-smush', 'skip_resmush');\n\n\t\t// Update Smushed count.\n\t\twp_smushit_data.count_smushed =\n\t\t\tparseInt(wp_smushit_data.count_smushed) +\n\t\t\twp_smushit_data.resmush.length;\n\t\twp_smushit_data.count_supersmushed =\n\t\t\tparseInt(wp_smushit_data.count_supersmushed) +\n\t\t\twp_smushit_data.resmush.length;\n\n\t\t// Update stats.\n\t\tif (wp_smushit_data.count_smushed === wp_smushit_data.count_total) {\n\t\t\t// Show all done notice.\n\t\t\t$('.wp-smush-notice.wp-smush-all-done').removeClass('sui-hidden');\n\n\t\t\t// Hide Smush button.\n\t\t\t$('.wp-smush-bulk-wrapper ').addClass('sui-hidden');\n\t\t}\n\n\t\t// Remove re-Smush notice.\n\t\t$('.wp-smush-resmush-notice').remove();\n\n\t\tlet type = $('.wp-smush-scan').data('type');\n\t\ttype = 'undefined' === typeof type ? 'media' : type;\n\n\t\tconst smushed_count =\n\t\t\t'undefined' !== typeof wp_smushit_data.count_smushed\n\t\t\t\t? wp_smushit_data.count_smushed\n\t\t\t\t: 0;\n\n\t\tlet smush_percent = (smushed_count / wp_smushit_data.count_total) * 100;\n\t\tsmush_percent = WP_Smush.helpers.precise_round(smush_percent, 1);\n\n\t\t$('.wp-smush-images-percent').html(smush_percent);\n\n\t\t// Update the progress bar width. Get the progress bar.\n\t\tconst progress_bar = jQuery(\n\t\t\t'.bulk-smush-wrapper .wp-smush-progress-inner'\n\t\t);\n\t\tif (progress_bar.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Increase progress.\n\t\tprogress_bar.css('width', smush_percent + '%');\n\n\t\t// Show the default bulk smush notice.\n\t\t$('.wp-smush-bulk-wrapper').removeClass('sui-hidden');\n\t\t$('.wp-smush-bulk-wrapper .sui-notice').removeClass('sui-hidden');\n\n\t\tconst params = {\n\t\t\taction: 'delete_resmush_list',\n\t\t\ttype,\n\t\t};\n\n\t\t//Delete resmush list, @todo: update stats from the ajax response\n\t\t$.post(ajaxurl, params, function (res) {\n\t\t\t// Remove the whole li element on success\n\t\t\tif (res.success && 'undefined' !== typeof res.data.stats) {\n\t\t\t\tconst stats = res.data.stats;\n\t\t\t\t// Update wp_smushit_data ( Smushed count, Smushed Percent, Image count, Super smush count, resize savings, conversion savings )\n\t\t\t\tif ('undefined' !== typeof wp_smushit_data) {\n\t\t\t\t\twp_smushit_data.count_images =\n\t\t\t\t\t\t'undefined' !== typeof stats.count_images\n\t\t\t\t\t\t\t? parseInt(wp_smushit_data.count_images) +\n\t\t\t\t\t\t\t stats.count_images\n\t\t\t\t\t\t\t: wp_smushit_data.count_images;\n\t\t\t\t\twp_smushit_data.size_before =\n\t\t\t\t\t\t'undefined' !== typeof stats.size_before\n\t\t\t\t\t\t\t? parseInt(wp_smushit_data.size_before) +\n\t\t\t\t\t\t\t stats.size_before\n\t\t\t\t\t\t\t: wp_smushit_data.size_before;\n\t\t\t\t\twp_smushit_data.size_after =\n\t\t\t\t\t\t'undefined' !== typeof stats.size_after\n\t\t\t\t\t\t\t? parseInt(wp_smushit_data.size_after) +\n\t\t\t\t\t\t\t stats.size_after\n\t\t\t\t\t\t\t: wp_smushit_data.size_after;\n\t\t\t\t\twp_smushit_data.savings_resize =\n\t\t\t\t\t\t'undefined' !== typeof stats.savings_resize\n\t\t\t\t\t\t\t? parseInt(wp_smushit_data.savings_resize) +\n\t\t\t\t\t\t\t stats.savings_resize\n\t\t\t\t\t\t\t: wp_smushit_data.savings_resize;\n\t\t\t\t\twp_smushit_data.savings_conversion =\n\t\t\t\t\t\t'undefined' !== typeof stats.savings_conversion\n\t\t\t\t\t\t\t? parseInt(wp_smushit_data.savings_conversion) +\n\t\t\t\t\t\t\t stats.savings_conversion\n\t\t\t\t\t\t\t: wp_smushit_data.savings_conversion;\n\n\t\t\t\t\t// Add directory smush stats.\n\t\t\t\t\tif (\n\t\t\t\t\t\t'undefined' !==\n\t\t\t\t\t\t\ttypeof wp_smushit_data.savings_dir_smush &&\n\t\t\t\t\t\t'undefined' !==\n\t\t\t\t\t\t\ttypeof wp_smushit_data.savings_dir_smush.orig_size\n\t\t\t\t\t) {\n\t\t\t\t\t\twp_smushit_data.size_before =\n\t\t\t\t\t\t\t'undefined' !==\n\t\t\t\t\t\t\ttypeof wp_smushit_data.savings_dir_smush\n\t\t\t\t\t\t\t\t? parseInt(wp_smushit_data.size_before) +\n\t\t\t\t\t\t\t\t parseInt(\n\t\t\t\t\t\t\t\t\t\twp_smushit_data.savings_dir_smush\n\t\t\t\t\t\t\t\t\t\t\t.orig_size\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: wp_smushit_data.size_before;\n\t\t\t\t\t\twp_smushit_data.size_after =\n\t\t\t\t\t\t\t'undefined' !==\n\t\t\t\t\t\t\ttypeof wp_smushit_data.savings_dir_smush\n\t\t\t\t\t\t\t\t? parseInt(wp_smushit_data.size_after) +\n\t\t\t\t\t\t\t\t parseInt(\n\t\t\t\t\t\t\t\t\t\twp_smushit_data.savings_dir_smush\n\t\t\t\t\t\t\t\t\t\t\t.image_size\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: wp_smushit_data.size_after;\n\t\t\t\t\t}\n\n\t\t\t\t\twp_smushit_data.count_resize =\n\t\t\t\t\t\t'undefined' !== typeof stats.count_resize\n\t\t\t\t\t\t\t? parseInt(wp_smushit_data.count_resize) +\n\t\t\t\t\t\t\t stats.count_resize\n\t\t\t\t\t\t\t: wp_smushit_data.count_resize;\n\t\t\t\t}\n\n\t\t\t\t// If no images left, hide the notice, show all success notice.\n\t\t\t\tif (\n\t\t\t\t\t'undefined' !== typeof wp_smushit_data.unsmushed ||\n\t\t\t\t\twp_smushit_data.unsmushed.length === 0\n\t\t\t\t) {\n\t\t\t\t\t$('.wp-smush-bulk-wrapper .sui-notice').removeClass(\n\t\t\t\t\t\t'sui-hidden'\n\t\t\t\t\t);\n\t\t\t\t\t$('.sui-notice-success.wp-smush-all-done').addClass(\n\t\t\t\t\t\t'sui-hidden'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tSmush.updateStats();\n\t\t\t}\n\t\t});\n\t});\n\n\t// Enable super smush on clicking link from stats area.\n\t$('a.wp-smush-lossy-enable').on('click', function (e) {\n\t\te.preventDefault();\n\t\t// Scroll down to settings area.\n\t\tgoToByScroll('#column-lossy');\n\t});\n\n\t// Enable resize on clicking link from stats area.\n\t$('.wp-smush-resize-enable').on('click', function (e) {\n\t\te.preventDefault();\n\t\t// Scroll down to settings area.\n\t\tgoToByScroll('#column-resize');\n\t});\n\n\t// If settings string is found in url, enable and scroll.\n\tif ( window.location.hash ) {\n\t\tconst setting_hash = window.location.hash.substring( 1 );\n\t\tlet scrollTo = '';\n\n\t\tswitch ( setting_hash ) {\n\t\t\tcase 'enable-resize':\n\t\t\t\tscrollTo = '#column-resize';\n\t\t\t\tbreak;\n\n\t\t\tcase 'backup-label':\n\t\t\t\tscrollTo = '#backup';\n\t\t\t\tbreak;\n\n\t\t\tcase 'original-label':\n\t\t\t\tscrollTo = '#original';\n\t\t\t\tbreak;\n\n\t\t\tcase 'enable-lossy':\n\t\t\t\tscrollTo = '#column-lossy';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( '' !== scrollTo ) {\n\t\t\tgoToByScroll( scrollTo );\n\t\t\tdocument.getElementById( scrollTo.replace( '#', '' ) ).focus();\n\t\t}\n\t}\n\n\t//Trigger Bulk\n\t$('body').on('click', '.wp-smush-trigger-bulk', function (e) {\n\t\te.preventDefault();\n\n\t\t//Induce Setting button save click\n\t\tif (\n\t\t\t'undefined' !== typeof e.target.dataset.type &&\n\t\t\t'nextgen' === e.target.dataset.type\n\t\t) {\n\t\t\t$('.wp-smush-nextgen-bulk').trigger('click');\n\t\t} else {\n\t\t\t$('.wp-smush-all').trigger('click');\n\t\t}\n\n\t\t$('span.sui-notice-dismiss').trigger('click');\n\t});\n\n\t//Trigger Bulk\n\t$('body').on('click', '#bulk-smush-top-notice-close', function (e) {\n\t\te.preventDefault();\n\t\t$(this).parent().parent().slideUp('slow');\n\t});\n\n\t//Allow the checkboxes to be Keyboard Accessible\n\t$('.wp-smush-setting-row .toggle-checkbox').on('focus', function () {\n\t\t//If Space is pressed\n\t\t$(this).keypress(function (e) {\n\t\t\tif (e.keyCode == 32) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$(this).find('.toggle-checkbox').trigger('click');\n\t\t\t}\n\t\t});\n\t});\n\n\t// Re-Validate Resize Width And Height.\n\t$('body').on('blur', '.wp-smush-resize-input', function () {\n\t\tconst self = $(this);\n\n\t\tconst wrapper_div = self.parents().eq(4);\n\n\t\t// Initiate the check.\n\t\tvalidate_resize_settings(wrapper_div, false, false); // run the validation.\n\t});\n\n\t// Handle Resize Checkbox toggle, to show/hide width, height settings.\n\t$('body').on('click', '#resize', function () {\n\t\tconst self = $(this);\n\t\tconst settings_wrap = $('#smush-resize-settings-wrap');\n\n\t\tif (self.is(':checked')) {\n\t\t\tsettings_wrap.show();\n\t\t} else {\n\t\t\tsettings_wrap.hide();\n\t\t}\n\t});\n\n\t//Handle Re-check button functionality\n\t$('#wp-smush-revalidate-member').on('click', function (e) {\n\t\te.preventDefault();\n\t\t//Ajax Params\n\t\tconst params = {\n\t\t\taction: 'smush_show_warning',\n\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce,\n\t\t};\n\t\tconst link = $(this);\n\t\tconst parent = link.parents().eq(1);\n\t\tparent.addClass('loading-notice');\n\t\t$.get(ajaxurl, params, function (r) {\n\t\t\t//remove the warning\n\t\t\tparent.removeClass('loading-notice').addClass('loaded-notice');\n\t\t\tif (0 == r) {\n\t\t\t\tparent.attr('data-message', wp_smush_msgs.membership_valid);\n\t\t\t\tremove_element(parent, 1000);\n\t\t\t} else {\n\t\t\t\tparent.attr('data-message', wp_smush_msgs.membership_invalid);\n\t\t\t\tsetTimeout(function remove_loader() {\n\t\t\t\t\tparent.removeClass('loaded-notice');\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t});\n\t});\n\n\tif ($('li.smush-dir-savings').length > 0) {\n\t\t// Update Directory Smush, as soon as the page loads.\n\t\tconst stats_param = {\n\t\t\taction: 'get_dir_smush_stats',\n\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce,\n\t\t};\n\t\t$.get(ajaxurl, stats_param, function (r) {\n\t\t\t//Hide the spinner\n\t\t\t$('li.smush-dir-savings .sui-icon-loader').hide();\n\n\t\t\t//If there are no errors, and we have a message to display\n\t\t\tif (!r.success && 'undefined' !== typeof r.data.message) {\n\t\t\t\t$('div.wp-smush-scan-result div.content').prepend(\n\t\t\t\t\tr.data.message\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//If there is no value in r\n\t\t\tif (\n\t\t\t\t'undefined' === typeof r.data ||\n\t\t\t\t'undefined' === typeof r.data.dir_smush\n\t\t\t) {\n\t\t\t\t//Append the text\n\t\t\t\t$('li.smush-dir-savings span.wp-smush-stats').append(\n\t\t\t\t\twp_smush_msgs.ajax_error\n\t\t\t\t);\n\t\t\t\t$('li.smush-dir-savings span.wp-smush-stats span').hide();\n\t\t\t} else {\n\t\t\t\t//Update the stats\n\t\t\t\tupdate_cummulative_stats(r.data);\n\t\t\t}\n\t\t});\n\t}\n\n\t// Display dialogs that show up with no user action.\n\tif ($('#smush-updated-dialog').length) {\n\t\t// Displays the modal with the release's higlights if it exists.\n\t\twindow.SUI.openModal(\n\t\t\t'smush-updated-dialog',\n\t\t\t'wpbody-content',\n\t\t\tundefined,\n\t\t\tfalse\n\t\t);\n\t}\n\n\t/**\n\t * Toggle backup notice based on \"Compress original images\" setting.\n\t * @since 3.9.1\n\t */\n\t$( 'input#original' ).on( 'change', function() {\n\t\t$( '#backup-notice' ).toggleClass( 'sui-hidden', $( this ).is(':checked') );\n\t} );\n\n\n\t/**\n\t * Bulk compression level notice.\n\t */\n\tconst handleCompressionLevelNotice = () => {\n\t\tconst compressionLevelNotice = document.querySelector( '.wp-smush-compression-type' );\n\t\tif ( ! compressionLevelNotice ) {\n\t\t\treturn;\n\t\t}\n\t\tconst compressionNoticeContent = compressionLevelNotice.querySelector( '.wp-smush-compression-type_note p' );\n\t\tif ( ! compressionNoticeContent ) {\n\t\t\treturn;\n\t\t}\n\t\tcompressionLevelNotice.querySelector('.wp-smush-compression-type_slider').addEventListener('change', (e) => {\n\t\t\tif ( 'INPUT' !== e?.target?.nodeName ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst note = e.target.dataset?.note;\n\t\t\tif ( ! note ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompressionNoticeContent.innerHTML = note.trim();\n\t\t} );\n\t}\n\thandleCompressionLevelNotice();\n\n\n\t/**\n\t * Close modal and redirect to the href link.\n\t */\n\t$('.wp-smush-modal-link-close').on( 'click', function( e ) {\n\t\te.preventDefault();\n\t\tSUI.closeModal();\n\t\tconst href = $(this).attr('href');\n\t\tlet openNewTab = '_blank' === $(this).attr('target');\n\t\tif ( href ) {\n\t\t\tif ( openNewTab ) {\n\t\t\t\twindow.open( href, '_blank' );\n\t\t\t} else {\n\t\t\t\twindow.location.href = href;\n\t\t\t}\n\t\t}\n\t});\n\n\t// Update Smush mode on lossy level change.\n\tconst updateLossyLevelInSummaryBox = () => {\n\t\tconst lossyLevelSummaryBox = document.querySelector('.wp-smush-current-compression-level');\n\t\tconst currentLossyLevelTab = document.querySelector( '.wp-smush-lossy-level-tabs button.active' );\n\t\tif ( ! lossyLevelSummaryBox || ! currentLossyLevelTab ) {\n\t\t\treturn;\n\t\t}\n\t\t// Update lossy label.\n\t\tlossyLevelSummaryBox.innerText = currentLossyLevelTab.innerText.trim();\n\n\t\t// Toggle Ultra notice/upsell link.\n\t\tconst upsellLink = lossyLevelSummaryBox.nextElementSibling;\n\t\tif ( upsellLink ) {\n\t\t\tif ( currentLossyLevelTab.id.includes('ultra') ) {\n\t\t\t\tupsellLink.classList.add( 'sui-hidden' );\n\t\t\t} else {\n\t\t\t\tupsellLink.classList.remove( 'sui-hidden' );\n\t\t\t}\n\t\t}\n\t}\n\n\tdocument.addEventListener( 'onSavedSmushSettings', function( e ) {\n\t\tif ( ! e?.detail?.is_outdated_stats ) {\n\t\t\treturn;\n\t\t}\n\t\tupdateLossyLevelInSummaryBox();\n\t} );\n});\n","/* global WP_Smush */\n\n/**\n * Bulk Smush Background Optimization.\n *\n * @since 3.12.0\n */\nimport Fetcher from '../utils/fetcher';\nimport MixPanel from \"../mixpanel\";\nimport SmushProgress from '../common/progressbar';\nimport {GlobalStats, UpsellManger} from \"../common/globalStats\";\n\n(function () {\n 'use strict';\n if (!window.wp_smush_msgs) {\n return;\n }\n const $ = document.querySelector.bind(document);\n const NO_FREE_LIMITED = 50;\n\n /**\n * Handle Background Process.\n * @returns \n */\n const BackgroundProcess = () => {\n return {\n handle(action) {\n return Fetcher.background[action]();\n },\n initState() {\n return Fetcher.background.initState();\n },\n }\n }\n\n /**\n * Background Optimization.\n */\n const BackgroundSmush = (() => {\n\n const startBtn = window.wp_smushit_data && window.wp_smushit_data.bo_stats && $('.wp-smush-bo-start');\n if (!startBtn) {\n return;\n }\n\n const mixPanel = MixPanel.getInstance();\n const BO = new BackgroundProcess();\n const bulkWrapper = $('.bulk-smush-wrapper');\n const reScanImagesButton = $('.wp-smush-scan');\n let intervalHandle = 0;\n let cancellationInProgress = false;\n return {\n hookStatusChecks() {\n if (intervalHandle) {\n // Already done\n return;\n }\n\n let count = 0;\n\t\t\t\tlet statusSyncInProgress = false;\n let statSyncInProgress = false;\n intervalHandle = setInterval(() => {\n if (statusSyncInProgress) {\n return;\n }\n statusSyncInProgress = true;\n\n count++;\n const statusSynced = this.syncBackgroundStatus();\n if (count % 3 === 0) {\n // Do a full update every nth time\n statusSynced.then(() => {\n if (!statSyncInProgress) {\n this.syncStats().then(() => {\n statSyncInProgress = false;\n });\n statSyncInProgress = true;\n }\n });\n }\n\n statusSynced.finally(() => {\n statusSyncInProgress = false;\n });\n }, 3 * 1000);\n },\n resetBOStatsOnStart() {\n GlobalStats.setBoStats( {\n is_cancelled: false,\n is_completed: false,\n processed_items: 0,\n failed_items: 0,\n } );\n },\n start() {\n // Reset boStats.\n this.resetBOStatsOnStart();\n\n // Disable UI.\n this.onStart();\n\n // Start BO.\n BO.handle('start').then((res) => {\n if (res.success) {\n // Update stats.\n const updatedStats = this.updateStats(res.data, false);\n // Show progress bar.\n this.showProgressBar();\n this.hookStatusChecks();\n if ( updatedStats ) {\n // Render stats.\n GlobalStats.renderStats();\n }\n } else {\n WP_Smush.helpers.showNotice( res, {\n 'showdismiss': true,\n 'autoclose' : false,\n } );\n this.cancelBulk();\n }\n });\n },\n /**\n * Initial state when load the Bulk Smush page while BO is running.\n */\n initState() {\n if (!GlobalStats.getBoStats().in_processing) {\n return;\n }\n // Disable UI.\n this.onStart();\n // Start BO.\n BO.initState().then((res) => {\n if (res.success) {\n // Update stats.\n this.updateStats(res.data, false);\n // Show progress bar.\n this.showProgressBar();\n this.hookStatusChecks();\n // Maybe update errors.\n if ( res.data.errors && ! Object.keys( GlobalStats.getErrors() ).length ) {\n GlobalStats.setErrors( res.data.errors );\n }\n // Render stats.\n GlobalStats.renderStats();\n } else {\n WP_Smush.helpers.showNotice( res );\n }\n });\n },\n /**\n * Cancel.\n */\n cancel() {\n cancellationInProgress = true;\n\t\t\t\tthis.setCancelButtonStateToStarted();\n BO.handle('cancel').then((res) => {\n if (res.success) {\n this.cancelBulk();\n } else {\n WP_Smush.helpers.showNotice( res );\n }\n });\n },\n hideProgressBar() {\n // Hide progress bar.\n SmushProgress.close().update(0, GlobalStats.getBoStats().total_items);\n },\n showProgressBar() {\n // Reset progress bar.\n SmushProgress.update(GlobalStats.getBoStats().processed_items, GlobalStats.getBoStats().total_items);\n // Show progress bar.\n SmushProgress.show();\n },\n /**\n * Update stats.\n * @param {Object} newStats Included increment stats and new BO stats.\n * @param updateGlobal\n */\n updateStats(newStats, updateGlobal) {\n // Make sure we have processed_stats/errors property (not added by default when start).\n newStats.global_stats = newStats.global_stats || {};\n newStats.errors = newStats.errors || {};\n const {\n global_stats,\n errors,\n ...newBoStats\n } = newStats;\n if ( ! GlobalStats.isChangedStats( newBoStats ) ) {\n return false;\n }\n // Update BO stats.\n GlobalStats.setBoStats(newBoStats);\n if (updateGlobal) {\n // Update global stats.\n GlobalStats.setGlobalStats(global_stats);\n }\n // Update Errors.\n GlobalStats.setErrors( errors );\n return true;\n },\n cancelBulk() {\n // Sync Stats.\n this.syncStats(() => {\n if (100 === GlobalStats.getGlobalStats().percent_optimized) {\n // If the last item was getting processed when the user cancelled then the process might have completed\n GlobalStats.setBoStats( {\n is_completed: true\n } );\n this.onCompletedBulk();\n } else {\n // Update status of boStats.\n GlobalStats.setBoStats( {\n is_cancelled: true\n } );\n // Reset and hide progress bar.\n this.onFinish();\n // Bulk is cancelled, show bulk desc.\n SmushProgress.showBulkSmushDescription();\n }\n\n mixPanel.trackBulkSmushCancel();\n\n cancellationInProgress = false;\n });\n },\n showCompletedMessage() {\n // Render completed message.\n // Show completed message.\n const processedWrapper = bulkWrapper.querySelector('.wp-smush-all-done');\n if ( GlobalStats.getBoStats().failed_items ) {\n let completeMessage = wp_smush_msgs.all_failed;\n if ( ! this.isFailedAllItems() ) {\n completeMessage = wp_smush_msgs.error_in_bulk.replace( '{{smushed}}', GlobalStats.getBoStats().total_items - GlobalStats.getBoStats().failed_items )\n .replace('{{total}}', GlobalStats.getBoStats().total_items )\n .replace('{{errors}}', GlobalStats.getBoStats().failed_items );\n }\n processedWrapper.querySelector('p').innerHTML = completeMessage;\n processedWrapper.classList.remove('sui-notice-success', 'sui-notice-warning');\n const noticeType = this.getNoticeType();\n const noticeIcon = 'warning' === noticeType ? 'info' : 'check-tick';\n const iconElement = processedWrapper.querySelector('.sui-notice-icon');\n processedWrapper.classList.add( 'sui-notice-' + noticeType );\n iconElement.classList.remove('sui-icon-check-tick', 'sui-icon-info');\n iconElement.classList.add( 'sui-icon-' + noticeIcon );\n } else {\n processedWrapper.querySelector('p').innerHTML = wp_smush_msgs.all_smushed;\n }\n processedWrapper.classList.remove('sui-hidden');\n },\n isFailedAllItems() {\n return GlobalStats.getBoStats().failed_items === GlobalStats.getBoStats().total_items;\n },\n getNoticeType() {\n return this.isFailedAllItems() ? 'warning' : 'success';\n },\n onCompletedBulk() {\n // Reset and hide progress bar.\n this.onFinish();\n // Bulk is completed, hide bulk desc.\n SmushProgress.hideBulkSmushDescription();\n // Show completed message.\n this.showCompletedMessage();\n\n // Reset the progress when we finish so the next smushing starts from zero.\n SmushProgress.update(0, GlobalStats.getBoStats().total_items);\n },\n completeBulk() {\n // Sync Stats.\n this.syncStats(() => this.onCompletedBulk());\n },\n syncStats(onComplete = () => false) {\n return BO.handle('getStats').then((res) => {\n if ( res.success ) {\n const responseErrors = res.data.errors || {};\n this.updateStats( { global_stats: res.data, errors: responseErrors }, true );\n GlobalStats.renderStats();\n if ( res.data.content ) {\n $('#wp-smush-bulk-content').innerHTML = res.data.content;\n }\n onComplete();\n } else {\n WP_Smush.helpers.showNotice( res );\n }\n }).catch( (error) => console.log('error', error));\n },\n syncBackgroundStatus() {\n return BO.handle('getStatus').then((res) => {\n if ((res.data || {}).in_process_notice) {\n SmushProgress.setNotice( res.data.in_process_notice );\n }\n\n if (res.success) {\n // Update stats.\n if ( this.updateStats(res.data, false) ) {\n // Update progress bar.\n SmushProgress.update(GlobalStats.getBoStats().processed_items, GlobalStats.getBoStats().total_items);\n\n if (! GlobalStats.getBoStats().is_cancelled && ! GlobalStats.getBoStats().is_completed) {\n // Render stats.\n GlobalStats.renderStats();\n }\n }\n\n if (GlobalStats.getBoStats().is_cancelled && !cancellationInProgress) {\n // Cancelled on server side\n this.cancelBulk();\n } else if (GlobalStats.getBoStats().is_completed) {\n this.completeBulk();\n }\n } else {\n WP_Smush.helpers.showNotice( res );\n }\n });\n },\n onStart() {\n // Disable btn.\n startBtn.setAttribute('disabled', '');\n // Disable re-check images.\n reScanImagesButton && reScanImagesButton.setAttribute('disabled', '');\n $('.wp-smush-restore').setAttribute('disabled', '');\n // Show upsell cdn.\n UpsellManger.maybeShowCDNUpsellForPreSiteOnStart();\n \n\t\t\t\tthis.setCancelButtonStateToInitial();\n },\n onFinish() {\n // Clear interval.\n if (intervalHandle) {\n clearInterval(intervalHandle);\n intervalHandle = 0;\n }\n\n // Disable btn.\n startBtn.removeAttribute('disabled');\n // Reset and hide Progress Bar.\n this.hideProgressBar();\n // Disable re-check images.\n reScanImagesButton && reScanImagesButton.removeAttribute('disabled', '');\n $('.wp-smush-restore').removeAttribute('disabled', '');\n\n // Show upsell cdn.\n UpsellManger.maybeShowCDNUpsellForPreSiteOnCompleted();\n },\n init() {\n if (!startBtn) {\n return;\n }\n\n // Start BO.\n startBtn.onclick = () => {\n const requiredScanMedia = startBtn.classList.contains('wp-smush-scan-and-bulk-smush');\n if ( requiredScanMedia ) {\n return;\n }\n this.start();\n }\n\n // If BO is running, initial new state.\n this.initState();\n },\n\t\t\tsetCancelButtonStateToInitial() {\n SmushProgress.setCancelButtonLabel( wp_smush_msgs.cancel );\n SmushProgress.setOnCancelCallback( this.cancel.bind(this) );\n\t\t\t},\n\t\t\tsetCancelButtonStateToStarted() {\n SmushProgress.setCancelButtonLabel( wp_smush_msgs.cancelling );\n SmushProgress.setOnCancelCallback( () => false );\n },\n }\n })();\n // Run.\n BackgroundSmush && BackgroundSmush.init();\n /**\n * For globalStats, we will need to update it on reload and after re-checking images,\n * and on finish the BO.\n * 1. On finish, we handled via BackgroundSmush.syncStats -> BackgroundSmush.updateStats\n * 2. On reload or after re-checking images, we need to update globalStats from global variable:\n * window.wp_smushit_data\n */\n // Update global stats after re-checking images.\n document.addEventListener('wpSmushAfterRecheckImages', function(){\n GlobalStats.updateGlobalStatsFromSmushScriptData();\n });\n \n document.addEventListener('backgroundBulkSmushOnScanCompleted', function(){\n\t\tif ( ! BackgroundSmush ) {\n\t\t\treturn;\n\t\t}\n GlobalStats.setBoStats({\n in_processing: true,\n });\n BackgroundSmush.initState();\n });\n})();","/* global WP_Smush */\n/* global ajaxurl */\n/* global _ */\n\nimport MixPanel from \"../mixpanel\";\n\n/**\n * Bulk restore JavaScript code.\n *\n * @since 3.2.2\n */\n(function () {\n\t'use strict';\n\n\t/**\n\t * Bulk restore modal.\n\t *\n\t * @since 3.2.2\n\t */\n\tWP_Smush.restore = {\n\t\tmodal: document.getElementById('smush-restore-images-dialog'),\n\t\tcontentContainer: document.getElementById('smush-bulk-restore-content'),\n\t\tsettings: {\n\t\t\tslide: 'start', // start, progress or finish.\n\t\t\tsuccess: 0,\n\t\t\terrors: [],\n\t\t},\n\t\titems: [], // total items, 1 item = 1 step.\n\t\tsuccess: [], // successful items restored.\n\t\terrors: [], // failed items.\n\t\tcurrentStep: 0,\n\t\ttotalSteps: 0,\n\n\t\t/**\n\t\t * Init module.\n\t\t */\n\t\tinit() {\n\t\t\tif (!this.modal) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.settings = {\n\t\t\t\tslide: 'start',\n\t\t\t\tsuccess: 0,\n\t\t\t\terrors: [],\n\t\t\t};\n\n\t\t\tthis.mixPanel = MixPanel.getInstance();\n\n\t\t\tthis.resetModalWidth();\n\t\t\tthis.renderTemplate();\n\n\t\t\t// Show the modal.\n\n\t\t\twindow.SUI.openModal(\n\t\t\t\t'smush-restore-images-dialog',\n\t\t\t\t'wpbody-content',\n\t\t\t\tundefined,\n\t\t\t\tfalse\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Update the template, register new listeners.\n\t\t */\n\t\trenderTemplate() {\n\t\t\tconst template = WP_Smush.onboarding.template('smush-bulk-restore');\n\t\t\tconst content = template(this.settings);\n\n\t\t\tif (content) {\n\t\t\t\tthis.contentContainer.innerHTML = content;\n\t\t\t}\n\n\t\t\tthis.bindSubmit();\n\t\t},\n\n\t\t/**\n\t\t * Reset modal width.\n\t\t *\n\t\t * @since 3.6.0\n\t\t */\n\t\tresetModalWidth() {\n\t\t\tthis.modal.style.maxWidth = '460px';\n\t\t\tthis.modal.querySelector('.sui-box').style.maxWidth = '460px';\n\t\t},\n\n\t\t/**\n\t\t * Catch \"Finish setup wizard\" button click.\n\t\t */\n\t\tbindSubmit() {\n\t\t\tconst confirmButton = this.modal.querySelector(\n\t\t\t\t'button[id=\"smush-bulk-restore-button\"]'\n\t\t\t);\n\t\t\tconst self = this;\n\n\t\t\tif (confirmButton) {\n\t\t\t\tconfirmButton.addEventListener('click', function (e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tself.resetModalWidth();\n\n\t\t\t\t\tself.settings = { slide: 'progress' };\n\t\t\t\t\tself.errors = [];\n\n\t\t\t\t\tself.renderTemplate();\n\t\t\t\t\tself.initScan();\n\n\t\t\t\t\tself.mixPanel.track('Bulk Restore Triggered');\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Cancel the bulk restore.\n\t\t */\n\t\tcancel() {\n\t\t\tif (\n\t\t\t\t'start' === this.settings.slide ||\n\t\t\t\t'finish' === this.settings.slide\n\t\t\t) {\n\t\t\t\t// Hide the modal.\n\t\t\t\twindow.SUI.closeModal();\n\t\t\t} else {\n\t\t\t\tthis.updateProgressBar(true);\n\t\t\t\twindow.location.reload();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update progress bar during directory smush.\n\t\t *\n\t\t * @param {boolean} cancel Cancel status.\n\t\t */\n\t\tupdateProgressBar(cancel = false) {\n\t\t\tlet progress = 0;\n\t\t\tif (0 < this.currentStep) {\n\t\t\t\tprogress = Math.min(\n\t\t\t\t\tMath.round((this.currentStep * 100) / this.totalSteps),\n\t\t\t\t\t99\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (progress > 100) {\n\t\t\t\tprogress = 100;\n\t\t\t}\n\n\t\t\t// Update progress bar\n\t\t\tthis.modal.querySelector('.sui-progress-text span').innerHTML =\n\t\t\t\tprogress + '%';\n\t\t\tthis.modal.querySelector('.sui-progress-bar span').style.width =\n\t\t\t\tprogress + '%';\n\n\t\t\tconst statusDiv = this.modal.querySelector(\n\t\t\t\t'.sui-progress-state-text'\n\t\t\t);\n\t\t\tif (progress >= 90) {\n\t\t\t\tstatusDiv.innerHTML = 'Finalizing...';\n\t\t\t} else if (cancel) {\n\t\t\t\tstatusDiv.innerHTML = 'Cancelling...';\n\t\t\t} else {\n\t\t\t\tstatusDiv.innerHTML =\n\t\t\t\t\tthis.currentStep +\n\t\t\t\t\t'/' +\n\t\t\t\t\tthis.totalSteps +\n\t\t\t\t\t' ' +\n\t\t\t\t\t'images restored';\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * First step in bulk restore - get the bulk attachment count.\n\t\t */\n\t\tinitScan() {\n\t\t\tconst self = this;\n\t\t\tconst _nonce = document.getElementById('_wpnonce');\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', ajaxurl + '?action=get_image_count', true);\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\t\t\txhr.onload = () => {\n\t\t\t\tif (200 === xhr.status) {\n\t\t\t\t\tconst res = JSON.parse(xhr.response);\n\t\t\t\t\tif ('undefined' !== typeof res.data.items) {\n\t\t\t\t\t\tself.items = res.data.items;\n\t\t\t\t\t\tself.totalSteps = res.data.items.length;\n\t\t\t\t\t\tself.step();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\twindow.console.log(\n\t\t\t\t\t\t'Request failed. Returned status of ' + xhr.status\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.send('_ajax_nonce=' + _nonce.value);\n\t\t},\n\n\t\t/**\n\t\t * Execute a scan step recursively\n\t\t */\n\t\tstep() {\n\t\t\tconst self = this;\n\t\t\tconst _nonce = document.getElementById('_wpnonce');\n\n\t\t\tif (0 < this.items.length) {\n\t\t\t\tconst item = this.items.pop();\n\t\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\t\txhr.open('POST', ajaxurl + '?action=restore_step', true);\n\t\t\t\txhr.setRequestHeader(\n\t\t\t\t\t'Content-type',\n\t\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t\t);\n\t\t\t\txhr.onload = () => {\n\t\t\t\t\tthis.currentStep++;\n\n\t\t\t\t\tif (200 === xhr.status) {\n\t\t\t\t\t\tconst res = JSON.parse(xhr.response);\n\t\t\t\t\t\tconst data = ((res || {}).data || {});\n\t\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\t\tself.success.push(item);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself.errors.push({\n\t\t\t\t\t\t\t\tid: item,\n\t\t\t\t\t\t\t\tsrc: data.src || \"Error\",\n\t\t\t\t\t\t\t\tthumb: data.thumb,\n\t\t\t\t\t\t\t\tlink: data.link,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tself.updateProgressBar();\n\t\t\t\t\tself.step();\n\t\t\t\t};\n\t\t\t\txhr.send('item=' + item + '&_ajax_nonce=' + _nonce.value);\n\t\t\t} else {\n\t\t\t\t// Finish.\n\t\t\t\tthis.settings = {\n\t\t\t\t\tslide: 'finish',\n\t\t\t\t\tsuccess: this.success.length,\n\t\t\t\t\terrors: this.errors,\n\t\t\t\t\ttotal: this.totalSteps,\n\t\t\t\t};\n\n\t\t\t\tself.renderTemplate();\n\t\t\t\tif (0 < this.errors.length) {\n\t\t\t\t\tthis.modal.style.maxWidth = '660px';\n\t\t\t\t\tthis.modal.querySelector('.sui-box').style.maxWidth =\n\t\t\t\t\t\t'660px';\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t};\n\n\t/**\n\t * Template function (underscores based).\n\t *\n\t * @type {Function}\n\t */\n\tWP_Smush.restore.template = _.memoize((id) => {\n\t\tlet compiled;\n\t\tconst options = {\n\t\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\t\tescape: /{{([^}]+?)}}(?!})/g,\n\t\t\tvariable: 'data',\n\t\t};\n\n\t\treturn (data) => {\n\t\t\t_.templateSettings = options;\n\t\t\tcompiled =\n\t\t\t\tcompiled || _.template(document.getElementById(id).innerHTML);\n\t\t\treturn compiled(data);\n\t\t};\n\t});\n})();\n","/* global WP_Smush */\n/* global ajaxurl */\n\n/**\n * Bulk Smush functionality.\n *\n * @since 2.9.0 Moved from admin.js\n */\n\nimport Smush from '../smush/smush';\nimport Fetcher from '../utils/fetcher';\nimport SmushProcess from '../common/progressbar';\n\n( function( $ ) {\n\t'use strict';\n\n\tWP_Smush.bulk = {\n\t\tinit() {\n\t\t\tthis.onClickBulkSmushNow();\n\t\t\tthis.onClickIgnoreImage();\n\t\t\tthis.onClickIgnoreAllImages();\n\t\t\tthis.onScanCompleted();\n\t\t},\n\t\tonClickBulkSmushNow() {\n\t\t\t/**\n\t\t\t * Handle the Bulk Smush/Bulk re-Smush button click.\n\t\t\t */\n\t\t\t$( '.wp-smush-all' ).on( 'click', function( e ) {\n\t\t\t\tconst bulkSmushButton = $(this);\n\t\t\t\tif ( bulkSmushButton.hasClass('wp-smush-scan-and-bulk-smush') ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\n\t\t\t\tWP_Smush.bulk.ajaxBulkSmushStart( bulkSmushButton );\n\t\t\t} );\n\t\t},\n\t\tajaxBulkSmushStart( bulkSmushButton ) {\n\t\t\tbulkSmushButton = bulkSmushButton || $( '#wp-smush-bulk-content .wp-smush-all' );\n\t\t\t// Check for IDs, if there is none (unsmushed or lossless), don't call Smush function.\n\t\t\t/** @param {Array} wp_smushit_data.unsmushed */\n\t\t\tif (\n\t\t\t\t'undefined' === typeof window.wp_smushit_data ||\n\t\t\t\t( 0 === window.wp_smushit_data.unsmushed.length &&\n\t\t\t\t\t0 === window.wp_smushit_data.resmush.length )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Disable re-Smush and scan button.\n\t\t\t// TODO: refine what is disabled.\n\t\t\t$(\n\t\t\t\t'.wp-resmush.wp-smush-action, .wp-smush-scan, .wp-smush-all:not(.sui-progress-close), a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#save-settings-button'\n\t\t\t).prop( 'disabled', true );\n\n\t\t\tif ( bulkSmushButton.hasClass('wp-smush-resume-bulk-smush') && this.bulkSmush ) {\n\t\t\t\tthis.resumeBulkSmush();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.bulkSmush = new Smush( bulkSmushButton, true );\n\t\t\tSmushProcess.setOnCancelCallback( () => {\n\t\t\t\tthis.bulkSmush.cancelAjax()\n\t\t\t}).update( 0, this.bulkSmush.ids.length ).show();\n\n\t\t\t// Show upsell cdn.\n\t\t\tthis.maybeShowCDNUpsellForPreSiteOnStart();\n\n\t\t\t// Run bulk Smush.\n\t\t\tthis.bulkSmush.run();\n\t\t},\n\t\tresumeBulkSmush() {\n\t\t\tSmushProcess.disableExceedLimitMode();\n\t\t\tSmushProcess.hideBulkSmushDescription();\n\t\t\tthis.bulkSmush.onStart();\n\t\t\tthis.bulkSmush.callAjax();\n\t\t},\n\t\tonClickIgnoreImage() {\n\t\t\t/**\n\t\t\t * Ignore file from bulk Smush.\n\t\t\t *\n\t\t\t * @since 2.9.0\n\t\t\t */\n\t\t\t$( 'body' ).on( 'click', '.smush-ignore-image', function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst self = $( this );\n\n\t\t\t\tself.prop( 'disabled', true );\n\t\t\t\tself.attr( 'data-tooltip' );\n\t\t\t\tself.removeClass( 'sui-tooltip' );\n\t\t\t\t$.post( ajaxurl, {\n\t\t\t\t\taction: 'ignore_bulk_image',\n\t\t\t\t\tid: self.attr( 'data-id' ),\n\t\t\t\t\t_ajax_nonce: wp_smush_msgs.nonce,\n\t\t\t\t} ).done( ( response ) => {\n\t\t\t\t\tif ( self.is( 'a' ) && response.success && 'undefined' !== typeof response.data.html ) {\n\t\t\t\t\t\tif( self.closest('.smush-status-links') ) {\n\t\t\t\t\t\t\tself.closest('.smush-status-links').parent().html( response.data.html );\n\t\t\t\t\t\t} else if (e.target.closest( '.smush-bulk-error-row' ) ){\n\t\t\t\t\t\t\tself.addClass('disabled');\n\t\t\t\t\t\t\te.target.closest( '.smush-bulk-error-row' ).style.opacity = 0.5;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\t},\n\t\tonClickIgnoreAllImages() {\n\t\t\t/**\n\t\t\t * Ignore file from bulk Smush.\n\t\t\t *\n\t\t\t * @since 3.12.0\n\t\t\t */\n\t\t\tconst ignoreAll = document.querySelector('.wp_smush_ignore_all_failed_items');\n\t\t\tif ( ignoreAll ) {\n\t\t\t\tignoreAll.onclick = (e) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.target.setAttribute('disabled','');\n\t\t\t\t\te.target.style.cursor = 'progress';\n\t\t\t\t\tconst type = e.target.dataset.type || null;\n\t\t\t\t\te.target.classList.remove('sui-tooltip');\n\t\t\t\t\tFetcher.smush.ignoreAll(type).then((res) => {\n\t\t\t\t\t\tif ( res.success ) {\n\t\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\te.target.style.cursor = 'pointer';\n\t\t\t\t\t\t\te.target.removeAttribute('disabled');\n\t\t\t\t\t\t\tWP_Smush.helpers.showNotice( res );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonScanCompleted() {\n\t\t\tdocument.addEventListener('ajaxBulkSmushOnScanCompleted', (e) => {\n\t\t\t\tthis.ajaxBulkSmushStart();\n\t\t\t});\n\t\t},\n\t\tmaybeShowCDNUpsellForPreSiteOnStart: () => {\n\t\t\t// Show upsell cdn.\n\t\t\tconst upsell_cdn = document.querySelector('.wp-smush-upsell-cdn');\n\t\t\tif ( upsell_cdn ) {\n\t\t\t\tupsell_cdn.classList.remove('sui-hidden');\n\t\t\t}\n\t\t}\n\t\t\n\t};\n\n\tWP_Smush.bulk.init();\n} )( jQuery );\n","/* global WP_Smush */\n/* global ajaxurl */\n\n/**\n * Directory Smush module JavaScript code.\n *\n * @since 2.8.1 Separated from admin.js into dedicated file.\n */\n\nimport { createTree } from 'jquery.fancytree';\nimport Scanner from '../smush/directory-scanner';\n\n( function( $ ) {\n\t'use strict';\n\n\tWP_Smush.directory = {\n\t\tselected: [],\n\t\ttree: [],\n\t\twp_smush_msgs: [],\n\t\ttriggered: false,\n\n\t\tinit() {\n\t\t\tconst self = this,\n\t\t\t\tprogressDialog = $( '#wp-smush-progress-dialog' );\n\n\t\t\tlet totalSteps = 0,\n\t\t\t\tcurrentScanStep = 0;\n\n\t\t\t// Make sure directory smush vars are set.\n\t\t\tif ( typeof window.wp_smushit_data.dir_smush !== 'undefined' ) {\n\t\t\t\ttotalSteps = window.wp_smushit_data.dir_smush.totalSteps;\n\t\t\t\tcurrentScanStep =\n\t\t\t\t\twindow.wp_smushit_data.dir_smush.currentScanStep;\n\t\t\t}\n\n\t\t\t// Init image scanner.\n\t\t\tthis.scanner = new Scanner( totalSteps, currentScanStep );\n\n\t\t\t/**\n\t\t\t * Smush translation strings.\n\t\t\t *\n\t\t\t * @param {Array} wp_smush_msgs\n\t\t\t */\n\t\t\tthis.wp_smush_msgs = window.wp_smush_msgs || {};\n\n\t\t\t/**\n\t\t\t * Open the \"Select Smush directory\" modal.\n\t\t\t */\n\t\t\t$( 'button.wp-smush-browse, a#smush-directory-open-modal' ).on(\n\t\t\t\t'click',\n\t\t\t\tfunction( e ) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tif ( $( e.currentTarget ).hasClass( 'wp-smush-browse' ) ) {\n\t\t\t\t\t\t// Hide all the notices.\n\t\t\t\t\t\t$( 'div.wp-smush-scan-result div.wp-smush-notice' ).hide();\n\n\t\t\t\t\t\t// Remove notice.\n\t\t\t\t\t\t$( 'div.wp-smush-info' ).remove();\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.SUI.openModal(\n\t\t\t\t\t\t'wp-smush-list-dialog',\n\t\t\t\t\t\te.currentTarget,\n\t\t\t\t\t\t$(\n\t\t\t\t\t\t\t'#wp-smush-list-dialog .sui-box-header [data-modal-close]'\n\t\t\t\t\t\t)[0],\n\t\t\t\t\t\ttrue\n\t\t\t\t\t);\n\t\t\t\t\t//Display File tree for Directory Smush\n\t\t\t\t\tself.initFileTree();\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Smush images: Smush in Choose Directory modal clicked\n\t\t\t */\n\t\t\t$( '#wp-smush-select-dir' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t$( 'div.wp-smush-list-dialog div.sui-box-body' ).css( {\n\t\t\t\t\topacity: '0.8',\n\t\t\t\t} );\n\t\t\t\t$( 'div.wp-smush-list-dialog div.sui-box-body a' ).off(\n\t\t\t\t\t'click'\n\t\t\t\t);\n\n\t\t\t\tconst button = $( this );\n\n\t\t\t\t// Display the spinner.\n\t\t\t\tbutton.addClass('sui-button-onload');\n\n\t\t\t\tconst selectedFolders = self.tree.getSelectedNodes();\n\n\t\t\t\tconst paths = [];\n\t\t\t\tselectedFolders.forEach( function( folder ) {\n\t\t\t\t\tpaths.push( folder.key );\n\t\t\t\t} );\n\n\t\t\t\t// Send a ajax request to get a list of all the image files\n\t\t\t\tconst param = {\n\t\t\t\t\taction: 'image_list',\n\t\t\t\t\tsmush_path: paths,\n\t\t\t\t\timage_list_nonce: $(\n\t\t\t\t\t\t'input[name=\"image_list_nonce\"]'\n\t\t\t\t\t).val(),\n\t\t\t\t};\n\n\t\t\t\t$.post( ajaxurl, param, function( response ) {\n\t\t\t\t\tif ( response.success ) {\n\t\t\t\t\t\t// Close the modal.\n\t\t\t\t\t\twindow.SUI.closeModal();\n\n\t\t\t\t\t\tself.scanner = new Scanner( response.data, 0 );\n\t\t\t\t\t\tself.showProgressDialog( response.data );\n\t\t\t\t\t\tself.scanner.scan();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Remove the spinner.\n\t\t\t\t\t\tbutton.removeClass('sui-button-onload');\n\n\t\t\t\t\t\twindow.SUI.openNotice(\n\t\t\t\t\t\t\t'wp-smush-ajax-notice',\n\t\t\t\t\t\t\tresponse.data.message,\n\t\t\t\t\t\t\t{ type: 'warning' }\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Cancel scan.\n\t\t\t */\n\t\t\tprogressDialog.on(\n\t\t\t\t'click',\n\t\t\t\t'#cancel-directory-smush, #dialog-close-div, .wp-smush-cancel-dir',\n\t\t\t\tfunction( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t// Display the spinner\n\t\t\t\t\t$( '.wp-smush-cancel-dir' ).addClass( 'sui-button-onload' );\n\t\t\t\t\tself.scanner\n\t\t\t\t\t\t.cancel()\n\t\t\t\t\t\t.done(\n\t\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\t\t( window.location.href =\n\t\t\t\t\t\t\t\t\tself.wp_smush_msgs.directory_url )\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Continue scan.\n\t\t\t */\n\t\t\tprogressDialog.on(\n\t\t\t\t'click',\n\t\t\t\t'.sui-icon-play, .wp-smush-resume-scan',\n\t\t\t\tfunction( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tself.scanner.resume();\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Check to see if we should open the directory module.\n\t\t\t * Used to redirect from dashboard page.\n\t\t\t *\n\t\t\t * @since 3.8.6\n\t\t\t */\n\t\t\tconst queryString = window.location.search;\n\t\t\tconst urlParams = new URLSearchParams( queryString );\n\t\t\tif ( urlParams.has( 'start' ) && ! this.triggered ) {\n\t\t\t\tthis.triggered = true;\n\t\t\t\t$( 'button.wp-smush-browse' ).trigger( 'click' );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Init fileTree.\n\t\t */\n\t\tinitFileTree() {\n\t\t\tconst self = this,\n\t\t\t\tsmushButton = $( 'button#wp-smush-select-dir' ),\n\t\t\t\tajaxSettings = {\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\taction: 'smush_get_directory_list',\n\t\t\t\t\t\tlist_nonce: $( 'input[name=\"list_nonce\"]' ).val(),\n\t\t\t\t\t},\n\t\t\t\t\tcache: false,\n\t\t\t\t};\n\n\t\t\t// Object already defined.\n\t\t\tif ( Object.entries( self.tree ).length > 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.tree = createTree( '.wp-smush-list-dialog .content', {\n\t\t\t\tautoCollapse: true, // Automatically collapse all siblings, when a node is expanded\n\t\t\t\tclickFolderMode: 3, // 1:activate, 2:expand, 3:activate and expand, 4:activate (dblclick expands)\n\t\t\t\tcheckbox: true, // Show checkboxes\n\t\t\t\tdebugLevel: 0, // 0:quiet, 1:errors, 2:warnings, 3:infos, 4:debug\n\t\t\t\tselectMode: 3, // 1:single, 2:multi, 3:multi-hier\n\t\t\t\ttabindex: '0', // Whole tree behaves as one single control\n\t\t\t\tkeyboard: true, // Support keyboard navigation\n\t\t\t\tquicksearch: true, // Navigate to next node by typing the first letters\n\t\t\t\tsource: ajaxSettings,\n\t\t\t\tlazyLoad: ( event, data ) => {\n\t\t\t\t\tdata.result = new Promise( function( resolve, reject ) {\n\t\t\t\t\t\tajaxSettings.data.dir = data.node.key;\n\t\t\t\t\t\t$.ajax( ajaxSettings )\n\t\t\t\t\t\t\t.done( ( response ) => resolve( response ) )\n\t\t\t\t\t\t\t.fail( reject );\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tloadChildren: ( event, data ) =>\n\t\t\t\t\tdata.node.fixSelection3AfterClick(), // Apply parent's state to new child nodes:\n\t\t\t\tselect: () =>\n\t\t\t\t\tsmushButton.prop(\n\t\t\t\t\t\t'disabled',\n\t\t\t\t\t\t! +self.tree.getSelectedNodes().length\n\t\t\t\t\t),\n\t\t\t\tinit: () => smushButton.prop( 'disabled', true ),\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Show progress dialog.\n\t\t *\n\t\t * @param {number} items Number of items in the scan.\n\t\t */\n\t\tshowProgressDialog( items ) {\n\t\t\t// Update items status and show the progress dialog..\n\t\t\t$( '.wp-smush-progress-dialog .sui-progress-state-text' ).html(\n\t\t\t\t'0/' + items + ' ' + self.wp_smush_msgs.progress_smushed\n\t\t\t);\n\n\t\t\twindow.SUI.openModal(\n\t\t\t\t'wp-smush-progress-dialog',\n\t\t\t\t'dialog-close-div',\n\t\t\t\tundefined,\n\t\t\t\tfalse\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Update progress bar during directory smush.\n\t\t *\n\t\t * @param {number} progress Current progress in percent.\n\t\t * @param {boolean} cancel Cancel status.\n\t\t */\n\t\tupdateProgressBar( progress, cancel = false ) {\n\t\t\tif ( progress > 100 ) {\n\t\t\t\tprogress = 100;\n\t\t\t}\n\n\t\t\t// Update progress bar\n\t\t\t$( '.sui-progress-block .sui-progress-text span' ).text(\n\t\t\t\tprogress + '%'\n\t\t\t);\n\t\t\t$( '.sui-progress-block .sui-progress-bar span' ).width(\n\t\t\t\tprogress + '%'\n\t\t\t);\n\n\t\t\tif ( progress >= 90 ) {\n\t\t\t\t$( '.sui-progress-state .sui-progress-state-text' ).text(\n\t\t\t\t\t'Finalizing...'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( cancel ) {\n\t\t\t\t$( '.sui-progress-state .sui-progress-state-text' ).text(\n\t\t\t\t\t'Cancelling...'\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t};\n\n\tWP_Smush.directory.init();\n}( jQuery ) );\n","/* global WP_Smush */\n/* global ajaxurl */\n\n/**\n * Directory scanner module that will Smush images in the Directory Smush modal.\n *\n * @since 2.8.1\n *\n * @param {string|number} totalSteps\n * @param {string|number} currentStep\n * @return {Object} Scan object.\n * @class\n */\nconst DirectoryScanner = ( totalSteps, currentStep ) => {\n\ttotalSteps = parseInt( totalSteps );\n\tcurrentStep = parseInt( currentStep );\n\n\tlet cancelling = false,\n\t\tfailedItems = 0,\n\t\tskippedItems = 0;\n\n\tconst obj = {\n\t\tscan() {\n\t\t\tconst remainingSteps = totalSteps - currentStep;\n\t\t\tif ( currentStep !== 0 ) {\n\t\t\t\t// Scan started on a previous page load.\n\t\t\t\tstep( remainingSteps ).fail( this.showScanError );\n\t\t\t} else {\n\t\t\t\tjQuery\n\t\t\t\t\t.post( ajaxurl, {\n\t\t\t\t\t\taction: 'directory_smush_start',\n\t\t\t\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce\n\t\t\t\t\t}, () =>\n\t\t\t\t\t\tstep( remainingSteps ).fail( this.showScanError )\n\t\t\t\t\t)\n\t\t\t\t\t.fail( this.showScanError );\n\t\t\t}\n\t\t},\n\n\t\tcancel() {\n\t\t\tcancelling = true;\n\t\t\treturn jQuery.post( ajaxurl, {\n\t\t\t\taction: 'directory_smush_cancel',\n\t\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce\n\t\t\t} );\n\t\t},\n\n\t\tgetProgress() {\n\t\t\tif ( cancelling ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t// O M G ... Logic at it's finest!\n\t\t\tconst remainingSteps = totalSteps - currentStep;\n\t\t\treturn Math.min(\n\t\t\t\tMath.round(\n\t\t\t\t\t( parseInt( totalSteps - remainingSteps ) * 100 ) /\n\t\t\t\t\ttotalSteps\n\t\t\t\t),\n\t\t\t\t99\n\t\t\t);\n\t\t},\n\n\t\tonFinishStep( progress ) {\n\t\t\tjQuery( '.wp-smush-progress-dialog .sui-progress-state-text' ).html(\n\t\t\t\tcurrentStep -\n\t\t\t\tfailedItems +\n\t\t\t\t'/' +\n\t\t\t\ttotalSteps +\n\t\t\t\t' ' +\n\t\t\t\twindow.wp_smush_msgs.progress_smushed\n\t\t\t);\n\t\t\tWP_Smush.directory.updateProgressBar( progress );\n\t\t},\n\n\t\tonFinish() {\n\t\t\tWP_Smush.directory.updateProgressBar( 100 );\n\t\t\twindow.location.href =\n\t\t\t\twindow.wp_smush_msgs.directory_url + '&scan=done';\n\t\t},\n\n\t\t/**\n\t\t * Displays an error when the scan request fails.\n\t\t *\n\t\t * @param {Object} res XHR object.\n\t\t */\n\t\tshowScanError( res ) {\n\t\t\tconst dialog = jQuery( '#wp-smush-progress-dialog' );\n\n\t\t\t// Add the error class to show/hide elements in the dialog.\n\t\t\tdialog\n\t\t\t\t.removeClass( 'wp-smush-exceed-limit' )\n\t\t\t\t.addClass( 'wp-smush-scan-error' );\n\n\t\t\t// Add the error status and description to the error message.\n\t\t\tdialog\n\t\t\t\t.find( '#smush-scan-error' )\n\t\t\t\t.text( `${ res.status } ${ res.statusText }` );\n\n\t\t\t// Show/hide the 403 error specific instructions.\n\t\t\tconst forbiddenMessage = dialog.find( '.smush-403-error-message' );\n\t\t\tif ( 403 !== res.status ) {\n\t\t\t\tforbiddenMessage.addClass( 'sui-hidden' );\n\t\t\t} else {\n\t\t\t\tforbiddenMessage.removeClass( 'sui-hidden' );\n\t\t\t}\n\t\t},\n\n\t\tlimitReached() {\n\t\t\tconst dialog = jQuery( '#wp-smush-progress-dialog' );\n\n\t\t\tdialog.addClass( 'wp-smush-exceed-limit' );\n\t\t\tdialog\n\t\t\t\t.find( '#cancel-directory-smush' )\n\t\t\t\t.attr( 'data-tooltip', window.wp_smush_msgs.bulk_resume );\n\t\t\tdialog\n\t\t\t\t.find( '.sui-box-body .sui-icon-close' )\n\t\t\t\t.removeClass( 'sui-icon-close' )\n\t\t\t\t.addClass( 'sui-icon-play' );\n\t\t\tdialog\n\t\t\t\t.find( '#cancel-directory-smush' )\n\t\t\t\t.attr( 'id', 'cancel-directory-smush-disabled' );\n\t\t},\n\n\t\tresume() {\n\t\t\tconst dialog = jQuery( '#wp-smush-progress-dialog' );\n\t\t\tconst resume = dialog.find( '#cancel-directory-smush-disabled' );\n\n\t\t\tdialog.removeClass( 'wp-smush-exceed-limit' );\n\t\t\tdialog\n\t\t\t\t.find( '.sui-box-body .sui-icon-play' )\n\t\t\t\t.removeClass( 'sui-icon-play' )\n\t\t\t\t.addClass( 'sui-icon-close' );\n\t\t\tresume.attr( 'data-tooltip', 'Cancel' );\n\t\t\tresume.attr( 'id', 'cancel-directory-smush' );\n\n\t\t\tobj.scan();\n\t\t},\n\t};\n\n\t/**\n\t * Execute a scan step recursively\n\t *\n\t * Private to avoid overriding\n\t *\n\t * @param {number} remainingSteps\n\t */\n\tconst step = function( remainingSteps ) {\n\t\tif ( remainingSteps >= 0 ) {\n\t\t\tcurrentStep = totalSteps - remainingSteps;\n\t\t\treturn jQuery.post(\n\t\t\t\tajaxurl,\n\t\t\t\t{\n\t\t\t\t\taction: 'directory_smush_check_step',\n\t\t\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce,\n\t\t\t\t\tstep: currentStep,\n\t\t\t\t},\n\t\t\t\t( response ) => {\n\t\t\t\t\t// We're good - continue on.\n\t\t\t\t\tif (\n\t\t\t\t\t\t'undefined' !== typeof response.success &&\n\t\t\t\t\t\tresponse.success\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t'undefined' !== typeof response.data &&\n\t\t\t\t\t\t\t'undefined' !== typeof response.data.skipped &&\n\t\t\t\t\t\t\ttrue === response.data.skipped\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tskippedItems++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrentStep++;\n\t\t\t\t\t\tremainingSteps = remainingSteps - 1;\n\t\t\t\t\t\tobj.onFinishStep( obj.getProgress() );\n\t\t\t\t\t\tstep( remainingSteps ).fail( obj.showScanError );\n\t\t\t\t\t} else if (\n\t\t\t\t\t\t'undefined' !== typeof response.data.error &&\n\t\t\t\t\t\t'dir_smush_limit_exceeded' === response.data.error\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Limit reached. Stop.\n\t\t\t\t\t\tobj.limitReached();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Error? never mind, continue, but count them.\n\t\t\t\t\t\tfailedItems++;\n\t\t\t\t\t\tcurrentStep++;\n\t\t\t\t\t\tremainingSteps = remainingSteps - 1;\n\t\t\t\t\t\tobj.onFinishStep( obj.getProgress() );\n\t\t\t\t\t\tstep( remainingSteps ).fail( obj.showScanError );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\treturn jQuery.post(\n\t\t\tajaxurl,\n\t\t\t{\n\t\t\t\taction: 'directory_smush_finish',\n\t\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce,\n\t\t\t\titems: totalSteps - ( failedItems + skippedItems ),\n\t\t\t\tfailed: failedItems,\n\t\t\t\tskipped: skippedItems,\n\t\t\t},\n\t\t\t( response ) => obj.onFinish( response )\n\t\t);\n\t};\n\n\treturn obj;\n};\n\nexport default DirectoryScanner;\n","/* global WP_Smush */\n/* global ajaxurl */\n/* global wp_smush_msgs */\n\n/**\n * Helpers functions.\n *\n * @since 2.9.0 Moved from admin.js\n */\n( function() {\n\t'use strict';\n\n\tWP_Smush.helpers = {\n\t\tinit: () => {},\n\t\tcacheUpsellErrorCodes: [],\n\n\t\t/**\n\t\t * Convert bytes to human-readable form.\n\t\t *\n\t\t * @param {number} a Bytes\n\t\t * @param {number} b Number of digits\n\t\t * @return {*} Formatted Bytes\n\t\t */\n\t\tformatBytes: ( a, b ) => {\n\t\t\tconst thresh = 1024,\n\t\t\t\tunits = [ 'KB', 'MB', 'GB', 'TB', 'PB' ];\n\n\t\t\tif ( Math.abs( a ) < thresh ) {\n\t\t\t\treturn a + ' B';\n\t\t\t}\n\n\t\t\tlet u = -1;\n\n\t\t\tdo {\n\t\t\t\ta /= thresh;\n\t\t\t\t++u;\n\t\t\t} while ( Math.abs( a ) >= thresh && u < units.length - 1 );\n\n\t\t\treturn a.toFixed( b ) + ' ' + units[ u ];\n\t\t},\n\n\t\t/**\n\t\t * Get size from a string.\n\t\t *\n\t\t * @param {string} formattedSize Formatter string\n\t\t * @return {*} Formatted Bytes\n\t\t */\n\t\tgetSizeFromString: ( formattedSize ) => {\n\t\t\treturn formattedSize.replace( /[a-zA-Z]/g, '' ).trim();\n\t\t},\n\n\t\t/**\n\t\t * Get type from formatted string.\n\t\t *\n\t\t * @param {string} formattedSize Formatted string\n\t\t * @return {*} Formatted Bytes\n\t\t */\n\t\tgetFormatFromString: ( formattedSize ) => {\n\t\t\treturn formattedSize.replace( /[0-9.]/g, '' ).trim();\n\t\t},\n\n\t\t/**\n\t\t * Stackoverflow: http://stackoverflow.com/questions/1726630/formatting-a-number-with-exactly-two-decimals-in-javascript\n\t\t *\n\t\t * @param {number} num\n\t\t * @param {number} decimals\n\t\t * @return {number} Number\n\t\t */\n\t\tprecise_round: ( num, decimals ) => {\n\t\t\tconst sign = num >= 0 ? 1 : -1;\n\t\t\t// Keep the percentage below 100.\n\t\t\tnum = num > 100 ? 100 : num;\n\t\t\treturn (\n\t\t\t\tMath.round( num * Math.pow( 10, decimals ) + sign * 0.001 ) /\n\t\t\t\tMath.pow( 10, decimals )\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Displays a floating error message using the #wp-smush-ajax-notice container.\n\t\t *\n\t\t * @since 3.8.0\n\t\t *\n\t\t * @param {string} message\n\t\t */\n\t\tshowErrorNotice: ( message ) => {\n\t\t\tif ( 'undefined' === typeof message ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst noticeMessage = `

${ message }

`,\n\t\t\t\tnoticeOptions = {\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\ticon: 'info',\n\t\t\t\t};\n\n\t\t\tSUI.openNotice( 'wp-smush-ajax-notice', noticeMessage, noticeOptions );\n\n\t\t\tconst loadingButton = document.querySelector( '.sui-button-onload' );\n\t\t\tif ( loadingButton ) {\n\t\t\t\tloadingButton.classList.remove( 'sui-button-onload' );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Reset settings.\n\t\t *\n\t\t * @since 3.2.0\n\t\t */\n\t\tresetSettings: () => {\n\t\t\tconst _nonce = document.getElementById( 'wp_smush_reset' );\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open( 'POST', ajaxurl + '?action=reset_settings', true );\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\t\t\txhr.onload = () => {\n\t\t\t\tif ( 200 === xhr.status ) {\n\t\t\t\t\tconst res = JSON.parse( xhr.response );\n\t\t\t\t\tif ( 'undefined' !== typeof res.success && res.success ) {\n\t\t\t\t\t\twindow.location.href = wp_smush_msgs.smush_url;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\twindow.console.log(\n\t\t\t\t\t\t'Request failed. Returned status of ' + xhr.status\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.send( '_ajax_nonce=' + _nonce.value );\n\t\t},\n\n\t\t/**\n\t\t * Prepare error row. Will only allow to hide errors for WP media attachments (not nextgen).\n\t\t *\n\t\t * @since 1.9.0\n\t\t * @since 3.12.0 Moved from Smush.\n\t\t *\n\t\t * @param {string} errorMsg Error message.\n\t\t * @param {string} fileName File name.\n\t\t * @param {string} thumbnail Thumbnail for image (if available).\n\t\t * @param {number} id Image ID.\n\t\t * @param {string} type Smush type: media or netxgen.\n\t\t * @param {string} errorCode Error code.\n\t\t *\n\t\t * @return {string} Row with error.\n\t\t */\n\t\t prepareBulkSmushErrorRow: (errorMsg, fileName, thumbnail, id, type, errorCode) => {\n\t\t\tconst thumbDiv =\n\t\t\tthumbnail && 'undefined' !== typeof thumbnail ?\n\t\t\t\t`` :\n\t\t\t\t'';\n\t\t\tconst editLink = window.wp_smush_msgs.edit_link.replace('{{id}}', id);\n\t\t\tfileName =\n\t\t\t\t'undefined' === fileName || 'undefined' === typeof fileName ?\n\t\t\t\t'undefined' :\n\t\t\t\tfileName;\n\n\t\t\tlet tableDiv =\n\t\t\t\t`
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${ thumbDiv }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t${fileName}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t${errorMsg}\n\t\t\t\t\t
\n\t\t\t\t
`;\n\n\t\t\tif ('media' === type) {\n\t\t\t\ttableDiv +=\n\t\t\t\t\t`
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t${window.wp_smush_msgs.btn_ignore}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t${window.wp_smush_msgs.view_detail}\n\t\t\t\t\t\t\n\t\t\t\t\t
`;\n\t\t\t}\n\n\t\t\ttableDiv += '
';\n\n\t\t\ttableDiv += WP_Smush.helpers.upsellWithError( errorCode );\n\n\t\t\treturn tableDiv;\n\t\t},\n\t\tcacheUpsellErrorCode( errorCode ) {\n\t\t\tthis.cacheUpsellErrorCodes.push( errorCode );\n\t\t},\n\t\t/**\n\t\t * Get upsell base on error code.\n\t\t * @param {string} errorCode Error code.\n\t\t * @returns {string}\n\t\t */\n\t\tupsellWithError(errorCode) {\n\t\t\tif (\n\t\t\t\t!errorCode\n\t\t\t\t|| !window.wp_smush_msgs['error_' + errorCode]\n\t\t\t\t|| this.isUpsellRendered( errorCode )\n\t\t\t) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tthis.cacheRenderedUpsell( errorCode );\n\t\t\t\n\t\t\treturn '
' +\n\t\t\t\t'
' +\n\t\t\t\t'' +\n\t\t\t\twindow.wp_smush_msgs['error_' + errorCode] +\n\t\t\t\t'' +\n\t\t\t\t'
';\n\t\t},\n\t\t// Do not use arrow function to use `this`.\n\t\tisUpsellRendered( errorCode ) {\n\t\t\treturn this.cacheUpsellErrorCodes.includes( errorCode );\n\t\t},\n\t\t// Do not use arrow function to use `this`.\n\t\tcacheRenderedUpsell( errorCode ) {\n\t\t\tthis.cacheUpsellErrorCodes.push( errorCode );\n\t\t},\n\t\t/**\n\t\t * Get error message from Ajax response or Error. \n\t\t * @param {Object} resp\n\t\t */\n\t\tgetErrorMessage: ( resp ) => {\n\t\t\treturn resp.message || resp.data && resp.data.message ||\n\t\t\t\tresp.responseJSON && resp.responseJSON.data && resp.responseJSON.data.message ||\n\t\t\t\twindow.wp_smush_msgs.generic_ajax_error ||\n\t\t\t\tresp.status && 'Request failed. Returned status of ' + resp.status\n\t\t},\n\n\t\t/**\n\t\t * Displays a floating message from response,\n\t\t * using the #wp-smush-ajax-notice container.\n\t\t *\n\t\t * @param {Object|string} notice\n\t\t * @param {Object} \t\t noticeOptions\n\t\t */\n\t\tshowNotice: function( notice, noticeOptions ) {\n\t\t\tlet message;\n\t\t\tif ( 'object' === typeof notice ) {\n\t\t\t\tmessage = this.getErrorMessage( notice );\n\t\t\t} else {\n\t\t\t\tmessage = notice;\n\t\t\t}\n\n\t\t\tif ( ! message ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tnoticeOptions = noticeOptions || {};\n\t\t\tnoticeOptions = Object.assign({\n\t\t\t\tshowdismiss: false,\n\t\t\t\tautoclose: true,\n\t\t\t},noticeOptions);\n\t\t\tnoticeOptions = {\n\t\t\t\ttype: noticeOptions.type || 'error',\n\t\t\t\ticon: noticeOptions.icon || ( 'success' === noticeOptions.type ? 'check-tick' : 'info' ),\n\t\t\t\tdismiss: {\n\t\t\t\t\tshow: noticeOptions.showdismiss,\n\t\t\t\t\tlabel: window.wp_smush_msgs.noticeDismiss,\n\t\t\t\t\ttooltip: window.wp_smush_msgs.noticeDismissTooltip,\n\t\t\t\t},\n\t\t\t\tautoclose: {\n\t\t\t\t\tshow: noticeOptions.autoclose\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst noticeMessage = `

${ message }

`;\n\n\t\t\tSUI.openNotice( 'wp-smush-ajax-notice', noticeMessage, noticeOptions );\n\t\t\treturn Promise.resolve( '#wp-smush-ajax-notice' );\n\t\t},\n\t\tcloseNotice() {\n\t\t\twindow.SUI.closeNotice( 'wp-smush-ajax-notice' );\n\t\t},\n\t\trenderActivationCDNNotice: function( noticeMessage ) {\n\t\t\tconst animatedNotice = document.getElementById('wp-smush-animated-upsell-notice');\n\t\t\tif ( animatedNotice ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst upsellHtml = `
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t

${noticeMessage}

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
`;\n\t\t\tdocument.querySelector( '#smush-box-bulk .wp-smush-bulk-wrapper' ).outerHTML += upsellHtml;\n\t\t}\n\t};\n\n\tWP_Smush.helpers.init();\n}() );\n","/* global WP_Smush */\n\n/**\n * Scan Media Library.\n *\n */\nimport SmushProgress from '../common/progressbar';\nimport MediaLibraryScanner from '../common/media-library-scanner';\nimport { GlobalStats } from '../common/globalStats';\n\n( function() {\n\t'use strict';\n\tif ( ! window.wp_smush_msgs ) {\n\t\treturn;\n\t}\n\tconst $ = document.querySelector.bind( document );\n\tconst existScanProgressBar = $( '.wp-smush-scan-progress-bar-wrapper' );\n\tif ( ! existScanProgressBar ) {\n\t\treturn;\n\t}\n\n\tconst recheckImagesBtn = $( '.wp-smush-scan' );\n\tif ( ! recheckImagesBtn ) {\n\t\treturn;\n\t}\n\tconst bulkSmushButton = $( '.wp-smush-bo-start' ) || $( '.wp-smush-bulk-wrapper .wp-smush-all' );\n\tconst { __ } = wp.i18n;\n\n\tclass MediaLibraryScannerOnBulkSmush extends MediaLibraryScanner {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tthis.runBulkSmushOnComplete = false;\n\t\t\tthis.restoreButton = $( '.wp-smush-restore' );\n\t\t\tthis.autoBulkSmushNotification = $( '.wp-smush-auto-bulk-smush-notification' );\n\t\t}\n\n\t\tstartScanThenBulkSmushOnComplete() {\n\t\t\tthis.runBulkSmushOnComplete = true;\n\t\t\treturn this.startScan( true );\n\t\t}\n\n\t\tonStart() {\n\t\t\tthis.hideRecheckNotice();\n\t\t\tthis.disableRelatedButtons();\n\t\t\tthis.setRecheckImagesButtonOnLoad();\n\t\t\tthis.toggleBulkSmushBoxContent();\n\t\t\treturn this;\n\t\t}\n\n\t\tonStartFailure( response ) {\n\t\t\tsuper.onStartFailure( response );\n\t\t\tthis.revertRelatedButtons();\n\t\t}\n\n\t\tonCloseProgressBar() {\n\t\t\tthis.maybeHideAutoBulkSmushNotification();\n\t\t}\n\n\t\tdisableRelatedButtons() {\n\t\t\tthis.restoreButton.setAttribute( 'disabled', true );\n\t\t\tif ( bulkSmushButton ) {\n\t\t\t\tbulkSmushButton.setAttribute( 'disabled', true );\n\t\t\t\tthis.setInnerText( bulkSmushButton, __( 'Waiting for Re-check to finish', 'wp-smushit' ) );\n\t\t\t}\n\t\t}\n\n\t\trevertRelatedButtons() {\n\t\t\tif ( bulkSmushButton ) {\n\t\t\t\tbulkSmushButton.removeAttribute( 'disabled' );\n\t\t\t\tthis.revertInnerText( bulkSmushButton );\n\t\t\t}\n\t\t\tthis.restoreButton.removeAttribute( 'disabled' );\n\t\t\tthis.revertRecheckImagesButton();\n\t\t\treturn this;\n\t\t}\n\n\t\tsetRecheckImagesButtonOnLoad() {\n\t\t\t// recheckImagesBtn.classList.add( 'sui-button-onload' );\n\t\t\tthis.disableRecheckImagesButton();\n\t\t\tthis.setInnerText( recheckImagesBtn.querySelector( '.wp-smush-inner-text' ), __( 'Checking Images', 'wp-smushit' ) );\n\t\t}\n\n\t\tdisableRecheckImagesButton() {\n\t\t\trecheckImagesBtn.setAttribute( 'disabled', true );\n\t\t}\n\n\t\trevertRecheckImagesButton() {\n\t\t\t// recheckImagesBtn.classList.remove( 'sui-button-onload' );\n\t\t\trecheckImagesBtn.removeAttribute( 'disabled' );\n\t\t\tthis.revertInnerText( recheckImagesBtn.querySelector( '.wp-smush-inner-text' ) );\n\t\t}\n\n\t\tbeforeUpdateStatus( stats ) {\n\t\t\tthis.runBulkSmushOnComplete = stats?.optimize_on_scan_completed;\n\t\t\tthis.maybeShowAutoBulkSmushNotification();\n\t\t}\n\n\t\tonDead( stats ) {\n\t\t\tsuper.onDead( stats );\n\t\t\tthis.revertRelatedButtons();\n\t\t\tthis.setRequiredScanForBulkSmushButton();\n\t\t}\n\n\t\tonFinish( stats ) {\n\t\t\tconst globalStats = stats.global_stats;\n\t\t\tsuper.onFinish( stats );\n\t\t\tthis.revertRelatedButtons();\n\t\t\tthis.toggleBulkSmushDescription( globalStats );\n\t\t\tif ( globalStats.is_outdated ) {\n\t\t\t\tthis.setRequiredScanForBulkSmushButton();\n\t\t\t} else {\n\t\t\t\tthis.removeScanEventFromBulkSmushButton();\n\t\t\t}\n\n\t\t\tthis.revertRecheckWarning();\n\t\t}\n\n\t\tonCompleted( stats ) {\n\t\t\tconst requiredReloadPage = ! bulkSmushButton;\n\t\t\tif ( requiredReloadPage ) {\n\t\t\t\twindow.location.reload();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.onFinish( stats );\n\t\t\tconst globalStats = stats.global_stats;\n\t\t\tconst allImagesSmushed = globalStats.remaining_count < 1;\n\t\t\tif ( allImagesSmushed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! this.runBulkSmushOnComplete ) {\n\t\t\t\tthis.showRecheckNoticeSuccess();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.runBulkSmushOnComplete = false;\n\n\t\t\tthis.triggerBulkSmushEvent( stats );\n\t\t}\n\n\t\tshowNotice( stats ) {\n\t\t\tif ( ! stats.notice ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet type = 'success';\n\t\t\tif ( 'undefined' !== typeof stats.noticeType ) {\n\t\t\t\ttype = stats.noticeType;\n\t\t\t}\n\t\t\twindow.SUI.openNotice(\n\t\t\t\t'wp-smush-ajax-notice',\n\t\t\t\t'

' + stats.notice + '

',\n\t\t\t\t{ type, icon: 'check-tick' }\n\t\t\t);\n\t\t}\n\n\t\tshowRecheckNoticeSuccess() {\n\t\t\tconst recheckNotice = $( '.wp-smush-recheck-images-notice-box' );\n\t\t\tif ( ! recheckNotice ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.showAnElement( recheckNotice );\n\t\t\tthis.hideAnElement( recheckNotice.querySelector( '.wp-smush-recheck-images-notice-warning' ) );\n\t\t\tthis.showAnElement( recheckNotice.querySelector( '.wp-smush-recheck-images-notice-success' ) );\n\t\t}\n\n\t\tshowRecheckNoticeWarning() {\n\t\t\tconst recheckNotice = $( '.wp-smush-recheck-images-notice-box' );\n\t\t\tif ( ! recheckNotice ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.showAnElement( recheckNotice );\n\t\t\tthis.hideAnElement( recheckNotice.querySelector( '.wp-smush-recheck-images-notice-success' ) );\n\t\t\tthis.showAnElement( recheckNotice.querySelector( '.wp-smush-recheck-images-notice-warning' ) );\n\t\t}\n\n\t\thideRecheckNotice() {\n\t\t\tthis.hideAnElement( $( '.wp-smush-recheck-images-notice-box' ) );\n\t\t}\n\n\t\tshowProgressErrorNoticeOnRecheckNotice() {\n\t\t\tconst recheckWarningElement = $( '.wp-smush-recheck-images-notice-box .wp-smush-recheck-images-notice-warning' );\n\t\t\tif ( ! recheckWarningElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trecheckWarningElement.classList.add( 'sui-notice-error' );\n\t\t\trecheckWarningElement.classList.remove( 'sui-notice-warning' );\n\t\t\tthis.setInnerText( recheckWarningElement.querySelector( 'span' ), this.getErrorProgressMessage() );\n\t\t\tthis.showRecheckNoticeWarning();\n\t\t}\n\n\t\trevertRecheckWarning() {\n\t\t\tconst recheckWarningElement = $( '.wp-smush-recheck-images-notice-box .wp-smush-recheck-images-notice-warning' );\n\t\t\tif ( ! recheckWarningElement ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trecheckWarningElement.classList.add( 'sui-notice-warning' );\n\t\t\trecheckWarningElement.classList.remove( 'sui-notice-error' );\n\t\t\tthis.revertInnerText( recheckWarningElement.querySelector( 'span' ) );\n\t\t}\n\n\t\ttriggerBulkSmushEvent( stats ) {\n\t\t\tthis.disableRecheckImagesButton();\n\n\t\t\tif ( stats.enabled_background_process ) {\n\t\t\t\tthis.triggerBackgroundBulkSmushEvent( stats.global_stats );\n\t\t\t} else {\n\t\t\t\tthis.triggerAjaxBulkSmushEvent( stats.global_stats );\n\t\t\t}\n\t\t}\n\n\t\ttoggleBulkSmushDescription( globalStats ) {\n\t\t\tif ( SmushProgress.isEmptyObject ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( globalStats.remaining_count < 1 ) {\n\t\t\t\tSmushProgress.hideBulkSmushDescription();\n\t\t\t\tSmushProgress.showBulkSmushAllDone();\n\t\t\t} else {\n\t\t\t\tSmushProgress.showBulkSmushDescription();\n\t\t\t\tSmushProgress.hideBulkSmushAllDone();\n\t\t\t}\n\t\t}\n\n\t\tsetRequiredScanForBulkSmushButton() {\n\t\t\tbulkSmushButton && bulkSmushButton.classList.add( 'wp-smush-scan-and-bulk-smush' );\n\t\t}\n\n\t\tremoveScanEventFromBulkSmushButton() {\n\t\t\tbulkSmushButton && bulkSmushButton.classList.remove( 'wp-smush-scan-and-bulk-smush' );\n\t\t}\n\n\t\ttriggerBackgroundBulkSmushEvent( globalStats ) {\n\t\t\tdocument.dispatchEvent(\n\t\t\t\tnew CustomEvent( 'backgroundBulkSmushOnScanCompleted', {\n\t\t\t\t\tdetail: globalStats\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\ttriggerAjaxBulkSmushEvent( globalStats ) {\n\t\t\tdocument.dispatchEvent(\n\t\t\t\tnew CustomEvent( 'ajaxBulkSmushOnScanCompleted', {\n\t\t\t\t\tdetail: globalStats\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\tonCancelled( stats ) {\n\t\t\tthis.onFinish( stats );\n\t\t\tthis.runBulkSmushOnComplete = false;\n\t\t\tthis.setRequiredScanForBulkSmushButton();\n\t\t}\n\n\t\tmaybeShowAutoBulkSmushNotification() {\n\t\t\tif (\n\t\t\t\t! this.runBulkSmushOnComplete\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.showAnElement( this.autoBulkSmushNotification );\n\t\t}\n\n\t\tmaybeHideAutoBulkSmushNotification() {\n\t\t\tif (\n\t\t\t\t! this.runBulkSmushOnComplete\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.hideAnElement( this.autoBulkSmushNotification );\n\t\t}\n\n\t\ttoggleBulkSmushBoxContent() {\n\t\t\tGlobalStats.resetAndHideBulkErrors();\n\t\t\tthis.toggleBulkSmushDescription( GlobalStats.getGlobalStats() );\n\t\t}\n\t}\n\tconst mediaLibScanner = new MediaLibraryScannerOnBulkSmush();\n\n\t/**\n\t * Event Listeners.\n\t */\n\n\t// Background Scan Media Library.\n\tconst registerScanMediaLibraryEvent = () => {\n\t\tif ( ! recheckImagesBtn ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canScanInBackground = recheckImagesBtn.classList.contains( 'wp-smush-background-scan' );\n\t\tif ( ! canScanInBackground ) {\n\t\t\treturn;\n\t\t}\n\n\t\trecheckImagesBtn.addEventListener( 'click', () => mediaLibScanner.startScan() );\n\n\t\t//Check scan is running.\n\t\tif ( window.wp_smushit_data.media_library_scan?.in_processing ) {\n\t\t\tmediaLibScanner.onStart().showProgressBar().autoSyncStatus();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( window.location.search.includes( 'smush-action=start-scan-media' ) ) {\n\t\t\trecheckImagesBtn.click();\n\t\t\tconst removeScanActionFromURLAddress = () => {\n\t\t\t\tconst cleanedURL = window.location.href.replace( '&smush-action=start-scan-media', '' );\n\t\t\t\twindow.history.pushState( null, null, cleanedURL );\n\t\t\t};\n\t\t\tremoveScanActionFromURLAddress();\n\t\t}\n\t};\n\tregisterScanMediaLibraryEvent();\n\n\t/**\n\t * Recheck Images Notice events.\n\t */\n\tconst registerEventsRelatedRecheckImagesNotice = () => {\n\t\tconst recheckImagesNotice = $( '.wp-smush-recheck-images-notice-box' );\n\t\tif ( ! recheckImagesNotice || ! recheckImagesBtn ) {\n\t\t\treturn;\n\t\t}\n\t\tconst triggerBackgroundScanImagesLink = recheckImagesNotice.querySelector( '.wp-smush-trigger-background-scan' );\n\t\tif ( triggerBackgroundScanImagesLink ) {\n\t\t\ttriggerBackgroundScanImagesLink.onclick = ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\trecheckImagesBtn.click();\n\t\t\t};\n\n\t\t\tif ( window.wp_smushit_data.media_library_scan?.is_dead ) {\n\t\t\t\tmediaLibScanner.showProgressErrorNoticeOnRecheckNotice();\n\t\t\t} else if( window.wp_smushit_data.is_outdated ) {\n\t\t\t\tmediaLibScanner.showRecheckNoticeWarning();\n\t\t\t}\n\t\t}\n\t\tconst triggerBulkSmush = recheckImagesNotice.querySelector( '.wp-smush-trigger-bulk-smush' );\n\t\tif ( triggerBulkSmush && bulkSmushButton ) {\n\t\t\ttriggerBulkSmush.onclick = ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\trecheckImagesNotice.classList.add( 'sui-hidden' );\n\t\t\t\tbulkSmushButton.click();\n\t\t\t};\n\t\t}\n\t\tconst dismissNotices = recheckImagesNotice.querySelectorAll( 'button.sui-button-icon' );\n\t\tif ( dismissNotices ) {\n\t\t\tdismissNotices.forEach( ( dismissNotice ) => {\n\t\t\t\tdismissNotice.onclick = ( e ) => {\n\t\t\t\t\tdismissNotice.closest( '.sui-recheck-images-notice' ).classList.add( 'sui-hidden' );\n\t\t\t\t};\n\t\t\t} );\n\t\t}\n\n\t\tdocument.addEventListener( 'onSavedSmushSettings', function( e ) {\n\t\t\tif ( ! e?.detail?.is_outdated_stats ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmediaLibScanner.setRequiredScanForBulkSmushButton();\n\n\t\t\trecheckImagesNotice.classList.remove( 'sui-hidden' );\n\t\t\trecheckImagesNotice.querySelector( '.wp-smush-recheck-images-notice-success' ).classList.add( 'sui-hidden' );\n\t\t\trecheckImagesNotice.querySelector( '.wp-smush-recheck-images-notice-warning' ).classList.remove( 'sui-hidden' );\n\t\t} );\n\t};\n\n\tregisterEventsRelatedRecheckImagesNotice();\n\n\t// Scan and Bulk Smush.\n\tconst registerScanAndBulkSmushEvent = () => {\n\t\tif ( ! bulkSmushButton ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst handleScanAndBulkSmush = ( e ) => {\n\t\t\tconst shouldRunScan = bulkSmushButton.classList.contains( 'wp-smush-scan-and-bulk-smush' );\n\t\t\tif ( ! shouldRunScan ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\tmediaLibScanner.startScanThenBulkSmushOnComplete();\n\t\t};\n\n\t\tbulkSmushButton.addEventListener( 'click', handleScanAndBulkSmush );\n\t};\n\tregisterScanAndBulkSmushEvent();\n}() );\n","/* global WP_Smush */\n\n/**\n * Scan Media Library.\n *\n */\nimport MediaLibraryScanner from '../common/media-library-scanner';\n\n( function() {\n\t'use strict';\n\tif ( ! window.wp_smush_msgs ) {\n\t\treturn;\n\t}\n\tconst $ = document.querySelector.bind( document );\n\tconst existScanProgressBar = $( '.wp-smush-scan-progress-bar-wrapper' );\n\tif ( ! existScanProgressBar ) {\n\t\treturn;\n\t}\n\n\tconst recheckImagesBtn = $( '.wp-smush-scan' );\n\tif ( recheckImagesBtn ) {\n\t\treturn;\n\t}\n\t//Check scan is running.\n\tconst is_scan_running = window.wp_smushit_data.media_library_scan?.in_processing;\n\tif ( ! is_scan_running ) {\n\t\treturn;\n\t}\n\n\tconst { __ } = wp.i18n;\n\n\tclass mediaLibraryScannerOnDashboard extends MediaLibraryScanner {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tthis.bulkSmushLink = $( '.wp-smush-bulk-smush-link' );\n\t\t}\n\t\tonShowProgressBar() {\n\t\t\tthis.disableBulkSmushLink();\n\t\t}\n\n\t\tonCloseProgressBar() {\n\t\t\tthis.revertBulkSmushLink();\n\t\t}\n\n\t\tdisableBulkSmushLink() {\n\t\t\tif ( ! this.bulkSmushLink ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.bulkSmushLink.setAttribute( 'disabled', true );\n\t\t\tthis.setInnerText( this.bulkSmushLink, __( 'Waiting for Re-check to finish', 'wp-smushit' ) );\n\t\t}\n\n\t\trevertBulkSmushLink() {\n\t\t\tif ( ! this.bulkSmushLink ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.bulkSmushLink.removeAttribute( 'disabled' );\n\t\t\tthis.revertInnerText( this.bulkSmushLink );\n\t\t}\n\t}\n\n\t( new mediaLibraryScannerOnDashboard() ).showProgressBar().autoSyncStatus();\n}() );\n","import Smush from '../smush/smush';\nimport SmushProcess from '../common/progressbar';\n\n(function($) {\n $(function() {\n /** Handle NextGen Gallery smush button click **/\n $('body').on('click', '.wp-smush-nextgen-send', function (e) {\n // prevent the default action\n e.preventDefault();\n new Smush($(this), false, 'nextgen');\n });\n\n /** Handle NextGen Gallery Bulk smush button click **/\n $('body').on('click', '.wp-smush-nextgen-bulk', function (e) {\n // prevent the default action\n e.preventDefault();\n\n // Remove existing Re-Smush notices.\n // TODO: REMOVE re-smush-notice since no longer used.\n $('.wp-smush-resmush-notice').remove();\n\n //Check for ids, if there is none (Unsmushed or lossless), don't call smush function\n if (\n 'undefined' === typeof wp_smushit_data ||\n (wp_smushit_data.unsmushed.length === 0 &&\n wp_smushit_data.resmush.length === 0)\n ) {\n return false;\n }\n\n const bulkSmush = new Smush( $(this), true, 'nextgen' );\n\t\t\tSmushProcess.setOnCancelCallback( () => {\n\t\t\t\tbulkSmush.cancelAjax();\n\t\t\t}).update( 0, bulkSmush.ids.length ).show();\n\n jQuery('.wp-smush-all, .wp-smush-scan').prop('disabled', true);\n $('.wp-smush-notice.wp-smush-remaining').hide();\n\n\t\t\t// Run bulk Smush.\n\t\t\tbulkSmush.run();\n })\n .on('click', '.wp-smush-trigger-nextgen-bulk', function(e){\n e.preventDefault();\n const bulkSmushButton = $('.wp-smush-nextgen-bulk');\n if ( bulkSmushButton.length ) {\n bulkSmushButton.trigger('click');\n SUI.closeNotice( 'wp-smush-ajax-notice' );\n }\n });\n\n });\n}(window.jQuery));","/* global ajaxurl */\n/* global wp_smush_msgs */\n\n( function( $ ) {\n\t'use strict';\n\n\tconst s3alert = $( '#wp-smush-s3support-alert' );\n\n\t/**\n\t * S3 support alert.\n\t *\n\t * @since 3.6.2 Moved from class-s3.php\n\t */\n\tif ( s3alert.length ) {\n\t\tconst noticeOptions = {\n\t\t\ttype: 'warning',\n\t\t\ticon: 'info',\n\t\t\tdismiss: {\n\t\t\t\tshow: true,\n\t\t\t\tlabel: wp_smush_msgs.noticeDismiss,\n\t\t\t\ttooltip: wp_smush_msgs.noticeDismissTooltip,\n\t\t\t},\n\t\t};\n\n\t\twindow.SUI.openNotice(\n\t\t\t'wp-smush-s3support-alert',\n\t\t\ts3alert.data( 'message' ),\n\t\t\tnoticeOptions\n\t\t);\n\t}\n\n\t// Dismiss S3 support alert.\n\ts3alert.on( 'click', 'button', () => {\n\t\t$.post( ajaxurl,\n\t\t\t{\n\t\t\t\taction: 'dismiss_s3support_alert',\n\t\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce,\n\t\t\t}\n\t\t);\n\t} );\n\n\t// Remove API message.\n\t$( '#wp-smush-api-message button.sui-button-icon' ).on( 'click', function( e ) {\n\t\te.preventDefault();\n\t\tconst notice = $( '#wp-smush-api-message' );\n\t\tnotice.slideUp( 'slow', function() {\n\t\t\tnotice.remove();\n\t\t} );\n\t\t$.post( ajaxurl,\n\t\t\t{\n\t\t\t\taction: 'hide_api_message',\n\t\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce,\n\t\t\t}\n\t\t);\n\t} );\n\n\t// Hide the notice after a CTA button was clicked\n\tfunction removeNotice( e ) {\n\t\tconst $notice = $( e.currentTarget ).closest( '.smush-notice' );\n\t\t$notice.fadeTo( 100, 0, () =>\n\t\t\t$notice.slideUp( 100, () => $notice.remove() )\n\t\t);\n\t}\n\n\t// Only used for the Dashboard notification for now.\n\t$( '.smush-notice .smush-notice-act' ).on( 'click', ( e ) => {\n\t\tremoveNotice( e );\n\t} );\n\n\t// Dismiss the update notice.\n\t$( '.wp-smush-update-info' ).on( 'click', '.notice-dismiss', ( e ) => {\n\t\te.preventDefault();\n\t\tremoveNotice( e );\n\t\t$.post( ajaxurl,\n\t\t\t{\n\t\t\t\taction: 'dismiss_update_info',\n\t\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce,\n\t\t\t}\n\t\t);\n\t} );\n}( jQuery ) );\n","/* global WP_Smush */\n/* global ajaxurl */\n\n/**\n * Modals JavaScript code.\n */\n( function() {\n\t'use strict';\n\n\t/**\n\t * Onboarding modal.\n\t *\n\t * @since 3.1\n\t */\n\tWP_Smush.onboarding = {\n\t\tmembership: 'free', // Assume free by default.\n\t\tonboardingModal: document.getElementById( 'smush-onboarding-dialog' ),\n\t\tfirst_slide: 'usage',\n\t\tsettings: {\n\t\t\tfirst: true,\n\t\t\tlast: false,\n\t\t\tslide: 'usage',\n\t\t\tvalue: false,\n\t\t},\n\t\tselection: {\n\t\t\tusage: false,\n\t\t\tauto: true,\n\t\t\tlossy: true,\n\t\t\tstrip_exif: true,\n\t\t\toriginal: false,\n\t\t\tlazy_load: true,\n\t\t},\n\t\tcontentContainer: document.getElementById( 'smush-onboarding-content' ),\n\t\tonboardingSlides: [\n\t\t\t'usage',\n\t\t\t'auto',\n\t\t\t'lossy',\n\t\t\t'strip_exif',\n\t\t\t'original',\n\t\t\t'lazy_load',\n\t\t],\n\t\ttouchX: null,\n\t\ttouchY: null,\n\t\trecheckImagesLink: '',\n\t\t/**\n\t\t * Init module.\n\t\t */\n\t\tinit() {\n\t\t\tif ( ! this.onboardingModal ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst dialog = document.getElementById( 'smush-onboarding' );\n\n\t\t\tthis.membership = dialog.dataset.type;\n\t\t\tthis.recheckImagesLink = dialog.dataset.ctaUrl;\n\n\t\t\tif ( 'pro' !== this.membership ) {\n\t\t\t\tthis.onboardingSlides = [\n\t\t\t\t\t'usage',\n\t\t\t\t\t'auto',\n\t\t\t\t\t'lossy',\n\t\t\t\t\t'strip_exif',\n\t\t\t\t\t'lazy_load',\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tif ( 'false' === dialog.dataset.tracking ) {\n\t\t\t\tthis.onboardingSlides.pop();\n\t\t\t}\n\n\t\t\tthis.renderTemplate();\n\n\t\t\t// Skip setup.\n\t\t\tconst skipButton = this.onboardingModal.querySelector(\n\t\t\t\t'.smush-onboarding-skip-link'\n\t\t\t);\n\t\t\tif ( skipButton ) {\n\t\t\t\tskipButton.addEventListener( 'click', this.skipSetup.bind( this ) );\n\t\t\t}\n\n\t\t\t// Show the modal.\n\t\t\twindow.SUI.openModal(\n\t\t\t\t'smush-onboarding-dialog',\n\t\t\t\t'wpcontent',\n\t\t\t\tundefined,\n\t\t\t\tfalse\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Get swipe coordinates.\n\t\t *\n\t\t * @param {Object} e\n\t\t */\n\t\thandleTouchStart( e ) {\n\t\t\tconst firstTouch = e.touches[ 0 ];\n\t\t\tthis.touchX = firstTouch.clientX;\n\t\t\tthis.touchY = firstTouch.clientY;\n\t\t},\n\n\t\t/**\n\t\t * Process swipe left/right.\n\t\t *\n\t\t * @param {Object} e\n\t\t */\n\t\thandleTouchMove( e ) {\n\t\t\tif ( ! this.touchX || ! this.touchY ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst xUp = e.touches[ 0 ].clientX,\n\t\t\t\tyUp = e.touches[ 0 ].clientY,\n\t\t\t\txDiff = this.touchX - xUp,\n\t\t\t\tyDiff = this.touchY - yUp;\n\n\t\t\tif ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {\n\t\t\t\tif ( xDiff > 0 ) {\n\t\t\t\t\tif ( false === WP_Smush.onboarding.settings.last ) {\n\t\t\t\t\t\tWP_Smush.onboarding.next( null, 'next' );\n\t\t\t\t\t}\n\t\t\t\t} else if ( false === WP_Smush.onboarding.settings.first ) {\n\t\t\t\t\tWP_Smush.onboarding.next( null, 'prev' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.touchX = null;\n\t\t\tthis.touchY = null;\n\t\t},\n\n\t\t/**\n\t\t * Update the template, register new listeners.\n\t\t *\n\t\t * @param {string} directionClass Accepts: fadeInRight, fadeInLeft, none.\n\t\t */\n\t\trenderTemplate( directionClass = 'none' ) {\n\t\t\t// Grab the selected value.\n\t\t\tconst input = this.onboardingModal.querySelector(\n\t\t\t\t'input[type=\"checkbox\"]'\n\t\t\t);\n\t\t\tif ( input ) {\n\t\t\t\tthis.selection[ input.id ] = input.checked;\n\t\t\t}\n\n\t\t\tconst template = WP_Smush.onboarding.template( 'smush-onboarding' );\n\t\t\tconst content = template( this.settings );\n\n\t\t\tif ( content ) {\n\t\t\t\tthis.contentContainer.innerHTML = content;\n\n\t\t\t\tif ( 'none' === directionClass ) {\n\t\t\t\t\tthis.contentContainer.classList.add( 'loaded' );\n\t\t\t\t} else {\n\t\t\t\t\tthis.contentContainer.classList.remove( 'loaded' );\n\t\t\t\t\tthis.contentContainer.classList.add( directionClass );\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\tthis.contentContainer.classList.add( 'loaded' );\n\t\t\t\t\t\tthis.contentContainer.classList.remove(\n\t\t\t\t\t\t\tdirectionClass\n\t\t\t\t\t\t);\n\t\t\t\t\t}, 600 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.onboardingModal.addEventListener(\n\t\t\t\t'touchstart',\n\t\t\t\tthis.handleTouchStart,\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tthis.onboardingModal.addEventListener(\n\t\t\t\t'touchmove',\n\t\t\t\tthis.handleTouchMove,\n\t\t\t\tfalse\n\t\t\t);\n\n\t\t\tthis.bindSubmit();\n\t\t},\n\n\t\t/**\n\t\t * Catch \"Finish setup wizard\" button click.\n\t\t */\n\t\tbindSubmit() {\n\t\t\tconst submitButton = this.onboardingModal.querySelector(\n\t\t\t\t'button[type=\"submit\"]'\n\t\t\t);\n\t\t\tconst self = this;\n\n\t\t\tif ( submitButton ) {\n\t\t\t\tsubmitButton.addEventListener( 'click', function( e ) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t// Because we are not rendering the template, we need to update the last element value.\n\t\t\t\t\tconst input = self.onboardingModal.querySelector(\n\t\t\t\t\t\t'input[type=\"checkbox\"]'\n\t\t\t\t\t);\n\t\t\t\t\tif ( input ) {\n\t\t\t\t\t\tself.selection[ input.id ] = input.checked;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst _nonce = document.getElementById(\n\t\t\t\t\t\t'smush_quick_setup_nonce'\n\t\t\t\t\t);\n\n\t\t\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\t\t\txhr.open( 'POST', ajaxurl + '?action=smush_setup', true );\n\t\t\t\t\txhr.setRequestHeader(\n\t\t\t\t\t\t'Content-type',\n\t\t\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t\t\t);\n\t\t\t\t\txhr.onload = () => {\n\t\t\t\t\t\tif ( 200 === xhr.status ) {\n\t\t\t\t\t\t\tself.onFinishingSetup();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twindow.console.log(\n\t\t\t\t\t\t\t\t'Request failed. Returned status of ' +\n\t\t\t\t\t\t\t\t\txhr.status\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\txhr.send(\n\t\t\t\t\t\t'smush_settings=' +\n\t\t\t\t\t\t\tJSON.stringify( self.selection ) +\n\t\t\t\t\t\t\t'&_ajax_nonce=' +\n\t\t\t\t\t\t\t_nonce.value\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\n\t\tonFinishingSetup() {\n\t\t\tthis.onFinish();\n\t\t\tthis.startRecheckImages();\n\t\t},\n\n\t\tonFinish() {\n\t\t\twindow.SUI.closeModal();\n\t\t},\n\n\t\tstartRecheckImages() {\n\t\t\tif ( ! this.recheckImagesLink ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twindow.location.href = this.recheckImagesLink;\n\t\t},\n\n\t\t/**\n\t\t * Handle navigation.\n\t\t *\n\t\t * @param {Object} e\n\t\t * @param {null|string} whereTo\n\t\t */\n\t\tnext( e, whereTo = null ) {\n\t\t\tconst index = this.onboardingSlides.indexOf( this.settings.slide );\n\t\t\tlet newIndex = 0;\n\n\t\t\tif ( ! whereTo ) {\n\t\t\t\tnewIndex =\n\t\t\t\t\tnull !== e && e.classList.contains( 'next' )\n\t\t\t\t\t\t? index + 1\n\t\t\t\t\t\t: index - 1;\n\t\t\t} else {\n\t\t\t\tnewIndex = 'next' === whereTo ? index + 1 : index - 1;\n\t\t\t}\n\n\t\t\tconst directionClass =\n\t\t\t\tnull !== e && e.classList.contains( 'next' )\n\t\t\t\t\t? 'fadeInRight'\n\t\t\t\t\t: 'fadeInLeft';\n\n\t\t\tthis.settings = {\n\t\t\t\tfirst: 0 === newIndex,\n\t\t\t\tlast: newIndex + 1 === this.onboardingSlides.length, // length !== index\n\t\t\t\tslide: this.onboardingSlides[ newIndex ],\n\t\t\t\tvalue: this.selection[ this.onboardingSlides[ newIndex ] ],\n\t\t\t};\n\n\t\t\tthis.renderTemplate( directionClass );\n\t\t},\n\n\t\t/**\n\t\t * Handle circle navigation.\n\t\t *\n\t\t * @param {string} target\n\t\t */\n\t\tgoTo( target ) {\n\t\t\tconst newIndex = this.onboardingSlides.indexOf( target );\n\n\t\t\tthis.settings = {\n\t\t\t\tfirst: 0 === newIndex,\n\t\t\t\tlast: newIndex + 1 === this.onboardingSlides.length, // length !== index\n\t\t\t\tslide: target,\n\t\t\t\tvalue: this.selection[ target ],\n\t\t\t};\n\n\t\t\tthis.renderTemplate();\n\t\t},\n\n\t\t/**\n\t\t * Skip onboarding experience.\n\t\t */\n\t\tskipSetup() {\n\t\t\tconst _nonce = document.getElementById( 'smush_quick_setup_nonce' );\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open(\n\t\t\t\t'POST',\n\t\t\t\tajaxurl + '?action=skip_smush_setup&_ajax_nonce=' + _nonce.value\n\t\t\t);\n\t\t\txhr.onload = () => {\n\t\t\t\tif ( 200 === xhr.status ) {\n\t\t\t\t\tthis.onSkipSetup();\n\t\t\t\t} else {\n\t\t\t\t\twindow.console.log(\n\t\t\t\t\t\t'Request failed. Returned status of ' + xhr.status\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.send();\n\t\t},\n\n\t\tonSkipSetup() {\n\t\t\tthis.onFinish();\n\t\t},\n\n\t\t/**\n\t\t * Hide new features modal.\n\t\t * @since 3.7.0\n\t\t * @since 3.12.2 Add a new parameter redirectUrl\n\t\t */\n\t\thideUpgradeModal: ( e, button ) => {\n\t\t\te.preventDefault();\n\t\t\tbutton.classList.add( 'wp-smush-link-in-progress' );\n\t\t\tconst redirectUrl = button?.href;\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open( 'POST', ajaxurl + '?action=hide_new_features&_ajax_nonce=' + window.wp_smush_msgs.nonce );\n\t\t\txhr.onload = () => {\n\t\t\t\twindow.SUI.closeModal();\n\t\t\t\tbutton.classList.remove( 'wp-smush-link-in-progress' );\n\t\t\t\tif ( 200 === xhr.status ) {\n\t\t\t\t\tif ( redirectUrl ) {\n\t\t\t\t\t\twindow.location.href = redirectUrl;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\twindow.console.log(\n\t\t\t\t\t\t'Request failed. Returned status of ' + xhr.status\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.send();\n\t\t},\n\t};\n\n\t/**\n\t * Template function (underscores based).\n\t *\n\t * @type {Function}\n\t */\n\tWP_Smush.onboarding.template = _.memoize( ( id ) => {\n\t\tlet compiled;\n\t\tconst options = {\n\t\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\t\tescape: /{{([^}]+?)}}(?!})/g,\n\t\t\tvariable: 'data',\n\t\t};\n\n\t\treturn ( data ) => {\n\t\t\t_.templateSettings = options;\n\t\t\tcompiled =\n\t\t\t\tcompiled ||\n\t\t\t\t_.template( document.getElementById( id ).innerHTML );\n\t\t\tdata.first_slide = WP_Smush.onboarding.first_slide;\n\t\t\treturn compiled( data );\n\t\t};\n\t} );\n\n\twindow.addEventListener( 'load', () => WP_Smush.onboarding.init() );\n}() );\n","/* global WP_Smush */\n/* global ajaxurl */\n\n/**\n * CDN functionality.\n *\n * @since 3.0\n */\n( function() {\n\t'use strict';\n\n\tWP_Smush.CDN = {\n\t\tcdnEnableButton: document.getElementById( 'smush-enable-cdn' ),\n\t\tcdnDisableButton: document.getElementById( 'smush-cancel-cdn' ),\n\t\tcdnStatsBox: document.querySelector( '.smush-cdn-stats' ),\n\n\t\tinit() {\n\t\t\t/**\n\t\t\t * Handle \"Get Started\" button click on disabled CDN page.\n\t\t\t */\n\t\t\tif ( this.cdnEnableButton ) {\n\t\t\t\tthis.cdnEnableButton.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.currentTarget.classList.add( 'sui-button-onload' );\n\t\t\t\t\tthis.toggle_cdn( true );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle \"Deactivate' button click on CDN page.\n\t\t\t */\n\t\t\tif ( this.cdnDisableButton ) {\n\t\t\t\tthis.cdnDisableButton.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.currentTarget.classList.add( 'sui-button-onload' );\n\n\t\t\t\t\tthis.toggle_cdn( false );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis.updateStatsBox();\n\t\t},\n\n\t\t/**\n\t\t * Toggle CDN.\n\t\t *\n\t\t * @since 3.0\n\t\t *\n\t\t * @param {boolean} enable\n\t\t */\n\t\ttoggle_cdn( enable ) {\n\t\t\tconst nonceField = document.getElementsByName(\n\t\t\t\t'wp_smush_options_nonce'\n\t\t\t);\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open( 'POST', ajaxurl + '?action=smush_toggle_cdn', true );\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\t\t\txhr.onload = () => {\n\t\t\t\tif ( 200 === xhr.status ) {\n\t\t\t\t\tconst res = JSON.parse( xhr.response );\n\t\t\t\t\tif ( 'undefined' !== typeof res.success && res.success ) {\n\t\t\t\t\t\twindow.location.search = 'page=smush-cdn';\n\t\t\t\t\t} else if ( 'undefined' !== typeof res.data.message ) {\n\t\t\t\t\t\tWP_Smush.helpers.showErrorNotice( res.data.message );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tWP_Smush.helpers.showErrorNotice( 'Request failed. Returned status of ' + xhr.status );\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.send(\n\t\t\t\t'param=' + enable + '&_ajax_nonce=' + nonceField[ 0 ].value\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Update the CDN stats box in summary meta box. Only fetch new data when on CDN page.\n\t\t *\n\t\t * @since 3.0\n\t\t */\n\t\tupdateStatsBox() {\n\t\t\tif (\n\t\t\t\t'undefined' === typeof this.cdnStatsBox ||\n\t\t\t\t! this.cdnStatsBox\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only fetch the new stats, when user is on CDN page.\n\t\t\tif ( ! window.location.search.includes( 'page=smush-cdn' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.toggleElements();\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open( 'POST', ajaxurl + '?action=get_cdn_stats', true );\n\t\t\txhr.onload = () => {\n\t\t\t\tif ( 200 === xhr.status ) {\n\t\t\t\t\tconst res = JSON.parse( xhr.response );\n\t\t\t\t\tif ( 'undefined' !== typeof res.success && res.success ) {\n\t\t\t\t\t\tthis.toggleElements();\n\t\t\t\t\t} else if ( 'undefined' !== typeof res.data.message ) {\n\t\t\t\t\t\tWP_Smush.helpers.showErrorNotice( res.data.message );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tWP_Smush.helpers.showErrorNotice( 'Request failed. Returned status of ' + xhr.status );\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.send();\n\t\t},\n\n\t\t/**\n\t\t * Show/hide elements during status update in the updateStatsBox()\n\t\t *\n\t\t * @since 3.1 Moved out from updateStatsBox()\n\t\t */\n\t\ttoggleElements() {\n\t\t\tconst spinner = this.cdnStatsBox.querySelector(\n\t\t\t\t'.sui-icon-loader'\n\t\t\t);\n\t\t\tconst elements = this.cdnStatsBox.querySelectorAll(\n\t\t\t\t'.wp-smush-stats > :not(.sui-icon-loader)'\n\t\t\t);\n\n\t\t\tfor ( let i = 0; i < elements.length; i++ ) {\n\t\t\t\telements[ i ].classList.toggle( 'sui-hidden' );\n\t\t\t}\n\n\t\t\tspinner.classList.toggle( 'sui-hidden' );\n\t\t},\n\t};\n\n\tWP_Smush.CDN.init();\n} )();\n","/* global WP_Smush */\n/* global ajaxurl */\n\n/**\n * Lazy loading functionality.\n *\n * @since 3.0\n */\n( function() {\n\t'use strict';\n\n\tWP_Smush.Lazyload = {\n\t\tlazyloadEnableButton: document.getElementById(\n\t\t\t'smush-enable-lazyload'\n\t\t),\n\t\tlazyloadDisableButton: document.getElementById(\n\t\t\t'smush-cancel-lazyload'\n\t\t),\n\n\t\tinit() {\n\t\t\tconst self = this;\n\n\t\t\t/**\n\t\t\t * Handle \"Activate\" button click on disabled Lazy load page.\n\t\t\t */\n\t\t\tif ( this.lazyloadEnableButton ) {\n\t\t\t\tthis.lazyloadEnableButton.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.currentTarget.classList.add( 'sui-button-onload' );\n\n\t\t\t\t\tthis.toggle_lazy_load( true );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle \"Deactivate' button click on Lazy load page.\n\t\t\t */\n\t\t\tif ( this.lazyloadDisableButton ) {\n\t\t\t\tthis.lazyloadDisableButton.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.currentTarget.classList.add( 'sui-button-onload' );\n\n\t\t\t\t\tthis.toggle_lazy_load( false );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle \"Remove icon\" button click on Lazy load page.\n\t\t\t *\n\t\t\t * This removes the image from the upload placeholder.\n\t\t\t *\n\t\t\t * @since 3.2.2\n\t\t\t */\n\t\t\tconst removeSpinner = document.getElementById(\n\t\t\t\t'smush-remove-spinner'\n\t\t\t);\n\t\t\tif ( removeSpinner ) {\n\t\t\t\tremoveSpinner.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.removeLoaderIcon();\n\t\t\t\t} );\n\t\t\t}\n\t\t\tconst removePlaceholder = document.getElementById(\n\t\t\t\t'smush-remove-placeholder'\n\t\t\t);\n\t\t\tif ( removePlaceholder ) {\n\t\t\t\tremovePlaceholder.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.removeLoaderIcon( 'placeholder' );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle \"Remove\" icon click.\n\t\t\t *\n\t\t\t * This removes the select icon from the list (not same as above functions).\n\t\t\t *\n\t\t\t * @since 3.2.2\n\t\t\t */\n\t\t\tconst items = document.querySelectorAll( '.smush-ll-remove' );\n\t\t\tif ( items && 0 < items.length ) {\n\t\t\t\titems.forEach( function( el ) {\n\t\t\t\t\tel.addEventListener( 'click', ( e ) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\te.target.closest( 'li' ).style.display = 'none';\n\t\t\t\t\t\tself.remove(\n\t\t\t\t\t\t\te.target.dataset.id,\n\t\t\t\t\t\t\te.target.dataset.type\n\t\t\t\t\t\t);\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis.handlePredefinedPlaceholders();\n\t\t},\n\n\t\t/**\n\t\t * Handle background color changes for the two predefined placeholders.\n\t\t *\n\t\t * @since 3.7.1\n\t\t */\n\t\thandlePredefinedPlaceholders() {\n\t\t\tconst pl1 = document.getElementById( 'placeholder-icon-1' );\n\t\t\tif ( pl1 ) {\n\t\t\t\tpl1.addEventListener( 'click', () => this.changeColor( '#F3F3F3' ) );\n\t\t\t}\n\n\t\t\tconst pl2 = document.getElementById( 'placeholder-icon-2' );\n\t\t\tif ( pl2 ) {\n\t\t\t\tpl2.addEventListener( 'click', () => this.changeColor( '#333333' ) );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Set color.\n\t\t *\n\t\t * @since 3.7.1\n\t\t * @param {string} color\n\t\t */\n\t\tchangeColor( color ) {\n\t\t\tdocument.getElementById( 'smush-color-picker' ).value = color;\n\t\t\tdocument.querySelector( '.sui-colorpicker-hex .sui-colorpicker-value > span > span' ).style.backgroundColor = color;\n\t\t\tdocument.querySelector( '.sui-colorpicker-hex .sui-colorpicker-value > input' ).value = color;\n\t\t},\n\n\t\t/**\n\t\t * Toggle lazy loading.\n\t\t *\n\t\t * @since 3.2.0\n\t\t *\n\t\t * @param {string} enable\n\t\t */\n\t\ttoggle_lazy_load( enable ) {\n\t\t\tconst nonceField = document.getElementsByName(\n\t\t\t\t'wp_smush_options_nonce'\n\t\t\t);\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open(\n\t\t\t\t'POST',\n\t\t\t\tajaxurl + '?action=smush_toggle_lazy_load',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\t\t\txhr.onload = () => {\n\t\t\t\tif ( 200 === xhr.status ) {\n\t\t\t\t\tconst res = JSON.parse( xhr.response );\n\t\t\t\t\tif ( 'undefined' !== typeof res.success && res.success ) {\n\t\t\t\t\t\twindow.location.search = 'page=smush-lazy-load';\n\t\t\t\t\t} else if ( 'undefined' !== typeof res.data.message ) {\n\t\t\t\t\t\tWP_Smush.helpers.showErrorNotice( res.data.message );\n\t\t\t\t\t\tdocument.querySelector( '.sui-button-onload' ).classList.remove( 'sui-button-onload' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tWP_Smush.helpers.showErrorNotice( 'Request failed. Returned status of ' + xhr.status );\n\t\t\t\t\tdocument.querySelector( '.sui-button-onload' ).classList.remove( 'sui-button-onload' );\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.send(\n\t\t\t\t'param=' + enable + '&_ajax_nonce=' + nonceField[ 0 ].value\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Add lazy load spinner icon.\n\t\t *\n\t\t * @since 3.2.2\n\t\t * @param {string} type Accepts: spinner, placeholder.\n\t\t */\n\t\taddLoaderIcon( type = 'spinner' ) {\n\t\t\tlet frame;\n\n\t\t\t// If the media frame already exists, reopen it.\n\t\t\tif ( frame ) {\n\t\t\t\tframe.open();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Create a new media frame\n\t\t\tframe = wp.media( {\n\t\t\t\ttitle: 'Select or upload an icon',\n\t\t\t\tbutton: {\n\t\t\t\t\ttext: 'Select icon',\n\t\t\t\t},\n\t\t\t\tmultiple: false, // Set to true to allow multiple files to be selected\n\t\t\t} );\n\n\t\t\t// When an image is selected in the media frame...\n\t\t\tframe.on( 'select', function() {\n\t\t\t\t// Get media attachment details from the frame state\n\t\t\t\tconst attachment = frame\n\t\t\t\t\t.state()\n\t\t\t\t\t.get( 'selection' )\n\t\t\t\t\t.first()\n\t\t\t\t\t.toJSON();\n\n\t\t\t\t// Send the attachment URL to our custom image input field.\n\t\t\t\tconst imageIcon = document.getElementById(\n\t\t\t\t\t'smush-' + type + '-icon-preview'\n\t\t\t\t);\n\t\t\t\timageIcon.style.backgroundImage =\n\t\t\t\t\t'url(\"' + attachment.url + '\")';\n\t\t\t\timageIcon.style.display = 'block';\n\n\t\t\t\t// Send the attachment id to our hidden input\n\t\t\t\tdocument\n\t\t\t\t\t.getElementById( 'smush-' + type + '-icon-file' )\n\t\t\t\t\t.setAttribute( 'value', attachment.id );\n\n\t\t\t\t// Hide the add image link\n\t\t\t\tdocument.getElementById(\n\t\t\t\t\t'smush-upload-' + type\n\t\t\t\t).style.display = 'none';\n\n\t\t\t\t// Unhide the remove image link\n\t\t\t\tconst removeDiv = document.getElementById(\n\t\t\t\t\t'smush-remove-' + type\n\t\t\t\t);\n\t\t\t\tremoveDiv.querySelector( 'span' ).innerHTML =\n\t\t\t\t\tattachment.filename;\n\t\t\t\tremoveDiv.style.display = 'block';\n\t\t\t} );\n\n\t\t\t// Finally, open the modal on click\n\t\t\tframe.open();\n\t\t},\n\n\t\t/**\n\t\t * Remove lazy load spinner icon.\n\t\t *\n\t\t * @since 3.2.2\n\t\t * @param {string} type Accepts: spinner, placeholder.\n\t\t */\n\t\tremoveLoaderIcon: ( type = 'spinner' ) => {\n\t\t\t// Clear out the preview image\n\t\t\tconst imageIcon = document.getElementById(\n\t\t\t\t'smush-' + type + '-icon-preview'\n\t\t\t);\n\t\t\timageIcon.style.backgroundImage = '';\n\t\t\timageIcon.style.display = 'none';\n\n\t\t\t// Un-hide the add image link\n\t\t\tdocument.getElementById( 'smush-upload-' + type ).style.display =\n\t\t\t\t'block';\n\n\t\t\t// Hide the delete image link\n\t\t\tdocument.getElementById( 'smush-remove-' + type ).style.display =\n\t\t\t\t'none';\n\n\t\t\t// Delete the image id from the hidden input\n\t\t\tdocument\n\t\t\t\t.getElementById( 'smush-' + type + '-icon-file' )\n\t\t\t\t.setAttribute( 'value', '' );\n\t\t},\n\n\t\t/**\n\t\t * Remove item.\n\t\t *\n\t\t * @param {number} id Image ID.\n\t\t * @param {string} type Accepts: spinner, placeholder.\n\t\t */\n\t\tremove: ( id, type = 'spinner' ) => {\n\t\t\tconst nonceField = document.getElementsByName(\n\t\t\t\t'wp_smush_options_nonce'\n\t\t\t);\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open( 'POST', ajaxurl + '?action=smush_remove_icon', true );\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\t\t\txhr.send(\n\t\t\t\t'id=' +\n\t\t\t\t\tid +\n\t\t\t\t\t'&type=' +\n\t\t\t\t\ttype +\n\t\t\t\t\t'&_ajax_nonce=' +\n\t\t\t\t\tnonceField[ 0 ].value\n\t\t\t);\n\t\t},\n\t};\n\n\tWP_Smush.Lazyload.init();\n} )();\n","import MixPanel from \"../mixpanel\";\n\nclass ProductAnalytics {\n init() {\n this.trackUltraLinks();\n }\n\n trackUltraLinks() {\n\t\tconst ultraUpsellLinks = document.querySelectorAll( '.wp-smush-upsell-ultra-compression' );\n\t\tif ( ! ultraUpsellLinks ) {\n\t\t\treturn;\n\t\t}\n\t\tconst getLocation = ( ultraLink ) => {\n\t\t\tconst locations = {\n\t\t\t\t'settings': 'bulksmush_settings',\n\t\t\t\t'dashboard': 'dash_summary',\n\t\t\t\t'bulk': 'bulksmush_summary',\n\t\t\t\t'directory': 'directory_summary',\n\t\t\t\t'lazy-load': 'lazy_summary',\n\t\t\t\t'cdn': 'cdn_summary',\n\t\t\t\t'webp': 'webp_summary',\n\t\t\t};\n\t\t\tconst locationId = ultraLink.classList.contains( 'wp-smush-ultra-compression-link' ) ? 'settings' : this.getCurrentPageSlug();\n\t\t\treturn locations[locationId] || 'bulksmush_settings';\n\t\t}\n\n\t\tultraUpsellLinks.forEach( ( ultraLink ) => {\n\t\t\tconst eventName = 'ultra_upsell_modal';\n\t\t\tultraLink.addEventListener( 'click', (e) => {\n\t\t\t\tMixPanel.getInstance().track( eventName, {\n\t\t\t\t\t'Location': getLocation( e.target ),\n\t\t\t\t\t'Modal Action': 'direct_cta',\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n getCurrentPageSlug(){\n\t\tconst searchParams = new URLSearchParams(document.location.search);\n\t\tconst pageSlug = searchParams.get(\"page\");\n return 'smush' === pageSlug ? 'dashboard' : pageSlug.replace( 'smush-', '' );\n\t}\n}\n\n( new ProductAnalytics() ).init();","/* global ajaxurl */\n/* global wp_smush_msgs */\n/* global WP_Smush */\n/* global SUI */\n\n( function( $ ) {\n\t'use strict';\n\n\t/**\n\t * Bulk compress page.\n\t */\n\t$( 'form#smush-bulk-form' ).on( 'submit', function( e ) {\n\t\te.preventDefault();\n\t\t$( '#save-settings-button' ).addClass( 'sui-button-onload' );\n\t\tsaveSettings( $( this ).serialize(), 'bulk' );\n\t\t// runReCheck();\n\t} );\n\n\t/**\n\t * Lazy load page.\n\t */\n\t$( 'form#smush-lazy-load-form' ).on( 'submit', function( e ) {\n\t\te.preventDefault();\n\t\t$( '#save-settings-button' ).addClass( 'sui-button-onload-text' );\n\t\tsaveSettings( $( this ).serialize(), 'lazy-load' );\n\t} );\n\n\t/**\n\t * CDN page.\n\t */\n\t$( 'form#smush-cdn-form' ).on( 'submit', function( e ) {\n\t\te.preventDefault();\n\t\t$( '#save-settings-button' ).addClass( 'sui-button-onload-text' );\n\t\tsaveSettings( $( this ).serialize(), 'cdn' );\n\t} );\n\n\t/**\n\t * Integrations page.\n\t */\n\t$( 'form#smush-integrations-form' ).on( 'submit', function( e ) {\n\t\te.preventDefault();\n\t\t$( '#save-settings-button' ).addClass( 'sui-button-onload-text' );\n\t\tsaveSettings( $( this ).serialize(), 'integrations' );\n\t} );\n\n\t/**\n\t * Settings page.\n\t */\n\t$( 'form#smush-settings-form' ).on( 'submit', function( e ) {\n\t\te.preventDefault();\n\t\t$( '#save-settings-button' ).addClass( 'sui-button-onload-text' );\n\t\tsaveSettings( $( this ).serialize(), 'settings' );\n\t} );\n\n\t/**\n\t * Save settings.\n\t *\n\t * @param {string} settings JSON string of settings.\n\t * @param {string} page Settings page.\n\t */\n\tfunction saveSettings( settings, page ) {\n\t\tconst xhr = new XMLHttpRequest();\n\n\t\txhr.open( 'POST', ajaxurl + '?action=smush_save_settings', true );\n\t\txhr.setRequestHeader(\n\t\t\t'Content-type',\n\t\t\t'application/x-www-form-urlencoded'\n\t\t);\n\n\t\txhr.onload = () => {\n\t\t\t$( '#save-settings-button' ).removeClass(\n\t\t\t\t'sui-button-onload-text sui-button-onload'\n\t\t\t);\n\n\t\t\tif ( 200 === xhr.status ) {\n\t\t\t\tconst res = JSON.parse( xhr.response );\n\t\t\t\tif ( 'undefined' !== typeof res.success && res.success ) {\n\t\t\t\t\tshowSuccessNotice( wp_smush_msgs.settingsUpdated );\n\t\t\t\t\ttriggerSavedSmushSettingsEvent( res.data );\n\t\t\t\t} else if ( res.data && res.data.message ) {\n\t\t\t\t\tWP_Smush.helpers.showErrorNotice( res.data.message );\n\t\t\t\t} else {\n\t\t\t\t\tWP_Smush.helpers.showErrorNotice( 'Request failed.' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWP_Smush.helpers.showErrorNotice( 'Request failed. Returned status of ' + xhr.status );\n\t\t\t}\n\t\t};\n\n\t\txhr.send( 'page=' + page + '&' + settings + '&_ajax_nonce=' + wp_smush_msgs.nonce );\n\t}\n\t\n\tfunction triggerSavedSmushSettingsEvent( status ) {\n\t\tdocument.dispatchEvent(\n\t\t\tnew CustomEvent( 'onSavedSmushSettings', {\n\t\t\t\tdetail: status\n\t\t\t} )\n\t\t);\n\t}\n\n\t/**\n\t * Show successful update notice.\n\t *\n\t * @param {string} msg Notice message.\n\t */\n\tfunction showSuccessNotice( msg ) {\n\t\tconst noticeMessage = `

${ msg }

`,\n\t\t\tnoticeOptions = {\n\t\t\t\ttype: 'success',\n\t\t\t\ticon: 'check',\n\t\t\t};\n\n\t\tSUI.openNotice( 'wp-smush-ajax-notice', noticeMessage, noticeOptions );\n\n\t\tconst loadingButton = document.querySelector( '.sui-button-onload' );\n\t\tif ( loadingButton ) {\n\t\t\tloadingButton.classList.remove( 'sui-button-onload' );\n\t\t}\n\t}\n\n\t/**\n\t * Re-check images from bulk smush and integrations pages.\n\t */\n\tfunction runReCheck() {\n\t\t$( '#save-settings-button' ).addClass( 'sui-button-onload' );\n\n\t\tconst param = {\n\t\t\taction: 'scan_for_resmush',\n\t\t\twp_smush_options_nonce: $( '#wp_smush_options_nonce' ).val(),\n\t\t\ttype: 'media',\n\t\t};\n\n\t\t// Send ajax, Update Settings, And Check For resmush.\n\t\t$.post( ajaxurl, $.param( param ) ).done( function() {\n\t\t\t$( '#save-settings-button' ).removeClass( 'sui-button-onload' );\n\t\t} );\n\t}\n\n\t/**\n\t * Parse remove data change.\n\t */\n\t$( 'input[name=keep_data]' ).on( 'change', function( e ) {\n\t\tconst otherClass =\n\t\t\t'keep_data-true' === e.target.id\n\t\t\t\t? 'keep_data-false'\n\t\t\t\t: 'keep_data-true';\n\t\te.target.parentNode.classList.add( 'active' );\n\t\tdocument\n\t\t\t.getElementById( otherClass )\n\t\t\t.parentNode.classList.remove( 'active' );\n\t} );\n\n\t/**\n\t * Handle auto-detect checkbox toggle, to show/hide highlighting notice.\n\t */\n\t$( 'input#detection' ).on( 'click', function() {\n\t\tconst noticeDiv = $( '.smush-highlighting-notice' );\n\t\tconst warningDiv = $( '.smush-highlighting-warning' );\n\n\t\t// Setting enabled.\n\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t// Highlighting is already active and setting not saved.\n\t\t\tif ( noticeDiv.length > 0 ) {\n\t\t\t\tnoticeDiv.show();\n\t\t\t} else {\n\t\t\t\twarningDiv.show();\n\t\t\t}\n\t\t} else {\n\t\t\tnoticeDiv.hide();\n\t\t\twarningDiv.hide();\n\t\t}\n\t} );\n}( jQuery ) );\n","/* global WP_Smush */\n/* global ajaxurl */\n/* global wp_smushit_data */\n\nimport {GlobalStats} from \"../common/globalStats\";\nimport SmushProgress from \"../common/progressbar\";\n\nlet perf = 0;\n\nimport MixPanel from \"../mixpanel\";\n\n/**\n * Smush class.\n *\n * @since 2.9.0 Moved from admin.js into a dedicated ES6 class.\n */\nclass Smush {\n\t/**\n\t * Class constructor.\n\t *\n\t * @param {Object} button Button object that made the call.\n\t * @param {boolean} bulk Bulk smush or not.\n\t * @param {string} type Accepts: 'nextgen', 'media'.\n\t */\n\tconstructor( button, bulk, type = 'media' ) {\n\t\tthis.onStart();\n\n\t\t//If smush attribute is not defined, Need not skip re-Smush IDs.\n\t\tthis.skip_resmush = ! (\n\t\t\t'undefined' === typeof button.data( 'smush' ) ||\n\t\t\t! button.data( 'smush' )\n\t\t);\n\t\tthis.button = jQuery( button[ 0 ] );\n\t\tthis.is_bulk = typeof bulk ? bulk : false;\n\t\tthis.url = ajaxurl;\n\t\tthis.log = jQuery( '.smush-final-log' );\n\n\t\tthis.setIds();\n\n\t\tthis.mixPanel = MixPanel.getInstance();\n\n\t\tthis.is_bulk_resmush =\n\t\t\t0 < wp_smushit_data.resmush.length && ! this.skip_resmush;\n\t\tthis.status = this.button.parent().prev( '.smush-status' );\n\n\t\t// Added for NextGen support.\n\t\tthis.smush_type = type;\n\t\tthis.single_ajax_suffix =\n\t\t\t'nextgen' === this.smush_type\n\t\t\t\t? 'smush_manual_nextgen'\n\t\t\t\t: 'wp_smushit_manual';\n\t\tthis.bulk_ajax_suffix =\n\t\t\t'nextgen' === this.smush_type\n\t\t\t\t? 'wp_smushit_nextgen_bulk'\n\t\t\t\t: 'wp_smushit_bulk';\n\t\tthis.get_stats_action = 'nextgen' === this.smush_type ? 'nextgen_get_stats' : 'get_stats';\n\t\tthis.url = this.is_bulk\n\t\t\t? Smush.smushAddParams( this.url, {\n\t\t\t\taction: this.bulk_ajax_suffix,\n\t\t\t} )\n\t\t\t: Smush.smushAddParams( this.url, {\n\t\t\t\taction: this.single_ajax_suffix,\n\t\t\t} );\n\n\t\tthis.start();\n\t\t( ! this.is_bulk ) && this.run();\n\t\tthis.bindDeferredEvents();\n\n\t\t// Handle cancel ajax.\n\t\t// this.cancelAjax();\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Add params to the URL.\n\t *\n\t * @param {string} url URL to add the params to.\n\t * @param {Object} data Object with params.\n\t * @return {string} URL with params.\n\t */\n\tstatic smushAddParams( url, data ) {\n\t\tif ( ! jQuery.isEmptyObject( data ) ) {\n\t\t\turl +=\n\t\t\t\t( url.indexOf( '?' ) >= 0 ? '&' : '?' ) + jQuery.param( data );\n\t\t}\n\n\t\treturn url;\n\t}\n\n\t/**\n\t * Check membership validity.\n\t *\n\t * @param {Object} data\n\t * @param {number} data.show_warning\n\t */\n\tstatic membershipValidity( data ) {\n\t\tconst memberValidityNotice = jQuery( '#wp-smush-invalid-member' );\n\n\t\t// Check for membership warning.\n\t\tif (\n\t\t\t'undefined' !== typeof data &&\n\t\t\t'undefined' !== typeof data.show_warning &&\n\t\t\tmemberValidityNotice.length > 0\n\t\t) {\n\t\t\tif ( data.show_warning ) {\n\t\t\t\tmemberValidityNotice.show();\n\t\t\t} else {\n\t\t\t\tmemberValidityNotice.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Send Ajax request for compressing the image.\n\t *\n\t * @param {boolean} isBulkResmush\n\t * @param {number} id\n\t * @param {string} sendUrl\n\t * @param {string} nonce\n\t * @param {boolean} newBulkSmushStarted\n\t * @return {*|jQuery.promise|void} Compression results.\n\t */\n\tstatic ajax( isBulkResmush, id, sendUrl, nonce, newBulkSmushStarted= false ) {\n\t\tconst param = jQuery.param( {\n\t\t\tis_bulk_resmush: isBulkResmush,\n\t\t\tattachment_id: id,\n\t\t\t_nonce: nonce,\n\t\t\tnew_bulk_smush_started: newBulkSmushStarted\n\t\t} );\n\n\t\treturn jQuery.ajax( {\n\t\t\ttype: 'GET',\n\t\t\tdata: param,\n\t\t\turl: sendUrl,\n\t\t\t/** @param {Array} wp_smushit_data */\n\t\t\ttimeout: wp_smushit_data.timeout,\n\t\t\tdataType: 'json',\n\t\t} );\n\t}\n\n\t/**\n\t * Sets this.ids.\n\t */\n\tsetIds() {\n\t\tlet ids = [];\n\t\tif ( 0 < wp_smushit_data.resmush.length && ! this.skip_resmush ) {\n\t\t\tif ( 0 < wp_smushit_data.unsmushed.length ) {\n\t\t\t\tids = wp_smushit_data.resmush.concat( wp_smushit_data.unsmushed );\n\t\t\t} else {\n\t\t\t\tids = wp_smushit_data.resmush;\n\t\t\t}\n\t\t} else {\n\t\t\tids = wp_smushit_data.unsmushed;\n\t\t}\n\n\t\tif ( 'object' === typeof ids ) {\n\t\t\t// If button has re-Smush class, and we do have ids that needs to re-Smushed, put them in the list.\n\t\t\tthis.ids = ids.filter( function( itm, i, a ) {\n\t\t\t\treturn i === a.indexOf( itm );\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.ids = ids;\n\t\t}\n\t}\n\n\t/**\n\t * Show loader in button for single and bulk Smush.\n\t */\n\tstart() {\n\t\tthis.button.prop( 'disabled', true );\n\t\tthis.button.addClass( 'wp-smush-started' );\n\n\t\tthis.bulkStart();\n\t\tthis.singleStart();\n\t}\n\n\t/**\n\t * Start bulk Smush.\n\t */\n\tbulkStart() {\n\t\tif ( ! this.is_bulk ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Hide the bulk div.\n\t\tjQuery( '.wp-smush-bulk-wrapper' ).addClass( 'sui-hidden' );\n\n\t\t// Hide the bulk limit message.\n\t\tjQuery(\n\t\t\t'.wp-smush-bulk-progress-bar-wrapper .sui-notice-warning:first-of-type'\n\t\t).hide();\n\n\t\t// Hide parent wrapper, if there are no other messages.\n\t\tif (\n\t\t\t0 >= jQuery( 'div.smush-final-log .smush-bulk-error-row' ).length\n\t\t) {\n\t\t\tjQuery( 'div.smush-final-log' ).addClass('sui-hidden');\n\t\t}\n\n\t\t// Show the progress bar.\n\t\tjQuery(\n\t\t\t'.bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper, #wp-smush-running-notice'\n\t\t).removeClass( 'sui-hidden' );\n\t}\n\n\t/**\n\t * Start single image Smush.\n\t */\n\tsingleStart() {\n\t\tif ( this.is_bulk ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.button.html(\n\t\t\t'' +\n\t\t\t\twindow.wp_smush_msgs.smushing +\n\t\t\t\t''\n\t\t);\n\t\tthis.status.removeClass( 'error' );\n\t}\n\n\t/**\n\t * Enable button.\n\t */\n\tenableButton() {\n\t\tthis.button.prop( 'disabled', false );\n\t\tjQuery('.wp-smush-all').prop('disabled', false);\n\t\tjQuery('.wp-smush-restore').prop('disabled', false);\n\t\t// For bulk process, enable other buttons.\n\t\tjQuery(\n\t\t\t'a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#save-settings-button'\n\t\t).prop('disabled', false);\n\t}\n\n\t/**\n\t * Finish single image Smush.\n\t */\n\tsingleDone() {\n\t\tif ( this.is_bulk ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst self = this;\n\n\t\tthis.request\n\t\t\t.done( function( response ) {\n\t\t\t\tif ( 'undefined' !== typeof response.data ) {\n\t\t\t\t\t// Check if stats div exists.\n\t\t\t\t\tconst parent = self.status.parent();\n\n\t\t\t\t\t// Check whether to show membership validity notice or not.\n\t\t\t\t\tSmush.membershipValidity( response.data );\n\n\t\t\t\t\tif ( ! response.success ) {\n\t\t\t\t\t\tif ( response.data.html_stats ) {\n\t\t\t\t\t\t\tparent.html( response.data.html_stats );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself.status.addClass( 'smush-warning' );\n\t\t\t\t\t\t\t/** @param {string} response.data.error_msg */\n\t\t\t\t\t\t\tself.status.html( response.data.error_msg );\n\t\t\t\t\t\t\tself.button.html(\n\t\t\t\t\t\t\t\twindow.smush_vars.strings.stats_label\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If we've updated status, replace the content.\n\t\t\t\t\t\tparent.html( response.data );\n\t\t\t\t\t\tself.button.html( window.wp_smush_msgs.all_done );\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Update image size in attachment info panel.\n\t\t\t\t\t *\n\t\t\t\t\t * @param {string|number} response.data.new_size\n\t\t\t\t\t */\n\t\t\t\t\tSmush.updateImageStats( response.data.new_size );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.fail( function( response ) {\n\t\t\t\tself.status.html( response.data );\n\t\t\t\tself.status.addClass( 'smush-warning' );\n\t\t\t\tself.enableButton();\n\t\t\t} );\n\t}\n\n\t/**\n\t * Get total images left to optimize.\n\t *\n\t * @see get_total_images_to_smush() in Abstract_Summary_Page class.\n\t *\n\t * @since 3.10.0\n\t */\n\tstatic getTotalImagesToSmush() {\n\t\tconst imagesToResmush = wp_smushit_data.resmush.length;\n\n\t\tconst unsmushedCount = wp_smushit_data.count_total - wp_smushit_data.count_smushed;\n\n\t\tif ( unsmushedCount > 0 ) {\n\t\t\treturn imagesToResmush + unsmushedCount;\n\t\t}\n\n\t\treturn imagesToResmush;\n\t}\n\n\t/**\n\t * Update the \"optimized images\" score on the summary meta box.\n\t *\n\t * @see get_grade_data() in Abstract_Summary_Page class.\n\t *\n\t * @since 3.10.0\n\t */\n\tstatic updateScoreProgress() {\n\t\tlet grade = 'sui-grade-dismissed';\n\t\tlet percentOptimized = 0;\n\t\tlet percentMetric = 0;\n\n\t\tconst totalImagesToSmush = Smush.getTotalImagesToSmush();\n\t\tconst totalImages = parseInt( wp_smushit_data.count_total );\n\n\t\tif ( totalImages === totalImagesToSmush ) {\n\t\t\tif ( totalImages > 0 ) {\n\t\t\t\tgrade = 'sui-grade-f';\n\t\t\t}\n\t\t\tpercentMetric = 100;\n\t\t} else if ( 0 < totalImages ) {\n\t\t\tpercentOptimized = Math.floor( ( totalImages - totalImagesToSmush ) * 100 / totalImages );\n\t\t\tpercentMetric = percentOptimized;\n\t\t\tgrade = 'sui-grade-f';\n\n\t\t\tif ( percentOptimized >= 60 && percentOptimized < 90 ) {\n\t\t\t\tgrade = 'sui-grade-c';\n\t\t\t} else if ( percentOptimized >= 90 ) {\n\t\t\t\tgrade = 'sui-grade-a';\n\t\t\t}\n\t\t}\n\n\t\tconst imageScore = jQuery( '#smush-image-score' );\n\n\t\timageScore\n\t\t\t.removeClass(\n\t\t\t\tfunction( index, className ) {\n\t\t\t\t\tconst matchedClasses = className.match( /(^|\\s)sui-grade-\\S+/g );\n\t\t\t\t\treturn ( matchedClasses || [] ).join( ' ' );\n\t\t\t\t}\n\t\t\t)\n\t\t\t.addClass( grade )\n\t\t\t.attr( 'data-score', percentOptimized )\n\t\t\t.find( '.sui-circle-score-label' ).html( percentOptimized );\n\n\t\timageScore\n\t\t\t.find( 'circle:last-child' )\n\t\t\t.attr( 'style', '--metric-array:' + ( 2.63893782902 * percentMetric ) + ' ' + ( 263.893782902 - percentMetric ) );\n\t}\n\n\t/**\n\t * Update all stats sections based on the response.\n\t *\n\t * @param {string} scanType Current scan type.\n\t */\n\tstatic updateStats( scanType ) {\n\t\tconst isNextgen = 'undefined' !== typeof scanType && 'nextgen' === scanType;\n\n\t\t// Calculate updated savings in bytes.\n\t\twp_smushit_data.savings_bytes = parseInt( wp_smushit_data.size_before ) - parseInt( wp_smushit_data.size_after );\n\n\t\tconst formattedSize = WP_Smush.helpers.formatBytes( wp_smushit_data.savings_bytes, 0 );\n\t\tconst statsHuman = jQuery( '.wp-smush-savings .wp-smush-stats-human' );\n\n\t\tif ( isNextgen ) {\n\t\t\tstatsHuman.html( formattedSize );\n\t\t} else {\n\t\t\tstatsHuman.html( WP_Smush.helpers.getFormatFromString( formattedSize ) );\n\t\t\tjQuery( '.sui-summary-large.wp-smush-stats-human' )\n\t\t\t\t.html( WP_Smush.helpers.getSizeFromString( formattedSize ) );\n\t\t}\n\n\t\t// Update the savings percent.\n\t\twp_smushit_data.savings_percent = WP_Smush.helpers.precise_round(\n\t\t\t( parseInt( wp_smushit_data.savings_bytes ) /\n\t\t\t\tparseInt( wp_smushit_data.size_before ) ) *\n\t\t\t\t100,\n\t\t\t1\n\t\t);\n\t\tif ( ! isNaN( wp_smushit_data.savings_percent ) ) {\n\t\t\tjQuery( '.wp-smush-savings .wp-smush-stats-percent' )\n\t\t\t\t.html( wp_smushit_data.savings_percent );\n\t\t}\n\n\t\t// Update image count.\n\t\tif ( isNextgen ) {\n\t\t\tjQuery( '.sui-summary-details span.wp-smush-total-optimised' )\n\t\t\t\t.html( wp_smushit_data.count_images );\n\t\t} else {\n\t\t\tjQuery( 'span.smushed-items-count span.wp-smush-count-total span.wp-smush-total-optimised' )\n\t\t\t\t.html( wp_smushit_data.count_images );\n\t\t}\n\n\t\t// Update resize image count.\n\t\tif ( wp_smushit_data.count_resize > 0 ) {\n\t\t\tjQuery( 'span.smushed-items-count span.wp-smush-count-resize-total' ).removeClass( 'sui-hidden' );\n\t\t\tjQuery( 'span.smushed-items-count span.wp-smush-count-resize-total span.wp-smush-total-optimised' )\n\t\t\t\t.html( wp_smushit_data.count_resize );\n\t\t}\n\n\t\t// Update super-Smushed image count.\n\t\tconst smushedCountDiv = jQuery( 'li.super-smush-attachments .smushed-count' );\n\t\tif ( smushedCountDiv.length && 'undefined' !== typeof wp_smushit_data.count_supersmushed ) {\n\t\t\tsmushedCountDiv.html( wp_smushit_data.count_supersmushed );\n\t\t}\n\n\t\t// Update conversion savings.\n\t\tconst smushConversionSavings = jQuery( '.smush-conversion-savings' );\n\t\tif (\n\t\t\tsmushConversionSavings.length > 0 &&\n\t\t\t'undefined' !== typeof wp_smushit_data.savings_conversion &&\n\t\t\twp_smushit_data.savings_conversion !== ''\n\t\t) {\n\t\t\tconst conversionSavings = smushConversionSavings.find( '.wp-smush-stats' );\n\t\t\tif ( conversionSavings.length > 0 ) {\n\t\t\t\tconversionSavings.html(\n\t\t\t\t\tWP_Smush.helpers.formatBytes( wp_smushit_data.savings_conversion, 1 )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Update image size in attachment info panel.\n\t *\n\t * @since 2.8\n\t *\n\t * @param {number} newSize\n\t */\n\tstatic updateImageStats( newSize ) {\n\t\tif ( 0 === newSize ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst attachmentSize = jQuery( '.attachment-info .file-size' );\n\t\tconst currentSize = attachmentSize\n\t\t\t.contents()\n\t\t\t.filter( function() {\n\t\t\t\treturn this.nodeType === 3;\n\t\t\t} )\n\t\t\t.text();\n\n\t\t// There is a space before the size.\n\t\tif ( currentSize !== ' ' + newSize ) {\n\t\t\tconst sizeStrongEl = attachmentSize\n\t\t\t\t.contents()\n\t\t\t\t.filter( function() {\n\t\t\t\t\treturn this.nodeType === 1;\n\t\t\t\t} )\n\t\t\t\t.text();\n\t\t\tattachmentSize.html(\n\t\t\t\t'' + sizeStrongEl + ' ' + newSize\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Sync stats.\n\t */\n\tsyncStats() {\n\t\tconst messageHolder = jQuery(\n\t\t\t'div.wp-smush-bulk-progress-bar-wrapper div.wp-smush-count.tc'\n\t\t);\n\t\t// Store the existing content in a variable.\n\t\tconst progressMessage = messageHolder.html();\n\t\t/** @param {string} wp_smush_msgs.sync_stats */\n\t\tmessageHolder.html( window.wp_smush_msgs.sync_stats );\n\n\t\tconst self = this;\n\n\t\t// Send ajax.\n\t\treturn jQuery\n\t\t\t.ajax( {\n\t\t\t\ttype: 'GET',\n\t\t\t\turl: ajaxurl,\n\t\t\t\tdata: {\n\t\t\t\t\taction: this.get_stats_action,\n\t\t\t\t\t_ajax_nonce: window.wp_smush_msgs.nonce,\n\t\t\t\t},\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tif ( ! response?.success ) {\n\t\t\t\t\t\tWP_Smush.helpers.showNotice( response, {\n\t\t\t\t\t\t\tshowdismiss: true,\n\t\t\t\t\t\t\tautoclose: false,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tGlobalStats.updateGlobalStatsFromSmushScriptData( response.data );\n\t\t\t\t\tGlobalStats.renderStats();\n\t\t\t\t\tSmushProgress.update( 0, response.data.remaining_count );\n\n\t\t\t\t\tjQuery('.wp-smush-scan').prop('disabled', false);\n\t\t\t\t\tself.hideBulkFreeLimitReachedNotice();\n\t\t\t\t},\n\t\t\t} )\n\t\t\t.always( () => messageHolder.html( progressMessage ) );\n\t}\n\n\t/**\n\t * After the bulk optimization has been finished.\n\t */\n\tbulkDone() {\n\t\tif ( ! this.is_bulk ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Enable the button.\n\t\tthis.enableButton();\n\n\t\t// Show notice.\n\t\tif ( 0 === this.ids.length ) {\n\t\t\tjQuery('.bulk-smush-wrapper .wp-smush-all-done').removeClass( 'sui-hidden' );\n\t\t\tjQuery( '.wp-smush-bulk-wrapper' ).addClass( 'sui-hidden' );\n\t\t\t// Hide the progress bar if scan is finished.\n\t\t\tjQuery( '.wp-smush-bulk-progress-bar-wrapper' ).addClass( 'sui-hidden' );\n\n\t\t\t// Reset the progress when we finish so the next smushing starts from zero.\n\t\t\tthis._updateProgress(0, 0);\n\t\t} else {\n\t\t\t// TODO: REMOVE \"re-smush-notice\" since no longer used. And maybe for \"wp-smush-remaining\" too.\n\t\t\tconst notice = jQuery(\n\t\t\t\t'.bulk-smush-wrapper .wp-smush-resmush-notice'\n\t\t\t);\n\n\t\t\tif ( notice.length > 0 ) {\n\t\t\t\tnotice.show();\n\t\t\t} else {\n\t\t\t\tjQuery( '.bulk-smush-wrapper .wp-smush-remaining' ).removeClass( 'sui-hidden' );\n\t\t\t}\n\t\t}\n\n\t\t// Enable re-Smush and scan button.\n\t\tjQuery( '.wp-resmush.wp-smush-action' ).removeProp(\n\t\t\t'disabled'\n\t\t);\n\t}\n\t\n\tshowAnimatedUpsellNotice() {\n\t\tif ( ! this.errors.length ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only show animated upsell if exists an animated error in first 5 errors.\n\t\t// Note, this.errors will be reset each we resume so let detect animated error from elements.\n\t\tconst bulkErrors = document.querySelector('.smush-bulk-errors');\n\t\tif ( ! bulkErrors ) {\n\t\t\treturn;\n\t\t}\n\t\tconst firstAnimatedError = bulkErrors.querySelector( '[data-error-code=\"animated\"]' );\n\t\tif ( ! firstAnimatedError ) {\n\t\t\treturn;\n\t\t}\n\t\tconst first5Errors = Array.prototype.slice.call(bulkErrors.childNodes, 0, 5 );\n\t\treturn first5Errors.includes( firstAnimatedError );\n\t}\n\n\tmaybeShowCDNActivationNotice() {\n\t\t// Only for pro users.\n\t\tif ( ! wp_smush_msgs.smush_cdn_activation_notice || ! this.showAnimatedUpsellNotice() ) {\n\t\t\treturn;\n\t\t}\n\t\tWP_Smush.helpers.renderActivationCDNNotice( wp_smush_msgs.smush_cdn_activation_notice );\n\t}\n\n\tmaybeShowUnlimitedUpsellNotice() {\n\t\tconst unlimitedUpsellNotice = document.querySelector('.wp-smush-global-upsell');\n\t\tif ( ! unlimitedUpsellNotice ) {\n\t\t\treturn;\n\t\t}\n\t\tunlimitedUpsellNotice.classList.remove( 'sui-hidden' );\n\t}\n\n\tmaybeShowBulkErrorActions() {\n\t\tif ( ! this.errors.length ) {\n\t\t\treturn;\n\t\t}\n\t\tconst bulkErrorActionsElement = document.querySelector('.smush-bulk-errors-actions');\n\t\tif ( ! bulkErrorActionsElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tbulkErrorActionsElement.classList.remove('sui-hidden');\n\t}\n\n\t/**\n\t * Free Smush limit exceeded.\n\t */\n\tfreeExceeded() {\n\t\tconst progress = jQuery( '.wp-smush-bulk-progress-bar-wrapper' );\n\t\tprogress.addClass( 'wp-smush-exceed-limit' ).removeClass('sui-hidden');\n\t\tprogress\n\t\t\t.find( '.sui-progress-block .wp-smush-cancel-bulk' )\n\t\t\t.removeClass( 'sui-hidden' );\n\t\tprogress\n\t\t\t.find( '.sui-progress-block .wp-smush-all' )\n\t\t\t.addClass( 'sui-hidden' );\n\n\t\tprogress\n\t\t\t.find( 'i.sui-icon-loader' )\n\t\t\t.addClass( 'sui-icon-info' )\n\t\t\t.removeClass( 'sui-icon-loader' )\n\t\t\t.removeClass( 'sui-loading' );\n\n\t\tdocument\n\t\t\t.getElementById( 'bulk-smush-resume-button' )\n\t\t\t.classList.remove( 'sui-hidden' );\n\n\t\tthis.showBulkFreeLimitReachedNotice();\n\t}\n\n\tshowBulkFreeLimitReachedNotice() {\n\t\tconst bulkFreeLimitReachedNotice = document.getElementById( 'smush-limit-reached-notice' );\n\t\tif ( bulkFreeLimitReachedNotice ) {\n\t\t\tbulkFreeLimitReachedNotice.classList.remove( 'sui-hidden' );\n\t\t}\n\t}\n\n\thideBulkFreeLimitReachedNotice() {\n\t\tconst bulkFreeLimitReachedNotice = document.getElementById( 'smush-limit-reached-notice' );\n\t\tif ( bulkFreeLimitReachedNotice ) {\n\t\t\tbulkFreeLimitReachedNotice.classList.add( 'sui-hidden' );\n\t\t}\n\t}\n\n\t/**\n\t * Adds the stats for the current image to existing stats.\n\t *\n\t * @param {Array} imageStats\n\t * @param {string} imageStats.count\n\t * @param {boolean} imageStats.is_lossy\n\t * @param {Array} imageStats.savings_resize\n\t * @param {Array} imageStats.savings_conversion\n\t * @param {string} imageStats.size_before\n\t * @param {string} imageStats.size_after\n\t * @param {string} type\n\t */\n\tstatic updateLocalizedStats( imageStats, type ) {\n\t\t// Increase the Smush count.\n\t\tif ( 'undefined' === typeof window.wp_smushit_data ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// No need to increase attachment count, resize, conversion savings for directory Smush.\n\t\tif ( 'media' === type ) {\n\t\t\twp_smushit_data.count_smushed = parseInt( wp_smushit_data.count_smushed ) + 1;\n\n\t\t\t// Increase Smushed image count.\n\t\t\twp_smushit_data.count_images = parseInt( wp_smushit_data.count_images ) + parseInt( imageStats.count );\n\n\t\t\t// Increase super Smush count, if applicable.\n\t\t\tif ( imageStats.is_lossy ) {\n\t\t\t\twp_smushit_data.count_supersmushed = parseInt( wp_smushit_data.count_supersmushed ) + 1;\n\t\t\t}\n\n\t\t\t// Add to resize savings.\n\t\t\twp_smushit_data.savings_resize =\n\t\t\t\t'undefined' !== typeof imageStats.savings_resize.bytes\n\t\t\t\t\t? parseInt( wp_smushit_data.savings_resize ) + parseInt( imageStats.savings_resize.bytes )\n\t\t\t\t\t: parseInt( wp_smushit_data.savings_resize );\n\n\t\t\t// Update resize count.\n\t\t\twp_smushit_data.count_resize =\n\t\t\t\t'undefined' !== typeof imageStats.savings_resize.bytes\n\t\t\t\t\t? parseInt( wp_smushit_data.count_resize ) + 1\n\t\t\t\t\t: wp_smushit_data.count_resize;\n\n\t\t\t// Add to conversion savings.\n\t\t\twp_smushit_data.savings_conversion =\n\t\t\t\t'undefined' !== typeof imageStats.savings_conversion &&\n\t\t\t\t'undefined' !== typeof imageStats.savings_conversion.bytes\n\t\t\t\t\t? parseInt( wp_smushit_data.savings_conversion ) + parseInt( imageStats.savings_conversion.bytes )\n\t\t\t\t\t: parseInt( wp_smushit_data.savings_conversion );\n\t\t} else if ( 'directory_smush' === type ) {\n\t\t\t//Increase smushed image count\n\t\t\twp_smushit_data.count_images = parseInt( wp_smushit_data.count_images ) + 1;\n\t\t} else if ( 'nextgen' === type ) {\n\t\t\twp_smushit_data.count_smushed = parseInt( wp_smushit_data.count_smushed ) + 1;\n\t\t\twp_smushit_data.count_supersmushed = parseInt( wp_smushit_data.count_supersmushed ) + 1;\n\n\t\t\t// Increase Smushed image count.\n\t\t\twp_smushit_data.count_images = parseInt( wp_smushit_data.count_images ) + parseInt( imageStats.count );\n\t\t}\n\n\t\t// If we have savings. Update savings.\n\t\tif ( imageStats.size_before > imageStats.size_after ) {\n\t\t\twp_smushit_data.size_before =\n\t\t\t\t'undefined' !== typeof imageStats.size_before\n\t\t\t\t\t? parseInt( wp_smushit_data.size_before ) + parseInt( imageStats.size_before )\n\t\t\t\t\t: parseInt( wp_smushit_data.size_before );\n\t\t\twp_smushit_data.size_after =\n\t\t\t\t'undefined' !== typeof imageStats.size_after\n\t\t\t\t\t? parseInt( wp_smushit_data.size_after ) + parseInt( imageStats.size_after )\n\t\t\t\t\t: parseInt( wp_smushit_data.size_after );\n\t\t}\n\n\t\t// Add stats for resizing. Update savings.\n\t\tif ( 'undefined' !== typeof imageStats.savings_resize ) {\n\t\t\twp_smushit_data.size_before =\n\t\t\t\t'undefined' !== typeof imageStats.savings_resize.size_before\n\t\t\t\t\t? parseInt( wp_smushit_data.size_before ) + parseInt( imageStats.savings_resize.size_before )\n\t\t\t\t\t: parseInt( wp_smushit_data.size_before );\n\t\t\twp_smushit_data.size_after =\n\t\t\t\t'undefined' !== typeof imageStats.savings_resize.size_after\n\t\t\t\t\t? parseInt( wp_smushit_data.size_after ) + parseInt( imageStats.savings_resize.size_after )\n\t\t\t\t\t: parseInt( wp_smushit_data.size_after );\n\t\t}\n\n\t\t// Add stats for conversion. Update savings.\n\t\tif ( 'undefined' !== typeof imageStats.savings_conversion ) {\n\t\t\twp_smushit_data.size_before =\n\t\t\t\t'undefined' !== typeof imageStats.savings_conversion.size_before\n\t\t\t\t\t? parseInt( wp_smushit_data.size_before ) + parseInt( imageStats.savings_conversion.size_before )\n\t\t\t\t\t: parseInt( wp_smushit_data.size_before );\n\t\t\twp_smushit_data.size_after =\n\t\t\t\t'undefined' !== typeof imageStats.savings_conversion.size_after\n\t\t\t\t\t? parseInt( wp_smushit_data.size_after ) + parseInt( imageStats.savings_conversion.size_after )\n\t\t\t\t\t: parseInt( wp_smushit_data.size_after );\n\t\t}\n\t}\n\n\t/**\n\t * Update progress.\n\t *\n\t * @param {Object} _res\n\t */\n\tupdateProgress( _res ) {\n\t\tif ( ! this.is_bulk_resmush && ! this.is_bulk ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet progress = 0;\n\n\t\t// Update localized stats.\n\t\tif (\n\t\t\t_res &&\n\t\t\t'undefined' !== typeof _res.data &&\n\t\t\t'undefined' !== typeof _res.data.stats\n\t\t) {\n\t\t\tSmush.updateLocalizedStats( _res.data.stats, this.smush_type );\n\t\t}\n\n\t\tif ( ! this.is_bulk_resmush ) {\n\t\t\t// Handle progress for normal bulk smush.\n\t\t\tprogress =\n\t\t\t\t( ( this.smushed + this.errors.length ) / this.total ) * 100;\n\t\t} else {\n\t\t\t// If the request was successful, update the progress bar.\n\t\t\tif ( _res.success ) {\n\t\t\t\t// Handle progress for super Smush progress bar.\n\t\t\t\tif ( wp_smushit_data.resmush.length > 0 ) {\n\t\t\t\t\t// Update the count.\n\t\t\t\t\tjQuery( '.wp-smush-images-remaining' ).html(\n\t\t\t\t\t\twp_smushit_data.resmush.length\n\t\t\t\t\t);\n\t\t\t\t} else if (\n\t\t\t\t\t0 === wp_smushit_data.resmush.length &&\n\t\t\t\t\t0 === this.ids.length\n\t\t\t\t) {\n\t\t\t\t\t// If all images are re-Smushed, show the All Smushed message.\n\t\t\t\t\tjQuery('.bulk-resmush-wrapper .wp-smush-all-done').removeClass( 'sui-hidden' );\n\n\t\t\t\t\t// Hide everything else.\n\t\t\t\t\tjQuery(\n\t\t\t\t\t\t'.wp-smush-resmush-wrap, .wp-smush-bulk-progress-bar-wrapper'\n\t\t\t\t\t).addClass( 'sui-hidden' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle progress for normal bulk Smush. Set progress bar width.\n\t\t\tif (\n\t\t\t\t'undefined' !== typeof this.ids &&\n\t\t\t\t'undefined' !== typeof this.total &&\n\t\t\t\tthis.total > 0\n\t\t\t) {\n\t\t\t\tprogress =\n\t\t\t\t\t( ( this.smushed + this.errors.length ) / this.total ) *\n\t\t\t\t\t100;\n\t\t\t}\n\t\t}\n\n\t\t// Reset the lossless images count in case of pending images for resmush ( Nextgen only ).\n\t\tif (\n\t\t\t'nextgen' === this.smush_type &&\n\t\t\twp_smushit_data.resmush.length > 0 && \n\t\t\t(this.smushed + this.errors.length <= 1)\n\t\t) {\n\t\t\twp_smushit_data.count_images -= (wp_smushit_data.resmush.length + 1);\n\t\t}\n\n\t\t// No more images left. Show bulk wrapper and Smush notice.\n\t\tif ( 0 === this.ids.length ) {\n\t\t\t// TODO: Check it with BO and maybe move these into progress bar module for reusing.\n\t\t\tjQuery('.bulk-smush-wrapper .wp-smush-all-done').removeClass( 'sui-hidden' );\n\t\t\tjQuery( '.wp-smush-bulk-wrapper' ).addClass( 'sui-hidden' );\n\t\t}\n\n\t\t// Increase the progress bar and counter.\n\t\tthis._updateProgress(\n\t\t\tthis.smushed + this.errors.length,\n\t\t\tWP_Smush.helpers.precise_round( progress, 1 )\n\t\t);\n\n\t\t// Avoid updating the stats twice when the bulk smush ends on Smush's page.\n\t\tif (0 !== this.ids.length || 'nextgen' === this.smush_type) {\n\t\t\t// Update stats and counts.\n\t\t\tSmush.updateStats(this.smush_type);\n\t\t}\n\t}\n\n\t/**\n\t * Update progress.\n\t *\n\t * @param {number} count Number of images optimized.\n\t * @param {string} width Percentage complete.\n\t * @private\n\t */\n\t_updateProgress( count, width ) {\n\t\tif ( ! this.is_bulk && ! this.is_bulk_resmush ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Progress bar label.\n\t\tjQuery( 'span.wp-smush-images-percent' ).html( width + '%' );\n\t\t// Progress bar.\n\t\tjQuery( '.bulk-smush-wrapper .wp-smush-progress-inner' ).css(\n\t\t\t'width',\n\t\t\twidth + '%'\n\t\t);\n\n\t\t// Progress bar status.\n\t\tjQuery( '.bulk-smush-wrapper .sui-progress-state-text' )\n\t\t\t.find( 'span:first-child' )\n\t\t\t.html( count )\n\t\t\t.find( 'span:last-child' )\n\t\t\t.html( this.total );\n\t}\n\n\t/**\n\t * Whether to send the ajax requests further or not.\n\t *\n\t * @return {*|boolean} Should continue or not.\n\t */\n\tcontinue() {\n\t\treturn this.continueSmush && this.ids.length > 0 && this.is_bulk;\n\t\tlet continueSmush = this.button.attr( 'continue_smush' );\n\n\t\tif ( 'undefined' === typeof continueSmush ) {\n\t\t\tcontinueSmush = true;\n\t\t}\n\n\t\tif ( 'false' === continueSmush || ! continueSmush ) {\n\t\t\tcontinueSmush = false;\n\t\t}\n\n\t\treturn continueSmush && this.ids.length > 0 && this.is_bulk;\n\t}\n\n\tonStart() {\n\t\tthis.deferred = jQuery.Deferred();\n\t\tthis.deferred.errors = [];\n\t\tthis.continueSmush = true;\n\t\t// TODO: errors will reset after bulk smush limit is reached and user clicks continue.\n\t\tthis.errors = [];\n\t\t// Smushed and total we take from the progress bar... I don't like this :-(\n\t\tconst progressBar = jQuery(\n\t\t\t'.bulk-smush-wrapper .sui-progress-state-text'\n\t\t);\n\t\tthis.smushed = parseInt(\n\t\t\tprogressBar.find( 'span:first-child' ).html()\n\t\t);\n\t\tthis.total = parseInt( progressBar.find( 'span:last-child' ).html() );\n\n\t\tjQuery('.wp-smush-restore').prop('disabled', true);\n\t}\n\n\t/**\n\t * Send ajax request for optimizing single and bulk, call update_progress on ajax response.\n\t *\n\t * @return {*} Ajax call response.\n\t */\n\tcallAjax(newBulkSmushStarted = false) {\n\t\t/**\n\t\t * This here little piece of code allows to track auto continue clicks and halts bulk Smush until the page\n\t\t * is reloaded.\n\t\t *\n\t\t * @since 3.5.0\n\t\t * @see https://wordpress.org/plugins/wp-nonstop-smushit/\n\t\t */\n\t\tif (\n\t\t\t0 !== perf &&\n\t\t\t'undefined' !== typeof perf &&\n\t\t\t10 > performance.now() - perf\n\t\t) {\n\t\t\tthis.freeExceeded();\n\t\t\treturn this.deferred;\n\t\t}\n\n\t\tlet nonceValue = window.wp_smush_msgs.nonce;\n\t\t// Remove from array while processing so we can continue where left off.\n\t\tthis.current_id = this.is_bulk\n\t\t\t? this.ids.shift()\n\t\t\t: this.button.data( 'id' );\n\n\t\t// Remove the ID from respective variable as well.\n\t\tSmush.updateSmushIds( this.current_id );\n\n\t\tconst nonceField = this.button.parent().find( '#_wp_smush_nonce' );\n\t\tif ( nonceField.length > 0 ) {\n\t\t\tnonceValue = nonceField.val();\n\t\t}\n\n\t\tconst self = this;\n\n\t\tthis.request = Smush.ajax(\n\t\t\tthis.is_bulk_resmush,\n\t\t\tthis.current_id,\n\t\t\tthis.url,\n\t\t\tnonceValue,\n\t\t\tnewBulkSmushStarted\n\t\t)\n\t\t\t.done( function( res ) {\n\t\t\t\t// If no response or success is false, do not process further. Increase the error count except if bulk request limit exceeded.\n\t\t\t\tif (\n\t\t\t\t\t'undefined' === typeof res.success ||\n\t\t\t\t\t( 'undefined' !== typeof res.success &&\n\t\t\t\t\t\tfalse === res.success &&\n\t\t\t\t\t\t'undefined' !== typeof res.data &&\n\t\t\t\t\t\t'limit_exceeded' !== res.data.error )\n\t\t\t\t) {\n\t\t\t\t\tself.errors.push( self.current_id );\n\t\t\t\t\tconst error = res.data.error;\n\n\t\t\t\t\t/** @param {string} res.data.file_name */\n\t\t\t\t\tconst errorMsg = WP_Smush.helpers.prepareBulkSmushErrorRow(\n\t\t\t\t\t\terror.error_message,\n\t\t\t\t\t\terror.file_name,\n\t\t\t\t\t\terror.thumbnail,\n\t\t\t\t\t\tself.current_id,\n\t\t\t\t\t\tself.smush_type,\n\t\t\t\t\t\terror.error_code\n\t\t\t\t\t);\n\n\t\t\t\t\tself.log.removeClass('sui-hidden');\n\n\t\t\t\t\t// Print the error on screen.\n\t\t\t\t\tself.log.find( '.smush-bulk-errors' ).append( errorMsg );\n\t\t\t\t\tif ( self.errors.length > 4 ) {\n\t\t\t\t\t\tself.log.find( '.smush-bulk-errors' ).addClass('overflow-box');\n\t\t\t\t\t\tjQuery( '.smush-bulk-errors-actions' ).removeClass( 'sui-hidden' );\n\t\t\t\t\t}\n\t\t\t\t} else if (\n\t\t\t\t\t'undefined' !== typeof res.success &&\n\t\t\t\t\tres.success\n\t\t\t\t) {\n\t\t\t\t\t// Increment the smushed count if image smushed without errors.\n\t\t\t\t\tself.smushed++;\n\t\t\t\t}\n\n\t\t\t\t// Check whether to show the warning notice or not.\n\t\t\t\tSmush.membershipValidity( res.data );\n\n\t\t\t\t/**\n\t\t\t\t * Bulk Smush limit exceeded: Stop ajax requests, remove progress bar, append the last image ID\n\t\t\t\t * back to Smush variable, and reset variables to allow the user to continue bulk Smush.\n\t\t\t\t */\n\t\t\t\tif (\n\t\t\t\t\t'undefined' !== typeof res.data &&\n\t\t\t\t\t'limit_exceeded' === res.data.error &&\n\t\t\t\t\t'resolved' !== self.deferred.state()\n\t\t\t\t) {\n\t\t\t\t\t// Hide bulk running message.\n\t\t\t\t\tconst bulkRunning = document.getElementById(\n\t\t\t\t\t\t'wp-smush-running-notice'\n\t\t\t\t\t);\n\t\t\t\t\tbulkRunning.classList.add( 'sui-hidden' );\n\n\t\t\t\t\t// Add a data attribute to the Smush button, to stop sending ajax.\n\t\t\t\t\t// self.button.attr( 'continue_smush', false );\n\t\t\t\t\tself.continueSmush = false;\n\n\t\t\t\t\t// Reinsert the current ID.\n\t\t\t\t\twp_smushit_data.unsmushed.unshift( self.current_id );\n\t\t\t\t\tself.ids.unshift( self.current_id );\n\n\t\t\t\t\tperf = performance.now();\n\t\t\t\t\tself.freeExceeded();\n\t\t\t\t} else if ( self.is_bulk ) {\n\t\t\t\t\tself.updateProgress( res );\n\t\t\t\t\tSmush.updateScoreProgress();\n\t\t\t\t}\n\n\t\t\t\tif (0 === self.ids.length && self.is_bulk ) {\n\t\t\t\t\tself.onBulkSmushCompleted();\n\t\t\t\t}\n\n\t\t\t\tself.singleDone();\n\t\t\t} )\n\t\t\t.always( function() {\n\t\t\t\tif ( ! self.continue() || ! self.is_bulk ) {\n\t\t\t\t\t// Calls deferred.done()\n\t\t\t\t\tself.deferred.resolve();\n\t\t\t\t} else {\n\t\t\t\t\tself.callAjax(false);\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.deferred.errors = this.errors;\n\n\t\treturn this.deferred;\n\t}\n\t\n\tmaybeShowCDNUpsellForPreSiteOnCompleted() {\n\t\t// Show upsell cdn.\n\t\tconst upsellCdn = document.querySelector('.wp-smush-upsell-cdn');\n\t\tif ( upsellCdn ) {\n\t\t\tupsellCdn.querySelector('p').innerHTML = wp_smush_msgs.processed_cdn_for_free;\n\t\t\tupsellCdn.classList.remove('sui-hidden');\n\t\t}\n\t}\n\t\n\tonBulkSmushCompleted() {\n\t\t// Show upsell unlimited on completed.\n\t\tthis.maybeShowUnlimitedUpsellNotice();\n\t\t// Show CDN activation notice for pro users.\n\t\tthis.maybeShowCDNActivationNotice();\n\t\t// Show CDN upsell for old users.\n\t\tthis.maybeShowCDNUpsellForPreSiteOnCompleted();\n\t\t\n\t\tthis.maybeShowBulkErrorActions();\n\t\t\n\t\tconst callback = this.is_bulk\n\t\t\t? () => this.trackBulkSmushCompleted()\n\t\t\t: () => false;\n\n\t\tthis.syncStats().done(callback);\n\t}\n\n\tgetPercentOptimized(totalImages, totalImagesToSmush) {\n\t\tif (totalImages === totalImagesToSmush || totalImages <= 0) {\n\t\t\treturn 100;\n\t\t} else {\n\t\t\treturn Math.floor((totalImages - totalImagesToSmush) * 100 / totalImages);\n\t\t}\n\t}\n\n\t/**\n\t * Prepare error row. Will only allow to hide errors for WP media attachments (not nextgen).\n\t *\n\t * @since 1.9.0\n\t *\n\t * @param {string} errorMsg Error message.\n\t * @param {string} fileName File name.\n\t * @param {string} thumbnail Thumbnail for image (if available).\n\t * @param {number} id Image ID.\n\t * @param {string} type Smush type: media or netxgen.\n\t *\n\t * @return {string} Row with error.\n\t */\n\tstatic prepareErrorRow( errorMsg, fileName, thumbnail, id, type ) {\n\t\tconst thumbDiv =\n\t\t\t'undefined' === typeof thumbnail\n\t\t\t\t? ''\n\t\t\t\t: thumbnail;\n\t\tconst fileLink =\n\t\t\t'undefined' === fileName || 'undefined' === typeof fileName\n\t\t\t\t? 'undefined'\n\t\t\t\t: fileName;\n\n\t\tlet tableDiv =\n\t\t\t'
' +\n\t\t\t'
' +\n\t\t\tthumbDiv +\n\t\t\t'' +\n\t\t\tfileLink +\n\t\t\t'' +\n\t\t\t'' +\n\t\t\terrorMsg +\n\t\t\t'' +\n\t\t\t'
';\n\n\t\tif ( 'media' === type ) {\n\t\t\ttableDiv =\n\t\t\t\ttableDiv +\n\t\t\t\t'
' +\n\t\t\t\t'' +\n\t\t\t\t'
';\n\t\t}\n\n\t\ttableDiv = tableDiv + '
';\n\n\t\treturn tableDiv;\n\t}\n\n\ttrackBulkSmushCompleted() {\n\t\tthis.mixPanel.trackBulkSmushCompleted( GlobalStats.getGlobalStats() );\n\t}\n\n\t/**\n\t * Send ajax request for single and bulk Smushing.\n\t */\n\trun() {\n\t\t// If bulk and we have a definite number of IDs.\n\t\tif ( this.is_bulk && this.ids.length > 0 ) {\n\t\t\tthis.callAjax(true);\n\t\t}\n\n\t\tif ( ! this.is_bulk ) {\n\t\t\tthis.callAjax();\n\t\t}\n\t}\n\n\t/**\n\t * Show bulk Smush errors, and disable bulk Smush button on completion.\n\t */\n\tbindDeferredEvents() {\n\t\tconst self = this;\n\n\t\tthis.deferred.done( function() {\n\t\t\t// self.button.removeAttr( 'continue_smush' );\n\t\t\tself.continueSmush = true;\n\n\t\t\tif ( self.errors.length ) {\n\t\t\t\t/** @param {string} wp_smush_msgs.error_in_bulk */\n\t\t\t\tconst msg = self.errors.length === self.total ?\n\t\t\t\t\t\t\t\twindow.wp_smush_msgs.all_failed :\n\t\t\t\t\t\t\t\twindow.wp_smush_msgs.error_in_bulk\n\t\t\t\t\t\t\t\t.replace( '{{errors}}', self.errors.length )\n\t\t\t\t\t\t\t\t.replace( '{{total}}', self.total )\n\t\t\t\t\t\t\t\t.replace( '{{smushed}}', self.smushed );\n\n\t\t\t\tjQuery( '.wp-smush-all-done' )\n\t\t\t\t\t.addClass( 'sui-notice-warning' )\n\t\t\t\t\t.removeClass( 'sui-notice-success' )\n\t\t\t\t\t.find( 'p' )\n\t\t\t\t\t.html( msg );\n\t\t\t}\n\n\t\t\tself.bulkDone();\n\n\t\t\t// Re-enable the buttons.\n\t\t\tjQuery(\n\t\t\t\t'.wp-smush-all:not(.wp-smush-finished)'\n\t\t\t).prop('disabled', false);\n\t\t} );\n\t}\n\n\t/**\n\t * Handles the cancel button click.\n\t * Update the UI, and enable the bulk Smush button.\n\t */\n\tcancelAjax() {\n\t\t\t// Add a data attribute to the Smush button, to stop sending ajax.\n\t\t// this.button.attr( 'continue_smush', false );\n\t\tthis.continueSmush = false;\n\t\t\t// Sync and update stats.\n\t\tthis.syncStats();\n\n\t\tthis.request.abort();\n\t\tthis.enableButton();\n\t\tthis.button.removeClass( 'wp-smush-started' );\n\t\twp_smushit_data.unsmushed.unshift( this.current_id );\n\t\t\tjQuery( '.wp-smush-bulk-wrapper' ).removeClass( 'sui-hidden' );\n\n\t\t\t// Hide the progress bar.\n\t\t\tjQuery( '.wp-smush-bulk-progress-bar-wrapper' ).addClass( 'sui-hidden' );\n\n\t\tthis.mixPanel.trackBulkSmushCancel();\n\t\tthis.hideBulkFreeLimitReachedNotice();\n\t}\n\n\t/**\n\t * Remove the current ID from the unSmushed/re-Smush variable.\n\t *\n\t * @param {number} currentId\n\t */\n\tstatic updateSmushIds( currentId ) {\n\t\tif (\n\t\t\t'undefined' !== typeof wp_smushit_data.unsmushed &&\n\t\t\twp_smushit_data.unsmushed.length > 0\n\t\t) {\n\t\t\tconst uIndex = wp_smushit_data.unsmushed.indexOf( currentId );\n\t\t\tif ( uIndex > -1 ) {\n\t\t\t\twp_smushit_data.unsmushed.splice( uIndex, 1 );\n\t\t\t}\n\t\t}\n\n\t\t// Remove from the re-Smush list.\n\t\tif (\n\t\t\t'undefined' !== typeof wp_smushit_data.resmush &&\n\t\t\twp_smushit_data.resmush.length > 0\n\t\t) {\n\t\t\tconst index = wp_smushit_data.resmush.indexOf( currentId );\n\t\t\tif ( index > -1 ) {\n\t\t\t\twp_smushit_data.resmush.splice( index, 1 );\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport default Smush;\n","/* global WP_Smush */\n/* global ajaxurl */\n\n/**\n * WebP functionality.\n *\n * @since 3.8.0\n */\n\n(function () {\n\t'use strict';\n\n\tWP_Smush.WebP = {\n\t\tnonceField: document.getElementsByName('wp_smush_options_nonce'),\n\t\ttoggleModuleButton: document.getElementById('smush-toggle-webp-button'),\n\t\trecheckStatusButton: document.getElementById('smush-webp-recheck'),\n\t\trecheckStatusLink: document.getElementById('smush-webp-recheck-link'),\n\t\tshowWizardButton: document.getElementById('smush-webp-toggle-wizard'),\n\n\t\tinit() {\n\t\t\tthis.maybeShowDeleteAllSuccessNotice();\n\n\t\t\t/**\n\t\t\t * Handles the \"Deactivate\" and \"Get Started\" buttons on the WebP page.\n\t\t\t */\n\t\t\tif (this.toggleModuleButton) {\n\t\t\t\tthis.toggleModuleButton.addEventListener('click', (e) =>\n\t\t\t\t\tthis.toggleWebp(e)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle \"RE-CHECK STATUS' button click on WebP page.\n\t\t\t */\n\t\t\tif (this.recheckStatusButton) {\n\t\t\t\tthis.recheckStatusButton.addEventListener('click', (e) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.recheckStatus();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handle \"RE-CHECK STATUS' link click on WebP page.\n\t\t\t */\n\t\t\tif (this.recheckStatusLink) {\n\t\t\t\tthis.recheckStatusLink.addEventListener('click', (e) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.recheckStatus();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles the \"Delete WebP images\" button.\n\t\t\t */\n\t\t\tif (document.getElementById('wp-smush-webp-delete-all')) {\n\t\t\t\tdocument\n\t\t\t\t\t.getElementById('wp-smush-webp-delete-all')\n\t\t\t\t\t.addEventListener('click', (e) => this.deleteAll(e));\n\t\t\t}\n\n\t\t\tif (this.showWizardButton) {\n\t\t\t\tthis.showWizardButton.addEventListener(\n\t\t\t\t\t'click',\n\t\t\t\t\tthis.toggleWizard\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Toggle WebP module.\n\t\t *\n\t\t * @param {Event} e\n\t\t */\n\t\ttoggleWebp(e) {\n\t\t\te.preventDefault();\n\n\t\t\tconst button = e.currentTarget,\n\t\t\t\tdoEnable = 'enable' === button.dataset.action;\n\n\t\t\tbutton.classList.add('sui-button-onload');\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', ajaxurl + '?action=smush_webp_toggle', true);\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\n\t\t\txhr.onload = () => {\n\t\t\t\tconst res = JSON.parse(xhr.response);\n\n\t\t\t\tif (200 === xhr.status) {\n\t\t\t\t\tif ('undefined' !== typeof res.success && res.success) {\n\t\t\t\t\t\tconst scanPromise = this.runScan();\n\t\t\t\t\t\tscanPromise.onload = () => {\n\t\t\t\t\t\t\twindow.location.href =\n\t\t\t\t\t\t\t\twindow.wp_smush_msgs.localWebpURL;\n\t\t\t\t\t\t};\n\t\t\t\t\t} else if ('undefined' !== typeof res.data.message) {\n\t\t\t\t\t\tthis.showNotice(res.data.message);\n\t\t\t\t\t\tbutton.classList.remove('sui-button-onload');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet message = window.wp_smush_msgs.generic_ajax_error;\n\t\t\t\t\tif (res && 'undefined' !== typeof res.data.message) {\n\t\t\t\t\t\tmessage = res.data.message;\n\t\t\t\t\t}\n\t\t\t\t\tthis.showNotice(message);\n\t\t\t\t\tbutton.classList.remove('sui-button-onload');\n\t\t\t\t}\n\t\t\t};\n\n\t\t\txhr.send(\n\t\t\t\t'param=' + doEnable + '&_ajax_nonce=' + this.nonceField[0].value\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * re-check server configuration for WebP.\n\t\t */\n\t\trecheckStatus() {\n\t\t\tthis.recheckStatusButton.classList.add('sui-button-onload');\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', ajaxurl + '?action=smush_webp_get_status', true);\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\t\t\txhr.onload = () => {\n\t\t\t\tthis.recheckStatusButton.classList.remove('sui-button-onload');\n\t\t\t\tlet message = false;\n\t\t\t\tconst res = JSON.parse(xhr.response);\n\t\t\t\tif (200 === xhr.status) {\n\t\t\t\t\tconst isConfigured = res.success ? '1' : '0';\n\t\t\t\t\tif (\n\t\t\t\t\t\tisConfigured !==\n\t\t\t\t\t\tthis.recheckStatusButton.dataset.isConfigured\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Reload the page when the configuration status changed.\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmessage = window.wp_smush_msgs.generic_ajax_error;\n\t\t\t\t}\n\n\t\t\t\tif (res && res.data) {\n\t\t\t\t\tmessage = res.data;\n\t\t\t\t}\n\n\t\t\t\tif (message) {\n\t\t\t\t\tthis.showNotice(message);\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.send('_ajax_nonce=' + window.wp_smush_msgs.webp_nonce);\n\t\t},\n\n\t\tdeleteAll(e) {\n\t\t\tconst button = e.currentTarget;\n\t\t\tbutton.classList.add('sui-button-onload');\n\n\t\t\tlet message = false;\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', ajaxurl + '?action=smush_webp_delete_all', true);\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\n\t\t\txhr.onload = () => {\n\t\t\t\tconst res = JSON.parse(xhr.response);\n\t\t\t\tif (200 === xhr.status) {\n\t\t\t\t\tif ('undefined' !== typeof res.success && res.success) {\n\t\t\t\t\t\tconst scanPromise = this.runScan();\n\t\t\t\t\t\tscanPromise.onload = () => {\n\t\t\t\t\t\t\tlocation.search =\n\t\t\t\t\t\t\t\tlocation.search + '¬ice=webp-deleted';\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmessage = window.wp_smush_msgs.generic_ajax_error;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmessage = window.wp_smush_msgs.generic_ajax_error;\n\t\t\t\t}\n\n\t\t\t\tif (res && res.data && res.data.message) {\n\t\t\t\t\tmessage = res.data.message;\n\t\t\t\t}\n\n\t\t\t\tif (message) {\n\t\t\t\t\tbutton.classList.remove('sui-button-onload');\n\n\t\t\t\t\tconst noticeMessage = `

${message}

`;\n\t\t\t\t\tconst noticeOptions = {\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\ticon: 'info',\n\t\t\t\t\t\tautoclose: {\n\t\t\t\t\t\t\tshow: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\n\t\t\t\t\twindow.SUI.openNotice(\n\t\t\t\t\t\t'wp-smush-webp-delete-all-error-notice',\n\t\t\t\t\t\tnoticeMessage,\n\t\t\t\t\t\tnoticeOptions\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\txhr.send('_ajax_nonce=' + this.nonceField[0].value);\n\t\t},\n\n\t\ttoggleWizard(e) {\n\t\t\te.currentTarget.classList.add('sui-button-onload');\n\n\t\t\tconst xhr = new XMLHttpRequest();\n\t\t\txhr.open(\n\t\t\t\t'GET',\n\t\t\t\tajaxurl +\n\t\t\t\t\t'?action=smush_toggle_webp_wizard&_ajax_nonce=' +\n\t\t\t\t\twindow.wp_smush_msgs.webp_nonce,\n\t\t\t\ttrue\n\t\t\t);\n\t\t\txhr.onload = () => location.reload();\n\t\t\txhr.send();\n\t\t},\n\n\t\t/**\n\t\t * Triggers the scanning of images for updating the images to re-smush.\n\t\t *\n\t\t * @since 3.8.0\n\t\t */\n\t\trunScan() {\n\t\t\tconst xhr = new XMLHttpRequest(),\n\t\t\t\tnonceField = document.getElementsByName(\n\t\t\t\t\t'wp_smush_options_nonce'\n\t\t\t\t);\n\n\t\t\txhr.open('POST', ajaxurl + '?action=scan_for_resmush', true);\n\t\t\txhr.setRequestHeader(\n\t\t\t\t'Content-type',\n\t\t\t\t'application/x-www-form-urlencoded'\n\t\t\t);\n\n\t\t\txhr.send('_ajax_nonce=' + nonceField[0].value);\n\n\t\t\treturn xhr;\n\t\t},\n\n\t\t/**\n\t\t * Show message (notice).\n\t\t *\n\t\t * @param {string} message\n\t\t * @param {string} type\n\t\t */\n\t\tshowNotice(message, type) {\n\t\t\tif ('undefined' === typeof message) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst noticeMessage = `

${message}

`;\n\t\t\tconst noticeOptions = {\n\t\t\t\ttype: type || 'error',\n\t\t\t\ticon: 'info',\n\t\t\t\tdismiss: {\n\t\t\t\t\tshow: true,\n\t\t\t\t\tlabel: window.wp_smush_msgs.noticeDismiss,\n\t\t\t\t\ttooltip: window.wp_smush_msgs.noticeDismissTooltip,\n\t\t\t\t},\n\t\t\t\tautoclose: {\n\t\t\t\t\tshow: false,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\twindow.SUI.openNotice(\n\t\t\t\t'wp-smush-ajax-notice',\n\t\t\t\tnoticeMessage,\n\t\t\t\tnoticeOptions\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Show delete all webp success notice.\n\t\t */\n\t\tmaybeShowDeleteAllSuccessNotice() {\n\t\t\tif (!document.getElementById('wp-smush-webp-delete-all-notice')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst noticeMessage = `

${\n\t\t\t\tdocument.getElementById('wp-smush-webp-delete-all-notice')\n\t\t\t\t\t.dataset.message\n\t\t\t}

`;\n\n\t\t\tconst noticeOptions = {\n\t\t\t\ttype: 'success',\n\t\t\t\ticon: 'check-tick',\n\t\t\t\tdismiss: {\n\t\t\t\t\tshow: true,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\twindow.SUI.openNotice(\n\t\t\t\t'wp-smush-webp-delete-all-notice',\n\t\t\t\tnoticeMessage,\n\t\t\t\tnoticeOptions\n\t\t\t);\n\t\t},\n\t};\n\n\tWP_Smush.WebP.init();\n})();\n","/* global ajaxurl */\n\n/**\n * External dependencies\n */\nimport assign from 'lodash/assign';\n\n/**\n * Wrapper function for ajax calls to WordPress.\n *\n * @since 3.12.0\n */\nfunction SmushFetcher() {\n\t/**\n\t * Request ajax with a promise.\n\t * Use FormData Object as data if you need to upload file\n\t *\n\t * @param {string} action\n\t * @param {Object|FormData} data\n\t * @param {string} method\n\t * @return {Promise} Request results.\n\t */\n\tfunction request(action, data = {}, method = 'POST') {\n\t\tconst args = {\n\t\t\turl: ajaxurl,\n\t\t\tmethod,\n\t\t\tcache: false\n\t\t};\n\n\t\tif (data instanceof FormData) {\n\t\t\tdata.append('action', action);\n\t\t\tdata.append('_ajax_nonce', window.wp_smush_msgs.nonce);\n\t\t\targs.contentType = false;\n\t\t\targs.processData = false;\n\t\t} else {\n\t\t\tdata._ajax_nonce = data._ajax_nonce || window.wp_smush_msgs.nonce;\n\t\t\tdata.action = action;\n\t\t}\n\t\targs.data = data;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tjQuery.ajax(args).done(resolve).fail(reject);\n\t\t}).then((response) => {\n\t\t\tif (typeof response !== 'object') {\n\t\t\t\tresponse = JSON.parse(response);\n\t\t\t}\n\t\t\treturn response;\n\t\t}).catch((error) => {\n\t\t\tconsole.error('Error:', error);\n\t\t});\n\t}\n\n\tconst methods = {\n\t\t/**\n\t\t * Manage ajax for background.\n\t\t */\n\t\tbackground: {\n\t\t\t/**\n\t\t\t * Start background process.\n\t\t\t */\n\t\t\tstart: () => {\n\t\t\t\treturn request('bulk_smush_start');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Cancel background process.\n\t\t\t */\n\t\t\tcancel: () => {\n\t\t\t\treturn request('bulk_smush_cancel');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Initial State - Get stats on the first time.\n\t\t\t */\n\t\t\tinitState: () => {\n\t\t\t\treturn request('bulk_smush_get_status');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Get stats.\n\t\t\t */\n\t\t\tgetStatus: () => {\n\t\t\t\treturn request('bulk_smush_get_status');\n\t\t\t},\n\n\t\t\tgetStats: () => {\n\t\t\t\treturn request('bulk_smush_get_global_stats');\n\t\t\t}\n\t\t},\n\t\tsmush: {\n\t\t\t/**\n\t\t\t * Sync stats.\n\t\t\t */\n\t\t\tsyncStats: ( data ) => {\n\t\t\t\tdata = data || {};\n\t\t\t\treturn request('get_stats', data);\n\t\t\t},\n\n\t\t\t/**\n * Ignore All.\n */\n\t\t\tignoreAll: ( type ) => {\n return request('wp_smush_ignore_all_failed_items', {\n type: type,\n });\n },\n\t\t},\n\n\t\t/**\n\t\t * Manage ajax for other requests\n\t\t */\n\t\tcommon: {\n\t\t\t/**\n\t\t\t * Dismiss Notice.\n\t\t\t *\n\t\t\t * @param {string} dismissId Notification id.\n\t\t\t */\n\t\t\tdismissNotice: (dismissId) => {\n\t\t\t\treturn request('smush_dismiss_notice', {\n\t\t\t\t\tkey: dismissId\n\t\t\t\t});\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Hide the new features modal.\n\t\t\t *\n\t\t\t * @param {string} modalID Notification id.\n\t\t\t */\n\t\t\thideModal: (modalID) => request('hide_modal', {\n\t\t\t\tmodal_id: modalID,\n\t\t\t}),\n\n\t\t\t/**\n\t\t\t * Custom request.\n\t\t\t *\n\t\t\t * @param {Object} data\n\t\t\t */\n\t\t\trequest: (data) => data.action && request(data.action, data),\n\t\t},\n\n\t\tscanMediaLibrary: {\n\t\t\tstart: ( optimize_on_scan_completed = false ) => {\n\t\t\t\toptimize_on_scan_completed = optimize_on_scan_completed ? 1 : 0;\n\t\t\t\tconst _ajax_nonce = window.wp_smushit_data.media_library_scan.nonce;\n\t\t\t\treturn request( 'wp_smush_start_background_scan', {\n\t\t\t\t\toptimize_on_scan_completed,\n\t\t\t\t\t_ajax_nonce,\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\tcancel: () => {\n\t\t\t\tconst _ajax_nonce = window.wp_smushit_data.media_library_scan.nonce;\n\t\t\t\treturn request( 'wp_smush_cancel_background_scan', {\n\t\t\t\t\t_ajax_nonce,\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\tgetScanStatus: () => {\n\t\t\t\tconst _ajax_nonce = window.wp_smushit_data.media_library_scan.nonce;\n\t\t\t\treturn request( 'wp_smush_get_background_scan_status', {\n\t\t\t\t\t_ajax_nonce,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t};\n\n\tassign(this, methods);\n}\n\nconst SmushAjax = new SmushFetcher();\nexport default SmushAjax;","/*!\n * jquery.fancytree.js\n * Tree view control with support for lazy loading and much more.\n * https://github.com/mar10/fancytree/\n *\n * Copyright (c) 2008-2021, Martin Wendt (https://wwWendt.de)\n * Released under the MIT license\n * https://github.com/mar10/fancytree/wiki/LicenseInfo\n *\n * @version 2.38.1-0\n * @date 2021-09-09T01:07:22Z\n */\n\n/** Core Fancytree module.\n */\n\n// UMD wrapper for the Fancytree core module\n(function (factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([\"jquery\", \"./jquery.fancytree.ui-deps\"], factory);\n\t} else if (typeof module === \"object\" && module.exports) {\n\t\t// Node/CommonJS\n\t\trequire(\"./jquery.fancytree.ui-deps\");\n\t\tmodule.exports = factory(require(\"jquery\"));\n\t} else {\n\t\t// Browser globals\n\t\tfactory(jQuery);\n\t}\n})(function ($) {\n\t\"use strict\";\n\n\t// prevent duplicate loading\n\tif ($.ui && $.ui.fancytree) {\n\t\t$.ui.fancytree.warn(\"Fancytree: ignored duplicate include\");\n\t\treturn;\n\t}\n\n\t/******************************************************************************\n\t * Private functions and variables\n\t */\n\n\tvar i,\n\t\tattr,\n\t\tFT = null, // initialized below\n\t\tTEST_IMG = new RegExp(/\\.|\\//), // strings are considered image urls if they contain '.' or '/'\n\t\tREX_HTML = /[&<>\"'/]/g, // Escape those characters\n\t\tREX_TOOLTIP = /[<>\"'/]/g, // Don't escape `&` in tooltips\n\t\tRECURSIVE_REQUEST_ERROR = \"$recursive_request\",\n\t\tINVALID_REQUEST_TARGET_ERROR = \"$request_target_invalid\",\n\t\tENTITY_MAP = {\n\t\t\t\"&\": \"&\",\n\t\t\t\"<\": \"<\",\n\t\t\t\">\": \">\",\n\t\t\t'\"': \""\",\n\t\t\t\"'\": \"'\",\n\t\t\t\"/\": \"/\",\n\t\t},\n\t\tIGNORE_KEYCODES = { 16: true, 17: true, 18: true },\n\t\tSPECIAL_KEYCODES = {\n\t\t\t8: \"backspace\",\n\t\t\t9: \"tab\",\n\t\t\t10: \"return\",\n\t\t\t13: \"return\",\n\t\t\t// 16: null, 17: null, 18: null, // ignore shift, ctrl, alt\n\t\t\t19: \"pause\",\n\t\t\t20: \"capslock\",\n\t\t\t27: \"esc\",\n\t\t\t32: \"space\",\n\t\t\t33: \"pageup\",\n\t\t\t34: \"pagedown\",\n\t\t\t35: \"end\",\n\t\t\t36: \"home\",\n\t\t\t37: \"left\",\n\t\t\t38: \"up\",\n\t\t\t39: \"right\",\n\t\t\t40: \"down\",\n\t\t\t45: \"insert\",\n\t\t\t46: \"del\",\n\t\t\t59: \";\",\n\t\t\t61: \"=\",\n\t\t\t// 91: null, 93: null, // ignore left and right meta\n\t\t\t96: \"0\",\n\t\t\t97: \"1\",\n\t\t\t98: \"2\",\n\t\t\t99: \"3\",\n\t\t\t100: \"4\",\n\t\t\t101: \"5\",\n\t\t\t102: \"6\",\n\t\t\t103: \"7\",\n\t\t\t104: \"8\",\n\t\t\t105: \"9\",\n\t\t\t106: \"*\",\n\t\t\t107: \"+\",\n\t\t\t109: \"-\",\n\t\t\t110: \".\",\n\t\t\t111: \"/\",\n\t\t\t112: \"f1\",\n\t\t\t113: \"f2\",\n\t\t\t114: \"f3\",\n\t\t\t115: \"f4\",\n\t\t\t116: \"f5\",\n\t\t\t117: \"f6\",\n\t\t\t118: \"f7\",\n\t\t\t119: \"f8\",\n\t\t\t120: \"f9\",\n\t\t\t121: \"f10\",\n\t\t\t122: \"f11\",\n\t\t\t123: \"f12\",\n\t\t\t144: \"numlock\",\n\t\t\t145: \"scroll\",\n\t\t\t173: \"-\",\n\t\t\t186: \";\",\n\t\t\t187: \"=\",\n\t\t\t188: \",\",\n\t\t\t189: \"-\",\n\t\t\t190: \".\",\n\t\t\t191: \"/\",\n\t\t\t192: \"`\",\n\t\t\t219: \"[\",\n\t\t\t220: \"\\\\\",\n\t\t\t221: \"]\",\n\t\t\t222: \"'\",\n\t\t},\n\t\tMODIFIERS = {\n\t\t\t16: \"shift\",\n\t\t\t17: \"ctrl\",\n\t\t\t18: \"alt\",\n\t\t\t91: \"meta\",\n\t\t\t93: \"meta\",\n\t\t},\n\t\tMOUSE_BUTTONS = { 0: \"\", 1: \"left\", 2: \"middle\", 3: \"right\" },\n\t\t// Boolean attributes that can be set with equivalent class names in the LI tags\n\t\t// Note: v2.23: checkbox and hideCheckbox are *not* in this list\n\t\tCLASS_ATTRS =\n\t\t\t\"active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore\".split(\n\t\t\t\t\" \"\n\t\t\t),\n\t\tCLASS_ATTR_MAP = {},\n\t\t// Top-level Fancytree attributes, that can be set by dict\n\t\tTREE_ATTRS = \"columns types\".split(\" \"),\n\t\t// TREE_ATTR_MAP = {},\n\t\t// Top-level FancytreeNode attributes, that can be set by dict\n\t\tNODE_ATTRS =\n\t\t\t\"checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus\".split(\n\t\t\t\t\" \"\n\t\t\t),\n\t\tNODE_ATTR_MAP = {},\n\t\t// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)\n\t\tNODE_ATTR_LOWERCASE_MAP = {},\n\t\t// Attribute names that should NOT be added to node.data\n\t\tNONE_NODE_DATA_MAP = {\n\t\t\tactive: true,\n\t\t\tchildren: true,\n\t\t\tdata: true,\n\t\t\tfocus: true,\n\t\t};\n\n\tfor (i = 0; i < CLASS_ATTRS.length; i++) {\n\t\tCLASS_ATTR_MAP[CLASS_ATTRS[i]] = true;\n\t}\n\tfor (i = 0; i < NODE_ATTRS.length; i++) {\n\t\tattr = NODE_ATTRS[i];\n\t\tNODE_ATTR_MAP[attr] = true;\n\t\tif (attr !== attr.toLowerCase()) {\n\t\t\tNODE_ATTR_LOWERCASE_MAP[attr.toLowerCase()] = attr;\n\t\t}\n\t}\n\t// for(i=0; i t;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Deep-merge a list of objects (but replace array-type options).\n\t *\n\t * jQuery's $.extend(true, ...) method does a deep merge, that also merges Arrays.\n\t * This variant is used to merge extension defaults with user options, and should\n\t * merge objects, but override arrays (for example the `triggerStart: [...]` option\n\t * of ext-edit). Also `null` values are copied over and not skipped.\n\t *\n\t * See issue #876\n\t *\n\t * Example:\n\t * _simpleDeepMerge({}, o1, o2);\n\t */\n\tfunction _simpleDeepMerge() {\n\t\tvar options,\n\t\t\tname,\n\t\t\tsrc,\n\t\t\tcopy,\n\t\t\tclone,\n\t\t\ttarget = arguments[0] || {},\n\t\t\ti = 1,\n\t\t\tlength = arguments.length;\n\n\t\t// Handle case when target is a string or something (possible in deep copy)\n\t\tif (typeof target !== \"object\" && !_isFunction(target)) {\n\t\t\ttarget = {};\n\t\t}\n\t\tif (i === length) {\n\t\t\tthrow Error(\"need at least two args\");\n\t\t}\n\t\tfor (; i < length; i++) {\n\t\t\t// Only deal with non-null/undefined values\n\t\t\tif ((options = arguments[i]) != null) {\n\t\t\t\t// Extend the base object\n\t\t\t\tfor (name in options) {\n\t\t\t\t\tif (_hasProp(options, name)) {\n\t\t\t\t\t\tsrc = target[name];\n\t\t\t\t\t\tcopy = options[name];\n\t\t\t\t\t\t// Prevent never-ending loop\n\t\t\t\t\t\tif (target === copy) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Recurse if we're merging plain objects\n\t\t\t\t\t\t// (NOTE: unlike $.extend, we don't merge arrays, but replace them)\n\t\t\t\t\t\tif (copy && $.isPlainObject(copy)) {\n\t\t\t\t\t\t\tclone = src && $.isPlainObject(src) ? src : {};\n\t\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\t\ttarget[name] = _simpleDeepMerge(clone, copy);\n\t\t\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t\t} else if (copy !== undefined) {\n\t\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return the modified object\n\t\treturn target;\n\t}\n\n\t/** Return a wrapper that calls sub.methodName() and exposes\n\t * this : tree\n\t * this._local : tree.ext.EXTNAME\n\t * this._super : base.methodName.call()\n\t * this._superApply : base.methodName.apply()\n\t */\n\tfunction _makeVirtualFunction(methodName, tree, base, extension, extName) {\n\t\t// $.ui.fancytree.debug(\"_makeVirtualFunction\", methodName, tree, base, extension, extName);\n\t\t// if(rexTestSuper && !rexTestSuper.test(func)){\n\t\t// // extension.methodName() doesn't call _super(), so no wrapper required\n\t\t// return func;\n\t\t// }\n\t\t// Use an immediate function as closure\n\t\tvar proxy = (function () {\n\t\t\tvar prevFunc = tree[methodName], // org. tree method or prev. proxy\n\t\t\t\tbaseFunc = extension[methodName], //\n\t\t\t\t_local = tree.ext[extName],\n\t\t\t\t_super = function () {\n\t\t\t\t\treturn prevFunc.apply(tree, arguments);\n\t\t\t\t},\n\t\t\t\t_superApply = function (args) {\n\t\t\t\t\treturn prevFunc.apply(tree, args);\n\t\t\t\t};\n\n\t\t\t// Return the wrapper function\n\t\t\treturn function () {\n\t\t\t\tvar prevLocal = tree._local,\n\t\t\t\t\tprevSuper = tree._super,\n\t\t\t\t\tprevSuperApply = tree._superApply;\n\n\t\t\t\ttry {\n\t\t\t\t\ttree._local = _local;\n\t\t\t\t\ttree._super = _super;\n\t\t\t\t\ttree._superApply = _superApply;\n\t\t\t\t\treturn baseFunc.apply(tree, arguments);\n\t\t\t\t} finally {\n\t\t\t\t\ttree._local = prevLocal;\n\t\t\t\t\ttree._super = prevSuper;\n\t\t\t\t\ttree._superApply = prevSuperApply;\n\t\t\t\t}\n\t\t\t};\n\t\t})(); // end of Immediate Function\n\t\treturn proxy;\n\t}\n\n\t/**\n\t * Subclass `base` by creating proxy functions\n\t */\n\tfunction _subclassObject(tree, base, extension, extName) {\n\t\t// $.ui.fancytree.debug(\"_subclassObject\", tree, base, extension, extName);\n\t\tfor (var attrName in extension) {\n\t\t\tif (typeof extension[attrName] === \"function\") {\n\t\t\t\tif (typeof tree[attrName] === \"function\") {\n\t\t\t\t\t// override existing method\n\t\t\t\t\ttree[attrName] = _makeVirtualFunction(\n\t\t\t\t\t\tattrName,\n\t\t\t\t\t\ttree,\n\t\t\t\t\t\tbase,\n\t\t\t\t\t\textension,\n\t\t\t\t\t\textName\n\t\t\t\t\t);\n\t\t\t\t} else if (attrName.charAt(0) === \"_\") {\n\t\t\t\t\t// Create private methods in tree.ext.EXTENSION namespace\n\t\t\t\t\ttree.ext[extName][attrName] = _makeVirtualFunction(\n\t\t\t\t\t\tattrName,\n\t\t\t\t\t\ttree,\n\t\t\t\t\t\tbase,\n\t\t\t\t\t\textension,\n\t\t\t\t\t\textName\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$.error(\n\t\t\t\t\t\t\"Could not override tree.\" +\n\t\t\t\t\t\t\tattrName +\n\t\t\t\t\t\t\t\". Use prefix '_' to create tree.\" +\n\t\t\t\t\t\t\textName +\n\t\t\t\t\t\t\t\"._\" +\n\t\t\t\t\t\t\tattrName\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Create member variables in tree.ext.EXTENSION namespace\n\t\t\t\tif (attrName !== \"options\") {\n\t\t\t\t\ttree.ext[extName][attrName] = extension[attrName];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction _getResolvedPromise(context, argArray) {\n\t\tif (context === undefined) {\n\t\t\treturn $.Deferred(function () {\n\t\t\t\tthis.resolve();\n\t\t\t}).promise();\n\t\t}\n\t\treturn $.Deferred(function () {\n\t\t\tthis.resolveWith(context, argArray);\n\t\t}).promise();\n\t}\n\n\tfunction _getRejectedPromise(context, argArray) {\n\t\tif (context === undefined) {\n\t\t\treturn $.Deferred(function () {\n\t\t\t\tthis.reject();\n\t\t\t}).promise();\n\t\t}\n\t\treturn $.Deferred(function () {\n\t\t\tthis.rejectWith(context, argArray);\n\t\t}).promise();\n\t}\n\n\tfunction _makeResolveFunc(deferred, context) {\n\t\treturn function () {\n\t\t\tdeferred.resolveWith(context);\n\t\t};\n\t}\n\n\tfunction _getElementDataAsDict($el) {\n\t\t// Evaluate 'data-NAME' attributes with special treatment for 'data-json'.\n\t\tvar d = $.extend({}, $el.data()),\n\t\t\tjson = d.json;\n\n\t\tdelete d.fancytree; // added to container by widget factory (old jQuery UI)\n\t\tdelete d.uiFancytree; // added to container by widget factory\n\n\t\tif (json) {\n\t\t\tdelete d.json;\n\t\t\t//
  • is already returned as object (http://api.jquery.com/data/#data-html5)\n\t\t\td = $.extend(d, json);\n\t\t}\n\t\treturn d;\n\t}\n\n\tfunction _escapeTooltip(s) {\n\t\treturn (\"\" + s).replace(REX_TOOLTIP, function (s) {\n\t\t\treturn ENTITY_MAP[s];\n\t\t});\n\t}\n\n\t// TODO: use currying\n\tfunction _makeNodeTitleMatcher(s) {\n\t\ts = s.toLowerCase();\n\t\treturn function (node) {\n\t\t\treturn node.title.toLowerCase().indexOf(s) >= 0;\n\t\t};\n\t}\n\n\tfunction _makeNodeTitleStartMatcher(s) {\n\t\tvar reMatch = new RegExp(\"^\" + s, \"i\");\n\t\treturn function (node) {\n\t\t\treturn reMatch.test(node.title);\n\t\t};\n\t}\n\n\t/******************************************************************************\n\t * FancytreeNode\n\t */\n\n\t/**\n\t * Creates a new FancytreeNode\n\t *\n\t * @class FancytreeNode\n\t * @classdesc A FancytreeNode represents the hierarchical data model and operations.\n\t *\n\t * @param {FancytreeNode} parent\n\t * @param {NodeData} obj\n\t *\n\t * @property {Fancytree} tree The tree instance\n\t * @property {FancytreeNode} parent The parent node\n\t * @property {string} key Node id (must be unique inside the tree)\n\t * @property {string} title Display name (may contain HTML)\n\t * @property {object} data Contains all extra data that was passed on node creation\n\t * @property {FancytreeNode[] | null | undefined} children Array of child nodes.
    \n\t * For lazy nodes, null or undefined means 'not yet loaded'. Use an empty array\n\t * to define a node that has no children.\n\t * @property {boolean} expanded Use isExpanded(), setExpanded() to access this property.\n\t * @property {string} extraClasses Additional CSS classes, added to the node's ``.
    \n\t * Note: use `node.add/remove/toggleClass()` to modify.\n\t * @property {boolean} folder Folder nodes have different default icons and click behavior.
    \n\t * Note: Also non-folders may have children.\n\t * @property {string} statusNodeType null for standard nodes. Otherwise type of special system node: 'error', 'loading', 'nodata', or 'paging'.\n\t * @property {boolean} lazy True if this node is loaded on demand, i.e. on first expansion.\n\t * @property {boolean} selected Use isSelected(), setSelected() to access this property.\n\t * @property {string} tooltip Alternative description used as hover popup\n\t * @property {string} iconTooltip Description used as hover popup for icon. @since 2.27\n\t * @property {string} type Node type, used with tree.types map. @since 2.27\n\t */\n\tfunction FancytreeNode(parent, obj) {\n\t\tvar i, l, name, cl;\n\n\t\tthis.parent = parent;\n\t\tthis.tree = parent.tree;\n\t\tthis.ul = null;\n\t\tthis.li = null; //
  • tag\n\t\tthis.statusNodeType = null; // if this is a temp. node to display the status of its parent\n\t\tthis._isLoading = false; // if this node itself is loading\n\t\tthis._error = null; // {message: '...'} if a load error occurred\n\t\tthis.data = {};\n\n\t\t// TODO: merge this code with node.toDict()\n\t\t// copy attributes from obj object\n\t\tfor (i = 0, l = NODE_ATTRS.length; i < l; i++) {\n\t\t\tname = NODE_ATTRS[i];\n\t\t\tthis[name] = obj[name];\n\t\t}\n\t\t// unselectableIgnore and unselectableStatus imply unselectable\n\t\tif (\n\t\t\tthis.unselectableIgnore != null ||\n\t\t\tthis.unselectableStatus != null\n\t\t) {\n\t\t\tthis.unselectable = true;\n\t\t}\n\t\tif (obj.hideCheckbox) {\n\t\t\t$.error(\n\t\t\t\t\"'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'\"\n\t\t\t);\n\t\t}\n\t\t// node.data += obj.data\n\t\tif (obj.data) {\n\t\t\t$.extend(this.data, obj.data);\n\t\t}\n\t\t// Copy all other attributes to this.data.NAME\n\t\tfor (name in obj) {\n\t\t\tif (\n\t\t\t\t!NODE_ATTR_MAP[name] &&\n\t\t\t\t(this.tree.options.copyFunctionsToData ||\n\t\t\t\t\t!_isFunction(obj[name])) &&\n\t\t\t\t!NONE_NODE_DATA_MAP[name]\n\t\t\t) {\n\t\t\t\t// node.data.NAME = obj.NAME\n\t\t\t\tthis.data[name] = obj[name];\n\t\t\t}\n\t\t}\n\n\t\t// Fix missing key\n\t\tif (this.key == null) {\n\t\t\t// test for null OR undefined\n\t\t\tif (this.tree.options.defaultKey) {\n\t\t\t\tthis.key = \"\" + this.tree.options.defaultKey(this);\n\t\t\t\t_assert(this.key, \"defaultKey() must return a unique key\");\n\t\t\t} else {\n\t\t\t\tthis.key = \"_\" + FT._nextNodeKey++;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.key = \"\" + this.key; // Convert to string (#217)\n\t\t}\n\n\t\t// Fix tree.activeNode\n\t\t// TODO: not elegant: we use obj.active as marker to set tree.activeNode\n\t\t// when loading from a dictionary.\n\t\tif (obj.active) {\n\t\t\t_assert(\n\t\t\t\tthis.tree.activeNode === null,\n\t\t\t\t\"only one active node allowed\"\n\t\t\t);\n\t\t\tthis.tree.activeNode = this;\n\t\t}\n\t\tif (obj.selected) {\n\t\t\t// #186\n\t\t\tthis.tree.lastSelectedNode = this;\n\t\t}\n\t\t// TODO: handle obj.focus = true\n\n\t\t// Create child nodes\n\t\tcl = obj.children;\n\t\tif (cl) {\n\t\t\tif (cl.length) {\n\t\t\t\tthis._setChildren(cl);\n\t\t\t} else {\n\t\t\t\t// if an empty array was passed for a lazy node, keep it, in order to mark it 'loaded'\n\t\t\t\tthis.children = this.lazy ? [] : null;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.children = null;\n\t\t}\n\t\t// Add to key/ref map (except for root node)\n\t\t//\tif( parent ) {\n\t\tthis.tree._callHook(\"treeRegisterNode\", this.tree, true, this);\n\t\t//\t}\n\t}\n\n\tFancytreeNode.prototype = /** @lends FancytreeNode# */ {\n\t\t/* Return the direct child FancytreeNode with a given key, index. */\n\t\t_findDirectChild: function (ptr) {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tcl = this.children;\n\n\t\t\tif (cl) {\n\t\t\t\tif (typeof ptr === \"string\") {\n\t\t\t\t\tfor (i = 0, l = cl.length; i < l; i++) {\n\t\t\t\t\t\tif (cl[i].key === ptr) {\n\t\t\t\t\t\t\treturn cl[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof ptr === \"number\") {\n\t\t\t\t\treturn this.children[ptr];\n\t\t\t\t} else if (ptr.parent === this) {\n\t\t\t\t\treturn ptr;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t// TODO: activate()\n\t\t// TODO: activateSilently()\n\t\t/* Internal helper called in recursive addChildren sequence.*/\n\t\t_setChildren: function (children) {\n\t\t\t_assert(\n\t\t\t\tchildren && (!this.children || this.children.length === 0),\n\t\t\t\t\"only init supported\"\n\t\t\t);\n\t\t\tthis.children = [];\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tthis.children.push(new FancytreeNode(this, children[i]));\n\t\t\t}\n\t\t\tthis.tree._callHook(\n\t\t\t\t\"treeStructureChanged\",\n\t\t\t\tthis.tree,\n\t\t\t\t\"setChildren\"\n\t\t\t);\n\t\t},\n\t\t/**\n\t\t * Append (or insert) a list of child nodes.\n\t\t *\n\t\t * @param {NodeData[]} children array of child node definitions (also single child accepted)\n\t\t * @param {FancytreeNode | string | Integer} [insertBefore] child node (or key or index of such).\n\t\t * If omitted, the new children are appended.\n\t\t * @returns {FancytreeNode} first child added\n\t\t *\n\t\t * @see FancytreeNode#applyPatch\n\t\t */\n\t\taddChildren: function (children, insertBefore) {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tpos,\n\t\t\t\torigFirstChild = this.getFirstChild(),\n\t\t\t\torigLastChild = this.getLastChild(),\n\t\t\t\tfirstNode = null,\n\t\t\t\tnodeList = [];\n\n\t\t\tif ($.isPlainObject(children)) {\n\t\t\t\tchildren = [children];\n\t\t\t}\n\t\t\tif (!this.children) {\n\t\t\t\tthis.children = [];\n\t\t\t}\n\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\tnodeList.push(new FancytreeNode(this, children[i]));\n\t\t\t}\n\t\t\tfirstNode = nodeList[0];\n\t\t\tif (insertBefore == null) {\n\t\t\t\tthis.children = this.children.concat(nodeList);\n\t\t\t} else {\n\t\t\t\t// Returns null if insertBefore is not a direct child:\n\t\t\t\tinsertBefore = this._findDirectChild(insertBefore);\n\t\t\t\tpos = $.inArray(insertBefore, this.children);\n\t\t\t\t_assert(pos >= 0, \"insertBefore must be an existing child\");\n\t\t\t\t// insert nodeList after children[pos]\n\t\t\t\tthis.children.splice.apply(\n\t\t\t\t\tthis.children,\n\t\t\t\t\t[pos, 0].concat(nodeList)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (origFirstChild && !insertBefore) {\n\t\t\t\t// #708: Fast path -- don't render every child of root, just the new ones!\n\t\t\t\t// #723, #729: but only if it's appended to an existing child list\n\t\t\t\tfor (i = 0, l = nodeList.length; i < l; i++) {\n\t\t\t\t\tnodeList[i].render(); // New nodes were never rendered before\n\t\t\t\t}\n\t\t\t\t// Adjust classes where status may have changed\n\t\t\t\t// Has a first child\n\t\t\t\tif (origFirstChild !== this.getFirstChild()) {\n\t\t\t\t\t// Different first child -- recompute classes\n\t\t\t\t\torigFirstChild.renderStatus();\n\t\t\t\t}\n\t\t\t\tif (origLastChild !== this.getLastChild()) {\n\t\t\t\t\t// Different last child -- recompute classes\n\t\t\t\t\torigLastChild.renderStatus();\n\t\t\t\t}\n\t\t\t} else if (!this.parent || this.parent.ul || this.tr) {\n\t\t\t\t// render if the parent was rendered (or this is a root node)\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t\tif (this.tree.options.selectMode === 3) {\n\t\t\t\tthis.fixSelection3FromEndNodes();\n\t\t\t}\n\t\t\tthis.triggerModifyChild(\n\t\t\t\t\"add\",\n\t\t\t\tnodeList.length === 1 ? nodeList[0] : null\n\t\t\t);\n\t\t\treturn firstNode;\n\t\t},\n\t\t/**\n\t\t * Add class to node's span tag and to .extraClasses.\n\t\t *\n\t\t * @param {string} className class name\n\t\t *\n\t\t * @since 2.17\n\t\t */\n\t\taddClass: function (className) {\n\t\t\treturn this.toggleClass(className, true);\n\t\t},\n\t\t/**\n\t\t * Append or prepend a node, or append a child node.\n\t\t *\n\t\t * This a convenience function that calls addChildren()\n\t\t *\n\t\t * @param {NodeData} node node definition\n\t\t * @param {string} [mode=child] 'before', 'after', 'firstChild', or 'child' ('over' is a synonym for 'child')\n\t\t * @returns {FancytreeNode} new node\n\t\t */\n\t\taddNode: function (node, mode) {\n\t\t\tif (mode === undefined || mode === \"over\") {\n\t\t\t\tmode = \"child\";\n\t\t\t}\n\t\t\tswitch (mode) {\n\t\t\t\tcase \"after\":\n\t\t\t\t\treturn this.getParent().addChildren(\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tthis.getNextSibling()\n\t\t\t\t\t);\n\t\t\t\tcase \"before\":\n\t\t\t\t\treturn this.getParent().addChildren(node, this);\n\t\t\t\tcase \"firstChild\":\n\t\t\t\t\t// Insert before the first child if any\n\t\t\t\t\tvar insertBefore = this.children ? this.children[0] : null;\n\t\t\t\t\treturn this.addChildren(node, insertBefore);\n\t\t\t\tcase \"child\":\n\t\t\t\tcase \"over\":\n\t\t\t\t\treturn this.addChildren(node);\n\t\t\t}\n\t\t\t_assert(false, \"Invalid mode: \" + mode);\n\t\t},\n\t\t/**Add child status nodes that indicate 'More...', etc.\n\t\t *\n\t\t * This also maintains the node's `partload` property.\n\t\t * @param {boolean|object} node optional node definition. Pass `false` to remove all paging nodes.\n\t\t * @param {string} [mode='child'] 'child'|firstChild'\n\t\t * @since 2.15\n\t\t */\n\t\taddPagingNode: function (node, mode) {\n\t\t\tvar i, n;\n\n\t\t\tmode = mode || \"child\";\n\t\t\tif (node === false) {\n\t\t\t\tfor (i = this.children.length - 1; i >= 0; i--) {\n\t\t\t\t\tn = this.children[i];\n\t\t\t\t\tif (n.statusNodeType === \"paging\") {\n\t\t\t\t\t\tthis.removeChild(n);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.partload = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnode = $.extend(\n\t\t\t\t{\n\t\t\t\t\ttitle: this.tree.options.strings.moreData,\n\t\t\t\t\tstatusNodeType: \"paging\",\n\t\t\t\t\ticon: false,\n\t\t\t\t},\n\t\t\t\tnode\n\t\t\t);\n\t\t\tthis.partload = true;\n\t\t\treturn this.addNode(node, mode);\n\t\t},\n\t\t/**\n\t\t * Append new node after this.\n\t\t *\n\t\t * This a convenience function that calls addNode(node, 'after')\n\t\t *\n\t\t * @param {NodeData} node node definition\n\t\t * @returns {FancytreeNode} new node\n\t\t */\n\t\tappendSibling: function (node) {\n\t\t\treturn this.addNode(node, \"after\");\n\t\t},\n\t\t/**\n\t\t * (experimental) Apply a modification (or navigation) operation.\n\t\t *\n\t\t * @param {string} cmd\n\t\t * @param {object} [opts]\n\t\t * @see Fancytree#applyCommand\n\t\t * @since 2.32\n\t\t */\n\t\tapplyCommand: function (cmd, opts) {\n\t\t\treturn this.tree.applyCommand(cmd, this, opts);\n\t\t},\n\t\t/**\n\t\t * Modify existing child nodes.\n\t\t *\n\t\t * @param {NodePatch} patch\n\t\t * @returns {$.Promise}\n\t\t * @see FancytreeNode#addChildren\n\t\t */\n\t\tapplyPatch: function (patch) {\n\t\t\t// patch [key, null] means 'remove'\n\t\t\tif (patch === null) {\n\t\t\t\tthis.remove();\n\t\t\t\treturn _getResolvedPromise(this);\n\t\t\t}\n\t\t\t// TODO: make sure that root node is not collapsed or modified\n\t\t\t// copy (most) attributes to node.ATTR or node.data.ATTR\n\t\t\tvar name,\n\t\t\t\tpromise,\n\t\t\t\tv,\n\t\t\t\tIGNORE_MAP = { children: true, expanded: true, parent: true }; // TODO: should be global\n\n\t\t\tfor (name in patch) {\n\t\t\t\tif (_hasProp(patch, name)) {\n\t\t\t\t\tv = patch[name];\n\t\t\t\t\tif (!IGNORE_MAP[name] && !_isFunction(v)) {\n\t\t\t\t\t\tif (NODE_ATTR_MAP[name]) {\n\t\t\t\t\t\t\tthis[name] = v;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.data[name] = v;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove and/or create children\n\t\t\tif (_hasProp(patch, \"children\")) {\n\t\t\t\tthis.removeChildren();\n\t\t\t\tif (patch.children) {\n\t\t\t\t\t// only if not null and not empty list\n\t\t\t\t\t// TODO: addChildren instead?\n\t\t\t\t\tthis._setChildren(patch.children);\n\t\t\t\t}\n\t\t\t\t// TODO: how can we APPEND or INSERT child nodes?\n\t\t\t}\n\t\t\tif (this.isVisible()) {\n\t\t\t\tthis.renderTitle();\n\t\t\t\tthis.renderStatus();\n\t\t\t}\n\t\t\t// Expand collapse (final step, since this may be async)\n\t\t\tif (_hasProp(patch, \"expanded\")) {\n\t\t\t\tpromise = this.setExpanded(patch.expanded);\n\t\t\t} else {\n\t\t\t\tpromise = _getResolvedPromise(this);\n\t\t\t}\n\t\t\treturn promise;\n\t\t},\n\t\t/** Collapse all sibling nodes.\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tcollapseSiblings: function () {\n\t\t\treturn this.tree._callHook(\"nodeCollapseSiblings\", this);\n\t\t},\n\t\t/** Copy this node as sibling or child of `node`.\n\t\t *\n\t\t * @param {FancytreeNode} node source node\n\t\t * @param {string} [mode=child] 'before' | 'after' | 'child'\n\t\t * @param {Function} [map] callback function(NodeData, FancytreeNode) that could modify the new node\n\t\t * @returns {FancytreeNode} new\n\t\t */\n\t\tcopyTo: function (node, mode, map) {\n\t\t\treturn node.addNode(this.toDict(true, map), mode);\n\t\t},\n\t\t/** Count direct and indirect children.\n\t\t *\n\t\t * @param {boolean} [deep=true] pass 'false' to only count direct children\n\t\t * @returns {int} number of child nodes\n\t\t */\n\t\tcountChildren: function (deep) {\n\t\t\tvar cl = this.children,\n\t\t\t\ti,\n\t\t\t\tl,\n\t\t\t\tn;\n\t\t\tif (!cl) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tn = cl.length;\n\t\t\tif (deep !== false) {\n\t\t\t\tfor (i = 0, l = n; i < l; i++) {\n\t\t\t\t\tn += cl[i].countChildren();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn n;\n\t\t},\n\t\t// TODO: deactivate()\n\t\t/** Write to browser console if debugLevel >= 4 (prepending node info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\tdebug: function (msg) {\n\t\t\tif (this.tree.options.debugLevel >= 4) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"log\", arguments);\n\t\t\t}\n\t\t},\n\t\t/** Deprecated.\n\t\t * @deprecated since 2014-02-16. Use resetLazy() instead.\n\t\t */\n\t\tdiscard: function () {\n\t\t\tthis.warn(\n\t\t\t\t\"FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead.\"\n\t\t\t);\n\t\t\treturn this.resetLazy();\n\t\t},\n\t\t/** Remove DOM elements for all descendents. May be called on .collapse event\n\t\t * to keep the DOM small.\n\t\t * @param {boolean} [includeSelf=false]\n\t\t */\n\t\tdiscardMarkup: function (includeSelf) {\n\t\t\tvar fn = includeSelf ? \"nodeRemoveMarkup\" : \"nodeRemoveChildMarkup\";\n\t\t\tthis.tree._callHook(fn, this);\n\t\t},\n\t\t/** Write error to browser console if debugLevel >= 1 (prepending tree info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\terror: function (msg) {\n\t\t\tif (this.tree.options.debugLevel >= 1) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"error\", arguments);\n\t\t\t}\n\t\t},\n\t\t/**Find all nodes that match condition (excluding self).\n\t\t *\n\t\t * @param {string | function(node)} match title string to search for, or a\n\t\t * callback function that returns `true` if a node is matched.\n\t\t * @returns {FancytreeNode[]} array of nodes (may be empty)\n\t\t */\n\t\tfindAll: function (match) {\n\t\t\tmatch = _isFunction(match) ? match : _makeNodeTitleMatcher(match);\n\t\t\tvar res = [];\n\t\t\tthis.visit(function (n) {\n\t\t\t\tif (match(n)) {\n\t\t\t\t\tres.push(n);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn res;\n\t\t},\n\t\t/**Find first node that matches condition (excluding self).\n\t\t *\n\t\t * @param {string | function(node)} match title string to search for, or a\n\t\t * callback function that returns `true` if a node is matched.\n\t\t * @returns {FancytreeNode} matching node or null\n\t\t * @see FancytreeNode#findAll\n\t\t */\n\t\tfindFirst: function (match) {\n\t\t\tmatch = _isFunction(match) ? match : _makeNodeTitleMatcher(match);\n\t\t\tvar res = null;\n\t\t\tthis.visit(function (n) {\n\t\t\t\tif (match(n)) {\n\t\t\t\t\tres = n;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn res;\n\t\t},\n\t\t/** Find a node relative to self.\n\t\t *\n\t\t * @param {number|string} where The keyCode that would normally trigger this move,\n\t\t *\t\tor a keyword ('down', 'first', 'last', 'left', 'parent', 'right', 'up').\n\t\t * @returns {FancytreeNode}\n\t\t * @since v2.31\n\t\t */\n\t\tfindRelatedNode: function (where, includeHidden) {\n\t\t\treturn this.tree.findRelatedNode(this, where, includeHidden);\n\t\t},\n\t\t/* Apply selection state (internal use only) */\n\t\t_changeSelectStatusAttrs: function (state) {\n\t\t\tvar changed = false,\n\t\t\t\topts = this.tree.options,\n\t\t\t\tunselectable = FT.evalOption(\n\t\t\t\t\t\"unselectable\",\n\t\t\t\t\tthis,\n\t\t\t\t\tthis,\n\t\t\t\t\topts,\n\t\t\t\t\tfalse\n\t\t\t\t),\n\t\t\t\tunselectableStatus = FT.evalOption(\n\t\t\t\t\t\"unselectableStatus\",\n\t\t\t\t\tthis,\n\t\t\t\t\tthis,\n\t\t\t\t\topts,\n\t\t\t\t\tundefined\n\t\t\t\t);\n\n\t\t\tif (unselectable && unselectableStatus != null) {\n\t\t\t\tstate = unselectableStatus;\n\t\t\t}\n\t\t\tswitch (state) {\n\t\t\t\tcase false:\n\t\t\t\t\tchanged = this.selected || this.partsel;\n\t\t\t\t\tthis.selected = false;\n\t\t\t\t\tthis.partsel = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase true:\n\t\t\t\t\tchanged = !this.selected || !this.partsel;\n\t\t\t\t\tthis.selected = true;\n\t\t\t\t\tthis.partsel = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase undefined:\n\t\t\t\t\tchanged = this.selected || !this.partsel;\n\t\t\t\t\tthis.selected = false;\n\t\t\t\t\tthis.partsel = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t_assert(false, \"invalid state: \" + state);\n\t\t\t}\n\t\t\t// this.debug(\"fixSelection3AfterLoad() _changeSelectStatusAttrs()\", state, changed);\n\t\t\tif (changed) {\n\t\t\t\tthis.renderStatus();\n\t\t\t}\n\t\t\treturn changed;\n\t\t},\n\t\t/**\n\t\t * Fix selection status, after this node was (de)selected in multi-hier mode.\n\t\t * This includes (de)selecting all children.\n\t\t */\n\t\tfixSelection3AfterClick: function (callOpts) {\n\t\t\tvar flag = this.isSelected();\n\n\t\t\t// this.debug(\"fixSelection3AfterClick()\");\n\n\t\t\tthis.visit(function (node) {\n\t\t\t\tnode._changeSelectStatusAttrs(flag);\n\t\t\t\tif (node.radiogroup) {\n\t\t\t\t\t// #931: don't (de)select this branch\n\t\t\t\t\treturn \"skip\";\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.fixSelection3FromEndNodes(callOpts);\n\t\t},\n\t\t/**\n\t\t * Fix selection status for multi-hier mode.\n\t\t * Only end-nodes are considered to update the descendants branch and parents.\n\t\t * Should be called after this node has loaded new children or after\n\t\t * children have been modified using the API.\n\t\t */\n\t\tfixSelection3FromEndNodes: function (callOpts) {\n\t\t\tvar opts = this.tree.options;\n\n\t\t\t// this.debug(\"fixSelection3FromEndNodes()\");\n\t\t\t_assert(opts.selectMode === 3, \"expected selectMode 3\");\n\n\t\t\t// Visit all end nodes and adjust their parent's `selected` and `partsel`\n\t\t\t// attributes. Return selection state true, false, or undefined.\n\t\t\tfunction _walk(node) {\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tchild,\n\t\t\t\t\ts,\n\t\t\t\t\tstate,\n\t\t\t\t\tallSelected,\n\t\t\t\t\tsomeSelected,\n\t\t\t\t\tunselIgnore,\n\t\t\t\t\tunselState,\n\t\t\t\t\tchildren = node.children;\n\n\t\t\t\tif (children && children.length) {\n\t\t\t\t\t// check all children recursively\n\t\t\t\t\tallSelected = true;\n\t\t\t\t\tsomeSelected = false;\n\n\t\t\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\t\tchild = children[i];\n\t\t\t\t\t\t// the selection state of a node is not relevant; we need the end-nodes\n\t\t\t\t\t\ts = _walk(child);\n\t\t\t\t\t\t// if( !child.unselectableIgnore ) {\n\t\t\t\t\t\tunselIgnore = FT.evalOption(\n\t\t\t\t\t\t\t\"unselectableIgnore\",\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\topts,\n\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (!unselIgnore) {\n\t\t\t\t\t\t\tif (s !== false) {\n\t\t\t\t\t\t\t\tsomeSelected = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (s !== true) {\n\t\t\t\t\t\t\t\tallSelected = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\t\tstate = allSelected\n\t\t\t\t\t\t? true\n\t\t\t\t\t\t: someSelected\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: false;\n\t\t\t\t} else {\n\t\t\t\t\t// This is an end-node: simply report the status\n\t\t\t\t\tunselState = FT.evalOption(\n\t\t\t\t\t\t\"unselectableStatus\",\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\tundefined\n\t\t\t\t\t);\n\t\t\t\t\tstate = unselState == null ? !!node.selected : !!unselState;\n\t\t\t\t}\n\t\t\t\t// #939: Keep a `partsel` flag that was explicitly set on a lazy node\n\t\t\t\tif (\n\t\t\t\t\tnode.partsel &&\n\t\t\t\t\t!node.selected &&\n\t\t\t\t\tnode.lazy &&\n\t\t\t\t\tnode.children == null\n\t\t\t\t) {\n\t\t\t\t\tstate = undefined;\n\t\t\t\t}\n\t\t\t\tnode._changeSelectStatusAttrs(state);\n\t\t\t\treturn state;\n\t\t\t}\n\t\t\t_walk(this);\n\n\t\t\t// Update parent's state\n\t\t\tthis.visitParents(function (node) {\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tchild,\n\t\t\t\t\tstate,\n\t\t\t\t\tunselIgnore,\n\t\t\t\t\tunselState,\n\t\t\t\t\tchildren = node.children,\n\t\t\t\t\tallSelected = true,\n\t\t\t\t\tsomeSelected = false;\n\n\t\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\tchild = children[i];\n\t\t\t\t\tunselIgnore = FT.evalOption(\n\t\t\t\t\t\t\"unselectableIgnore\",\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\tfalse\n\t\t\t\t\t);\n\t\t\t\t\tif (!unselIgnore) {\n\t\t\t\t\t\tunselState = FT.evalOption(\n\t\t\t\t\t\t\t\"unselectableStatus\",\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\topts,\n\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t);\n\t\t\t\t\t\tstate =\n\t\t\t\t\t\t\tunselState == null\n\t\t\t\t\t\t\t\t? !!child.selected\n\t\t\t\t\t\t\t\t: !!unselState;\n\t\t\t\t\t\t// When fixing the parents, we trust the sibling status (i.e.\n\t\t\t\t\t\t// we don't recurse)\n\t\t\t\t\t\tif (state || child.partsel) {\n\t\t\t\t\t\t\tsomeSelected = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!state) {\n\t\t\t\t\t\t\tallSelected = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\tstate = allSelected ? true : someSelected ? undefined : false;\n\t\t\t\tnode._changeSelectStatusAttrs(state);\n\t\t\t});\n\t\t},\n\t\t// TODO: focus()\n\t\t/**\n\t\t * Update node data. If dict contains 'children', then also replace\n\t\t * the hole sub tree.\n\t\t * @param {NodeData} dict\n\t\t *\n\t\t * @see FancytreeNode#addChildren\n\t\t * @see FancytreeNode#applyPatch\n\t\t */\n\t\tfromDict: function (dict) {\n\t\t\t// copy all other attributes to this.data.xxx\n\t\t\tfor (var name in dict) {\n\t\t\t\tif (NODE_ATTR_MAP[name]) {\n\t\t\t\t\t// node.NAME = dict.NAME\n\t\t\t\t\tthis[name] = dict[name];\n\t\t\t\t} else if (name === \"data\") {\n\t\t\t\t\t// node.data += dict.data\n\t\t\t\t\t$.extend(this.data, dict.data);\n\t\t\t\t} else if (\n\t\t\t\t\t!_isFunction(dict[name]) &&\n\t\t\t\t\t!NONE_NODE_DATA_MAP[name]\n\t\t\t\t) {\n\t\t\t\t\t// node.data.NAME = dict.NAME\n\t\t\t\t\tthis.data[name] = dict[name];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dict.children) {\n\t\t\t\t// recursively set children and render\n\t\t\t\tthis.removeChildren();\n\t\t\t\tthis.addChildren(dict.children);\n\t\t\t}\n\t\t\tthis.renderTitle();\n\t\t\t/*\n\t\t\tvar children = dict.children;\n\t\t\tif(children === undefined){\n\t\t\t\tthis.data = $.extend(this.data, dict);\n\t\t\t\tthis.render();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdict = $.extend({}, dict);\n\t\t\tdict.children = undefined;\n\t\t\tthis.data = $.extend(this.data, dict);\n\t\t\tthis.removeChildren();\n\t\t\tthis.addChild(children);\n\t\t\t*/\n\t\t},\n\t\t/** Return the list of child nodes (undefined for unexpanded lazy nodes).\n\t\t * @returns {FancytreeNode[] | undefined}\n\t\t */\n\t\tgetChildren: function () {\n\t\t\tif (this.hasChildren() === undefined) {\n\t\t\t\t// TODO: only required for lazy nodes?\n\t\t\t\treturn undefined; // Lazy node: unloaded, currently loading, or load error\n\t\t\t}\n\t\t\treturn this.children;\n\t\t},\n\t\t/** Return the first child node or null.\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetFirstChild: function () {\n\t\t\treturn this.children ? this.children[0] : null;\n\t\t},\n\t\t/** Return the 0-based child index.\n\t\t * @returns {int}\n\t\t */\n\t\tgetIndex: function () {\n\t\t\t// return this.parent.children.indexOf(this);\n\t\t\treturn $.inArray(this, this.parent.children); // indexOf doesn't work in IE7\n\t\t},\n\t\t/** Return the hierarchical child index (1-based, e.g. '3.2.4').\n\t\t * @param {string} [separator=\".\"]\n\t\t * @param {int} [digits=1]\n\t\t * @returns {string}\n\t\t */\n\t\tgetIndexHier: function (separator, digits) {\n\t\t\tseparator = separator || \".\";\n\t\t\tvar s,\n\t\t\t\tres = [];\n\t\t\t$.each(this.getParentList(false, true), function (i, o) {\n\t\t\t\ts = \"\" + (o.getIndex() + 1);\n\t\t\t\tif (digits) {\n\t\t\t\t\t// prepend leading zeroes\n\t\t\t\t\ts = (\"0000000\" + s).substr(-digits);\n\t\t\t\t}\n\t\t\t\tres.push(s);\n\t\t\t});\n\t\t\treturn res.join(separator);\n\t\t},\n\t\t/** Return the parent keys separated by options.keyPathSeparator, e.g. \"/id_1/id_17/id_32\".\n\t\t *\n\t\t * (Unlike `node.getPath()`, this method prepends a \"/\" and inverts the first argument.)\n\t\t *\n\t\t * @see FancytreeNode#getPath\n\t\t * @param {boolean} [excludeSelf=false]\n\t\t * @returns {string}\n\t\t */\n\t\tgetKeyPath: function (excludeSelf) {\n\t\t\tvar sep = this.tree.options.keyPathSeparator;\n\n\t\t\treturn sep + this.getPath(!excludeSelf, \"key\", sep);\n\t\t},\n\t\t/** Return the last child of this node or null.\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetLastChild: function () {\n\t\t\treturn this.children\n\t\t\t\t? this.children[this.children.length - 1]\n\t\t\t\t: null;\n\t\t},\n\t\t/** Return node depth. 0: System root node, 1: visible top-level node, 2: first sub-level, ... .\n\t\t * @returns {int}\n\t\t */\n\t\tgetLevel: function () {\n\t\t\tvar level = 0,\n\t\t\t\tdtn = this.parent;\n\t\t\twhile (dtn) {\n\t\t\t\tlevel++;\n\t\t\t\tdtn = dtn.parent;\n\t\t\t}\n\t\t\treturn level;\n\t\t},\n\t\t/** Return the successor node (under the same parent) or null.\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetNextSibling: function () {\n\t\t\t// TODO: use indexOf, if available: (not in IE6)\n\t\t\tif (this.parent) {\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tac = this.parent.children;\n\n\t\t\t\tfor (i = 0, l = ac.length - 1; i < l; i++) {\n\t\t\t\t\t// up to length-2, so next(last) = null\n\t\t\t\t\tif (ac[i] === this) {\n\t\t\t\t\t\treturn ac[i + 1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t/** Return the parent node (null for the system root node).\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetParent: function () {\n\t\t\t// TODO: return null for top-level nodes?\n\t\t\treturn this.parent;\n\t\t},\n\t\t/** Return an array of all parent nodes (top-down).\n\t\t * @param {boolean} [includeRoot=false] Include the invisible system root node.\n\t\t * @param {boolean} [includeSelf=false] Include the node itself.\n\t\t * @returns {FancytreeNode[]}\n\t\t */\n\t\tgetParentList: function (includeRoot, includeSelf) {\n\t\t\tvar l = [],\n\t\t\t\tdtn = includeSelf ? this : this.parent;\n\t\t\twhile (dtn) {\n\t\t\t\tif (includeRoot || dtn.parent) {\n\t\t\t\t\tl.unshift(dtn);\n\t\t\t\t}\n\t\t\t\tdtn = dtn.parent;\n\t\t\t}\n\t\t\treturn l;\n\t\t},\n\t\t/** Return a string representing the hierachical node path, e.g. \"a/b/c\".\n\t\t * @param {boolean} [includeSelf=true]\n\t\t * @param {string | function} [part=\"title\"] node property name or callback\n\t\t * @param {string} [separator=\"/\"]\n\t\t * @returns {string}\n\t\t * @since v2.31\n\t\t */\n\t\tgetPath: function (includeSelf, part, separator) {\n\t\t\tincludeSelf = includeSelf !== false;\n\t\t\tpart = part || \"title\";\n\t\t\tseparator = separator || \"/\";\n\n\t\t\tvar val,\n\t\t\t\tpath = [],\n\t\t\t\tisFunc = _isFunction(part);\n\n\t\t\tthis.visitParents(function (n) {\n\t\t\t\tif (n.parent) {\n\t\t\t\t\tval = isFunc ? part(n) : n[part];\n\t\t\t\t\tpath.unshift(val);\n\t\t\t\t}\n\t\t\t}, includeSelf);\n\t\t\treturn path.join(separator);\n\t\t},\n\t\t/** Return the predecessor node (under the same parent) or null.\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetPrevSibling: function () {\n\t\t\tif (this.parent) {\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tac = this.parent.children;\n\n\t\t\t\tfor (i = 1, l = ac.length; i < l; i++) {\n\t\t\t\t\t// start with 1, so prev(first) = null\n\t\t\t\t\tif (ac[i] === this) {\n\t\t\t\t\t\treturn ac[i - 1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t/**\n\t\t * Return an array of selected descendant nodes.\n\t\t * @param {boolean} [stopOnParents=false] only return the topmost selected\n\t\t * node (useful with selectMode 3)\n\t\t * @returns {FancytreeNode[]}\n\t\t */\n\t\tgetSelectedNodes: function (stopOnParents) {\n\t\t\tvar nodeList = [];\n\t\t\tthis.visit(function (node) {\n\t\t\t\tif (node.selected) {\n\t\t\t\t\tnodeList.push(node);\n\t\t\t\t\tif (stopOnParents === true) {\n\t\t\t\t\t\treturn \"skip\"; // stop processing this branch\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn nodeList;\n\t\t},\n\t\t/** Return true if node has children. Return undefined if not sure, i.e. the node is lazy and not yet loaded).\n\t\t * @returns {boolean | undefined}\n\t\t */\n\t\thasChildren: function () {\n\t\t\tif (this.lazy) {\n\t\t\t\tif (this.children == null) {\n\t\t\t\t\t// null or undefined: Not yet loaded\n\t\t\t\t\treturn undefined;\n\t\t\t\t} else if (this.children.length === 0) {\n\t\t\t\t\t// Loaded, but response was empty\n\t\t\t\t\treturn false;\n\t\t\t\t} else if (\n\t\t\t\t\tthis.children.length === 1 &&\n\t\t\t\t\tthis.children[0].isStatusNode()\n\t\t\t\t) {\n\t\t\t\t\t// Currently loading or load error\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn !!(this.children && this.children.length);\n\t\t},\n\t\t/**\n\t\t * Return true if node has `className` defined in .extraClasses.\n\t\t *\n\t\t * @param {string} className class name (separate multiple classes by space)\n\t\t * @returns {boolean}\n\t\t *\n\t\t * @since 2.32\n\t\t */\n\t\thasClass: function (className) {\n\t\t\treturn (\n\t\t\t\t(\" \" + (this.extraClasses || \"\") + \" \").indexOf(\n\t\t\t\t\t\" \" + className + \" \"\n\t\t\t\t) >= 0\n\t\t\t);\n\t\t},\n\t\t/** Return true if node has keyboard focus.\n\t\t * @returns {boolean}\n\t\t */\n\t\thasFocus: function () {\n\t\t\treturn this.tree.hasFocus() && this.tree.focusNode === this;\n\t\t},\n\t\t/** Write to browser console if debugLevel >= 3 (prepending node info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\tinfo: function (msg) {\n\t\t\tif (this.tree.options.debugLevel >= 3) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"info\", arguments);\n\t\t\t}\n\t\t},\n\t\t/** Return true if node is active (see also FancytreeNode#isSelected).\n\t\t * @returns {boolean}\n\t\t */\n\t\tisActive: function () {\n\t\t\treturn this.tree.activeNode === this;\n\t\t},\n\t\t/** Return true if node is vertically below `otherNode`, i.e. rendered in a subsequent row.\n\t\t * @param {FancytreeNode} otherNode\n\t\t * @returns {boolean}\n\t\t * @since 2.28\n\t\t */\n\t\tisBelowOf: function (otherNode) {\n\t\t\treturn this.getIndexHier(\".\", 5) > otherNode.getIndexHier(\".\", 5);\n\t\t},\n\t\t/** Return true if node is a direct child of otherNode.\n\t\t * @param {FancytreeNode} otherNode\n\t\t * @returns {boolean}\n\t\t */\n\t\tisChildOf: function (otherNode) {\n\t\t\treturn this.parent && this.parent === otherNode;\n\t\t},\n\t\t/** Return true, if node is a direct or indirect sub node of otherNode.\n\t\t * @param {FancytreeNode} otherNode\n\t\t * @returns {boolean}\n\t\t */\n\t\tisDescendantOf: function (otherNode) {\n\t\t\tif (!otherNode || otherNode.tree !== this.tree) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar p = this.parent;\n\t\t\twhile (p) {\n\t\t\t\tif (p === otherNode) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (p === p.parent) {\n\t\t\t\t\t$.error(\"Recursive parent link: \" + p);\n\t\t\t\t}\n\t\t\t\tp = p.parent;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\t/** Return true if node is expanded.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisExpanded: function () {\n\t\t\treturn !!this.expanded;\n\t\t},\n\t\t/** Return true if node is the first node of its parent's children.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFirstSibling: function () {\n\t\t\tvar p = this.parent;\n\t\t\treturn !p || p.children[0] === this;\n\t\t},\n\t\t/** Return true if node is a folder, i.e. has the node.folder attribute set.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFolder: function () {\n\t\t\treturn !!this.folder;\n\t\t},\n\t\t/** Return true if node is the last node of its parent's children.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisLastSibling: function () {\n\t\t\tvar p = this.parent;\n\t\t\treturn !p || p.children[p.children.length - 1] === this;\n\t\t},\n\t\t/** Return true if node is lazy (even if data was already loaded)\n\t\t * @returns {boolean}\n\t\t */\n\t\tisLazy: function () {\n\t\t\treturn !!this.lazy;\n\t\t},\n\t\t/** Return true if node is lazy and loaded. For non-lazy nodes always return true.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisLoaded: function () {\n\t\t\treturn !this.lazy || this.hasChildren() !== undefined; // Also checks if the only child is a status node\n\t\t},\n\t\t/** Return true if children are currently beeing loaded, i.e. a Ajax request is pending.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisLoading: function () {\n\t\t\treturn !!this._isLoading;\n\t\t},\n\t\t/*\n\t\t * @deprecated since v2.4.0: Use isRootNode() instead\n\t\t */\n\t\tisRoot: function () {\n\t\t\treturn this.isRootNode();\n\t\t},\n\t\t/** Return true if node is partially selected (tri-state).\n\t\t * @returns {boolean}\n\t\t * @since 2.23\n\t\t */\n\t\tisPartsel: function () {\n\t\t\treturn !this.selected && !!this.partsel;\n\t\t},\n\t\t/** (experimental) Return true if this is partially loaded.\n\t\t * @returns {boolean}\n\t\t * @since 2.15\n\t\t */\n\t\tisPartload: function () {\n\t\t\treturn !!this.partload;\n\t\t},\n\t\t/** Return true if this is the (invisible) system root node.\n\t\t * @returns {boolean}\n\t\t * @since 2.4\n\t\t */\n\t\tisRootNode: function () {\n\t\t\treturn this.tree.rootNode === this;\n\t\t},\n\t\t/** Return true if node is selected, i.e. has a checkmark set (see also FancytreeNode#isActive).\n\t\t * @returns {boolean}\n\t\t */\n\t\tisSelected: function () {\n\t\t\treturn !!this.selected;\n\t\t},\n\t\t/** Return true if this node is a temporarily generated system node like\n\t\t * 'loading', 'paging', or 'error' (node.statusNodeType contains the type).\n\t\t * @returns {boolean}\n\t\t */\n\t\tisStatusNode: function () {\n\t\t\treturn !!this.statusNodeType;\n\t\t},\n\t\t/** Return true if this node is a status node of type 'paging'.\n\t\t * @returns {boolean}\n\t\t * @since 2.15\n\t\t */\n\t\tisPagingNode: function () {\n\t\t\treturn this.statusNodeType === \"paging\";\n\t\t},\n\t\t/** Return true if this a top level node, i.e. a direct child of the (invisible) system root node.\n\t\t * @returns {boolean}\n\t\t * @since 2.4\n\t\t */\n\t\tisTopLevel: function () {\n\t\t\treturn this.tree.rootNode === this.parent;\n\t\t},\n\t\t/** Return true if node is lazy and not yet loaded. For non-lazy nodes always return false.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisUndefined: function () {\n\t\t\treturn this.hasChildren() === undefined; // also checks if the only child is a status node\n\t\t},\n\t\t/** Return true if all parent nodes are expanded. Note: this does not check\n\t\t * whether the node is scrolled into the visible part of the screen.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisVisible: function () {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tn,\n\t\t\t\thasFilter = this.tree.enableFilter,\n\t\t\t\tparents = this.getParentList(false, false);\n\n\t\t\t// TODO: check $(n.span).is(\":visible\")\n\t\t\t// i.e. return false for nodes (but not parents) that are hidden\n\t\t\t// by a filter\n\t\t\tif (hasFilter && !this.match && !this.subMatchCount) {\n\t\t\t\t// this.debug( \"isVisible: HIDDEN (\" + hasFilter + \", \" + this.match + \", \" + this.match + \")\" );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor (i = 0, l = parents.length; i < l; i++) {\n\t\t\t\tn = parents[i];\n\n\t\t\t\tif (!n.expanded) {\n\t\t\t\t\t// this.debug(\"isVisible: HIDDEN (parent collapsed)\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// if (hasFilter && !n.match && !n.subMatchCount) {\n\t\t\t\t// \tthis.debug(\"isVisible: HIDDEN (\" + hasFilter + \", \" + this.match + \", \" + this.match + \")\");\n\t\t\t\t// \treturn false;\n\t\t\t\t// }\n\t\t\t}\n\t\t\t// this.debug(\"isVisible: VISIBLE\");\n\t\t\treturn true;\n\t\t},\n\t\t/** Deprecated.\n\t\t * @deprecated since 2014-02-16: use load() instead.\n\t\t */\n\t\tlazyLoad: function (discard) {\n\t\t\t$.error(\n\t\t\t\t\"FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead.\"\n\t\t\t);\n\t\t},\n\t\t/**\n\t\t * Load all children of a lazy node if neccessary. The expanded state is maintained.\n\t\t * @param {boolean} [forceReload=false] Pass true to discard any existing nodes before. Otherwise this method does nothing if the node was already loaded.\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tload: function (forceReload) {\n\t\t\tvar res,\n\t\t\t\tsource,\n\t\t\t\tself = this,\n\t\t\t\twasExpanded = this.isExpanded();\n\n\t\t\t_assert(this.isLazy(), \"load() requires a lazy node\");\n\t\t\t// _assert( forceReload || this.isUndefined(), \"Pass forceReload=true to re-load a lazy node\" );\n\t\t\tif (!forceReload && !this.isUndefined()) {\n\t\t\t\treturn _getResolvedPromise(this);\n\t\t\t}\n\t\t\tif (this.isLoaded()) {\n\t\t\t\tthis.resetLazy(); // also collapses\n\t\t\t}\n\t\t\t// This method is also called by setExpanded() and loadKeyPath(), so we\n\t\t\t// have to avoid recursion.\n\t\t\tsource = this.tree._triggerNodeEvent(\"lazyLoad\", this);\n\t\t\tif (source === false) {\n\t\t\t\t// #69\n\t\t\t\treturn _getResolvedPromise(this);\n\t\t\t}\n\t\t\t_assert(\n\t\t\t\ttypeof source !== \"boolean\",\n\t\t\t\t\"lazyLoad event must return source in data.result\"\n\t\t\t);\n\t\t\tres = this.tree._callHook(\"nodeLoadChildren\", this, source);\n\t\t\tif (wasExpanded) {\n\t\t\t\tthis.expanded = true;\n\t\t\t\tres.always(function () {\n\t\t\t\t\tself.render();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tres.always(function () {\n\t\t\t\t\tself.renderStatus(); // fix expander icon to 'loaded'\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t/** Expand all parents and optionally scroll into visible area as neccessary.\n\t\t * Promise is resolved, when lazy loading and animations are done.\n\t\t * @param {object} [opts] passed to `setExpanded()`.\n\t\t * Defaults to {noAnimation: false, noEvents: false, scrollIntoView: true}\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tmakeVisible: function (opts) {\n\t\t\tvar i,\n\t\t\t\tself = this,\n\t\t\t\tdeferreds = [],\n\t\t\t\tdfd = new $.Deferred(),\n\t\t\t\tparents = this.getParentList(false, false),\n\t\t\t\tlen = parents.length,\n\t\t\t\teffects = !(opts && opts.noAnimation === true),\n\t\t\t\tscroll = !(opts && opts.scrollIntoView === false);\n\n\t\t\t// Expand bottom-up, so only the top node is animated\n\t\t\tfor (i = len - 1; i >= 0; i--) {\n\t\t\t\t// self.debug(\"pushexpand\" + parents[i]);\n\t\t\t\tdeferreds.push(parents[i].setExpanded(true, opts));\n\t\t\t}\n\t\t\t$.when.apply($, deferreds).done(function () {\n\t\t\t\t// All expands have finished\n\t\t\t\t// self.debug(\"expand DONE\", scroll);\n\t\t\t\tif (scroll) {\n\t\t\t\t\tself.scrollIntoView(effects).done(function () {\n\t\t\t\t\t\t// self.debug(\"scroll DONE\");\n\t\t\t\t\t\tdfd.resolve();\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tdfd.resolve();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn dfd.promise();\n\t\t},\n\t\t/** Move this node to targetNode.\n\t\t * @param {FancytreeNode} targetNode\n\t\t * @param {string} mode
    \n\t\t *      'child': append this node as last child of targetNode.\n\t\t *               This is the default. To be compatble with the D'n'd\n\t\t *               hitMode, we also accept 'over'.\n\t\t *      'firstChild': add this node as first child of targetNode.\n\t\t *      'before': add this node as sibling before targetNode.\n\t\t *      'after': add this node as sibling after targetNode.
    \n\t\t * @param {function} [map] optional callback(FancytreeNode) to allow modifcations\n\t\t */\n\t\tmoveTo: function (targetNode, mode, map) {\n\t\t\tif (mode === undefined || mode === \"over\") {\n\t\t\t\tmode = \"child\";\n\t\t\t} else if (mode === \"firstChild\") {\n\t\t\t\tif (targetNode.children && targetNode.children.length) {\n\t\t\t\t\tmode = \"before\";\n\t\t\t\t\ttargetNode = targetNode.children[0];\n\t\t\t\t} else {\n\t\t\t\t\tmode = \"child\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar pos,\n\t\t\t\ttree = this.tree,\n\t\t\t\tprevParent = this.parent,\n\t\t\t\ttargetParent =\n\t\t\t\t\tmode === \"child\" ? targetNode : targetNode.parent;\n\n\t\t\tif (this === targetNode) {\n\t\t\t\treturn;\n\t\t\t} else if (!this.parent) {\n\t\t\t\t$.error(\"Cannot move system root\");\n\t\t\t} else if (targetParent.isDescendantOf(this)) {\n\t\t\t\t$.error(\"Cannot move a node to its own descendant\");\n\t\t\t}\n\t\t\tif (targetParent !== prevParent) {\n\t\t\t\tprevParent.triggerModifyChild(\"remove\", this);\n\t\t\t}\n\t\t\t// Unlink this node from current parent\n\t\t\tif (this.parent.children.length === 1) {\n\t\t\t\tif (this.parent === targetParent) {\n\t\t\t\t\treturn; // #258\n\t\t\t\t}\n\t\t\t\tthis.parent.children = this.parent.lazy ? [] : null;\n\t\t\t\tthis.parent.expanded = false;\n\t\t\t} else {\n\t\t\t\tpos = $.inArray(this, this.parent.children);\n\t\t\t\t_assert(pos >= 0, \"invalid source parent\");\n\t\t\t\tthis.parent.children.splice(pos, 1);\n\t\t\t}\n\t\t\t// Remove from source DOM parent\n\t\t\t// if(this.parent.ul){\n\t\t\t// \tthis.parent.ul.removeChild(this.li);\n\t\t\t// }\n\n\t\t\t// Insert this node to target parent's child list\n\t\t\tthis.parent = targetParent;\n\t\t\tif (targetParent.hasChildren()) {\n\t\t\t\tswitch (mode) {\n\t\t\t\t\tcase \"child\":\n\t\t\t\t\t\t// Append to existing target children\n\t\t\t\t\t\ttargetParent.children.push(this);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"before\":\n\t\t\t\t\t\t// Insert this node before target node\n\t\t\t\t\t\tpos = $.inArray(targetNode, targetParent.children);\n\t\t\t\t\t\t_assert(pos >= 0, \"invalid target parent\");\n\t\t\t\t\t\ttargetParent.children.splice(pos, 0, this);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"after\":\n\t\t\t\t\t\t// Insert this node after target node\n\t\t\t\t\t\tpos = $.inArray(targetNode, targetParent.children);\n\t\t\t\t\t\t_assert(pos >= 0, \"invalid target parent\");\n\t\t\t\t\t\ttargetParent.children.splice(pos + 1, 0, this);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$.error(\"Invalid mode \" + mode);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttargetParent.children = [this];\n\t\t\t}\n\t\t\t// Parent has no