jQuery(document).ready(function(o){let a=0;({initDownloadFonts(){o("#ff_download_fonts").addClass("is-loading").attr("disabled",!0),o(".ff_download_fonts_text").text("Downloading..."),o(".ff_download_loading").html("Please do not close this window when downloading the fonts, After downloading page will auto reload."),this.ajaxLoadFonts()},$post(d){let n=window.fluent_pdf_admin.ajaxUrl;return o.post(n,d)},ajaxLoadFonts(){a<95&&(a+=5),o(".ff_download_fonts_bar").animate({width:a+"%"},1e3),this.$post({action:"fluent_pdf_admin_ajax_actions",route:"downloadFonts"}).then(d=>{d.data.downloaded_files&&d.data.downloaded_files.length?(o(".ff_download_logs").prepend(d.data.downloaded_files.join("<br />")).show(),o(".ff_downlaod_logs").removeClass("hidden"),this.ajaxLoadFonts()):(o(".ff_download_fonts_bar").animate({width:"100%"},1e3),window.location.reload())}).fail(d=>{})},init(){o("#ff_download_fonts").on("click",d=>{d.preventDefault(),this.initDownloadFonts()})}}).init()});
