!function(n){n(".pack_content_wrapper").on("click",".buy_product_pack",(function(i){url=n(this).attr("href")}));var i=n(".dps-pack-wrappper"),t={init:function(){i.on("change","select#dokan-subscription-pack",this.show_details),this.show_details(),this.cancel(),this.activate()},show_details:function(){let i=n("select#dokan-subscription-pack").val();n(".dps-pack").hide(),n(".dps-pack-"+i).show()},cancel:function(){n('.seller_subs_info input[name="dps_submit"]').on("click",(function(i){i.preventDefault(),n('input[name="dps_cancel_subscription"]').val()&&dokan_sweetalert(dokanSubscription.cancel_string,{action:"confirm",icon:"warning"}).then((i=>{i.isConfirmed&&n("#dps_submit_form").submit()}))}))},activate:function(){n('.seller_subs_info input[name="dps_submit"]').on("click",(function(i){i.preventDefault(),n('input[name="dps_cancel_subscription"]').val()||dokan_sweetalert(dokanSubscription.activate_string,{action:"confirm",icon:"warning"}).then((i=>{i.isConfirmed&&n("#dps_submit_form").submit()}))}))}};n((function(){t.init()}))}(jQuery);