'+imagifyPricingModal.labels.errorPriceAPI+"
");else{if((b.imagify_discount_datas=a).is_active){if(a.applies_to instanceof Array){for(var m=[],c=[],r=0;rBest Value!')},100)),i.parent().find(".imagify-offer-line")&&i.parent().find(".imagify-offer-line").remove(),i.before(l)}w.$modal.find(".imagify-modal-loader").fadeOut(300),w.$modal.removeClass("imagify-modal-loading")}})})},getPeriod:function(){return g("#imagify_all_plan_view").hasClass("imagify-month-selected")?"monthly":"yearly"},switchToView:function(i,a){var e=i.attr("id"),n=w.$modal.children(".imagify-modal-content");i.siblings(".imagify-modal-views").hide().attr("aria-hidden","true"),a&&a.tab&&i.find('a[href="#'+a.tab+'"]').trigger("click.imagify"),"imagify-payment-process-view"===e?n.addClass("imagify-iframe-viewing"):n.removeClass("imagify-iframe-viewing"),"imagify-success-view"===e?(n.addClass("imagify-success-viewing"),w.$modal.attr("aria-labelledby","imagify-success-view")):(n.removeClass("imagify-success-viewing"),w.$modal.removeAttr("aria-labelledby")),i.fadeIn(w.speedFadeIn).attr("aria-hidden","false")},iframeSetSrc:function(i){var a=g("#imagify-payment-iframe"),e=a.attr("src"),n=a.data("src");"string"==typeof i&&""!==e?(e=e.replace("monthly"===i?"yearly":"monthly",i),a.attr("src",e)):"object"==typeof i&&(i.period?(e="yearly"===i.period?i.plan_id:0,n=n+0+"/"+("monthly"===i.period?i.plan_id:0)+"/"+e+"/none/",console.log(n),i=a.remove().attr("src",n),w.$paymentView.html(i)):b.imagify.info("No period defined"))},paymentClose:function(){g(".imagify-iframe-viewing .close-btn").trigger("click.imagify"),g(".imagify-iframe-viewing").removeClass("imagify-iframe-viewing")},paymentBack:function(){w.switchToView(w.$plansView)},paymentSuccess:function(){w.switchToView(w.$successView)},checkPluginMessage:function(i){var a=i.origin||i.originalEvent.origin;if(imagifyPricingModal.imagify_app_domain===a)switch(i.data){case"cancel":w.paymentClose();break;case"back":w.paymentBack();break;case"success":w.paymentSuccess()}},getPromoAppliesTo:function(i){var a=[];if(i.applies_to instanceof Array){for(var e=[],n=0;n