System.register(["./index-legacy-9fc2ee5c.js","./vendor-legacy-aeda4e3d.js","./useFreeze-legacy-72d9f315.js","./productDetail-legacy-23b0e0f9.js","./index-legacy-ccba432a.js"],function(e,t){"use strict";var a,o,r,l,n,i,c,u,s,d,m,v,p,f,b,g,y,h,x,_,N,w,k,C,j;return{setters:[e=>{a=e._,o=e.q,r=e.f,l=e.w,n=e.P,i=e.b},e=>{c=e.L,u=e.l,s=e.q,d=e.o,m=e.a,v=e.f,p=e.u,f=e.g,b=e.t,g=e.j,y=e.C,h=e.h,x=e.e,_=e.y},e=>{N=e.u},e=>{w=e.D,k=e.P},e=>{C=e.f,j=e.a}],execute:function(){var t=document.createElement("style");t.textContent=".introduction[data-v-f0949b88]{padding:.533333rem .453333rem;border-top:.026667rem solid var(--ex-border-color);border-bottom:.026667rem solid var(--ex-border-color);color:var(--ex-passive-font-color);font-size:.32rem}.introduction .title[data-v-f0949b88]{font-size:.426667rem;color:var(--ex-default-font-color);margin-bottom:.266667rem}.introduction .quota[data-v-f0949b88]{width:100%;height:1.333333rem;background:var(--ex-default-background-color);border-radius:.08rem;border:.026667rem solid var(--ex-border-color2);padding:0 .266667rem;font-size:.373333rem;color:var(--ex-default-font-color)}.introduction input[data-v-f0949b88]::-webkit-input-placeholder{color:var(--ex-font-color1)}.introduction input[data-v-f0949b88]::-moz-input-placeholder{color:var(--ex-font-color1)}.introduction input[data-v-f0949b88]::-ms-input-placeholder{color:var(--ex-font-color1)}.buyNow[data-v-f0949b88]{padding:1.066667rem .4rem;border-top:.026667rem solid var(--ex-border-color)}.buyNow .buyBtn[data-v-f0949b88]{height:1.333333rem;background:var(--ex-div-bgColor1);border-radius:.08rem;font-size:.426667rem;color:var(--ex-font-color);display:flex;align-items:center;justify-content:center}.buyNow .protocol[data-v-f0949b88]{display:flex;align-items:center;justify-content:center;margin:auto;padding:.8rem 0 0;font-size:.373333rem;text-align:center}.buyNow .protocol .protocolImg[data-v-f0949b88]{width:.48rem;height:.48rem;margin-right:.133333rem}.buyNow .protocol .hightName[data-v-f0949b88]{color:var(--ex-font-color2);text-decoration:underline}.success[data-v-f0949b88]{flex:1;margin:4rem auto;font-size:.373333rem;color:var(--ex-passive-font-color);text-align:center}.success .successImg[data-v-f0949b88]{width:3.04rem;height:2.986667rem;margin-bottom:.8rem}\n",document.head.appendChild(t);const z={class:"columnFlex"},I={key:0},A={class:"introduction"},$={class:"title fw-bold"},L=["placeholder"],U={class:"buyNow"},q={class:"protocol"},D={key:1,class:"success"};e("default",a({__name:"buyFunds",setup(e){const{_isFreeze:t}=N(),{_toast:a,_showName:F}=o(),P=c(),B=u({leftName:r("starting-amount"),centerName:r("Investment_Limit"),rightName:r("Lock-up_days")}),E=u(""),M=u(""),O=u(""),R=u({}),V=u(!1),G=u(!1),H=u(-1),K=u(0),Q=u(0),S=()=>V.value?Number(E.value)<K.value?_(r("Can_buy_down_to")+` ${K.value} ${O.value}`):Number(E.value)>Q.value?_(F("Can_buy_up_to")+` ${Q.value} ${O.value}`):/^\d+(\.\d{1,4})?$/.test(E.value)?void T():a("entet4_point"):a("please_agree_financial"),J=()=>{n.includes(__config._APP_ENV)?t(n)&&S():S()},T=async()=>{const e=await j(P.params.id,E.value,M.value);200===e.code?(G.value=!0,H.value=-2):_(e.msg)},W=()=>{V.value=!V.value};return s(()=>{(async()=>{try{const e=await C(P.params.id);if(200===e.code){const{title:t,icon:a,avgRate:o,days:r,limitMin:l,limitMax:n,coin:i}=e.data;K.value=l,Q.value=n,O.value=i.toUpperCase(),M.value=r,B.value={title:t,icon:a,leftNum:l+" "+i.toUpperCase(),centerNum:n+" "+i.toUpperCase(),rightNum:r,...B.value};const{process:c,totalInvestAmount:u,remainAmount:s,timeLimit:d}=e.data;R.value={title:t,process:c,totalInvestAmount:u,remainAmount:s,timeLimit:d,avgRate:o,coin:i.toUpperCase()}}}catch(e){}})()}),(e,t)=>{const a=i;return d(),m("div",z,[v(l,{currentName:p(r)("buy_funds"),backwardNum:H.value},null,8,["currentName","backwardNum"]),G.value?x("",!0):(d(),m("div",I,[v(w,{headerObj:B.value},null,8,["headerObj"]),f("div",A,[f("div",$,b(p(r)("buy_limit")),1),g(f("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>E.value=e),type:"text",placeholder:p(r)("exchange.input"),class:"quota"},null,8,L),[[y,E.value]])]),v(k,{proDetail:R.value},null,8,["proDetail"]),f("div",U,[f("div",{class:"buyBtn",onClick:J},b(p(r)("to pay")),1),f("div",q,[V.value?x("",!0):(d(),h(a,{key:0,name:"gou",class:"protocolImg",onClick:W})),V.value?(d(),h(a,{key:1,name:"gouH",class:"protocolImg",onClick:W})):x("",!0),f("div",null,b(p(r)("read_and_confirm")),1),f("div",{class:"hightName",onClick:t[1]||(t[1]=t=>e.$router.push("/financialAgreement"))},b(p(r)("financial agreement")),1)])])])),G.value?(d(),m("div",D,[v(a,{name:"icon8",class:"successImg"}),f("div",null,b(p(r)("payment_successful")),1)])):x("",!0)])}}},[["__scopeId","data-v-f0949b88"]]))}}});
