PageSourceSearch

https://app.soundtype.ai/assets/Billing-CE18u1Iv.js

js soundtype.ai collected 2026-10-01 15:26:39 UTC 8,337 bytes, 1 lines download raw bytes

1import{af as ee,d as te,g as le,r as d,A as N,L as ne,o as oe,c as _,a as i,f as o,l as C,b as n,t,w as l,e as r,x as f,at as ae,W as h,au as I,i as c,F as R,h as se,B as ie,_ as _e}from"./index-DtDSSH-2.js";const de={currency(v,$){return isNaN(v)&&(v=0),new Intl.NumberFormat("en",{style:"currency",currency:$}).format(v)},date(v){if(v)return ee(String(v)).locale("vi").format("YYYY-MMMM-DD hh:mm")}},re={class:"st-header"},ue={key:0,class:"billing-view"},ce={class:"plan-row"},pe={class:"plan-row__title"},fe={style:{width:"150px"}},ve={class:"plan-row__content"},ye={key:0},me={key:1},ge={class:"plan-row"},Ce={class:"plan-row__title"},be={class:"plan-row__content"},we={key:0,class:"plan-row"},he={class:"plan-row__title"},$e={class:"plan-row__content"},ke={key:1,class:"plan-row"},Te={class:"plan-row__title"},Se={class:"plan-row__content"},Be={class:"plan-row"},Me={class:"plan-row__title"},Pe={class:"plan-row__content"},De={key:0,style:{display:"flex"}},He={key:0,class:"plan-row__content__hint"},Ne={key:1,class:"plan-row__content__hint"},ze={key:0},Le={key:1},Ae={key:0},Fe={key:1},Ye={key:0},Ge={key:1},Ue={style:{"font-weight":"bold","font-size":"20px"}},Ve={class:"settings-row__content"},Ie={class:"cancel_sub__title"},Re={class:"cancel_sub__text"},Ee={class:"cancel_sub__title"},Ke={class:"cancel_sub__text"},We={class:"cancel_sub__title"},je={class:"cancel_sub__text"},qe={style:{display:"flex","margin-top":"16px","margin-bottom":"8px"}},Je={key:0,style:{"font-size":"14px",color:"red"}},Oe={key:1,style:{"font-size":"14px"}},Qe={style:{"font-weight":"bold","font-size":"20px"}},Xe={style:{"font-weight":"bold","font-size":"20px"}},Ze=te({__name:"Billing",setup(v){const{appContext:$}=le(),b=$.config.globalProperties.apiClient,k=d(!1),z=d(!1),y=d(4),T=d(!1),S=d(!1),B=d(!1),L=d(!1);d(!1),d(!1),d({plan:"Premium",firstPaymentDate:"2021-01-01",expirationDate:"2024-01-01",method:"Credit Card"}),d(123),d(N.getDisplayLangCode()||"en");const E=d(N.isPaidUser());d(N.getSubscriptionPlanName());const s=d(null),p=d(null);d({});const{t:K,i18next:W}=ne(),A=()=>{let e=W.language;e.includes("zh")&&(e="zh"),b.generateStripeSubscriptionManagementUrl().then(a=>{a&&window.open(a,"_blank")})},j=()=>{s.value&&(console.log(s.value.id),b.cancelPurchaseStripe(s.value.id).then(()=>{setTimeout(()=>{window.location.reload()},4e3)}))},F=e=>e?e==="app_store"?"App Store":e==="google_play"?"Google Play":e==="stripe"?"Stripe":e==="free"?"-":K("redeem_code"):"-",q=()=>{console.log("loadPurchase"),b.getPurchases().then(e=>{p.value=e.data,s.value=p.value.find(a=>a.status==="active"&&a.product.type==="subscription")||null,p.value=p.value.sort((a,w)=>w.product.created_at-a.product.created_at),p.value=p.value.filter(a=>(a.product.type==="subscription"||a.product.type==="top_up")&&a.payment_gateway!=="free")})};return oe(()=>{q()}),(e,a)=>{const w=r("CCardBody"),Y=r("CCard"),G=r("CCol"),J=r("CCardHeader"),m=r("CTableHeaderCell"),U=r("CTableRow"),O=r("CTableHead"),g=r("CTableDataCell"),Q=r("CTableBody"),X=r("CTable"),M=r("CModalHeader"),Z=r("CLoadingButton"),P=r("CButton"),D=r("CModalBody"),H=r("CModal"),V=r("CModalFooter");return i(),_(R,null,[o("div",re,t(e.$t("billing")),1),s.value&&p.value?(i(),_("div",ue,[n(f(I),null,{default:l(()=>[n(G,null,{default:l(()=>[n(Y,null,{default:l(()=>[n(w,null,{default:l(()=>[o("table",null,[o("tbody",null,[o("tr",ce,[o("td",pe,[o("div",fe,t(e.$t("plan_name")),1)]),o("td",ve,[s.value?.product.name?(i(),_("div",ye,t(e.$t(f(ae).getPlanNameKey(s.value?.product.uid))),1)):(i(),_("div",me,t(e.$t("basic_plan")),1))])]),o("tr",ge,[o("td",Ce,t(e.$t("monthly_minutes")),1),o("td",be,t(e.$t("x_minutes",{x:s.value.product.credits/60})),1)]),s.value?.payment_gateway==="stripe"?(i(),_("tr",we,[o("td",he,t(e.$t("next_payment_date")),1),o("td",$e,t(s.value?.cancel_at_period_end?"-":f(h).dateTimeToString(s.value?.expires_date)),1)])):s.value?.payment_gateway==="google_play"||s.value?.payment_gateway==="app_store"?(i(),_("tr",ke,[o("td",Te,t(e.$t("expire_date")),1),o("td",Se,t(f(h).dateTimeToString(s.value.expires_date)),1)])):C("",!0),o("tr",Be,[o("td",Me,t(e.$t("purchase_platform")),1),o("td",Pe,[o("div",null,t(F(s.value?.payment_gateway)),1),E.value?(i(),_("div",De,[s.value?.payment_gateway==="google_play"?(i(),_("div",He,t(e.$t("manage_subscription_google_play")),1)):s.value?.payment_gateway==="app_store"?(i(),_("div",Ne,t(e.$t("manage_subscription_apple_store")),1)):(i(),_("div",{key:2,class:"my-link",onClick:a[0]||(a[0]=()=>A())},t(e.$t("manage_subscription")),1))])):C("",!0)])])])])]),_:1})]),_:1})]),_:1})]),_:1}),n(f(I),null,{default:l(()=>[n(G,null,{default:l(()=>[n(Y,null,{default:l(()=>[n(J,null,{default:l(()=>[c(t(e.$t("payment_history")),1)]),_:1}),n(w,null,{default:l(()=>[n(X,{hover:""},{default:l(()=>[n(O,null,{default:l(()=>[n(U,null,{default:l(()=>[n(m,null,{default:l(()=>[c(t(e.$t("date")),1)]),_:1}),n(m,null,{default:l(()=>[c(t(e.$t("plan_name")),1)]),_:1}),n(m,null,{default:l(()=>[c(t(e.$t("payment_method")),1)]),_:1}),n(m,null,{default:l(()=>[c(t(e.$t("amount")),1)]),_:1}),n(m,null,{default:l(()=>[c(t(e.$t("receipt")+" / "+e.$t("invoice")),1)]),_:1})]),_:1})]),_:1}),n(Q,null,{default:l(()=>[(i(!0),_(R,null,se(p.value,(u,x)=>(i(),ie(U,{key:x},{default:l(()=>[n(g,null,{default:l(()=>[c(t(f(h).dateTimeToString(u.created_at)),1)]),_:2},1024),n(g,null,{default:l(()=>[u.product.type==="subscription"?(i(),_("div",ze,t(u.product.name)+" ( "+t(u.product.renew
1al_period==="1Y"?e.$t("yearly"):e.$t("monthly"))+") ",1)):(i(),_("div",Le,t(u.product.name),1))]),_:2},1024),n(g,null,{default:l(()=>[c(t(F(u.payment_gateway)),1)]),_:2},1024),n(g,null,{default:l(()=>[u.price!=0?(i(),_("div",Ae,t(f(de).currency(u.currency==="vnd"?u.price/10:u.price/1e3,u.currency??"usd")),1)):(i(),_("div",Fe,"-"))]),_:2},1024),n(g,null,{default:l(()=>[u.invoices&&u.invoices?.length>0&&u.invoices[0]?.hosted_invoice_url!==""?(i(),_("div",Ye,[o("div",{class:"my-link",onClick:a[1]||(a[1]=()=>A())},t(e.$t("link")),1)])):(i(),_("div",Ge,"-"))]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])):C("",!0),n(H,{visible:T.value,onClose:a[4]||(a[4]=()=>{T.value=!1}),alignment:"center"},{default:l(()=>[n(M,null,{default:l(()=>[o("div",Ue,t(e.$t("cancel_subscription")),1)]),_:1}),n(D,null,{default:l(()=>[o("div",Ve,[o("div",Ie,t(e.$t("cancel_subscription")),1),o("div",Re,t(e.$t("cancel_subscription_des",{x:f(h).dateTimeToString(s.value.expires_date)})),1),o("div",Ee,t(e.$t("cancel_subscription_feature1")),1),o("div",Ke,t(e.$t("cancel_subscription_feature1_des",{x:8})),1),o("div",We,t(e.$t("cancel_subscription_feature2")),1),o("div",je,t(e.$t("cancel_subscription_feature2_des",{x:180})),1),o("div",qe,[n(Z,{onClick:a[2]||(a[2]=()=>{s.value?.payment_gateway==="google_play"?k.value=!0:s.value?.payment_gateway==="app_store"?z.value=!0:(y.value-=1,y.value===0&&(L.value=!0,j()))}),loading:L.value,color:"danger",style:{display:"block","margin-right":"8px",color:"white"}},{default:l(()=>[c(t(e.$t("cancel_subscription")),1)]),_:1},8,["loading"]),n(P,{onClick:a[3]||(a[3]=()=>{T.value=!1}),style:{display:"block"}},{default:l(()=>[c(t(e.$t("keep_subscription")),1)]),_:1})]),y.value<=3&&y.value>0?(i(),_("div",Je," *"+t(e.$t("cancel_subscription_count",{x:y.value})),1)):C("",!0),k.value||z.value?(i(),_("div",Oe," *"+t(e.$t(k.value?"cancel_subscription_google_play":"cancel_subscription_apple_store")),1)):C("",!0)])]),_:1})]),_:1},8,["visible"]),n(H,{visible:S.value,onClose:a[6]||(a[6]=()=>{S.value=!1}),alignment:"center"},{default:l(()=>[n(M,null,{default:l(()=>[o("div",Qe,t(e.$t("cancel_subscription")),1)]),_:1}),n(D,null,{default:l(()=>[o("div",null,t(e.$t("cancel_subscription_google_play")),1)]),_:1}),n(V,null,{default:l(()=>[n(P,{onClick:a[5]||(a[5]=()=>{S.value=!1})},{default:l(()=>[c(t(e.$t("confirm")),1)]),_:1})]),_:1})]),_:1},8,["visible"]),n(H,{visible:B.value,onClose:a[8]||(a[8]=()=>{B.value=!1}),alignment:"center"},{default:l(()=>[n(M,null,{default:l(()=>[o("div",Xe,t(e.$t("cancel_subscription")),1)]),_:1}),n(D,null,{default:l(()=>[o("div",null,t(e.$t("cancel_subscription_apple_store")),1)]),_:1}),n(V,null,{default:l(()=>[n(P,{onClick:a[7]||(a[7]=()=>{B.value=!1})},{default:l(()=>[c(t(e.$t("confirm")),1)]),_:1})]),_:1})]),_:1},8,["visible"])],64)}}}),et=_e(Ze,[["__scopeId","data-v-c0d1ff6e"]]);export{et as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.