Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Plan-5ce71535.js

import{_ as q}from"./App-45dbd9fa.js";import{T as K,r as p,i as Q,g as W,o as n,a as t,t as e,c as a,e as y,n as k,u as h,b as i,F as C,k as $,O as X}from"./app-f1493ab2.js";import"./Sidebar-f2ddcf5a.js";import"./Menu-73c1148a.js";import"./Modal-a0814fa2.js";import"./transition-f32a8133.js";import"./hidden-f79cef22.js";import"./use-outside-click-92c6377f.js";import"./micro-task-89dcd6af.js";import"./ProfileModal-09ae28bb.js";import"./FormInput-b3450213.js";import"./tabs-80627b62.js";import"./LangToggle-d2b58a25.js";import"./index-114bea05.js";import"./MobileSidebar-e6661e49.js";/* empty css              */import"./pusher-a82d1614.js";const Y={class:"bg-white md:bg-inherit pt-0 px-4 md:pt-8 md:p-8 rounded-[5px] text-[#000] overflow-y-scroll"},tt={class:"flex justify-between mt-8 md:mt-0"},st={class:"text-xl mb-1"},et={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},ot={class:"ml-1 mt-1"},lt={class:"md:flex gap-4"},nt={class:"md:w-[65%]"},at={class:"grid grid-cols-2 gap-4"},it=["onClick"],rt={class:"flex justify-between"},dt={class:""},ut={class:""},ct={for:"myCheckbox",class:"cursor-pointer"},pt={key:0,class:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},ht={class:"text-2xl"},vt={key:0,class:"text-sm mb-4"},mt={key:1,class:"text-sm mb-4"},wt={class:"mb-1"},bt={class:"flex justify-between text-sm"},gt={class:"flex space-x-1"},ft={class:"flex justify-between text-sm"},xt={class:"flex space-x-1"},_t={class:"flex justify-between text-sm"},yt={class:"flex space-x-1"},kt={class:"flex justify-between text-sm"},Ct={class:"flex space-x-1"},$t={class:"flex justify-between text-sm"},jt={class:"flex space-x-1"},At={class:"md:w-[35%]"},Bt={class:"bg-white rounded-md shadow-md p-5"},Mt={class:"text-xl mb-4"},Dt={key:0},Pt={class:"border border-dashed flex itens-center justify-center p-10 rounded-md"},Vt={key:1},Zt={class:"flex justify-between mb-4 text-sm"},Ft={class:"bg-slate-100 w-[fit-content] py-1 px-2 rounded-md capitalize text-xs"},St={class:"flex justify-between mt-4 text-sm"},Ot={key:0,class:"bg-slate-100 px-2 py-2 space-y-2 rounded-md mt-2 mb-2"},Ut={class:"text-sm border-b border-dashed"},Nt={class:""},Tt={key:1,class:"bg-slate-100 px-2 py-2 space-y-2 rounded-md mt-2 mb-2"},Ht={class:"flex justify-between text-sm"},Lt={class:"text-xs"},Rt={key:0,class:"text-red-500"},zt={key:1,class:"text-red-500"},Et={key:2,class:"bg-slate-100 px-2 py-2 space-y-2 rounded-md mt-2 mb-2"},Gt={class:"flex justify-between text-sm"},It={class:"text-xs"},Jt={class:"flex justify-between text-xl mt-4 mb-4"},qt={key:3,class:"text-[14px] mt-3 mb-2"},Kt={key:4,class:"flex grid grid-cols-2 gap-2"},Qt={class:"flex items-center"},Wt=["onClick"],Xt={key:0,class:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Yt=["onClick"],ts={class:"mt-8"},ss={key:1,class:"w-full flex justify-center items-center space-x-1 rounded-md bg-gray-300 px-3 py-2 text-sm text-gray-400 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},es={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},os={key:1},ls={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},ns={key:3},ks={__name:"Plan",props:{plans:Object,methods:Object,subscription:Object,subscriptionDetails:Object},setup(E){var M,D,P,V,Z,F,S,O,U,N,T,H,L,R;const d=E,u=K({plan:(M=d.subscription)==null?void 0:M.plan_id,method:null}),v=p(!1),f=p({name:(P=(D=d.subscription)==null?void 0:D.plan)==null?void 0:P.name,period:(Z=(V=d.subscription)==null?void 0:V.plan)==null?void 0:Z.period,amount:(S=(F=d.subscription)==null?void 0:F.plan)==null?void 0:S.price}),j=p((O=d.subscriptionDetails)==null?void 0:O.grossAmount),g=p((U=d.subscriptionDetails)==null?void 0:U.netAmount),m=p((N=d.subscriptionDetails)==null?void 0:N.amountDue),x=p((T=d.subscriptionDetails)==null?void 0:T.taxRates),w=p((H=d.subscriptionDetails)==null?void 0:H.credit),_=p((L=d.subscriptionDetails)==null?void 0:L.debit),A=p((R=d.subscriptionDetails)==null?void 0:R.basePrice),G=(o,l,r,s)=>{u.plan=o,f.value={name:l,period:r,amount:s},I(o)},B=o=>{u.method=o},c=(o,l)=>{if(o){const r=JSON.parse(o);return(r==null?void 0:r[l])??null}else return null},I=o=>{X.visit("/subscription/"+o,{method:"get",preserveState:!0,onSuccess:l=>{u.plan=o;const r=l.props.response_data.data;j.value=r.grossAmount,x.value=r.taxRates,g.value=r.netAmount,w.value=r.credit,_.value=r.debit,A.value=r.basePrice,m.value=r.amountDue}})},J=async()=>{v.value=!0,u.post("/subscription",{preserveScroll:!0})};return(o,l)=>(n(),Q(q,null,{default:W(()=>{var r;return[t("div",Y,[t("div",tt,[t("div",null,[t("h2",st,e(o.$t("Billing and subscription")),1),t("p",et,[l[1]||(l[1]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 11v5m0 5a9 9 0 1 1 0-18a9 9 0 0 1 0 18Zm.05-13v.1h-.1V8h.1Z"})],-1)),t("span",ot,e(o.$t("Select the plan that you want to subscribe to")),1)])])]),t("div",lt,[t("div",nt,[t("div",at,[(n(!0),a(C,null,y((r=d.plans)==null?void 0:r.data,(s,b)=>(n(),a("div",{key:b,onClick:z=>G(s.id,s.name,s.period,s.price),class:k(["rounded-[0.5rem] shadow-sm p-5 cursor-pointer border-2 col-span-2 md:col-span-1",h(u).plan===s.id?"border-gray-700 bg-slate-50":"border-slate-100 md:border-white bg-slate-20 md:bg-white"])},[t("div",rt,[t("div",dt,[t("h3",null,e(s.name),1)]),t("div",ut,[t("label",ct,[t("div",{class:k(["w-5 h-5 border border-gray-400 rounded-md flex items-center justify-center",h(u).plan===s.id?"bg-[#000]":""])},[h(u).plan===s.id?(n(),a("svg",pt,l[2]||(l[2]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]))):i("",!0)],2)])])]),t("h2",ht,e(s.price),1),s.period==="monthly"?(n(),a("h3",vt,e(o.$t("Per month")),1)):i("",!0),s.period==="yearly"?(n(),a("h3",mt,e(o.$t("Per year")),1)):i("",!0),t("h3",wt,e(o.$t("Features")),1),t("div",bt,[t("div",gt,[l[3]||(l[3]=t("span",null,[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 16 16"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[t("path",{d:"M14.25 8.75c-.5 2.5-2.385 4.854-5.03 5.38A6.25 6.25 0 0 1 3.373 3.798C5.187 1.8 8.25 1.25 10.75 2.25"}),t("path",{d:"m5.75 7.75l2.5 2.5l6-6.5"})])])],-1)),t("h3",null,e(c(s==null?void 0:s.metadata,"campaign_limit")=="-1"?o.$t("Unlimited"):c(s==null?void 0:s.metadata,"campaign_limit"))+" "+e(o.$t("Campaigns")),1)])]),t("div",ft,[t("div",xt,[l[4]||(l[4]=t("span",null,[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 16 16"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[t("path",{d:"M14.25 8.75c-.5 2.5-2.385 4.854-5.03 5.38A6.25 6.25 0 0 1 3.373 3.798C5.187 1.8 8.25 1.25 10.75 2.25"}),t("path",{d:"m5.75 7.75l2.5 2.5l6-6.5"})])])],-1)),t("h3",null,e(c(s==null?void 0:s.metadata,"message_limit")=="-1"?o.$t("Unlimited"):c(s==null?void 0:s.metadata,"message_limit"))+" "+e(o.$t("Messages")),1)])]),t("div",_t,[t("div",yt,[l[5]||(l[5]=t("span",null,[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 16 16"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[t("path",{d:"M14.25 8.75c-.5 2.5-2.385 4.854-5.03 5.38A6.25 6.25 0 0 1 3.373 3.798C5.187 1.8 8.25 1.25 10.75 2.25"}),t("path",{d:"m5.75 7.75l2.5 2.5l6-6.5"})])])],-1)),t("h3",null,e(c(s==null?void 0:s.metadata,"contacts_limit")=="-1"?o.$t("Unlimited"):c(s==null?void 0:s.metadata,"contacts_limit"))+" "+e(o.$t("Contacts")),1)])]),t("div",kt,[t("div",Ct,[l[6]||(l[6]=t("span",null,[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 16 16"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[t("path",{d:"M14.25 8.75c-.5 2.5-2.385 4.854-5.03 5.38A6.25 6.25 0 0 1 3.373 3.798C5.187 1.8 8.25 1.25 10.75 2.25"}),t("path",{d:"m5.75 7.75l2.5 2.5l6-6.5"})])])],-1)),t("h3",null,e(c(s==null?void 0:s.metadata,"canned_replies_limit")=="-1"?o.$t("Unlimited"):c(s==null?void 0:s.metadata,"canned_replies_limit"))+" "+e(o.$t("Canned replies")),1)])]),t("div",$t,[t("div",jt,[l[7]||(l[7]=t("span",null,[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 16 16"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[t("path",{d:"M14.25 8.75c-.5 2.5-2.385 4.854-5.03 5.38A6.25 6.25 0 0 1 3.373 3.798C5.187 1.8 8.25 1.25 10.75 2.25"}),t("path",{d:"m5.75 7.75l2.5 2.5l6-6.5"})])])],-1)),t("h3",null,e(c(s==null?void 0:s.metadata,"team_limit")=="-1"?o.$t("Unlimited"):c(s==null?void 0:s.metadata,"team_limit"))+" "+e(o.$t("Users")),1)])])],10,it))),128))])]),t("div",At,[t("div",Bt,[t("h3",Mt,e(o.$t("Summary")),1),h(u).plan?i("",!0):(n(),a("div",Dt,[t("div",Pt,[t("h3",null,e(o.$t("Select plan to continue")),1)])])),h(u).plan?(n(),a("div",Vt,[t("div",Zt,[t("div",null,[t("h3",null,e(f.value.name),1),t("h3",Ft,e(f.value.period),1)]),t("h3",null,e(A.value),1)]),l[14]||(l[14]=t("hr",null,null,-1)),t("div",St,[t("h3",null,e(o.$t("Gross total")),1),t("h3",null,e(j.value),1)]),x.value.length>0?(n(),a("div",Ot,[t("h3",Ut,e(o.$t("Tax")),1),(n(!0),a(C,null,y(x.value,(s,b)=>(n(),a("div",{key:b,class:"flex justify-between text-sm"},[t("h3",null,[$(e(s.name)+" ",1),t("span",Nt,"("+e(s.percentage)+"%)",1)]),t("h3",null,e(s.amount),1)]))),128))])):i("",!0),w.value.total>0?(n(),a("div",Tt,[t("div",Ht,[t("div",null,[$(e(o.$t("Available credits"))+" ",1),l[8]||(l[8]=t("br",null,null,-1)),t("span",Lt,"("+e(o.$t("Applicable credits for this invoice"))+")",1)]),parseFloat(-w.value.total)<=parseFloat(g.value)?(n(),a("h3",Rt,e(w.value.total),1)):i("",!0),parseFloat(-w.value.total)>parseFloat(g.value)?(n(),a("h3",zt," ("+e(g.value)+") ",1)):i("",!0)])])):i("",!0),_.value.total>0?(n(),a("div",Et,[t("div",Gt,[t("div",null,[$(e(o.$t("Available debits"))+" ",1),l[9]||(l[9]=t("br",null,null,-1)),t("span",It,"("+e(o.$t("Applicable debits due"))+")",1)]),t("h3",null,e(_.value.total),1)])])):i("",!0),t("div",Jt,[t("h3",null,e(o.$t("Total due")),1),t("h3",null,e(m.value),1)]),l[15]||(l[15]=t("hr",null,null,-1)),parseInt(m.value)>0?(n(),a("h2",qt,e(o.$t("Pay via")),1)):i("",!0),parseInt(m.value)>0?(n(),a("div",Kt,[(n(!0),a(C,null,y(d.methods,(s,b)=>(n(),a("div",{key:b,class:""},[t("div",Qt,[t("label",{onClick:z=>B(s.name),for:"myCheckbox",class:"cursor-pointer"},[t("div",{class:k(["w-5 h-5 border border-gray-400 rounded-md flex items-center justify-center",h(u).method===s.name?"bg-[#000]":""])},[h(u).method===s.name?(n(),a("svg",Xt,l[10]||(l[10]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]))):i("",!0)],2)],8,Wt),t("span",{onClick:z=>B(s.name),class:"ml-2 text-sm cursor-pointer"},e(s.name),9,Yt)])]))),128))])):i("",!0),t("div",ts,[v.value==!1&&h(u).method!=null||v.value==!1&&m.value<=0?(n(),a("button",{key:0,onClick:l[0]||(l[0]=s=>J()),type:"button",class:"w-full flex justify-center items-center space-x-1 rounded-md bg-primary px-3 py-2 text-sm text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},[l[11]||(l[11]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[t("path",{fill:"currentColor",d:"M12 13a1.49 1.49 0 0 0-1 2.61V17a1 1 0 0 0 2 0v-1.39A1.49 1.49 0 0 0 12 13m5-4V7A5 5 0 0 0 7 7v2a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-7a3 3 0 0 0-3-3M9 7a3 3 0 0 1 6 0v2H9Zm9 12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1Z"})],-1)),t("span",null,e(o.$t("Continue")),1)])):(n(),a("div",ss,[v.value==!1?(n(),a("svg",es,l[12]||(l[12]=[t("path",{fill:"currentColor",d:"M12 13a1.49 1.49 0 0 0-1 2.61V17a1 1 0 0 0 2 0v-1.39A1.49 1.49 0 0 0 12 13m5-4V7A5 5 0 0 0 7 7v2a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-7a3 3 0 0 0-3-3M9 7a3 3 0 0 1 6 0v2H9Zm9 12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1Z"},null,-1)]))):i("",!0),v.value==!1?(n(),a("span",os,e(o.$t("Continue")),1)):i("",!0),v.value!=!1?(n(),a("svg",ls,l[13]||(l[13]=[t("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:"0.5"},null,-1),t("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[t("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})],-1)]))):i("",!0),v.value!=!1?(n(),a("span",ns,e(o.$t("Redirecting you")),1)):i("",!0)]))])])):i("",!0)])])])])]}),_:1}))}};export{ks as default};