AlkantarClanX12
Current Path : /home/thanudqk/thepball.com/wp-content/plugins/wp-smushit/app/assets/js/ |
Current File : /home/thanudqk/thepball.com/wp-content/plugins/wp-smushit/app/assets/js/smush-admin.min.js |
!function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(s,i,function(t){return e[t]}.bind(null,i));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}([function(e,t,n){"use strict";function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var o=0,a=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"media";i(this,e),this.errors=[];var o=jQuery(".bulk-smush-wrapper .sui-progress-state-text");return this.smushed=parseInt(o.find("span:first-child").html()),this.total=parseInt(o.find("span:last-child").html()),this.skip_resmush=!(void 0===t.data("smush")||!t.data("smush")),this.button=jQuery(t[0]),this.is_bulk=!!s(n)&&n,this.url=ajaxurl,this.log=jQuery(".smush-final-log"),this.deferred=jQuery.Deferred(),this.deferred.errors=[],this.setIds(),this.is_bulk_resmush=0<wp_smushit_data.resmush.length&&!this.skip_resmush,this.status=this.button.parent().prev(".smush-status"),this.smush_type=r,this.single_ajax_suffix="nextgen"===this.smush_type?"smush_manual_nextgen":"wp_smushit_manual",this.bulk_ajax_suffix="nextgen"===this.smush_type?"wp_smushit_nextgen_bulk":"wp_smushit_bulk",this.url=this.is_bulk?e.smushAddParams(this.url,{action:this.bulk_ajax_suffix}):e.smushAddParams(this.url,{action:this.single_ajax_suffix}),this.start(),this.run(),this.bindDeferredEvents(),this.cancelAjax(),this.deferred}var t,n,a;return t=e,a=[{key:"smushAddParams",value:function(e,t){return jQuery.isEmptyObject(t)||(e+=(e.indexOf("?")>=0?"&":"?")+jQuery.param(t)),e}},{key:"membershipValidity",value:function(e){var t=jQuery("#wp-smush-invalid-member");void 0!==e&&void 0!==e.show_warning&&t.length>0&&(e.show_warning?t.show():t.hide())}},{key:"ajax",value:function(e,t,n,s){var i=jQuery.param({is_bulk_resmush:e,attachment_id:t,_nonce:s});return jQuery.ajax({type:"GET",data:i,url:n,timeout:wp_smushit_data.timeout,dataType:"json"})}},{key:"setProSavings",value:function(){var e=wp_smushit_data.savings_percent>0?wp_smushit_data.savings_percent:0,t=wp_smushit_data.savings_bytes>0?wp_smushit_data.savings_bytes:0,n=2.22058824;e>49&&(n=1.22054412),e>0&&(e*=n,t*=n),wp_smushit_data.pro_savings={percent:WP_Smush.helpers.precise_round(e,1),savings_bytes:WP_Smush.helpers.formatBytes(t,1)}}},{key:"updateStats",value:function(t){var n=void 0!==t&&"nextgen"===t,s=0;wp_smushit_data.savings_bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after);var i=WP_Smush.helpers.formatBytes(wp_smushit_data.savings_bytes,1),r=jQuery(".wp-smush-savings .wp-smush-stats-human");n?r.html(i):(r.html(WP_Smush.helpers.getFormatFromString(i)),jQuery(".sui-summary-large.wp-smush-stats-human").html(WP_Smush.helpers.getSizeFromString(i))),wp_smushit_data.savings_percent=WP_Smush.helpers.precise_round(parseInt(wp_smushit_data.savings_bytes)/parseInt(wp_smushit_data.size_before)*100,1),isNaN(wp_smushit_data.savings_percent)||jQuery(".wp-smush-savings .wp-smush-stats-percent").html(wp_smushit_data.savings_percent),void 0!==wp_smushit_data.savings_bytes&&void 0!==wp_smushit_data.savings_resize&&(s=parseInt(wp_smushit_data.savings_bytes)-parseInt(wp_smushit_data.savings_resize))>0&&jQuery("li.super-smush-attachments span.smushed-savings").html(WP_Smush.helpers.formatBytes(s,1)),n?jQuery(".sui-summary-details span.wp-smush-total-optimised").html(wp_smushit_data.count_images):jQuery("span.smushed-items-count span.wp-smush-count-total span.wp-smush-total-optimised").html(wp_smushit_data.count_images),jQuery("span.smushed-items-count span.wp-smush-count-resize-total span.wp-smush-total-optimised").html(wp_smushit_data.count_resize);var o=jQuery("li.super-smush-attachments .smushed-count");o.length&&void 0!==wp_smushit_data.count_supersmushed&&o.html(wp_smushit_data.count_supersmushed);var a=jQuery(".smush-conversion-savings");if(a.length>0&&void 0!==wp_smushit_data.savings_conversion&&""!==wp_smushit_data.savings_conversion){var u=a.find(".wp-smush-stats");u.length>0&&u.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_conversion,1))}var l=jQuery(".smush-resize-savings");if(l.length>0&&void 0!==wp_smushit_data.savings_resize&&""!==wp_smushit_data.savings_resize){var d=parseInt(wp_smushit_data.savings_resize),c=l.find(".wp-smush-stats"),h=l.find(".wp-smush-stats-label-message");d>0&&c.length>0&&(h.length>0&&h.hide(),c.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_resize,1)))}if(e.setProSavings(),void 0!==wp_smushit_data.pro_savings){var p=jQuery(".smush-avg-pro-savings");if(p.length>0){var f=p.find(".wp-smush-stats-percent"),m=p.find(".wp-smush-stats-human");f.length>0&&void 0!==wp_smushit_data.pro_savings.percent&&""!==wp_smushit_data.pro_savings.percent&&f.html(wp_smushit_data.pro_savings.percent),m.length>0&&void 0!==wp_smushit_data.pro_savings.savings_bytes&&""!==wp_smushit_data.pro_savings.savings_bytes&&m.html(wp_smushit_data.pro_savings.savings_bytes)}}if(jQuery(".smush-sidenav .wp-smush-remaining-count").length){var g=0;void 0!==wp_smushit_data.unsmushed&&wp_smushit_data.unsmushed.length>0&&(g+=wp_smushit_data.unsmushed.length),void 0!==wp_smushit_data.resmush&&wp_smushit_data.resmush.length>0&&(g+=wp_smushit_data.resmush.length),e.updateRemainingCount(g)}}},{key:"updateImageStats",value:function(e){if(0!==e){var t=jQuery(".attachment-info .file-size");if(t.contents().filter((function(){return 3===this.nodeType})).text()!==" "+e){var n=t.contents().filter((function(){return 1===this.nodeType})).text();t.html("<strong>"+n+"</strong> "+e)}}}},{key:"updateRemainingCount",value:function(e){var t=jQuery(".wp-smush-remaining-count");t.length&&t.html(e);var n=jQuery(".smush-sidenav .wp-smush-remaining-count"),s=jQuery(".smush-sidenav .smush-bulk .sui-icon-check-tick");n.length&&s.length&&(e>0?(n.removeClass("sui-hidden"),s.addClass("sui-hidden")):(jQuery(".sui-summary-smush .smush-stats-icon").addClass("sui-hidden"),s.removeClass("sui-hidden"),n.addClass("sui-hidden")))}},{key:"updateLocalizedStats",value:function(e,t){void 0!==window.wp_smushit_data&&("media"===t?(wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+parseInt(e.count),e.is_lossy&&(wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+1),wp_smushit_data.savings_resize=void 0!==e.savings_resize.bytes?parseInt(wp_smushit_data.savings_resize)+parseInt(e.savings_resize.bytes):parseInt(wp_smushit_data.savings_resize),wp_smushit_data.count_resize=void 0!==e.savings_resize.bytes?parseInt(wp_smushit_data.count_resize)+1:wp_smushit_data.count_resize,wp_smushit_data.savings_conversion=void 0!==e.savings_conversion&&void 0!==e.savings_conversion.bytes?parseInt(wp_smushit_data.savings_conversion)+parseInt(e.savings_conversion.bytes):parseInt(wp_smushit_data.savings_conversion)):"directory_smush"===t?wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+1:"nextgen"===t&&(wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+1,wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+parseInt(e.count)),e.size_before>e.size_after&&(wp_smushit_data.size_before=void 0!==e.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.size_after):parseInt(wp_smushit_data.size_after)),void 0!==e.savings_resize&&(wp_smushit_data.size_before=void 0!==e.savings_resize.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.savings_resize.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.savings_resize.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.savings_resize.size_after):parseInt(wp_smushit_data.size_after)),void 0!==e.savings_conversion&&(wp_smushit_data.size_before=void 0!==e.savings_conversion.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.savings_conversion.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.savings_conversion.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.savings_conversion.size_after):parseInt(wp_smushit_data.size_after)))}},{key:"prepareErrorRow",value:function(e,t,n,s,i){var r='<div class="smush-bulk-error-row"><div class="smush-bulk-image-data">'+(void 0===n?'<i class="sui-icon-photo-picture" aria-hidden="true"></i>':n)+'<span class="smush-image-name">'+("undefined"===t||void 0===t?"undefined":t)+'</span><span class="smush-image-error">'+e+"</span></div>";return"media"===i&&(r=r+'<div class="smush-bulk-image-actions"><button type="button" class="sui-button-icon sui-tooltip sui-tooltip-constrained sui-tooltip-top-right smush-ignore-image" data-tooltip="'+window.wp_smush_msgs.error_ignore+'" data-id="'+s+'"><i class="sui-icon-eye-hide" aria-hidden="true"></i></button></div>'),r+="</div>"}},{key:"updateSmushIds",value:function(e){if(void 0!==wp_smushit_data.unsmushed&&wp_smushit_data.unsmushed.length>0){var t=wp_smushit_data.unsmushed.indexOf(e);t>-1&&wp_smushit_data.unsmushed.splice(t,1)}if(void 0!==wp_smushit_data.resmush&&wp_smushit_data.resmush.length>0){var n=wp_smushit_data.resmush.indexOf(e);n>-1&&wp_smushit_data.resmush.splice(n,1)}}}],(n=[{key:"setIds",value:function(){var e=[];"object"===s(e=0<wp_smushit_data.resmush.length&&!this.skip_resmush?0<wp_smushit_data.unsmushed.length?wp_smushit_data.resmush.concat(wp_smushit_data.unsmushed):wp_smushit_data.resmush:wp_smushit_data.unsmushed)?this.ids=e.filter((function(e,t,n){return t===n.indexOf(e)})):this.ids=e}},{key:"start",value:function(){this.button.prop("disabled",!0),this.button.addClass("wp-smush-started"),this.bulkStart(),this.singleStart()}},{key:"bulkStart",value:function(){this.is_bulk&&(jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden"),jQuery(".sui-notice-top").remove(),jQuery(".wp-smush-bulk-progress-bar-wrapper .sui-notice-warning:first-of-type").hide(),0>=jQuery("div.smush-final-log .smush-bulk-error-row").length&&jQuery("div.smush-final-log").hide(),jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper, #wp-smush-running-notice").removeClass("sui-hidden"))}},{key:"singleStart",value:function(){this.is_bulk||(this.button.html('<span class="spinner wp-smush-progress">'+window.wp_smush_msgs.smushing+"</span>"),this.status.removeClass("error"))}},{key:"enableButton",value:function(){this.button.prop("disabled",!1),jQuery(".wp-smush-all").prop("disabled",!1),jQuery("button.wp-smush-scan, a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#wp-smush-save-settings").prop("disabled",!1)}},{key:"singleDone",value:function(){if(!this.is_bulk){var t=this;this.button.html(window.wp_smush_msgs.all_done),this.request.done((function(n){if(void 0!==n.data){var s=t.status.parent();e.membershipValidity(n.data),n.success?s.html(n.data):(t.status.addClass("error"),t.status.html(n.data.error_msg),t.button.html(window.smush_vars.strings.stats_label)),e.updateImageStats(n.data.new_size)}t.enableButton()})).fail((function(e){t.status.html(e.data),t.status.addClass("error"),t.enableButton()}))}}},{key:"syncStats",value:function(){var t=jQuery("div.wp-smush-bulk-progress-bar-wrapper div.wp-smush-count.tc"),n=t.html();t.html(window.wp_smush_msgs.sync_stats),jQuery.ajax({type:"GET",url:this.url,data:{action:"get_stats"},success:function(t){t&&void 0!==t&&(t=t.data,jQuery.extend(wp_smushit_data,{count_images:t.count_images,count_smushed:t.count_smushed,count_total:t.count_total,count_resize:t.count_resize,count_supersmushed:t.count_supersmushed,savings_bytes:t.savings_bytes,savings_conversion:t.savings_conversion,savings_resize:t.savings_resize,size_before:t.size_before,size_after:t.size_after}),e.updateStats(this.smush_type))}}).always((function(){return t.html(n)}))}},{key:"bulkDone",value:function(){if(this.is_bulk){this.enableButton();var e=jQuery(".sui-summary-smush .smush-stats-icon");if(0===this.ids.length)e.addClass("sui-hidden"),jQuery(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),document.getElementById("smush-box-bulk-upgrade")&&(document.getElementById("smush-box-bulk-upgrade").classList.remove("sui-hidden"),document.getElementById("wp-smush-all-smushed-text").classList.remove("sui-hidden"),document.getElementById("wp-smush-pending-to-smush-text").classList.add("sui-hidden"));else{e.removeClass("sui-icon-loader sui-loading sui-hidden").addClass("sui-icon-info sui-warning");var t=jQuery(".bulk-smush-wrapper .wp-smush-resmush-notice");t.length>0?t.show():jQuery(".bulk-smush-wrapper .wp-smush-remaining").removeClass("sui-hidden")}jQuery(".wp-resmush.wp-smush-action, .wp-smush-scan").removeProp("disabled")}}},{key:"freeExceeded",value:function(){var e=jQuery(".wp-smush-bulk-progress-bar-wrapper");e.addClass("wp-smush-exceed-limit"),e.find(".sui-progress-block .wp-smush-cancel-bulk").addClass("sui-hidden"),e.find(".sui-progress-block .wp-smush-all").removeClass("sui-hidden"),e.find("i.sui-icon-loader").addClass("sui-icon-info").removeClass("sui-icon-loader").removeClass("sui-loading"),document.getElementById("bulk-smush-resume-button").classList.remove("sui-hidden"),document.getElementById("smush-box-bulk-upgrade")&&document.getElementById("smush-box-bulk-upgrade").classList.remove("sui-hidden")}},{key:"updateProgress",value:function(t){if(this.is_bulk_resmush||this.is_bulk){var n=0;t&&void 0!==t.data&&void 0!==t.data.stats&&e.updateLocalizedStats(t.data.stats,this.smush_type),this.is_bulk_resmush?(t.success&&(wp_smushit_data.resmush.length>0?jQuery(".wp-smush-images-remaining").html(wp_smushit_data.resmush.length):0===wp_smushit_data.resmush.length&&0===this.ids.length&&(jQuery(".bulk-resmush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-resmush-wrap, .wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"))),void 0!==this.ids&&void 0!==this.total&&this.total>0&&(n=(this.smushed+this.errors.length)/this.total*100)):n=(this.smushed+this.errors.length)/this.total*100,0===this.ids.length&&("nextgen"!==this.smush_type&&this.syncStats(),jQuery(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden")),void 0!==this.ids&&e.updateRemainingCount(this.ids.length),this._updateProgress(this.smushed+this.errors.length,WP_Smush.helpers.precise_round(n,1)),0===this.ids.length&&"nextgen"!==this.smush_type||e.updateStats(this.smush_type)}}},{key:"_updateProgress",value:function(e,t){(this.is_bulk||this.is_bulk_resmush)&&(jQuery("span.wp-smush-images-percent").html(t+"%"),jQuery(".bulk-smush-wrapper .wp-smush-progress-inner").css("width",t+"%"),jQuery(".bulk-smush-wrapper .sui-progress-state-text").find("span:first-child").html(e).find("span:last-child").html(this.total))}},{key:"continue",value:function(){var e=this.button.attr("continue_smush");return void 0===e&&(e=!0),"false"!==e&&e||(e=!1),e&&this.ids.length>0&&this.is_bulk}},{key:"callAjax",value:function(){if(0!==o&&void 0!==o&&10>performance.now()-o)return this.freeExceeded(),this.deferred;var t="";this.current_id=this.is_bulk?this.ids.shift():this.button.data("id"),e.updateSmushIds(this.current_id);var n=this.button.parent().find("#_wp_smush_nonce");n&&(t=n.val());var s=this;return this.request=e.ajax(this.is_bulk_resmush,this.current_id,this.url,t).done((function(t){if(void 0===t.success||void 0!==t.success&&!1===t.success&&void 0!==t.data&&"limit_exceeded"!==t.data.error){s.errors.push(s.current_id);var n=e.prepareErrorRow(t.data.error_message,t.data.file_name,t.data.thumbnail,s.current_id,s.smush_type);s.log.show(),s.errors.length>5?jQuery(".smush-bulk-errors-actions").removeClass("sui-hidden"):s.log.find(".smush-bulk-errors").append(n)}else void 0!==t.success&&t.success&&s.smushed++;e.membershipValidity(t.data),void 0!==t.data&&"limit_exceeded"===t.data.error&&"resolved"!==s.deferred.state()?(document.getElementById("bulk_smush_warning").classList.remove("sui-hidden"),s.button.attr("continue_smush",!1),wp_smushit_data.unsmushed.unshift(s.current_id),s.ids.unshift(s.current_id),o=performance.now(),s.freeExceeded()):s.is_bulk?s.updateProgress(t):0===s.ids.length&&s.syncStats(),s.singleDone()})).always((function(){s.continue()&&s.is_bulk?s.callAjax():s.deferred.resolve()})),this.deferred.errors=this.errors,this.deferred}},{key:"run",value:function(){this.is_bulk&&this.ids.length>0&&this.callAjax(),this.is_bulk||this.callAjax()}},{key:"bindDeferredEvents",value:function(){var e=this;this.deferred.done((function(){if(e.button.removeProp("continue_smush"),e.errors.length){var t=window.wp_smush_msgs.error_in_bulk.replace("{{errors}}",e.errors.length).replace("{{total}}",e.total).replace("{{smushed}}",e.smushed);jQuery(".wp-smush-all-done").addClass("sui-notice-warning").removeClass("sui-notice-success").find("p").html(t)}e.bulkDone(),jQuery(".wp-smush-all:not(.wp-smush-finished), .wp-smush-scan").prop("disabled",!1)}))}},{key:"cancelAjax",value:function(){var e=this;jQuery(".wp-smush-cancel-bulk").on("click",(function(){e.button.attr("continue_smush",!1),e.syncStats(),e.request.abort(),e.enableButton(),e.button.removeClass("wp-smush-started"),wp_smushit_data.unsmushed.unshift(e.current_id),jQuery(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden")}))}}])&&r(t.prototype,n),a&&r(t,a),e}();t.a=a},,function(e,t,n){var s; /*! * jQuery JavaScript Library v3.5.1 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2020-05-04T22:49Z */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var r=[],o=Object.getPrototypeOf,a=r.slice,u=r.flat?function(e){return r.flat.call(e)}:function(e){return r.concat.apply([],e)},l=r.push,d=r.indexOf,c={},h=c.toString,p=c.hasOwnProperty,f=p.toString,m=f.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},y=function(e){return null!=e&&e===e.window},_=n.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var s,i,r=(n=n||_).createElement("script");if(r.text=e,t)for(s in w)(i=t[s]||t.getAttribute&&t.getAttribute(s))&&r.setAttribute(s,i);n.head.appendChild(r).parentNode.removeChild(r)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[h.call(e)]||"object":typeof e}var k=function(e,t){return new k.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}k.fn=k.prototype={jquery:"3.5.1",constructor:k,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:r.sort,splice:r.splice},k.extend=k.fn.extend=function(){var e,t,n,s,i,r,o=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[a]||{},a++),"object"==typeof o||v(o)||(o={}),a===u&&(o=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)s=e[t],"__proto__"!==t&&o!==s&&(l&&s&&(k.isPlainObject(s)||(i=Array.isArray(s)))?(n=o[t],r=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,o[t]=k.extend(l,r,s)):void 0!==s&&(o[t]=s));return o},k.extend({expando:"jQuery"+("3.5.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e))&&(!(t=o(e))||"function"==typeof(n=p.call(t,"constructor")&&t.constructor)&&f.call(n)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,s=0;if(S(e))for(n=e.length;s<n&&!1!==t.call(e[s],s,e[s]);s++);else for(s in e)if(!1===t.call(e[s],s,e[s]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(S(Object(e))?k.merge(n,"string"==typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:d.call(t,e,n)},merge:function(e,t){for(var n=+t.length,s=0,i=e.length;s<n;s++)e[i++]=t[s];return e.length=i,e},grep:function(e,t,n){for(var s=[],i=0,r=e.length,o=!n;i<r;i++)!t(e[i],i)!==o&&s.push(e[i]);return s},map:function(e,t,n){var s,i,r=0,o=[];if(S(e))for(s=e.length;r<s;r++)null!=(i=t(e[r],r,n))&&o.push(i);else for(r in e)null!=(i=t(e[r],r,n))&&o.push(i);return u(o)},guid:1,support:g}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=r[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){c["[object "+t+"]"]=t.toLowerCase()}));var C= /*! * Sizzle CSS Selector Engine v2.3.5 * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://js.foundation/ * * Date: 2020-03-14 */ function(e){var t,n,s,i,r,o,a,u,l,d,c,h,p,f,m,g,v,y,_,w="sizzle"+1*new Date,b=e.document,x=0,k=0,S=ue(),C=ue(),T=ue(),N=ue(),E=function(e,t){return e===t&&(c=!0),0},j={}.hasOwnProperty,L=[],I=L.pop,D=L.push,P=L.push,A=L.slice,H=function(e,t){for(var n=0,s=e.length;n<s;n++)if(e[n]===t)return n;return-1},z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",q="[\\x20\\t\\r\\n\\f]",O="(?:\\\\[\\da-fA-F]{1,6}"+q+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+q+"*("+O+")(?:"+q+"*([*^$|!~]?=)"+q+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+q+"*\\]",M=":("+O+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",B=new RegExp(q+"+","g"),W=new RegExp("^"+q+"+|((?:^|[^\\\\])(?:\\\\.)*)"+q+"+$","g"),F=new RegExp("^"+q+"*,"+q+"*"),Q=new RegExp("^"+q+"*([>+~]|"+q+")"+q+"*"),$=new RegExp(q+"|>"),U=new RegExp(M),V=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+O+")"),CLASS:new RegExp("^\\.("+O+")"),TAG:new RegExp("^("+O+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),bool:new RegExp("^(?:"+z+")$","i"),needsContext:new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+q+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},se=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){h()},oe=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{P.apply(L=A.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(e){P={apply:L.length?function(e,t){D.apply(e,A.call(t))}:function(e,t){for(var n=e.length,s=0;e[n++]=t[s++];);e.length=n-1}}}function ae(e,t,s,i){var r,a,l,d,c,f,v,y=t&&t.ownerDocument,b=t?t.nodeType:9;if(s=s||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return s;if(!i&&(h(t),t=t||p,m)){if(11!==b&&(c=Z.exec(e)))if(r=c[1]){if(9===b){if(!(l=t.getElementById(r)))return s;if(l.id===r)return s.push(l),s}else if(y&&(l=y.getElementById(r))&&_(t,l)&&l.id===r)return s.push(l),s}else{if(c[2])return P.apply(s,t.getElementsByTagName(e)),s;if((r=c[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(s,t.getElementsByClassName(r)),s}if(n.qsa&&!N[e+" "]&&(!g||!g.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===b&&($.test(e)||Q.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((d=t.getAttribute("id"))?d=d.replace(se,ie):t.setAttribute("id",d=w)),a=(f=o(e)).length;a--;)f[a]=(d?"#"+d:":scope")+" "+_e(f[a]);v=f.join(",")}try{return P.apply(s,y.querySelectorAll(v)),s}catch(t){N(e,!0)}finally{d===w&&t.removeAttribute("id")}}}return u(e.replace(W,"$1"),t,s,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>s.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[w]=!0,e}function de(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)s.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,s=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(s)return s;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return le((function(t){return t=+t,le((function(n,s){for(var i,r=e([],n.length,t),o=r.length;o--;)n[i=r[o]]&&(n[i]=!(s[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},r=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},h=ae.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:b;return o!=p&&9===o.nodeType&&o.documentElement?(f=(p=o).documentElement,m=!r(p),b!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.scope=de((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=de((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=de((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Y.test(p.getElementsByClassName),n.getById=de((function(e){return f.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),n.getById?(s.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},s.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(s.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},s.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,s,i,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(i=t.getElementsByName(e),s=0;r=i[s++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),s.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,s=[],i=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[i++];)1===n.nodeType&&s.push(n);return s}return r},s.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=Y.test(p.querySelectorAll))&&(de((function(e){var t;f.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+q+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+q+"*(?:value|"+z+")"),e.querySelectorAll("[id~="+w+"-]").length||g.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+q+"*name"+q+"*="+q+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),de((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+q+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Y.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&de((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",M)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Y.test(f.compareDocumentPosition),_=t||Y.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,s=t&&t.parentNode;return e===s||!(!s||1!==s.nodeType||!(n.contains?n.contains(s):e.compareDocumentPosition&&16&e.compareDocumentPosition(s)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},E=t?function(e,t){if(e===t)return c=!0,0;var s=!e.compareDocumentPosition-!t.compareDocumentPosition;return s||(1&(s=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===s?e==p||e.ownerDocument==b&&_(b,e)?-1:t==p||t.ownerDocument==b&&_(b,t)?1:d?H(d,e)-H(d,t):0:4&s?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,s=0,i=e.parentNode,r=t.parentNode,o=[e],a=[t];if(!i||!r)return e==p?-1:t==p?1:i?-1:r?1:d?H(d,e)-H(d,t):0;if(i===r)return he(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;o[s]===a[s];)s++;return s?he(o[s],a[s]):o[s]==b?-1:a[s]==b?1:0},p):p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&m&&!N[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var s=y.call(e,t);if(s||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return s}catch(e){N(t,!0)}return ae(t,p,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!=p&&h(e),_(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=p&&h(e);var i=s.attrHandle[t.toLowerCase()],r=i&&j.call(s.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==r?r:n.attributes||!m?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},ae.escape=function(e){return(e+"").replace(se,ie)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,s=[],i=0,r=0;if(c=!n.detectDuplicates,d=!n.sortStable&&e.slice(0),e.sort(E),c){for(;t=e[r++];)t===e[r]&&(i=s.push(r));for(;i--;)e.splice(s[i],1)}return d=null,e},i=ae.getText=function(e){var t,n="",s=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[s++];)n+=i(t);return n},(s=ae.selectors={cacheLength:50,createPseudo:le,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+q+")"+e+"("+q+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(s){var i=ae.attr(s,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,s,i){var r="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===s&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,d,c,h,p,f,m=r!==o?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a,_=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[o?g.firstChild:g.lastChild],o&&y){for(_=(p=(l=(d=(c=(h=g)[w]||(h[w]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]||[])[0]===x&&l[1])&&l[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(_=p=0)||f.pop();)if(1===h.nodeType&&++_&&h===t){d[e]=[x,p,_];break}}else if(y&&(_=p=(l=(d=(c=(h=t)[w]||(h[w]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]||[])[0]===x&&l[1]),!1===_)for(;(h=++p&&h&&h[m]||(_=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++_||(y&&((d=(c=h[w]||(h[w]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]=[x,_]),h!==t)););return(_-=i)===s||_%s==0&&_/s>=0}}},PSEUDO:function(e,t){var n,i=s.pseudos[e]||s.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],s.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var s,r=i(e,t),o=r.length;o--;)e[s=H(e,r[o])]=!(n[s]=r[o])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],s=a(e.replace(W,"$1"));return s[w]?le((function(e,t,n,i){for(var r,o=s(e,null,i,[]),a=e.length;a--;)(r=o[a])&&(e[a]=!(t[a]=r))})):function(e,i,r){return t[0]=e,s(t,null,r,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return ae(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return V.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!s.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ge((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ge((function(e,t,n){for(var s=n<0?n+t:n>t?t:n;--s>=0;)e.push(s);return e})),gt:ge((function(e,t,n){for(var s=n<0?n+t:n;++s<t;)e.push(s);return e}))}}).pseudos.nth=s.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})s.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})s.pseudos[t]=fe(t);function ye(){}function _e(e){for(var t=0,n=e.length,s="";t<n;t++)s+=e[t].value;return s}function we(e,t,n){var s=t.dir,i=t.next,r=i||s,o=n&&"parentNode"===r,a=k++;return t.first?function(t,n,i){for(;t=t[s];)if(1===t.nodeType||o)return e(t,n,i);return!1}:function(t,n,u){var l,d,c,h=[x,a];if(u){for(;t=t[s];)if((1===t.nodeType||o)&&e(t,n,u))return!0}else for(;t=t[s];)if(1===t.nodeType||o)if(d=(c=t[w]||(t[w]={}))[t.uniqueID]||(c[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[s]||t;else{if((l=d[r])&&l[0]===x&&l[1]===a)return h[2]=l[2];if(d[r]=h,h[2]=e(t,n,u))return!0}return!1}}function be(e){return e.length>1?function(t,n,s){for(var i=e.length;i--;)if(!e[i](t,n,s))return!1;return!0}:e[0]}function xe(e,t,n,s,i){for(var r,o=[],a=0,u=e.length,l=null!=t;a<u;a++)(r=e[a])&&(n&&!n(r,s,i)||(o.push(r),l&&t.push(a)));return o}function ke(e,t,n,s,i,r){return s&&!s[w]&&(s=ke(s)),i&&!i[w]&&(i=ke(i,r)),le((function(r,o,a,u){var l,d,c,h=[],p=[],f=o.length,m=r||function(e,t,n){for(var s=0,i=t.length;s<i;s++)ae(e,t[s],n);return n}(t||"*",a.nodeType?[a]:a,[]),g=!e||!r&&t?m:xe(m,h,e,a,u),v=n?i||(r?e:f||s)?[]:o:g;if(n&&n(g,v,a,u),s)for(l=xe(v,p),s(l,[],a,u),d=l.length;d--;)(c=l[d])&&(v[p[d]]=!(g[p[d]]=c));if(r){if(i||e){if(i){for(l=[],d=v.length;d--;)(c=v[d])&&l.push(g[d]=c);i(null,v=[],l,u)}for(d=v.length;d--;)(c=v[d])&&(l=i?H(r,c):h[d])>-1&&(r[l]=!(o[l]=c))}}else v=xe(v===o?v.splice(f,v.length):v),i?i(null,o,v,u):P.apply(o,v)}))}function Se(e){for(var t,n,i,r=e.length,o=s.relative[e[0].type],a=o||s.relative[" "],u=o?1:0,d=we((function(e){return e===t}),a,!0),c=we((function(e){return H(t,e)>-1}),a,!0),h=[function(e,n,s){var i=!o&&(s||n!==l)||((t=n).nodeType?d(e,n,s):c(e,n,s));return t=null,i}];u<r;u++)if(n=s.relative[e[u].type])h=[we(be(h),n)];else{if((n=s.filter[e[u].type].apply(null,e[u].matches))[w]){for(i=++u;i<r&&!s.relative[e[i].type];i++);return ke(u>1&&be(h),u>1&&_e(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(W,"$1"),n,u<i&&Se(e.slice(u,i)),i<r&&Se(e=e.slice(i)),i<r&&_e(e))}h.push(n)}return be(h)}return ye.prototype=s.filters=s.pseudos,s.setFilters=new ye,o=ae.tokenize=function(e,t){var n,i,r,o,a,u,l,d=C[e+" "];if(d)return t?0:d.slice(0);for(a=e,u=[],l=s.preFilter;a;){for(o in n&&!(i=F.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(r=[])),n=!1,(i=Q.exec(a))&&(n=i.shift(),r.push({value:n,type:i[0].replace(W," ")}),a=a.slice(n.length)),s.filter)!(i=X[o].exec(a))||l[o]&&!(i=l[o](i))||(n=i.shift(),r.push({value:n,type:o,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ae.error(e):C(e,u).slice(0)},a=ae.compile=function(e,t){var n,i=[],r=[],a=T[e+" "];if(!a){for(t||(t=o(e)),n=t.length;n--;)(a=Se(t[n]))[w]?i.push(a):r.push(a);(a=T(e,function(e,t){var n=t.length>0,i=e.length>0,r=function(r,o,a,u,d){var c,f,g,v=0,y="0",_=r&&[],w=[],b=l,k=r||i&&s.find.TAG("*",d),S=x+=null==b?1:Math.random()||.1,C=k.length;for(d&&(l=o==p||o||d);y!==C&&null!=(c=k[y]);y++){if(i&&c){for(f=0,o||c.ownerDocument==p||(h(c),a=!m);g=e[f++];)if(g(c,o||p,a)){u.push(c);break}d&&(x=S)}n&&((c=!g&&c)&&v--,r&&_.push(c))}if(v+=y,n&&y!==v){for(f=0;g=t[f++];)g(_,w,o,a);if(r){if(v>0)for(;y--;)_[y]||w[y]||(w[y]=I.call(u));w=xe(w)}P.apply(u,w),d&&!r&&w.length>0&&v+t.length>1&&ae.uniqueSort(u)}return d&&(x=S,l=b),_};return n?le(r):r}(r,i))).selector=e}return a},u=ae.select=function(e,t,n,i){var r,u,l,d,c,h="function"==typeof e&&e,p=!i&&o(e=h.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&m&&s.relative[u[1].type]){if(!(t=(s.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(r=X.needsContext.test(e)?0:u.length;r--&&(l=u[r],!s.relative[d=l.type]);)if((c=s.find[d])&&(i=c(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ve(t.parentNode)||t))){if(u.splice(r,1),!(e=i.length&&_e(u)))return P.apply(n,i),n;break}}return(h||a(e,p))(i,t,!m,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=w.split("").sort(E).join("")===w,n.detectDuplicates=!!c,h(),n.sortDetached=de((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),de((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||ce("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&de((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ce("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),de((function(e){return null==e.getAttribute("disabled")}))||ce(z,(function(e,t,n){var s;if(!n)return!0===e[t]?t.toLowerCase():(s=e.getAttributeNode(t))&&s.specified?s.value:null})),ae}(n);k.find=C,k.expr=C.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=C.uniqueSort,k.text=C.getText,k.isXMLDoc=C.isXML,k.contains=C.contains,k.escapeSelector=C.escape;var T=function(e,t,n){for(var s=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;s.push(e)}return s},N=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},E=k.expr.match.needsContext;function j(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var L=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return v(t)?k.grep(e,(function(e,s){return!!t.call(e,s,e)!==n})):t.nodeType?k.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?k.grep(e,(function(e){return d.call(t,e)>-1!==n})):k.filter(t,e,n)}k.filter=function(e,t,n){var s=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===s.nodeType?k.find.matchesSelector(s,e)?[s]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,n,s=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t<s;t++)if(k.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<s;t++)k.find(e,i[t],n);return s>1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&E.test(e)?k(e):e||[],!1).length}});var D,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var s,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(s="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:P.exec(e))||!s[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(s[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(s[1],t&&t.nodeType?t.ownerDocument||t:_,!0)),L.test(s[1])&&k.isPlainObject(t))for(s in t)v(this[s])?this[s](t[s]):this.attr(s,t[s]);return this}return(i=_.getElementById(s[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,D=k(_);var A=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function z(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0}))},closest:function(e,t){var n,s=0,i=this.length,r=[],o="string"!=typeof e&&k(e);if(!E.test(e))for(;s<i;s++)for(n=this[s];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&k.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?k.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?d.call(k(e),this[0]):d.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return z(e,"nextSibling")},prev:function(e){return z(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return N((e.parentNode||{}).firstChild,e)},children:function(e){return N(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(j(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(n,s){var i=k.map(this,t,n);return"Until"!==e.slice(-5)&&(s=n),s&&"string"==typeof s&&(i=k.filter(s,i)),this.length>1&&(H[e]||k.uniqueSort(i),A.test(e)&&i.reverse()),this.pushStack(i)}}));var q=/[^\x20\t\r\n\f]+/g;function O(e){return e}function R(e){throw e}function M(e,t,n,s){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(s))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(q)||[],(function(e,n){t[n]=!0})),t}(e):k.extend({},e);var t,n,s,i,r=[],o=[],a=-1,u=function(){for(i=i||e.once,s=t=!0;o.length;a=-1)for(n=o.shift();++a<r.length;)!1===r[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=r.length,n=!1);e.memory||(n=!1),t=!1,i&&(r=n?[]:"")},l={add:function(){return r&&(n&&!t&&(a=r.length-1,o.push(n)),function t(n){k.each(n,(function(n,s){v(s)?e.unique&&l.has(s)||r.push(s):s&&s.length&&"string"!==x(s)&&t(s)}))}(arguments),n&&!t&&u()),this},remove:function(){return k.each(arguments,(function(e,t){for(var n;(n=k.inArray(t,r,n))>-1;)r.splice(n,1),n<=a&&a--})),this},has:function(e){return e?k.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return i=o=[],r=n="",this},disabled:function(){return!r},lock:function(){return i=o=[],n||t||(r=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!s}};return l},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],s="pending",i={state:function(){return s},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(n){k.each(t,(function(t,s){var i=v(e[s[4]])&&e[s[4]];r[s[1]]((function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[s[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,s,i){var r=0;function o(e,t,s,i){return function(){var a=this,u=arguments,l=function(){var n,l;if(!(e<r)){if((n=s.apply(a,u))===t.promise())throw new TypeError("Thenable self-resolution");l=n&&("object"==typeof n||"function"==typeof n)&&n.then,v(l)?i?l.call(n,o(r,t,O,i),o(r,t,R,i)):(r++,l.call(n,o(r,t,O,i),o(r,t,R,i),o(r,t,O,t.notifyWith))):(s!==O&&(a=void 0,u=[n]),(i||t.resolveWith)(a,u))}},d=i?l:function(){try{l()}catch(n){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(n,d.stackTrace),e+1>=r&&(s!==R&&(a=void 0,u=[n]),t.rejectWith(a,u))}};e?d():(k.Deferred.getStackHook&&(d.stackTrace=k.Deferred.getStackHook()),n.setTimeout(d))}}return k.Deferred((function(n){t[0][3].add(o(0,n,v(i)?i:O,n.notifyWith)),t[1][3].add(o(0,n,v(e)?e:O)),t[2][3].add(o(0,n,v(s)?s:R))})).promise()},promise:function(e){return null!=e?k.extend(e,i):i}},r={};return k.each(t,(function(e,n){var o=n[2],a=n[5];i[n[1]]=o.add,a&&o.add((function(){s=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(n[3].fire),r[n[0]]=function(){return r[n[0]+"With"](this===r?void 0:this,arguments),this},r[n[0]+"With"]=o.fireWith})),i.promise(r),e&&e.call(r,r),r},when:function(e){var t=arguments.length,n=t,s=Array(n),i=a.call(arguments),r=k.Deferred(),o=function(e){return function(n){s[e]=this,i[e]=arguments.length>1?a.call(arguments):n,--t||r.resolveWith(s,i)}};if(t<=1&&(M(e,r.done(o(n)).resolve,r.reject,!t),"pending"===r.state()||v(i[n]&&i[n].then)))return r.then();for(;n--;)M(i[n],o(n),r.reject);return r.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&B.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){n.setTimeout((function(){throw e}))};var W=k.Deferred();function F(){_.removeEventListener("DOMContentLoaded",F),n.removeEventListener("load",F),k.ready()}k.fn.ready=function(e){return W.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||W.resolveWith(_,[k]))}}),k.ready.then=W.then,"complete"===_.readyState||"loading"!==_.readyState&&!_.documentElement.doScroll?n.setTimeout(k.ready):(_.addEventListener("DOMContentLoaded",F),n.addEventListener("load",F));var Q=function(e,t,n,s,i,r,o){var a=0,u=e.length,l=null==n;if("object"===x(n))for(a in i=!0,n)Q(e,t,a,n[a],!0,r,o);else if(void 0!==s&&(i=!0,v(s)||(o=!0),l&&(o?(t.call(e,s),t=null):(l=t,t=function(e,t,n){return l.call(k(e),n)})),t))for(;a<u;a++)t(e[a],n,o?s:s.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):r},$=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function X(e){return e.replace($,"ms-").replace(U,V)}var K=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=k.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},K(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var s,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(s in t)i[X(s)]=t[s];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,s=e[this.expando];if(void 0!==s){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in s?[t]:t.match(q)||[]).length;for(;n--;)delete s[t[n]]}(void 0===t||k.isEmptyObject(s))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var J=new G,Y=new G,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e,t,n){var s;if(void 0===n&&1===e.nodeType)if(s="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(s))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}(n)}catch(e){}Y.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return Y.hasData(e)||J.hasData(e)},data:function(e,t,n){return Y.access(e,t,n)},removeData:function(e,t){Y.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,s,i,r=this[0],o=r&&r.attributes;if(void 0===e){if(this.length&&(i=Y.get(r),1===r.nodeType&&!J.get(r,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(s=o[n].name).indexOf("data-")&&(s=X(s.slice(5)),te(r,s,i[s]));J.set(r,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Y.set(this,e)})):Q(this,(function(t){var n;if(r&&void 0===t)return void 0!==(n=Y.get(r,e))||void 0!==(n=te(r,e))?n:void 0;this.each((function(){Y.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Y.remove(this,e)}))}}),k.extend({queue:function(e,t,n){var s;if(e)return t=(t||"fx")+"queue",s=J.get(e,t),n&&(!s||Array.isArray(n)?s=J.access(e,t,k.makeArray(n)):s.push(n)),s||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),s=n.length,i=n.shift(),r=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),s--),i&&("fx"===t&&n.unshift("inprogress"),delete r.stop,i.call(e,(function(){k.dequeue(e,t)}),r)),!s&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:k.Callbacks("once memory").add((function(){J.remove(e,[t+"queue",n])}))})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?k.queue(this[0],e):void 0===t?this:this.each((function(){var n=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&k.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){k.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,s=1,i=k.Deferred(),r=this,o=this.length,a=function(){--s||i.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(n=J.get(r[o],e+"queueHooks"))&&n.empty&&(s++,n.empty.add(a));return a(),i.promise(t)}});var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,se=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],re=_.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},ae={composed:!0};re.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")};function le(e,t,n,s){var i,r,o=20,a=s?function(){return s.cur()}:function(){return k.css(e,t,"")},u=a(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),d=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&se.exec(k.css(e,t));if(d&&d[3]!==l){for(u/=2,l=l||d[3],d=+u||1;o--;)k.style(e,t,d+l),(1-r)*(1-(r=a()/u||.5))<=0&&(o=0),d/=r;d*=2,k.style(e,t,d+l),n=n||[]}return n&&(d=+d||+u||0,i=n[1]?d+(n[1]+1)*n[2]:+n[2],s&&(s.unit=l,s.start=d,s.end=i)),i}var de={};function ce(e){var t,n=e.ownerDocument,s=e.nodeName,i=de[s];return i||(t=n.body.appendChild(n.createElement(s)),i=k.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),de[s]=i,i)}function he(e,t){for(var n,s,i=[],r=0,o=e.length;r<o;r++)(s=e[r]).style&&(n=s.style.display,t?("none"===n&&(i[r]=J.get(s,"display")||null,i[r]||(s.style.display="")),""===s.style.display&&ue(s)&&(i[r]=ce(s))):"none"!==n&&(i[r]="none",J.set(s,"display",n)));for(r=0;r<o;r++)null!=i[r]&&(e[r].style.display=i[r]);return e}k.fn.extend({show:function(){return he(this,!0)},hide:function(){return he(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ue(this)?k(this).show():k(this).hide()}))}});var pe,fe,me=/^(?:checkbox|radio)$/i,ge=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i;pe=_.createDocumentFragment().appendChild(_.createElement("div")),(fe=_.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),pe.appendChild(fe),g.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="<option></option>",g.option=!!pe.lastChild;var ye={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function _e(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&j(e,t)?k.merge([e],n):n}function we(e,t){for(var n=0,s=e.length;n<s;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}ye.tbody=ye.tfoot=ye.colgroup=ye.caption=ye.thead,ye.th=ye.td,g.option||(ye.optgroup=ye.option=[1,"<select multiple='multiple'>","</select>"]);var be=/<|&#?\w+;/;function xe(e,t,n,s,i){for(var r,o,a,u,l,d,c=t.createDocumentFragment(),h=[],p=0,f=e.length;p<f;p++)if((r=e[p])||0===r)if("object"===x(r))k.merge(h,r.nodeType?[r]:r);else if(be.test(r)){for(o=o||c.appendChild(t.createElement("div")),a=(ge.exec(r)||["",""])[1].toLowerCase(),u=ye[a]||ye._default,o.innerHTML=u[1]+k.htmlPrefilter(r)+u[2],d=u[0];d--;)o=o.lastChild;k.merge(h,o.childNodes),(o=c.firstChild).textContent=""}else h.push(t.createTextNode(r));for(c.textContent="",p=0;r=h[p++];)if(s&&k.inArray(r,s)>-1)i&&i.push(r);else if(l=oe(r),o=_e(c.appendChild(r),"script"),l&&we(o),n)for(d=0;r=o[d++];)ve.test(r.type||"")&&n.push(r);return c}var ke=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Te(){return!0}function Ne(){return!1}function Ee(e,t){return e===function(){try{return _.activeElement}catch(e){}}()==("focus"===t)}function je(e,t,n,s,i,r){var o,a;if("object"==typeof t){for(a in"string"!=typeof n&&(s=s||n,n=void 0),t)je(e,a,n,s,t[a],r);return e}if(null==s&&null==i?(i=n,s=n=void 0):null==i&&("string"==typeof n?(i=s,s=void 0):(i=s,s=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===r&&(o=i,(i=function(e){return k().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=k.guid++)),e.each((function(){k.event.add(this,t,i,s,n)}))}function Le(e,t,n){n?(J.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var s,i,r=J.get(this,t);if(1&e.isTrigger&&this[t]){if(r.length)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),J.set(this,t,r),s=n(this,t),this[t](),r!==(i=J.get(this,t))||s?J.set(this,t,!1):i={},r!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else r.length&&(J.set(this,t,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&k.event.add(e,t,Te)}k.event={global:{},add:function(e,t,n,s,i){var r,o,a,u,l,d,c,h,p,f,m,g=J.get(e);if(K(e))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&k.find.matchesSelector(re,i),n.guid||(n.guid=k.guid++),(u=g.events)||(u=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(q)||[""]).length;l--;)p=m=(a=Ce.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p&&(c=k.event.special[p]||{},p=(i?c.delegateType:c.bindType)||p,c=k.event.special[p]||{},d=k.extend({type:p,origType:m,data:s,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:f.join(".")},r),(h=u[p])||((h=u[p]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,s,f,o)||e.addEventListener&&e.addEventListener(p,o)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,d):h.push(d),k.event.global[p]=!0)},remove:function(e,t,n,s,i){var r,o,a,u,l,d,c,h,p,f,m,g=J.hasData(e)&&J.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(q)||[""]).length;l--;)if(p=m=(a=Ce.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p){for(c=k.event.special[p]||{},h=u[p=(s?c.delegateType:c.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=r=h.length;r--;)d=h[r],!i&&m!==d.origType||n&&n.guid!==d.guid||a&&!a.test(d.namespace)||s&&s!==d.selector&&("**"!==s||!d.selector)||(h.splice(r,1),d.selector&&h.delegateCount--,c.remove&&c.remove.call(e,d));o&&!h.length&&(c.teardown&&!1!==c.teardown.call(e,f,g.handle)||k.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)k.event.remove(e,p+t[l],n,s,!0);k.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,s,i,r,o,a=new Array(arguments.length),u=k.event.fix(e),l=(J.get(this,"events")||Object.create(null))[u.type]||[],d=k.event.special[u.type]||{};for(a[0]=u,t=1;t<arguments.length;t++)a[t]=arguments[t];if(u.delegateTarget=this,!d.preDispatch||!1!==d.preDispatch.call(this,u)){for(o=k.event.handlers.call(this,u,l),t=0;(i=o[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(r=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==r.namespace&&!u.rnamespace.test(r.namespace)||(u.handleObj=r,u.data=r.data,void 0!==(s=((k.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,a))&&!1===(u.result=s)&&(u.preventDefault(),u.stopPropagation()));return d.postDispatch&&d.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,s,i,r,o,a=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(r=[],o={},n=0;n<u;n++)void 0===o[i=(s=t[n]).selector+" "]&&(o[i]=s.needsContext?k(i,this).index(l)>-1:k.find(i,this,null,[l]).length),o[i]&&r.push(s);r.length&&a.push({elem:l,handlers:r})}return l=this,u<t.length&&a.push({elem:l,handlers:t.slice(u)}),a},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return me.test(t.type)&&t.click&&j(t,"input")&&Le(t,"click",Te),!1},trigger:function(e){var t=this||e;return me.test(t.type)&&t.click&&j(t,"input")&&Le(t,"click"),!0},_default:function(e){var t=e.target;return me.test(t.type)&&t.click&&j(t,"input")&&J.get(t,"click")||j(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Te:Ne,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ne,isPropagationStopped:Ne,isImmediatePropagationStopped:Ne,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Te,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Te,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Te,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&ke.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Se.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},(function(e,t){k.event.special[e]={setup:function(){return Le(this,e,Ee),!1},trigger:function(){return Le(this,e),!0},delegateType:t}})),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,s=this,i=e.relatedTarget,r=e.handleObj;return i&&(i===s||k.contains(s,i))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}})),k.fn.extend({on:function(e,t,n,s){return je(this,e,t,n,s)},one:function(e,t,n,s){return je(this,e,t,n,s,1)},off:function(e,t,n){var s,i;if(e&&e.preventDefault&&e.handleObj)return s=e.handleObj,k(e.delegateTarget).off(s.namespace?s.origType+"."+s.namespace:s.origType,s.selector,s.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ne),this.each((function(){k.event.remove(this,e,n,t)}))}});var Ie=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,Pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ae(e,t){return j(e,"table")&&j(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ze(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function qe(e,t){var n,s,i,r,o,a;if(1===t.nodeType){if(J.hasData(e)&&(a=J.get(e).events))for(i in J.remove(t,"handle events"),a)for(n=0,s=a[i].length;n<s;n++)k.event.add(t,i,a[i][n]);Y.hasData(e)&&(r=Y.access(e),o=k.extend({},r),Y.set(t,o))}}function Oe(e,t){var n=t.nodeName.toLowerCase();"input"===n&&me.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,s){t=u(t);var i,r,o,a,l,d,c=0,h=e.length,p=h-1,f=t[0],m=v(f);if(m||h>1&&"string"==typeof f&&!g.checkClone&&De.test(f))return e.each((function(i){var r=e.eq(i);m&&(t[0]=f.call(this,i,r.html())),Re(r,t,n,s)}));if(h&&(r=(i=xe(t,e[0].ownerDocument,!1,e,s)).firstChild,1===i.childNodes.length&&(i=r),r||s)){for(a=(o=k.map(_e(i,"script"),He)).length;c<h;c++)l=i,c!==p&&(l=k.clone(l,!0,!0),a&&k.merge(o,_e(l,"script"))),n.call(e[c],l,c);if(a)for(d=o[o.length-1].ownerDocument,k.map(o,ze),c=0;c<a;c++)l=o[c],ve.test(l.type||"")&&!J.access(l,"globalEval")&&k.contains(d,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?k._evalUrl&&!l.noModule&&k._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},d):b(l.textContent.replace(Pe,""),l,d))}return e}function Me(e,t,n){for(var s,i=t?k.filter(t,e):e,r=0;null!=(s=i[r]);r++)n||1!==s.nodeType||k.cleanData(_e(s)),s.parentNode&&(n&&oe(s)&&we(_e(s,"script")),s.parentNode.removeChild(s));return e}k.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var s,i,r,o,a=e.cloneNode(!0),u=oe(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(o=_e(a),s=0,i=(r=_e(e)).length;s<i;s++)Oe(r[s],o[s]);if(t)if(n)for(r=r||_e(e),o=o||_e(a),s=0,i=r.length;s<i;s++)qe(r[s],o[s]);else qe(e,a);return(o=_e(a,"script")).length>0&&we(o,!u&&_e(e,"script")),a},cleanData:function(e){for(var t,n,s,i=k.event.special,r=0;void 0!==(n=e[r]);r++)if(K(n)){if(t=n[J.expando]){if(t.events)for(s in t.events)i[s]?k.event.remove(n,s):k.removeEvent(n,s,t.handle);n[J.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return Q(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Re(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ae(this,e).appendChild(e)}))},prepend:function(){return Re(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ae(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(_e(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return Q(this,(function(e){var t=this[0]||{},n=0,s=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ie.test(e)&&!ye[(ge.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<s;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(_e(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,(function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(_e(this)),n&&n.replaceChild(t,this))}),e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){k.fn[e]=function(e){for(var n,s=[],i=k(e),r=i.length-1,o=0;o<=r;o++)n=o===r?this:this.clone(!0),k(i[o])[t](n),l.apply(s,n.get());return this.pushStack(s)}}));var Be=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),We=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Fe=function(e,t,n){var s,i,r={};for(i in t)r[i]=e.style[i],e.style[i]=t[i];for(i in s=n.call(e),t)e.style[i]=r[i];return s},Qe=new RegExp(ie.join("|"),"i");function $e(e,t,n){var s,i,r,o,a=e.style;return(n=n||We(e))&&(""!==(o=n.getPropertyValue(t)||n[t])||oe(e)||(o=k.style(e,t)),!g.pixelBoxStyles()&&Be.test(o)&&Qe.test(t)&&(s=a.width,i=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=o,o=n.width,a.width=s,a.minWidth=i,a.maxWidth=r)),void 0!==o?o+"":o}function Ue(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(d){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",d.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(l).appendChild(d);var e=n.getComputedStyle(d);s="1%"!==e.top,u=12===t(e.marginLeft),d.style.right="60%",o=36===t(e.right),i=36===t(e.width),d.style.position="absolute",r=12===t(d.offsetWidth/3),re.removeChild(l),d=null}}function t(e){return Math.round(parseFloat(e))}var s,i,r,o,a,u,l=_.createElement("div"),d=_.createElement("div");d.style&&(d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===d.style.backgroundClip,k.extend(g,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),s},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),r},reliableTrDimensions:function(){var e,t,s,i;return null==a&&(e=_.createElement("table"),t=_.createElement("tr"),s=_.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",s.style.height="9px",re.appendChild(e).appendChild(t).appendChild(s),i=n.getComputedStyle(t),a=parseInt(i.height)>3,re.removeChild(e)),a}}))}();var Ve=["Webkit","Moz","ms"],Xe=_.createElement("div").style,Ke={};function Ge(e){var t=k.cssProps[e]||Ke[e];return t||(e in Xe?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ve.length;n--;)if((e=Ve[n]+t)in Xe)return e}(e)||e)}var Je=/^(none|table(?!-c[ea]).+)/,Ye=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,n){var s=se.exec(t);return s?Math.max(0,s[2]-(n||0))+(s[3]||"px"):t}function nt(e,t,n,s,i,r){var o="width"===t?1:0,a=0,u=0;if(n===(s?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(u+=k.css(e,n+ie[o],!0,i)),s?("content"===n&&(u-=k.css(e,"padding"+ie[o],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+ie[o]+"Width",!0,i))):(u+=k.css(e,"padding"+ie[o],!0,i),"padding"!==n?u+=k.css(e,"border"+ie[o]+"Width",!0,i):a+=k.css(e,"border"+ie[o]+"Width",!0,i));return!s&&r>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-u-a-.5))||0),u}function st(e,t,n){var s=We(e),i=(!g.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,s),r=i,o=$e(e,t,s),a="offset"+t[0].toUpperCase()+t.slice(1);if(Be.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&j(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===k.css(e,"display",!1,s))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,s),(r=a in e)&&(o=e[a])),(o=parseFloat(o)||0)+nt(e,t,n||(i?"border":"content"),r,s,o)+"px"}function it(e,t,n,s,i){return new it.prototype.init(e,t,n,s,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,s){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,r,o,a=X(t),u=Ye.test(t),l=e.style;if(u||(t=Ge(a)),o=k.cssHooks[t]||k.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(e,!1,s))?i:l[t];"string"===(r=typeof n)&&(i=se.exec(n))&&i[1]&&(n=le(e,t,i),r="number"),null!=n&&n==n&&("number"!==r||u||(n+=i&&i[3]||(k.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,s))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,s){var i,r,o,a=X(t);return Ye.test(t)||(t=Ge(a)),(o=k.cssHooks[t]||k.cssHooks[a])&&"get"in o&&(i=o.get(e,!0,n)),void 0===i&&(i=$e(e,t,s)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(r=parseFloat(i),!0===n||isFinite(r)?r||0:i):i}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,n,s){if(n)return!Je.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?st(e,t,s):Fe(e,Ze,(function(){return st(e,t,s)}))},set:function(e,n,s){var i,r=We(e),o=!g.scrollboxSize()&&"absolute"===r.position,a=(o||s)&&"border-box"===k.css(e,"boxSizing",!1,r),u=s?nt(e,t,s,a,r):0;return a&&o&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-nt(e,t,"border",!1,r)-.5)),u&&(i=se.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),tt(0,n,u)}}})),k.cssHooks.marginLeft=Ue(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat($e(e,"marginLeft"))||e.getBoundingClientRect().left-Fe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(n){for(var s=0,i={},r="string"==typeof n?n.split(" "):[n];s<4;s++)i[e+ie[s]+t]=r[s]||r[s-2]||r[0];return i}},"margin"!==e&&(k.cssHooks[e+t].set=tt)})),k.fn.extend({css:function(e,t){return Q(this,(function(e,t,n){var s,i,r={},o=0;if(Array.isArray(t)){for(s=We(e),i=t.length;o<i;o++)r[t[o]]=k.css(e,t[o],!1,s);return r}return void 0!==n?k.style(e,t,n):k.css(e,t)}),e,t,arguments.length>1)}}),k.Tween=it,it.prototype={constructor:it,init:function(e,t,n,s,i,r){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=s,this.unit=r||(k.cssNumber[n]?"":"px")},cur:function(){var e=it.propHooks[this.prop];return e&&e.get?e.get(this):it.propHooks._default.get(this)},run:function(e){var t,n=it.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):it.propHooks._default.set(this),this}},it.prototype.init.prototype=it.prototype,it.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},it.propHooks.scrollTop=it.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=it.prototype.init,k.fx.step={};var rt,ot,at=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function lt(){ot&&(!1===_.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(lt):n.setTimeout(lt,k.fx.interval),k.fx.tick())}function dt(){return n.setTimeout((function(){rt=void 0})),rt=Date.now()}function ct(e,t){var n,s=0,i={height:e};for(t=t?1:0;s<4;s+=2-t)i["margin"+(n=ie[s])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ht(e,t,n){for(var s,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),r=0,o=i.length;r<o;r++)if(s=i[r].call(n,t,e))return s}function pt(e,t,n){var s,i,r=0,o=pt.prefilters.length,a=k.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=rt||dt(),n=Math.max(0,l.startTime+l.duration-t),s=1-(n/l.duration||0),r=0,o=l.tweens.length;r<o;r++)l.tweens[r].run(s);return a.notifyWith(e,[l,s,n]),s<1&&o?n:(o||a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:rt||dt(),duration:n.duration,tweens:[],createTween:function(t,n){var s=k.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(s),s},stop:function(t){var n=0,s=t?l.tweens.length:0;if(i)return this;for(i=!0;n<s;n++)l.tweens[n].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),d=l.props;for(!function(e,t){var n,s,i,r,o;for(n in e)if(i=t[s=X(n)],r=e[n],Array.isArray(r)&&(i=r[1],r=e[n]=r[0]),n!==s&&(e[s]=r,delete e[n]),(o=k.cssHooks[s])&&"expand"in o)for(n in r=o.expand(r),delete e[s],r)n in e||(e[n]=r[n],t[n]=i);else t[s]=i}(d,l.opts.specialEasing);r<o;r++)if(s=pt.prefilters[r].call(l,e,d,l.opts))return v(s.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=s.stop.bind(s)),s;return k.map(d,ht,l),v(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,se.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(q);for(var n,s=0,i=e.length;s<i;s++)n=e[s],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var s,i,r,o,a,u,l,d,c="width"in t||"height"in t,h=this,p={},f=e.style,m=e.nodeType&&ue(e),g=J.get(e,"fxshow");for(s in n.queue||(null==(o=k._queueHooks(e,"fx")).unqueued&&(o.unqueued=0,a=o.empty.fire,o.empty.fire=function(){o.unqueued||a()}),o.unqueued++,h.always((function(){h.always((function(){o.unqueued--,k.queue(e,"fx").length||o.empty.fire()}))}))),t)if(i=t[s],at.test(i)){if(delete t[s],r=r||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[s])continue;m=!0}p[s]=g&&g[s]||k.style(e,s)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(p))for(s in c&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=g&&g.display)&&(l=J.get(e,"display")),"none"===(d=k.css(e,"display"))&&(l?d=l:(he([e],!0),l=e.style.display||l,d=k.css(e,"display"),he([e]))),("inline"===d||"inline-block"===d&&null!=l)&&"none"===k.css(e,"float")&&(u||(h.done((function(){f.display=l})),null==l&&(d=f.display,l="none"===d?"":d)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",h.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),u=!1,p)u||(g?"hidden"in g&&(m=g.hidden):g=J.access(e,"fxshow",{display:l}),r&&(g.hidden=!m),m&&he([e],!0),h.done((function(){for(s in m||he([e]),J.remove(e,"fxshow"),p)k.style(e,s,p[s])}))),u=ht(m?g[s]:0,s,h),s in g||(g[s]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),k.speed=function(e,t,n){var s=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return k.fx.off?s.duration=0:"number"!=typeof s.duration&&(s.duration in k.fx.speeds?s.duration=k.fx.speeds[s.duration]:s.duration=k.fx.speeds._default),null!=s.queue&&!0!==s.queue||(s.queue="fx"),s.old=s.complete,s.complete=function(){v(s.old)&&s.old.call(this),s.queue&&k.dequeue(this,s.queue)},s},k.fn.extend({fadeTo:function(e,t,n,s){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,n,s)},animate:function(e,t,n,s){var i=k.isEmptyObject(e),r=k.speed(t,n,s),o=function(){var t=pt(this,k.extend({},e),r);(i||J.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||!1===r.queue?this.each(o):this.queue(r.queue,o)},stop:function(e,t,n){var s=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",r=k.timers,o=J.get(this);if(i)o[i]&&o[i].stop&&s(o[i]);else for(i in o)o[i]&&o[i].stop&&ut.test(i)&&s(o[i]);for(i=r.length;i--;)r[i].elem!==this||null!=e&&r[i].queue!==e||(r[i].anim.stop(n),t=!1,r.splice(i,1));!t&&n||k.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=J.get(this),s=n[e+"queue"],i=n[e+"queueHooks"],r=k.timers,o=s?s.length:0;for(n.finish=!0,k.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<o;t++)s[t]&&s[t].finish&&s[t].finish.call(this);delete n.finish}))}}),k.each(["toggle","show","hide"],(function(e,t){var n=k.fn[t];k.fn[t]=function(e,s,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ct(t,!0),e,s,i)}})),k.each({slideDown:ct("show"),slideUp:ct("hide"),slideToggle:ct("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){k.fn[e]=function(e,n,s){return this.animate(t,e,n,s)}})),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),rt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){ot||(ot=!0,lt())},k.fx.stop=function(){ot=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(e,t){return e=k.fx&&k.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,s){var i=n.setTimeout(t,e);s.stop=function(){n.clearTimeout(i)}}))},function(){var e=_.createElement("input"),t=_.createElement("select").appendChild(_.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=_.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var ft,mt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return Q(this,k.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,n){var s,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?k.prop(e,t,n):(1===r&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(s=i.set(e,n,t))?s:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(s=i.get(e,t))?s:null==(s=k.find.attr(e,t))?void 0:s)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&j(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,s=0,i=t&&t.match(q);if(i&&1===e.nodeType)for(;n=i[s++];)e.removeAttribute(n)}}),ft={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=mt[t]||k.find.attr;mt[t]=function(e,t,s){var i,r,o=t.toLowerCase();return s||(r=mt[o],mt[o]=i,i=null!=n(e,t,s)?o:null,mt[o]=r),i}}));var gt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function yt(e){return(e.match(q)||[]).join(" ")}function _t(e){return e.getAttribute&&e.getAttribute("class")||""}function wt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(q)||[]}k.fn.extend({prop:function(e,t){return Q(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,n){var s,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(s=i.set(e,n,t))?s:e[t]=n:i&&"get"in i&&null!==(s=i.get(e,t))?s:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,n,s,i,r,o,a,u=0;if(v(e))return this.each((function(t){k(this).addClass(e.call(this,t,_t(this)))}));if((t=wt(e)).length)for(;n=this[u++];)if(i=_t(n),s=1===n.nodeType&&" "+yt(i)+" "){for(o=0;r=t[o++];)s.indexOf(" "+r+" ")<0&&(s+=r+" ");i!==(a=yt(s))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,s,i,r,o,a,u=0;if(v(e))return this.each((function(t){k(this).removeClass(e.call(this,t,_t(this)))}));if(!arguments.length)return this.attr("class","");if((t=wt(e)).length)for(;n=this[u++];)if(i=_t(n),s=1===n.nodeType&&" "+yt(i)+" "){for(o=0;r=t[o++];)for(;s.indexOf(" "+r+" ")>-1;)s=s.replace(" "+r+" "," ");i!==(a=yt(s))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,s="string"===n||Array.isArray(e);return"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(n){k(this).toggleClass(e.call(this,n,_t(this),t),t)})):this.each((function(){var t,i,r,o;if(s)for(i=0,r=k(this),o=wt(e);t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||((t=_t(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,s=0;for(t=" "+e+" ";n=this[s++];)if(1===n.nodeType&&(" "+yt(_t(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;k.fn.extend({val:function(e){var t,n,s,i=this[0];return arguments.length?(s=v(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=s?e.call(this,n,k(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=k.map(i,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=k.valHooks[i.type]||k.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:yt(k.text(e))}},select:{get:function(e){var t,n,s,i=e.options,r=e.selectedIndex,o="select-one"===e.type,a=o?null:[],u=o?r+1:i.length;for(s=r<0?u:o?r:0;s<u;s++)if(((n=i[s]).selected||s===r)&&!n.disabled&&(!n.parentNode.disabled||!j(n.parentNode,"optgroup"))){if(t=k(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,s,i=e.options,r=k.makeArray(t),o=i.length;o--;)((s=i[o]).selected=k.inArray(k.valHooks.option.get(s),r)>-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},g.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin"in n;var xt=/^(?:focusinfocus|focusoutblur)$/,kt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,s,i){var r,o,a,u,l,d,c,h,f=[s||_],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(o=h=a=s=s||_,3!==s.nodeType&&8!==s.nodeType&&!xt.test(m+k.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[k.expando]?e:new k.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=s),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[m]||{},i||!c.trigger||!1!==c.trigger.apply(s,t))){if(!i&&!c.noBubble&&!y(s)){for(u=c.delegateType||m,xt.test(u+m)||(o=o.parentNode);o;o=o.parentNode)f.push(o),a=o;a===(s.ownerDocument||_)&&f.push(a.defaultView||a.parentWindow||n)}for(r=0;(o=f[r++])&&!e.isPropagationStopped();)h=o,e.type=r>1?u:c.bindType||m,(d=(J.get(o,"events")||Object.create(null))[e.type]&&J.get(o,"handle"))&&d.apply(o,t),(d=l&&o[l])&&d.apply&&K(o)&&(e.result=d.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(f.pop(),t)||!K(s)||l&&v(s[m])&&!y(s)&&((a=s[l])&&(s[l]=null),k.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,kt),s[m](),e.isPropagationStopped()&&h.removeEventListener(m,kt),k.event.triggered=void 0,a&&(s[l]=a)),e.result}},simulate:function(e,t,n){var s=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(s,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),g.focusin||k.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var s=this.ownerDocument||this.document||this,i=J.access(s,t);i||s.addEventListener(e,n,!0),J.access(s,t,(i||0)+1)},teardown:function(){var s=this.ownerDocument||this.document||this,i=J.access(s,t)-1;i?J.access(s,t,i):(s.removeEventListener(e,n,!0),J.remove(s,t))}}}));var St=n.location,Ct={guid:Date.now()},Tt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Nt=/\[\]$/,Et=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,Lt=/^(?:input|select|textarea|keygen)/i;function It(e,t,n,s){var i;if(Array.isArray(t))k.each(t,(function(t,i){n||Nt.test(e)?s(e,i):It(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,s)}));else if(n||"object"!==x(t))s(e,t);else for(i in t)It(e+"["+i+"]",t[i],n,s)}k.param=function(e,t){var n,s=[],i=function(e,t){var n=v(t)?t():t;s[s.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){i(this.name,this.value)}));else for(n in e)It(n,e[n],t,i);return s.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Lt.test(this.nodeName)&&!jt.test(e)&&(this.checked||!me.test(e))})).map((function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,(function(e){return{name:t.name,value:e.replace(Et,"\r\n")}})):{name:t.name,value:n.replace(Et,"\r\n")}})).get()}});var Dt=/%20/g,Pt=/#.*$/,At=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,zt=/^(?:GET|HEAD)$/,qt=/^\/\//,Ot={},Rt={},Mt="*/".concat("*"),Bt=_.createElement("a");function Wt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var s,i=0,r=t.toLowerCase().match(q)||[];if(v(n))for(;s=r[i++];)"+"===s[0]?(s=s.slice(1)||"*",(e[s]=e[s]||[]).unshift(n)):(e[s]=e[s]||[]).push(n)}}function Ft(e,t,n,s){var i={},r=e===Rt;function o(a){var u;return i[a]=!0,k.each(e[a]||[],(function(e,a){var l=a(t,n,s);return"string"!=typeof l||r||i[l]?r?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)})),u}return o(t.dataTypes[0])||!i["*"]&&o("*")}function Qt(e,t){var n,s,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:s||(s={}))[n]=t[n]);return s&&k.extend(!0,e,s),e}Bt.href=St.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Qt(Qt(e,k.ajaxSettings),t):Qt(k.ajaxSettings,e)},ajaxPrefilter:Wt(Ot),ajaxTransport:Wt(Rt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var s,i,r,o,a,u,l,d,c,h,p=k.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?k(f):k.event,g=k.Deferred(),v=k.Callbacks("once memory"),y=p.statusCode||{},w={},b={},x="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=Ht.exec(r);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?r:null},setRequestHeader:function(e,t){return null==l&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return s&&s.abort(t),C(0,t),this}};if(g.promise(S),p.url=((e||p.url||St.href)+"").replace(qt,St.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(q)||[""],null==p.crossDomain){u=_.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Bt.protocol+"//"+Bt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=k.param(p.data,p.traditional)),Ft(Ot,p,t,S),l)return S;for(c in(d=k.event&&p.global)&&0==k.active++&&k.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!zt.test(p.type),i=p.url.replace(Pt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Dt,"+")):(h=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Tt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(At,"$1"),h=(Tt.test(i)?"&":"?")+"_="+Ct.guid+++h),p.url=i+h),p.ifModified&&(k.lastModified[i]&&S.setRequestHeader("If-Modified-Since",k.lastModified[i]),k.etag[i]&&S.setRequestHeader("If-None-Match",k.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Mt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(c,p.headers[c]);if(p.beforeSend&&(!1===p.beforeSend.call(f,S,p)||l))return S.abort();if(x="abort",v.add(p.complete),S.done(p.success),S.fail(p.error),s=Ft(Rt,p,t,S)){if(S.readyState=1,d&&m.trigger("ajaxSend",[S,p]),l)return S;p.async&&p.timeout>0&&(a=n.setTimeout((function(){S.abort("timeout")}),p.timeout));try{l=!1,s.send(w,C)}catch(e){if(l)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,o,u){var c,h,_,w,b,x=t;l||(l=!0,a&&n.clearTimeout(a),s=void 0,r=u||"",S.readyState=e>0?4:0,c=e>=200&&e<300||304===e,o&&(w=function(e,t,n){for(var s,i,r,o,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===s&&(s=e.mimeType||t.getResponseHeader("Content-Type"));if(s)for(i in a)if(a[i]&&a[i].test(s)){u.unshift(i);break}if(u[0]in n)r=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){r=i;break}o||(o=i)}r=r||o}if(r)return r!==u[0]&&u.unshift(r),n[r]}(p,S,o)),!c&&k.inArray("script",p.dataTypes)>-1&&(p.converters["text script"]=function(){}),w=function(e,t,n,s){var i,r,o,a,u,l={},d=e.dataTypes.slice();if(d[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(r=d.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!u&&s&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=r,r=d.shift())if("*"===r)r=u;else if("*"!==u&&u!==r){if(!(o=l[u+" "+r]||l["* "+r]))for(i in l)if((a=i.split(" "))[1]===r&&(o=l[u+" "+a[0]]||l["* "+a[0]])){!0===o?o=l[i]:!0!==l[i]&&(r=a[0],d.unshift(a[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+u+" to "+r}}}return{state:"success",data:t}}(p,w,S,c),c?(p.ifModified&&((b=S.getResponseHeader("Last-Modified"))&&(k.lastModified[i]=b),(b=S.getResponseHeader("etag"))&&(k.etag[i]=b)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=w.state,h=w.data,c=!(_=w.error))):(_=x,!e&&x||(x="error",e<0&&(e=0))),S.status=e,S.statusText=(t||x)+"",c?g.resolveWith(f,[h,x,S]):g.rejectWith(f,[S,x,_]),S.statusCode(y),y=void 0,d&&m.trigger(c?"ajaxSuccess":"ajaxError",[S,p,c?h:_]),v.fireWith(f,[S,x]),d&&(m.trigger("ajaxComplete",[S,p]),--k.active||k.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,n,s,i){return v(n)&&(i=i||s,s=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:i,data:n,success:s},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,n){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,n)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){k(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var $t={0:200,1223:204},Ut=k.ajaxSettings.xhr();g.cors=!!Ut&&"withCredentials"in Ut,g.ajax=Ut=!!Ut,k.ajaxTransport((function(e){var t,s;if(g.cors||Ut&&!e.crossDomain)return{send:function(i,r){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];for(o in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(o,i[o]);t=function(e){return function(){t&&(t=s=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r($t[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),s=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=s:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){t&&s()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(s,i){t=k("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),_.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Vt,Xt=[],Kt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||k.expando+"_"+Ct.guid++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",(function(e,t,s){var i,r,o,a=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Kt,"$1"+i):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||k.error(i+" was not called"),o[0]},e.dataTypes[0]="json",r=n[i],n[i]=function(){o=arguments},s.always((function(){void 0===r?k(n).removeProp(i):n[i]=r,e[i]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(i)),o&&v(r)&&r(o[0]),o=r=void 0})),"script"})),g.createHTMLDocument=((Vt=_.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((s=(t=_.implementation.createHTMLDocument("")).createElement("base")).href=_.location.href,t.head.appendChild(s)):t=_),r=!n&&[],(i=L.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,r),r&&r.length&&k(r).remove(),k.merge([],i.childNodes)));var s,i,r},k.fn.load=function(e,t,n){var s,i,r,o=this,a=e.indexOf(" ");return a>-1&&(s=yt(e.slice(a)),e=e.slice(0,a)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),o.length>0&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){r=arguments,o.html(s?k("<div>").append(k.parseHTML(e)).find(s):e)})).always(n&&function(e,t){o.each((function(){n.apply(this,r||[e.responseText,t,e])}))}),this},k.expr.pseudos.animated=function(e){return k.grep(k.timers,(function(t){return e===t.elem})).length},k.offset={setOffset:function(e,t,n){var s,i,r,o,a,u,l=k.css(e,"position"),d=k(e),c={};"static"===l&&(e.style.position="relative"),a=d.offset(),r=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&(r+u).indexOf("auto")>-1?(o=(s=d.position()).top,i=s.left):(o=parseFloat(r)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,k.extend({},a))),null!=t.top&&(c.top=t.top-a.top+o),null!=t.left&&(c.left=t.left-a.left+i),"using"in t?t.using.call(e,c):("number"==typeof c.top&&(c.top+="px"),"number"==typeof c.left&&(c.left+="px"),d.css(c))}},k.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){k.offset.setOffset(this,e,t)}));var t,n,s=this[0];return s?s.getClientRects().length?(t=s.getBoundingClientRect(),n=s.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,s=this[0],i={top:0,left:0};if("fixed"===k.css(s,"position"))t=s.getBoundingClientRect();else{for(t=this.offset(),n=s.ownerDocument,e=s.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==s&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(s,"marginTop",!0),left:t.left-i.left-k.css(s,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||re}))}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;k.fn[e]=function(s){return Q(this,(function(e,s,i){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===i)return r?r[t]:e[s];r?r.scrollTo(n?r.pageXOffset:i,n?i:r.pageYOffset):e[s]=i}),e,s,arguments.length)}})),k.each(["top","left"],(function(e,t){k.cssHooks[t]=Ue(g.pixelPosition,(function(e,n){if(n)return n=$e(e,t),Be.test(n)?k(e).position()[t]+"px":n}))})),k.each({Height:"height",Width:"width"},(function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,s){k.fn[s]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===r?"margin":"border");return Q(this,(function(t,n,i){var r;return y(t)?0===s.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?k.css(t,n,a):k.style(t,n,i,a)}),t,o?i:void 0,o)}}))})),k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){k.fn[t]=function(e){return this.on(t,e)}})),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,s){return this.on(t,e,n,s)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){k.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;k.proxy=function(e,t){var n,s,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return s=a.call(arguments,2),(i=function(){return e.apply(t||this,s.concat(a.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=j,k.isFunction=v,k.isWindow=y,k.camelCase=X,k.type=x,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},k.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},void 0===(s=function(){return k}.apply(t,[]))||(e.exports=s);var Jt=n.jQuery,Yt=n.$;return k.noConflict=function(e){return n.$===k&&(n.$=Yt),e&&n.jQuery===k&&(n.jQuery=Jt),k},void 0===i&&(n.jQuery=n.$=k),k}))},function(e,t,n){var s,i,r; /*! * jquery.fancytree.js * Tree view control with support for lazy loading and much more. * https://github.com/mar10/fancytree/ * * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * * @version 2.32.0 * @date 2019-09-10T07:42:12Z */i=[n(2),n(18)],void 0===(r="function"==typeof(s=function(e){"use strict";if(!e.ui||!e.ui.fancytree){var t,n,s=null,i=new RegExp(/\.|\//),r=/[&<>"'/]/g,o=/[<>"'/]/g,a={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},u={16:!0,17:!0,18:!0},l={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},d={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},c={0:"",1:"left",2:"middle",3:"right"},h="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),p={},f="columns types".split(" "),m="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),g={},v={},y={active:!0,children:!0,data:!0,focus:!0};for(t=0;t<h.length;t++)p[h[t]]=!0;for(t=0;t<m.length;t++)n=m[t],g[n]=!0,n!==n.toLowerCase()&&(v[n.toLowerCase()]=n);return _(e.ui,"Fancytree requires jQuery UI (http://jqueryui.com)"),Date.now||(Date.now=function(){return(new Date).getTime()}),L.prototype={_findDirectChild:function(e){var t,n,s=this.children;if(s)if("string"==typeof e){for(t=0,n=s.length;t<n;t++)if(s[t].key===e)return s[t]}else{if("number"==typeof e)return this.children[e];if(e.parent===this)return e}return null},_setChildren:function(e){_(e&&(!this.children||0===this.children.length),"only init supported"),this.children=[];for(var t=0,n=e.length;t<n;t++)this.children.push(new L(this,e[t]));this.tree._callHook("treeStructureChanged",this.tree,"setChildren")},addChildren:function(t,n){var s,i,r,o,a=this.getFirstChild(),u=this.getLastChild(),l=[];for(e.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),s=0,i=t.length;s<i;s++)l.push(new L(this,t[s]));if(o=l[0],null==n?this.children=this.children.concat(l):(n=this._findDirectChild(n),_((r=e.inArray(n,this.children))>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[r,0].concat(l))),a&&!n){for(s=0,i=l.length;s<i;s++)l[s].render();a!==this.getFirstChild()&&a.renderStatus(),u!==this.getLastChild()&&u.renderStatus()}else(!this.parent||this.parent.ul||this.tr)&&this.render();return 3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),this.triggerModifyChild("add",1===l.length?l[0]:null),o},addClass:function(e){return this.toggleClass(e,!0)},addNode:function(e,t){switch(void 0!==t&&"over"!==t||(t="child"),t){case"after":return this.getParent().addChildren(e,this.getNextSibling());case"before":return this.getParent().addChildren(e,this);case"firstChild":var n=this.children?this.children[0]:null;return this.addChildren(e,n);case"child":case"over":return this.addChildren(e)}_(!1,"Invalid mode: "+t)},addPagingNode:function(t,n){var s,i;if(n=n||"child",!1!==t)return t=e.extend({title:this.tree.options.strings.moreData,statusNodeType:"paging",icon:!1},t),this.partload=!0,this.addNode(t,n);for(s=this.children.length-1;s>=0;s--)"paging"===(i=this.children[s]).statusNodeType&&this.removeChild(i);this.partload=!1},appendSibling:function(e){return this.addNode(e,"after")},applyCommand:function(e,t){return this.tree.applyCommand(e,this,t)},applyPatch:function(t){if(null===t)return this.remove(),S(this);var n,s,i={children:!0,expanded:!0,parent:!0};for(n in t)t.hasOwnProperty(n)&&(s=t[n],i[n]||e.isFunction(s)||(g[n]?this[n]=s:this.data[n]=s));return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):S(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,n){return e.addNode(this.toDict(!0,n),t)},countChildren:function(e){var t,n,s,i=this.children;if(!i)return 0;if(s=i.length,!1!==e)for(t=0,n=s;t<n;t++)s+=i[t].countChildren();return s},debug:function(e){this.tree.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),w("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(e){var t=e?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(t,this)},error:function(e){this.tree.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),w("error",arguments))},findAll:function(t){t=e.isFunction(t)?t:j(t);var n=[];return this.visit((function(e){t(e)&&n.push(e)})),n},findFirst:function(t){t=e.isFunction(t)?t:j(t);var n=null;return this.visit((function(e){if(t(e))return n=e,!1})),n},findRelatedNode:function(e,t){return this.tree.findRelatedNode(this,e,t)},_changeSelectStatusAttrs:function(e){var t=!1,n=this.tree.options,i=s.evalOption("unselectable",this,this,n,!1),r=s.evalOption("unselectableStatus",this,this,n,void 0);switch(i&&null!=r&&(e=r),e){case!1:t=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:t=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:t=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:_(!1,"invalid state: "+e)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(e){var t=this.isSelected();this.visit((function(e){if(e._changeSelectStatusAttrs(t),e.radiogroup)return"skip"})),this.fixSelection3FromEndNodes(e)},fixSelection3FromEndNodes:function(e){var t=this.tree.options;_(3===t.selectMode,"expected selectMode 3"),function e(n){var i,r,o,a,u,l,d,c,h=n.children;if(h&&h.length){for(l=!0,d=!1,i=0,r=h.length;i<r;i++)a=e(o=h[i]),s.evalOption("unselectableIgnore",o,o,t,!1)||(!1!==a&&(d=!0),!0!==a&&(l=!1));u=!!l||!!d&&void 0}else u=null==(c=s.evalOption("unselectableStatus",n,n,t,void 0))?!!n.selected:!!c;return n.partsel&&!n.selected&&n.lazy&&null==n.children&&(u=void 0),n._changeSelectStatusAttrs(u),u}(this),this.visitParents((function(e){var n,i,r,o,a,u=e.children,l=!0,d=!1;for(n=0,i=u.length;n<i;n++)r=u[n],s.evalOption("unselectableIgnore",r,r,t,!1)||(((o=null==(a=s.evalOption("unselectableStatus",r,r,t,void 0))?!!r.selected:!!a)||r.partsel)&&(d=!0),o||(l=!1));o=!!l||!!d&&void 0,e._changeSelectStatusAttrs(o)}))},fromDict:function(t){for(var n in t)g[n]?this[n]=t[n]:"data"===n?e.extend(this.data,t.data):e.isFunction(t[n])||y[n]||(this.data[n]=t[n]);t.children&&(this.removeChildren(),this.addChildren(t.children)),this.renderTitle()},getChildren:function(){if(void 0!==this.hasChildren())return this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return e.inArray(this,this.parent.children)},getIndexHier:function(t,n){t=t||".";var s,i=[];return e.each(this.getParentList(!1,!0),(function(e,t){s=""+(t.getIndex()+1),n&&(s=("0000000"+s).substr(-n)),i.push(s)})),i.join(t)},getKeyPath:function(e){var t=this.tree.options.keyPathSeparator;return t+this.getPath(!e,"key",t)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},getNextSibling:function(){if(this.parent){var e,t,n=this.parent.children;for(e=0,t=n.length-1;e<t;e++)if(n[e]===this)return n[e+1]}return null},getParent:function(){return this.parent},getParentList:function(e,t){for(var n=[],s=t?this:this.parent;s;)(e||s.parent)&&n.unshift(s),s=s.parent;return n},getPath:function(t,n,s){t=!1!==t,n=n||"title",s=s||"/";var i,r=[],o=e.isFunction(n);return this.visitParents((function(e){e.parent&&(i=o?n(e):e[n],r.unshift(i))}),t),r.join(s)},getPrevSibling:function(){if(this.parent){var e,t,n=this.parent.children;for(e=1,t=n.length;e<t;e++)if(n[e]===this)return n[e-1]}return null},getSelectedNodes:function(e){var t=[];return this.visit((function(n){if(n.selected&&(t.push(n),!0===e))return"skip"})),t},hasChildren:function(){if(this.lazy){if(null==this.children)return;if(0===this.children.length)return!1;if(1===this.children.length&&this.children[0].isStatusNode())return;return!0}return!(!this.children||!this.children.length)},hasClass:function(e){return(" "+(this.extraClasses||"")+" ").indexOf(" "+e+" ")>=0},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(e){this.tree.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),w("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(e){return this.getIndexHier(".",5)>e.getIndexHier(".",5)},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(t){if(!t||t.tree!==this.tree)return!1;for(var n=this.parent;n;){if(n===t)return!0;n===n.parent&&e.error("Recursive parent link: "+n),n=n.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var e,t,n=this.tree.enableFilter,s=this.getParentList(!1,!1);if(n&&!this.match&&!this.subMatchCount)return this.debug("isVisible: HIDDEN ("+n+", "+this.match+", "+this.match+")"),!1;for(e=0,t=s.length;e<t;e++)if(!s[e].expanded)return this.debug("isVisible: HIDDEN (parent collapsed)"),!1;return this.debug("isVisible: VISIBLE"),!0},lazyLoad:function(e){return this.warn("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead."),this.load(e)},load:function(e){var t,n,s=this,i=this.isExpanded();return _(this.isLazy(),"load() requires a lazy node"),e||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),!1===(n=this.tree._triggerNodeEvent("lazyLoad",this))?S(this):(_("boolean"!=typeof n,"lazyLoad event must return source in data.result"),t=this.tree._callHook("nodeLoadChildren",this,n),i?(this.expanded=!0,t.always((function(){s.render()}))):t.always((function(){s.renderStatus()})),t)):S(this)},makeVisible:function(t){var n,s=this,i=[],r=new e.Deferred,o=this.getParentList(!1,!1),a=o.length,u=!(t&&!0===t.noAnimation),l=!(t&&!1===t.scrollIntoView);for(n=a-1;n>=0;n--)i.push(o[n].setExpanded(!0,t));return e.when.apply(e,i).done((function(){l?s.scrollIntoView(u).done((function(){r.resolve()})):r.resolve()})),r.promise()},moveTo:function(t,n,s){void 0===n||"over"===n?n="child":"firstChild"===n&&(t.children&&t.children.length?(n="before",t=t.children[0]):n="child");var i,r=this.tree,o=this.parent,a="child"===n?t:t.parent;if(this!==t){if(this.parent?a.isDescendantOf(this)&&e.error("Cannot move a node to its own descendant"):e.error("Cannot move system root"),a!==o&&o.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===a)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else _((i=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(i,1);if(this.parent=a,a.hasChildren())switch(n){case"child":a.children.push(this);break;case"before":_((i=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(i,0,this);break;case"after":_((i=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(i+1,0,this);break;default:e.error("Invalid mode "+n)}else a.children=[this];s&&t.visit(s,!0),a===o?a.triggerModifyChild("move",this):a.triggerModifyChild("add",this),r!==t.tree&&(this.warn("Cross-tree moveTo is experimental!"),this.visit((function(e){e.tree=t.tree}),!0)),r._callHook("treeStructureChanged",r,"moveTo"),o.isDescendantOf(a)||o.render(),a.isDescendantOf(o)||a===o||a.render()}},navigate:function(t,n){var s,i=e.ui.keyCode;switch(t){case"left":case i.LEFT:if(this.expanded)return this.setExpanded(!1);break;case"right":case i.RIGHT:if(!this.expanded&&(this.children||this.lazy))return this.setExpanded()}if(s=this.findRelatedNode(t)){try{s.makeVisible({scrollIntoView:!1})}catch(e){}return!1===n?(s.setFocus(),S()):s.setActive()}return this.warn("Could not find related node '"+t+"'."),S()},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(e){return this.toggleClass(e,!1)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(n){var s,i=this.parent,r=e.inArray(this,i.children),o=this;return _(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(s=this.tree._callHook("nodeLoadChildren",this,n)).done((function(e){var n=o.children;for(t=0;t<n.length;t++)n[t].parent=i;i.children.splice.apply(i.children,[r+1,0].concat(n)),o.children=null,o.remove(),i.render()})).fail((function(){o.setExpanded()})),s},resetLazy:function(){this.removeChildren(),this.expanded=!1,this.lazy=!0,this.children=void 0,this.renderStatus()},scheduleAction:function(t,n){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.debug("clearTimeout(%o)",this.tree.timer)),this.tree.timer=null;var s=this;switch(t){case"cancel":break;case"expand":this.tree.timer=setTimeout((function(){s.tree.debug("setTimeout: trigger expand"),s.setExpanded(!0)}),n);break;case"activate":this.tree.timer=setTimeout((function(){s.tree.debug("setTimeout: trigger activate"),s.setActive(!0)}),n);break;default:e.error("Invalid mode "+t)}},scrollIntoView:function(t,n){if(void 0!==n&&(s=n).tree&&void 0!==s.statusNodeType)throw Error("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead.");var s,i=e.extend({effects:!0===t?{duration:200,queue:!1}:t,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent,topNode:null},n),r=i.scrollParent,o=this.tree.$container,a=o.css("overflow-y");r?r.jquery||(r=e(r)):r=this.tree.tbody?o.scrollParent():"scroll"===a||"auto"===a?o:o.scrollParent(),r[0]!==document&&r[0]!==document.body||(this.debug("scrollIntoView(): normalizing scrollParent to 'window':",r[0]),r=e(window));var u,l,d,c=new e.Deferred,h=this,p=e(this.span).height(),f=i.scrollOfs.top||0,m=i.scrollOfs.bottom||0,g=r.height(),v=r.scrollTop(),y=r,w=r[0]===window,b=i.topNode||null,x=null;return this.isVisible()?(w?(l=e(this.span).offset().top,u=b&&b.span?e(b.span).offset().top:0,y=e("html,body")):(_(r[0]!==document&&r[0]!==document.body,"scrollParent should be a simple element or `window`, not document or body."),d=r.offset().top,l=e(this.span).offset().top-d+v,u=b?e(b.span).offset().top-d+v:0,g-=Math.max(0,r.innerHeight()-r[0].clientHeight)),l<v+f?x=l-f:l+p>v+g-m&&(x=l+p-g+m,b&&(_(b.isRootNode()||b.isVisible(),"topNode must be visible"),u<x&&(x=u-f))),null===x?c.resolveWith(this):i.effects?(i.effects.complete=function(){c.resolveWith(h)},y.stop(!0).animate({scrollTop:x},i.effects)):(y[0].scrollTop=x,c.resolveWith(this)),c.promise()):(this.warn("scrollIntoView(): node is invisible."),S())},setActive:function(e,t){return this.tree._callHook("nodeSetActive",this,e,t)},setExpanded:function(e,t){return this.tree._callHook("nodeSetExpanded",this,e,t)},setFocus:function(e){return this.tree._callHook("nodeSetFocus",this,e)},setSelected:function(e,t){return this.tree._callHook("nodeSetSelected",this,e,t)},setStatus:function(e,t,n){return this.tree._callHook("nodeSetStatus",this,e,t,n)},setTitle:function(e){this.title=e,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(e,t){var n,s,i=this.children;if(i){if(e=e||function(e,t){var n=e.title.toLowerCase(),s=t.title.toLowerCase();return n===s?0:n>s?1:-1},i.sort(e),t)for(n=0,s=i.length;n<s;n++)i[n].children&&i[n].sortChildren(e,"$norender$");"$norender$"!==t&&this.render(),this.triggerModifyChild("sort")}},toDict:function(t,n){var s,i,r,o,a={},u=this;if(e.each(m,(function(e,t){(u[t]||!1===u[t])&&(a[t]=u[t])})),e.isEmptyObject(this.data)||(a.data=e.extend({},this.data),e.isEmptyObject(a.data)&&delete a.data),n){if(!1===(o=n(a,u)))return!1;"skip"===o&&(t=!1)}if(t&&this.hasChildren())for(a.children=[],s=0,i=this.children.length;s<i;s++)(r=this.children[s]).isStatusNode()||!1!==(o=r.toDict(!0,n))&&a.children.push(o);return a},toggleClass:function(t,n){var s,i,r=t.match(/\S+/g)||[],o=0,a=!1,u=this[this.tree.statusClassPropName],l=" "+(this.extraClasses||"")+" ";for(u&&e(u).toggleClass(t,n);s=r[o++];)if(i=l.indexOf(" "+s+" ")>=0,n=void 0===n?!i:!!n)i||(l+=s+" ",a=!0);else for(;l.indexOf(" "+s+" ")>-1;)l=l.replace(" "+s+" "," ");return this.extraClasses=e.trim(l),a},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(t,n,s){var i,r=this.tree.options.modifyChild;r&&(n&&n.parent!==this&&e.error("childNode "+n+" is not a child of "+this),i={node:this,tree:this.tree,operation:t,childNode:n||null},s&&e.extend(i,s),r({type:"modifyChild"},i))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var n,s,i=!0,r=this.children;if(!0===t&&(!1===(i=e(this))||"skip"===i))return i;if(r)for(n=0,s=r.length;n<s&&!1!==(i=r[n].visit(e,!0));n++);return i},visitAndLoad:function(t,n,s){var i,r,o,a=this;return!t||!0!==n||!1!==(r=t(a))&&"skip"!==r?a.children||a.lazy?(i=new e.Deferred,o=[],a.load().done((function(){for(var n=0,s=a.children.length;n<s;n++){if(!1===(r=a.children[n].visitAndLoad(t,!0,!0))){i.reject();break}"skip"!==r&&o.push(r)}e.when.apply(this,o).then((function(){i.resolve()}))})),i.promise()):S():s?r:S()},visitParents:function(e,t){if(t&&!1===e(this))return!1;for(var n=this.parent;n;){if(!1===e(n))return!1;n=n.parent}return!0},visitSiblings:function(e,t){var n,s,i,r=this.parent.children;for(n=0,s=r.length;n<s;n++)if(i=r[n],(t||i!==this)&&!1===e(i))return!1;return!0},warn:function(e){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),w("warn",arguments))}},I.prototype={_makeHookContext:function(t,n,s){var i,r;return void 0!==t.node?(n&&t.originalEvent!==n&&e.error("invalid args"),i=t):t.tree?i={node:t,tree:r=t.tree,widget:r.widget,options:r.widget.options,originalEvent:n,typeInfo:r.types[t.type]||{}}:t.widget?i={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:n}:e.error("invalid args"),s&&e.extend(i,s),i},_callHook:function(t,n,s){var i=this._makeHookContext(n),r=this[t],o=Array.prototype.slice.call(arguments,2);return e.isFunction(r)||e.error("_callHook('"+t+"') is not a function"),o.unshift(i),r.apply(this,o)},_setExpiringValue:function(e,t,n){this._tempCache[e]={value:t,expire:Date.now()+(+n||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_requireExtension:function(t,n,s,i){null!=s&&(s=!!s);var r=this._local.name,o=this.options.extensions,a=e.inArray(t,o)<e.inArray(r,o),u=n&&null==this.ext[t],l=!u&&null!=s&&s!==a;return _(r&&r!==t,"invalid or same name '"+r+"' (require yourself?)"),!u&&!l||(i||(u||n?(i="'"+r+"' extension requires '"+t+"'",l&&(i+=" to be registered "+(s?"before":"after")+" itself")):i="If used together, `"+t+"` must be registered "+(s?"before":"after")+" `"+r+"`"),e.error(i),!1)},activateKey:function(e,t){var n=this.getNodeByKey(e);return n?n.setActive(!0,t):this.activeNode&&this.activeNode.setActive(!1,t),n},addPagingNode:function(e,t){return this.rootNode.addPagingNode(e,t)},applyCommand:function(t,n,s){var i;switch(n=n||this.getActiveNode(),t){case"moveUp":(i=n.getPrevSibling())&&(n.moveTo(i,"before"),n.setActive());break;case"moveDown":(i=n.getNextSibling())&&(n.moveTo(i,"after"),n.setActive());break;case"indent":(i=n.getPrevSibling())&&(n.moveTo(i,"child"),i.setExpanded(),n.setActive());break;case"outdent":n.isTopLevel()||(n.moveTo(n.getParent(),"after"),n.setActive());break;case"remove":i=n.getPrevSibling()||n.getParent(),n.remove(),i&&i.setActive();break;case"addChild":n.editCreateNode("child","");break;case"addSibling":n.editCreateNode("after","");break;case"rename":n.editStart();break;case"down":case"first":case"last":case"left":case"parent":case"right":case"up":return n.navigate(t);default:e.error("Unhandled command: '"+t+"'")}},applyPatch:function(t){var n,s,i,r,o,a,u=t.length,l=[];for(s=0;s<u;s++)_(2===(i=t[s]).length,"patchList must be an array of length-2-arrays"),r=i[0],o=i[1],(a=null===r?this.rootNode:this.getNodeByKey(r))?(n=new e.Deferred,l.push(n),a.applyPatch(o).always(T(n,a))):this.warn("could not find node with key '"+r+"'");return e.when.apply(e,l).promise()},clear:function(e){this._callHook("treeClear",this)},count:function(){return this.rootNode.countChildren()},debug:function(e){this.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),w("log",arguments))},enable:function(e){!1===e?this.widget.disable():this.widget.enable()},enableUpdate:function(e){return e=!1!==e,!!this._enableUpdate==!!e?e:(this._enableUpdate=e,e?(this.debug("enableUpdate(true): redraw "),this._callHook("treeStructureChanged",this,"enableUpdate"),this.render()):this.debug("enableUpdate(false)..."),!e)},error:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),w("error",arguments))},expandAll:function(e,t){var n=this.enableUpdate(!1);e=!1!==e,this.visit((function(n){!1!==n.hasChildren()&&n.isExpanded()!==e&&n.setExpanded(e,t)})),this.enableUpdate(n)},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(e,t){var n,s=null,i=this.getFirstChild();function r(n){if(e(n)&&(s=n),s||n===t)return!1}return e="string"==typeof e?(n=new RegExp("^"+e,"i"),function(e){return n.test(e.title)}):e,t=t||i,this.visitRows(r,{start:t,includeSelf:!1}),s||t===i||this.visitRows(r,{start:i,includeSelf:!0}),s},findRelatedNode:function(t,n,s){var i=null,r=e.ui.keyCode;switch(n){case"parent":case r.BACKSPACE:t.parent&&t.parent.parent&&(i=t.parent);break;case"first":case r.HOME:this.visit((function(e){if(e.isVisible())return i=e,!1}));break;case"last":case r.END:this.visit((function(e){e.isVisible()&&(i=e)}));break;case"left":case r.LEFT:t.expanded?t.setExpanded(!1):t.parent&&t.parent.parent&&(i=t.parent);break;case"right":case r.RIGHT:t.expanded||!t.children&&!t.lazy?t.children&&t.children.length&&(i=t.children[0]):(t.setExpanded(),i=t);break;case"up":case r.UP:this.visitRows((function(e){return i=e,!1}),{start:t,reverse:!0,includeSelf:!1});break;case"down":case r.DOWN:this.visitRows((function(e){return i=e,!1}),{start:t,includeSelf:!1});break;default:this.tree.warn("Unknown relation '"+n+"'.")}return i},generateFormElements:function(t,n,s){s=s||{};var i,r="string"==typeof t?t:"ft_"+this._id+"[]",o="string"==typeof n?n:"ft_"+this._id+"_active",a="fancytree_result_"+this._id,u=e("#"+a),l=3===this.options.selectMode&&!1!==s.stopOnParents;function d(t){u.append(e("<input>",{type:"checkbox",name:r,value:t.key,checked:!0}))}u.length?u.empty():u=e("<div>",{id:a}).hide().insertAfter(this.$container),!1!==n&&this.activeNode&&u.append(e("<input>",{type:"radio",name:o,value:this.activeNode.key,checked:!0})),s.filter?this.visit((function(e){var t=s.filter(e);if("skip"===t)return t;!1!==t&&d(e)})):!1!==t&&(i=this.getSelectedNodes(l),e.each(i,(function(e,t){d(t)})))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getOption:function(e){return this.widget.option(e)},getNodeByKey:function(e,t){var n,s;return!t&&(n=document.getElementById(this.options.idPrefix+e))?n.ftnode?n.ftnode:null:(t=t||this.rootNode,s=null,t.visit((function(t){if(t.key===e)return s=t,!1}),!0),s)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(e){return this.rootNode.getSelectedNodes(e)},hasFocus:function(){return!!this._hasFocus},info:function(e){this.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),w("info",arguments))},isLoading:function(){var e=!1;return this.rootNode.visit((function(t){if(t._isLoading||t._requestId)return e=!0,!1}),!0),e},loadKeyPath:function(t,n){var s,i,r,o=this,a=new e.Deferred,u=this.getRootNode(),l=this.options.keyPathSeparator,d=[],c=e.extend({},n);for("function"==typeof n?s=n:n&&n.callback&&(s=n.callback),c.callback=function(e,t,n){s&&s.call(e,t,n),a.notifyWith(e,[{node:t,status:n}])},null==c.matchKey&&(c.matchKey=function(e,t){return e.key===t}),e.isArray(t)||(t=[t]),i=0;i<t.length;i++)(r=t[i]).charAt(0)===l&&(r=r.substr(1)),d.push(r.split(l));return setTimeout((function(){o._loadKeyPathImpl(a,c,u,d).done((function(){a.resolve()}))}),0),a.promise()},_loadKeyPathImpl:function(t,n,s,i){var r,o,a,u,l,d,c,h,p,f,m=this;function g(e,t){var s,i,r=e.children;if(r)for(s=0,i=r.length;s<i;s++)if(n.matchKey(r[s],t))return r[s];return null}for(c={},o=0;o<i.length;o++)for(p=i[o],h=s;p.length;){if(a=p.shift(),!(u=g(h,a))){this.warn("loadKeyPath: key not found: "+a+" (parent: "+h+")"),n.callback(this,a,"error");break}if(0===p.length){n.callback(this,u,"ok");break}if(u.lazy&&void 0===u.hasChildren()){n.callback(this,u,"loaded"),c[a=u.key]?c[a].pathSegList.push(p):c[a]={parent:u,pathSegList:[p]};break}n.callback(this,u,"loaded"),h=u}function v(e,t,s){n.callback(m,t,"loading"),t.load().done((function(){m._loadKeyPathImpl.call(m,e,n,t,s).always(T(e,m))})).fail((function(s){m.warn("loadKeyPath: error loading lazy "+t),n.callback(m,u,"error"),e.rejectWith(m)}))}for(l in r=[],c)c.hasOwnProperty(l)&&(d=c[l],f=new e.Deferred,r.push(f),v(f,d.parent,d.pathSegList));return e.when.apply(e,r).promise()},reactivate:function(e){var t,n=this.activeNode;return n?(this.activeNode=null,t=n.setActive(!0,{noFocus:!0}),e&&n.setFocus(),t):S()},reload:function(e){return this._callHook("treeClear",this),this._callHook("treeLoad",this,e)},render:function(e,t){return this.rootNode.render(e,t)},selectAll:function(e){this.visit((function(t){t.setSelected(e)}))},setFocus:function(e){return this._callHook("treeSetFocus",this,e)},setOption:function(e,t){return this.widget.option(e,t)},toDict:function(e,t){var n=this.rootNode.toDict(!0,t);return e?n:n.children},toString:function(){return"Fancytree@"+this._id},_triggerNodeEvent:function(e,t,n,s){var i=this._makeHookContext(t,n,s),r=this.widget._trigger(e,n,i);return!1!==r&&void 0!==i.result?i.result:r},_triggerTreeEvent:function(e,t,n){var s=this._makeHookContext(this,t,n),i=this.widget._trigger(e,t,s);return!1!==i&&void 0!==s.result?s.result:i},visit:function(e){return this.rootNode.visit(e,!1)},visitRows:function(e,t){if(!this.rootNode.children)return!1;if(t&&t.reverse)return delete t.reverse,this._visitRowsUp(e,t);var n,s,i,r=0,o=!1===(t=t||{}).includeSelf,a=!!t.includeHidden,u=!a&&this.enableFilter,l=t.start||this.rootNode.children[0];for(s=l.parent;s;){for(n=(i=s.children).indexOf(l)+r;n<i.length;n++)if(l=i[n],!u||l.match||l.subMatchCount){if(!o&&!1===e(l))return!1;if(o=!1,l.children&&l.children.length&&(a||l.expanded)&&!1===l.visit((function(t){return!u||t.match||t.subMatchCount?!1!==e(t)&&(a||!t.children||t.expanded?void 0:"skip"):"skip"}),!1))return!1}l=s,s=s.parent,r=1}return!0},_visitRowsUp:function(e,t){for(var n,s,i,r=!!t.includeHidden,o=t.start||this.rootNode.children[0];;){if((n=(i=o.parent).children)[0]===o){if(!(o=i).parent)break;n=i.children}else for(s=n.indexOf(o),o=n[s-1];(r||o.expanded)&&o.children&&o.children.length;)i=o,o=(n=o.children)[n.length-1];if((r||o.isVisible())&&!1===e(o))return!1}},warn:function(e){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),w("warn",arguments))}},e.extend(I.prototype,{nodeClick:function(e){var t,n,s=e.targetType,i=e.node;if("expander"===s){if(i.isLoading())return void i.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",e)}else if("checkbox"===s)this._callHook("nodeToggleSelected",e),e.options.focusOnSelect&&this._callHook("nodeSetFocus",e,!0);else{if(n=!1,t=!0,i.folder)switch(e.options.clickFolderMode){case 2:n=!0,t=!1;break;case 3:t=!0,n=!0}t&&(this.nodeSetFocus(e),this._callHook("nodeSetActive",e,!0)),n&&this._callHook("nodeToggleExpanded",e)}},nodeCollapseSiblings:function(e,t){var n,s,i,r=e.node;if(r.parent)for(s=0,i=(n=r.parent.children).length;s<i;s++)n[s]!==r&&n[s].expanded&&this._callHook("nodeSetExpanded",n[s],!1,t)},nodeDblclick:function(e){"title"===e.targetType&&4===e.options.clickFolderMode&&this._callHook("nodeToggleExpanded",e),"title"===e.targetType&&e.originalEvent.preventDefault()},nodeKeydown:function(t){var n,i,r,o=t.originalEvent,a=t.node,u=t.tree,c=t.options,h=o.which,p=o.key||String.fromCharCode(h),f=!!(o.altKey||o.ctrlKey||o.metaKey),m=!d[h]&&!l[h]&&!f,g=e(o.target),v=!0,y=!(o.ctrlKey||!c.autoActivate);if(a||(r=this.getActiveNode()||this.getFirstChild())&&(r.setFocus(),(a=t.node=this.focusNode).debug("Keydown force focus on active node")),c.quicksearch&&m&&!g.is(":input:enabled"))return(i=Date.now())-u.lastQuicksearchTime>500&&(u.lastQuicksearchTerm=""),u.lastQuicksearchTime=i,u.lastQuicksearchTerm+=p,(n=u.findNextNode(u.lastQuicksearchTerm,u.getActiveNode()))&&n.setActive(),void o.preventDefault();switch(s.eventToString(o)){case"+":case"=":u.nodeSetExpanded(t,!0);break;case"-":u.nodeSetExpanded(t,!1);break;case"space":a.isPagingNode()?u._triggerNodeEvent("clickPaging",t,o):s.evalOption("checkbox",a,a,c,!1)?u.nodeToggleSelected(t):u.nodeSetActive(t,!0);break;case"return":u.nodeSetActive(t,!0);break;case"home":case"end":case"backspace":case"left":case"right":case"up":case"down":a.navigate(o.which,y);break;default:v=!1}v&&o.preventDefault()},nodeLoadChildren:function(t,n){var s,i,r,o,a=t.tree,u=t.node,l=Date.now();return e.isFunction(n)&&(n=n.call(a,{type:"source"},t),_(!e.isFunction(n),"source callback must not return another function")),n.url&&(u._requestId&&u.warn("Recursive load request #"+l+" while #"+u._requestId+" is pending."),s=e.extend({},t.options.ajax,n),u._requestId=l,s.debugDelay?(i=s.debugDelay,delete s.debugDelay,e.isArray(i)&&(i=i[0]+Math.random()*(i[1]-i[0])),u.warn("nodeLoadChildren waiting debugDelay "+Math.round(i)+" ms ..."),r=e.Deferred((function(t){setTimeout((function(){e.ajax(s).done((function(){t.resolveWith(this,arguments)})).fail((function(){t.rejectWith(this,arguments)}))}),i)}))):r=e.ajax(s),n=new e.Deferred,r.done((function(s,i,r){var o,d;if("json"!==this.dataType&&"jsonp"!==this.dataType||"string"!=typeof s||e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),u._requestId&&u._requestId>l)n.rejectWith(this,["$recursive_request"]);else{if(t.options.postProcess){try{d=a._triggerNodeEvent("postProcess",t,t.originalEvent,{response:s,error:null,dataType:this.dataType})}catch(e){d={error:e,message:""+e,details:"postProcess failed"}}if(d.error)return o=e.isPlainObject(d.error)?d.error:{message:d.error},o=a._makeHookContext(u,null,o),void n.rejectWith(this,[o]);(e.isArray(d)||e.isPlainObject(d)&&e.isArray(d.children))&&(s=d)}else s&&s.hasOwnProperty("d")&&t.options.enableAspx&&(s="string"==typeof s.d?e.parseJSON(s.d):s.d);n.resolveWith(this,[s])}})).fail((function(e,t,s){var i=a._makeHookContext(u,null,{error:e,args:Array.prototype.slice.call(arguments),message:s,details:e.status+": "+s});n.rejectWith(this,[i])}))),e.isFunction(n.then)&&e.isFunction(n.catch)&&(r=n,n=new e.Deferred,r.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))),e.isFunction(n.promise)?(a.nodeSetStatus(t,"loading"),n.done((function(e){a.nodeSetStatus(t,"ok"),u._requestId=null})).fail((function(e){var n;"$recursive_request"!==e?(e.node&&e.error&&e.message?n=e:"[object Object]"===(n=a._makeHookContext(u,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""})).message&&(n.message=""),u.warn("Load children failed ("+n.message+")",n),!1!==a._triggerNodeEvent("loadError",n,null)&&a.nodeSetStatus(t,"error",n.message,n.details)):u.warn("Ignored response for obsolete load request #"+l+" (expected #"+u._requestId+")")}))):t.options.postProcess&&(o=a._triggerNodeEvent("postProcess",t,t.originalEvent,{response:n,error:null,dataType:typeof n}),(e.isArray(o)||e.isPlainObject(o)&&e.isArray(o.children))&&(n=o)),e.when(n).done((function(n){var s,i;e.isPlainObject(n)&&(_(u.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),_(e.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),s=n,n=n.children,delete s.children,e.each(f,(function(e,t){void 0!==s[t]&&(a[t]=s[t],delete s[t])})),e.extend(a.data,s)),_(e.isArray(n),"expected array of children"),u._setChildren(n),a.options.nodata&&0===n.length&&(e.isFunction(a.options.nodata)?i=a.options.nodata.call(a,{type:"nodata"},t):!0===a.options.nodata&&u.isRootNode()?i=a.options.strings.nodata:"string"==typeof a.options.nodata&&u.isRootNode()&&(i=a.options.nodata),i&&u.setStatus("nodata",i)),a._triggerNodeEvent("loadChildren",u)}))},nodeLoadKeyPath:function(e,t){},nodeRemoveChild:function(t,n){var s,i=t.node,r=e.extend({},t,{node:n}),o=i.children;if(1===o.length)return _(n===o[0],"invalid single child"),this.nodeRemoveChildren(t);this.activeNode&&(n===this.activeNode||this.activeNode.isDescendantOf(n))&&this.activeNode.setActive(!1),this.focusNode&&(n===this.focusNode||this.focusNode.isDescendantOf(n))&&(this.focusNode=null),this.nodeRemoveMarkup(r),this.nodeRemoveChildren(r),_((s=e.inArray(n,o))>=0,"invalid child"),i.triggerModifyChild("remove",n),n.visit((function(e){e.parent=null}),!0),this._callHook("treeRegisterNode",this,!1,n),o.splice(s,1)},nodeRemoveChildMarkup:function(t){var n=t.node;n.ul&&(n.isRootNode()?e(n.ul).empty():(e(n.ul).remove(),n.ul=null),n.visit((function(e){e.li=e.ul=null})))},nodeRemoveChildren:function(e){var t=e.tree,n=e.node;n.children&&(this.activeNode&&this.activeNode.isDescendantOf(n)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(n)&&(this.focusNode=null),this.nodeRemoveChildMarkup(e),n.triggerModifyChild("remove",null),n.visit((function(e){e.parent=null,t._callHook("treeRegisterNode",t,!1,e)})),n.lazy?n.children=[]:n.children=null,n.isRootNode()||(n.expanded=!1),this.nodeRenderStatus(e))},nodeRemoveMarkup:function(t){var n=t.node;n.li&&(e(n.li).remove(),n.li=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(t,n,s,i,r){var o,a,u,l,d,c,h,p=t.node,f=t.tree,m=t.options,g=m.aria,v=!1,y=p.parent,w=!y,b=p.children,x=null;if(!1!==f._enableUpdate&&(w||y.ul)){if(_(w||y.ul,"parent UL must exist"),w||(p.li&&(n||p.li.parentNode!==p.parent.ul)&&(p.li.parentNode===p.parent.ul?x=p.li.nextSibling:this.debug("Unlinking "+p+" (must be child of "+p.parent+")"),this.nodeRemoveMarkup(t)),p.li?this.nodeRenderStatus(t):(v=!0,p.li=document.createElement("li"),p.li.ftnode=p,p.key&&m.generateIds&&(p.li.id=m.idPrefix+p.key),p.span=document.createElement("span"),p.span.className="fancytree-node",g&&!p.tr&&e(p.li).attr("role","treeitem"),p.li.appendChild(p.span),this.nodeRenderTitle(t),m.createNode&&m.createNode.call(f,{type:"createNode"},t)),m.renderNode&&m.renderNode.call(f,{type:"renderNode"},t)),b){if(w||p.expanded||!0===s){for(p.ul||(p.ul=document.createElement("ul"),(!0!==i||r)&&p.expanded||(p.ul.style.display="none"),g&&e(p.ul).attr("role","group"),p.li?p.li.appendChild(p.ul):p.tree.$div.append(p.ul)),l=0,d=b.length;l<d;l++)h=e.extend({},t,{node:b[l]}),this.nodeRender(h,n,s,!1,!0);for(o=p.ul.firstChild;o;)(u=o.ftnode)&&u.parent!==p?(p.debug("_fixParent: remove missing "+u,o),c=o.nextSibling,o.parentNode.removeChild(o),o=c):o=o.nextSibling;for(o=p.ul.firstChild,l=0,d=b.length-1;l<d;l++)(a=b[l])===(u=o.ftnode)?o=o.nextSibling:p.ul.insertBefore(a.li,u.li)}}else p.ul&&(this.warn("remove child markup for "+p),this.nodeRemoveChildMarkup(t));w||v&&y.ul.insertBefore(p.li,x)}},nodeRenderTitle:function(t,n){var r,o,a,u,l,d,c,h=t.node,p=t.tree,f=t.options,m=f.aria,g=h.getLevel(),v=[];void 0!==n&&(h.title=n),h.span&&!1!==p._enableUpdate&&(l=m&&!1!==h.hasChildren()?" role='button'":"",g<f.minExpandLevel?(h.lazy||(h.expanded=!0),g>1&&v.push("<span "+l+" class='fancytree-expander fancytree-expander-fixed'></span>")):v.push("<span "+l+" class='fancytree-expander'></span>"),(r=s.evalOption("checkbox",h,h,f,!1))&&!h.isStatusNode()&&(l=m?" role='checkbox'":"",o="fancytree-checkbox",("radio"===r||h.parent&&h.parent.radiogroup)&&(o+=" fancytree-radio"),v.push("<span "+l+" class='"+o+"'></span>")),void 0!==h.data.iconClass&&(h.icon?e.error("'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead"):(h.warn("'iconClass' node option is deprecated since v2.14.0: use 'icon' instead"),h.icon=h.data.iconClass)),!1!==(a=s.evalOption("icon",h,h,f,!0))&&(l=m?" role='presentation'":"",c=(c=s.evalOption("iconTooltip",h,h,f,null))?" title='"+E(c)+"'":"","string"==typeof a?i.test(a)?(a="/"===a.charAt(0)?a:(f.imagePath||"")+a,v.push("<img src='"+a+"' class='fancytree-icon'"+c+" alt='' />")):v.push("<span "+l+" class='fancytree-custom-icon "+a+"'"+c+"></span>"):a.text?v.push("<span "+l+" class='fancytree-custom-icon "+(a.addClass||"")+"'"+c+">"+s.escapeHtml(a.text)+"</span>"):a.html?v.push("<span "+l+" class='fancytree-custom-icon "+(a.addClass||"")+"'"+c+">"+a.html+"</span>"):v.push("<span "+l+" class='fancytree-icon'"+c+"></span>")),u="",f.renderTitle&&(u=f.renderTitle.call(p,{type:"renderTitle"},t)||""),u||(!0===(d=s.evalOption("tooltip",h,h,f,null))&&(d=h.title),u="<span class='fancytree-title'"+(d=d?" title='"+E(d)+"'":"")+(f.titlesTabbable?" tabindex='0'":"")+">"+(f.escapeTitles?s.escapeHtml(h.title):h.title)+"</span>"),v.push(u),h.span.innerHTML=v.join(""),this.nodeRenderStatus(t),f.enhanceTitle&&(t.$title=e(">span.fancytree-title",h.span),u=f.enhanceTitle.call(p,{type:"enhanceTitle"},t)||""))},nodeRenderStatus:function(t){var n,i=t.node,r=t.tree,o=t.options,a=i.hasChildren(),u=i.isLastSibling(),l=o.aria,d=o._classNames,c=[],h=i[r.statusClassPropName];h&&!1!==r._enableUpdate&&(l&&(n=e(i.tr||i.li)),c.push(d.node),r.activeNode===i&&c.push(d.active),r.focusNode===i&&c.push(d.focused),i.expanded&&c.push(d.expanded),l&&(!1===a?n.removeAttr("aria-expanded"):n.attr("aria-expanded",Boolean(i.expanded))),i.folder&&c.push(d.folder),!1!==a&&c.push(d.hasChildren),u&&c.push(d.lastsib),i.lazy&&null==i.children&&c.push(d.lazy),i.partload&&c.push(d.partload),i.partsel&&c.push(d.partsel),s.evalOption("unselectable",i,i,o,!1)&&c.push(d.unselectable),i._isLoading&&c.push(d.loading),i._error&&c.push(d.error),i.statusNodeType&&c.push(d.statusNodePrefix+i.statusNodeType),i.selected?(c.push(d.selected),l&&n.attr("aria-selected",!0)):l&&n.attr("aria-selected",!1),i.extraClasses&&c.push(i.extraClasses),!1===a?c.push(d.combinedExpanderPrefix+"n"+(u?"l":"")):c.push(d.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&null==i.children?"d":"")+(u?"l":"")),c.push(d.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),h.className=c.join(" "),i.li&&e(i.li).toggleClass(d.lastsib,u))},nodeSetActive:function(t,n,s){s=s||{};var i,r=t.node,o=t.tree,a=t.options,u=!0===s.noEvents,l=!0===s.noFocus,d=!1!==s.scrollIntoView;return r===o.activeNode==(n=!1!==n)?S(r):n&&!u&&!1===this._triggerNodeEvent("beforeActivate",r,t.originalEvent)?C(r,["rejected"]):(n?(o.activeNode&&(_(o.activeNode!==r,"node was active (inconsistency)"),i=e.extend({},t,{node:o.activeNode}),o.nodeSetActive(i,!1),_(null===o.activeNode,"deactivate was out of sync?")),a.activeVisible&&r.makeVisible({scrollIntoView:d}),o.activeNode=r,o.nodeRenderStatus(t),l||o.nodeSetFocus(t),u||o._triggerNodeEvent("activate",r,t.originalEvent)):(_(o.activeNode===r,"node was not active (inconsistency)"),o.activeNode=null,this.nodeRenderStatus(t),u||t.tree._triggerNodeEvent("deactivate",r,t.originalEvent)),S(r))},nodeSetExpanded:function(t,n,s){s=s||{};var i,r,o,a,u,l,d=t.node,c=t.tree,h=t.options,p=!0===s.noAnimation,f=!0===s.noEvents;if(n=!1!==n,d.expanded&&n||!d.expanded&&!n)return S(d);if(n&&!d.lazy&&!d.hasChildren())return S(d);if(!n&&d.getLevel()<h.minExpandLevel)return C(d,["locked"]);if(!f&&!1===this._triggerNodeEvent("beforeExpand",d,t.originalEvent))return C(d,["rejected"]);if(p||d.isVisible()||(p=s.noAnimation=!0),r=new e.Deferred,n&&!d.expanded&&h.autoCollapse){u=d.getParentList(!1,!0),l=h.autoCollapse;try{for(h.autoCollapse=!1,o=0,a=u.length;o<a;o++)this._callHook("nodeCollapseSiblings",u[o],s)}finally{h.autoCollapse=l}}return r.done((function(){var e=d.getLastChild();n&&h.autoScroll&&!p&&e?e.scrollIntoView(!0,{topNode:d}).always((function(){f||t.tree._triggerNodeEvent(n?"expand":"collapse",t)})):f||t.tree._triggerNodeEvent(n?"expand":"collapse",t)})),i=function(s){var i=h._classNames,r=h.toggleEffect;if(d.expanded=n,c._callHook("treeStructureChanged",t,n?"expand":"collapse"),c._callHook("nodeRender",t,!1,!1,!0),d.ul)if("none"!==d.ul.style.display==!!d.expanded)d.warn("nodeSetExpanded: UL.style.display already set");else{if(r&&!p)return e(d.li).addClass(i.animating),void(e.isFunction(e(d.ul)[r.effect])?(c.debug("use jquery."+r.effect+" method"),e(d.ul)[r.effect]({duration:r.duration,always:function(){e(this).removeClass(i.animating),e(d.li).removeClass(i.animating),s()}})):(e(d.ul).stop(!0,!0),e(d.ul).parent().find(".ui-effects-placeholder").remove(),e(d.ul).toggle(r.effect,r.options,r.duration,(function(){e(this).removeClass(i.animating),e(d.li).removeClass(i.animating),s()}))));d.ul.style.display=d.expanded||!parent?"":"none"}s()},n&&d.lazy&&void 0===d.hasChildren()?d.load().done((function(){r.notifyWith&&r.notifyWith(d,["loaded"]),i((function(){r.resolveWith(d)}))})).fail((function(e){i((function(){r.rejectWith(d,["load failed ("+e+")"])}))})):i((function(){r.resolveWith(d)})),r.promise()},nodeSetFocus:function(t,n){var s,i=t.tree,r=t.node,o=i.options,a=!!t.originalEvent&&e(t.originalEvent.target).is(":input");if(n=!1!==n,i.focusNode){if(i.focusNode===r&&n)return;s=e.extend({},t,{node:i.focusNode}),i.focusNode=null,this._triggerNodeEvent("blur",s),this._callHook("nodeRenderStatus",s)}n&&(this.hasFocus()||(r.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",t,!0,{calledByNode:!0})),r.makeVisible({scrollIntoView:!1}),i.focusNode=r,o.titlesTabbable&&(a||e(r.span).find(".fancytree-title").focus()),o.aria&&e(i.$container).attr("aria-activedescendant",e(r.tr||r.li).uniqueId().attr("id")),this._triggerNodeEvent("focus",t),document.activeElement===i.$container.get(0)||e(document.activeElement,i.$container).length>=1||e(i.$container).focus(),o.autoScroll&&r.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(e,t,n){n=n||{};var i=e.node,r=e.tree,o=e.options,a=!0===n.noEvents,u=i.parent;if(t=!1!==t,!s.evalOption("unselectable",i,i,o,!1)){if(i._lastSelectIntent=t,!!i.selected===t&&(3!==o.selectMode||!i.partsel||t))return t;if(!a&&!1===this._triggerNodeEvent("beforeSelect",i,e.originalEvent))return!!i.selected;t&&1===o.selectMode?(r.lastSelectedNode&&r.lastSelectedNode.setSelected(!1),i.selected=t):3!==o.selectMode||!u||u.radiogroup||i.radiogroup?u&&u.radiogroup?i.visitSiblings((function(e){e._changeSelectStatusAttrs(t&&e===i)}),!0):i.selected=t:(i.selected=t,i.fixSelection3AfterClick(n)),this.nodeRenderStatus(e),r.lastSelectedNode=t?i:null,a||r._triggerNodeEvent("select",e)}},nodeSetStatus:function(t,n,s,i){var r=t.node,o=t.tree;function a(n,s){var i=r.children?r.children[0]:null;return i&&i.isStatusNode()?(e.extend(i,n),i.statusNodeType=s,o._callHook("nodeRenderTitle",i)):(r._setChildren([n]),o._callHook("treeStructureChanged",t,"setStatusNode"),r.children[0].statusNodeType=s,o.render()),r.children[0]}switch(n){case"ok":!function(){var e=r.children?r.children[0]:null;if(e&&e.isStatusNode()){try{r.ul&&(r.ul.removeChild(e.li),e.li=null)}catch(e){}1===r.children.length?r.children=[]:r.children.shift(),o._callHook("treeStructureChanged",t,"clearStatusNode")}}(),r._isLoading=!1,r._error=null,r.renderStatus();break;case"loading":r.parent||a({title:o.options.strings.loading+(s?" ("+s+")":""),checkbox:!1,tooltip:i},n),r._isLoading=!0,r._error=null,r.renderStatus();break;case"error":a({title:o.options.strings.loadError+(s?" ("+s+")":""),checkbox:!1,tooltip:i},n),r._isLoading=!1,r._error={message:s,details:i},r.renderStatus();break;case"nodata":a({title:s||o.options.strings.noData,checkbox:!1,tooltip:i},n),r._isLoading=!1,r._error=null,r.renderStatus();break;default:e.error("invalid node status "+n)}},nodeToggleExpanded:function(e){return this.nodeSetExpanded(e,!e.node.expanded)},nodeToggleSelected:function(e){var t=e.node,n=!t.selected;return t.partsel&&!t.selected&&!0===t._lastSelectIntent&&(n=!1,t.selected=!0),t._lastSelectIntent=n,this.nodeSetSelected(e,n)},treeClear:function(e){var t=e.tree;t.activeNode=null,t.focusNode=null,t.$div.find(">ul.fancytree-container").empty(),t.rootNode.children=null,t._callHook("treeStructureChanged",e,"clear")},treeCreate:function(e){},treeDestroy:function(e){this.$div.find(">ul.fancytree-container").remove(),this.$source&&this.$source.removeClass("fancytree-helper-hidden")},treeInit:function(t){var n=t.tree,s=n.options;n.$container.attr("tabindex",s.tabindex),e.each(f,(function(e,t){void 0!==s[t]&&(n.info("Move option "+t+" to tree"),n[t]=s[t],delete s[t])})),s.checkboxAutoHide&&n.$container.addClass("fancytree-checkbox-auto-hide"),s.rtl?n.$container.attr("DIR","RTL").addClass("fancytree-rtl"):n.$container.removeAttr("DIR").removeClass("fancytree-rtl"),s.aria&&(n.$container.attr("role","tree"),1!==s.selectMode&&n.$container.attr("aria-multiselectable",!0)),this.treeLoad(t)},treeLoad:function(t,n){var s,i,r,o=t.tree,a=t.widget.element,u=e.extend({},t,{node:this.rootNode});if(o.rootNode.children&&this.treeClear(t),n=n||this.options.source)"string"==typeof n&&e.error("Not implemented");else switch(i=a.data("type")||"html"){case"html":(r=a.find(">ul").first()).addClass("ui-fancytree-source fancytree-helper-hidden"),n=e.ui.fancytree.parseHtml(r),this.data=e.extend(this.data,N(r));break;case"json":n=e.parseJSON(a.text()),a.contents().filter((function(){return 3===this.nodeType})).remove(),e.isPlainObject(n)&&(_(e.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),s=n,n=n.children,delete s.children,e.each(f,(function(e,t){void 0!==s[t]&&(o[t]=s[t],delete s[t])})),e.extend(o.data,s));break;default:e.error("Invalid data-type: "+i)}return this.nodeLoadChildren(u,n).done((function(){o._callHook("treeStructureChanged",t,"loadChildren"),o.render(),3===t.options.selectMode&&o.rootNode.fixSelection3FromEndNodes(),o.activeNode&&o.options.activeVisible&&o.activeNode.makeVisible(),o._triggerTreeEvent("init",null,{status:!0})})).fail((function(){o.render(),o._triggerTreeEvent("init",null,{status:!1})}))},treeRegisterNode:function(e,t,n){e.tree._callHook("treeStructureChanged",e,t?"addNode":"removeNode")},treeSetFocus:function(t,n,s){var i;(n=!1!==n)!==this.hasFocus()&&(this._hasFocus=n,!n&&this.focusNode?this.focusNode.setFocus(!1):!n||s&&s.calledByNode||e(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",n),this._triggerTreeEvent(n?"focusTree":"blurTree"),n&&!this.activeNode&&(i=this._lastMousedownNode||this.getFirstChild())&&i.setFocus())},treeSetOption:function(t,n,s){var i=t.tree,r=!0,o=!1,a=!1;switch(n){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":o=!0,a=!0;break;case"checkboxAutoHide":i.$container.toggleClass("fancytree-checkbox-auto-hide",!!s);break;case"escapeTitles":case"tooltip":a=!0;break;case"rtl":!1===s?i.$container.removeAttr("DIR").removeClass("fancytree-rtl"):i.$container.attr("DIR","RTL").addClass("fancytree-rtl"),a=!0;break;case"source":r=!1,i._callHook("treeLoad",i,s),a=!0}i.debug("set option "+n+"="+s+" <"+typeof s+">"),r&&(this.widget._super?this.widget._super.call(this.widget,n,s):e.Widget.prototype._setOption.call(this.widget,n,s)),o&&i._callHook("treeCreate",i),a&&i.render(!0,!1)},treeStructureChanged:function(e,t){}}),e.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!0,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,debugLevel:null,disabled:!1,enableAspx:!0,escapeTitles:!1,extensions:[],toggleEffect:{effect:"slideToggle",duration:200},generateIds:!1,icon:!0,idPrefix:"ft_",focusOnSelect:!1,keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,nodata:!0,quicksearch:!1,rtl:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading...",loadError:"Load error!",moreData:"More...",noData:"No data."},tabindex:"0",titlesTabbable:!1,tooltip:!1,treeId:null,_classNames:{node:"fancytree-node",folder:"fancytree-folder",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",hasChildren:"fancytree-has-children",active:"fancytree-active",selected:"fancytree-selected",expanded:"fancytree-expanded",lazy:"fancytree-lazy",focused:"fancytree-focused",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",unselectable:"fancytree-unselectable",lastsib:"fancytree-lastsib",loading:"fancytree-loading",error:"fancytree-error",statusNodePrefix:"fancytree-statusnode-"},lazyLoad:null,postProcess:null},_create:function(){this.tree=new I(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul").first();var t,n,s,i=this.options,r=i.extensions;this.tree;for(s=0;s<r.length;s++)n=r[s],(t=e.ui.fancytree._extensions[n])||e.error("Could not apply extension '"+n+"' (it is not registered, did you forget to include it?)"),this.tree.options[n]=b({},t.options,this.tree.options[n]),_(void 0===this.tree.ext[n],"Extension name must not exist as Fancytree.ext attribute: '"+n+"'"),this.tree.ext[n]={},k(this.tree,0,t,n),t;void 0!==i.icons&&(!0===i.icon?(this.tree.warn("'icons' tree option is deprecated since v2.14.0: use 'icon' instead"),i.icon=i.icons):e.error("'icons' tree option is deprecated since v2.14.0: use 'icon' only instead")),void 0!==i.iconClass&&(i.icon?e.error("'iconClass' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'iconClass' tree option is deprecated since v2.14.0: use 'icon' instead"),i.icon=i.iconClass)),void 0!==i.tabbable&&(i.tabindex=i.tabbable?"0":"-1",this.tree.warn("'tabbable' tree option is deprecated since v2.17.0: use 'tabindex='"+i.tabindex+"' instead")),this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree),this._bind()},_setOption:function(e,t){return this.tree._callHook("treeSetOption",this.tree,e,t)},destroy:function(){this._unbind(),this.tree._callHook("treeDestroy",this.tree),e.Widget.prototype.destroy.call(this)},_unbind:function(){var t=this.tree._ns;this.element.off(t),this.tree.$container.off(t),e(document).off(t)},_bind:function(){var t=this,n=this.options,i=this.tree,r=i._ns;this._unbind(),i.$container.on("focusin"+r+" focusout"+r,(function(t){var n=s.getNode(t),r="focusin"===t.type;if(!r&&n&&e(t.target).is("a"))n.debug("Ignored focusout on embedded <a> element.");else{if(r){if(i._getExpiringValue("focusin"))return void i.debug("Ignored double focusin.");i._setExpiringValue("focusin",!0,50),n||(n=i._getExpiringValue("mouseDownNode"))&&i.debug("Reconstruct mouse target for focusin from recent event.")}n?i._callHook("nodeSetFocus",i._makeHookContext(n,t),r):i.tbody&&e(t.target).parents("table.fancytree-container > thead").length?i.debug("Ignore focus event outside table body.",t):i._callHook("treeSetFocus",i,r)}})).on("selectstart"+r,"span.fancytree-title",(function(e){e.preventDefault()})).on("keydown"+r,(function(e){if(n.disabled||!1===n.keyboard)return!0;var t,s=i.focusNode,r=i._makeHookContext(s||i,e),o=i.phase;try{return i.phase="userEvent","preventNav"===(t=s?i._triggerNodeEvent("keydown",s,e):i._triggerTreeEvent("keydown",e))?t=!0:!1!==t&&(t=i._callHook("nodeKeydown",r)),t}finally{i.phase=o}})).on("mousedown"+r,(function(e){var t=s.getEventTarget(e);i._lastMousedownNode=t?t.node:null,i._setExpiringValue("mouseDownNode",i._lastMousedownNode)})).on("click"+r+" dblclick"+r,(function(e){if(n.disabled)return!0;var i,r=s.getEventTarget(e),o=r.node,a=t.tree,u=a.phase;if(!o)return!0;i=a._makeHookContext(o,e);try{switch(a.phase="userEvent",e.type){case"click":return i.targetType=r.type,o.isPagingNode()?!0===a._triggerNodeEvent("clickPaging",i,e):!1!==a._triggerNodeEvent("click",i,e)&&a._callHook("nodeClick",i);case"dblclick":return i.targetType=r.type,!1!==a._triggerNodeEvent("dblclick",i,e)&&a._callHook("nodeDblclick",i)}}finally{a.phase=u}}))},getActiveNode:function(){return this.tree.activeNode},getNodeByKey:function(e){return this.tree.getNodeByKey(e)},getRootNode:function(){return this.tree.rootNode},getTree:function(){return this.tree}}),s=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.32.0",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:I,_FancytreeNodeClass:L,jquerySupports:{positionMyOfs:function(t,n,s,i){var r,o,a,u=e.map(e.trim(t).split("."),(function(e){return parseInt(e,10)})),l=e.map(Array.prototype.slice.call(arguments,1),(function(e){return parseInt(e,10)}));for(r=0;r<l.length;r++)if(o=u[r]||0,a=l[r]||0,o!==a)return o>a;return!0}(e.ui.version,1,9)},assert:function(e,t){return _(e,t)},createTree:function(t,n){return e(t).fancytree(n).fancytree("getTree")},debounce:function(e,t,n,s){var i;return 3===arguments.length&&"boolean"!=typeof n&&(s=n,n=!1),function(){var r=arguments;s=s||this,n&&!i&&t.apply(s,r),clearTimeout(i),i=setTimeout((function(){n||t.apply(s,r),i=null}),e)}},debug:function(t){e.ui.fancytree.debugLevel>=4&&w("log",arguments)},error:function(t){e.ui.fancytree.debugLevel>=1&&w("error",arguments)},escapeHtml:function(e){return(""+e).replace(r,(function(e){return a[e]}))},fixPositionOptions:function(t){if((t.offset||(""+t.my+t.at).indexOf("%")>=0)&&e.error("expected new position syntax (but '%' is not supported)"),!e.ui.fancytree.jquerySupports.positionMyOfs){var n=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.my),s=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.at),i=(n[2]?+n[2]:0)+(s[2]?+s[2]:0),r=(n[4]?+n[4]:0)+(s[4]?+s[4]:0);t=e.extend({},t,{my:n[1]+" "+n[3],at:s[1]+" "+s[3]}),(i||r)&&(t.offset=i+" "+r)}return t},getEventTarget:function(t){var n,i=t&&t.target?t.target.className:"",r={node:this.getNode(t.target),type:void 0};return/\bfancytree-title\b/.test(i)?r.type="title":/\bfancytree-expander\b/.test(i)?r.type=!1===r.node.hasChildren()?"prefix":"expander":/\bfancytree-checkbox\b/.test(i)?r.type="checkbox":/\bfancytree(-custom)?-icon\b/.test(i)?r.type="icon":/\bfancytree-node\b/.test(i)?r.type="title":t&&t.target&&((n=e(t.target)).is("ul[role=group]")?((r.node&&r.node.tree||s).debug("Ignoring click on outer UL."),r.node=null):n.closest(".fancytree-title").length?r.type="title":n.closest(".fancytree-checkbox").length?r.type="checkbox":n.closest(".fancytree-expander").length&&(r.type="expander")),r},getEventTargetType:function(e){return this.getEventTarget(e).type},getNode:function(t){if(t instanceof L)return t;for(t instanceof e?t=t[0]:void 0!==t.originalEvent&&(t=t.target);t;){if(t.ftnode)return t.ftnode;t=t.parentNode}return null},getTree:function(t){var n,s=t;return t instanceof I?t:(void 0===t&&(t=0),"number"==typeof t?t=e(".fancytree-container").eq(t):"string"==typeof t?(t=e("#ft-id-"+s).eq(0)).length||(t=e(s).eq(0)):t instanceof e?t=t.eq(0):void 0!==t.originalEvent&&(t=e(t.target)),(n=(t=t.closest(":ui-fancytree")).data("ui-fancytree")||t.data("fancytree"))?n.tree:null)},evalOption:function(t,n,s,i,r){var o,a,u=n.tree,l=i[t],d=s[t];return e.isFunction(l)?(o={node:n,tree:u,widget:u.widget,options:u.widget.options,typeInfo:u.types[n.type]||{}},null==(a=l.call(u,{type:t},o))&&(a=d)):a=null==d?l:d,null==a&&(a=r),a},setSpanIcon:function(t,n,s){var i=e(t);"string"==typeof s?i.attr("class",n+" "+s):(s.text?i.text(""+s.text):s.html&&(t.innerHTML=s.html),i.attr("class",n+" "+(s.addClass||"")))},eventToString:function(e){var t=e.which,n=e.type,s=[];return e.altKey&&s.push("alt"),e.ctrlKey&&s.push("ctrl"),e.metaKey&&s.push("meta"),e.shiftKey&&s.push("shift"),"click"===n||"dblclick"===n?s.push(c[e.button]+n):"wheel"===n?s.push(n):u[t]||s.push(l[t]||String.fromCharCode(t).toLowerCase()),s.join("+")},info:function(t){e.ui.fancytree.debugLevel>=3&&w("info",arguments)},keyEventToString:function(e){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(e)},overrideMethod:function(t,n,s,i){var r,o=t[n]||e.noop;t[n]=function(){var e=i||this;try{return r=e._super,e._super=o,s.apply(e,arguments)}finally{e._super=r}}},parseHtml:function(t){var n,s,i,r,o,a,u,l,d=t.find(">li"),c=[];return d.each((function(){var d,f,g=e(this),y=g.find(">span",this).first(),_=y.length?null:g.find(">a").first(),w={tooltip:null,data:{}};for(y.length?w.title=y.html():_&&_.length?(w.title=_.html(),w.data.href=_.attr("href"),w.data.target=_.attr("target"),w.tooltip=_.attr("title")):(w.title=g.html(),(o=w.title.search(/<ul/i))>=0&&(w.title=w.title.substring(0,o))),w.title=e.trim(w.title),r=0,a=h.length;r<a;r++)w[h[r]]=void 0;for(n=this.className.split(" "),i=[],r=0,a=n.length;r<a;r++)s=n[r],p[s]?w[s]=!0:i.push(s);if(w.extraClasses=i.join(" "),(u=g.attr("title"))&&(w.tooltip=u),(u=g.attr("id"))&&(w.key=u),g.attr("hideCheckbox")&&(w.checkbox=!1),(d=N(g))&&!e.isEmptyObject(d)){for(f in v)d.hasOwnProperty(f)&&(d[v[f]]=d[f],delete d[f]);for(r=0,a=m.length;r<a;r++)u=m[r],null!=(l=d[u])&&(delete d[u],w[u]=l);e.extend(w.data,d)}(t=g.find(">ul").first()).length?w.children=e.ui.fancytree.parseHtml(t):w.children=w.lazy?void 0:null,c.push(w)})),c},registerExtension:function(t){_(null!=t.name,"extensions must have a `name` property."),_(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},unescapeHtml:function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue},warn:function(t){e.ui.fancytree.debugLevel>=2&&w("warn",arguments)}}),e.ui.fancytree}function _(t,n){t||(n=n?": "+n:"",e.error("Fancytree assertion failed"+n))}function w(e,t){var n,s,i=window.console?window.console[e]:null;if(i)try{i.apply(window.console,t)}catch(e){for(s="",n=0;n<t.length;n++)s+=t[n];i(s)}}function b(){var t,n,s,i,r,o=arguments[0]||{},a=1,u=arguments.length;if("object"==typeof o||e.isFunction(o)||(o={}),a===u)throw Error("need at least two args");for(;a<u;a++)if(null!=(t=arguments[a]))for(n in t)if(t.hasOwnProperty(n)){if(s=o[n],o===(i=t[n]))continue;i&&e.isPlainObject(i)?(r=s&&e.isPlainObject(s)?s:{},o[n]=b(r,i)):void 0!==i&&(o[n]=i)}return o}function x(e,t,n,s,i){var r,o,a,u,l;return r=t[e],o=s[e],a=t.ext[i],u=function(){return r.apply(t,arguments)},l=function(e){return r.apply(t,e)},function(){var e=t._local,n=t._super,s=t._superApply;try{return t._local=a,t._super=u,t._superApply=l,o.apply(t,arguments)}finally{t._local=e,t._super=n,t._superApply=s}}}function k(t,n,s,i){for(var r in s)"function"==typeof s[r]?"function"==typeof t[r]?t[r]=x(r,t,0,s,i):"_"===r.charAt(0)?t.ext[i][r]=x(r,t,0,s,i):e.error("Could not override tree."+r+". Use prefix '_' to create tree."+i+"._"+r):"options"!==r&&(t.ext[i][r]=s[r])}function S(t,n){return void 0===t?e.Deferred((function(){this.resolve()})).promise():e.Deferred((function(){this.resolveWith(t,n)})).promise()}function C(t,n){return void 0===t?e.Deferred((function(){this.reject()})).promise():e.Deferred((function(){this.rejectWith(t,n)})).promise()}function T(e,t){return function(){e.resolveWith(t)}}function N(t){var n=e.extend({},t.data()),s=n.json;return delete n.fancytree,delete n.uiFancytree,s&&(delete n.json,n=e.extend(n,s)),n}function E(e){return(""+e).replace(o,(function(e){return a[e]}))}function j(e){return e=e.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(e)>=0}}function L(t,n){var i,r,o,a;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},i=0,r=m.length;i<r;i++)this[o=m[i]]=n[o];for(o in null==this.unselectableIgnore&&null==this.unselectableStatus||(this.unselectable=!0),n.hideCheckbox&&e.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'"),n.data&&e.extend(this.data,n.data),n)g[o]||e.isFunction(n[o])||y[o]||(this.data[o]=n[o]);null==this.key?this.tree.options.defaultKey?(this.key=this.tree.options.defaultKey(this),_(this.key,"defaultKey() must return a unique key")):this.key="_"+s._nextNodeKey++:this.key=""+this.key,n.active&&(_(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),n.selected&&(this.tree.lastSelectedNode=this),(a=n.children)?a.length?this._setChildren(a):this.children=this.lazy?[]:null:this.children=null,this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function I(t){this.widget=t,this.$div=t.element,this.options=t.options,this.options&&(void 0!==this.options.lazyload&&e.error("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),void 0!==this.options.loaderror&&e.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),void 0!==this.options.fx&&e.error("The 'fx' option was replaced by 'toggleEffect' since 2014-11-30."),void 0!==this.options.removeNode&&e.error("The 'removeNode' event was replaced by 'modifyChild' since 2.20 (2016-09-10).")),this.ext={},this.types={},this.columns={},this.data=N(this.$div),this._id=""+(this.options.treeId||e.ui.fancytree._nextId++),this._ns=".fancytree-"+this._id,this.activeNode=null,this.focusNode=null,this._hasFocus=null,this._tempCache={},this._lastMousedownNode=null,this._enableUpdate=!0,this.lastSelectedNode=null,this.systemFocusElement=null,this.lastQuicksearchTerm="",this.lastQuicksearchTime=0,this.viewport=null,this.statusClassPropName="span",this.ariaPropName="li",this.nodeContainerAttrName="li",this.$div.find(">ul.fancytree-container").remove();var n,i={tree:this};this.rootNode=new L(i,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,n=e("<ul>",{id:"ft-id-"+this._id,class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=n,this.rootNode.ul=n[0],null==this.options.debugLevel&&(this.options.debugLevel=s.debugLevel)}e.ui.fancytree.warn("Fancytree: ignored duplicate include")})?s.apply(t,i):s)||(e.exports=r)},,,,,,,,,,function(e,t,n){var s=s||{};window.WP_Smush=s,String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),n(14),n(15),n(16),n(17),n(32),n(19),n(20),n(21),n(22),n(23)},function(e,t){!function(){"use strict";WP_Smush.helpers={init:function(){},formatBytes:function(e,t){var n=["KB","MB","GB","TB","PB"];if(Math.abs(e)<1024)return e+" B";var s=-1;do{e/=1024,++s}while(Math.abs(e)>=1024&&s<n.length-1);return e.toFixed(t)+" "+n[s]},getSizeFromString:function(e){return e.replace(/[a-zA-Z]/g,"").trim()},getFormatFromString:function(e){return e.replace(/[0-9.]/g,"").trim()},precise_round:function(e,t){var n=e>=0?1:-1;return e=e>100?100:e,Math.round(e*Math.pow(10,t)+.001*n)/Math.pow(10,t)},showErrorNotice:function(e){if(void 0!==e){var t="<p>".concat(e,"</p>");SUI.openNotice("wp-smush-ajax-notice",t,{type:"error",icon:"info"});var n=document.querySelector(".sui-button-onload");n&&n.classList.remove("sui-button-onload")}},resetSettings:function(){var e=document.getElementById("wp_smush_reset"),t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=reset_settings",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){if(200===t.status){var e=JSON.parse(t.response);void 0!==e.success&&e.success&&(window.location.href=wp_smush_msgs.smush_url)}else window.console.log("Request failed. Returned status of "+t.status)},t.send("_ajax_nonce="+e.value)}},WP_Smush.helpers.init()}()},function(e,t,n){"use strict";n.r(t);var s=n(0),i=function(e,t){void 0===t&&(t=100),e.fadeTo(t,0,(function(){e.slideUp(t,(function(){e.remove()}))}))};jQuery((function(e){var t=function(t,n,i,r){if(!n.prop("disabled")){t.preventDefault(),e(".wp-smush-error").remove(),e(".smush-stats-wrapper").hide();var o="grid";"smush_restore_image"===i&&(o=e(document).find("div.media-modal.wp-core-ui").length>0||window.location.search.indexOf("item")>-1?"grid":"list");var a={action:i,attachment_id:n.data("id"),mode:o,_nonce:n.data("nonce")};!function(e){var t=e.parent();t.css({opacity:"0.5"}),t.find("a").prop("disabled",!0)}(n),n.html('<span class="spinner wp-smush-progress">'+wp_smush_msgs[r]+"</span>"),e.post(ajaxurl,a,(function(e){!function(e){var t=e.parent();t.css({opacity:"1"}),t.find("a").prop("disabled",!1)}(n),e.success&&void 0!==e.data?(void 0!==this.data&&this.data.indexOf("nextgen")>-1||"restore"===r?n.parents().eq(1).html(e.data.stats):n.parents().eq(1).html(e.data),void 0!==e.data&&"restore"===r&&s.a.updateImageStats(e.data.new_size)):e.data&&e.data.error_msg&&n.parent().append(e.data.error_msg)}))}},n=function(e){var t=jQuery(".bulk-smush-wrapper .wp-smush-bulk-wrapper, #wp-smush-pending-to-smush-text"),n=jQuery(".bulk-smush-wrapper .wp-smush-all-done, .bulk-smush-wrapper .wp-smush-pagespeed-recommendation, #smush-box-bulk-upgrade, #wp-smush-all-smushed-text");if(t.length&&n.length)if(0===e)t.addClass("sui-hidden"),n.removeClass("sui-hidden");else{t.removeClass("sui-hidden"),n.addClass("sui-hidden");var s=jQuery(".sui-summary-smush .sui-summary-details .sui-tooltip");if(s.length){var i=1===e?"singular":"plural",r=s.data(i).replace("{count}",e);s.attr("data-tooltip",r)}}jQuery(".wp-smush-total-count").text(e)},r=function(t){e(t).length>0&&e("html, body").animate({scrollTop:e(t).offset().top-100},"slow")};if(e("#all-image-sizes").on("change",(function(){e('input[name^="wp-smush-image_sizes"]').prop("checked",!0)})),e("#wp-smush-update-api-status").on("click",(function(t){t.preventDefault(),e(this).addClass("sui-button-onload"),e.post(ajaxurl,{action:"recheck_api_status"},(function(){location.reload()}))})),e("body").on("click","a.smush-stats-details",(function(t){if(e(this).prop("disabled"))return!1;t.preventDefault();var n=e(this).find(".stats-toggle");e(this).parents().eq(1).find(".smush-stats-wrapper").slideToggle(),n.text("+"==n.text()?"-":"+")})),e("body").on("click",".wp-smush-send:not(.wp-smush-resmush)",(function(t){t.preventDefault(),new s.a(e(this),!1)})),e("body").on("click",".wp-smush-remove-skipped",(function(t){t.preventDefault();var n=e(this);e.post(ajaxurl,{action:"remove_from_skip_list",id:n.attr("data-id")}).done((function(e){e.success&&void 0!==e.data.links&&(n.parent().parent().find(".smush-status").text(wp_smush_msgs.not_processed),t.target.closest(".smush-status-links").innerHTML=e.data.links)}))})),e("body").on("click",".wp-smush-nextgen-send",(function(t){t.preventDefault(),new s.a(e(this),!1,"nextgen")})),e("body").on("click",".wp-smush-nextgen-bulk",(function(t){if(t.preventDefault(),e(".wp-smush-resmush-notice").remove(),"undefined"==typeof wp_smushit_data||0===wp_smushit_data.unsmushed.length&&0===wp_smushit_data.resmush.length)return!1;jQuery(".wp-smush-all, .wp-smush-scan").prop("disabled",!0),e(".wp-smush-notice.wp-smush-remaining").hide(),new s.a(e(this),!0,"nextgen")})),e("body").on("click",".wp-smush-action.wp-smush-restore",(function(n){var s=e(this);t(n,s,"smush_restore_image","restore")})),e("body").on("click",".wp-smush-action.wp-smush-resmush",(function(n){t(n,e(this),"smush_resmush_image","smushing")})),e("body").on("click",".wp-smush-action.wp-smush-nextgen-restore",(function(n){t(n,e(this),"smush_restore_nextgen_image","restore")})),e("body").on("click",".wp-smush-action.wp-smush-nextgen-resmush",(function(n){t(n,e(this),"smush_resmush_nextgen_image","smushing")})),e(".wp-smush-scan").on("click",(function(t){t.preventDefault(),function(t){var i=e(".wp-smush-scan");i.addClass("sui-button-onload");var r=i.data("type");r=void 0===r?"media":r,e(".wp-smush-all").removeAttr("data-smush");var o=e(".sui-notice-top.sui-notice-success");o.slideUp(100,(function(){o.remove()})),e(".wp-smush-all").prop("disabled",!0),e(".wp-smush-settings-changed").hide();var a={action:"scan_for_resmush",type:r,get_ui:!0,process_settings:t,wp_smush_options_nonce:jQuery("#wp_smush_options_nonce").val()};e.get(ajaxurl,a,(function(t){if(void 0!==t.data){if(void 0!==t.data.resmush_ids){wp_smushit_data.resmush=t.data.resmush_ids,"undefined"!=typeof wp_smushit_data&&(wp_smushit_data.count_smushed=void 0!==t.data.count_smushed?t.data.count_smushed:wp_smushit_data.count_smushed,wp_smushit_data.count_supersmushed=void 0!==t.data.count_supersmushed?t.data.count_supersmushed:wp_smushit_data.count_supersmushed,wp_smushit_data.count_images=void 0!==t.data.count_image?t.data.count_image:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==t.data.size_before?t.data.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==t.data.size_after?t.data.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==t.data.savings_resize?t.data.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==t.data.savings_conversion?t.data.savings_conversion:wp_smushit_data.savings_conversion,wp_smushit_data.count_resize=void 0!==t.data.count_resize?t.data.count_resize:wp_smushit_data.count_resize,wp_smushit_data.unsmushed=void 0!==t.data.unsmushed?t.data.unsmushed:wp_smushit_data.unsmushed),"nextgen"===r&&(wp_smushit_data.bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after));var i=e(".bulk-smush-wrapper .sui-notice:not(.smush-upsell-notice)");i.length>0&&(i.addClass("sui-hidden"),e(".wp-smush-pagespeed-recommendation").addClass("sui-hidden")),e(".wp-smush-resmush-notice").remove(),e(".wp-smush-bulk-wrapper").removeClass("sui-hidden")}if(void 0!==t.data.content&&e("#wp-smush-bulk-content").html(t.data.content),void 0!==t.data.notice){var o="success";void 0!==t.data.noticeType&&(o=t.data.noticeType),window.SUI.openNotice("wp-smush-ajax-notice","<p>"+t.data.notice+"</p>",{type:o,icon:"check-tick"})}if(e("div.smush-final-log").hide(),void 0!==t.data.super_smush&&t.data.super_smush){var a=jQuery(".wp-smush-enable-lossy");a.length>0&&a.remove(),"undefined"!==t.data.super_smush_stats&&e(".super-smush-attachments .wp-smush-stats").html(t.data.super_smush_stats)}s.a.updateStats(r);var u=t.data.count||0;s.a.updateRemainingCount(u),n(u)}})).always((function(){jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),i.removeClass("sui-button-onload").addClass("smush-button-check-success");var t=i.find(".wp-smush-default-text"),n=i.find(".wp-smush-completed-text");t.addClass("sui-hidden-important"),n.removeClass("sui-hidden"),setTimeout((function(){i.removeClass("smush-button-check-success"),t.removeClass("sui-hidden-important"),n.addClass("sui-hidden")}),2e3),e(".wp-smush-all").prop("disabled",!1)}))}(!1)})),e("#wp-smush-welcome-box .smush-dismiss-welcome").on("click",(function(t){t.preventDefault();var n=e(this).parents().eq(1);i(n);e.post(ajaxurl,{action:"dismiss_welcome_notice"})})),e("body").on("click",".wp-smush-notice .icon-fi-close",(function(t){t.preventDefault();var n=e(this).parent();i(n)})),e("input[name=wp-smush-keep_data]").on("change",(function(e){var t="keep_data-true"===e.target.id?"keep_data-false":"keep_data-true";e.target.parentNode.classList.add("active"),document.getElementById(t).parentNode.classList.remove("active")})),e("button#wp-smush-save-settings").on("click",(function(t){t.preventDefault();var n="",s=e('input[name="setting-type"]');s.length>0&&(n=s.val());var i=e(this);if(i.parent().find("span.sui-icon-loader.sui-loading").removeClass("sui-hidden"),""!=n&&"network"==n){var r={action:"save_settings",wp_smush_options_nonce:e("#wp_smush_options_nonce").val()};r=jQuery.param(r)+"&"+jQuery("form#wp-smush-settings-form").serialize(),jQuery.post(ajaxurl,r).done((function(){return jQuery("form#wp-smush-settings-form").trigger("submit"),!0}))}else{e(".wp-smush-hex-notice").hide(),i.prop("disabled",!0).addClass("button-grey"),void 0!==i.attr("data-msg")&&i.attr("data-msg").length>0?i.html(i.attr("data-msg")):i.html(wp_smush_msgs.checking);var o=i.data("type");o=void 0===o?"media":o;var a={action:"scan_for_resmush",wp_smush_options_nonce:jQuery("#wp_smush_options_nonce").val(),type:o};a=jQuery.param(a)+"&"+jQuery("form#wp-smush-settings-form").serialize(),jQuery.post(ajaxurl,a).done((function(){return jQuery("form#wp-smush-settings-form").trigger("submit"),!0}))}})),e("body").on("click",".wp-smush-skip-resmush",(function(t){t.preventDefault();var n=jQuery(this),r=n.parents().eq(1),o=n.parent();i(o),e(".sui-notice-top.sui-notice-success").remove(),r.find(".wp-smush-all").attr("data-smush","skip_resmush"),wp_smushit_data.count_smushed=parseInt(wp_smushit_data.count_smushed)+wp_smushit_data.resmush.length,wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+wp_smushit_data.resmush.length,wp_smushit_data.count_smushed===wp_smushit_data.count_total&&(e(".wp-smush-notice.wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),e(".wp-smush-bulk-wrapper ").addClass("sui-hidden")),e(".wp-smush-resmush-notice").remove();var a=e(".wp-smush-scan").data("type");a=void 0===a?"media":a;var u=(void 0!==wp_smushit_data.count_smushed?wp_smushit_data.count_smushed:0)/wp_smushit_data.count_total*100;u=WP_Smush.helpers.precise_round(u,1),e(".wp-smush-images-percent").html(u);var l=jQuery(".bulk-smush-wrapper .wp-smush-progress-inner");if(!(l.length<1)){l.css("width",u+"%"),e(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),e(".wp-smush-bulk-wrapper .sui-notice").removeClass("sui-hidden");var d={action:"delete_resmush_list",type:a};e.post(ajaxurl,d,(function(t){if(t.success&&void 0!==t.data.stats){var n=t.data.stats;"undefined"!=typeof wp_smushit_data&&(wp_smushit_data.count_images=void 0!==n.count_images?parseInt(wp_smushit_data.count_images)+n.count_images:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==n.size_before?parseInt(wp_smushit_data.size_before)+n.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==n.size_after?parseInt(wp_smushit_data.size_after)+n.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==n.savings_resize?parseInt(wp_smushit_data.savings_resize)+n.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==n.savings_conversion?parseInt(wp_smushit_data.savings_conversion)+n.savings_conversion:wp_smushit_data.savings_conversion,void 0!==wp_smushit_data.savings_dir_smush&&void 0!==wp_smushit_data.savings_dir_smush.orig_size&&(wp_smushit_data.size_before=void 0!==wp_smushit_data.savings_dir_smush?parseInt(wp_smushit_data.size_before)+parseInt(wp_smushit_data.savings_dir_smush.orig_size):wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==wp_smushit_data.savings_dir_smush?parseInt(wp_smushit_data.size_after)+parseInt(wp_smushit_data.savings_dir_smush.image_size):wp_smushit_data.size_after),wp_smushit_data.count_resize=void 0!==n.count_resize?parseInt(wp_smushit_data.count_resize)+n.count_resize:wp_smushit_data.count_resize);var i=e(".bulk-smush-wrapper .wp-smush-remaining-count");i.length&&void 0!==wp_smushit_data.unsmushed&&i.html(wp_smushit_data.unsmushed.length),void 0===wp_smushit_data.unsmushed&&0!==wp_smushit_data.unsmushed.length||(e(".wp-smush-bulk-wrapper .sui-notice").removeClass("sui-hidden"),e(".sui-notice-success.wp-smush-all-done").addClass("sui-hidden")),s.a.updateStats()}}))}})),e("a.wp-smush-lossy-enable").on("click",(function(e){e.preventDefault(),r("#column-wp-smush-lossy")})),e(".wp-smush-resize-enable").on("click",(function(e){e.preventDefault(),r("#column-wp-smush-resize")})),window.location.hash){var o=window.location.hash.substring(1);"enable-resize"===o?r("#column-wp-smush-resize"):"enable-lossy"===o&&r("#column-wp-smush-lossy")}if(e("body").on("click",".wp-smush-trigger-bulk",(function(t){t.preventDefault(),void 0!==t.target.dataset.type&&"nextgen"===t.target.dataset.type?e(".wp-smush-nextgen-bulk").click():e(".wp-smush-all").click(),e("span.sui-notice-dismiss").click()})),e("body").on("click","#bulk-smush-top-notice-close",(function(t){t.preventDefault(),e(this).parent().parent().slideUp("slow")})),e(".wp-smush-setting-row .toggle-checkbox").focus((function(){e(this).keypress((function(t){32==t.keyCode&&(t.preventDefault(),e(this).find(".toggle-checkbox").click())}))})),e("body").on("blur",".wp-smush-resize-input",(function(){!function(e,t,n){var s=e.find("#wp-smush-resize, #wp-smush-resize-quick-setup");if(!n)var i=e.find("#wp-smush-resize_width, #quick-setup-resize_width"),r=e.find(".sui-notice-info.wp-smush-update-width");if(!t)var o=e.find("#wp-smush-resize_height, #quick-setup-resize_height"),a=e.find(".sui-notice-info.wp-smush-update-height");var u=!1,l=!1;!s.is(":checked")||(void 0===wp_smushit_data.resize_sizes||void 0===wp_smushit_data.resize_sizes.width||(!n&&void 0!==i&&parseInt(wp_smushit_data.resize_sizes.width)>parseInt(i.val())?(i.parent().addClass("sui-form-field-error"),r.show("slow"),u=!0):(i.parent().removeClass("sui-form-field-error"),r.hide(),o.hasClass("error")&&a.show("slow")),!t&&void 0!==o&&parseInt(wp_smushit_data.resize_sizes.height)>parseInt(o.val())?(o.parent().addClass("sui-form-field-error"),u||a.show("slow"),l=!0):(o.parent().removeClass("sui-form-field-error"),a.hide(),i.hasClass("error")&&r.show("slow"))))}(e(this).parents().eq(4),!1,!1)})),e("body").on("click","#wp-smush-resize, #wp-smush-resize-quick-setup",(function(){var t=e(this),n=e(".wp-smush-resize-settings-wrap");t.is(":checked")?n.show():n.hide()})),e("body").on("click","#wp-smush-detection",(function(){var t=e(this),n=e(".smush-highlighting-notice"),s=e(".smush-highlighting-warning");t.is(":checked")?n.length>0?n.show():s.show():(n.hide(),s.hide())})),e("#wp-smush-png_to_jpg").click((function(){var t=e(this),n=e(".wp-smush-png_to_jpg-wrap");t.is(":checked")?n.show():n.hide()})),e("#wp-smush-revalidate-member").on("click",(function(t){t.preventDefault();var n=e(this).parents().eq(1);n.addClass("loading-notice"),e.get(ajaxurl,{action:"smush_show_warning"},(function(e){n.removeClass("loading-notice").addClass("loaded-notice"),0==e?(n.attr("data-message",wp_smush_msgs.membership_valid),i(n,1e3)):(n.attr("data-message",wp_smush_msgs.membership_invalid),setTimeout((function(){n.removeClass("loaded-notice")}),1e3))}))})),e("li.smush-dir-savings").length>0){e.get(ajaxurl,{action:"get_dir_smush_stats"},(function(t){e("li.smush-dir-savings .sui-icon-loader").hide(),t.success||void 0===t.data.message?void 0===t.data||void 0===t.data.dir_smush?(e("li.smush-dir-savings span.wp-smush-stats").append(wp_smush_msgs.ajax_error),e("li.smush-dir-savings span.wp-smush-stats span").hide()):function(t){if(void 0!==t.dir_smush){var n=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-human"),s=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-percent");if(t.dir_smush.bytes>0){if(e(".wp-smush-dir-link").addClass("sui-hidden"),e("li.smush-dir-savings .wp-smush-stats-label-message").hide(),n.length>0)n.html(t.dir_smush.human);else t.dir_smush.bytes;if(t.dir_smush.percent>0)if(e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-sep").removeClass("sui-hidden"),s.length>0)s.html(t.dir_smush.percent+"%");else t.dir_smush.percent}else e(".wp-smush-dir-link").removeClass("sui-hidden")}if(void 0!==t.combined_stats&&t.combined_stats.length>0){var i=t.combined_stats,r=i.smushed/i.total_count*100;(r=WP_Smush.helpers.precise_round(r,1))&&e("div.wp-smush-count-total span.wp-smush-images-percent").html(r),i.total_count&&e("span.wp-smush-count-total span.wp-smush-total-optimised").html(i.total_count),i.savings&&e("span.wp-smush-savings span.wp-smush-stats-human").html(i.savings),i.percent&&e("span.wp-smush-savings span.wp-smush-stats-percent").html(i.percent)}}(t.data):e("div.wp-smush-scan-result div.content").prepend(t.data.message)}))}e("span.dismiss-recommendation").on("click",(function(t){t.preventDefault();var n=e(this).parent();n.hide("slow",(function(){n.remove()})),e.ajax({type:"POST",url:ajaxurl,data:{action:"hide_pagespeed_suggestion"}})})),e("#smush-updated-dialog").length&&window.SUI.openModal("smush-updated-dialog","wpbody-content",void 0,!1);var a=a||{};a.KeyCode={TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},e('#smush-box-tutorials div[role="link"]').on("click",(function(e){var t=null!==e.target?e.target:e.srcElement;t&&window.open(t.getAttribute("data-href"),"_blank")})).on("keydown",(function(t){var n=function(t){var n=e(i).data("tutorial"),s=e('#smush-box-tutorials [data-tutorial="'.concat("next"===t?n+1:n-1,'"]'));if(!s.length){var r=e("#smush-box-tutorials .wp-smush-tutorial-item");s=r["next"===t?0:r.length-1]}s.focus()},s=t.which||t.keyCode,i=null!==t.target?t.target:t.srcElement;switch(s){case a.KeyCode.RETURN:i&&window.open(i.getAttribute("data-href"),"_blank");break;case a.KeyCode.LEFT:n("prev");break;case a.KeyCode.RIGHT:n("next")}}))}))},function(e,t,n){"use strict";n.r(t);var s,i=n(0);s=jQuery,WP_Smush.bulk={init:function(){s(".wp-smush-all").on("click",(function(e){e.preventDefault(),s(".sui-notice-top.sui-notice-success").remove();var t=document.getElementById("bulk_smush_warning");t.classList.add("sui-hidden");var n=s(".wp-smush-bulk-progress-bar-wrapper");if(n.removeClass("wp-smush-exceed-limit"),n.find(".sui-progress-block .wp-smush-all").addClass("sui-hidden"),n.find(".sui-progress-block .wp-smush-cancel-bulk").removeClass("sui-hidden"),t&&document.getElementById("bulk-smush-resume-button").classList.add("sui-hidden"),s(".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#wp-smush-save-settings").prop("disabled",!0),void 0===window.wp_smushit_data||0===window.wp_smushit_data.unsmushed.length&&0===window.wp_smushit_data.resmush.length)return!1;s(".wp-smush-remaining").addClass("sui-hidden"),n.find(".sui-progress-block i.sui-icon-info").removeClass("sui-icon-info").addClass("sui-loading").addClass("sui-icon-loader"),new i.a(s(this),!0)})),s("body").on("click",".smush-ignore-image",(function(e){e.preventDefault();var t=s(this);t.prop("disabled",!0),t.attr("data-tooltip"),t.removeClass("sui-tooltip"),s.post(ajaxurl,{action:"ignore_bulk_image",id:t.attr("data-id")}).done((function(n){t.is("a")&&n.success&&void 0!==n.data.links&&(t.parent().parent().find(".smush-status").text(wp_smush_msgs.ignored),e.target.closest(".smush-status-links").innerHTML=n.data.links)}))}));var e=document.getElementById("smush-box-bulk-upgrade");!e||window.wp_smushit_data.unsmushed.length||window.wp_smushit_data.resmush.length||e.classList.remove("sui-hidden")}},WP_Smush.bulk.init()},function(e,t){!function(){"use strict";WP_Smush.onboarding={membership:"free",onboardingModal:document.getElementById("smush-onboarding-dialog"),scanFilesModal:document.getElementById("checking-files-dialog"),settings:{first:!0,last:!1,slide:"start",value:!1},selection:{auto:!0,lossy:!0,strip_exif:!0,original:!1,lazy_load:!0,usage:!1},contentContainer:document.getElementById("smush-onboarding-content"),onboardingSlides:["start","auto","lossy","strip_exif","original","lazy_load","usage"],touchX:null,touchY:null,init:function(){if(this.onboardingModal){var e=document.getElementById("smush-onboarding");this.membership=e.dataset.type,"pro"!==this.membership&&(this.onboardingSlides=["start","auto","strip_exif","lazy_load","usage"],this.selection.lossy=!1),"false"===e.dataset.tracking&&this.onboardingSlides.pop(),this.renderTemplate();var t=this.onboardingModal.querySelector(".smush-onboarding-skip-link");t&&t.addEventListener("click",this.skipSetup),window.SUI.openModal("smush-onboarding-dialog","checking-files-dialog",void 0,!1)}},handleTouchStart:function(e){var t=e.touches[0];this.touchX=t.clientX,this.touchY=t.clientY},handleTouchMove:function(e){if(this.touchX&&this.touchY){var t=e.touches[0].clientX,n=e.touches[0].clientY,s=this.touchX-t,i=this.touchY-n;Math.abs(s)>Math.abs(i)&&(s>0?!1===WP_Smush.onboarding.settings.last&&WP_Smush.onboarding.next(null,"next"):!1===WP_Smush.onboarding.settings.first&&WP_Smush.onboarding.next(null,"prev")),this.touchX=null,this.touchY=null}},renderTemplate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none",n=this.onboardingModal.querySelector('input[type="checkbox"]');n&&(this.selection[n.id]=n.checked);var s=WP_Smush.onboarding.template("smush-onboarding"),i=s(this.settings);i&&(this.contentContainer.innerHTML=i,"none"===t?this.contentContainer.classList.add("loaded"):(this.contentContainer.classList.remove("loaded"),this.contentContainer.classList.add(t),setTimeout((function(){e.contentContainer.classList.add("loaded"),e.contentContainer.classList.remove(t)}),600))),this.onboardingModal.addEventListener("touchstart",this.handleTouchStart,!1),this.onboardingModal.addEventListener("touchmove",this.handleTouchMove,!1),this.bindSubmit()},bindSubmit:function(){var e=this.onboardingModal.querySelector('button[type="submit"]'),t=this;e&&e.addEventListener("click",(function(e){e.preventDefault();var n=t.onboardingModal.querySelector('input[type="checkbox"]');n&&(t.selection[n.id]=n.checked);var s=document.getElementById("smush_quick_setup_nonce"),i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_setup",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){200===i.status?WP_Smush.onboarding.showScanDialog():window.console.log("Request failed. Returned status of "+i.status)},i.send("smush_settings="+JSON.stringify(t.selection)+"&_ajax_nonce="+s.value)}))},next:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.onboardingSlides.indexOf(this.settings.slide),s=0;s=t?"next"===t?n+1:n-1:null!==e&&e.classList.contains("next")?n+1:n-1;var i=null!==e&&e.classList.contains("next")?"fadeInRight":"fadeInLeft";this.settings={first:0===s,last:s+1===this.onboardingSlides.length,slide:this.onboardingSlides[s],value:this.selection[this.onboardingSlides[s]]},this.renderTemplate(i)},goTo:function(e){var t=this.onboardingSlides.indexOf(e);this.settings={first:0===t,last:t+1===this.onboardingSlides.length,slide:e,value:this.selection[e]},this.renderTemplate()},skipSetup:function(){var e=document.getElementById("smush_quick_setup_nonce"),t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=skip_smush_setup&_ajax_nonce="+e.value),t.onload=function(){200===t.status?WP_Smush.onboarding.showScanDialog():window.console.log("Request failed. Returned status of "+t.status)},t.send()},showScanDialog:function(){window.SUI.closeModal(),window.SUI.openModal("checking-files-dialog","wpbody-content",void 0,!1);var e=document.getElementById("wp_smush_options_nonce");setTimeout((function(){var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=scan_for_resmush",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){var e=document.querySelector("#smush-onboarding-dialog");e.parentNode.removeChild(e),window.SUI.closeModal(),200===t.status?setTimeout((function(){location.reload()}),1e3):window.console.log("Request failed. Returned status of "+t.status)},t.send("type=media&get_ui=false&process_settings=false&wp_smush_options_nonce="+e.value)}),3e3)},hideUpgradeModal:function(){var e=new XMLHttpRequest;e.open("POST",ajaxurl+"?action=hide_new_features"),e.send()}},WP_Smush.onboarding.template=_.memoize((function(e){var t,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(s){return _.templateSettings=n,(t=t||_.template(document.getElementById(e).innerHTML))(s)}})),window.addEventListener("load",(function(){return WP_Smush.onboarding.init()}))}()},function(e,t,n){var s,i,r; /*! jQuery UI - v1.12.1 - 2018-05-20 * http://jqueryui.com * Includes: widget.js, position.js, keycode.js, scroll-parent.js, unique-id.js * Copyright jQuery Foundation and other contributors; Licensed MIT */i=[n(2)],void 0===(r="function"==typeof(s=function(e){e.ui=e.ui||{},e.ui.version="1.12.1";var t,n,s=0,i=Array.prototype.slice; /*! * jQuery UI Widget 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */e.cleanData=e.cleanData||(t=e.cleanData,function(n){var s,i,r;for(r=0;null!=(i=n[r]);r++)try{(s=e._data(i,"events"))&&s.remove&&e(i).triggerHandler("remove")}catch(e){}t(n)}),e.widget=e.widget||function(t,n,s){var i,r,o,a={},u=t.split(".")[0],l=u+"-"+(t=t.split(".")[1]);return s||(s=n,n=e.Widget),e.isArray(s)&&(s=e.extend.apply(null,[{}].concat(s))),e.expr[":"][l.toLowerCase()]=function(t){return!!e.data(t,l)},e[u]=e[u]||{},i=e[u][t],r=e[u][t]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,i,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),(o=new n).options=e.widget.extend({},o.options),e.each(s,(function(t,s){e.isFunction(s)?a[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function i(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,r=this._superApply;return this._super=e,this._superApply=i,t=s.apply(this,arguments),this._super=n,this._superApply=r,t}}():a[t]=s})),r.prototype=e.widget.extend(o,{widgetEventPrefix:i&&o.widgetEventPrefix||t},a,{constructor:r,namespace:u,widgetName:t,widgetFullName:l}),i?(e.each(i._childConstructors,(function(t,n){var s=n.prototype;e.widget(s.namespace+"."+s.widgetName,r,n._proto)})),delete i._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var n,s,r=i.call(arguments,1),o=0,a=r.length;o<a;o++)for(n in r[o])s=r[o][n],r[o].hasOwnProperty(n)&&void 0!==s&&(e.isPlainObject(s)?t[n]=e.isPlainObject(t[n])?e.widget.extend({},t[n],s):e.widget.extend({},s):t[n]=s);return t},e.widget.bridge=function(t,n){var s=n.prototype.widgetFullName||t;e.fn[t]=function(r){var o="string"==typeof r,a=i.call(arguments,1),u=this;return o?this.length||"instance"!==r?this.each((function(){var n,i=e.data(this,s);return"instance"===r?(u=i,!1):i?e.isFunction(i[r])&&"_"!==r.charAt(0)?(n=i[r].apply(i,a))!==i&&void 0!==n?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0:e.error("no such method '"+r+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+r+"'")})):u=void 0:(a.length&&(r=e.widget.extend.apply(null,[r].concat(a))),this.each((function(){var t=e.data(this,s);t?(t.option(r||{}),t._init&&t._init()):e.data(this,s,new n(r,this))}))),u}},e.Widget=e.Widget||function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,n){t._removeClass(n,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var s,i,r,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(i=o[t]=e.widget.extend({},this.options[t]),r=0;r<s.length-1;r++)i[s[r]]=i[s[r]]||{},i=i[s[r]];if(t=s.pop(),1===arguments.length)return void 0===i[t]?null:i[t];i[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=n}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,s,i;for(n in t)i=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&i&&i.length&&(s=e(i.get()),this._removeClass(i,n),s.addClass(this._classes({element:s,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var n=[],s=this;function i(i,r){var o,a;for(a=0;a<i.length;a++)o=s.classesElementLookup[i[a]]||e(),o=t.add?e(e.unique(o.get().concat(t.element.get()))):e(o.not(t.element).get()),s.classesElementLookup[i[a]]=o,n.push(i[a]),r&&t.classes[i[a]]&&n.push(t.classes[i[a]])}return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&i(t.keys.match(/\S+/g)||[],!0),t.extra&&i(t.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(t){var n=this;e.each(n.classesElementLookup,(function(s,i){-1!==e.inArray(t.target,i)&&(n.classesElementLookup[s]=e(i.not(t.target).get()))}))},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,s){s="boolean"==typeof s?s:n;var i="string"==typeof e||null===e,r={extra:i?t:n,keys:i?e:t,element:i?this.element:e,add:s};return r.element.toggleClass(this._classes(r),s),this},_on:function(t,n,s){var i,r=this;"boolean"!=typeof t&&(s=n,n=t,t=!1),s?(n=i=e(n),this.bindings=this.bindings.add(n)):(s=n,n=this.element,i=this.widget()),e.each(s,(function(s,o){function a(){if(t||!0!==r.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof o?r[o]:o).apply(r,arguments)}"string"!=typeof o&&(a.guid=o.guid=o.guid||a.guid||e.guid++);var u=s.match(/^([\w:-]*)\s*(.*)$/),l=u[1]+r.eventNamespace,d=u[2];d?i.on(l,d,a):n.on(l,a)}))},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n).off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){var n=this;return setTimeout((function(){return("string"==typeof e?n[e]:e).apply(n,arguments)}),t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,s){var i,r,o=this.options[t];if(s=s||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],r=n.originalEvent)for(i in r)i in n||(n[i]=r[i]);return this.element.trigger(n,s),!(e.isFunction(o)&&!1===o.apply(this.element[0],[n].concat(s))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,n){e.Widget.prototype["_"+t]=function(s,i,r){var o;"string"==typeof i&&(i={effect:i});var a=i?!0===i||"number"==typeof i?n:i.effect||n:t;"number"==typeof(i=i||{})&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=r,i.delay&&s.delay(i.delay),o&&e.effects&&e.effects.effect[a]?s[t](i):a!==t&&s[a]?s[a](i.duration,i.easing,r):s.queue((function(n){e(this)[t](),r&&r.call(s[0]),n()}))}})),e.widget, /*! * jQuery UI Position 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/position/ */ function(){var t,n=Math.max,s=Math.abs,i=/left|center|right/,r=/top|center|bottom/,o=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,u=/%$/,l=e.fn.position;function d(e,t,n){return[parseFloat(e[0])*(u.test(e[0])?t/100:1),parseFloat(e[1])*(u.test(e[1])?n/100:1)]}function c(t,n){return parseInt(e.css(t,n),10)||0}function h(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.position=e.position||{scrollbarWidth:function(){if(void 0!==t)return t;var n,s,i=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=i.children()[0];return e("body").append(i),n=r.offsetWidth,i.css("overflow","scroll"),n===(s=r.offsetWidth)&&(s=i[0].clientWidth),i.remove(),t=n-s},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:i?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),s=e.isWindow(n[0]),i=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:s,isDocument:i,offset:s||i?{left:0,top:0}:e(t).offset(),scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return l.apply(this,arguments);t=e.extend({},t);var u,p,f,m,g,v,y=e(t.of),_=e.position.getWithinInfo(t.within),w=e.position.getScrollInfo(_),b=(t.collision||"flip").split(" "),x={};return v=h(y),y[0].preventDefault&&(t.at="left top"),p=v.width,f=v.height,m=v.offset,g=e.extend({},m),e.each(["my","at"],(function(){var e,n,s=(t[this]||"").split(" ");1===s.length&&(s=i.test(s[0])?s.concat(["center"]):r.test(s[0])?["center"].concat(s):["center","center"]),s[0]=i.test(s[0])?s[0]:"center",s[1]=r.test(s[1])?s[1]:"center",e=o.exec(s[0]),n=o.exec(s[1]),x[this]=[e?e[0]:0,n?n[0]:0],t[this]=[a.exec(s[0])[0],a.exec(s[1])[0]]})),1===b.length&&(b[1]=b[0]),"right"===t.at[0]?g.left+=p:"center"===t.at[0]&&(g.left+=p/2),"bottom"===t.at[1]?g.top+=f:"center"===t.at[1]&&(g.top+=f/2),u=d(x.at,p,f),g.left+=u[0],g.top+=u[1],this.each((function(){var i,r,o=e(this),a=o.outerWidth(),l=o.outerHeight(),h=c(this,"marginLeft"),v=c(this,"marginTop"),k=a+h+c(this,"marginRight")+w.width,S=l+v+c(this,"marginBottom")+w.height,C=e.extend({},g),T=d(x.my,o.outerWidth(),o.outerHeight());"right"===t.my[0]?C.left-=a:"center"===t.my[0]&&(C.left-=a/2),"bottom"===t.my[1]?C.top-=l:"center"===t.my[1]&&(C.top-=l/2),C.left+=T[0],C.top+=T[1],i={marginLeft:h,marginTop:v},e.each(["left","top"],(function(n,s){e.ui.position[b[n]]&&e.ui.position[b[n]][s](C,{targetWidth:p,targetHeight:f,elemWidth:a,elemHeight:l,collisionPosition:i,collisionWidth:k,collisionHeight:S,offset:[u[0]+T[0],u[1]+T[1]],my:t.my,at:t.at,within:_,elem:o})})),t.using&&(r=function(e){var i=m.left-C.left,r=i+p-a,u=m.top-C.top,d=u+f-l,c={target:{element:y,left:m.left,top:m.top,width:p,height:f},element:{element:o,left:C.left,top:C.top,width:a,height:l},horizontal:r<0?"left":i>0?"right":"center",vertical:d<0?"top":u>0?"bottom":"middle"};p<a&&s(i+r)<p&&(c.horizontal="center"),f<l&&s(u+d)<f&&(c.vertical="middle"),n(s(i),s(r))>n(s(u),s(d))?c.important="horizontal":c.important="vertical",t.using.call(this,e,c)}),o.offset(e.extend(C,{using:r}))}))},e.ui.position={fit:{left:function(e,t){var s,i=t.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,a=e.left-t.collisionPosition.marginLeft,u=r-a,l=a+t.collisionWidth-o-r;t.collisionWidth>o?u>0&&l<=0?(s=e.left+u+t.collisionWidth-o-r,e.left+=u-s):e.left=l>0&&u<=0?r:u>l?r+o-t.collisionWidth:r:u>0?e.left+=u:l>0?e.left-=l:e.left=n(e.left-a,e.left)},top:function(e,t){var s,i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,u=r-a,l=a+t.collisionHeight-o-r;t.collisionHeight>o?u>0&&l<=0?(s=e.top+u+t.collisionHeight-o-r,e.top+=u-s):e.top=l>0&&u<=0?r:u>l?r+o-t.collisionHeight:r:u>0?e.top+=u:l>0?e.top-=l:e.top=n(e.top-a,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,o=r.offset.left+r.scrollLeft,a=r.width,u=r.isWindow?r.scrollLeft:r.offset.left,l=e.left-t.collisionPosition.marginLeft,d=l-u,c=l+t.collisionWidth-a-u,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];d<0?((n=e.left+h+p+f+t.collisionWidth-a-o)<0||n<s(d))&&(e.left+=h+p+f):c>0&&((i=e.left-t.collisionPosition.marginLeft+h+p+f-u)>0||s(i)<c)&&(e.left+=h+p+f)},top:function(e,t){var n,i,r=t.within,o=r.offset.top+r.scrollTop,a=r.height,u=r.isWindow?r.scrollTop:r.offset.top,l=e.top-t.collisionPosition.marginTop,d=l-u,c=l+t.collisionHeight-a-u,h="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,p="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,f=-2*t.offset[1];d<0?((i=e.top+h+p+f+t.collisionHeight-a-o)<0||i<s(d))&&(e.top+=h+p+f):c>0&&((n=e.top-t.collisionPosition.marginTop+h+p+f-u)>0||s(n)<c)&&(e.top+=h+p+f)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.ui.position,e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},e.fn.scrollParent=function(t){var n=this.css("position"),s="absolute"===n,i=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter((function(){var t=e(this);return(!s||"static"!==t.css("position"))&&i.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))})).eq(0);return"fixed"!==n&&r.length?r:e(this[0].ownerDocument||document)},e.fn.extend({uniqueId:(n=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++n)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")}))}})})?s.apply(t,i):s)||(e.exports=r)},function(e,t){!function(){"use strict";WP_Smush.CDN={cdnEnableButton:document.getElementById("smush-enable-cdn"),cdnDisableButton:document.getElementById("smush-cancel-cdn"),cdnStatsBox:document.querySelector(".smush-cdn-stats"),init:function(){var e=this;this.cdnEnableButton&&this.cdnEnableButton.addEventListener("click",(function(t){t.currentTarget.classList.add("sui-button-onload"),e.toggle_cdn(!0)})),this.cdnDisableButton&&this.cdnDisableButton.addEventListener("click",(function(t){t.preventDefault(),t.currentTarget.classList.add("sui-button-onload"),e.toggle_cdn(!1)})),this.updateStatsBox()},toggle_cdn:function(e){var t=document.getElementsByName("wp_smush_options_nonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_toggle_cdn",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){if(200===n.status){var e=JSON.parse(n.response);void 0!==e.success&&e.success?location.reload():void 0!==e.data.message&&WP_Smush.helpers.showErrorNotice(e.data.message)}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+n.status)},n.send("param="+e+"&_ajax_nonce="+t[0].value)},updateStatsBox:function(){var e=this;if(void 0!==this.cdnStatsBox&&this.cdnStatsBox&&window.location.search.includes("view=cdn")){this.toggleElements();var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=get_cdn_stats",!0),t.onload=function(){if(200===t.status){var n=JSON.parse(t.response);void 0!==n.success&&n.success?e.toggleElements():void 0!==n.data.message&&WP_Smush.helpers.showErrorNotice(n.data.message)}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+t.status)},t.send()}},toggleElements:function(){for(var e=this.cdnStatsBox.querySelector(".sui-icon-loader"),t=this.cdnStatsBox.querySelectorAll(".wp-smush-stats > :not(.sui-icon-loader)"),n=0;n<t.length;n++)t[n].classList.toggle("sui-hidden");e.classList.toggle("sui-hidden")}},WP_Smush.CDN.init()}()},function(e,t){!function(){"use strict";WP_Smush.WebP={nonceField:document.getElementsByName("wp_smush_options_nonce"),toggleModuleButton:document.getElementById("smush-toggle-webp-button"),recheckStatusButton:document.getElementById("smush-webp-recheck"),recheckStatusLink:document.getElementById("smush-webp-recheck-link"),applyHtaccessButton:document.getElementById("smush-webp-apply-htaccess"),removeHtaccessButton:document.getElementById("smush-webp-remove-htaccess"),selectedServer:"",serverSelector:null,serverInstructions:[],init:function(){var e=this,t=this;if(t.serverSelector=document.getElementById("webp-server-type"),t.serverSelector){t.selectedServer=t.serverSelector.value,jQuery(t.serverSelector).on("change",(function(e){var n=e.currentTarget.value;t.hideCurrentInstructions(),t.showServerInstructions(n),t.selectedServer=n}));for(var n=document.querySelectorAll(".webp-server-instructions"),s=0;s<n.length;s++){var i=n[s].getAttribute("data-server");t.serverInstructions[i]=n[s]}t.showServerInstructions(t.selectedServer)}this.maybeShowDeleteAllSuccessNotice(),this.maybeShowInstructionsNotice(),this.toggleModuleButton&&this.toggleModuleButton.addEventListener("click",(function(t){return e.toggleWebp(t)})),this.recheckStatusButton&&this.recheckStatusButton.addEventListener("click",(function(t){t.preventDefault(),e.recheckStatus()})),this.recheckStatusLink&&this.recheckStatusLink.addEventListener("click",(function(t){t.preventDefault(),e.recheckStatus()})),document.getElementById("wp-smush-webp-delete-all")&&document.getElementById("wp-smush-webp-delete-all").addEventListener("click",(function(t){return e.deleteAll(t)})),this.applyHtaccessButton&&this.applyHtaccessButton.addEventListener("click",(function(t){return e.writeHtaccess(t,"apply")})),this.removeHtaccessButton&&this.removeHtaccessButton.addEventListener("click",(function(t){return e.writeHtaccess(t,"remove")}))},toggleWebp:function(e){var t=this;e.preventDefault();var n=e.currentTarget,s="enable"===n.dataset.action;n.classList.add("sui-button-onload");var i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_webp_toggle",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){var e=JSON.parse(i.response);if(200===i.status){if(void 0!==e.success&&e.success)t.runScan().onload=function(){location.search=location.search+"¬ice=webp-toggled"};else void 0!==e.data.message&&t.showNotice(e.data.message)}else{var s=window.wp_smush_msgs.generic_ajax_error;e&&void 0!==e.data.message&&(s=e.data.message),t.showNotice(s)}n.classList.remove("sui-button-onload")},i.send("param="+s+"&_ajax_nonce="+this.nonceField[0].value)},recheckStatus:function(){var e=this,t=document.getElementsByName("wp_smush_options_nonce");this.recheckStatusButton.classList.add("sui-button-onload");var n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_webp_get_status",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){e.recheckStatusButton.classList.remove("sui-button-onload");var t=!1,s=JSON.parse(n.response);200===n.status&&void 0!==s.success&&s.success?s.data.is_configured!==e.recheckStatusButton.dataset.isConfigured&&location.reload():t=window.wp_smush_msgs.generic_ajax_error,s&&s.data&&s.data.message&&(t=s.data.message),t&&e.showNotice(t)},n.send("_ajax_nonce="+t[0].value)},deleteAll:function(e){var t=this,n=e.currentTarget;n.classList.add("sui-button-onload");var s=!1,i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_webp_delete_all",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){var e=JSON.parse(i.response);200===i.status?void 0!==e.success&&e.success?t.runScan().onload=function(){location.search=location.search+"¬ice=webp-deleted"}:s=window.wp_smush_msgs.generic_ajax_error:s=window.wp_smush_msgs.generic_ajax_error;if(e&&e.data&&e.data.message&&(s=e.data.message),s){n.classList.remove("sui-button-onload");var r='<p style="text-align: left;">'.concat(s,"</p>");window.SUI.openNotice("wp-smush-webp-delete-all-error-notice",r,{type:"error",icon:"info",autoclose:{show:!1}})}},i.send("_ajax_nonce="+this.nonceField[0].value)},writeHtaccess:function(e,t){var n=this;e.preventDefault();var s=e.currentTarget;s.classList.add("sui-button-onload");var i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=smush_webp_write_htaccess_rules",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){s.classList.remove("sui-button-onload");var e,t=!1,r=JSON.parse(i.response);200===i.status?void 0!==r.success&&r.success&&location.reload():t=window.wp_smush_msgs.generic_ajax_error,r&&r.data&&r.data.message&&(t=r.data.message,e="warning"),t&&n.showNotice(t,e)};var r="apply"===t?"apply":"remove",o=document.getElementsByName("wp_smush_options_nonce");i.send("write_action="+r+"&_ajax_nonce="+o[0].value)},runScan:function(){var e=new XMLHttpRequest,t=document.getElementsByName("wp_smush_options_nonce");return e.open("POST",ajaxurl+"?action=scan_for_resmush",!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.send("_ajax_nonce="+t[0].value),e},showNotice:function(e,t){if(void 0!==e){var n="<p>".concat(e,"</p>"),s={type:t||"error",icon:"info",dismiss:{show:!0,label:window.wp_smush_msgs.noticeDismiss,tooltip:window.wp_smush_msgs.noticeDismissTooltip},autoclose:{show:!1}};window.SUI.openNotice("wp-smush-ajax-notice",n,s)}},maybeShowDeleteAllSuccessNotice:function(){if(document.getElementById("wp-smush-webp-delete-all-notice")){var e="<p>".concat(document.getElementById("wp-smush-webp-delete-all-notice").dataset.message,"</p>");window.SUI.openNotice("wp-smush-webp-delete-all-notice",e,{type:"success",icon:"check-tick",dismiss:{show:!0}})}},maybeShowInstructionsNotice:function(){if(document.getElementById("wp-smush-webp-instructions-notice")){var e=document.getElementById("wp-smush-webp-instructions-notice"),t="<p>".concat(e.dataset.message,"</p>");window.SUI.openNotice("wp-smush-webp-instructions-notice",t,{type:"info",icon:"info",dismiss:{show:!0}})}},hideCurrentInstructions:function(){this.serverInstructions[this.selectedServer]&&this.serverInstructions[this.selectedServer].classList.add("sui-hidden")},showServerInstructions:function(e){void 0!==this.serverInstructions[e]&&this.serverInstructions[e].classList.remove("sui-hidden")}},WP_Smush.WebP.init()}()},function(e,t){!function(){"use strict";WP_Smush.Lazyload={lazyloadEnableButton:document.getElementById("smush-enable-lazyload"),lazyloadDisableButton:document.getElementById("smush-cancel-lazyload"),init:function(){var e=this,t=this;this.lazyloadEnableButton&&this.lazyloadEnableButton.addEventListener("click",(function(t){t.currentTarget.classList.add("sui-button-onload"),e.toggle_lazy_load(!0)})),this.lazyloadDisableButton&&this.lazyloadDisableButton.addEventListener("click",(function(t){t.preventDefault(),t.currentTarget.classList.add("sui-button-onload"),e.toggle_lazy_load(!1)}));var n=document.getElementById("smush-remove-spinner");n&&n.addEventListener("click",(function(t){t.preventDefault(),e.removeLoaderIcon()}));var s=document.getElementById("smush-remove-placeholder");s&&s.addEventListener("click",(function(t){t.preventDefault(),e.removeLoaderIcon("placeholder")}));var i=document.querySelectorAll(".smush-ll-remove");i&&0<i.length&&i.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),e.target.closest("li").style.display="none",t.remove(e.target.dataset.id,e.target.dataset.type)}))})),this.handlePredefinedPlaceholders()},handlePredefinedPlaceholders:function(){var e=this,t=document.getElementById("placeholder-icon-1");t&&t.addEventListener("click",(function(){return e.changeColor("#F3F3F3")}));var n=document.getElementById("placeholder-icon-2");n&&n.addEventListener("click",(function(){return e.changeColor("#333333")}))},changeColor:function(e){document.getElementById("smush-color-picker").value=e,document.querySelector(".sui-colorpicker-hex .sui-colorpicker-value > span > span").style.backgroundColor=e,document.querySelector(".sui-colorpicker-hex .sui-colorpicker-value > input").value=e},toggle_lazy_load:function(e){var t=document.getElementsByName("wp_smush_options_nonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_toggle_lazy_load",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){if(200===n.status){var e=JSON.parse(n.response);void 0!==e.success&&e.success?location.reload():void 0!==e.data.message&&(WP_Smush.helpers.showErrorNotice(e.data.message),document.querySelector(".sui-button-onload").classList.remove("sui-button-onload"))}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+n.status),document.querySelector(".sui-button-onload").classList.remove("sui-button-onload")},n.send("param="+e+"&_ajax_nonce="+t[0].value)},addLoaderIcon:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spinner";e||(e=wp.media({title:"Select or upload an icon",button:{text:"Select icon"},multiple:!1})).on("select",(function(){var n=e.state().get("selection").first().toJSON(),s=document.getElementById("smush-"+t+"-icon-preview");s.style.backgroundImage='url("'+n.url+'")',s.style.display="block",document.getElementById("smush-"+t+"-icon-file").setAttribute("value",n.id),document.getElementById("smush-upload-"+t).style.display="none";var i=document.getElementById("smush-remove-"+t);i.querySelector("span").innerHTML=n.filename,i.style.display="block"})),e.open()},removeLoaderIcon:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"spinner",t=document.getElementById("smush-"+e+"-icon-preview");t.style.backgroundImage="",t.style.display="none",document.getElementById("smush-upload-"+e).style.display="block",document.getElementById("smush-remove-"+e).style.display="none",document.getElementById("smush-"+e+"-icon-file").setAttribute("value","")},remove:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"spinner",n=document.getElementsByName("wp_smush_options_nonce"),s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=smush_remove_icon",!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.send("id="+e+"&type="+t+"&_ajax_nonce="+n[0].value)}},WP_Smush.Lazyload.init()}()},function(e,t){!function(){"use strict";WP_Smush.restore={modal:document.getElementById("smush-restore-images-dialog"),contentContainer:document.getElementById("smush-bulk-restore-content"),settings:{slide:"start",success:0,errors:[]},items:[],success:[],errors:[],currentStep:0,totalSteps:0,init:function(){this.modal&&(this.settings={slide:"start",success:0,errors:[]},this.resetModalWidth(),this.renderTemplate(),window.SUI.openModal("smush-restore-images-dialog","wpbody-content",void 0,!1))},renderTemplate:function(){var e=WP_Smush.onboarding.template("smush-bulk-restore")(this.settings);e&&(this.contentContainer.innerHTML=e),this.bindSubmit()},resetModalWidth:function(){this.modal.style.maxWidth="460px",this.modal.querySelector(".sui-box").style.maxWidth="460px"},bindSubmit:function(){var e=this.modal.querySelector('button[id="smush-bulk-restore-button"]'),t=this;e&&e.addEventListener("click",(function(e){e.preventDefault(),t.resetModalWidth(),t.settings={slide:"progress"},t.errors=[],t.renderTemplate(),t.initScan()}))},cancel:function(){"start"===this.settings.slide||"finish"===this.settings.slide?window.SUI.closeModal():(this.updateProgressBar(!0),window.location.reload())},updateProgressBar:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;0<this.currentStep&&(t=Math.min(Math.round(100*this.currentStep/this.totalSteps),99)),t>100&&(t=100),this.modal.querySelector(".sui-progress-text span").innerHTML=t+"%",this.modal.querySelector(".sui-progress-bar span").style.width=t+"%";var n=this.modal.querySelector(".sui-progress-state-text");n.innerHTML=t>=90?"Finalizing...":e?"Cancelling...":this.currentStep+"/"+this.totalSteps+" images restored"},initScan:function(){var e=this,t=document.getElementById("_wpnonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=get_image_count",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){if(200===n.status){var t=JSON.parse(n.response);void 0!==t.data.items&&(e.items=t.data.items,e.totalSteps=t.data.items.length,e.step())}else window.console.log("Request failed. Returned status of "+n.status)},n.send("_ajax_nonce="+t.value)},step:function(){var e=this,t=this,n=document.getElementById("_wpnonce");if(0<this.items.length){var s=this.items.pop(),i=new XMLHttpRequest;i.open("POST",ajaxurl+"?action=restore_step",!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=function(){if(e.currentStep++,200===i.status){var n=JSON.parse(i.response);void 0!==n.data.success&&n.data.success?t.success.push(s):t.errors.push({id:s,src:n.data.src,thumb:n.data.thumb,link:n.data.link})}t.updateProgressBar(),t.step()},i.send("item="+s+"&_ajax_nonce="+n.value)}else this.settings={slide:"finish",success:this.success.length,errors:this.errors,total:this.totalSteps},t.renderTemplate(),0<this.errors.length&&(this.modal.style.maxWidth="660px",this.modal.querySelector(".sui-box").style.maxWidth="660px")}},WP_Smush.restore.template=_.memoize((function(e){var t,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(s){return _.templateSettings=n,(t=t||_.template(document.getElementById(e).innerHTML))(s)}}))}()},function(e,t){!function(e){"use strict";if(e("#wp-smush-s3support-alert").length){var t={type:"warning",icon:"info",dismiss:{show:!0,label:wp_smush_msgs.noticeDismiss,tooltip:wp_smush_msgs.noticeDismissTooltip}};window.SUI.openNotice("wp-smush-s3support-alert",e("#wp-smush-s3support-alert").data("message"),t)}function n(t){var n=e(t.currentTarget).closest(".smush-notice");n.fadeTo(100,0,(function(){return n.slideUp(100,(function(){return n.remove()}))}))}e("#wp-smush-s3support-alert").on("click","button",(function(){e.post(ajaxurl,{action:"dismiss_s3support_alert"})})),e("#wp-smush-api-message button.sui-button-icon").on("click",(function(t){t.preventDefault();var n=e("#wp-smush-api-message");n.slideUp("slow",(function(){n.remove()})),e.post(ajaxurl,{action:"hide_api_message"})})),e(".smush-notice .smush-notice-act").on("click",(function(e){n(e)})),e(".smush-notice .smush-notice-dismiss").on("click",(function(t){n(t),e.post(ajaxurl,{action:"dismiss_upgrade_notice"})})),e(".wp-smush-update-info").on("click",".notice-dismiss",(function(t){t.preventDefault(),n(t),e.post(ajaxurl,{action:"dismiss_update_info"})}))}(jQuery)},,,,,,,,,function(e,t,n){"use strict";n.r(t);var s,i=n(3),r=function(e,t){e=parseInt(e),t=parseInt(t);var n=!1,s=0,i=0,r={scan:function(){var n=e-t;0!==t?o(n):jQuery.post(ajaxurl,{action:"directory_smush_start"},(function(){return o(n)}))},cancel:function(){return n=!0,jQuery.post(ajaxurl,{action:"directory_smush_cancel"})},getProgress:function(){if(n)return 0;var s=e-t;return Math.min(Math.round(100*parseInt(e-s)/e),99)},onFinishStep:function(n){jQuery(".wp-smush-progress-dialog .sui-progress-state-text").html(t-s+"/"+e+" "+window.wp_smush_msgs.progress_smushed),WP_Smush.directory.updateProgressBar(n)},onFinish:function(){WP_Smush.directory.updateProgressBar(100),window.location.href=window.wp_smush_msgs.directory_url+"&scan=done"},limitReached:function(){var e=jQuery("#wp-smush-progress-dialog");e.addClass("wp-smush-exceed-limit"),e.find("#cancel-directory-smush").attr("data-tooltip",window.wp_smush_msgs.bulk_resume),e.find(".sui-icon-close").removeClass("sui-icon-close").addClass("sui-icon-play"),e.find("#cancel-directory-smush").attr("id","cancel-directory-smush-disabled")},resume:function(){var e=jQuery("#wp-smush-progress-dialog"),t=e.find("#cancel-directory-smush-disabled");e.removeClass("wp-smush-exceed-limit"),e.find(".sui-icon-play").removeClass("sui-icon-play").addClass("sui-icon-close"),t.attr("data-tooltip","Cancel"),t.attr("id","cancel-directory-smush"),r.scan()}},o=function n(o){o>=0?(t=e-o,jQuery.post(ajaxurl,{action:"directory_smush_check_step",step:t},(function(e){void 0!==e.success&&e.success?(void 0!==e.data&&void 0!==e.data.skipped&&!0===e.data.skipped&&i++,t++,o-=1,r.onFinishStep(r.getProgress()),n(o)):void 0!==e.data.error&&"dir_smush_limit_exceeded"===e.data.error?r.limitReached():(s++,t++,o-=1,r.onFinishStep(r.getProgress()),n(o))}))):jQuery.post(ajaxurl,{action:"directory_smush_finish",items:e-(s+i),failed:s,skipped:i},(function(e){return r.onFinish(e)}))};return r};s=jQuery,WP_Smush.directory={selected:[],tree:[],wp_smush_msgs:[],init:function(){var e=this,t=s("#wp-smush-progress-dialog"),n=0,i=0;void 0!==window.wp_smushit_data.dir_smush&&(n=window.wp_smushit_data.dir_smush.totalSteps,i=window.wp_smushit_data.dir_smush.currentScanStep),this.scanner=new r(n,i),this.wp_smush_msgs=window.wp_smush_msgs||{},s("div.sui-wrap").on("click","button.wp-smush-browse",(function(t){t.preventDefault(),s("div.wp-smush-scan-result div.wp-smush-notice").hide(),s("div.wp-smush-info").remove(),e.initFileTree()})),s("button.wp-smush-browse, a.wp-smush-dir-link").on("click",(function(t){t.preventDefault(),window.SUI.openModal("wp-smush-list-dialog",t.currentTarget,s("#wp-smush-list-dialog .sui-box-header [data-modal-close]")[0],!0),e.initFileTree()})),s(".wp-smush-select-dir").on("click",(function(t){if(t.preventDefault(),!s(this).prop("disabled")){var n=s(this);s("div.wp-smush-list-dialog div.sui-box-body").css({opacity:"0.8"}),s("div.wp-smush-list-dialog div.sui-box-body a").off("click"),n.prop("disabled",!0),n.parent().find(".add-dir-loader").addClass("sui-icon-loader sui-loading");var i=e.tree.getSelectedNodes(),o=s('input[name="wp-smush-base-path"]').val(),a=[];i.forEach((function(e){a.push(o+"/"+e.key)}));var u={action:"image_list",smush_path:a,image_list_nonce:s('input[name="image_list_nonce"]').val()};s.post(ajaxurl,u,(function(t){window.SUI.closeModal(),t.success?(e.scanner=new r(t.data,0),e.showProgressDialog(t.data),e.scanner.scan()):window.SUI.openNotice("wp-smush-ajax-notice",t.data.message,{type:"warning"})}))}})),t.on("click","#cancel-directory-smush, .sui-dialog-close, .wp-smush-cancel-dir",(function(t){t.preventDefault(),s(this).parent().find(".add-dir-loader").addClass("sui-icon-loader sui-loading"),e.scanner.cancel().done((function(){return window.location.href=e.wp_smush_msgs.directory_url}))})),t.on("click",".sui-icon-play, .wp-smush-resume-scan",(function(t){t.preventDefault(),e.scanner.resume()}))},initFileTree:function(){var e=this,t=s("button.wp-smush-select-dir"),n={type:"GET",url:ajaxurl,data:{action:"smush_get_directory_list",list_nonce:s('input[name="list_nonce"]').val()},cache:!1};Object.entries(e.tree).length>0||(e.tree=Object(i.createTree)(".wp-smush-list-dialog .content",{autoCollapse:!0,clickFolderMode:3,checkbox:!0,debugLevel:0,selectMode:3,tabindex:"0",keyboard:!0,quicksearch:!0,source:n,lazyLoad:function(i,r){r.result=new Promise((function(e,t){n.data.dir=r.node.key,s.ajax(n).done((function(t){return e(t)})).fail(t)})),r.result.then(t.html(e.wp_smush_msgs.add_dir))},loadChildren:function(e,t){return t.node.fixSelection3AfterClick()},select:function(){return t.prop("disabled",!+e.tree.getSelectedNodes().length)},init:function(){return t.prop("disabled",!0)}}))},showProgressDialog:function(e){s(".wp-smush-progress-dialog .sui-progress-state-text").html("0/"+e+" "+self.wp_smush_msgs.progress_smushed),window.SUI.openModal("wp-smush-progress-dialog","dialog-close-div",void 0,!1)},updateProgressBar:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e>100&&(e=100),s(".sui-progress-block .sui-progress-text span").text(e+"%"),s(".sui-progress-block .sui-progress-bar span").width(e+"%"),e>=90&&s(".sui-progress-state .sui-progress-state-text").text("Finalizing..."),t&&s(".sui-progress-state .sui-progress-state-text").text("Cancelling...")}},WP_Smush.directory.init()}]); //# sourceMappingURL=smush-admin.min.js.map