PageSourceSearch

https://bitcoincalculatortoolz.lovable.app/assets/ForecasterMode-DrNRUV8V.js

js bitcoincalculatortoolz.lovable.app collected 2026-10-03 03:25:51 UTC 16,180 bytes, 1 lines download raw bytes

1import{j as e}from"./router-BbhUQokr.js";import{I as g}from"./input-DUZ3WqhY.js";import{f as B,a as z}from"./formatCurrency-DlcgVbyK.js";import{S as h}from"./slider-8Em1T1zp.js";import{S as E,a as V,b as F,c as M,d as I}from"./select-C-9-sFpd.js";import{T as A,a as w,b as k,c as C}from"./tabs-DuQt9IRE.js";import{B as Y}from"./badge-PRaZwuY5.js";import{S as H}from"./bitcoinApi-C08xDOxq.js";import{u as P,C as R,c as D,g as $,a as O}from"./index-YHcahCCO.js";import{I as G}from"./InputPanel-15U27RuK.js";import{I as d}from"./InputField-C2nuLIlj.js";import{C as L}from"./PageSection-DPjSSKln.js";import"./vendor-nUoiNgbM.js";import"./popover-CVwXDKt4.js";import{S as U}from"./shield-BpM4TaEk.js";import{T as K}from"./trending-up-bn72OZ6d.js";import{P as W}from"./progress-BL-r4u5a.js";import{T as _}from"./tooltip-info-BMxuLXQ1.js";import{R as q}from"./ResultPanel-vd3PYhTO.js";import{R as N,a as x}from"./ResultsGrid-COEE_BU1.js";import{R as J}from"./ResultHero-DAhG3CNy.js";import{R as b}from"./ResultRow-vaxIGH8d.js";import{R as T}from"./ResultBadge-DoDGuWFX.js";import{P as S,d as Q,D as X,T as Z}from"./FloatingNavigation-B1lVvygE.js";import{C as ee}from"./calendar-DK-mKU1N.js";import{T as ae}from"./trophy-YL1hkoWU.js";import{R as te,a as re}from"./RetirementTable-BckT4jag.js";import{R as ie,F as le}from"./FullWidthChartSection-DXfs3H2m.js";import"./index-BdQq_4o_.js";import"./ui-CCI7xipb.js";import"./switch-BVmJTne9.js";import"./chevron-up-CFuOSPPb.js";import"./index-Byti91Tg.js";import"./utils-D7W-w1v8.js";import"./charts-CMe_y1k7.js";import"./supabase-KpB3PWUv.js";import"./motion-ChDy0vFR.js";import"./loader-circle-Lk8cl--L.js";import"./circle-help-DoIhoT0S.js";import"./createLazyChart-DS6eAwS6.js";import"./QuickShareLinkPanel-C4ZVrB4V.js";import"./brandColors-CsjD9rW4.js";import"./linkedin-BCgJkjqQ.js";import"./twitter-B8HLuvvE.js";import"./file-text-B_4rcq-g.js";import"./pdfReport-QwZNvvj-.js";const se=({inputs:a,onChange:n,currentBtcPrice:y,onCalculate:f,loading:i})=>{const{language:u}=P(),t=u==="tr",s=(l,r)=>{n({...a,[l]:r})},p=t||a.currency==="TRY"?"tr-TR":"en-US",c=l=>B(l,a.currency,{locale:p}),o=a.retirementAge-a.currentAge,v=a.monthlyContribution*o*12,j=a.currentBtcHoldings*y,m=l=>{l.preventDefault(),f()};return e.jsxs(G,{id:"retirement-calc",onSubmit:m,title:e.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[e.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(R,{className:"h-4 w-4","aria-hidden":!0})}),t?"Emeklilik Parametreleri":"Retirement Parameters"]}),footer:e.jsx("div",{"data-calc-cta":"true",children:e.jsxs(L,{type:"submit",loading:i,loadingLabel:t?"Hesaplanıyor…":"Calculating…",children:[e.jsx(R,{className:"h-4 w-4","aria-hidden":!0}),t?"Emeklilik Planını Hesapla":"Calculate Retirement Plan"]})}),children:[e.jsxs(d,{label:t?"Para Çekme Stratejisi":"Withdrawal Strategy",tooltip:t?"Temkinli: emeklilikte tüm BTC satılır, %4 kuralıyla sabit bütçe. Optimize: BTC büyümeye devam ederken yıllık çekim.":"Conservative: sell all BTC at retirement, fixed 4% rule budget. Optimized: withdraw yearly while BTC keeps growing.",children:[e.jsx(A,{value:a.mode,onValueChange:l=>s("mode",l),className:"w-full",children:e.jsx(w,{className:"grid w-full grid-cols-2 rounded-full border border-border/40 bg-card/60 p-1 h-auto",children:[{value:"conservative",icon:e.jsx(U,{className:"h-3.5 w-3.5"}),label:t?"Temkinli":"Conservative"},{value:"optimized",icon:e.jsx(K,{className:"h-3.5 w-3.5"}),label:t?"Optimize":"Optimized"}].map(l=>e.jsxs(k,{value:l.value,className:D("flex items-center justify-center gap-1.5 rounded-full px-3 py-2 text-xs font-medium text-muted-foreground transition-all hover:text-foreground","data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50"),children:[l.icon,e.jsx("span",{children:l.label})]},l.value))})}),e.jsx("p",{className:"calc-text-small text-muted-foreground mt-2",children:t?"Bu, sonuçlarınızın nasıl hesaplandığını belirler.":"This determines how y
1our results are calculated."})]}),e.jsx(d,{label:t?"Para Birimi":"Currency",tooltip:t?"Sonuçların gösterileceği para birimi.":"Currency used to display results.",children:l=>e.jsxs(E,{value:a.currency,onValueChange:r=>s("currency",r),children:[e.jsx(V,{...l,className:"w-full focus:ring-2 focus:ring-primary/50 focus:ring-offset-2 focus:ring-offset-background","aria-label":t?"Para birimi seçin":"Select currency",children:e.jsx(F,{})}),e.jsx(M,{children:H.map(r=>e.jsx(I,{value:r.code,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{children:r.flag}),e.jsxs("span",{children:[r.code," - ",r.name]})]})},r.code))})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(d,{label:t?"Mevcut Yaş":"Current Age",trailingLabel:`${a.currentAge}`,children:l=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{...l,type:"number",inputMode:"numeric",value:a.currentAge,onChange:r=>s("currentAge",parseInt(r.target.value)||0),min:18,max:80,className:"text-center calc-text-mono focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background"}),e.jsx(h,{value:[a.currentAge],onValueChange:r=>s("currentAge",r[0]),min:18,max:80,step:1,"aria-label":t?"Mevcut yaş kaydırıcı":"Current age slider"})]})}),e.jsx(d,{label:t?"Emeklilik Yaşı":"Retirement Age",trailingLabel:`${a.retirementAge}`,children:l=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{...l,type:"number",inputMode:"numeric",value:a.retirementAge,onChange:r=>s("retirementAge",parseInt(r.target.value)||0),min:a.currentAge+1,max:90,className:"text-center calc-text-mono focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background"}),e.jsx(h,{value:[a.retirementAge],onValueChange:r=>s("retirementAge",r[0]),min:a.currentAge+1,max:90,step:1,"aria-label":t?"Emeklilik yaşı kaydırıcı":"Retirement age slider"})]})})]}),e.jsxs("div",{className:"calc-surface-subtle px-4 py-3 grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"calc-text-label",children:t?"Emekliliğe Yıl":"Years to Retirement"}),e.jsxs("div",{className:"calc-text-mono text-primary text-sm mt-1",children:[o," ",t?"yıl":"years"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"calc-text-label",children:t?"Toplam Katkı":"Total Contributions"}),e.jsx("div",{className:"calc-text-mono text-primary text-sm mt-1",children:c(v)})]})]}),e.jsx(d,{label:t?"Mevcut Bitcoin Varlığı":"Current Bitcoin Holdings",tooltip:t?"Şu anda sahip olduğunuz Bitcoin miktarı.":"Amount of Bitcoin you currently own.",trailingLabel:c(j),children:l=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(g,{...l,type:"number",inputMode:"decimal",value:a.currentBtcHoldings,onChange:r=>s("currentBtcHoldings",parseFloat(r.target.value)||0),step:.01,min:0,max:50,className:"flex-1 text-center calc-text-mono focus-visible:ring-2 focus-visible:ring-primary/50",placeholder:"0.00"}),e.jsx(Y,{variant:"outline",className:"calc-text-mono text-xs",children:"BTC"})]}),e.jsx(h,{value:[a.currentBtcHoldings],onValueChange:r=>s("currentBtcHoldings",Math.round(r[0]*100)/100),min:0,max:50,step:.01,"aria-label":t?"BTC varlığı kaydırıcı":"BTC holdings slider"})]})}),e.jsx(d,{label:t?"Aylık Bitcoin Alımı (DMA)":"Monthly Bitcoin Purchase (DCA)",tooltip:t?"Emekliliğe kadar her ay Bitcoin'e yatıracağınız tutar.":"Amount you plan to invest in Bitcoin each month until retirement.",trailingLabel:`${a.monthlyContribution} ${a.currency}`,children:l=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{...l,type:"number",inputMode:"numeric",value:a.monthlyContribution,onChange:r=>s("monthlyContribution",parseInt(r.target.value)||0),step:50,min:0,max:1e4,className:"text-center calc-text-mono focus-visible:ring-2 focus-visible:ring-primary/50"}),e.jsx(h,{value:[a.monthlyContribution],onValueChange:r=>s("monthlyContribution",r[0]),min:0,max:1e4,step:50,"aria-label":t?"Aylık katkı kaydırıcı":"Monthly contribution slider"})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(d,{label:t?"BTC Büyüme Oranı":"BTC Growth Rate",tooltip:t?"Beklenen yıllık BTC büyümesi. Tarihsel ~%50-60;
1 emeklilik için %15-25 yaygın.":"Expected annual BTC growth. Historical ~50-60%; 15-25% is common for retirement planning.",trailingLabel:`${a.expectedGrowthRate}%`,children:l=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{...l,type:"number",inputMode:"numeric",value:a.expectedGrowthRate,onChange:r=>s("expectedGrowthRate",parseInt(r.target.value)||0),step:1,min:0,max:50,className:"text-center calc-text-mono focus-visible:ring-2 focus-visible:ring-primary/50"}),e.jsx(h,{value:[a.expectedGrowthRate],onValueChange:r=>s("expectedGrowthRate",r[0]),min:0,max:50,step:1,"aria-label":t?"Büyüme oranı kaydırıcı":"Growth rate slider"})]})}),e.jsx(d,{label:t?"Enflasyon Oranı":"Inflation Rate",tooltip:t?"Satın alma gücü için beklenen yıllık enflasyon.":"Expected annual inflation for purchasing-power adjustments.",trailingLabel:`${a.inflationRate}%`,children:l=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{...l,type:"number",inputMode:"decimal",value:a.inflationRate,onChange:r=>s("inflationRate",parseFloat(r.target.value)||0),step:.5,min:0,max:15,className:"text-center calc-text-mono focus-visible:ring-2 focus-visible:ring-primary/50"}),e.jsx(h,{value:[a.inflationRate],onValueChange:r=>s("inflationRate",r[0]),min:0,max:10,step:.5,"aria-label":t?"Enflasyon kaydırıcı":"Inflation slider"})]})})]})]})},ne=({metrics:a,inputs:n,currentBtcPrice:y})=>{const{language:f}=P(),i=f==="tr";if(!a)return null;const u=i||n.currency==="TRY"?"tr-TR":"en-US",t=m=>B(m,n.currency,{locale:u}),s=m=>z(m,n.currency,{locale:u}),p=m=>`₿${m.toFixed(4)}`,c=n.currentBtcHoldings*y,o=Math.min(100,c/a.totalFiatValueAtRetirement*100),v=new Date().getFullYear()+a.yearsUntilRetirement,j=a.totalFiatValueAtRetirement*.04;return e.jsxs(q,{eyebrow:i?"Sonuç panosu":"Results dashboard",title:i?"Emeklilik Sonuç Panosu":"Retirement Results Dashboard",description:i?"Kişiselleştirilmiş Bitcoin emeklilik projeksiyonunuz":"Your personalized Bitcoin retirement projection",icon:e.jsx(S,{}),accentBar:"primary","aria-live":"polite","aria-atomic":"true","aria-label":i?"Hesaplama sonucu":"Calculator result",children:[e.jsx(J,{label:i?"Toplam Emeklilik Fonu":"Total Retirement Fund",value:s(a.totalFiatValueAtRetirement).display,fullValue:t(a.totalFiatValueAtRetirement),badge:e.jsxs(T,{tone:"positive",children:["+",a.roi.toFixed(0),"% ",i?"Toplam ROI":"Total ROI"]})}),e.jsxs(N,{cols:3,children:[e.jsx(x,{label:i?"Emeklilikte BTC":"BTC at Retirement",value:p(a.totalBtcAtRetirement),icon:e.jsx(Q,{})}),e.jsx(x,{label:i?"Emeklilik Tarihi":"Retirement Date",value:v,icon:e.jsx(ee,{})}),e.jsx(x,{label:i?"Yıllık Bütçe":"Annual Budget",value:s(j).display,fullValue:t(j),icon:e.jsx(X,{})})]}),e.jsxs("div",{className:"calc-surface-subtle p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Z,{className:"w-5 h-5 text-primary"}),e.jsx("h3",{className:"text-base font-semibold text-foreground",children:i?"Mevcut Varlık vs. Hedef":"Current Holdings vs. Target"}),e.jsx(_,{content:i?"Bugün zaten elinizde tuttuğunuz Bitcoin'in, nihai emeklilik fonunuzun yüzde kaçına denk geldiği.":"What percentage of your final retirement fund you already hold in Bitcoin today.",side:"top"})]}),e.jsxs(T,{tone:o>50?"primary":"neutral",children:[o.toFixed(1),"%"]})]}),e.jsx(W,{value:o,className:"h-3 mb-2","aria-label":i?"Emeklilik hedefine ilerleme":"Progress to retirement target","aria-valuetext":`${o.toFixed(1)}%`}),o<5&&e.jsx("p",{className:"calc-text-small text-muted-foreground mb-4",children:i?"Erken aşamadayken bu oran düşük görünür — bu normaldir. DCA katkıları ve birikim ilerledikçe yüzde büyür.":"A small percentage is expected this early — DCA contributions and compounding grow this share over time."}),o>=5&&e.jsx("div",{className:"mb-4"}),e.jsxs(N,{cols:4,children:[e.jsx(x,{size:"sm",label:i?"Mevcut Portföy":"Current Portfolio",value:s(c).display,fullValue:t(c),tone:"primary"}),e.jsx(x,{size:"sm",label:i?"Aylık DMA":"Monthly DCA",value:s(n.monthlyContribution).display,fullValue:t(n.monthlyContribution),tone:"primary"}),e.jsx(x,{size:"sm",label:i?"Kalan Yıl":"Years to Go",value:a.yearsUntilRetirement,tone:"primary"}),e.jsx(x,{size:"sm",label:i?"Toplam Katkı":"Total Contributions",value:s(a.totalContributions).display,fullValue:t(a.totalContributions),tone:"primary"})]})]}),e.jsxs("div",{className:"calc-surface-subtle p-5",children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[e.jsx(ae,{className:"w-4 h-4 text-primary"}),e.jsx("h4",{className:"font-semibold text-foreground",children:i?"Yatırım Stratejisi":"Investment Strategy"})]}),e.jsx(b,{label:i?"Yatırım Modu":"Investment Mode",value:(()=>{const l={conservative:{en:"Conservative",tr:"Temkinli"},optimized:{en:"Optimized",tr:"Optimize"}}[n.mode]??{en:n.mode,tr:n.mode};return e.jsx("span",{children:i?l.tr:l.en})})()}),e.jsx(b,{label:i?"Emeklilik Süresi":"Retirement Duration",value:`${a.projectedYearsOfRetirement} ${i?"yıl":"years"}`,divider:!0}),e.jsx(b,{label:i?"Hedef Yaş":"Target Age",value:`${n.retirementAge} ${i?"yaş":"yrs"}`,divider:!0}),e.jsx(b,{label:i?"Tahmini Getiri":"Projected Returns",value:`+${s(a.totalFiatValueAtRetirement-a.totalContributions-c).display}`,fullValue:`+${t(a.totalFiatValueAtRetirement-a.totalContributions-c)}
1`,tone:"positive",divider:!0})]})]})},ea=({language:a,inputs:n,onInputChange:y,onCalculate:f,isCalculating:i,hasCalculated:u,currentBtcPrice:t,calculations:s,chartView:p,setChartView:c})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-12",children:[e.jsx("div",{className:"lg:sticky lg:top-24 lg:self-start",children:e.jsx(se,{inputs:n,onChange:y,currentBtcPrice:t,onCalculate:f,loading:i})}),e.jsx("div",{className:"space-y-6",children:e.jsx($,{children:u?e.jsxs(e.Fragment,{children:[e.jsx(ne,{metrics:s.metrics,inputs:n,currentBtcPrice:t}),e.jsx(ie,{mode:"forecaster",inputs:n,projections:s.projections,currentBtcPrice:t,chartView:p})]}):e.jsx(O,{className:"glass-morphism-card border-border/20 shadow-sm",children:e.jsx("div",{className:"p-12 text-center",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl bg-primary/10 flex items-center justify-center mx-auto",children:e.jsx(S,{className:"w-8 h-8 text-primary"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-h3 font-semibold text-foreground",children:a==="tr"?"Bitcoin Emekliliğinizi Planlamaya Hazır":"Ready to Plan Your Bitcoin Retirement"}),e.jsx("p",{className:"text-muted-foreground max-w-md mx-auto",children:a==="tr"?'Parametrelerinizi yapılandırın ve kişiselleştirilmiş Bitcoin emeklilik projeksiyonlarınızı görmek için "Emeklilik Planını Hesapla"ya tıklayın':'Configure your parameters and click "Calculate Retirement Plan" to see your personalized Bitcoin retirement projections'})]})]})})})})})]}),u&&e.jsx(le,{ariaLabel:a==="tr"?"Emeklilik projeksiyon grafikleri":"Retirement projection charts",className:"mt-10 lg:mt-14",children:e.jsxs(A,{value:p,onValueChange:o=>c(o),className:"w-full",children:[e.jsxs(w,{className:"grid w-full max-w-md mx-auto grid-cols-2 calc-surface-card border-0 p-1 h-auto",children:[e.jsx(k,{value:"chart",children:a==="tr"?"Projeksiyon Grafiği":"Projection Chart"}),e.jsx(k,{value:"table",children:a==="tr"?"Yıl Yıl":"Year-by-Year"})]}),e.jsx(C,{value:"chart",className:"mt-6",children:e.jsx(te,{projections:s.projections})}),e.jsx(C,{value:"table",className:"mt-6",children:e.jsx(re,{projections:s.projections,currency:n.currency})})]})})]});export{ea 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.