PageSourceSearch

https://8percent.kr/assets/ApplyPage-Cj8oVRwK.js

js 8percent.kr collected 2026-09-24 20:25:50 UTC 5,954 bytes, 1 lines download raw bytes

1import{Ft as W,J as d,Jt as w,Lt as Z,Rt as j,Tt as Q,X as ee,Y as B,Z as te,bt as y,nn as e,nt as u,q as f,rt as C}from"./eight-DMNSyKi0.js";import{l as ne,u as L}from"./vue-vendor-CoXVbu00.js";import{r as ae}from"./gnb-DeYwHLZ7.js";import{t as oe}from"./analytics-CjUs9SsJ.js";import{t as se}from"./EdsnButton-KKhc3pBt.js";import{O as ie,lt as le,st as re}from"./index-CXaV7_u2.js";import{n as ue}from"./Hangeul-D20CLazb.js";import{c as me}from"./amount-B-DY7naX.js";import{t as ce}from"./useInvestorBalance-B2RZcP14.js";import{t as de}from"./InvestmentRechargeModal-CNnY67mn.js";import{l as fe}from"./constants-jLuYhjdA.js";import{t as D}from"./useReservationStore-BiN6Ysos.js";import{t as pe}from"./ReservationLayout-Bk1WUMeQ.js";import{a as ve,c as Ae,o as we}from"./useReservationQuery-BtryvDJA.js";import{a as be,i as _e,n as ge,o as Re,r as he,s as ye,t as xe}from"./TotalAmountDisplay-DpCY98H7.js";import{t as Ie}from"./ReservationPageHeader-CQ7Xk94j.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"d103c799694a87a051e7ea90c8b672079ef7fe53"};var i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="37be02cb-f761-4dd8-80ea-4f2c1b54fc81",s._sentryDebugIdIdentifier="sentry-dbid-37be02cb-f761-4dd8-80ea-4f2c1b54fc81")}catch{}})();var Ee={class:"tw-flex tw-w-full tw-flex-col tw-items-center mobile:tw-gap-0"},Pe={class:"tw-mb-[24px] tw-flex tw-w-[488px] tw-flex-col tw-rounded-[12px] tw-bg-white tw-py-[8px] mobile:tw-w-full mobile:tw-rounded-none mobile:tw-py-0 mobile:tw-shadow-none"},Te={class:"mobile:tw-w-full"},Be={class:"tw-mt-[16px] tw-flex tw-w-[488px] tw-flex-col mobile:tw-w-full"},Ce=C({__name:"ApplySection",emits:["done"],setup(s,{emit:i}){const m=i,p=ne(),c=L(),t=D(),b=me(),v=w(!1),x=w(null),S=w(null),k=w(null),_=f(()=>{const n=p.query.dealId;return typeof n=="string"?Number(n):0}),A=f(()=>{const n=p.query.defaultAmount,a=typeof n=="string"?parseInt(n,10):NaN;return Number.isNaN(a)?void 0:a}),{data:I}=ae(),{data:o,isFetching:N}=ve(_),{data:g,refetch:U,isFetching:M}=ie(),{data:V}=we(),{mutate:F,isPending:E}=Ae(),{reservableAmount:R,isFetching:O}=Re(o),l=ce(g),{calculatedAmount:G}=ye({deal:o,investor:g,user:I,reservableAmount:R}),r=be({deal:o,investor:g,reservableAmount:R}),q=ue({agreementCardRef:x}),h=f(()=>le()),P=f(()=>t.amount===0),H=f(()=>h.value?re:P.value?"예약하기":`${t.amount.toLocaleString("ko-KR")}원 예약하기`);W([o,A],()=>{o.value&&(A.value===void 0||A.value<=0||t.amount===0&&t.setAmount(A.value))},{immediate:!0});const $=n=>t.setAmount(n),J=n=>t.setPointAmount(n),K=()=>{const n=Math.max(0,t.amount-l.balance.value);t.setPointAmount(Math.min(n,l.pointBalance.value))},T=()=>{U(),v.value=!1},X=async()=>{E.value||h.value||!o.value||await q.tryProceed()&&r.canProceed.value&&F({dealId:_.value,data:{amount:t.amount,pointAmount:t.pointAmount}},{onSuccess:n=>{oe("reservation_complete",{dealId:_.value,reservationAmount:t.amount,pointAmount:t.pointAmount}),t.setResult({isSuccess:!0,reservedInvestmentId:n.id,deal:o.value,amount:t.amount,pointAmount:t.pointAmount}),m("done")},onError:n=>{const a=n.response?.data;if(!a){c.push({name:"serverError"});return}t.setResult({isSuccess:!1,deal:o.value,amount:t.amount,pointAmount:t.pointAmount,errorMessage:a.message,errorCode:a.errorCode}),m("done")}})};return(n,a)=>{const Y=Q("loading");return j((y(),te("div",Ee,[u(Ie,{title:"투자 예약하기"}),d("section",Pe,[e(o)?(y(),B(ge,{key:0,item:e(o),amount:e(t).amount,maxAmount:e(G),reservableAmount:e(R),showMaxButton:"","onUpdate:amount":$,onSelectMax:K},null,8,["item","amount","maxAmount","reservableAmount"])):ee("",!0)]),d("section",{ref_key:"balanceCardRef",ref:S,class:"tw-scroll-mt-[100px] mobile:tw-w-full mobile:tw-scroll-mt-[56px]"},[u(he,{totalBalance:e(l).totalBalance.value,balance:e(l).balance.value,pointBalance:e(l).pointBalance.value,investPoint:e(t).pointAmount,totalInvestAmount:e(t).amount,insufficientAmount:e(r).insufficientAmount.value,isDepositInsufficient:e(r).isDepositInsufficient.value,isPointInsufficient:e(r).isPointInsufficient.value,isAlwaysUseAllPoint:e(b).isEnabled.value,isRefreshing:e(M),onOpenRechargeModal:a[0]||(a[0]=z=>v.value=!0),"onUpdate:investPoint":J,"onUpdate:isAlwaysUseAllPoint":e(b).setValue,onRefreshBalance:T},null,8,["totalBalance","balance","pointBalance","investPoint","totalInvestAmount","insufficientAmount","isDepositInsufficient","isPointInsufficient","isAlwaysUseAllPoint","isRefreshing","onUpdate:isAlwaysUseAllPoint"])],512),d("section",Te,[u(xe,{totalAmount:e(t).amount,investPoint:e(t).pointAmount,isTotalLimitExceeded:e(r).isTotalLimitExceeded.value,isRealEstateLimitExceeded:e(r).isRealEstateLimitExceeded.value,remainingTotalLimit:e(l).remainingTotalLimit.value,remainingRealEstateLimit:e(l).remainingRealEstateLimit.value},null,8,["totalAmount","investPoint","isTotalLimitExceeded","isRealEstateLimitExceeded","remainingTotalLimit","remainingRealEstateLimit"])]),d("section",Be,[u(_e,{ref_key:"agreementCardRef",ref:x,name:e(I)?.name??"",contractTermHtml:e(V)?.html},null,8,["name","contractTermHtml"])]),u(de,{show:v.value,insufficientAmount:e(r).insufficientAmount.value,onClose:a[1]||(a[1]=z=>v.value=!1),onRefresh:T},null,8,["show","insufficientAmount"]),d("section",{ref_key:"submitButtonRef",ref:k,class:"tw-w-[420px] tw-py-[40p
1x] tw-pb-[120px] mobile:tw-w-[343px] mobile:tw-py-[40px]"},[u(se,{variant:"solid",color:"default",size:"xl",disabled:e(E)||h.value||P.value,label:H.value,fullWidth:"",onClick:X},null,8,["disabled","label"])],512)])),[[Y,e(N)||e(O)]])}}}),Le=Ce,De=C({__name:"ApplyPage",setup(s){const i=L(),m=D(),p=()=>{const c=m.result?.reservedInvestmentId;i.push({name:fe.DONE,query:c?{reservedInvestmentId:String(c)}:{}})};return(c,t)=>(y(),B(pe,{appBarTitle:"",onBack:t[0]||(t[0]=b=>e(i).back())},{default:Z(()=>[u(Le,{onDone:p})]),_:1}))}}),ze=De;export{ze 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.