1import{a as n}from"./element-ui.common.DI1ICIBt.js";import{p as i}from"./calculator.DnPPJH4a.js";import{n as l}from"./_plugin-vue2_normalizer.WtMK3bkS.js";import"./isSymbol.D_SuF1gh.js";import"./vdom.Bhv_ZVeX.js";import"./vue.esm.CxWcnvyK.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"v3.301.0"};var t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="f3e0d7ae-3c2d-4d5f-a20a-d6709397dede",a._sentryDebugIdIdentifier="sentry-dbid-f3e0d7ae-3c2d-4d5f-a20a-d6709397dede")}catch{}})();const c={components:{"el-table":n.Table,"el-table-column":n.TableColumn},props:{price:{default:1e6},currencySymbol:{default:window.currency}},data(){return{homePrice:this.numberWithCommas(this.price),rawPriceHome:this.price,loanYear:30,interestRate:7.5,monthArray:[],abbr:this.currencySymbol}},computed:{monthTableData(){const a=[];let t=this.rawPriceHome;const e=this.resultMonth;for(let r=1;r<this.loanYear*12;r++){const o=this.interestRatePerMonth*t,s=e-o;t=t-s,a.push({month:r,principle:this.numberWithCommas(Math.ceil(s)),payPerMonth:this.numberWithCommas(Math.ceil(e)),interest:this.numberWithCommas(Math.ceil(o)),remain:this.numberWithCommas(Math.ceil(t))})}return a},resultMonth(){const a=parseFloat(this.rawPriceHome),t=parseFloat(this.interestRate)/100/12,e=parseFloat(this.loanYear*12);return i(t,e,-a)},interestRatePerMonth(){return parseFloat(this.interestRate)/100/12},calculateInterest(){const a=parseFloat(this.rawPriceHome),t=parseFloat(this.loanYear*12);return a*this.interestRatePerMonth*t},priceHome:{get:function(){return this.numberWithCommas(this.rawPriceHome)},set:function(a){this.rawPriceHome=a.replace(/\,/g,"")}}},methods:{cal(){const a=parseFloat(this.rawPriceHome),t=parseFloat(this.interestRate)/100/12,e=parseFloat(this.loanYear*12),r=this.pMT(t,e,-a),o=t*a/12,s=r-o;return{totalPayPerMonth:r,interestPerMonth:o,principlePerMonth:s}},onPriceHomeChange(a){console.log(a)},numberWithCommas(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}}};var m=function(){var t=this,e=t._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-5"},[e("form",{staticClass:"form-montage-calculator mb-4"},[e("div",{staticClass:"row-calculator"},[e("div",{staticClass:"col-calculator"},[e("i"),e("label",{attrs:{for:"homePrice"}},[t._v("Loan Amount")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.priceHome,expression:"priceHome"}],staticClass:"form-control",attrs:{type:"text",id:"homePrice",autocomplete:"false"},domProps:{value:t.priceHome},on:{keyup:t.onPriceHomeChange,input:function(r){r.target.composing||(t.priceHome=r.target.value)}}})]),e("div",{staticClass:"col-calculator"},[e("i"),e("label",{attrs:{for:"homePrice"}},[t._v("Loan Year")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.loanYear,expression:"loanYear"}],staticClass:"form-control",attrs:{type:"number",id:"loanYear"},domProps:{value:t.loanYear},on:{input:function(r){r.target.composing||(t.loanYear=r.target.value)}}})]),e("div",{staticClass:"col-calculator"},[e("i"),e("label",{attrs:{for:"interestRate"}},[t._v("Interest rate")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.interestRate,expression:"interestRate"}],staticClass:"form-control",attrs:{type:"text",id:"interestRate"},domProps:{value:t.interestRate},on:{input:function(r){r.target.composing||(t.interestRate=r.target.value)}}})]),e("div",{staticClass:"col-calculator"},[e("label",{attrs:{for:"interestRate"}},[t._v("Installment Rate:")]),e("div",{staticClass:"input"},[t._v(t._s(this.numberWithCommas(Math.ceil(t.resultMonth)))),e("small",[t._v(t._s(t.abbr)+"/Month")])])])])])]),e("div",{staticClass:"col-md-7"},[[e("el-table",{staticClass:"table-montage-calculator style-scroll",attrs:{data:t.monthTableData}},[e("el-table-column",{attrs:{prop:"month",label:"Month",width:"70px"}}),e("el-table-column",{attrs:{prop:"payPerMonth",label:"Installment Rate"}}),e("el-table-column",{attrs:{prop:"principle",label:"Principle"}}),e("el-table-column",{attrs:{prop:"interest",label:"Interest"}}),e("el-table-column",{attrs:{prop:"remain",label:"Remain"}})],1)]],2)])},p=[],u=l(c,m,p,!1,null,"9fc29ec8");
1const g=u.exports;export{g 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.