Sindbad~EG File Manager
!function(t,i){t(i).on("click.imagify",".imagify-tab",function(i){var e=t(this),a="imagify-current";i.preventDefault(),e.hasClass("imagify-current")||(i=e.find("a").attr("href")||"#"+e.find("a").attr("aria-controls"),e.closest(".imagify-tabs").next(".imagify-tabs-contents").find(".imagify-tab-content").hide().attr("aria-hidden","true"),t(i).fadeIn(275).attr("aria-hidden","false"),e.closest(".imagify-tabs").find(".imagify-tab").removeClass(a).attr("aria-selected","false"),e.addClass(a).attr("aria-selected","true"))})}(jQuery,document,window),function(b,i,k){var _={};b("#imagify-pricing-modal").length&&((_={$modal:b("#imagify-pricing-modal"),$checkboxes:b(".imagify-offer-line .imagify-checkbox"),$radios:b(".imagify-payment-modal .imagify-radio-line input"),$preView:b("#imagify-pre-checkout-view"),$plansView:b("#imagify-plans-selection-view").hide(),$paymentView:b("#imagify-payment-process-view").hide(),$successView:b("#imagify-success-view").hide(),$anotherBtn:b(".imagify-choose-another-plan"),speedFadeIn:300,getHtmlPrice:function(i,e){var a,t;return e=e||null,"object"!=typeof i?((i=(i+="").split("."))[1]=1===i[1].length?i[1]+"0":(""+i[1]).substring(0,2),t='<span class="imagify-price-big">'+i[0]+"</span> ",t+('<span class="imagify-price-mini">.'+i[1])+"</span>"):(a=i.monthly+"",i=i.yearly+"",a="0"===a?["0","00"]:a.split("."),i="0"===i?["0","00"]:i.split("."),(t=(t=(t=(t='<span class="imagify-switch-my">')+'<span aria-hidden="'+("monthly"===e?"false":"true")+'" class="imagify-monthly"><span class="imagify-price-big">'+a[0]+"</span> ")+'<span class="imagify-price-mini">.'+(1===a[1].length?a[1]+"0":(""+a[1]).substring(0,2))+"</span></span> ")+'<span aria-hidden="'+("yearly"===e?"false":"true")+'" class="imagify-yearly"><span class="imagify-price-big">'+i[0]+"</span> ")+'<span class="imagify-price-mini">.'+(1===i[1].length?i[1]+"0":(""+i[1]).substring(0,2))+"</span></span></span>")},getHtmlDiscountPrice:function(i,e){var a="";return e=e||null,a="object"==typeof i?(a=(a=(a+='<span class="imagify-price-discount"><span class="imagify-price-discount-dollar">$</span><span class="imagify-switch-my">')+'<span aria-hidden="'+("monthly"===e?"false":"true")+'" class="imagify-monthly"><span class="imagify-price-discount-number">'+(i.monthly+"")+"</span>")+'</span><span aria-hidden="'+("yearly"===e?"false":"true")+'" class="imagify-yearly">')+'<span class="imagify-price-discount-number">'+(i.yearly+"")+"</span></span></span></span>":(a+='<span class="imagify-price-discount"><span class="imagify-price-discount-dollar">$</span>')+'<span class="imagify-price-discount-number">'+(i+="")+"</span></span>"},populateOffer:function(i,e,a,t){var o,n=k.imagify_discount_datas,l=e.additional_gb,s=e.annual_cost,f=e.id,c=e.label,m=e.monthly_cost,r=e.quota,e=e.cost,d=-1===r?"Unlimited":1e3<=r?r/1e3+" GB":r+" MB",y="monthly"===a?{monthly:m,yearly:Math.round(s/12*100)/100}:e,g=y,p=[],p=_.getPromoAppliesTo(n);return n.is_active&&"percentage"===n.coupon_type&&"monthly"===a&&0<m&&(p.includes(c)||"all"===p[0])&&(o=(100-n.coupon_value)/100,y="monthly"===a?{monthly:m*o,yearly:Math.round(s*o/12*100)/100}:e*o),void 0!==t&&i.addClass("imagify-"+a+"-"+c+t),i.find(".imagify-offer-size").text(d),i.find(".imagify-number-block").html(_.getHtmlPrice(y,"monthly")),i.find(".imagify-price-block").prev(".imagify-price-discount").remove(),n.is_active&&"percentage"===n.coupon_type&&"monthly"===a&&0<m&&(p.includes(c)||"all"===p[0])&&i.find(".imagify-price-block").before(_.getHtmlDiscountPrice(g,"monthly")),i.find(".imagify-approx-nb").text(5*r),"monthly"===a&&i.find(".imagify-price-add-data").text("$"+l),s=i.find(".imagify-payment-btn-select-plan").length?i.find(".imagify-payment-btn-select-plan"):i,e="monthly"===a?'{"'+c+'":{"id":'+f+',"name":"'+d+'","label":"'+c+'","data":'+r+',"dataf":"'+d+'","imgs":'+5*r+',"prices":{"monthly":'+y.monthly+',"yearly":'+y.yearly+',"add":'+l+"}}}":'{"ot'+c+'":{"id":'+f+',"name":"'+d+'","label":"'+c+'","data":'+r+',"dataf":"'+d+'","imgs":'+5*r+',"price":'+y+"}}",s.attr("data-offer",e),i},populatePayBtn:function(){var i,e=b(".imagify-offer-monthly"),a=b(".imagify-offer-onetime"),t=0,o=0;e.length&&(i=JSON.parse(e.attr("data-offer")),e.hasClass("imagify-offer-selected"))&&(t=b("#imagify-subscription-monthly").filter(":checked").length?i[Object.keys(i)[0]].prices.monthly:12*i[Object.keys(i)[0]].prices.yearly),a.length&&(e=JSON.parse(a.attr("data-offer")),a.hasClass("imagify-offer-selected"))&&(o=e[Object.keys(e)[0]].price),"0.00"===(i=parseFloat(o+t).toFixed(2))||0===i?b("#imagify-modal-checkout-btn").prop("disabled",!0).addClass("imagify-button-disabled"):b("#imagify-modal-checkout-btn").prop("disabled",!1).removeClass("imagify-button-disabled")},checkCoupon:function(){var i,o=b("#imagify-coupon-code").val(),n=b(".imagify-coupon-text"),l=n.find("label"),s=b(".imagify-coupon-section");""===o?(s.removeClass("validated").removeClass("invalid"),l.html(imagifyPricingModal.labels.defaultCouponLabel)):(i=b("#imagify-get-pricing-modal").data("nonce"),n.addClass("checking"),b.post(ajaxurl,{action:"imagify_check_coupon",coupon:o,imagifynonce:i},function(i){var e,a,t;n.removeClass("checking"),i.success?i.data.success?(e="percentage"===i.data.coupon_type?i.data.value+"%":"$"+i.data.value,a=b(".imagify-pre-checkout-view .imagify-pre-checkout-offers .imagify-offer-line"),a=JSON.parse(a.attr("data-offer")),(t=_.getPromoAppliesTo(i.data)).includes(a[Object.keys(a)[0]].label)||"all"===t[0]?(s.removeClass("invalid").addClass("validated"),l.html(imagifyPricingModal.labels.successCouponAPI),l.find(".imagify-coupon-offer").text(e),l.find(".imagify-coupon-word").text(o)):(s.removeClass("validated").addClass("invalid"),l.html(imagifyPricingModal.labels.errorCouponPlan),b("#imagify-coupon-code").val(""))):(s.removeClass("validated").addClass("invalid"),l.text(i.data.detail)):(s.removeClass("validated").addClass("invalid"),l.text(imagifyPricingModal.labels.errorCouponAPI))}))},getPricing:function(i){var i=i.data("nonce"),e={action:"imagify_get_prices",imagifynonce:i},a={action:"imagify_get_images_counts",imagifynonce:i},t={action:"imagify_get_discount",imagifynonce:i};_.$modal.find(".imagify-modal-loader").hide().show(),_.$modal.addClass("imagify-modal-loading"),b.post(ajaxurl,e,function(v){v.success&&b.post(ajaxurl,a,function(h){h.success&&b.post(ajaxurl,t,function(i){var e,a,t,o,n,l,s,f,c=25,m="",r="";if(i.success){if(f=h.data,p=v.data,e=i.data,a={mo:[],ot:[]},i={month:f.average_month_size.raw/Math.pow(1024,2),total:f.total_library_size.raw/Math.pow(1024,2)},t=b("#imagify-offer-monthly-template"),o=b("#imagify-offer-onetime-template"),n=o.html(),l=t.html(),s=b(".imagify-estimation-block"),b.each(p.monthlies,function(i,e){(void 0===e.active||void 0!==e.active&&!0===e.active)&&("free"===e.label&&(c=e.quota),a.mo.push(e))}),b.each(p.onetimes,function(i,e){(void 0===e.active||void 0!==e.active&&!0===e.active)&&a.ot.push(e)}),s.removeClass("imagify-analyzing"),s.find(".average-month-size").text(f.average_month_size.human),s.find(".total-library-size").text(f.total_library_size.human),i.total+i.month<c?b(".imagify-pre-checkout-offers .imagify-modal-title").addClass("imagify-enough-free"):b(".imagify-enough-free").removeClass("imagify-enough-free"),b(".imagify-offer-selected").removeClass("imagify-offer-selected").find(".imagify-checkbox").prop("checked",!1),null===a.mo||null===a.ot)(p=b(".imagify-pre-checkout-offers")).hide().attr("aria-hidden",!0),p.closest(".imagify-modal-views").find(".imagify-popin-message").remove(),p.after('<div class="imagify-popin-message imagify-error"><p>'+imagifyPricingModal.labels.errorPriceAPI+"</p></div>");else{if((k.imagify_discount_datas=e).is_active){if(e.applies_to instanceof Array){for(var d=[],y=[],g=0;g<e.applies_to.length;g++)y.push(e.applies_to[g].plan_name);y.forEach(function(i){d.includes(i)||d.push(i)}),d=d.join(", ")}else d=e.applies_to;s=b(".imagify-modal-promotion"),f=e.date_end.split("T")[0],p=e.coupon_value,p="percentage"===e.coupon_type?p+"%":"$"+p,s.addClass("active").attr("aria-hidden","false"),s.find(".imagify-promotion-number").text(p),s.find(".imagify-promotion-plan-name").text(d),s.find(".imagify-promotion-date").text(f)}var p,u=_.getSuggestedOffers(a,i,c);0===a.mo.length?(b(".imagify-pre-checkout-offers .imagify-offer-monthly").remove(),b(".imagify-tabs").remove(),b(".imagify-pricing-tab-monthly").remove()):b.each(a.mo,function(i,e){var a="";if(2<i-u.mo.index)return!0;i===u.mo.index&&(i=b(".imagify-pre-checkout-offers .imagify-offer-monthly"),u.mo.selected&&(a=" imagify-offer-selected",i.addClass("imagify-offer-selected").find(".imagify-checkbox").prop("checked",!0)),_.populateOffer(i,e,"monthly")),i=b(l).clone(),i=_.populateOffer(i,e,"monthly",a),r+=i[0].outerHTML}),0===a.ot.length?(b(".imagify-pre-checkout-offers .imagify-offer-onetime").remove(),b(".imagify-tabs").remove(),b(".imagify-pricing-tab-onetime").remove()):b.each(a.ot,function(i,e){var a="";i===u.ot.index&&(i=b(".imagify-pre-checkout-offers .imagify-offer-onetime"),u.ot.selected&&(a=" imagify-offer-selected",i.addClass("imagify-offer-selected").find(".imagify-checkbox").prop("checked",!0)),_.populateOffer(i,e,"onetime")),i=b(n).clone(),i=_.populateOffer(i,e,"onetime",a),m+=i[0].outerHTML}),e&&(((p=_.getPromoAppliesTo(e)).includes(u.mo.plan_label)||p.includes(u.ot.plan_label)||"all"===p[0])&&b("#imagify-coupon-code").val(e.label),e.is_active)&&_.checkCoupon(),t.parent().find(".imagify-offer-line")&&t.parent().find(".imagify-offer-line").remove(),t.before(r),o.parent().find(".imagify-offer-line")&&o.parent().find(".imagify-offer-line").remove(),o.before(m)}_.$modal.find(".imagify-modal-loader").fadeOut(300),_.$modal.removeClass("imagify-modal-loading")}})}),_.populatePayBtn()})},getSuggestedOffers:function(i,a,t){var o,n,e,l,s,f,c=a.total+a.month,m={quota:0},r={mo:!1,ot:!1};return i.ot.length<0&&(e=i.ot[i.ot.length-1].id,l=i.ot[i.ot.length-1].label),i.ot.length<0&&(s=i.mo[i.mo.length-1].id,f=i.mo[i.mo.length-1].label),b.each(i.mo,function(i,e){return e.quota<0&&(n={index:i,selected:1,plan_id:e.id,plan_label:e.label}),e.quota>m.quota&&(m={index:i,selected:1,quota:e.quota,plan_id:e.id,plan_label:e.label}),0===e.monthly_cost&&0===e.annual_cost||e.quota<=0&&a.month>e.quota||a.total>e.quota||0<=e.quota&&a.month<e.quota&&a.total<e.quota&&(void 0===o||o.quota>e.quota)&&(o=e,r.mo={index:i,selected:t>a.month&&t>a.total?0:1,plan_id:e.id,plan_label:e.label}),!0}),!1===r.mo&&(r.mo=void 0!==n?n:m),c-=i.mo[r.mo.index].quota,0!==i.ot.length&&(c<=0?(b.each(i.ot,function(i,e){return e.quota<a.total||!(r.ot={index:i,selected:0,plan_id:e.id,plan_label:e.label})}),!1===r.ot&&(r.ot={index:i.ot.length-1,selected:0,plan_id:e,plan_label:l})):(b.each(i.ot,function(i,e){return e.quota<c||!(r.ot={index:i,selected:1,plan_id:e.id,plan_label:e.label})}),!1===r.ot&&(r.ot={index:i.ot.length-1,selected:1,plan_id:e,plan_label:l},r.mo=!1,c=a.total+a.month-i.ot[r.ot.index].quota,b.each(i.mo,function(i,e){return e.quota<c||!(r.mo={index:i,selected:1,plan_id:e.id,plan_label:e.label})}),!1===r.mo)&&(r.mo={index:i.mo.length-1,selected:1,plan_id:s,plan_label:f}))),r},checkCheckbox:function(i){var e="imagify-offer-selected";i.each(function(){var i=b(this);i.is(":checked")?i.closest(".imagify-offer-line").addClass(e):i.closest(".imagify-offer-line").removeClass(e)}),_.populatePayBtn()},checkRadio:function(i){var t="imagify-year-selected",o="imagify-month-selected";return i.each(function(){var i=b(this),e=i.parent(".imagify-cart-list-switcher").length?i.closest(".imagify-cart"):i.parent(".imagify-small-options").length?i.parent(".imagify-small-options").next(".imagify-pricing-table"):i.closest(".imagify-offer-line"),a=e.find(".imagify-switch-my");"yearly"===i.val()?(e.addClass(t).removeClass(o),a.find(".imagify-monthly").attr("aria-hidden","true"),a.find(".imagify-yearly").attr("aria-hidden","false")):(e.addClass(o).removeClass(t),a.find(".imagify-monthly").attr("aria-hidden","false"),a.find(".imagify-yearly").attr("aria-hidden","true"))}),_.populatePayBtn(),i},populateBtnPrice:setInterval(function(){_.populatePayBtn()},1e3),getPeriod:function(){return b(".imagify-offer-monthly").hasClass("imagify-month-selected")?"monthly":"yearly"},getApiKey:function(){return b("#imagify-payment-iframe").data("imagify-api")},switchToView:function(i,e){var a=i.attr("id"),t=_.$modal.children(".imagify-modal-content");i.siblings(".imagify-modal-views").hide().attr("aria-hidden","true"),e&&e.tab&&i.find('a[href="#'+e.tab+'"]').trigger("click.imagify"),"imagify-payment-process-view"===a?t.addClass("imagify-iframe-viewing"):t.removeClass("imagify-iframe-viewing"),"imagify-success-view"===a?(t.addClass("imagify-success-viewing"),_.$modal.attr("aria-labelledby","imagify-success-view")):(t.removeClass("imagify-success-viewing"),_.$modal.removeAttr("aria-labelledby")),i.fadeIn(_.speedFadeIn).attr("aria-hidden","false")},iframeSetSrc:function(i){var e=b("#imagify-payment-iframe"),a=e.attr("src"),t=e.data("src"),o=0,n=0;"string"==typeof i&&""!==a?(a=a.replace("monthly"===i?"yearly":"monthly",i),e.attr("src",a)):"object"==typeof i&&(i.monthly&&(o=i.monthly[Object.keys(i.monthly)[0]].id),i.onetime&&(n=(n=i.onetime[Object.keys(i.onetime)[0]].id)+""=="999"?i.onetime[Object.keys(i.onetime)[0]].data:n),i.period?(a=n,n="yearly"===i.period?o:0,t=t+a+"/"+("monthly"===i.period?o:0)+"/"+n+"/"+(""===(a=b("#imagify-coupon-code").val())?"none":a)+"/",i=e.remove().attr("src",t),_.$paymentView.html(i)):k.imagify.info("No period defined"))},paymentClose:function(){b(".imagify-iframe-viewing .close-btn").trigger("click.imagify"),b(".imagify-iframe-viewing").removeClass("imagify-iframe-viewing")},paymentBack:function(){_.switchToView(_.$preView)},paymentSuccess:function(){_.switchToView(_.$successView)},checkPluginMessage:function(i){var e=i.origin||i.originalEvent.origin;if(imagifyPricingModal.imagify_app_domain===e)switch(i.data){case"cancel":_.paymentClose();break;case"back":_.paymentBack();break;case"success":_.paymentSuccess()}},getPromoAppliesTo:function(i){var e=[];if(i.applies_to instanceof Array){for(var a=[],t=0;t<i.applies_to.length;t++)a.push(i.applies_to[t].plan_name);a.forEach(function(i){e.includes(i)||e.push(i)})}else e=[i.applies_to];return e}}).checkCheckbox(_.$checkboxes),_.checkRadio(_.$radios.filter(":checked")),_.checkCoupon(),_.$checkboxes.on("change.imagify",function(){_.checkCheckbox(b(this))}),_.$radios.on("change.imagify",function(){_.checkRadio(b(this))}),b("#imagify-get-pricing-modal").on("click.imagify-ajax",function(){_.getPricing(b(this))}),b(i).on("modalClosed.imagify",".imagify-payment-modal",function(){b("#imagify-coupon-code").val(""),b(this).find(".imagify-modal-content").removeClass("imagify-success-viewing imagify-iframe-viewing"),setTimeout(function(){b(".imagify-modal-views").hide(),b("#imagify-pre-checkout-view").show()},300),setTimeout(function(){b(".imagify-payment-modal").find(".imagify-modal-content").scrollTop(0)},400)}),b("#imagify-coupon-code").on("blur.imagify",function(){b(this).attr("readonly")||_.checkCoupon()}).on("keydown.imagify",function(i){var e=b(this);if(!e.attr("readonly"))return 13===i.keyCode||32===i.keyCode?(_.checkCoupon(),!1):void(3<=e.val().length?e.closest(".imagify-coupon-input").addClass("imagify-canbe-validate"):e.closest(".imagify-coupon-input").removeClass("imagify-canbe-validate"))}),b("#imagify-coupon-validate").on("click.imagify",function(){_.checkCoupon(),b(this).closest(".imagify-canbe-validate").removeClass("imagify-canbe-validate")}),_.$anotherBtn.on("click.imagify",function(i){var e="imagify-pricing-tab-"+("plan"===b(this).data("imagify-choose")?"monthly":"onetime");i.preventDefault(),_.switchToView(_.$plansView,{tab:e})}),_.$modal.on("click.imagify",".imagify-payment-btn-select-plan",function(i){var e=b(this),a=e.closest(".imagify-offer-line"),t=e.data("offer"),o=e.attr("data-offer"),n="imagify-pricing-tab-monthly"!==e.closest(".imagify-tab-content").attr("id"),l=n?_.$preView.find(".imagify-offer-onetime"):_.$preView.find(".imagify-offer-monthly"),e=n?null:e.closest(".imagify-pricing-table").hasClass("imagify-month-selected")?"monthly":"yearly",s=n?_.getHtmlPrice(t[Object.keys(t)[0]].price):_.getHtmlPrice(t[Object.keys(t)[0]].prices,e),f=n?"":'<span class="imagify-price-by">'+a.find(".imagify-price-by").text()+"</span>",c=a.find(".imagify-price-discount").html(),m=a.find(".imagify-approx-nb").text(),r=a.find(".imagify-offer-size").text(),d=b("#imagify-coupon-code");i.preventDefault(),_.switchToView(_.$preView),l.find(".imagify-number-block").html(s+f),c?(l.find(".imagify-price-discount").length<=0&&l.find(".imagify-col-price").prepend('<span class="imagify-price-discount"></span>'),l.find(".imagify-price-discount").html(c),l.find(".imagify-price-discount").show()):l.find(".imagify-price-discount").hide(),l.find(".imagify-approx-nb").text(m),l.find(".imagify-offer-size").text(r),l.attr("data-offer",o),n||(l.find(".imagify-price-add-data").text(a.find(".imagify-price-add-data").text()),("monthly"===e?l.find("#imagify-subscription-monthly"):l.find("#imagify-subscription-yearly")).trigger("click.imagify"),l.find(".imagify-inline-options").find("input:radio:checked").trigger("change.imagify")),(d=b("#imagify-coupon-code")).val(""),k.imagify_discount_datas&&((i=_.getPromoAppliesTo(k.imagify_discount_datas)).includes(t[Object.keys(t)[0]].label)||"all"===i[0])&&d.val(k.imagify_discount_datas.label),_.checkCoupon(),_.populatePayBtn()}),b("#imagify-modal-checkout-btn").on("click.imagify",function(i){var e,a;i.preventDefault(),b(this).hasClass("imagify-button-disabled")||(i=b(".imagify-offer-monthly"),e=b(".imagify-offer-onetime"),a={},i.hasClass("imagify-offer-selected")&&(a.monthly=JSON.parse(i.attr("data-offer"))),e.hasClass("imagify-offer-selected")&&(a.onetime=JSON.parse(e.attr("data-offer"))),imagifyPricingModal.userDataCache&&b.post(ajaxurl,{action:imagifyPricingModal.userDataCache.deleteAction,_wpnonce:imagifyPricingModal.userDataCache.deleteNonce}),_.switchToView(_.$paymentView),a.period=_.getPeriod(),_.iframeSetSrc(a))}),b(".imagify-back-to-plans").on("click.imagify",function(i){var e=b(this).closest(".imagify-cart-item").hasClass("imagify-cart-item-onetime");i.preventDefault(),b(e?".imagify-offer-onetime":".imagify-offer-monthly").find(".imagify-choose-another-plan").trigger("click.imagify")}),k.addEventListener("message",_.checkPluginMessage,!0))}(jQuery,document,window);
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists