Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets.corals.io/wp-content/plugins/wp-smushit/app/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/mets.corals.io/wp-content/plugins/wp-smushit/app/assets/js/smush-admin.min.js
!function(){var e={9576:function(e,t,s){"use strict";s.d(t,{Z:function(){return o}});var n=s(8891),i=s.n(n);function r(e,t){for(var s=0;s<t.length;s++){var n=t[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mixpanelInstance=i().init(wp_smush_mixpanel.token,{opt_out_tracking_by_default:!wp_smush_mixpanel.opt_in,loaded:function(e){e.identify(wp_smush_mixpanel.unique_id),e.register(wp_smush_mixpanel.super_properties)}},"smush")}var t,s,n;return t=e,s=[{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.mixpanelInstance.track(e,t)}},{key:"trackBulkSmushCompleted",value:function(e,t,s,n){this.track("Bulk Smush Completed",{"Total Savings":e,"Total Images":t,"Media Optimization Percentage":s,"Percentage of Savings":n})}},{key:"trackBulkSmushCancel",value:function(){this.track("Bulk Smush Cancelled")}}],s&&r(t.prototype,s),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},9478:function(){jQuery((function(e){"use strict";e("body").on("click","a.smush-stats-details",(function(t){if(e(this).prop("disabled"))return!1;t.preventDefault();var s=e(this).find(".stats-toggle");e(this).parents().eq(1).find(".smush-stats-wrapper").slideToggle(),s.text("+"==s.text()?"-":"+")}))}))},6111:function(e,t,s){"use strict";s.r(t);var n=s(9446),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,s,i,r){if(t.preventDefault(),!s.attr("disabled")){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:s.data("id"),mode:o,_nonce:s.data("nonce")};!function(e){var t=e.parent();t.css({opacity:"0.5"}),t.find("a").prop("disabled",!0)}(s);var u=s.html();s.html('<span class="spinner wp-smush-progress">'+wp_smush_msgs[r]+"</span>"),e.post(ajaxurl,a,(function(e){if(function(e){var t=e.parent();t.css({opacity:"1"}),t.find("a").prop("disabled",!1)}(s),e.success&&void 0!==e.data){if(void 0!==this.data&&this.data.indexOf("nextgen")>-1)s.parents().eq(1).html(e.data.stats);else if("restore"===r)s.parents().eq(1).html(e.data.stats);else{var t=s.parents().eq(1);wp_smush_msgs.failed_item_smushed&&t.hasClass("smush-failed-processing")?(t.html('<p class="smush-status smush-success">'+wp_smush_msgs.failed_item_smushed+"</p>"),setTimeout((function(){t.html(e.data)}),2e3)):t.html(e.data)}void 0!==e.data&&"restore"===r&&n.Z.updateImageStats(e.data.new_size)}else e.data&&e.data.error_msg&&(-1===this.data.indexOf("nextgen")?s.closest(".smushit").find(".smush-status").addClass("smush-warning").html(e.data.error_msg):s.parent().append(e.data.error_msg),s.attr("disabled",!0),s.html(u))}))}},s=function(e){var t=jQuery(".bulk-smush-wrapper .wp-smush-bulk-wrapper"),s=jQuery(".bulk-smush-wrapper .wp-smush-all-done");if(t.length&&s.length)if(0===e)t.addClass("sui-hidden"),s.find("p").html(wp_smush_msgs.all_smushed),s.find(".sui-notice-icon").removeClass("sui-icon-info").addClass("sui-icon-check-tick"),s.removeClass("sui-notice-warning").addClass("sui-notice-success"),s.removeClass("sui-hidden");else{t.removeClass("sui-hidden"),s.addClass("sui-hidden");var n=jQuery(".sui-summary-smush .sui-summary-details .sui-tooltip");if(n.length){var i=1===e?"singular":"plural",r=n.data(i).replace("{count}",e);n.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(".sui-mobile-nav").on("change",(function(t){window.location.assign(e(t.currentTarget).val())})),e("#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",".wp-smush-send:not(.wp-smush-resmush)",(function(t){t.preventDefault(),new n.Z(e(this),!1)})),e("body").on("click",".wp-smush-remove-skipped",(function(t){t.preventDefault();var s=e(this);e.post(ajaxurl,{action:"remove_from_skip_list",id:s.attr("data-id"),_ajax_nonce:s.attr("data-nonce")}).done((function(e){e.success&&void 0!==e.data.html&&s.parent().parent().html(e.data.html)}))})),e("body").on("click",".wp-smush-nextgen-send",(function(t){t.preventDefault(),new n.Z(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 n.Z(e(this),!0,"nextgen")})),e("body").on("click",".wp-smush-action.wp-smush-restore",(function(s){var n=e(this);t(s,n,"smush_restore_image","restore")})),e("body").on("click",".wp-smush-action.wp-smush-resmush",(function(s){t(s,e(this),"smush_resmush_image","smushing")})),e("body").on("click",".wp-smush-action.wp-smush-nextgen-restore",(function(s){t(s,e(this),"smush_restore_nextgen_image","restore")})),e("body").on("click",".wp-smush-action.wp-smush-nextgen-resmush",(function(s){t(s,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"),e(".wp-smush-all").prop("disabled",!0),e(".wp-smush-settings-changed").hide();var o={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,o,(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_total=void 0!==t.data.count_total?parseInt(t.data.count_total):wp_smushit_data.count_total,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,wp_smushit_data.percent_grade&&(wp_smushit_data.percent_grade=t.data.percent_grade||wp_smushit_data.percent_grade,wp_smushit_data.percent_metric=t.data.percent_metric||0,wp_smushit_data.percent_optimized=t.data.percent_optimized||0),wp_smushit_data.remaining_count=t.data.remaining_count||0),"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(.sui-notice-purple)");i.length>0&&i.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"}),t.data.no_images&&wp_smushit_data.count_total>0&&window.location.reload()}e("div.smush-final-log").hide(),void 0!==t.data.super_smush&&t.data.super_smush&&"undefined"!==t.data.super_smush_stat&&e(".super-smush-attachments .wp-smush-stats").html(t.data.super_smush_stats),n.Z.updateStats(r),n.Z.updateScoreProgress();var a=t.data.count||0;s(a),document.dispatchEvent(new Event("wpSmushAfterRecheckImages"))}})).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"),s=i.find(".wp-smush-completed-text");t.addClass("sui-hidden-important"),s.removeClass("sui-hidden"),setTimeout((function(){i.removeClass("smush-button-check-success"),t.removeClass("sui-hidden-important"),s.addClass("sui-hidden")}),2e3),e(".wp-smush-all").prop("disabled",!1)}))}(!1)})),e("body").on("click",".wp-smush-notice .icon-fi-close",(function(t){t.preventDefault();var s=e(this).parent();i(s)})),e("body").on("click",".wp-smush-skip-resmush",(function(t){t.preventDefault();var s=jQuery(this),r=s.parents().eq(1),o=s.parent();i(o),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").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 c=jQuery(".bulk-smush-wrapper .wp-smush-progress-inner");if(!(c.length<1)){c.css("width",u+"%"),e(".wp-smush-bulk-wrapper").removeClass("sui-hidden"),e(".wp-smush-bulk-wrapper .sui-notice").removeClass("sui-hidden");var l={action:"delete_resmush_list",type:a};e.post(ajaxurl,l,(function(t){if(t.success&&void 0!==t.data.stats){var s=t.data.stats;"undefined"!=typeof wp_smushit_data&&(wp_smushit_data.count_images=void 0!==s.count_images?parseInt(wp_smushit_data.count_images)+s.count_images:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==s.size_before?parseInt(wp_smushit_data.size_before)+s.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==s.size_after?parseInt(wp_smushit_data.size_after)+s.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==s.savings_resize?parseInt(wp_smushit_data.savings_resize)+s.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==s.savings_conversion?parseInt(wp_smushit_data.savings_conversion)+s.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!==s.count_resize?parseInt(wp_smushit_data.count_resize)+s.count_resize:wp_smushit_data.count_resize),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")),n.Z.updateStats()}}))}})),e("a.wp-smush-lossy-enable").on("click",(function(e){e.preventDefault(),r("#column-lossy")})),e(".wp-smush-resize-enable").on("click",(function(e){e.preventDefault(),r("#column-resize")})),window.location.hash){var o="";switch(window.location.hash.substring(1)){case"enable-resize":o="#column-resize";break;case"backup-label":o="#backup";break;case"original-label":o="#original";break;case"enable-lossy":o="#column-lossy"}""!==o&&(r(o),document.getElementById(o.replace("#","")).focus())}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").trigger("click"):e(".wp-smush-all").trigger("click"),e("span.sui-notice-dismiss").trigger("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").on("focus",(function(){e(this).keypress((function(t){32==t.keyCode&&(t.preventDefault(),e(this).find(".toggle-checkbox").trigger("click"))}))})),e("body").on("blur",".wp-smush-resize-input",(function(){!function(e,t,s){var n=e.find("#resize");if(!s)var i=e.find("#wp-smush-resize_width"),r=e.find(".sui-notice-info.wp-smush-update-width");if(!t)var o=e.find("#wp-smush-resize_height"),a=e.find(".sui-notice-info.wp-smush-update-height");var u=!1,c=!1;!n.is(":checked")||void 0===wp_smushit_data.resize_sizes||void 0===wp_smushit_data.resize_sizes.width||(!s&&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"),c=!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","#resize",(function(){var t=e(this),s=e("#smush-resize-settings-wrap");t.is(":checked")?s.show():s.hide()})),e("#wp-smush-revalidate-member").on("click",(function(t){t.preventDefault();var s={action:"smush_show_warning",_ajax_nonce:window.wp_smush_msgs.nonce},n=e(this).parents().eq(1);n.addClass("loading-notice"),e.get(ajaxurl,s,(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){var a={action:"get_dir_smush_stats",_ajax_nonce:window.wp_smush_msgs.nonce};e.get(ajaxurl,a,(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 s=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-human"),n=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-percent");t.dir_smush.bytes>0?(e(".wp-smush-dir-link").addClass("sui-hidden"),e("li.smush-dir-savings .wp-smush-stats-label-message").hide(),s.length>0&&s.html(t.dir_smush.human),t.dir_smush.percent>0&&(e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-sep").removeClass("sui-hidden"),n.length>0&&n.html(t.dir_smush.percent+"%"))):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("#smush-updated-dialog").length&&window.SUI.openModal("smush-updated-dialog","wpbody-content",void 0,!1),e("input#original").on("change",(function(){e("#backup-notice").toggleClass("sui-hidden",e(this).is(":checked"))}))}))},9867:function(e,t,s){"use strict";s.r(t);var n=s(4218),i=s(9576),r=["global_stats","errors"];function o(e,t){if(null==e)return{};var s,n,i=function(e,t){if(null==e)return{};var s,n,i={},r=Object.keys(e);for(n=0;n<r.length;n++)s=r[n],t.indexOf(s)>=0||(i[s]=e[s]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)s=r[n],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(i[s]=e[s])}return i}!function(){if(window.wp_smush_msgs){var e=document.querySelector.bind(document),t=function(){return{handle:function(e){return n.Z.background[e]()},initState:function(){return n.Z.background.initState()}}},s=function(){var s=window.wp_smushit_data&&window.wp_smushit_data.bo_stats&&e(".wp-smush-bo-start");if(s){var a=window.wp_smushit_data.bo_stats,u={count_images:0,count_total:0,count_resize:0,count_skipped:0,count_smushed:0,savings_bytes:0,savings_resize:0,size_after:0,size_before:0,savings_percent:0,percent_grade:"sui-grade-dismissed",percent_metric:0,percent_optimized:0,remaining_count:0},c=new i.Z,l=new t,d=e(".bulk-smush-wrapper"),h=d.querySelector("#wp-smush-running-notice"),p=d.querySelector(".wp-smush-bulk-progress-bar-wrapper"),f=e("#smush-image-score"),_=e(".sui-summary-smush"),m=e(".smush-final-log .smush-bulk-errors"),g=e(".wp-smush-bo-cancel-bulk"),v=e(".bulk-smush-unlimited"),y=v&&v.querySelector(".smush-dismiss-notice-button"),w=e(".smush-try-wpmudev-free"),b=0,k=[],x=!1,S=function(){if(v){var e=u.remaining_count;a.in_processing&&(e=a.total_items-a.processed_items),e>50?v.classList.remove("sui-hidden"):v.classList.add("sui-hidden")}},C=function(){u=Object.keys(u).reduce((function(e,t){return t in window.wp_smushit_data&&(e[t]="percent_grade"===t?window.wp_smushit_data[t]:parseInt(window.wp_smushit_data[t])||0),e}),{}),S()};return C(),document.addEventListener("wpSmushAfterRecheckImages",(function(){C()})),{hookStatusChecks:function(){var e=this;if(!b){var t=0,s=!1,n=!1;b=setInterval((function(){if(!s){s=!0,t++;var i=e.syncBackgroundStatus();t%3==0&&i.then((function(){n||(e.syncStats().then((function(){n=!1})),n=!0)})),i.finally((function(){s=!1}))}}),3e3)}},resetBOStatsOnStart:function(){a=Object.assign(a,{is_cancelled:!1,is_completed:!1,processed_items:0,failed_items:0})},start:function(){var e=this;this.resetBOStatsOnStart(),this.onStart(),l.handle("start").then((function(t){if(t.success){var s=e.updateStats(t.data,!1);e.showProgressBar(),e.hookStatusChecks(),s&&e.renderStats()}else WP_Smush.helpers.showNotice(t,{showdismiss:!0,autoclose:!1}),e.cancelBulk()}))},initState:function(){var e=this;a.in_processing&&(this.onStart(),l.initState().then((function(t){t.success?(e.updateStats(t.data,!1),e.showProgressBar(),e.hookStatusChecks(),t.data.errors&&!Object.keys(k).length&&(k=Object.assign({},t.data.errors)),e.renderStats()):WP_Smush.helpers.showNotice(t)})))},cancel:function(){var e=this;x=!0,this.setCancelButtonStateToStarted(),l.handle("cancel").then((function(t){t.success?e.cancelBulk():WP_Smush.helpers.showNotice(t)}))},updateProgressBar:function(e,t){var s=Math.floor(e/t*100)||0;p.querySelector(".wp-smush-images-percent").innerHTML=s+"%",p.querySelector(".wp-smush-progress-inner").style.width=s+"%";var n=p.querySelector(".sui-progress-state-text");n.firstElementChild.innerHTML=e,n.lastElementChild.innerHTML=t},hideProgressBar:function(){p.classList.add("sui-hidden"),this.updateProgressBar(0,a.total_items)},showProgressBar:function(){this.updateProgressBar(a.processed_items,a.total_items),p.classList.remove("sui-hidden"),d.querySelector(".wp-smush-bulk-wrapper").classList.add("sui-hidden")},updateStats:function(e,t){e.global_stats=e.global_stats||{},e.errors=e.errors||{};var s=e.global_stats,n=e.errors,i=o(e,r);return!!this.isChangedStats(i)&&(a=Object.assign(a,i),t&&(u=Object.assign(u,s)),k=n,!0)},isChangedStats:function(e){return["total_items","processed_items","failed_items","is_cancelled","is_completed"].some((function(t){return e[t]!==a[t]}))},cancelBulk:function(){var e=this;this.syncStats((function(){100===u.percent_optimized?(a.is_completed=!0,e.onCompletedBulk()):(a.is_cancelled=!0,e.onFinish(),d.querySelector(".wp-smush-bulk-wrapper").classList.remove("sui-hidden")),c.trackBulkSmushCancel(),x=!1}))},showCompletedMessage:function(){var e=d.querySelector(".wp-smush-all-done");if(a.failed_items){var t=wp_smush_msgs.all_failed;this.isFailedAllItems()||(t=wp_smush_msgs.error_in_bulk.replace("{{smushed}}",a.total_items-a.failed_items).replace("{{total}}",a.total_items).replace("{{errors}}",a.failed_items)),e.querySelector("p").innerHTML=t,e.classList.remove("sui-notice-success","sui-notice-warning");var s=this.getNoticeType(),n="warning"===s?"info":"check-tick",i=e.querySelector(".sui-notice-icon");e.classList.add("sui-notice-"+s),i.classList.remove("sui-icon-check-tick","sui-icon-info"),i.classList.add("sui-icon-"+n)}else e.querySelector("p").innerHTML=wp_smush_msgs.all_smushed;e.classList.remove("sui-hidden")},isFailedAllItems:function(){return a.failed_items===a.total_items},getNoticeType:function(){return this.isFailedAllItems()?"warning":"success"},onCompletedBulk:function(){this.onFinish(),d.querySelector(".wp-smush-bulk-wrapper").classList.add("sui-hidden"),this.showCompletedMessage(),this.trackBulkSmushCompleted(),this.updateProgressBar(0,a.total_items)},getFormattedSavingsBytes:function(){return WP_Smush.helpers.formatBytes(u.savings_bytes,1)},trackBulkSmushCompleted:function(){c.trackBulkSmushCompleted(this.getFormattedSavingsBytes(),u.count_images,u.percent_optimized,u.savings_percent)},completeBulk:function(){var e=this;this.syncStats((function(){return e.onCompletedBulk()}))},syncStats:function(){var t=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1};return l.handle("getStats").then((function(n){if(n.success){var i=n.data.errors||{};t.updateStats({global_stats:n.data,errors:i},!0),t.renderStats(),n.data.content&&(e("#wp-smush-bulk-content").innerHTML=n.data.content),s()}else WP_Smush.helpers.showNotice(n)})).catch((function(e){return console.log("error",e)}))},syncBackgroundStatus:function(){var e=this;return l.handle("getStatus").then((function(t){(t.data||{}).in_process_notice&&(p.querySelector("#wp-smush-running-notice .sui-notice-message p").innerHTML=t.data.in_process_notice);t.success?(e.updateStats(t.data,!1)&&(e.updateProgressBar(a.processed_items,a.total_items),a.is_cancelled||a.is_completed||e.renderStats()),a.is_cancelled&&!x?e.cancelBulk():a.is_completed&&e.completeBulk()):WP_Smush.helpers.showNotice(t)}))},onStart:function(){h.classList.remove("sui-hidden"),s.setAttribute("disabled",""),e(".wp-smush-scan").setAttribute("disabled",""),e(".wp-smush-restore").setAttribute("disabled","");var t=e(".wp-smush-upsell-cdn");t&&(t.querySelector("p").innerHTML=wp_smush_msgs.processing_cdn_for_free,t.classList.remove("sui-hidden")),this.setCancelButtonStateToInitial()},onFinish:function(){b&&(clearInterval(b),b=0),h.classList.add("sui-hidden"),s.removeAttribute("disabled"),this.hideProgressBar(),e(".wp-smush-scan").removeAttribute("disabled"),e(".wp-smush-restore").removeAttribute("disabled","");var t=e(".wp-smush-upsell-cdn");t&&(t.querySelector("p").innerHTML=wp_smush_msgs.processed_cdn_for_free,t.classList.remove("sui-hidden"))},renderScoreProgress:function(){f.className=f.className.replace(/(^|\s)sui-grade-\S+/g,""),f.classList.add(u.percent_grade),f.dataset.score=u.percent_optimized,f.querySelector(".sui-circle-score-label").innerHTML=u.percent_optimized,f.querySelector("circle:last-child").setAttribute("style","--metric-array:"+2.63893782902*u.percent_metric+" "+(263.893782902-u.percent_metric))},renderSummaryDetail:function(){var e=this.getFormattedSavingsBytes();_.querySelector(".sui-summary-large.wp-smush-stats-human").innerHTML=Math.round(WP_Smush.helpers.getSizeFromString(e)),_.querySelector(".wp-smush-savings .wp-smush-stats-human").innerHTML=WP_Smush.helpers.getFormatFromString(e),u.size_before&&(_.querySelector(".wp-smush-savings .wp-smush-stats-percent").innerHTML=u.savings_percent),_.querySelector(".wp-smush-count-total .wp-smush-total-optimised").innerHTML=u.count_images,u.count_resize&&(_.querySelector(".wp-smush-count-resize-total").classList.remove("sui-hidden"),_.querySelector(".wp-smush-count-resize-total .wp-smush-total-optimised").innerHTML=u.count_resize),_.querySelector(".smush-resize-savings .wp-smush-stats").innerHTML=WP_Smush.helpers.formatBytes(u.savings_resize,1)},renderBoxSummary:function(){this.renderScoreProgress(),this.renderSummaryDetail()},renderErrors:function(){if(Object.keys(k).length&&a.is_completed){var t=[],s=Object.keys(k),n={};s.map((function(e){var s=k[e].error_code;s in n?s=!1:n[s]=s,t.push(WP_Smush.helpers.prepareBulkSmushErrorRow(k[e].error_msg,k[e].file_link,k[e].thumbnail?'<img class="attachment-thumbnail" src='+k[e].thumbnail+" />":"undefined",e,"media",s))})),m.innerHTML=t.join(""),m.parentElement.classList.remove("sui-hidden"),m.parentElement.style.display=null,s.length>1&&e(".smush-bulk-errors-actions").classList.remove("sui-hidden")}},renderStats:function(){this.renderBoxSummary(),this.renderErrors(),S()},init:function(){s&&(s.onclick=this.start.bind(this),this.initState(),this.setCancelButtonStateToInitial(),y&&(y.onclick=this.dismissBulkUnlimitedNotice.bind(this)),w&&v&&(w.onclick=this.closeFreeModalAndDimissBulkUnlimitedNotice.bind(this)))},setCancelButtonStateToInitial:function(){g.textContent=wp_smush_msgs.cancel,g.onclick=this.cancel.bind(this)},setCancelButtonStateToStarted:function(){g.textContent=wp_smush_msgs.cancelling,g.onclick=function(){return!1}},dismissBulkUnlimitedNotice:function(e){e&&e.preventDefault(),n.Z.common.dismissNotice("bulk-unlimited").then((function(e){e.success&&v.remove()}))},closeFreeModalAndDimissBulkUnlimitedNotice:function(e){var t=e.target.closest(".smush-wpmudev-free-dialog");t&&v&&(t.querySelector(".sui-icon-close").click(),this.dismissBulkUnlimitedNotice())}}}}();s&&s.init()}}()},7447:function(e,t,s){"use strict";s.r(t);var n=s(9576);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.mixPanel=new n.Z,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(),t.mixPanel.track("Bulk Restore Triggered")}))},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 s=this.modal.querySelector(".sui-progress-state-text");s.innerHTML=t>=90?"Finalizing...":e?"Cancelling...":this.currentStep+"/"+this.totalSteps+" images restored"},initScan:function(){var e=this,t=document.getElementById("_wpnonce"),s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=get_image_count",!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onload=function(){if(200===s.status){var t=JSON.parse(s.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 "+s.status)},s.send("_ajax_nonce="+t.value)},step:function(){var e=this,t=this,s=document.getElementById("_wpnonce");if(0<this.items.length){var n=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 s=JSON.parse(i.response);void 0!==s.data.success&&s.data.success?t.success.push(n):t.errors.push({id:n,src:s.data.src,thumb:s.data.thumb,link:s.data.link})}t.updateProgressBar(),t.step()},i.send("item="+n+"&_ajax_nonce="+s.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,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(n){return _.templateSettings=s,(t=t||_.template(document.getElementById(e).innerHTML))(n)}}))},7413:function(e,t,s){"use strict";s.r(t);var n,i=s(9446),r=s(4218);n=jQuery,WP_Smush.bulk={init:function(){n(".wp-smush-all").on("click",(function(e){e.preventDefault();var t=document.getElementById("wp-smush-running-notice");t.classList.add("sui-hidden");var s=n(".wp-smush-bulk-progress-bar-wrapper");if(s.removeClass("wp-smush-exceed-limit"),s.find(".sui-progress-block .wp-smush-all").addClass("sui-hidden"),s.find(".sui-progress-block .wp-smush-cancel-bulk").removeClass("sui-hidden"),t&&document.getElementById("bulk-smush-resume-button").classList.add("sui-hidden"),n(".wp-resmush.wp-smush-action, .wp-smush-scan, .wp-smush-all:not(.sui-progress-close), a.wp-smush-lossy-enable, button.wp-smush-resize-enable, button#save-settings-button").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;n(".wp-smush-remaining").addClass("sui-hidden");var r=n(".wp-smush-upsell-cdn");r.length&&r.show(),s.find(".sui-progress-block i.sui-icon-info").removeClass("sui-icon-info").addClass("sui-loading").addClass("sui-icon-loader"),new i.Z(n(this),!0)})),n("body").on("click",".smush-ignore-image",(function(e){e.preventDefault();var t=n(this);t.prop("disabled",!0),t.attr("data-tooltip"),t.removeClass("sui-tooltip"),n.post(ajaxurl,{action:"ignore_bulk_image",id:t.attr("data-id"),_ajax_nonce:wp_smush_msgs.nonce}).done((function(s){if(t.is("a")&&s.success&&void 0!==s.data.links)if(e.target.closest(".smush-status-links")){var n=t.parent().parent().find(".smush-status");n.text(wp_smush_msgs.ignored),n.addClass("smush-ignored"),e.target.closest(".smush-status-links").innerHTML=s.data.links}else e.target.closest(".smush-bulk-error-row")&&(t.addClass("disabled"),e.target.closest(".smush-bulk-error-row").style.opacity=.5)}))}));var e=document.querySelector(".wp_smush_ignore_all_failed_items");e&&(e.onclick=function(e){e.preventDefault(),e.target.setAttribute("disabled",""),e.target.style.cursor="progress";var t=e.target.dataset.type||null;e.target.classList.remove("sui-tooltip"),r.Z.smush.ignoreAll(t).then((function(t){t.success?window.location.reload():(e.target.style.cursor="pointer",e.target.removeAttribute("disabled"),WP_Smush.helpers.showNotice(t))}))})}},WP_Smush.bulk.init()},2140:function(e,t,s){"use strict";s.r(t);var n,i=s(5445),r=function(e,t){e=parseInt(e),t=parseInt(t);var s=!1,n=0,i=0,r={scan:function(){var s=this,n=e-t;0!==t?o(n).fail(this.showScanError):jQuery.post(ajaxurl,{action:"directory_smush_start",_ajax_nonce:window.wp_smush_msgs.nonce},(function(){return o(n).fail(s.showScanError)})).fail(this.showScanError)},cancel:function(){return s=!0,jQuery.post(ajaxurl,{action:"directory_smush_cancel",_ajax_nonce:window.wp_smush_msgs.nonce})},getProgress:function(){if(s)return 0;var n=e-t;return Math.min(Math.round(100*parseInt(e-n)/e),99)},onFinishStep:function(s){jQuery(".wp-smush-progress-dialog .sui-progress-state-text").html(t-n+"/"+e+" "+window.wp_smush_msgs.progress_smushed),WP_Smush.directory.updateProgressBar(s)},onFinish:function(){WP_Smush.directory.updateProgressBar(100),window.location.href=window.wp_smush_msgs.directory_url+"&scan=done"},showScanError:function(e){var t=jQuery("#wp-smush-progress-dialog");t.addClass("wp-smush-scan-error"),t.find("#smush-scan-error").text("".concat(e.status," ").concat(e.statusText));var s=t.find(".smush-403-error-message");403!==e.status?s.addClass("sui-hidden"):s.removeClass("sui-hidden")},limitReached:function(){var e=jQuery("#wp-smush-progress-dialog");e.find("#cancel-directory-smush").attr("data-tooltip",window.wp_smush_msgs.bulk_resume),e.find(".sui-box-body .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.find(".sui-box-body .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 s(o){return o>=0?(t=e-o,jQuery.post(ajaxurl,{action:"directory_smush_check_step",_ajax_nonce:window.wp_smush_msgs.nonce,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()),s(o).fail(r.showScanError)):void 0!==e.data.error&&"dir_smush_limit_exceeded"===e.data.error?r.limitReached():(n++,t++,o-=1,r.onFinishStep(r.getProgress()),s(o).fail(r.showScanError))}))):jQuery.post(ajaxurl,{action:"directory_smush_finish",_ajax_nonce:window.wp_smush_msgs.nonce,items:e-(n+i),failed:n,skipped:i},(function(e){return r.onFinish(e)}))};return r};n=jQuery,WP_Smush.directory={selected:[],tree:[],wp_smush_msgs:[],triggered:!1,init:function(){var e=this,t=n("#wp-smush-progress-dialog"),s=0,i=0;void 0!==window.wp_smushit_data.dir_smush&&(s=window.wp_smushit_data.dir_smush.totalSteps,i=window.wp_smushit_data.dir_smush.currentScanStep),this.scanner=new r(s,i),this.wp_smush_msgs=window.wp_smush_msgs||{},n("button.wp-smush-browse, a#smush-directory-open-modal").on("click",(function(t){t.preventDefault(),n(t.currentTarget).hasClass("wp-smush-browse")&&(n("div.wp-smush-scan-result div.wp-smush-notice").hide(),n("div.wp-smush-info").remove()),window.SUI.openModal("wp-smush-list-dialog",t.currentTarget,n("#wp-smush-list-dialog .sui-box-header [data-modal-close]")[0],!0),e.initFileTree()})),n("#wp-smush-select-dir").on("click",(function(t){t.preventDefault(),n("div.wp-smush-list-dialog div.sui-box-body").css({opacity:"0.8"}),n("div.wp-smush-list-dialog div.sui-box-body a").off("click");var s=n(this);s.addClass("sui-button-onload");var i=e.tree.getSelectedNodes(),o=[];i.forEach((function(e){o.push(e.key)}));var a={action:"image_list",smush_path:o,image_list_nonce:n('input[name="image_list_nonce"]').val()};n.post(ajaxurl,a,(function(t){t.success?(window.SUI.closeModal(),e.scanner=new r(t.data,0),e.showProgressDialog(t.data),e.scanner.scan()):(s.removeClass("sui-button-onload"),window.SUI.openNotice("wp-smush-ajax-notice",t.data.message,{type:"warning"}))}))})),t.on("click","#cancel-directory-smush, #dialog-close-div, .wp-smush-cancel-dir",(function(t){t.preventDefault(),n(".wp-smush-cancel-dir").addClass("sui-button-onload"),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()}));var o=window.location.search;new URLSearchParams(o).has("start")&&!this.triggered&&(this.triggered=!0,n("button.wp-smush-browse").trigger("click"))},initFileTree:function(){var e=this,t=n("button#wp-smush-select-dir"),s={type:"GET",url:ajaxurl,data:{action:"smush_get_directory_list",list_nonce:n('input[name="list_nonce"]').val()},cache:!1};Object.entries(e.tree).length>0||(e.tree=(0,i.createTree)(".wp-smush-list-dialog .content",{autoCollapse:!0,clickFolderMode:3,checkbox:!0,debugLevel:0,selectMode:3,tabindex:"0",keyboard:!0,quicksearch:!0,source:s,lazyLoad:function(e,t){t.result=new Promise((function(e,i){s.data.dir=t.node.key,n.ajax(s).done((function(t){return e(t)})).fail(i)}))},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){n(".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),n(".sui-progress-block .sui-progress-text span").text(e+"%"),n(".sui-progress-block .sui-progress-bar span").width(e+"%"),e>=90&&n(".sui-progress-state .sui-progress-state-text").text("Finalizing..."),t&&n(".sui-progress-state .sui-progress-state-text").text("Cancelling...")}},WP_Smush.directory.init()},3065:function(){function e(t){return e="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(t)}!function(){"use strict";WP_Smush.helpers={init:function(){},formatBytes:function(e,t){var s=1024,n=["KB","MB","GB","TB","PB"];if(Math.abs(e)<s)return e+" B";var i=-1;do{e/=s,++i}while(Math.abs(e)>=s&&i<n.length-1);return e.toFixed(t)+" "+n[i]},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 s=e>=0?1:-1;return e=e>100?100:e,Math.round(e*Math.pow(10,t)+.001*s)/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 s=document.querySelector(".sui-button-onload");s&&s.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)},prepareBulkSmushErrorRow:function(e,t,s,n,i,r){var o=void 0===s?'<i class="sui-icon-photo-picture" aria-hidden="true"></i>':s,a=window.wp_smush_msgs.edit_link.replace("{{id}}",n),u='<div class="smush-bulk-error-row"><div class="smush-bulk-image-data"><div class="smush-bulk-image-title">'+o+'<span class="smush-image-name">'+("undefined"===t||void 0===t?"undefined":t)+'</span></div><div class="smush-image-error">'+e+"</div></div>";return"media"===i&&(u=u+'<div class="smush-bulk-image-actions"><a href="javascript:void(0)" class="sui-tooltip sui-tooltip-constrained sui-tooltip-left smush-ignore-image" data-tooltip="'+window.wp_smush_msgs.error_ignore+'" data-id="'+n+'">'+window.wp_smush_msgs.btn_ignore+'</a><a class="smush-link-detail" href="'+a+'">'+window.wp_smush_msgs.view_detail+"</a></div>"),u+="</div>",u+=WP_Smush.helpers.upsellWithError(r)},upsellWithError:function(e){return e&&window.wp_smush_msgs["error_"+e]?'<div class="smush-bulk-error-row smush-error-upsell"><div class="smush-bulk-image-title"><span class="smush-image-error">'+window.wp_smush_msgs["error_"+e]+"</span></div></div>":""},getErrorMessage:function(e){return e.message||e.data&&e.data.message||e.responseJSON&&e.responseJSON.data&&e.responseJSON.data.message||window.wp_smush_msgs.generic_ajax_error||e.status&&"Request failed. Returned status of "+e.status},showNotice:function(t,s){var n;if(n="object"===e(t)?this.getErrorMessage(t):t){s=s||{},s={type:(s=Object.assign({showdismiss:!1,autoclose:!0},s)).type||"error",icon:s.icon||("success"===s.type?"check-tick":"info"),dismiss:{show:s.showdismiss,label:window.wp_smush_msgs.noticeDismiss,tooltip:window.wp_smush_msgs.noticeDismissTooltip},autoclose:{show:s.autoclose}};var i="<p>".concat(n,"</p>");return SUI.openNotice("wp-smush-ajax-notice",i,s),Promise.resolve("#wp-smush-ajax-notice")}}},WP_Smush.helpers.init()}()},206:function(){!function(e){"use strict";var t=e("#wp-smush-s3support-alert");if(t.length){var s={type:"warning",icon:"info",dismiss:{show:!0,label:wp_smush_msgs.noticeDismiss,tooltip:wp_smush_msgs.noticeDismissTooltip}};window.SUI.openNotice("wp-smush-s3support-alert",t.data("message"),s)}function n(t){var s=e(t.currentTarget).closest(".smush-notice");s.fadeTo(100,0,(function(){return s.slideUp(100,(function(){return s.remove()}))}))}t.on("click","button",(function(){e.post(ajaxurl,{action:"dismiss_s3support_alert",_ajax_nonce:window.wp_smush_msgs.nonce})})),e("#wp-smush-api-message button.sui-button-icon").on("click",(function(t){t.preventDefault();var s=e("#wp-smush-api-message");s.slideUp("slow",(function(){s.remove()})),e.post(ajaxurl,{action:"hide_api_message",_ajax_nonce:window.wp_smush_msgs.nonce})})),e(".smush-notice .smush-notice-act").on("click",(function(e){n(e)})),e(".wp-smush-update-info").on("click",".notice-dismiss",(function(t){t.preventDefault(),n(t),e.post(ajaxurl,{action:"dismiss_update_info",_ajax_nonce:window.wp_smush_msgs.nonce})}))}(jQuery)},3579:function(){!function(){"use strict";WP_Smush.onboarding={membership:"free",onboardingModal:document.getElementById("smush-onboarding-dialog"),scanFilesModal:document.getElementById("checking-files-dialog"),first_slide:"usage",settings:{first:!0,last:!1,slide:"usage",value:!1},selection:{usage:!1,auto:!0,lossy:!0,strip_exif:!0,original:!1,lazy_load:!0},contentContainer:document.getElementById("smush-onboarding-content"),onboardingSlides:["usage","auto","lossy","strip_exif","original","lazy_load"],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=["usage","auto","lossy","strip_exif","lazy_load"]),"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,s=e.touches[0].clientY,n=this.touchX-t,i=this.touchY-s;Math.abs(n)>Math.abs(i)&&(n>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",s=this.onboardingModal.querySelector('input[type="checkbox"]');s&&(this.selection[s.id]=s.checked);var n=WP_Smush.onboarding.template("smush-onboarding"),i=n(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 s=t.onboardingModal.querySelector('input[type="checkbox"]');s&&(t.selection[s.id]=s.checked);var n=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="+n.value)}))},next:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=this.onboardingSlides.indexOf(this.settings.slide),n=0;n=t?"next"===t?s+1:s-1:null!==e&&e.classList.contains("next")?s+1:s-1;var i=null!==e&&e.classList.contains("next")?"fadeInRight":"fadeInLeft";this.settings={first:0===n,last:n+1===this.onboardingSlides.length,slide:this.onboardingSlides[n],value:this.selection[this.onboardingSlides[n]]},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(){if(window.SUI.closeModal(),!(window.location.search.indexOf("page=smush-bulk")>-1)){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),200===t.status?setTimeout((function(){window.location.search="page=smush-bulk"}),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&_ajax_nonce="+window.wp_smush_msgs.nonce),e.onload=function(){200===e.status?window.SUI.closeModal("smush-updated-dialog"):window.console.log("Request failed.  Returned status of "+e.status)},e.send()}},WP_Smush.onboarding.template=_.memoize((function(e){var t,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(n){return _.templateSettings=s,t=t||_.template(document.getElementById(e).innerHTML),n.first_slide=WP_Smush.onboarding.first_slide,t(n)}})),window.addEventListener("load",(function(){return WP_Smush.onboarding.init()}))}()},1110:function(){!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.preventDefault(),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"),s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=smush_toggle_cdn",!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onload=function(){if(200===s.status){var e=JSON.parse(s.response);void 0!==e.success&&e.success?window.location.search="page=smush-cdn":void 0!==e.data.message&&WP_Smush.helpers.showErrorNotice(e.data.message)}else WP_Smush.helpers.showErrorNotice("Request failed.  Returned status of "+s.status)},s.send("param="+e+"&_ajax_nonce="+t[0].value)},updateStatsBox:function(){var e=this;if(void 0!==this.cdnStatsBox&&this.cdnStatsBox&&window.location.search.includes("page=smush-cdn")){this.toggleElements();var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=get_cdn_stats",!0),t.onload=function(){if(200===t.status){var s=JSON.parse(t.response);void 0!==s.success&&s.success?e.toggleElements():void 0!==s.data.message&&WP_Smush.helpers.showErrorNotice(s.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)"),s=0;s<t.length;s++)t[s].classList.toggle("sui-hidden");e.classList.toggle("sui-hidden")}},WP_Smush.CDN.init()}()},5972:function(){!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.preventDefault(),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 s=document.getElementById("smush-remove-spinner");s&&s.addEventListener("click",(function(t){t.preventDefault(),e.removeLoaderIcon()}));var n=document.getElementById("smush-remove-placeholder");n&&n.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 s=document.getElementById("placeholder-icon-2");s&&s.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"),s=new XMLHttpRequest;s.open("POST",ajaxurl+"?action=smush_toggle_lazy_load",!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onload=function(){if(200===s.status){var e=JSON.parse(s.response);void 0!==e.success&&e.success?window.location.search="page=smush-lazy-load":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 "+s.status),document.querySelector(".sui-button-onload").classList.remove("sui-button-onload")},s.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 s=e.state().get("selection").first().toJSON(),n=document.getElementById("smush-"+t+"-icon-preview");n.style.backgroundImage='url("'+s.url+'")',n.style.display="block",document.getElementById("smush-"+t+"-icon-file").setAttribute("value",s.id),document.getElementById("smush-upload-"+t).style.display="none";var i=document.getElementById("smush-remove-"+t);i.querySelector("span").innerHTML=s.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",s=document.getElementsByName("wp_smush_options_nonce"),n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_remove_icon",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send("id="+e+"&type="+t+"&_ajax_nonce="+s[0].value)}},WP_Smush.Lazyload.init()}()},4933:function(){!function(e){"use strict";function t(t,s){var n=new XMLHttpRequest;n.open("POST",ajaxurl+"?action=smush_save_settings",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.onload=function(){if(e("#save-settings-button").removeClass("sui-button-onload-text sui-button-onload"),200===n.status){var t=JSON.parse(n.response);void 0!==t.success&&t.success?function(e){var t="<p>".concat(e,"</p>"),s={type:"success",icon:"check"};SUI.openNotice("wp-smush-ajax-notice",t,s);var n=document.querySelector(".sui-button-onload");n&&n.classList.remove("sui-button-onload")}(wp_smush_msgs.settingsUpdated):t.data&&t.data.message?WP_Smush.helpers.showErrorNotice(t.data.message):WP_Smush.helpers.showErrorNotice("Request failed.")}else WP_Smush.helpers.showErrorNotice("Request failed. Returned status of "+n.status)},n.send("page="+s+"&"+t+"&_ajax_nonce="+wp_smush_msgs.nonce)}e("form#smush-bulk-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload"),t(e(this).serialize(),"bulk"),function(){e("#save-settings-button").addClass("sui-button-onload");var t={action:"scan_for_resmush",wp_smush_options_nonce:e("#wp_smush_options_nonce").val(),type:"media"};e.post(ajaxurl,e.param(t)).done((function(){e("#save-settings-button").removeClass("sui-button-onload")}))}()})),e("form#smush-lazy-load-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"lazy-load")})),e("form#smush-cdn-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"cdn")})),e("form#smush-integrations-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"integrations")})),e("form#smush-settings-form").on("submit",(function(s){s.preventDefault(),e("#save-settings-button").addClass("sui-button-onload-text"),t(e(this).serialize(),"settings")})),e("input[name=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("input#detection").on("click",(function(){var t=e(".smush-highlighting-notice"),s=e(".smush-highlighting-warning");e(this).is(":checked")?t.length>0?t.show():s.show():(t.hide(),s.hide())}))}(jQuery)},9446:function(e,t,s){"use strict";var n=s(9576);function i(e){return i="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},i(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var s=0;s<t.length;s++){var n=t[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=0,u=function(){function e(t,s){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"media";r(this,e),this.errors=[];var a=jQuery(".bulk-smush-wrapper .sui-progress-state-text");return this.smushed=parseInt(a.find("span:first-child").html()),this.total=parseInt(a.find("span:last-child").html()),this.skip_resmush=!(void 0===t.data("smush")||!t.data("smush")),this.button=jQuery(t[0]),this.is_bulk=!!i(s)&&s,this.url=ajaxurl,this.log=jQuery(".smush-final-log"),this.deferred=jQuery.Deferred(),this.deferred.errors=[],this.setIds(),this.mixPanel=new n.Z,this.is_bulk_resmush=0<wp_smushit_data.resmush.length&&!this.skip_resmush,this.status=this.button.parent().prev(".smush-status"),this.smush_type=o,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,s,u;return t=e,s=[{key:"setIds",value:function(){var e=[];"object"===i(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,s){return t===s.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(".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#save-settings-button").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(s){if(void 0!==s.data){var n=t.status.parent();e.membershipValidity(s.data),s.success?n.html(s.data):s.data.html_stats?n.html(s.data.html_stats):(t.status.addClass("smush-warning"),t.status.html(s.data.error_msg),t.button.html(window.smush_vars.strings.stats_label)),e.updateImageStats(s.data.new_size)}t.enableButton()})).fail((function(e){t.status.html(e.data),t.status.addClass("smush-warning"),t.enableButton()}))}}},{key:"syncStats",value:function(){var t=jQuery("div.wp-smush-bulk-progress-bar-wrapper div.wp-smush-count.tc"),s=t.html();return t.html(window.wp_smush_msgs.sync_stats),jQuery.ajax({type:"GET",url:this.url,data:{action:"get_stats",_ajax_nonce:window.wp_smush_msgs.nonce},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_skipped:t.count_skipped,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(s)}))}},{key:"bulkDone",value:function(){if(this.is_bulk){this.enableButton();var e=document.querySelector(".wp-smush-upsell-cdn");if(e&&(e.querySelector("p").innerHTML=wp_smush_msgs.processed_cdn_for_free,e.classList.remove("sui-hidden")),0===this.ids.length)jQuery(".bulk-smush-wrapper .wp-smush-all-done").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden"),jQuery(".wp-smush-bulk-progress-bar-wrapper").addClass("sui-hidden"),this._updateProgress(0,0);else{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:"updateProgress",value:function(t){if(this.is_bulk_resmush||this.is_bulk){var s=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").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&&(s=(this.smushed+this.errors.length)/this.total*100)):s=(this.smushed+this.errors.length)/this.total*100,"nextgen"===this.smush_type&&wp_smushit_data.resmush.length>0&&this.smushed+this.errors.length<=1&&(wp_smushit_data.count_images-=wp_smushit_data.resmush.length+1),0===this.ids.length&&("nextgen"!==this.smush_type&&this.syncStats(),jQuery(".bulk-smush-wrapper .wp-smush-all-done").removeClass("sui-hidden"),jQuery(".wp-smush-bulk-wrapper").addClass("sui-hidden")),this._updateProgress(this.smushed+this.errors.length,WP_Smush.helpers.precise_round(s,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(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0!==a&&void 0!==a&&10>performance.now()-a)return this.deferred;var s=window.wp_smush_msgs.nonce;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.length>0&&(s=n.val());var i=this;return this.request=e.ajax(this.is_bulk_resmush,this.current_id,this.url,s,t).done((function(t){if(void 0===t.success||void 0!==t.success&&!1===t.success&&void 0!==t.data&&"limit_exceeded"!==t.data.error){i.errors.push(i.current_id);var s=WP_Smush.helpers.prepareBulkSmushErrorRow(t.data.error_message,t.data.file_name,t.data.thumbnail,i.current_id,i.smush_type,t.data.error);i.log.show(),i.log.find(".smush-bulk-errors").append(s),i.errors.length>4&&(i.log.find(".smush-bulk-errors").addClass("overflow-box"),jQuery(".smush-bulk-errors-actions").removeClass("sui-hidden"))}else void 0!==t.success&&t.success&&i.smushed++;if(e.membershipValidity(t.data),void 0!==t.data&&"limit_exceeded"===t.data.error&&"resolved"!==i.deferred.state()?(document.getElementById("wp-smush-running-notice").classList.add("sui-hidden"),i.button.attr("continue_smush",!1),wp_smushit_data.unsmushed.unshift(i.current_id),i.ids.unshift(i.current_id),a=performance.now()):i.is_bulk&&(i.updateProgress(t),e.updateScoreProgress()),0===i.ids.length&&this.is_bulk){var n=i.is_bulk?function(){return i.trackBulkSmushCompleted()}:function(){return!1};i.syncStats().done(n)}i.singleDone()})).always((function(){i.continue()&&i.is_bulk?i.callAjax(!1):i.deferred.resolve()})),this.deferred.errors=this.errors,this.deferred}},{key:"getPercentOptimized",value:function(e,t){return e===t||e<=0?100:Math.floor(100*(e-t)/e)}},{key:"trackBulkSmushCompleted",value:function(){var t=(0,WP_Smush.helpers.formatBytes)(wp_smushit_data.savings_bytes,0),s=wp_smushit_data.count_images,n=this.getPercentOptimized(e.getTotalImagesToSmush(),parseInt(wp_smushit_data.count_total)),i=wp_smushit_data.savings_percent;this.mixPanel.trackBulkSmushCompleted(t,s,n,i)}},{key:"run",value:function(){this.is_bulk&&this.ids.length>0&&this.callAjax(!0),this.is_bulk||this.callAjax()}},{key:"bindDeferredEvents",value:function(){var e=this;this.deferred.done((function(){if(e.button.removeAttr("continue_smush"),e.errors.length){var t=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"),e.mixPanel.trackBulkSmushCancel()}))}}],u=[{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,s,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=jQuery.param({is_bulk_resmush:e,attachment_id:t,_nonce:n,new_bulk_smush_started:i});return jQuery.ajax({type:"GET",data:r,url:s,timeout:wp_smushit_data.timeout,dataType:"json"})}},{key:"getTotalImagesToSmush",value:function(){var e=wp_smushit_data.resmush.length,t=wp_smushit_data.count_total-wp_smushit_data.count_smushed;return t>0?e+t:e}},{key:"updateScoreProgress",value:function(){var t="sui-grade-dismissed",s=0,n=0,i=e.getTotalImagesToSmush(),r=parseInt(wp_smushit_data.count_total);r===i?(r>0&&(t="sui-grade-f"),n=100):0<r&&(n=s=Math.floor(100*(r-i)/r),t="sui-grade-f",s>=60&&s<90?t="sui-grade-c":s>=90&&(t="sui-grade-a"));var o=jQuery("#smush-image-score");o.removeClass((function(e,t){return(t.match(/(^|\s)sui-grade-\S+/g)||[]).join(" ")})).addClass(t).attr("data-score",s).find(".sui-circle-score-label").html(s),o.find("circle:last-child").attr("style","--metric-array:"+2.63893782902*n+" "+(263.893782902-n))}},{key:"updateStats",value:function(e){var t=void 0!==e&&"nextgen"===e;wp_smushit_data.savings_bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after);var s=WP_Smush.helpers.formatBytes(wp_smushit_data.savings_bytes,0),n=jQuery(".wp-smush-savings .wp-smush-stats-human");t?n.html(s):(n.html(WP_Smush.helpers.getFormatFromString(s)),jQuery(".sui-summary-large.wp-smush-stats-human").html(WP_Smush.helpers.getSizeFromString(s))),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),t?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),wp_smushit_data.count_resize>0&&(jQuery("span.smushed-items-count span.wp-smush-count-resize-total").removeClass("sui-hidden"),jQuery("span.smushed-items-count span.wp-smush-count-resize-total span.wp-smush-total-optimised").html(wp_smushit_data.count_resize));var i=jQuery("li.super-smush-attachments .smushed-count");i.length&&void 0!==wp_smushit_data.count_supersmushed&&i.html(wp_smushit_data.count_supersmushed);var r=jQuery(".smush-conversion-savings");if(r.length>0&&void 0!==wp_smushit_data.savings_conversion&&""!==wp_smushit_data.savings_conversion){var o=r.find(".wp-smush-stats");o.length>0&&o.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_conversion,1))}var a=jQuery(".smush-resize-savings");if(a.length>0&&void 0!==wp_smushit_data.savings_resize&&""!==wp_smushit_data.savings_resize){var u=parseInt(wp_smushit_data.savings_resize),c=a.find(".wp-smush-stats"),l=a.find(".wp-smush-stats-label-message");u>0&&c.length>0&&(l.length>0&&l.hide(),c.html(WP_Smush.helpers.formatBytes(wp_smushit_data.savings_resize,1)))}}},{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 s=t.contents().filter((function(){return 1===this.nodeType})).text();t.html("<strong>"+s+"</strong> "+e)}}}},{key:"updateLocalizedStats",value:function(e,t){void 0!==window.wp_smushit_data&&("media"===t?(wp_smushit_data.count_smushed=parseInt(wp_smushit_data.count_smushed)+1,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_smushed=parseInt(wp_smushit_data.count_smushed)+1,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,s,n,i){var r='<div class="smush-bulk-error-row"><div class="smush-bulk-image-data">'+(void 0===s?'<i class="sui-icon-photo-picture" aria-hidden="true"></i>':s)+'<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-left smush-ignore-image" data-tooltip="'+window.wp_smush_msgs.error_ignore+'" data-id="'+n+'"><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 s=wp_smushit_data.resmush.indexOf(e);s>-1&&wp_smushit_data.resmush.splice(s,1)}}}],s&&o(t.prototype,s),u&&o(t,u),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Z=u},1442:function(){!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"),showWizardButton:document.getElementById("smush-webp-toggle-wizard"),init:function(){var e=this;this.maybeShowDeleteAllSuccessNotice(),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.showWizardButton&&this.showWizardButton.addEventListener("click",this.toggleWizard)},toggleWebp:function(e){var t=this;e.preventDefault();var s=e.currentTarget,n="enable"===s.dataset.action;s.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(){window.location.href=window.wp_smush_msgs.localWebpURL};else void 0!==e.data.message&&(t.showNotice(e.data.message),s.classList.remove("sui-button-onload"))}else{var n=window.wp_smush_msgs.generic_ajax_error;e&&void 0!==e.data.message&&(n=e.data.message),t.showNotice(n),s.classList.remove("sui-button-onload")}},i.send("param="+n+"&_ajax_nonce="+this.nonceField[0].value)},recheckStatus:function(){var e=this;this.recheckStatusButton.classList.add("sui-button-onload");var t=new XMLHttpRequest;t.open("POST",ajaxurl+"?action=smush_webp_get_status",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.onload=function(){e.recheckStatusButton.classList.remove("sui-button-onload");var s=!1,n=JSON.parse(t.response);200===t.status?(n.success?"1":"0")!==e.recheckStatusButton.dataset.isConfigured&&location.reload():s=window.wp_smush_msgs.generic_ajax_error;n&&n.data&&(s=n.data),s&&e.showNotice(s)},t.send("_ajax_nonce="+window.wp_smush_msgs.webp_nonce)},deleteAll:function(e){var t=this,s=e.currentTarget;s.classList.add("sui-button-onload");var n=!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+"&notice=webp-deleted"}:n=window.wp_smush_msgs.generic_ajax_error:n=window.wp_smush_msgs.generic_ajax_error;if(e&&e.data&&e.data.message&&(n=e.data.message),n){s.classList.remove("sui-button-onload");var r='<p style="text-align: left;">'.concat(n,"</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)},toggleWizard:function(e){e.currentTarget.classList.add("sui-button-onload");var t=new XMLHttpRequest;t.open("GET",ajaxurl+"?action=smush_toggle_webp_wizard&_ajax_nonce="+window.wp_smush_msgs.webp_nonce,!0),t.onload=function(){return location.reload()},t.send()},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 s="<p>".concat(e,"</p>"),n={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",s,n)}},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}})}}},WP_Smush.WebP.init()}()},4218:function(e,t,s){"use strict";var n=s(8583),i=s.n(n);function r(e){return r="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},r(e)}var o=new function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"POST",n={url:ajaxurl,method:s,cache:!1};return t instanceof FormData?(t.append("action",e),t.append("_ajax_nonce",window.wp_smush_msgs.nonce),n.contentType=!1,n.processData=!1):(t._ajax_nonce=t._ajax_nonce||window.wp_smush_msgs.nonce,t.action=e),n.data=t,new Promise((function(e,t){jQuery.ajax(n).done(e).fail(t)})).then((function(e){return"object"!==r(e)&&(e=JSON.parse(e)),e})).catch((function(e){console.error("Error:",e)}))}var t={background:{start:function(){return e("bulk_smush_start")},cancel:function(){return e("bulk_smush_cancel")},initState:function(){return e("bulk_smush_get_status")},getStatus:function(){return e("bulk_smush_get_status")},getStats:function(){return e("bulk_smush_get_global_stats")}},smush:{syncStats:function(t){return e("get_stats",t=t||{})},ignoreAll:function(t){return e("wp_smush_ignore_all_failed_items",{type:t})}},common:{dismissNotice:function(t){return e("smush_dismiss_notice",{key:t})},hideModal:function(t){return e("hide_modal",{modal_id:t})},request:function(t){return t.action&&e(t.action,t)}}};i()(this,t)};t.Z=o},5445:function(e,t,s){var n,i,r;i=[s(5311),s(3860)],n=function(e){"use strict";if(!e.ui||!e.ui.fancytree){var t,s,n=null,i=new RegExp(/\.|\//),r=/[&<>"'/]/g,o=/[<>"'/]/g,a="$recursive_request",u="$request_target_invalid",c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},l={16:!0,17:!0,18:!0},d={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:"'"},h={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},p={0:"",1:"left",2:"middle",3:"right"},f="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),_={},m="columns types".split(" "),g="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),v={},y={},w={active:!0,children:!0,data:!0,focus:!0};for(t=0;t<f.length;t++)_[f[t]]=!0;for(t=0;t<g.length;t++)s=g[t],v[s]=!0,s!==s.toLowerCase()&&(y[s.toLowerCase()]=s);var b=Array.isArray;return k(e.ui,"Fancytree requires jQuery UI (http://jqueryui.com)"),Date.now||(Date.now=function(){return(new Date).getTime()}),M.prototype={_findDirectChild:function(e){var t,s,n=this.children;if(n)if("string"==typeof e){for(t=0,s=n.length;t<s;t++)if(n[t].key===e)return n[t]}else{if("number"==typeof e)return this.children[e];if(e.parent===this)return e}return null},_setChildren:function(e){k(e&&(!this.children||0===this.children.length),"only init supported"),this.children=[];for(var t=0,s=e.length;t<s;t++)this.children.push(new M(this,e[t]));this.tree._callHook("treeStructureChanged",this.tree,"setChildren")},addChildren:function(t,s){var n,i,r,o=this.getFirstChild(),a=this.getLastChild(),u=null,c=[];for(e.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),n=0,i=t.length;n<i;n++)c.push(new M(this,t[n]));if(u=c[0],null==s?this.children=this.children.concat(c):(s=this._findDirectChild(s),k((r=e.inArray(s,this.children))>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[r,0].concat(c))),o&&!s){for(n=0,i=c.length;n<i;n++)c[n].render();o!==this.getFirstChild()&&o.renderStatus(),a!==this.getLastChild()&&a.renderStatus()}else(!this.parent||this.parent.ul||this.tr)&&this.render();return 3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),this.triggerModifyChild("add",1===c.length?c[0]:null),u},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 s=this.children?this.children[0]:null;return this.addChildren(e,s);case"child":case"over":return this.addChildren(e)}k(!1,"Invalid mode: "+t)},addPagingNode:function(t,s){var n,i;if(s=s||"child",!1!==t)return t=e.extend({title:this.tree.options.strings.moreData,statusNodeType:"paging",icon:!1},t),this.partload=!0,this.addNode(t,s);for(n=this.children.length-1;n>=0;n--)"paging"===(i=this.children[n]).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(e){if(null===e)return this.remove(),q(this);var t,s,n={children:!0,expanded:!0,parent:!0};for(t in e)x(e,t)&&(s=e[t],n[t]||S(s)||(v[t]?this[t]=s:this.data[t]=s));return x(e,"children")&&(this.removeChildren(),e.children&&this._setChildren(e.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),x(e,"expanded")?this.setExpanded(e.expanded):q(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,s){return e.addNode(this.toDict(!0,s),t)},countChildren:function(e){var t,s,n,i=this.children;if(!i)return 0;if(n=i.length,!1!==e)for(t=0,s=n;t<s;t++)n+=i[t].countChildren();return n},debug:function(e){this.tree.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),E("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()),E("error",arguments))},findAll:function(e){e=S(e)?e:A(e);var t=[];return this.visit((function(s){e(s)&&t.push(s)})),t},findFirst:function(e){e=S(e)?e:A(e);var t=null;return this.visit((function(s){if(e(s))return t=s,!1})),t},findRelatedNode:function(e,t){return this.tree.findRelatedNode(this,e,t)},_changeSelectStatusAttrs:function(e){var t=!1,s=this.tree.options,i=n.evalOption("unselectable",this,this,s,!1),r=n.evalOption("unselectableStatus",this,this,s,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:k(!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;function s(e){var i,r,o,a,u,c,l,d,h=e.children;if(h&&h.length){for(c=!0,l=!1,i=0,r=h.length;i<r;i++)a=s(o=h[i]),n.evalOption("unselectableIgnore",o,o,t,!1)||(!1!==a&&(l=!0),!0!==a&&(c=!1));u=!!c||!!l&&void 0}else u=null==(d=n.evalOption("unselectableStatus",e,e,t,void 0))?!!e.selected:!!d;return e.partsel&&!e.selected&&e.lazy&&null==e.children&&(u=void 0),e._changeSelectStatusAttrs(u),u}k(3===t.selectMode,"expected selectMode 3"),s(this),this.visitParents((function(e){var s,i,r,o,a,u=e.children,c=!0,l=!1;for(s=0,i=u.length;s<i;s++)r=u[s],n.evalOption("unselectableIgnore",r,r,t,!1)||(((o=null==(a=n.evalOption("unselectableStatus",r,r,t,void 0))?!!r.selected:!!a)||r.partsel)&&(l=!0),o||(c=!1));o=!!c||!!l&&void 0,e._changeSelectStatusAttrs(o)}))},fromDict:function(t){for(var s in t)v[s]?this[s]=t[s]:"data"===s?e.extend(this.data,t.data):S(t[s])||w[s]||(this.data[s]=t[s]);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,s){t=t||".";var n,i=[];return e.each(this.getParentList(!1,!0),(function(e,t){n=""+(t.getIndex()+1),s&&(n=("0000000"+n).substr(-s)),i.push(n)})),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,s=this.parent.children;for(e=0,t=s.length-1;e<t;e++)if(s[e]===this)return s[e+1]}return null},getParent:function(){return this.parent},getParentList:function(e,t){for(var s=[],n=t?this:this.parent;n;)(e||n.parent)&&s.unshift(n),n=n.parent;return s},getPath:function(e,t,s){e=!1!==e,s=s||"/";var n,i=[],r=S(t=t||"title");return this.visitParents((function(e){e.parent&&(n=r?t(e):e[t],i.unshift(n))}),e),i.join(s)},getPrevSibling:function(){if(this.parent){var e,t,s=this.parent.children;for(e=1,t=s.length;e<t;e++)if(s[e]===this)return s[e-1]}return null},getSelectedNodes:function(e){var t=[];return this.visit((function(s){if(s.selected&&(t.push(s),!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()),E("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 s=this.parent;s;){if(s===t)return!0;s===s.parent&&e.error("Recursive parent link: "+s),s=s.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,s=this.tree.enableFilter,n=this.getParentList(!1,!1);if(s&&!this.match&&!this.subMatchCount)return!1;for(e=0,t=n.length;e<t;e++)if(!n[e].expanded)return!1;return!0},lazyLoad:function(t){e.error("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead.")},load:function(e){var t,s,n=this,i=this.isExpanded();return k(this.isLazy(),"load() requires a lazy node"),e||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),!1===(s=this.tree._triggerNodeEvent("lazyLoad",this))?q(this):(k("boolean"!=typeof s,"lazyLoad event must return source in data.result"),t=this.tree._callHook("nodeLoadChildren",this,s),i?(this.expanded=!0,t.always((function(){n.render()}))):t.always((function(){n.renderStatus()})),t)):q(this)},makeVisible:function(t){var s,n=this,i=[],r=new e.Deferred,o=this.getParentList(!1,!1),a=o.length,u=!(t&&!0===t.noAnimation),c=!(t&&!1===t.scrollIntoView);for(s=a-1;s>=0;s--)i.push(o[s].setExpanded(!0,t));return e.when.apply(e,i).done((function(){c?n.scrollIntoView(u).done((function(){r.resolve()})):r.resolve()})),r.promise()},moveTo:function(t,s,n){void 0===s||"over"===s?s="child":"firstChild"===s&&(t.children&&t.children.length?(s="before",t=t.children[0]):s="child");var i,r=this.tree,o=this.parent,a="child"===s?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 k((i=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(i,1);if(this.parent=a,a.hasChildren())switch(s){case"child":a.children.push(this);break;case"before":k((i=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(i,0,this);break;case"after":k((i=e.inArray(t,a.children))>=0,"invalid target parent"),a.children.splice(i+1,0,this);break;default:e.error("Invalid mode "+s)}else a.children=[this];n&&t.visit(n,!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,s){var n,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(n=this.findRelatedNode(t)){try{n.makeVisible({scrollIntoView:!1})}catch(e){}return!1===s?(n.setFocus(),q()):n.setActive()}return this.warn("Could not find related node '"+t+"'."),q()},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(s){var n,i=this.parent,r=e.inArray(this,i.children),o=this;return k(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(n=this.tree._callHook("nodeLoadChildren",this,s)).done((function(e){var s=o.children;for(t=0;t<s.length;t++)s[t].parent=i;i.children.splice.apply(i.children,[r+1,0].concat(s)),o.children=null,o.remove(),i.render()})).fail((function(){o.setExpanded()})),n},resetLazy:function(){this.removeChildren(),this.expanded=!1,this.lazy=!0,this.children=void 0,this.renderStatus()},scheduleAction:function(t,s){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.debug("clearTimeout(%o)",this.tree.timer)),this.tree.timer=null;var n=this;switch(t){case"cancel":break;case"expand":this.tree.timer=setTimeout((function(){n.tree.debug("setTimeout: trigger expand"),n.setExpanded(!0)}),s);break;case"activate":this.tree.timer=setTimeout((function(){n.tree.debug("setTimeout: trigger activate"),n.setActive(!0)}),s);break;default:e.error("Invalid mode "+t)}},scrollIntoView:function(t,s){if(void 0!==s&&N(s))throw Error("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead.");var n=e.extend({effects:!0===t?{duration:200,queue:!1}:t,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent,topNode:null},s),i=n.scrollParent,r=this.tree.$container,o=r.css("overflow-y");i?i.jquery||(i=e(i)):i=this.tree.tbody?r.scrollParent():"scroll"===o||"auto"===o?r:r.scrollParent(),i[0]!==document&&i[0]!==document.body||(this.debug("scrollIntoView(): normalizing scrollParent to 'window':",i[0]),i=e(window));var a,u,c,l=new e.Deferred,d=this,h=e(this.span).height(),p=n.scrollOfs.top||0,f=n.scrollOfs.bottom||0,_=i.height(),m=i.scrollTop(),g=i,v=i[0]===window,y=n.topNode||null,w=null;return this.isRootNode()||!this.isVisible()?(this.info("scrollIntoView(): node is invisible."),q()):(v?(u=e(this.span).offset().top,a=y&&y.span?e(y.span).offset().top:0,g=e("html,body")):(k(i[0]!==document&&i[0]!==document.body,"scrollParent should be a simple element or `window`, not document or body."),c=i.offset().top,u=e(this.span).offset().top-c+m,a=y?e(y.span).offset().top-c+m:0,_-=Math.max(0,i.innerHeight()-i[0].clientHeight)),u<m+p?w=u-p:u+h>m+_-f&&(w=u+h-_+f,y&&(k(y.isRootNode()||y.isVisible(),"topNode must be visible"),a<w&&(w=a-p))),null===w?l.resolveWith(this):n.effects?(n.effects.complete=function(){l.resolveWith(d)},g.stop(!0).animate({scrollTop:w},n.effects)):(g[0].scrollTop=w,l.resolveWith(this)),l.promise())},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,s){return this.tree._callHook("nodeSetStatus",this,e,t,s)},setTitle:function(e){this.title=e,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(e,t){var s,n,i=this.children;if(i){if(e=e||function(e,t){var s=e.title.toLowerCase(),n=t.title.toLowerCase();return s===n?0:s>n?1:-1},i.sort(e),t)for(s=0,n=i.length;s<n;s++)i[s].children&&i[s].sortChildren(e,"$norender$");"$norender$"!==t&&this.render(),this.triggerModifyChild("sort")}},toDict:function(t,s){var n,i,r,o,a={},u=this;if(e.each(g,(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),s){if(!1===(o=s(a,u)))return!1;"skip"===o&&(t=!1)}if(t&&b(this.children))for(a.children=[],n=0,i=this.children.length;n<i;n++)(r=this.children[n]).isStatusNode()||!1!==(o=r.toDict(!0,s))&&a.children.push(o);return a},toggleClass:function(t,s){var n,i,r=/\S+/g,o=t.match(r)||[],a=0,u=!1,c=this[this.tree.statusClassPropName],l=" "+(this.extraClasses||"")+" ";for(c&&e(c).toggleClass(t,s);n=o[a++];)if(i=l.indexOf(" "+n+" ")>=0,s=void 0===s?!i:!!s)i||(l+=n+" ",u=!0);else for(;l.indexOf(" "+n+" ")>-1;)l=l.replace(" "+n+" "," ");return this.extraClasses=C(l),u},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,s,n){var i,r=this.tree.options.modifyChild;r&&(s&&s.parent!==this&&e.error("childNode "+s+" is not a child of "+this),i={node:this,tree:this.tree,operation:t,childNode:s||null},n&&e.extend(i,n),r({type:"modifyChild"},i))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var s,n,i=!0,r=this.children;if(!0===t&&(!1===(i=e(this))||"skip"===i))return i;if(r)for(s=0,n=r.length;s<n&&!1!==(i=r[s].visit(e,!0));s++);return i},visitAndLoad:function(t,s,n){var i,r,o,a=this;return!t||!0!==s||!1!==(r=t(a))&&"skip"!==r?a.children||a.lazy?(i=new e.Deferred,o=[],a.load().done((function(){for(var s=0,n=a.children.length;s<n;s++){if(!1===(r=a.children[s].visitAndLoad(t,!0,!0))){i.reject();break}"skip"!==r&&o.push(r)}e.when.apply(this,o).then((function(){i.resolve()}))})),i.promise()):q():n?r:q()},visitParents:function(e,t){if(t&&!1===e(this))return!1;for(var s=this.parent;s;){if(!1===e(s))return!1;s=s.parent}return!0},visitSiblings:function(e,t){var s,n,i,r=this.parent.children;for(s=0,n=r.length;s<n;s++)if(i=r[s],(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()),E("warn",arguments))}},R.prototype={_makeHookContext:function(t,s,n){var i,r;return void 0!==t.node?(s&&t.originalEvent!==s&&e.error("invalid args"),i=t):t.tree?i={node:t,tree:r=t.tree,widget:r.widget,options:r.widget.options,originalEvent:s,typeInfo:r.types[t.type]||{}}:t.widget?i={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:s}:e.error("invalid args"),n&&e.extend(i,n),i},_callHook:function(t,s,n){var i=this._makeHookContext(s),r=this[t],o=Array.prototype.slice.call(arguments,2);return S(r)||e.error("_callHook('"+t+"') is not a function"),o.unshift(i),r.apply(this,o)},_setExpiringValue:function(e,t,s){this._tempCache[e]={value:t,expire:Date.now()+(+s||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_usesExtension:function(t){return e.inArray(t,this.options.extensions)>=0},_requireExtension:function(t,s,n,i){null!=n&&(n=!!n);var r=this._local.name,o=this.options.extensions,a=e.inArray(t,o)<e.inArray(r,o),u=s&&null==this.ext[t],c=!u&&null!=n&&n!==a;return k(r&&r!==t,"invalid or same name '"+r+"' (require yourself?)"),!u&&!c||(i||(u||s?(i="'"+r+"' extension requires '"+t+"'",c&&(i+=" to be registered "+(n?"before":"after")+" itself")):i="If used together, `"+t+"` must be registered "+(n?"before":"after")+" `"+r+"`"),e.error(i),!1)},activateKey:function(e,t){var s=this.getNodeByKey(e);return s?s.setActive(!0,t):this.activeNode&&this.activeNode.setActive(!1,t),s},addPagingNode:function(e,t){return this.rootNode.addPagingNode(e,t)},applyCommand:function(t,s,n){var i;switch(s=s||this.getActiveNode(),t){case"moveUp":(i=s.getPrevSibling())&&(s.moveTo(i,"before"),s.setActive());break;case"moveDown":(i=s.getNextSibling())&&(s.moveTo(i,"after"),s.setActive());break;case"indent":(i=s.getPrevSibling())&&(s.moveTo(i,"child"),i.setExpanded(),s.setActive());break;case"outdent":s.isTopLevel()||(s.moveTo(s.getParent(),"after"),s.setActive());break;case"remove":i=s.getPrevSibling()||s.getParent(),s.remove(),i&&i.setActive();break;case"addChild":s.editCreateNode("child","");break;case"addSibling":s.editCreateNode("after","");break;case"rename":s.editStart();break;case"down":case"first":case"last":case"left":case"parent":case"right":case"up":return s.navigate(t);default:e.error("Unhandled command: '"+t+"'")}},applyPatch:function(t){var s,n,i,r,o,a,u=t.length,c=[];for(n=0;n<u;n++)k(2===(i=t[n]).length,"patchList must be an array of length-2-arrays"),r=i[0],o=i[1],(a=null===r?this.rootNode:this.getNodeByKey(r))?(s=new e.Deferred,c.push(s),a.applyPatch(o).always(L(s,a))):this.warn("could not find node with key '"+r+"'");return e.when.apply(e,c).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()),E("log",arguments))},destroy:function(){this.widget.destroy()},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()),E("error",arguments))},expandAll:function(e,t){var s=this.enableUpdate(!1);e=!1!==e,this.visit((function(s){!1!==s.hasChildren()&&s.isExpanded()!==e&&s.setExpanded(e,t)})),this.enableUpdate(s)},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(e,t){var s=null,n=this.getFirstChild();function i(n){if(e(n)&&(s=n),s||n===t)return!1}return e="string"==typeof e?D(e):e,t=t||n,this.visitRows(i,{start:t,includeSelf:!1}),s||t===n||this.visitRows(i,{start:n,includeSelf:!0}),s},findRelatedNode:function(t,s,n){var i=null,r=e.ui.keyCode;switch(s){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 '"+s+"'.")}return i},generateFormElements:function(t,s,n){n=n||{};var i,r="string"==typeof t?t:"ft_"+this._id+"[]",o="string"==typeof s?s:"ft_"+this._id+"_active",a="fancytree_result_"+this._id,u=e("#"+a),c=3===this.options.selectMode&&!1!==n.stopOnParents;function l(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!==s&&this.activeNode&&u.append(e("<input>",{type:"radio",name:o,value:this.activeNode.key,checked:!0})),n.filter?this.visit((function(e){var t=n.filter(e);if("skip"===t)return t;!1!==t&&l(e)})):!1!==t&&(i=this.getSelectedNodes(c),e.each(i,(function(e,t){l(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 s,n;return!t&&(s=document.getElementById(this.options.idPrefix+e))?s.ftnode?s.ftnode:null:(t=t||this.rootNode,n=null,e=""+e,t.visit((function(t){if(t.key===e)return n=t,!1}),!0),n)},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()),E("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,s){var n,i,r,o=this,a=new e.Deferred,u=this.getRootNode(),c=this.options.keyPathSeparator,l=[],d=e.extend({},s);for("function"==typeof s?n=s:s&&s.callback&&(n=s.callback),d.callback=function(e,t,s){n&&n.call(e,t,s),a.notifyWith(e,[{node:t,status:s}])},null==d.matchKey&&(d.matchKey=function(e,t){return e.key===t}),b(t)||(t=[t]),i=0;i<t.length;i++)(r=t[i]).charAt(0)===c&&(r=r.substr(1)),l.push(r.split(c));return setTimeout((function(){o._loadKeyPathImpl(a,d,u,l).done((function(){a.resolve()}))}),0),a.promise()},_loadKeyPathImpl:function(t,s,n,i){var r,o,a,u,c,l,d,h,p,f,_=this;function m(e,t){var n,i,r=e.children;if(r)for(n=0,i=r.length;n<i;n++)if(s.matchKey(r[n],t))return r[n];return null}for(d={},o=0;o<i.length;o++)for(p=i[o],h=n;p.length;){if(a=p.shift(),!(u=m(h,a))){this.warn("loadKeyPath: key not found: "+a+" (parent: "+h+")"),s.callback(this,a,"error");break}if(0===p.length){s.callback(this,u,"ok");break}if(u.lazy&&void 0===u.hasChildren()){s.callback(this,u,"loaded"),d[a=u.key]?d[a].pathSegList.push(p):d[a]={parent:u,pathSegList:[p]};break}s.callback(this,u,"loaded"),h=u}function g(e,t,n){s.callback(_,t,"loading"),t.load().done((function(){_._loadKeyPathImpl.call(_,e,s,t,n).always(L(e,_))})).fail((function(n){_.warn("loadKeyPath: error loading lazy "+t),s.callback(_,u,"error"),e.rejectWith(_)}))}for(c in r=[],d)x(d,c)&&(l=d[c],f=new e.Deferred,r.push(f),g(f,l.parent,l.pathSegList));return e.when.apply(e,r).promise()},reactivate:function(e){var t,s=this.activeNode;return s?(this.activeNode=null,t=s.setActive(!0,{noFocus:!0}),e&&s.setFocus(),t):q()},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)},debugTime:function(e){this.options.debugLevel>=4&&window.console.time(this+" - "+e)},debugTimeEnd:function(e){this.options.debugLevel>=4&&window.console.timeEnd(this+" - "+e)},toDict:function(e,t){var s=this.rootNode.toDict(!0,t);return e?s:s.children},toString:function(){return"Fancytree@"+this._id},_triggerNodeEvent:function(e,t,s,n){var i=this._makeHookContext(t,s,n),r=this.widget._trigger(e,s,i);return!1!==r&&void 0!==i.result?i.result:r},_triggerTreeEvent:function(e,t,s){var n=this._makeHookContext(this,t,s),i=this.widget._trigger(e,t,n);return!1!==i&&void 0!==n.result?n.result:i},visit:function(e){return this.rootNode.visit(e,!1)},visitRows:function(e,t){if(!this.rootNode.hasChildren())return!1;if(t&&t.reverse)return delete t.reverse,this._visitRowsUp(e,t);var s,n,i,r,o=0,a=!1===(t=t||{}).includeSelf,u=!!t.includeHidden,c=!u&&this.enableFilter,l=t.start||this.rootNode.children[0];for(i=l.parent;i;){for(k((n=(r=i.children).indexOf(l)+o)>=0,"Could not find "+l+" in parent's children: "+i),s=n;s<r.length;s++)if(l=r[s],!c||l.match||l.subMatchCount){if(!a&&!1===e(l))return!1;if(a=!1,l.children&&l.children.length&&(u||l.expanded)&&!1===l.visit((function(t){return!c||t.match||t.subMatchCount?!1!==e(t)&&(u||!t.children||t.expanded?void 0:"skip"):"skip"}),!1))return!1}l=i,i=i.parent,o=1}return!0},_visitRowsUp:function(e,t){for(var s,n,i,r=!!t.includeHidden,o=t.start||this.rootNode.children[0];;){if((s=(i=o.parent).children)[0]===o){if(!(o=i).parent)break;s=i.children}else for(n=s.indexOf(o),o=s[n-1];(r||o.expanded)&&o.children&&o.children.length;)i=o,o=(s=o.children)[s.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()),E("warn",arguments))}},e.extend(R.prototype,{nodeClick:function(e){var t,s,n=e.targetType,i=e.node;if("expander"===n){if(i.isLoading())return void i.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",e)}else if("checkbox"===n)this._callHook("nodeToggleSelected",e),e.options.focusOnSelect&&this._callHook("nodeSetFocus",e,!0);else{if(s=!1,t=!0,i.folder)switch(e.options.clickFolderMode){case 2:s=!0,t=!1;break;case 3:t=!0,s=!0}t&&(this.nodeSetFocus(e),this._callHook("nodeSetActive",e,!0)),s&&this._callHook("nodeToggleExpanded",e)}},nodeCollapseSiblings:function(e,t){var s,n,i,r=e.node;if(r.parent)for(n=0,i=(s=r.parent.children).length;n<i;n++)s[n]!==r&&s[n].expanded&&this._callHook("nodeSetExpanded",s[n],!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 s,i,r,o=t.originalEvent,a=t.node,u=t.tree,c=t.options,l=o.which,p=o.key||String.fromCharCode(l),f=!!(o.altKey||o.ctrlKey||o.metaKey),_=!h[l]&&!d[l]&&!f,m=e(o.target),g=!0,v=!(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.is(":input:enabled"))return(i=Date.now())-u.lastQuicksearchTime>500&&(u.lastQuicksearchTerm=""),u.lastQuicksearchTime=i,u.lastQuicksearchTerm+=p,(s=u.findNextNode(u.lastQuicksearchTerm,u.getActiveNode()))&&s.setActive(),void o.preventDefault();switch(n.eventToString(o)){case"+":case"=":u.nodeSetExpanded(t,!0);break;case"-":u.nodeSetExpanded(t,!1);break;case"space":a.isPagingNode()?u._triggerNodeEvent("clickPaging",t,o):n.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,v);break;default:g=!1}g&&o.preventDefault()},nodeLoadChildren:function(t,s){var n,i,r,o=null,c=!0,l=t.tree,d=t.node,h=d.parent,p="nodeLoadChildren",f=Date.now();return S(s)&&k(!S(s=s.call(l,{type:"source"},t)),"source callback must not return another function"),S(s.then)?o=s:s.url?(n=e.extend({},t.options.ajax,s)).debugDelay?(i=n.debugDelay,delete n.debugDelay,b(i)&&(i=i[0]+Math.random()*(i[1]-i[0])),d.warn("nodeLoadChildren waiting debugDelay "+Math.round(i)+" ms ..."),o=e.Deferred((function(t){setTimeout((function(){e.ajax(n).done((function(){t.resolveWith(this,arguments)})).fail((function(){t.rejectWith(this,arguments)}))}),i)}))):o=e.ajax(n):e.isPlainObject(s)||b(s)?(o={then:function(e,t){e(s,null,null)}},c=!1):e.error("Invalid source type: "+s),d._requestId&&(d.warn("Recursive load request #"+f+" while #"+d._requestId+" is pending."),d._requestId=f),c&&(l.debugTime(p),l.nodeSetStatus(t,"loading")),r=new e.Deferred,o.then((function(n,i,o){var c,p;if("json"!==s.dataType&&"jsonp"!==s.dataType||"string"!=typeof n||e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),d._requestId&&d._requestId>f)r.rejectWith(this,[a]);else if(null!==d.parent||null===h){if(t.options.postProcess){try{(p=l._triggerNodeEvent("postProcess",t,t.originalEvent,{response:n,error:null,dataType:s.dataType})).error&&l.warn("postProcess returned error:",p)}catch(e){p={error:e,message:""+e,details:"postProcess failed"}}if(p.error)return c=e.isPlainObject(p.error)?p.error:{message:p.error},c=l._makeHookContext(d,null,c),void r.rejectWith(this,[c]);(b(p)||e.isPlainObject(p)&&b(p.children))&&(n=p)}else n&&x(n,"d")&&t.options.enableAspx&&(42===t.options.enableAspx&&l.warn("The default for enableAspx will change to `false` in the fututure. Pass `enableAspx: true` or implement postProcess to silence this warning."),n="string"==typeof n.d?e.parseJSON(n.d):n.d);r.resolveWith(this,[n])}else r.rejectWith(this,[u])}),(function(e,t,s){var n=l._makeHookContext(d,null,{error:e,args:Array.prototype.slice.call(arguments),message:s,details:e.status+": "+s});r.rejectWith(this,[n])})),r.done((function(s){var n,i,r;l.nodeSetStatus(t,"ok"),e.isPlainObject(s)?(k(d.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),k(b(s.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=s,n=s.children,delete i.children,e.each(m,(function(e,t){void 0!==i[t]&&(l[t]=i[t],delete i[t])})),e.extend(l.data,i)):n=s,k(b(n),"expected array of children"),d._setChildren(n),l.options.nodata&&0===n.length&&(S(l.options.nodata)?r=l.options.nodata.call(l,{type:"nodata"},t):!0===l.options.nodata&&d.isRootNode()?r=l.options.strings.noData:"string"==typeof l.options.nodata&&d.isRootNode()&&(r=l.options.nodata),r&&d.setStatus("nodata",r)),l._triggerNodeEvent("loadChildren",d)})).fail((function(e){var s;e!==a?e!==u?(e.node&&e.error&&e.message?s=e:"[object Object]"===(s=l._makeHookContext(d,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""})).message&&(s.message=""),d.warn("Load children failed ("+s.message+")",s),!1!==l._triggerNodeEvent("loadError",s,null)&&l.nodeSetStatus(t,"error",s.message,s.details)):d.warn("Lazy parent node was removed while loading: discarding response."):d.warn("Ignored response for obsolete load request #"+f+" (expected #"+d._requestId+")")})).always((function(){d._requestId=null,c&&l.debugTimeEnd(p)})),r.promise()},nodeLoadKeyPath:function(e,t){},nodeRemoveChild:function(t,s){var n,i=t.node,r=e.extend({},t,{node:s}),o=i.children;if(1===o.length)return k(s===o[0],"invalid single child"),this.nodeRemoveChildren(t);this.activeNode&&(s===this.activeNode||this.activeNode.isDescendantOf(s))&&this.activeNode.setActive(!1),this.focusNode&&(s===this.focusNode||this.focusNode.isDescendantOf(s))&&(this.focusNode=null),this.nodeRemoveMarkup(r),this.nodeRemoveChildren(r),k((n=e.inArray(s,o))>=0,"invalid child"),i.triggerModifyChild("remove",s),s.visit((function(e){e.parent=null}),!0),this._callHook("treeRegisterNode",this,!1,s),o.splice(n,1)},nodeRemoveChildMarkup:function(t){var s=t.node;s.ul&&(s.isRootNode()?e(s.ul).empty():(e(s.ul).remove(),s.ul=null),s.visit((function(e){e.li=e.ul=null})))},nodeRemoveChildren:function(e){var t=e.tree,s=e.node;s.children&&(this.activeNode&&this.activeNode.isDescendantOf(s)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(s)&&(this.focusNode=null),this.nodeRemoveChildMarkup(e),s.triggerModifyChild("remove",null),s.visit((function(e){e.parent=null,t._callHook("treeRegisterNode",t,!1,e)})),s.lazy?s.children=[]:s.children=null,s.isRootNode()||(s.expanded=!1),this.nodeRenderStatus(e))},nodeRemoveMarkup:function(t){var s=t.node;s.li&&(e(s.li).remove(),s.li=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(t,s,n,i,r){var o,a,u,c,l,d,h,p=t.node,f=t.tree,_=t.options,m=_.aria,g=!1,v=p.parent,y=!v,w=p.children,b=null;if(!1!==f._enableUpdate&&(y||v.ul)){if(k(y||v.ul,"parent UL must exist"),y||(p.li&&(s||p.li.parentNode!==p.parent.ul)&&(p.li.parentNode===p.parent.ul?b=p.li.nextSibling:this.debug("Unlinking "+p+" (must be child of "+p.parent+")"),this.nodeRemoveMarkup(t)),p.li?this.nodeRenderStatus(t):(g=!0,p.li=document.createElement("li"),p.li.ftnode=p,p.key&&_.generateIds&&(p.li.id=_.idPrefix+p.key),p.span=document.createElement("span"),p.span.className="fancytree-node",m&&!p.tr&&e(p.li).attr("role","treeitem"),p.li.appendChild(p.span),this.nodeRenderTitle(t),_.createNode&&_.createNode.call(f,{type:"createNode"},t)),_.renderNode&&_.renderNode.call(f,{type:"renderNode"},t)),w){if(y||p.expanded||!0===n){for(p.ul||(p.ul=document.createElement("ul"),(!0!==i||r)&&p.expanded||(p.ul.style.display="none"),m&&e(p.ul).attr("role","group"),p.li?p.li.appendChild(p.ul):p.tree.$div.append(p.ul)),c=0,l=w.length;c<l;c++)h=e.extend({},t,{node:w[c]}),this.nodeRender(h,s,n,!1,!0);for(o=p.ul.firstChild;o;)(u=o.ftnode)&&u.parent!==p?(p.debug("_fixParent: remove missing "+u,o),d=o.nextSibling,o.parentNode.removeChild(o),o=d):o=o.nextSibling;for(o=p.ul.firstChild,c=0,l=w.length-1;c<l;c++)(a=w[c])===(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));y||g&&v.ul.insertBefore(p.li,b)}},nodeRenderTitle:function(t,s){var r,o,a,u,c,l,d,h=t.node,p=t.tree,f=t.options,_=f.aria,m=h.getLevel(),g=[];void 0!==s&&(h.title=s),h.span&&!1!==p._enableUpdate&&(c=_&&!1!==h.hasChildren()?" role='button'":"",m<f.minExpandLevel?(h.lazy||(h.expanded=!0),m>1&&g.push("<span "+c+" class='fancytree-expander fancytree-expander-fixed'></span>")):g.push("<span "+c+" class='fancytree-expander'></span>"),(r=n.evalOption("checkbox",h,h,f,!1))&&!h.isStatusNode()&&(c=_?" role='checkbox'":"",o="fancytree-checkbox",("radio"===r||h.parent&&h.parent.radiogroup)&&(o+=" fancytree-radio"),g.push("<span "+c+" 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=n.evalOption("icon",h,h,f,!0))&&(c=_?" role='presentation'":"",d=(d=n.evalOption("iconTooltip",h,h,f,null))?" title='"+B(d)+"'":"","string"==typeof a?i.test(a)?(a="/"===a.charAt(0)?a:(f.imagePath||"")+a,g.push("<img src='"+a+"' class='fancytree-icon'"+d+" alt='' />")):g.push("<span "+c+" class='fancytree-custom-icon "+a+"'"+d+"></span>"):a.text?g.push("<span "+c+" class='fancytree-custom-icon "+(a.addClass||"")+"'"+d+">"+n.escapeHtml(a.text)+"</span>"):a.html?g.push("<span "+c+" class='fancytree-custom-icon "+(a.addClass||"")+"'"+d+">"+a.html+"</span>"):g.push("<span "+c+" class='fancytree-icon'"+d+"></span>")),u="",f.renderTitle&&(u=f.renderTitle.call(p,{type:"renderTitle"},t)||""),u||(!0===(l=n.evalOption("tooltip",h,h,f,null))&&(l=h.title),u="<span class='fancytree-title'"+(l=l?" title='"+B(l)+"'":"")+(f.titlesTabbable?" tabindex='0'":"")+">"+(f.escapeTitles?n.escapeHtml(h.title):h.title)+"</span>"),g.push(u),h.span.innerHTML=g.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 s,i=t.node,r=t.tree,o=t.options,a=i.hasChildren(),u=i.isLastSibling(),c=o.aria,l=o._classNames,d=[],h=i[r.statusClassPropName];h&&!1!==r._enableUpdate&&(c&&(s=e(i.tr||i.li)),d.push(l.node),r.activeNode===i&&d.push(l.active),r.focusNode===i&&d.push(l.focused),i.expanded&&d.push(l.expanded),c&&(!1===a?s.removeAttr("aria-expanded"):s.attr("aria-expanded",Boolean(i.expanded))),i.folder&&d.push(l.folder),!1!==a&&d.push(l.hasChildren),u&&d.push(l.lastsib),i.lazy&&null==i.children&&d.push(l.lazy),i.partload&&d.push(l.partload),i.partsel&&d.push(l.partsel),n.evalOption("unselectable",i,i,o,!1)&&d.push(l.unselectable),i._isLoading&&d.push(l.loading),i._error&&d.push(l.error),i.statusNodeType&&d.push(l.statusNodePrefix+i.statusNodeType),i.selected?(d.push(l.selected),c&&s.attr("aria-selected",!0)):c&&s.attr("aria-selected",!1),i.extraClasses&&d.push(i.extraClasses),!1===a?d.push(l.combinedExpanderPrefix+"n"+(u?"l":"")):d.push(l.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&null==i.children?"d":"")+(u?"l":"")),d.push(l.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),h.className=d.join(" "),i.li&&e(i.li).toggleClass(l.lastsib,u))},nodeSetActive:function(t,s,n){n=n||{};var i,r=t.node,o=t.tree,a=t.options,u=!0===n.noEvents,c=!0===n.noFocus,l=!1!==n.scrollIntoView;return r===o.activeNode==(s=!1!==s)?q(r):(l&&t.originalEvent&&e(t.originalEvent.target).is("a,:checkbox")&&(r.info("Not scrolling while clicking an embedded link."),l=!1),s&&!u&&!1===this._triggerNodeEvent("beforeActivate",r,t.originalEvent)?O(r,["rejected"]):(s?(o.activeNode&&(k(o.activeNode!==r,"node was active (inconsistency)"),i=e.extend({},t,{node:o.activeNode}),o.nodeSetActive(i,!1),k(null===o.activeNode,"deactivate was out of sync?")),a.activeVisible&&r.makeVisible({scrollIntoView:l}),o.activeNode=r,o.nodeRenderStatus(t),c||o.nodeSetFocus(t),u||o._triggerNodeEvent("activate",r,t.originalEvent)):(k(o.activeNode===r,"node was not active (inconsistency)"),o.activeNode=null,this.nodeRenderStatus(t),u||t.tree._triggerNodeEvent("deactivate",r,t.originalEvent)),q(r)))},nodeSetExpanded:function(t,s,n){n=n||{};var i,r,o,a,u,c,l=t.node,d=t.tree,h=t.options,p=!0===n.noAnimation,f=!0===n.noEvents;if(s=!1!==s,e(l.li).hasClass(h._classNames.animating))return l.warn("setExpanded("+s+") while animating: ignored."),O(l,["recursion"]);if(l.expanded&&s||!l.expanded&&!s)return q(l);if(s&&!l.lazy&&!l.hasChildren())return q(l);if(!s&&l.getLevel()<h.minExpandLevel)return O(l,["locked"]);if(!f&&!1===this._triggerNodeEvent("beforeExpand",l,t.originalEvent))return O(l,["rejected"]);if(p||l.isVisible()||(p=n.noAnimation=!0),r=new e.Deferred,s&&!l.expanded&&h.autoCollapse){u=l.getParentList(!1,!0),c=h.autoCollapse;try{for(h.autoCollapse=!1,o=0,a=u.length;o<a;o++)this._callHook("nodeCollapseSiblings",u[o],n)}finally{h.autoCollapse=c}}return r.done((function(){var e=l.getLastChild();s&&h.autoScroll&&!p&&e&&d._enableUpdate?e.scrollIntoView(!0,{topNode:l}).always((function(){f||t.tree._triggerNodeEvent(s?"expand":"collapse",t)})):f||t.tree._triggerNodeEvent(s?"expand":"collapse",t)})),i=function(n){var i=h._classNames,r=h.toggleEffect;if(l.expanded=s,d._callHook("treeStructureChanged",t,s?"expand":"collapse"),d._callHook("nodeRender",t,!1,!1,!0),l.ul)if("none"!==l.ul.style.display==!!l.expanded)l.warn("nodeSetExpanded: UL.style.display already set");else{if(r&&!p)return e(l.li).addClass(i.animating),void(S(e(l.ul)[r.effect])?e(l.ul)[r.effect]({duration:r.duration,always:function(){e(this).removeClass(i.animating),e(l.li).removeClass(i.animating),n()}}):(e(l.ul).stop(!0,!0),e(l.ul).parent().find(".ui-effects-placeholder").remove(),e(l.ul).toggle(r.effect,r.options,r.duration,(function(){e(this).removeClass(i.animating),e(l.li).removeClass(i.animating),n()}))));l.ul.style.display=l.expanded||!parent?"":"none"}n()},s&&l.lazy&&void 0===l.hasChildren()?l.load().done((function(){r.notifyWith&&r.notifyWith(l,["loaded"]),i((function(){r.resolveWith(l)}))})).fail((function(e){i((function(){r.rejectWith(l,["load failed ("+e+")"])}))})):i((function(){r.resolveWith(l)})),r.promise()},nodeSetFocus:function(t,s){var n,i=t.tree,r=t.node,o=i.options,a=!!t.originalEvent&&e(t.originalEvent.target).is(":input");if(s=!1!==s,i.focusNode){if(i.focusNode===r&&s)return;n=e.extend({},t,{node:i.focusNode}),i.focusNode=null,this._triggerNodeEvent("blur",n),this._callHook("nodeRenderStatus",n)}s&&(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,s){s=s||{};var i=e.node,r=e.tree,o=e.options,a=!0===s.noEvents,u=i.parent;if(t=!1!==t,!n.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(s)),this.nodeRenderStatus(e),r.lastSelectedNode=t?i:null,a||r._triggerNodeEvent("select",e)}},nodeSetStatus:function(t,s,n,i){var r=t.node,o=t.tree;function a(){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")}}function u(s,n){var i=r.children?r.children[0]:null;return i&&i.isStatusNode()?(e.extend(i,s),i.statusNodeType=n,o._callHook("nodeRenderTitle",i)):(r._setChildren([s]),o._callHook("treeStructureChanged",t,"setStatusNode"),r.children[0].statusNodeType=n,o.render()),r.children[0]}switch(s){case"ok":a(),r._isLoading=!1,r._error=null,r.renderStatus();break;case"loading":r.parent||u({title:o.options.strings.loading+(n?" ("+n+")":""),checkbox:!1,tooltip:i},s),r._isLoading=!0,r._error=null,r.renderStatus();break;case"error":u({title:o.options.strings.loadError+(n?" ("+n+")":""),checkbox:!1,tooltip:i},s),r._isLoading=!1,r._error={message:n,details:i},r.renderStatus();break;case"nodata":u({title:n||o.options.strings.noData,checkbox:!1,tooltip:i},s),r._isLoading=!1,r._error=null,r.renderStatus();break;default:e.error("invalid node status "+s)}},nodeToggleExpanded:function(e){return this.nodeSetExpanded(e,!e.node.expanded)},nodeToggleSelected:function(e){var t=e.node,s=!t.selected;return t.partsel&&!t.selected&&!0===t._lastSelectIntent&&(s=!1,t.selected=!0),t._lastSelectIntent=s,this.nodeSetSelected(e,s)},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 s=t.tree,n=s.options;s.$container.attr("tabindex",n.tabindex),e.each(m,(function(e,t){void 0!==n[t]&&(s.info("Move option "+t+" to tree"),s[t]=n[t],delete n[t])})),n.checkboxAutoHide&&s.$container.addClass("fancytree-checkbox-auto-hide"),n.rtl?s.$container.attr("DIR","RTL").addClass("fancytree-rtl"):s.$container.removeAttr("DIR").removeClass("fancytree-rtl"),n.aria&&(s.$container.attr("role","tree"),1!==n.selectMode&&s.$container.attr("aria-multiselectable",!0)),this.treeLoad(t)},treeLoad:function(t,s){var i,r,o,a=t.tree,u=t.widget.element,c=e.extend({},t,{node:this.rootNode});if(a.rootNode.children&&this.treeClear(t),s=s||this.options.source)"string"==typeof s&&e.error("Not implemented");else switch(r=u.data("type")||"html"){case"html":(o=u.find(">ul").not(".fancytree-container").first()).length?(o.addClass("ui-fancytree-source fancytree-helper-hidden"),s=e.ui.fancytree.parseHtml(o),this.data=e.extend(this.data,z(o))):(n.warn("No `source` option was passed and container does not contain `<ul>`: assuming `source: []`."),s=[]);break;case"json":s=e.parseJSON(u.text()),u.contents().filter((function(){return 3===this.nodeType})).remove(),e.isPlainObject(s)&&(k(b(s.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=s,s=s.children,delete i.children,e.each(m,(function(e,t){void 0!==i[t]&&(a[t]=i[t],delete i[t])})),e.extend(a.data,i));break;default:e.error("Invalid data-type: "+r)}return a._triggerTreeEvent("preInit",null),this.nodeLoadChildren(c,s).done((function(){a._callHook("treeStructureChanged",t,"loadChildren"),a.render(),3===t.options.selectMode&&a.rootNode.fixSelection3FromEndNodes(),a.activeNode&&a.options.activeVisible&&a.activeNode.makeVisible(),a._triggerTreeEvent("init",null,{status:!0})})).fail((function(){a.render(),a._triggerTreeEvent("init",null,{status:!1})}))},treeRegisterNode:function(e,t,s){e.tree._callHook("treeStructureChanged",e,t?"addNode":"removeNode")},treeSetFocus:function(t,s,n){var i;(s=!1!==s)!==this.hasFocus()&&(this._hasFocus=s,!s&&this.focusNode?this.focusNode.setFocus(!1):!s||n&&n.calledByNode||e(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",s),this._triggerTreeEvent(s?"focusTree":"blurTree"),s&&!this.activeNode&&(i=this._lastMousedownNode||this.getFirstChild())&&i.setFocus())},treeSetOption:function(t,s,n){var i=t.tree,r=!0,o=!1,a=!1;switch(s){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":o=!0,a=!0;break;case"checkboxAutoHide":i.$container.toggleClass("fancytree-checkbox-auto-hide",!!n);break;case"escapeTitles":case"tooltip":a=!0;break;case"rtl":!1===n?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,n),a=!0}i.debug("set option "+s+"="+n+" <"+typeof n+">"),r&&(this.widget._super?this.widget._super.call(this.widget,s,n):e.Widget.prototype._setOption.call(this.widget,s,n)),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,copyFunctionsToData:!1,debugLevel:null,disabled:!1,enableAspx:42,escapeTitles:!1,extensions:[],focusOnSelect:!1,generateIds:!1,icon:!0,idPrefix:"ft_",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,toggleEffect:{effect:"slideToggle",duration:200},tooltip:!1,treeId:null,_classNames:{active:"fancytree-active",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",error:"fancytree-error",expanded:"fancytree-expanded",focused:"fancytree-focused",folder:"fancytree-folder",hasChildren:"fancytree-has-children",lastsib:"fancytree-lastsib",lazy:"fancytree-lazy",loading:"fancytree-loading",node:"fancytree-node",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",selected:"fancytree-selected",statusNodePrefix:"fancytree-statusnode-",unselectable:"fancytree-unselectable"},lazyLoad:null,postProcess:null},_deprecationWarning:function(e){var t=this.tree;t&&t.options.debugLevel>=3&&t.warn("$().fancytree('"+e+"') is deprecated (see https://wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree_Widget.html")},_create:function(){this.tree=new R(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul").first();var t,s,n,i=this.options,r=i.extensions,o=this.tree;for(n=0;n<r.length;n++)s=r[n],(t=e.ui.fancytree._extensions[s])||e.error("Could not apply extension '"+s+"' (it is not registered, did you forget to include it?)"),this.tree.options[s]=T({},t.options,this.tree.options[s]),k(void 0===this.tree.ext[s],"Extension name must not exist as Fancytree.ext attribute: '"+s+"'"),this.tree.ext[s]={},P(this.tree,o,t,s),o=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)},_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,s=this.options,i=this.tree,r=i._ns;this._unbind(),i.$container.on("focusin"+r+" focusout"+r,(function(t){var s=n.getNode(t),r="focusin"===t.type;if(!r&&s&&e(t.target).is("a"))s.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),s||(s=i._getExpiringValue("mouseDownNode"))&&i.debug("Reconstruct mouse target for focusin from recent event.")}s?i._callHook("nodeSetFocus",i._makeHookContext(s,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(s.disabled||!1===s.keyboard)return!0;var t,n=i.focusNode,r=i._makeHookContext(n||i,e),o=i.phase;try{return i.phase="userEvent","preventNav"===(t=n?i._triggerNodeEvent("keydown",n,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=n.getEventTarget(e);i._lastMousedownNode=t?t.node:null,i._setExpiringValue("mouseDownNode",i._lastMousedownNode)})).on("click"+r+" dblclick"+r,(function(e){if(s.disabled)return!0;var i,r=n.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._deprecationWarning("getActiveNode"),this.tree.activeNode},getNodeByKey:function(e){return this._deprecationWarning("getNodeByKey"),this.tree.getNodeByKey(e)},getRootNode:function(){return this._deprecationWarning("getRootNode"),this.tree.rootNode},getTree:function(){return this._deprecationWarning("getTree"),this.tree}}),n=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.38.1-0",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:R,_FancytreeNodeClass:M,jquerySupports:{positionMyOfs:j(e.ui.version,1,9)},assert:function(e,t){return k(e,t)},createTree:function(t,s){var i=e(t).fancytree(s);return n.getTree(i)},debounce:function(e,t,s,n){var i;return 3===arguments.length&&"boolean"!=typeof s&&(n=s,s=!1),function(){var r=arguments;n=n||this,s&&!i&&t.apply(n,r),clearTimeout(i),i=setTimeout((function(){s||t.apply(n,r),i=null}),e)}},debug:function(t){e.ui.fancytree.debugLevel>=4&&E("log",arguments)},error:function(t){e.ui.fancytree.debugLevel>=1&&E("error",arguments)},escapeHtml:function(e){return(""+e).replace(r,(function(e){return c[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 s=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.my),n=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.at),i=(s[2]?+s[2]:0)+(n[2]?+n[2]:0),r=(s[4]?+s[4]:0)+(n[4]?+n[4]:0);t=e.extend({},t,{my:s[1]+" "+s[3],at:n[1]+" "+n[3]}),(i||r)&&(t.offset=i+" "+r)}return t},getEventTarget:function(t){var s,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&&((s=e(t.target)).is("ul[role=group]")?((r.node&&r.node.tree||n).debug("Ignoring click on outer UL."),r.node=null):s.closest(".fancytree-title").length?r.type="title":s.closest(".fancytree-checkbox").length?r.type="checkbox":s.closest(".fancytree-expander").length&&(r.type="expander")),r},getEventTargetType:function(e){return this.getEventTarget(e).type},getNode:function(t){if(t instanceof M)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 s,n=t;return t instanceof R?t:(void 0===t&&(t=0),"number"==typeof t?t=e(".fancytree-container").eq(t):"string"==typeof t?(t=e("#ft-id-"+n).eq(0)).length||(t=e(n).eq(0)):t instanceof Element||t instanceof HTMLDocument?t=e(t):t instanceof e?t=t.eq(0):void 0!==t.originalEvent&&(t=e(t.target)),(s=(t=t.closest(":ui-fancytree")).data("ui-fancytree")||t.data("fancytree"))?s.tree:null)},evalOption:function(e,t,s,n,i){var r,o,a=t.tree,u=n[e],c=s[e];return S(u)?(r={node:t,tree:a,widget:a.widget,options:a.widget.options,typeInfo:a.types[t.type]||{}},null==(o=u.call(a,{type:e},r))&&(o=c)):o=null==c?u:c,null==o&&(o=i),o},setSpanIcon:function(t,s,n){var i=e(t);"string"==typeof n?i.attr("class",s+" "+n):(n.text?i.text(""+n.text):n.html&&(t.innerHTML=n.html),i.attr("class",s+" "+(n.addClass||"")))},eventToString:function(e){var t=e.which,s=e.type,n=[];return e.altKey&&n.push("alt"),e.ctrlKey&&n.push("ctrl"),e.metaKey&&n.push("meta"),e.shiftKey&&n.push("shift"),"click"===s||"dblclick"===s?n.push(p[e.button]+s):"wheel"===s?n.push(s):l[t]||n.push(d[t]||String.fromCharCode(t).toLowerCase()),n.join("+")},info:function(t){e.ui.fancytree.debugLevel>=3&&E("info",arguments)},keyEventToString:function(e){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(e)},overrideMethod:function(t,s,n,i){var r,o=t[s]||e.noop;t[s]=function(){var e=i||this;try{return r=e._super,e._super=o,n.apply(e,arguments)}finally{e._super=r}}},parseHtml:function(t){var s,n,i,r,o,a,u,c,l=t.find(">li"),d=[];return l.each((function(){var l,h,p=e(this),m=p.find(">span",this).first(),v=m.length?null:p.find(">a").first(),w={tooltip:null,data:{}};for(m.length?w.title=m.html():v&&v.length?(w.title=v.html(),w.data.href=v.attr("href"),w.data.target=v.attr("target"),w.tooltip=v.attr("title")):(w.title=p.html(),(o=w.title.search(/<ul/i))>=0&&(w.title=w.title.substring(0,o))),w.title=C(w.title),r=0,a=f.length;r<a;r++)w[f[r]]=void 0;for(s=this.className.split(" "),i=[],r=0,a=s.length;r<a;r++)n=s[r],_[n]?w[n]=!0:i.push(n);if(w.extraClasses=i.join(" "),(u=p.attr("title"))&&(w.tooltip=u),(u=p.attr("id"))&&(w.key=u),p.attr("hideCheckbox")&&(w.checkbox=!1),(l=z(p))&&!e.isEmptyObject(l)){for(h in y)x(l,h)&&(l[y[h]]=l[h],delete l[h]);for(r=0,a=g.length;r<a;r++)u=g[r],null!=(c=l[u])&&(delete l[u],w[u]=c);e.extend(w.data,l)}(t=p.find(">ul").first()).length?w.children=e.ui.fancytree.parseHtml(t):w.children=w.lazy?void 0:null,d.push(w)})),d},registerExtension:function(t){k(null!=t.name,"extensions must have a `name` property."),k(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},trim:C,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&&E("warn",arguments)}}),e.ui.fancytree}function k(t,s){t||(s="Fancytree assertion failed"+(s=s?": "+s:""),e.ui.fancytree.error(s),e.error(s))}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function S(e){return"function"==typeof e}function C(e){return null==e?"":e.trim()}function E(e,t){var s,n,i=window.console?window.console[e]:null;if(i)try{i.apply(window.console,t)}catch(e){for(n="",s=0;s<t.length;s++)n+=t[s];i(n)}}function N(e){return!(!e.tree||void 0===e.statusNodeType)}function j(t,s,n,i){var r,o,a,u=e.map(C(t).split("."),(function(e){return parseInt(e,10)})),c=e.map(Array.prototype.slice.call(arguments,1),(function(e){return parseInt(e,10)}));for(r=0;r<c.length;r++)if((o=u[r]||0)!==(a=c[r]||0))return o>a;return!0}function T(){var t,s,n,i,r,o=arguments[0]||{},a=1,u=arguments.length;if("object"==typeof o||S(o)||(o={}),a===u)throw Error("need at least two args");for(;a<u;a++)if(null!=(t=arguments[a]))for(s in t)if(x(t,s)){if(n=o[s],o===(i=t[s]))continue;i&&e.isPlainObject(i)?(r=n&&e.isPlainObject(n)?n:{},o[s]=T(r,i)):void 0!==i&&(o[s]=i)}return o}function I(e,t,s,n,i){var r,o,a,u,c,l=(r=t[e],o=n[e],a=t.ext[i],u=function(){return r.apply(t,arguments)},c=function(e){return r.apply(t,e)},function(){var e=t._local,s=t._super,n=t._superApply;try{return t._local=a,t._super=u,t._superApply=c,o.apply(t,arguments)}finally{t._local=e,t._super=s,t._superApply=n}});return l}function P(t,s,n,i){for(var r in n)"function"==typeof n[r]?"function"==typeof t[r]?t[r]=I(r,t,s,n,i):"_"===r.charAt(0)?t.ext[i][r]=I(r,t,s,n,i):e.error("Could not override tree."+r+". Use prefix '_' to create tree."+i+"._"+r):"options"!==r&&(t.ext[i][r]=n[r])}function q(t,s){return void 0===t?e.Deferred((function(){this.resolve()})).promise():e.Deferred((function(){this.resolveWith(t,s)})).promise()}function O(t,s){return void 0===t?e.Deferred((function(){this.reject()})).promise():e.Deferred((function(){this.rejectWith(t,s)})).promise()}function L(e,t){return function(){e.resolveWith(t)}}function z(t){var s=e.extend({},t.data()),n=s.json;return delete s.fancytree,delete s.uiFancytree,n&&(delete s.json,s=e.extend(s,n)),s}function B(e){return(""+e).replace(o,(function(e){return c[e]}))}function A(e){return e=e.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(e)>=0}}function D(e){var t=new RegExp("^"+e,"i");return function(e){return t.test(e.title)}}function M(t,s){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=g.length;i<r;i++)this[o=g[i]]=s[o];for(o in null==this.unselectableIgnore&&null==this.unselectableStatus||(this.unselectable=!0),s.hideCheckbox&&e.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'"),s.data&&e.extend(this.data,s.data),s)v[o]||!this.tree.options.copyFunctionsToData&&S(s[o])||w[o]||(this.data[o]=s[o]);null==this.key?this.tree.options.defaultKey?(this.key=""+this.tree.options.defaultKey(this),k(this.key,"defaultKey() must return a unique key")):this.key="_"+n._nextNodeKey++:this.key=""+this.key,s.active&&(k(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),s.selected&&(this.tree.lastSelectedNode=this),(a=s.children)?a.length?this._setChildren(a):this.children=this.lazy?[]:null:this.children=null,this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function R(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=z(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 s,i={tree:this};this.rootNode=new M(i,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,s=e("<ul>",{id:"ft-id-"+this._id,class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=s,this.rootNode.ul=s[0],null==this.options.debugLevel&&(this.options.debugLevel=n.debugLevel)}e.ui.fancytree.warn("Fancytree: ignored duplicate include")},void 0===(r="function"==typeof n?n.apply(t,i):n)||(e.exports=r)},3860:function(e,t,s){var n,i,r;i=[s(5311)],n=function(e){e.ui=e.ui||{},e.ui.version="1.12.1";var t,s,n=0,i=Array.prototype.slice;e.cleanData=e.cleanData||(t=e.cleanData,function(s){var n,i,r;for(r=0;null!=(i=s[r]);r++)try{(n=e._data(i,"events"))&&n.remove&&e(i).triggerHandler("remove")}catch(e){}t(s)}),e.widget=e.widget||function(t,s,n){var i,r,o,a={},u=t.split(".")[0],c=u+"-"+(t=t.split(".")[1]);return n||(n=s,s=e.Widget),e.isArray(n)&&(n=e.extend.apply(null,[{}].concat(n))),e.expr[":"][c.toLowerCase()]=function(t){return!!e.data(t,c)},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:n.version,_proto:e.extend({},n),_childConstructors:[]}),(o=new s).options=e.widget.extend({},o.options),e.each(n,(function(t,n){e.isFunction(n)?a[t]=function(){function e(){return s.prototype[t].apply(this,arguments)}function i(e){return s.prototype[t].apply(this,e)}return function(){var t,s=this._super,r=this._superApply;return this._super=e,this._superApply=i,t=n.apply(this,arguments),this._super=s,this._superApply=r,t}}():a[t]=n})),r.prototype=e.widget.extend(o,{widgetEventPrefix:i&&o.widgetEventPrefix||t},a,{constructor:r,namespace:u,widgetName:t,widgetFullName:c}),i?(e.each(i._childConstructors,(function(t,s){var n=s.prototype;e.widget(n.namespace+"."+n.widgetName,r,s._proto)})),delete i._childConstructors):s._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var s,n,r=i.call(arguments,1),o=0,a=r.length;o<a;o++)for(s in r[o])n=r[o][s],r[o].hasOwnProperty(s)&&void 0!==n&&(e.isPlainObject(n)?t[s]=e.isPlainObject(t[s])?e.widget.extend({},t[s],n):e.widget.extend({},n):t[s]=n);return t},e.widget.bridge=function(t,s){var n=s.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 s,i=e.data(this,n);return"instance"===r?(u=i,!1):i?e.isFunction(i[r])&&"_"!==r.charAt(0)?(s=i[r].apply(i,a))!==i&&void 0!==s?(u=s&&s.jquery?u.pushStack(s.get()):s,!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,n);t?(t.option(r||{}),t._init&&t._init()):e.data(this,n,new s(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,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),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,s){t._removeClass(s,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,s){var n,i,r,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},n=t.split("."),t=n.shift(),n.length){for(i=o[t]=e.widget.extend({},this.options[t]),r=0;r<n.length-1;r++)i[n[r]]=i[n[r]]||{},i=i[n[r]];if(t=n.pop(),1===arguments.length)return void 0===i[t]?null:i[t];i[t]=s}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=s}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 s,n,i;for(s in t)i=this.classesElementLookup[s],t[s]!==this.options.classes[s]&&i&&i.length&&(n=e(i.get()),this._removeClass(i,s),n.addClass(this._classes({element:n,keys:s,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 s=[],n=this;function i(i,r){var o,a;for(a=0;a<i.length;a++)o=n.classesElementLookup[i[a]]||e(),o=t.add?e(e.unique(o.get().concat(t.element.get()))):e(o.not(t.element).get()),n.classesElementLookup[i[a]]=o,s.push(i[a]),r&&t.classes[i[a]]&&s.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)||[]),s.join(" ")},_untrackClassesElement:function(t){var s=this;e.each(s.classesElementLookup,(function(n,i){-1!==e.inArray(t.target,i)&&(s.classesElementLookup[n]=e(i.not(t.target).get()))}))},_removeClass:function(e,t,s){return this._toggleClass(e,t,s,!1)},_addClass:function(e,t,s){return this._toggleClass(e,t,s,!0)},_toggleClass:function(e,t,s,n){n="boolean"==typeof n?n:s;var i="string"==typeof e||null===e,r={extra:i?t:s,keys:i?e:t,element:i?this.element:e,add:n};return r.element.toggleClass(this._classes(r),n),this},_on:function(t,s,n){var i,r=this;"boolean"!=typeof t&&(n=s,s=t,t=!1),n?(s=i=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,i=this.widget()),e.each(n,(function(n,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=n.match(/^([\w:-]*)\s*(.*)$/),c=u[1]+r.eventNamespace,l=u[2];l?i.on(c,l,a):s.on(c,a)}))},_off:function(t,s){s=(s||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(s).off(s),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){function s(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(s,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,s,n){var i,r,o=this.options[t];if(n=n||{},(s=e.Event(s)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),s.target=this.element[0],r=s.originalEvent)for(i in r)i in s||(s[i]=r[i]);return this.element.trigger(s,n),!(e.isFunction(o)&&!1===o.apply(this.element[0],[s].concat(n))||s.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,s){e.Widget.prototype["_"+t]=function(n,i,r){var o;"string"==typeof i&&(i={effect:i});var a=i?!0===i||"number"==typeof i?s:i.effect||s:t;"number"==typeof(i=i||{})&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=r,i.delay&&n.delay(i.delay),o&&e.effects&&e.effects.effect[a]?n[t](i):a!==t&&n[a]?n[a](i.duration,i.easing,r):n.queue((function(s){e(this)[t](),r&&r.call(n[0]),s()}))}})),e.widget,function(){var t,s=Math.max,n=Math.abs,i=/left|center|right/,r=/top|center|bottom/,o=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,u=/%$/,c=e.fn.position;function l(e,t,s){return[parseFloat(e[0])*(u.test(e[0])?t/100:1),parseFloat(e[1])*(u.test(e[1])?s/100:1)]}function d(t,s){return parseInt(e.css(t,s),10)||0}function h(t){var s=t[0];return 9===s.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(s)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:s.preventDefault?{width:0,height:0,offset:{top:s.pageY,left:s.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.position=e.position||{scrollbarWidth:function(){if(void 0!==t)return t;var s,n,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),s=r.offsetWidth,i.css("overflow","scroll"),s===(n=r.offsetWidth)&&(n=i[0].clientWidth),i.remove(),t=s-n},getScrollInfo:function(t){var s=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===s||"auto"===s&&t.width<t.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:i?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var s=e(t||window),n=e.isWindow(s[0]),i=!!s[0]&&9===s[0].nodeType;return{element:s,isWindow:n,isDocument:i,offset:n||i?{left:0,top:0}:e(t).offset(),scrollLeft:s.scrollLeft(),scrollTop:s.scrollTop(),width:s.outerWidth(),height:s.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return c.apply(this,arguments);t=e.extend({},t);var u,p,f,_,m,g,v=e(t.of),y=e.position.getWithinInfo(t.within),w=e.position.getScrollInfo(y),b=(t.collision||"flip").split(" "),k={};return g=h(v),v[0].preventDefault&&(t.at="left top"),p=g.width,f=g.height,_=g.offset,m=e.extend({},_),e.each(["my","at"],(function(){var e,s,n=(t[this]||"").split(" ");1===n.length&&(n=i.test(n[0])?n.concat(["center"]):r.test(n[0])?["center"].concat(n):["center","center"]),n[0]=i.test(n[0])?n[0]:"center",n[1]=r.test(n[1])?n[1]:"center",e=o.exec(n[0]),s=o.exec(n[1]),k[this]=[e?e[0]:0,s?s[0]:0],t[this]=[a.exec(n[0])[0],a.exec(n[1])[0]]})),1===b.length&&(b[1]=b[0]),"right"===t.at[0]?m.left+=p:"center"===t.at[0]&&(m.left+=p/2),"bottom"===t.at[1]?m.top+=f:"center"===t.at[1]&&(m.top+=f/2),u=l(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each((function(){var i,r,o=e(this),a=o.outerWidth(),c=o.outerHeight(),h=d(this,"marginLeft"),g=d(this,"marginTop"),x=a+h+d(this,"marginRight")+w.width,S=c+g+d(this,"marginBottom")+w.height,C=e.extend({},m),E=l(k.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-=c:"center"===t.my[1]&&(C.top-=c/2),C.left+=E[0],C.top+=E[1],i={marginLeft:h,marginTop:g},e.each(["left","top"],(function(s,n){e.ui.position[b[s]]&&e.ui.position[b[s]][n](C,{targetWidth:p,targetHeight:f,elemWidth:a,elemHeight:c,collisionPosition:i,collisionWidth:x,collisionHeight:S,offset:[u[0]+E[0],u[1]+E[1]],my:t.my,at:t.at,within:y,elem:o})})),t.using&&(r=function(e){var i=_.left-C.left,r=i+p-a,u=_.top-C.top,l=u+f-c,d={target:{element:v,left:_.left,top:_.top,width:p,height:f},element:{element:o,left:C.left,top:C.top,width:a,height:c},horizontal:r<0?"left":i>0?"right":"center",vertical:l<0?"top":u>0?"bottom":"middle"};p<a&&n(i+r)<p&&(d.horizontal="center"),f<c&&n(u+l)<f&&(d.vertical="middle"),s(n(i),n(r))>s(n(u),n(l))?d.important="horizontal":d.important="vertical",t.using.call(this,e,d)}),o.offset(e.extend(C,{using:r}))}))},e.ui.position={fit:{left:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,a=e.left-t.collisionPosition.marginLeft,u=r-a,c=a+t.collisionWidth-o-r;t.collisionWidth>o?u>0&&c<=0?(n=e.left+u+t.collisionWidth-o-r,e.left+=u-n):e.left=c>0&&u<=0?r:u>c?r+o-t.collisionWidth:r:u>0?e.left+=u:c>0?e.left-=c:e.left=s(e.left-a,e.left)},top:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,u=r-a,c=a+t.collisionHeight-o-r;t.collisionHeight>o?u>0&&c<=0?(n=e.top+u+t.collisionHeight-o-r,e.top+=u-n):e.top=c>0&&u<=0?r:u>c?r+o-t.collisionHeight:r:u>0?e.top+=u:c>0?e.top-=c:e.top=s(e.top-a,e.top)}},flip:{left:function(e,t){var s,i,r=t.within,o=r.offset.left+r.scrollLeft,a=r.width,u=r.isWindow?r.scrollLeft:r.offset.left,c=e.left-t.collisionPosition.marginLeft,l=c-u,d=c+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];l<0?((s=e.left+h+p+f+t.collisionWidth-a-o)<0||s<n(l))&&(e.left+=h+p+f):d>0&&((i=e.left-t.collisionPosition.marginLeft+h+p+f-u)>0||n(i)<d)&&(e.left+=h+p+f)},top:function(e,t){var s,i,r=t.within,o=r.offset.top+r.scrollTop,a=r.height,u=r.isWindow?r.scrollTop:r.offset.top,c=e.top-t.collisionPosition.marginTop,l=c-u,d=c+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];l<0?((i=e.top+h+p+f+t.collisionHeight-a-o)<0||i<n(l))&&(e.top+=h+p+f):d>0&&((s=e.top-t.collisionPosition.marginTop+h+p+f-u)>0||n(s)<d)&&(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 s=this.css("position"),n="absolute"===s,i=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter((function(){var t=e(this);return(!n||"static"!==t.css("position"))&&i.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))})).eq(0);return"fixed"!==s&&r.length?r:e(this[0].ownerDocument||document)},e.fn.extend({uniqueId:(s=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++s)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")}))}})},void 0===(r="function"==typeof n?n.apply(t,i):n)||(e.exports=r)},2705:function(e,t,s){var n=s(5639).Symbol;e.exports=n},6874:function(e){e.exports=function(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}},4636:function(e,t,s){var n=s(2545),i=s(5694),r=s(1469),o=s(4144),a=s(5776),u=s(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var s=r(e),l=!s&&i(e),d=!s&&!l&&o(e),h=!s&&!l&&!d&&u(e),p=s||l||d||h,f=p?n(e.length,String):[],_=f.length;for(var m in e)!t&&!c.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,_))||f.push(m);return f}},4865:function(e,t,s){var n=s(9465),i=s(7813),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,s){var o=e[t];r.call(e,t)&&i(o,s)&&(void 0!==s||t in e)||n(e,t,s)}},9465:function(e,t,s){var n=s(8777);e.exports=function(e,t,s){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}},4239:function(e,t,s){var n=s(2705),i=s(9607),r=s(2333),o=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):r(e)}},9454:function(e,t,s){var n=s(4239),i=s(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},8458:function(e,t,s){var n=s(3560),i=s(5346),r=s(3218),o=s(346),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,d=c.hasOwnProperty,h=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!r(e)||i(e))&&(n(e)?h:a).test(o(e))}},8749:function(e,t,s){var n=s(4239),i=s(1780),r=s(7005),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return r(e)&&i(e.length)&&!!o[n(e)]}},280:function(e,t,s){var n=s(5726),i=s(6916),r=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var s in Object(e))r.call(e,s)&&"constructor"!=s&&t.push(s);return t}},5976:function(e,t,s){var n=s(6557),i=s(5357),r=s(61);e.exports=function(e,t){return r(i(e,t,n),e+"")}},6560:function(e,t,s){var n=s(5703),i=s(8777),r=s(6557),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:r;e.exports=o},2545:function(e){e.exports=function(e,t){for(var s=-1,n=Array(e);++s<e;)n[s]=t(s);return n}},7518:function(e){e.exports=function(e){return function(t){return e(t)}}},8363:function(e,t,s){var n=s(4865),i=s(9465);e.exports=function(e,t,s,r){var o=!s;s||(s={});for(var a=-1,u=t.length;++a<u;){var c=t[a],l=r?r(s[c],e[c],c,s,e):void 0;void 0===l&&(l=e[c]),o?i(s,c,l):n(s,c,l)}return s}},4429:function(e,t,s){var n=s(5639)["__core-js_shared__"];e.exports=n},1463:function(e,t,s){var n=s(5976),i=s(6612);e.exports=function(e){return n((function(t,s){var n=-1,r=s.length,o=r>1?s[r-1]:void 0,a=r>2?s[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,a&&i(s[0],s[1],a)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var u=s[n];u&&e(t,u,n,o)}return t}))}},8777:function(e,t,s){var n=s(852),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},1957:function(e,t,s){var n="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g;e.exports=n},852:function(e,t,s){var n=s(8458),i=s(7801);e.exports=function(e,t){var s=i(e,t);return n(s)?s:void 0}},9607:function(e,t,s){var n=s(2705),i=Object.prototype,r=i.hasOwnProperty,o=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=r.call(e,a),s=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=o.call(e);return n&&(t?e[a]=s:delete e[a]),i}},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},5776:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,s){var n=typeof e;return!!(s=null==s?9007199254740991:s)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<s}},6612:function(e,t,s){var n=s(7813),i=s(8612),r=s(5776),o=s(3218);e.exports=function(e,t,s){if(!o(s))return!1;var a=typeof t;return!!("number"==a?i(s)&&r(t,s.length):"string"==a&&t in s)&&n(s[t],e)}},5346:function(e,t,s){var n,i=s(4429),r=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!r&&r in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var s=e&&e.constructor;return e===("function"==typeof s&&s.prototype||t)}},6916:function(e,t,s){var n=s(5569)(Object.keys,Object);e.exports=n},1167:function(e,t,s){e=s.nmd(e);var n=s(1957),i=t&&!t.nodeType&&t,r=i&&e&&!e.nodeType&&e,o=r&&r.exports===i&&n.process,a=function(){try{var e=r&&r.require&&r.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(s){return e(t(s))}}},5357:function(e,t,s){var n=s(6874),i=Math.max;e.exports=function(e,t,s){return t=i(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=i(r.length-t,0),u=Array(a);++o<a;)u[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=s(u),n(e,this,c)}}},5639:function(e,t,s){var n=s(1957),i="object"==typeof self&&self&&self.Object===Object&&self,r=n||i||Function("return this")();e.exports=r},61:function(e,t,s){var n=s(6560),i=s(1275)(n);e.exports=i},1275:function(e){var t=Date.now;e.exports=function(e){var s=0,n=0;return function(){var i=t(),r=16-(i-n);if(n=i,r>0){if(++s>=800)return arguments[0]}else s=0;return e.apply(void 0,arguments)}}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8583:function(e,t,s){var n=s(4865),i=s(8363),r=s(1463),o=s(8612),a=s(5726),u=s(3674),c=Object.prototype.hasOwnProperty,l=r((function(e,t){if(a(t)||o(t))i(t,u(t),e);else for(var s in t)c.call(t,s)&&n(e,s,t[s])}));e.exports=l},5703:function(e){e.exports=function(e){return function(){return e}}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},6557:function(e){e.exports=function(e){return e}},5694:function(e,t,s){var n=s(9454),i=s(7005),r=Object.prototype,o=r.hasOwnProperty,a=r.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,s){var n=s(3560),i=s(1780);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},4144:function(e,t,s){e=s.nmd(e);var n=s(5639),i=s(5062),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},3560:function(e,t,s){var n=s(4239),i=s(3218);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},6719:function(e,t,s){var n=s(8749),i=s(7518),r=s(1167),o=r&&r.isTypedArray,a=o?i(o):n;e.exports=a},3674:function(e,t,s){var n=s(4636),i=s(280),r=s(8612);e.exports=function(e){return r(e)?n(e):i(e)}},5062:function(e){e.exports=function(){return!1}},8891:function(e){"use strict";var t,s={DEBUG:!1,LIB_VERSION:"2.45.0"};if("undefined"==typeof window){var n={hostname:""};t={navigator:{userAgent:""},document:{location:n,referrer:""},screen:{width:0,height:0},location:n}}else t=window;var i,r,o,a,u,c,l,d,h,p,f,_=Array.prototype,m=Function.prototype,g=Object.prototype,v=_.slice,y=g.toString,w=g.hasOwnProperty,b=t.console,k=t.navigator,x=t.document,S=t.opera,C=t.screen,E=k.userAgent,N=m.bind,j=_.forEach,T=_.indexOf,I=_.map,P=Array.isArray,q={},O={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},L={log:function(){if(s.DEBUG&&!O.isUndefined(b)&&b)try{b.log.apply(b,arguments)}catch(e){O.each(arguments,(function(e){b.log(e)}))}},warn:function(){if(s.DEBUG&&!O.isUndefined(b)&&b){var e=["Mixpanel warning:"].concat(O.toArray(arguments));try{b.warn.apply(b,e)}catch(t){O.each(e,(function(e){b.warn(e)}))}}},error:function(){if(s.DEBUG&&!O.isUndefined(b)&&b){var e=["Mixpanel error:"].concat(O.toArray(arguments));try{b.error.apply(b,e)}catch(t){O.each(e,(function(e){b.error(e)}))}}},critical:function(){if(!O.isUndefined(b)&&b){var e=["Mixpanel error:"].concat(O.toArray(arguments));try{b.error.apply(b,e)}catch(t){O.each(e,(function(e){b.error(e)}))}}}},z=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(L,arguments)}},B=function(e){return{log:z(L.log,e),error:z(L.error,e),critical:z(L.critical,e)}};O.bind=function(e,t){var s,n;if(N&&e.bind===N)return N.apply(e,v.call(arguments,1));if(!O.isFunction(e))throw new TypeError;return s=v.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,s.concat(v.call(arguments)));var i={};i.prototype=e.prototype;var r=new i;i.prototype=null;var o=e.apply(r,s.concat(v.call(arguments)));return Object(o)===o?o:r},n},O.each=function(e,t,s){if(null!=e)if(j&&e.forEach===j)e.forEach(t,s);else if(e.length===+e.length){for(var n=0,i=e.length;n<i;n++)if(n in e&&t.call(s,e[n],n,e)===q)return}else for(var r in e)if(w.call(e,r)&&t.call(s,e[r],r,e)===q)return},O.extend=function(e){return O.each(v.call(arguments,1),(function(t){for(var s in t)void 0!==t[s]&&(e[s]=t[s])})),e},O.isArray=P||function(e){return"[object Array]"===y.call(e)},O.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},O.isArguments=function(e){return!(!e||!w.call(e,"callee"))},O.toArray=function(e){return e?e.toArray?e.toArray():O.isArray(e)||O.isArguments(e)?v.call(e):O.values(e):[]},O.map=function(e,t,s){if(I&&e.map===I)return e.map(t,s);var n=[];return O.each(e,(function(e){n.push(t.call(s,e))})),n},O.keys=function(e){var t=[];return null===e||O.each(e,(function(e,s){t[t.length]=s})),t},O.values=function(e){var t=[];return null===e||O.each(e,(function(e){t[t.length]=e})),t},O.include=function(e,t){var s=!1;return null===e?s:T&&e.indexOf===T?-1!=e.indexOf(t):(O.each(e,(function(e){if(s||(s=e===t))return q})),s)},O.includes=function(e,t){return-1!==e.indexOf(t)},O.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},O.isObject=function(e){return e===Object(e)&&!O.isArray(e)},O.isEmptyObject=function(e){if(O.isObject(e)){for(var t in e)if(w.call(e,t))return!1;return!0}return!1},O.isUndefined=function(e){return void 0===e},O.isString=function(e){return"[object String]"==y.call(e)},O.isDate=function(e){return"[object Date]"==y.call(e)},O.isNumber=function(e){return"[object Number]"==y.call(e)},O.isElement=function(e){return!(!e||1!==e.nodeType)},O.encodeDates=function(e){return O.each(e,(function(t,s){O.isDate(t)?e[s]=O.formatDate(t):O.isObject(t)&&(e[s]=O.encodeDates(t))})),e},O.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},O.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},O.strip_empty_properties=function(e){var t={};return O.each(e,(function(e,s){O.isString(e)&&e.length>0&&(t[s]=e)})),t},O.truncate=function(e,t){var s;return"string"==typeof e?s=e.slice(0,t):O.isArray(e)?(s=[],O.each(e,(function(e){s.push(O.truncate(e,t))}))):O.isObject(e)?(s={},O.each(e,(function(e,n){s[n]=O.truncate(e,t)}))):s=e,s},O.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},s=function(e,n){var i="",r=0,o="",a="",u=0,c=i,l=[],d=n[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),typeof d){case"string":return t(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(i+="    ",l=[],"[object Array]"===y.apply(d)){for(u=d.length,r=0;r<u;r+=1)l[r]=s(r,d)||"null";return a=0===l.length?"[]":i?"[\n"+i+l.join(",\n"+i)+"\n"+c+"]":"["+l.join(",")+"]",i=c,a}for(o in d)w.call(d,o)&&(a=s(o,d))&&l.push(t(o)+(i?": ":":")+a);return a=0===l.length?"{}":i?"{"+l.join(",")+c+"}":"{"+l.join(",")+"}",i=c,a}};return s("",{"":e})},O.JSONDecode=(u={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},c=function(e){var t=new SyntaxError(e);throw t.at=i,t.text=o,t},l=function(e){return e&&e!==r&&c("Expected '"+e+"' instead of '"+r+"'"),r=o.charAt(i),i+=1,r},d=function(){var e,t="";for("-"===r&&(t="-",l("-"));r>="0"&&r<="9";)t+=r,l();if("."===r)for(t+=".";l()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,l(),"-"!==r&&"+"!==r||(t+=r,l());r>="0"&&r<="9";)t+=r,l();if(e=+t,isFinite(e))return e;c("Bad number")},h=function(){var e,t,s,n="";if('"'===r)for(;l();){if('"'===r)return l(),n;if("\\"===r)if(l(),"u"===r){for(s=0,t=0;t<4&&(e=parseInt(l(),16),isFinite(e));t+=1)s=16*s+e;n+=String.fromCharCode(s)}else{if("string"!=typeof u[r])break;n+=u[r]}else n+=r}c("Bad string")},p=function(){for(;r&&r<=" ";)l()},a=function(){switch(p(),r){case"{":return function(){var e,t={};if("{"===r){if(l("{"),p(),"}"===r)return l("}"),t;for(;r;){if(e=h(),p(),l(":"),Object.hasOwnProperty.call(t,e)&&c('Duplicate key "'+e+'"'),t[e]=a(),p(),"}"===r)return l("}"),t;l(","),p()}}c("Bad object")}();case"[":return function(){var e=[];if("["===r){if(l("["),p(),"]"===r)return l("]"),e;for(;r;){if(e.push(a()),p(),"]"===r)return l("]"),e;l(","),p()}}c("Bad array")}();case'"':return h();case"-":return d();default:return r>="0"&&r<="9"?d():function(){switch(r){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}c('Unexpected "'+r+'"')}()}},function(e){var t;return o=e,i=0,r=" ",t=a(),p(),r&&c("Syntax error"),t}),O.base64Encode=function(e){var t,s,n,i,r,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,u=0,c="",l=[];if(!e)return e;e=O.utf8Encode(e);do{t=(r=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,s=r>>12&63,n=r>>6&63,i=63&r,l[u++]=o.charAt(t)+o.charAt(s)+o.charAt(n)+o.charAt(i)}while(a<e.length);switch(c=l.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},O.utf8Encode=function(e){var t,s,n,i,r="";for(t=s=0,n=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<n;i++){var o=e.charCodeAt(i),a=null;o<128?s++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),null!==a&&(s>t&&(r+=e.substring(t,s)),r+=a,t=s=i+1)}return s>t&&(r+=e.substring(t,e.length)),r},O.UUID=(f=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)},function(){var e=(C.height*C.width).toString(16);return f()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,s=E,n=[],i=0;function r(e,t){var s,i=0;for(s=0;s<t.length;s++)i|=n[s]<<8*s;return e^i}for(e=0;e<s.length;e++)t=s.charCodeAt(e),n.unshift(255&t),n.length>=4&&(i=r(i,n),n=[]);return n.length>0&&(i=r(i,n)),i.toString(16)}()+"-"+e+"-"+f()});var A=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];O.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<A.length;t++)if(-1!==e.indexOf(A[t]))return!0;return!1},O.HTTPBuildQuery=function(e,t){var s,n,i=[];return O.isUndefined(t)&&(t="&"),O.each(e,(function(e,t){s=encodeURIComponent(e.toString()),n=encodeURIComponent(t),i[i.length]=n+"="+s})),i.join(t)},O.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var s=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===s||s&&"string"!=typeof s[1]&&s[1].length)return"";var n=s[1];try{n=decodeURIComponent(n)}catch(e){L.error("Skipping decoding for malformed query param: "+n)}return n.replace(/\+/g," ")},O.cookie={get:function(e){for(var t=e+"=",s=x.cookie.split(";"),n=0;n<s.length;n++){for(var i=s[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=O.JSONDecode(O.cookie.get(e))||{}}catch(e){}return t},set_seconds:function(e,t,s,n,i,r,o){var a="",u="",c="";if(o)a="; domain="+o;else if(n){var l=U(x.location.hostname);a=l?"; domain=."+l:""}if(s){var d=new Date;d.setTime(d.getTime()+1e3*s),u="; expires="+d.toGMTString()}r&&(i=!0,c="; SameSite=None"),i&&(c+="; secure"),x.cookie=e+"="+encodeURIComponent(t)+u+"; path=/"+a+c},set:function(e,t,s,n,i,r,o){var a="",u="",c="";if(o)a="; domain="+o;else if(n){var l=U(x.location.hostname);a=l?"; domain=."+l:""}if(s){var d=new Date;d.setTime(d.getTime()+24*s*60*60*1e3),u="; expires="+d.toGMTString()}r&&(i=!0,c="; SameSite=None"),i&&(c+="; secure");var h=e+"="+encodeURIComponent(t)+u+"; path=/"+a+c;return x.cookie=h,h},remove:function(e,t,s){O.cookie.set(e,"",-1,t,!1,!1,s)}};var D=null,M=function(e,t){if(null!==D&&!t)return D;var s=!0;try{e=e||window.localStorage;var n="__mplss_"+F(8);e.setItem(n,"xyz"),"xyz"!==e.getItem(n)&&(s=!1),e.removeItem(n)}catch(e){s=!1}return D=s,s};O.localStorage={is_supported:function(e){var t=M(null,e);return t||L.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){L.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){O.localStorage.error(e)}return null},parse:function(e){try{return O.JSONDecode(O.localStorage.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(e){O.localStorage.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){O.localStorage.error(e)}}},O.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,s,n,i,r){if(t)if(t.addEventListener&&!i)t.addEventListener(s,n,!!r);else{var o="on"+s,a=t[o];t[o]=function(t,s,n){return function(i){if(i=i||e(window.event)){var r,o,a=!0;return O.isFunction(n)&&(r=n(i)),o=s.call(t,i),!1!==r&&!1!==o||(a=!1),a}}}(t,n,a)}else L.error("No valid element provided to register_event")}}();var R=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');O.dom_query=function(){function e(e){return e.all?e.all:e.getElementsByTagName("*")}var t=/[\t\r\n]/g;function s(e,s){var n=" "+s+" ";return(" "+e.className+" ").replace(t," ").indexOf(n)>=0}function n(t){if(!x.getElementsByTagName)return[];var n,i,r,o,a,u,c,l,d,h,p=t.split(" "),f=[x];for(u=0;u<p.length;u++)if((n=p[u].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){r=(i=n.split("#"))[0];var _=i[1],m=x.getElementById(_);if(!m||r&&m.nodeName.toLowerCase()!=r)return[];f=[m]}else if(n.indexOf(".")>-1){r=(i=n.split("."))[0];var g=i[1];for(r||(r="*"),o=[],a=0,c=0;c<f.length;c++)for(d="*"==r?e(f[c]):f[c].getElementsByTagName(r),l=0;l<d.length;l++)o[a++]=d[l];for(f=[],h=0,c=0;c<o.length;c++)o[c].className&&O.isString(o[c].className)&&s(o[c],g)&&(f[h++]=o[c])}else{var v=n.match(R);if(v){r=v[1];var y,w=v[2],b=v[3],k=v[4];for(r||(r="*"),o=[],a=0,c=0;c<f.length;c++)for(d="*"==r?e(f[c]):f[c].getElementsByTagName(r),l=0;l<d.length;l++)o[a++]=d[l];switch(f=[],h=0,b){case"=":y=function(e){return e.getAttribute(w)==k};break;case"~":y=function(e){return e.getAttribute(w).match(new RegExp("\\b"+k+"\\b"))};break;case"|":y=function(e){return e.getAttribute(w).match(new RegExp("^"+k+"-?"))};break;case"^":y=function(e){return 0===e.getAttribute(w).indexOf(k)};break;case"$":y=function(e){return e.getAttribute(w).lastIndexOf(k)==e.getAttribute(w).length-k.length};break;case"*":y=function(e){return e.getAttribute(w).indexOf(k)>-1};break;default:y=function(e){return e.getAttribute(w)}}for(f=[],h=0,c=0;c<o.length;c++)y(o[c])&&(f[h++]=o[c])}else{for(r=n,o=[],a=0,c=0;c<f.length;c++)for(d=f[c].getElementsByTagName(r),l=0;l<d.length;l++)o[a++]=d[l];f=o}}return f}return function(e){return O.isElement(e)?[e]:O.isObject(e)&&!O.isUndefined(e.length)?e:n.call(this,e)}}(),O.info={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),t="",s={};return O.each(e,(function(e){(t=O.getQueryParam(x.URL,e)).length&&(s[e]=t)})),s},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=O.info.searchEngine(e),s="yahoo"!=t?"q":"p",n={};if(null!==t){n.$search_engine=t;var i=O.getQueryParam(e,s);i.length&&(n.mp_keyword=i)}return n},browser:function(e,t,s){return t=t||"",s||O.includes(e," OPR/")?O.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":O.includes(e,"IEMobile")||O.includes(e,"WPDesktop")?"Internet Explorer Mobile":O.includes(e,"SamsungBrowser/")?"Samsung Internet":O.includes(e,"Edge")||O.includes(e,"Edg/")?"Microsoft Edge":O.includes(e,"FBIOS")?"Facebook Mobile":O.includes(e,"Chrome")?"Chrome":O.includes(e,"CriOS")?"Chrome iOS":O.includes(e,"UCWEB")||O.includes(e,"UCBrowser")?"UC Browser":O.includes(e,"FxiOS")?"Firefox iOS":O.includes(t,"Apple")?O.includes(e,"Mobile")?"Mobile Safari":"Safari":O.includes(e,"Android")?"Android Mobile":O.includes(e,"Konqueror")?"Konqueror":O.includes(e,"Firefox")?"Firefox":O.includes(e,"MSIE")||O.includes(e,"Trident/")?"Internet Explorer":O.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,s){var n={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[O.info.browser(e,t,s)];if(void 0===n)return null;var i=e.match(n);return i?parseFloat(i[i.length-2]):null},os:function(){var e=E;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},properties:function(){return O.extend(O.strip_empty_properties({$os:O.info.os(),$browser:O.info.browser(E,k.vendor,S),$referrer:x.referrer,$referring_domain:O.info.referringDomain(x.referrer),$device:O.info.device(E)}),{$current_url:t.location.href,$browser_version:O.info.browserVersion(E,k.vendor,S),$screen_height:C.height,$screen_width:C.width,mp_lib:"web",$lib_version:s.LIB_VERSION,$insert_id:F(),time:O.timestamp()/1e3})},people_properties:function(){return O.extend(O.strip_empty_properties({$os:O.info.os(),$browser:O.info.browser(E,k.vendor,S)}),{$browser_version:O.info.browserVersion(E,k.vendor,S)})},pageviewInfo:function(e){return O.strip_empty_properties({mp_page:e,mp_referrer:x.referrer,mp_browser:O.info.browser(E,k.vendor,S),mp_platform:O.info.os()})}};var F=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},H=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,W=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,U=function(e){var t=W,s=e.split("."),n=s[s.length-1];(n.length>4||"com"===n||"org"===n)&&(t=H);var i=e.match(t);return i?i[0]:""},$=null,Q=null;"undefined"!=typeof JSON&&($=JSON.stringify,Q=JSON.parse),$=$||O.JSONEncode,Q=Q||O.JSONDecode,O.toArray=O.toArray,O.isObject=O.isObject,O.JSONEncode=O.JSONEncode,O.JSONDecode=O.JSONDecode,O.isBlockedUA=O.isBlockedUA,O.isEmptyObject=O.isEmptyObject,O.info=O.info,O.info.device=O.info.device,O.info.browser=O.info.browser,O.info.browserVersion=O.info.browserVersion,O.info.properties=O.info.properties;var K=function(){};K.prototype.create_properties=function(){},K.prototype.event_handler=function(){},K.prototype.after_track_handler=function(){},K.prototype.init=function(e){return this.mp=e,this},K.prototype.track=function(e,t,s,n){var i=this,r=O.dom_query(e);if(0!==r.length)return O.each(r,(function(e){O.register_event(e,this.override_event,(function(e){var r={},o=i.create_properties(s,this),a=i.mp.get_config("track_links_timeout");i.event_handler(e,this,r),window.setTimeout(i.track_callback(n,o,r,!0),a),i.mp.track(t,o,i.track_callback(n,o,r))}))}),this),!0;L.error("The DOM query ("+e+") returned 0 elements")},K.prototype.track_callback=function(e,t,s,n){n=n||!1;var i=this;return function(){s.callback_fired||(s.callback_fired=!0,e&&!1===e(n,t)||i.after_track_handler(t,s,n))}},K.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):O.extend({},e)};var V=function(){this.override_event="click"};O.inherit(V,K),V.prototype.create_properties=function(e,t){var s=V.superclass.create_properties.apply(this,arguments);return t.href&&(s.url=t.href),s},V.prototype.event_handler=function(e,t,s){s.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,s.href=t.href,s.new_tab||e.preventDefault()},V.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout((function(){window.location=t.href}),0)};var J=function(){this.override_event="submit"};O.inherit(J,K),J.prototype.event_handler=function(e,t,s){s.element=t,e.preventDefault()},J.prototype.after_track_handler=function(e,t){setTimeout((function(){t.element.submit()}),0)};var X=B("lock"),G=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};G.prototype.withLock=function(e,t,s){s||"function"==typeof t||(s=t,t=null);var n=s||(new Date).getTime()+"|"+Math.random(),i=(new Date).getTime(),r=this.storageKey,o=this.pollIntervalMS,a=this.timeoutMS,u=this.storage,c=r+":X",l=r+":Y",d=r+":Z",h=function(e){t&&t(e)},p=function(e){if((new Date).getTime()-i>a)return X.error("Timeout waiting for mutex on "+r+"; clearing lock. ["+n+"]"),u.removeItem(d),u.removeItem(l),void m();setTimeout((function(){try{e()}catch(e){h(e)}}),o*(Math.random()+.1))},f=function(e,t){e()?t():p((function(){f(e,t)}))},_=function(){var e=u.getItem(l);if(e&&e!==n)return!1;if(u.setItem(l,n),u.getItem(l)===n)return!0;if(!M(u,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},m=function(){u.setItem(c,n),f(_,(function(){u.getItem(c)!==n?p((function(){u.getItem(l)===n?f((function(){return!u.getItem(d)}),g):m()})):g()}))},g=function(){u.setItem(d,"1");try{e()}finally{u.removeItem(d),u.getItem(l)===n&&u.removeItem(l),u.getItem(c)===n&&u.removeItem(c)}};try{if(!M(u,!0))throw new Error("localStorage support check failed");m()}catch(e){h(e)}};var Z=B("batch"),Y=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||O.bind(Z.error,Z),this.lock=new G(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};Y.prototype.enqueue=function(e,t,s){var n={id:F(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(O.bind((function(){var t;try{var i=this.readFromStorage();i.push(n),(t=this.saveToStorage(i))&&this.memQueue.push(n)}catch(s){this.reportError("Error enqueueing item",e),t=!1}s&&s(t)}),this),O.bind((function(e){this.reportError("Error acquiring storage lock",e),s&&s(!1)}),this),this.pid)},Y.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.length<e){var s=this.readFromStorage();if(s.length){var n={};O.each(t,(function(e){n[e.id]=!0}));for(var i=0;i<s.length;i++){var r=s[i];if((new Date).getTime()>r.flushAfter&&!n[r.id]&&(r.orphaned=!0,t.push(r),t.length>=e))break}}}return t};var ee=function(e,t){var s=[];return O.each(e,(function(e){e.id&&!t[e.id]&&s.push(e)})),s};Y.prototype.removeItemsByID=function(e,t){var s={};O.each(e,(function(e){s[e]=!0})),this.memQueue=ee(this.memQueue,s);var n=O.bind((function(){var t;try{var n=this.readFromStorage();if(n=ee(n,s),t=this.saveToStorage(n)){n=this.readFromStorage();for(var i=0;i<n.length;i++){var r=n[i];if(r.id&&s[r.id])return this.reportError("Item not removed from storage"),!1}}}catch(s){this.reportError("Error removing items",e),t=!1}return t}),this);this.lock.withLock((function(){var e=n();t&&t(e)}),O.bind((function(e){var s=!1;if(this.reportError("Error acquiring storage lock",e),!M(this.storage,!0)&&!(s=n()))try{this.storage.removeItem(this.storageKey)}catch(e){this.reportError("Error clearing queue",e)}t&&t(s)}),this),this.pid)};var te=function(e,t){var s=[];return O.each(e,(function(e){var n=e.id;if(n in t){var i=t[n];null!==i&&(e.payload=i,s.push(e))}else s.push(e)})),s};Y.prototype.updatePayloads=function(e,t){this.memQueue=te(this.memQueue,e),this.lock.withLock(O.bind((function(){var s;try{var n=this.readFromStorage();n=te(n,e),s=this.saveToStorage(n)}catch(t){this.reportError("Error updating items",e),s=!1}t&&t(s)}),this),O.bind((function(e){this.reportError("Error acquiring storage lock",e),t&&t(!1)}),this),this.pid)},Y.prototype.readFromStorage=function(){var e;try{(e=this.storage.getItem(this.storageKey))&&(e=Q(e),O.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null))}catch(t){this.reportError("Error retrieving queue",t),e=null}return e||[]},Y.prototype.saveToStorage=function(e){try{return this.storage.setItem(this.storageKey,$(e)),!0}catch(e){return this.reportError("Error saving queue",e),!1}},Y.prototype.clear=function(){this.memQueue=[],this.storage.removeItem(this.storageKey)};var se=B("batch"),ne=function(e,t){this.errorReporter=t.errorReporter,this.queue=new Y(e,{errorReporter:O.bind(this.reportError,this),storage:t.storage}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0};ne.prototype.enqueue=function(e,t){this.queue.enqueue(e,this.flushInterval,t)},ne.prototype.start=function(){this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},ne.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},ne.prototype.clear=function(){this.queue.clear()},ne.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},ne.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},ne.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(O.bind(this.flush,this),this.flushInterval))},ne.prototype.flush=function(e){try{if(this.requestInProgress)return void se.log("Flush: Request already in progress");e=e||{};var t=this.libConfig.batch_request_timeout_ms,s=(new Date).getTime(),n=this.batchSize,i=this.queue.fillBatch(n),r=[],o={};if(O.each(i,(function(e){var t=e.payload;this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t&&r.push(t),o[e.id]=t}),this),r.length<1)return void this.resetFlush();this.requestInProgress=!0;var a=O.bind((function(r){this.requestInProgress=!1;try{var a=!1;if(e.unloading)this.queue.updatePayloads(o);else if(O.isObject(r)&&"timeout"===r.error&&(new Date).getTime()-s>=t)this.reportError("Network timeout; retrying"),this.flush();else if(O.isObject(r)&&r.xhr_req&&(r.xhr_req.status>=500||429===r.xhr_req.status||"timeout"===r.error)){var u=2*this.flushInterval,c=r.xhr_req.responseHeaders;if(c){var l=c["Retry-After"];l&&(u=1e3*parseInt(l,10)||u)}u=Math.min(6e5,u),this.reportError("Error; retry in "+u+" ms"),this.scheduleFlush(u)}else if(O.isObject(r)&&r.xhr_req&&413===r.xhr_req.status)if(i.length>1){var d=Math.max(1,Math.floor(n/2));this.batchSize=Math.min(this.batchSize,d,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),a=!0;else a=!0;a&&this.queue.removeItemsByID(O.map(i,(function(e){return e.id})),O.bind((function(e){e?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())}),this))}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}}),this),u={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(u.transport="sendBeacon"),se.log("MIXPANEL REQUEST:",r),this.sendRequest(r,u,a)}catch(e){this.reportError("Error flushing request queue",e),this.resetFlush()}},ne.prototype.reportError=function(e,t){if(se.error.apply(se.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){se.error(t)}};function ie(e,t){_e(!0,e,t)}function re(e,t){_e(!1,e,t)}function oe(e,t){return"1"===fe(e,t)}function ae(e,s){if(function(e){if(e&&e.ignoreDnt)return!1;var s=e&&e.window||t,n=s.navigator||{},i=!1;return O.each([n.doNotTrack,n.msDoNotTrack,s.doNotTrack],(function(e){O.includes([!0,1,"1","yes"],e)&&(i=!0)})),i}(s))return L.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n="0"===fe(e,s);return n&&L.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function ue(e){return me(e,(function(e){return this.get_config(e)}))}function ce(e){return me(e,(function(e){return this._get_config(e)}))}function le(e){return me(e,(function(e){return this._get_config(e)}))}function de(e,t){he(t=t||{}).remove(pe(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function he(e){return"localStorage"===(e=e||{}).persistenceType?O.localStorage:O.cookie}function pe(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function fe(e,t){return he(t).get(pe(e,t))}function _e(e,t,s){O.isString(t)&&t.length?(he(s=s||{}).set(pe(t,s),e?1:0,O.isNumber(s.cookieExpiration)?s.cookieExpiration:null,!!s.crossSubdomainCookie,!!s.secureCookie,!!s.crossSiteCookie,s.cookieDomain),s.track&&e&&s.track(s.trackEventName||"$opt_in",s.trackProperties,{send_immediately:!0})):L.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function me(e,t){return function(){var s=!1;try{var n=t.call(this,"token"),i=t.call(this,"ignore_dnt"),r=t.call(this,"opt_out_tracking_persistence_type"),o=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");n&&(s=ae(n,{ignoreDnt:i,persistenceType:r,persistencePrefix:o,window:a}))}catch(e){L.error("Unexpected error when checking tracking opt-out status: "+e)}if(!s)return e.apply(this,arguments);var u=arguments[arguments.length-1];"function"==typeof u&&u(0)}}var ge="$set",ve="$set_once",ye="$unset",we="$add",be="$append",ke="$union",xe="$remove",Se={set_action:function(e,t){var s={},n={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=e)}),this):n[e]=t,s.$set=n,s},unset_action:function(e){var t={},s=[];return O.isArray(e)||(e=[e]),O.each(e,(function(e){this._is_reserved_property(e)||s.push(e)}),this),t.$unset=s,t},set_once_action:function(e,t){var s={},n={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=e)}),this):n[e]=t,s.$set_once=n,s},union_action:function(e,t){var s={},n={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=O.isArray(e)?e:[e])}),this):n[e]=O.isArray(t)?t:[t],s.$union=n,s},append_action:function(e,t){var s={},n={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=e)}),this):n[e]=t,s.$append=n,s},remove_action:function(e,t){var s={},n={};return O.isObject(e)?O.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=e)}),this):n[e]=t,s.$remove=n,s},delete_action:function(){var e={$delete:""};return e}},Ce=function(){};O.extend(Ce.prototype,Se),Ce.prototype._init=function(e,t,s){this._mixpanel=e,this._group_key=t,this._group_id=s},Ce.prototype.set=le((function(e,t,s){var n=this.set_action(e,t);return O.isObject(e)&&(s=t),this._send_request(n,s)})),Ce.prototype.set_once=le((function(e,t,s){var n=this.set_once_action(e,t);return O.isObject(e)&&(s=t),this._send_request(n,s)})),Ce.prototype.unset=le((function(e,t){var s=this.unset_action(e);return this._send_request(s,t)})),Ce.prototype.union=le((function(e,t,s){O.isObject(e)&&(s=t);var n=this.union_action(e,t);return this._send_request(n,s)})),Ce.prototype.delete=le((function(e){var t=this.delete_action();return this._send_request(t,e)})),Ce.prototype.remove=le((function(e,t,s){var n=this.remove_action(e,t);return this._send_request(n,s)})),Ce.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var s=O.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:s,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)},Ce.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},Ce.prototype._get_config=function(e){return this._mixpanel.get_config(e)},Ce.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Ce.prototype.remove=Ce.prototype.remove,Ce.prototype.set=Ce.prototype.set,Ce.prototype.set_once=Ce.prototype.set_once,Ce.prototype.union=Ce.prototype.union,Ce.prototype.unset=Ce.prototype.unset,Ce.prototype.toString=Ce.prototype.toString;var Ee=function(){};O.extend(Ee.prototype,Se),Ee.prototype._init=function(e){this._mixpanel=e},Ee.prototype.set=ce((function(e,t,s){var n=this.set_action(e,t);return O.isObject(e)&&(s=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n.$set=O.extend({},O.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),n.$set),this._send_request(n,s)})),Ee.prototype.set_once=ce((function(e,t,s){var n=this.set_once_action(e,t);return O.isObject(e)&&(s=t),this._send_request(n,s)})),Ee.prototype.unset=ce((function(e,t){var s=this.unset_action(e);return this._send_request(s,t)})),Ee.prototype.increment=ce((function(e,t,s){var n={},i={};return O.isObject(e)?(O.each(e,(function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void L.error("Invalid increment value passed to mixpanel.people.increment - must be a number");i[t]=e}}),this),s=t):(O.isUndefined(t)&&(t=1),i[e]=t),n.$add=i,this._send_request(n,s)})),Ee.prototype.append=ce((function(e,t,s){O.isObject(e)&&(s=t);var n=this.append_action(e,t);return this._send_request(n,s)})),Ee.prototype.remove=ce((function(e,t,s){O.isObject(e)&&(s=t);var n=this.remove_action(e,t);return this._send_request(n,s)})),Ee.prototype.union=ce((function(e,t,s){O.isObject(e)&&(s=t);var n=this.union_action(e,t);return this._send_request(n,s)})),Ee.prototype.track_charge=ce((function(e,t,s){if(O.isNumber(e)||(e=parseFloat(e),!isNaN(e)))return this.append("$transactions",O.extend({$amount:e},t),s);L.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),Ee.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},Ee.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}L.error("mixpanel.people.delete_user() requires you to call identify() first")},Ee.prototype.toString=function(){return this._mixpanel.toString()+".people"},Ee.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var s=this._mixpanel.get_property("$device_id"),n=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");s&&(e.$device_id=s),n&&(e.$user_id=n),i&&(e.$had_persisted_distinct_id=i);var r=O.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:r,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),O.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),O.truncate(r,255))},Ee.prototype._get_config=function(e){return this._mixpanel.get_config(e)},Ee.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},Ee.prototype._enqueue=function(e){ge in e?this._mixpanel.persistence._add_to_people_queue(ge,e):ve in e?this._mixpanel.persistence._add_to_people_queue(ve,e):ye in e?this._mixpanel.persistence._add_to_people_queue(ye,e):we in e?this._mixpanel.persistence._add_to_people_queue(we,e):be in e?this._mixpanel.persistence._add_to_people_queue(be,e):xe in e?this._mixpanel.persistence._add_to_people_queue(xe,e):ke in e?this._mixpanel.persistence._add_to_people_queue(ke,e):L.error("Invalid call to _enqueue():",e)},Ee.prototype._flush_one_queue=function(e,t,s,n){var i=this,r=O.extend({},this._mixpanel.persistence._get_queue(e)),o=r;O.isUndefined(r)||!O.isObject(r)||O.isEmptyObject(r)||(i._mixpanel.persistence._pop_from_people_queue(e,r),n&&(o=n(r)),t.call(i,o,(function(t,n){0===t&&i._mixpanel.persistence._add_to_people_queue(e,r),O.isUndefined(s)||s(t,n)})))},Ee.prototype._flush=function(e,t,s,n,i,r,o){var a=this,u=this._mixpanel.persistence._get_queue(be),c=this._mixpanel.persistence._get_queue(xe);if(this._flush_one_queue(ge,this.set,e),this._flush_one_queue(ve,this.set_once,n),this._flush_one_queue(ye,this.unset,r,(function(e){return O.keys(e)})),this._flush_one_queue(we,this.increment,t),this._flush_one_queue(ke,this.union,i),!O.isUndefined(u)&&O.isArray(u)&&u.length){for(var l,d=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(be,l),O.isUndefined(s)||s(e,t)},h=u.length-1;h>=0;h--)l=u.pop(),O.isEmptyObject(l)||a.append(l,d);a._mixpanel.persistence.save()}if(!O.isUndefined(c)&&O.isArray(c)&&c.length){for(var p,f=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(xe,p),O.isUndefined(o)||o(e,t)},_=c.length-1;_>=0;_--)p=c.pop(),O.isEmptyObject(p)||a.remove(p,f);a._mixpanel.persistence.save()}},Ee.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},Ee.prototype.set=Ee.prototype.set,Ee.prototype.set_once=Ee.prototype.set_once,Ee.prototype.unset=Ee.prototype.unset,Ee.prototype.increment=Ee.prototype.increment,Ee.prototype.append=Ee.prototype.append,Ee.prototype.remove=Ee.prototype.remove,Ee.prototype.union=Ee.prototype.union,Ee.prototype.track_charge=Ee.prototype.track_charge,Ee.prototype.clear_charges=Ee.prototype.clear_charges,Ee.prototype.delete_user=Ee.prototype.delete_user,Ee.prototype.toString=Ee.prototype.toString;var Ne,je,Te="__mps",Ie="__mpso",Pe="__mpus",qe="__mpa",Oe="__mpap",Le="__mpr",ze="__mpu",Be="$people_distinct_id",Ae="__alias",De="__timers",Me=[Te,Ie,Pe,qe,Oe,Le,ze,Be,Ae,De],Re=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(L.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&O.localStorage.is_supported()?this.storage=O.localStorage:this.storage=O.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};Re.prototype.properties=function(){var e={};return O.each(this.props,(function(t,s){O.include(Me,s)||(e[s]=t)})),e},Re.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=O.extend({},e))}},Re.prototype.upgrade=function(e){var t,s,n=e.upgrade;n&&(t="mp_super_properties","string"==typeof n&&(t=n),s=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),s&&(this.props=O.extend(this.props,s.all,s.events))),e.cookie_name||"mixpanel"===e.name||(t="mp_"+e.token+"_"+e.name,(s=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(s))),this.storage===O.localStorage&&(s=O.cookie.parse(this.name),O.cookie.remove(this.name),O.cookie.remove(this.name,!0),s&&this.register_once(s))},Re.prototype.save=function(){this.disabled||this.storage.set(this.name,O.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},Re.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},Re.prototype.clear=function(){this.remove(),this.props={}},Re.prototype.register_once=function(e,t,s){return!!O.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===s?this.default_expiry:s,O.each(e,(function(e,s){this.props.hasOwnProperty(s)&&this.props[s]!==t||(this.props[s]=e)}),this),this.save(),!0)},Re.prototype.register=function(e,t){return!!O.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,O.extend(this.props,e),this.save(),!0)},Re.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},Re.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(O.info.campaignParams()),this.campaign_params_saved=!0)},Re.prototype.update_search_keyword=function(e){this.register(O.info.searchInfo(e))},Re.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:O.info.referringDomain(e)||"$direct"},"")},Re.prototype.get_referrer_info=function(){return O.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Re.prototype.safe_merge=function(e){return O.each(this.props,(function(t,s){s in e||(e[s]=t)})),e},Re.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},Re.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},Re.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},Re.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},Re.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},Re.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Re.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},Re.prototype._add_to_people_queue=function(e,t){var s=this._get_queue_key(e),n=t[e],i=this._get_or_create_queue(ge),r=this._get_or_create_queue(ve),o=this._get_or_create_queue(ye),a=this._get_or_create_queue(we),u=this._get_or_create_queue(ke),c=this._get_or_create_queue(xe,[]),l=this._get_or_create_queue(be,[]);s===Te?(O.extend(i,n),this._pop_from_people_queue(we,n),this._pop_from_people_queue(ke,n),this._pop_from_people_queue(ye,n)):s===Ie?(O.each(n,(function(e,t){t in r||(r[t]=e)})),this._pop_from_people_queue(ye,n)):s===Pe?O.each(n,(function(e){O.each([i,r,a,u],(function(t){e in t&&delete t[e]})),O.each(l,(function(t){e in t&&delete t[e]})),o[e]=!0})):s===qe?(O.each(n,(function(e,t){t in i?i[t]+=e:(t in a||(a[t]=0),a[t]+=e)}),this),this._pop_from_people_queue(ye,n)):s===ze?(O.each(n,(function(e,t){O.isArray(e)&&(t in u||(u[t]=[]),u[t]=u[t].concat(e))})),this._pop_from_people_queue(ye,n)):s===Le?(c.push(n),this._pop_from_people_queue(be,n)):s===Oe&&(l.push(n),this._pop_from_people_queue(ye,n)),L.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),L.log(t),this.save()},Re.prototype._pop_from_people_queue=function(e,t){var s=this._get_queue(e);O.isUndefined(s)||(O.each(t,(function(t,n){e===be||e===xe?O.each(s,(function(e){e[n]===t&&delete e[n]})):delete s[n]}),this),this.save())},Re.prototype._get_queue_key=function(e){return e===ge?Te:e===ve?Ie:e===ye?Pe:e===we?qe:e===be?Oe:e===xe?Le:e===ke?ze:void L.error("Invalid queue:",e)},Re.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]},Re.prototype._get_or_create_queue=function(e,t){var s=this._get_queue_key(e);return t=O.isUndefined(t)?{}:t,this.props[s]||(this.props[s]=t)},Re.prototype.set_event_timer=function(e,t){var s=this.props.__timers||{};s[e]=t,this.props.__timers=s,this.save()},Re.prototype.remove_event_timer=function(e){var t=(this.props.__timers||{})[e];return O.isUndefined(t)||(delete this.props.__timers[e],this.save()),t};var Fe=function(e){return e},He=function(){},We="mixpanel",Ue="base64",$e=t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Qe=!$e&&-1===E.indexOf("MSIE")&&-1===E.indexOf("Mozilla"),Ke=null;k.sendBeacon&&(Ke=function(){return k.sendBeacon.apply(k,arguments)});var Ve={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:Ue,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:He,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:He,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},Je=!1,Xe=function(){},Ge=function(e,t,n){var i,r=n===We?je:je[n];if(r&&0===Ne)i=r;else{if(r&&!O.isArray(r))return void L.error("You have already initialized "+n);i=new Xe}return i._cached_groups={},i._init(e,t,n),i.people=new Ee,i.people._init(i),s.DEBUG=s.DEBUG||i.get_config("debug"),!O.isUndefined(r)&&O.isArray(r)&&(i._execute_array.call(i.people,r.people),i._execute_array(r)),i};Xe.prototype.init=function(e,t,s){if(O.isUndefined(s))this.report_error("You must name your new library: init(token, config, name)");else{if(s!==We){var n=Ge(e,t,s);return je[s]=n,n._loaded(),n}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},Xe.prototype._init=function(e,s,n){s=s||{},this.__loaded=!0,this.config={};var i={};"api_payload_format"in s||(s.api_host||Ve.api_host).match(/\.mixpanel\.com$/)&&(i.api_payload_format="json");if(this.set_config(O.extend({},Ve,i,s,{name:n,token:e,callback_fn:(n===We?n:"mixpanel."+n)+"._jsc"})),this._jsc=He,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(O.localStorage.is_supported(!0)&&$e){if(this.init_batchers(),Ke&&t.addEventListener){var r=O.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this);t.addEventListener("pagehide",(function(e){e.persisted&&r()})),t.addEventListener("visibilitychange",(function(){"hidden"===x.visibilityState&&r()}))}}else this._batch_requests=!1,L.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");this.persistence=this.cookie=new Re(this.config),this.unpersisted_superprops={},this._gdpr_init();var o=O.UUID();this.get_distinct_id()||this.register_once({distinct_id:o,$device_id:o},"")},Xe.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()},Xe.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(x.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(x.referrer)},Xe.prototype._dom_loaded=function(){O.each(this.__dom_loaded_queue,(function(e){this._track_dom.apply(this,e)}),this),this.has_opted_out_tracking()||O.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},Xe.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Je)return this.__dom_loaded_queue.push([e,t]),!1;var s=(new e).init(this);return s.track.apply(s,t)},Xe.prototype._prepare_callback=function(e,t){if(O.isUndefined(e))return null;if($e){return function(s){e(s,t)}}var s=this._jsc,n=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+n+"]";return s[n]=function(i){delete s[n],e(i,t)},i},Xe.prototype._send_request=function(e,t,s,n){var i=!0;if(Qe)return this.__request_queue.push(arguments),i;var r={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},o=null;n||!O.isFunction(s)&&"string"!=typeof s||(n=s,s=null),s=O.extend(r,s||{}),$e||(s.method="GET");var a="POST"===s.method,u=Ke&&a&&"sendbeacon"===s.transport.toLowerCase(),c=s.verbose;t.verbose&&(c=!0),this.get_config("test")&&(t.test=1),c&&(t.verbose=1),this.get_config("img")&&(t.img=1),$e||(n?t.callback=n:(c||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),a&&(o="data="+encodeURIComponent(t.data),delete t.data),e+="?"+O.HTTPBuildQuery(t);var l=this;if("img"in t){var d=x.createElement("img");d.src=e,x.body.appendChild(d)}else if(u){try{i=Ke(e,o)}catch(e){l.report_error(e),i=!1}try{n&&n(i?1:0)}catch(e){l.report_error(e)}}else if($e)try{var h=new XMLHttpRequest;h.open(s.method,e,!0);var p=this.get_config("xhr_headers");if(a&&(p["Content-Type"]="application/x-www-form-urlencoded"),O.each(p,(function(e,t){h.setRequestHeader(t,e)})),s.timeout_ms&&void 0!==h.timeout){h.timeout=s.timeout_ms;var f=(new Date).getTime()}h.withCredentials=!0,h.onreadystatechange=function(){var e;if(4===h.readyState)if(200===h.status){if(n)if(c){var t;try{t=O.JSONDecode(h.responseText)}catch(e){if(l.report_error(e),!s.ignore_json_errors)return;t=h.responseText}n(t)}else n(Number(h.responseText))}else e=h.timeout&&!h.status&&(new Date).getTime()-f>=h.timeout?"timeout":"Bad HTTP status: "+h.status+" "+h.statusText,l.report_error(e),n&&n(c?{status:0,error:e,xhr_req:h}:0)},h.send(o)}catch(e){l.report_error(e),i=!1}else{var _=x.createElement("script");_.type="text/javascript",_.async=!0,_.defer=!0,_.src=e;var m=x.getElementsByTagName("script")[0];m.parentNode.insertBefore(_,m)}return i},Xe.prototype._execute_array=function(e){var t,s=[],n=[],i=[];O.each(e,(function(e){e&&(t=e[0],O.isArray(t)?i.push(e):"function"==typeof e?e.call(this):O.isArray(e)&&"alias"===t?s.push(e):O.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):n.push(e))}),this);var r=function(e,t){O.each(e,(function(e){if(O.isArray(e[0])){var s=t;O.each(e,(function(e){s=s[e[0]].apply(s,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};r(s,this),r(n,this),r(i,this)},Xe.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},Xe.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=O.bind((function(t){return new ne("__mpq_"+e+t.queue_suffix,{libConfig:this.config,sendRequestFunc:O.bind((function(e,s,n){this._send_request(this.get_config("api_host")+t.endpoint,this._encode_data_for_request(e),s,this._prepare_callback(n,e))}),this),beforeSendHook:O.bind((function(e){return this._run_hook("before_send_"+t.type,e)}),this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:O.bind(this.stop_batch_senders,this)})}),this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()},Xe.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,O.each(this.request_batchers,(function(e){e.start()})))},Xe.prototype.stop_batch_senders=function(){this._batch_requests=!1,O.each(this.request_batchers,(function(e){e.stop(),e.clear()}))},Xe.prototype.push=function(e){this._execute_array([e])},Xe.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},Xe.prototype._encode_data_for_request=function(e){var t=O.JSONEncode(e);return this.get_config("api_payload_format")===Ue&&(t=O.base64Encode(t)),{data:t}},Xe.prototype._track_or_batch=function(e,t){var s=O.truncate(e.data,255),n=e.endpoint,i=e.batcher,r=e.should_send_immediately,o=e.send_request_options||{};t=t||He;var a=!0,u=O.bind((function(){return o.skip_hooks||(s=this._run_hook("before_send_"+e.type,s)),s?(L.log("MIXPANEL REQUEST:"),L.log(s),this._send_request(n,this._encode_data_for_request(s),o,this._prepare_callback(t,s))):null}),this);return this._batch_requests&&!r?i.enqueue(s,(function(e){e?t(1,s):u()})):a=u(),a&&s},Xe.prototype.track=ue((function(e,t,s,n){n||"function"!=typeof s||(n=s,s=null);var i=(s=s||{}).transport;i&&(s.transport=i);var r=s.send_immediately;if("function"!=typeof n&&(n=He),O.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=t||{}).token=this.get_config("token");var o=this.persistence.remove_event_timer(e);if(!O.isUndefined(o)){var a=(new Date).getTime()-o;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops(),t=O.extend({},O.info.properties(),this.persistence.properties(),this.unpersisted_superprops,t);var u=this.get_config("property_blacklist");O.isArray(u)?O.each(u,(function(e){delete t[e]})):this.report_error("Invalid value for property_blacklist config: "+u);var c={event:e,properties:t};return this._track_or_batch({type:"events",data:c,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:r,send_request_options:s},n)}n(0)}})),Xe.prototype.set_group=ue((function(e,t,s){O.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,s)})),Xe.prototype.add_group=ue((function(e,t,s){var n=this.get_property(e);if(void 0===n){var i={};i[e]=[t],this.register(i)}else-1===n.indexOf(t)&&(n.push(t),this.register(i));return this.people.union(e,t,s)})),Xe.prototype.remove_group=ue((function(e,t,s){var n=this.get_property(e);if(void 0!==n){var i=n.indexOf(t);i>-1&&(n.splice(i,1),this.register({group_key:n})),0===n.length&&this.unregister(e)}return this.people.remove(e,t,s)})),Xe.prototype.track_with_groups=ue((function(e,t,s,n){var i=O.extend({},t||{});return O.each(s,(function(e,t){null!=e&&(i[t]=e)})),this.track(e,i,n)})),Xe.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},Xe.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},Xe.prototype.get_group=function(e,t){var s=this._create_map_key(e,t),n=this._cached_groups[s];return void 0!==n&&n._group_key===e&&n._group_id===t||((n=new Ce)._init(this,e,t),this._cached_groups[s]=n),n},Xe.prototype.track_pageview=function(e){O.isUndefined(e)&&(e=x.location.href),this.track("mp_page_view",O.info.pageviewInfo(e))},Xe.prototype.track_links=function(){return this._track_dom.call(this,V,arguments)},Xe.prototype.track_forms=function(){return this._track_dom.call(this,J,arguments)},Xe.prototype.time_event=function(e){O.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var Ze={persistent:!0},Ye=function(e){var t;return t=O.isObject(e)?e:O.isUndefined(e)?{}:{days:e},O.extend({},Ze,t)};Xe.prototype.register=function(e,t){var s=Ye(t);s.persistent?this.persistence.register(e,s.days):O.extend(this.unpersisted_superprops,e)},Xe.prototype.register_once=function(e,t,s){var n=Ye(s);n.persistent?this.persistence.register_once(e,t,n.days):(void 0===t&&(t="None"),O.each(e,(function(e,s){this.unpersisted_superprops.hasOwnProperty(s)&&this.unpersisted_superprops[s]!==t||(this.unpersisted_superprops[s]=e)}),this))},Xe.prototype.unregister=function(e,t){(t=Ye(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},Xe.prototype._register_single=function(e,t){var s={};s[e]=t,this.register(s)},Xe.prototype.identify=function(e,t,s,n,i,r,o,a){var u=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var c=u;this.register_once({$had_persisted_distinct_id:!0,$device_id:c},"")}e!==u&&e!==this.get_property(Ae)&&(this.unregister(Ae),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,s,n,i,r,o,a),e!==u&&this.track("$identify",{distinct_id:e,$anon_distinct_id:u},{skip_hooks:!0})},Xe.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=O.UUID();this.register_once({distinct_id:e,$device_id:e},"")},Xe.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},Xe.prototype.alias=function(e,t){if(e===this.get_property(Be))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var s=this;return O.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Ae,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},(function(){s.identify(e)}))):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},Xe.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},Xe.prototype.set_config=function(e){O.isObject(e)&&(O.extend(this.config,e),e.batch_size&&O.each(this.request_batchers,(function(e){e.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),s.DEBUG=s.DEBUG||this.get_config("debug"))},Xe.prototype.get_config=function(e){return this.config[e]},Xe.prototype._run_hook=function(e){var t=(this.config.hooks[e]||Fe).apply(this,v.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},Xe.prototype.get_property=function(e){return this.persistence.props[e]},Xe.prototype.toString=function(){var e=this.get_config("name");return e!==We&&(e="mixpanel."+e),e},Xe.prototype._event_is_disabled=function(e){return O.isBlockedUA(E)||this._flags.disable_all_events||O.include(this.__disabled_events,e)},Xe.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&O.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!O.cookie.get("mp_optout")||(O.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},Xe.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t&&O.each(this.request_batchers,(function(e){e.clear()}))},Xe.prototype._gdpr_call_func=function(e,t){return t=O.extend({track:O.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),O.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},Xe.prototype.opt_in_tracking=function(e){e=O.extend({enable_persistence:!0},e),this._gdpr_call_func(ie,e),this._gdpr_update_persistence(e)},Xe.prototype.opt_out_tracking=function(e){(e=O.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(re,e),this._gdpr_update_persistence(e)},Xe.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(oe,e)},Xe.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(ae,e)},Xe.prototype.clear_opt_in_out_tracking=function(e){e=O.extend({enable_persistence:!0},e),this._gdpr_call_func(de,e),this._gdpr_update_persistence(e)},Xe.prototype.report_error=function(e,t){L.error.apply(L.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){L.error(t)}},Xe.prototype.init=Xe.prototype.init,Xe.prototype.reset=Xe.prototype.reset,Xe.prototype.disable=Xe.prototype.disable,Xe.prototype.time_event=Xe.prototype.time_event,Xe.prototype.track=Xe.prototype.track,Xe.prototype.track_links=Xe.prototype.track_links,Xe.prototype.track_forms=Xe.prototype.track_forms,Xe.prototype.track_pageview=Xe.prototype.track_pageview,Xe.prototype.register=Xe.prototype.register,Xe.prototype.register_once=Xe.prototype.register_once,Xe.prototype.unregister=Xe.prototype.unregister,Xe.prototype.identify=Xe.prototype.identify,Xe.prototype.alias=Xe.prototype.alias,Xe.prototype.name_tag=Xe.prototype.name_tag,Xe.prototype.set_config=Xe.prototype.set_config,Xe.prototype.get_config=Xe.prototype.get_config,Xe.prototype.get_property=Xe.prototype.get_property,Xe.prototype.get_distinct_id=Xe.prototype.get_distinct_id,Xe.prototype.toString=Xe.prototype.toString,Xe.prototype.opt_out_tracking=Xe.prototype.opt_out_tracking,Xe.prototype.opt_in_tracking=Xe.prototype.opt_in_tracking,Xe.prototype.has_opted_out_tracking=Xe.prototype.has_opted_out_tracking,Xe.prototype.has_opted_in_tracking=Xe.prototype.has_opted_in_tracking,Xe.prototype.clear_opt_in_out_tracking=Xe.prototype.clear_opt_in_out_tracking,Xe.prototype.get_group=Xe.prototype.get_group,Xe.prototype.set_group=Xe.prototype.set_group,Xe.prototype.add_group=Xe.prototype.add_group,Xe.prototype.remove_group=Xe.prototype.remove_group,Xe.prototype.track_with_groups=Xe.prototype.track_with_groups,Xe.prototype.start_batch_senders=Xe.prototype.start_batch_senders,Xe.prototype.stop_batch_senders=Xe.prototype.stop_batch_senders,Re.prototype.properties=Re.prototype.properties,Re.prototype.update_search_keyword=Re.prototype.update_search_keyword,Re.prototype.update_referrer_info=Re.prototype.update_referrer_info,Re.prototype.get_cross_subdomain=Re.prototype.get_cross_subdomain,Re.prototype.clear=Re.prototype.clear;var et={},tt=function(){je.init=function(e,s,n){if(n)return je[n]||(je[n]=et[n]=Ge(e,s,n),je[n]._loaded()),je[n];var i=je;et.mixpanel?i=et.mixpanel:e&&((i=Ge(e,s,We))._loaded(),et.mixpanel=i),je=i,1===Ne&&(t.mixpanel=je),O.each(et,(function(e,t){t!==We&&(je[t]=e)})),je._=O}};var st=(Ne=0,je=new Xe,tt(),je.init(),function(){function e(){e.done||(e.done=!0,Je=!0,Qe=!1,O.each(et,(function(e){e._dom_loaded()})))}if(x.addEventListener)"complete"===x.readyState?e():x.addEventListener("DOMContentLoaded",e,!1);else if(x.attachEvent){x.attachEvent("onreadystatechange",e);var s=!1;try{s=null===t.frameElement}catch(e){}x.documentElement.doScroll&&s&&function t(){try{x.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}O.register_event(t,"load",e,!0)}(),je);e.exports=st},5311:function(e){"use strict";e.exports=jQuery}},t={};function s(n){var i=t[n];if(void 0!==i)return i.exports;var r=t[n]={id:n,loaded:!1,exports:{}};return e[n](r,r.exports,s),r.loaded=!0,r.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=e||{};window.WP_Smush=e,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)}),s(3065),s(6111),s(9478),s(7413),s(9867),s(3579),s(2140),s(1110),s(1442),s(5972),s(7447),s(4933),s(206)}()}();
//# sourceMappingURL=smush-admin.min.js.map

Spamworldpro Mini