PageSourceSearch

https://www.stmodwenhomes.co.uk/assets/stmodwens.CombinedCalculator.156a3cd21b929e4cdd0c.js

js stmodwenhomes.co.uk collected 2026-10-02 14:34:52 UTC 6,635 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmillerhomescorp=self.webpackChunkmillerhomescorp||[]).push([[216,9511],{4829:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var l=a(8253),i=a(1249),o=(a(3441),a(1257)),r=a(9199),s=a(7014),n=a(7892),u=a(9101);function c(){return(0,l.ri)({components:{Disclosure:r.pJ,DisclosureButton:r.lG,DisclosurePanel:r.V2,ResponsiveImage:s.Z,MillerModal:n.Z,GenericPopover:u.Z},setup(){const e=Object.freeze({England:"England",Scotland:"Scotland",Wales:"Wales"}),t=(0,i.h)(),a=(0,l.iH)("£100000"),r=(0,l.iH)("£5000"),s=(0,l.iH)("25 years"),n=(0,l.iH)("1%"),u=(0,l.iH)(358),c=(0,l.iH)(!1),d=(0,l.iH)("The purchase price must not exceed £300,000"),p=(0,l.iH)(e.England),g=(0,l.iH)(!0),v=(0,l.iH)(!1),m=(0,l.iH)("£200000"),b=(0,l.iH)("0"),h=(0,l.iH)(null),y=(0,l.iH)(!0),f=(0,l.iH)(!1),w=(0,l.iH)(!1),C=(0,l.iH)(0),D=(0,l.iH)(null),S=(0,l.iH)(!1);let H;const k=async()=>{let e=new Date;const t=e.getDate().toString().padStart(2,"0"),a=(e.getMonth()+1).toString().padStart(2,"0"),l=`${e.getFullYear().toString()}-${a}-${t}`;let i={propertyValue:parseFloat(m.value.replace("£","").trim()),date:l,country:p.value,isMainResidence:g.value,isFirstTimeBuyer:v.value,holidayTerm:0};try{var r,s=(await o.Z.post("/api/stmodwen/calculator/calculatestamp",i,{headers:{"Content-Type":"application/json"}})).data.bands,n={};n.bands=s.splice(s.length-1,1);for(var u=0;u<n.bands.length;u++)r=n.bands[u].v.replace("£","").trim();b.value=r,s.length>0?(h.value=s,S.value=!0):h.value=null}catch(e){}};return{propertyPrice:a,deposit:r,term:s,interestRate:n,repaymentMortgage:u,formatCurrency:e=>{const t=e.replace(/[^0-9.]/g,"");return t?`£${t}`:""},formatTerm:e=>{const t=e.target,a=t.value.replace(/[^0-9]/g,"");t.value=s.value=a?`${a} years`:"";const l=a.length;t.setSelectionRange(l,l)},formatInterestRate:e=>{const t=e.target,a=t.value.replace(/[^0-9.]/g,"");t.value=n.value=a?`${a}%`:"";const l=a.length;t.setSelectionRange(l,l)},calculate:()=>{var e=parseFloat(a.value.replace("£","").trim()),t=parseFloat(r.value.replace("£","").trim()),l=parseFloat(n.value.replace("%","").trim()),i=parseInt(s.value.replace("years","").trim());((e,t,a)=>{e<=0&&(u.value=0),0==a&&(u.value=e);var l=12*a;0==t&&(u.value=Math.ceil(e/l));var i=t/100/12,o=Math.pow(i+1,l);if(Number.isNaN(i)||Number.isNaN(o)||Number.isNaN(e))u.value="";else{const t=Math.floor(i*o*e/(o-1));u.value=Math.max(t,0)}})(Number(e)-Number(t),Number(l),Number(i))},stampDutyBreakdown:h,isMainResidence:g,isFirstTimeBuyer:v,purchasePrice:m,stampDuty:b,calculateStampDuty:()=>{var e,t;(e=k,t=300,function(...a){H&&clearTimeout(H),H=setTimeout((()=>{e.apply(a)}),t)})()},mortgageCalcToggleVisibility:()=>{y.value=!0,f.value=!1,w.value=!1,C.value=0},isMortgageCalcVisible:y,stampDutyCalcToggleVisibility:()=>{f.value=!0,y.value=!1,w.value=!1,C.value=1},isStampDutyCalcVisible:f,findMortgageToggleVisibility:()=>{w.value=!0,f.value=!1,y.value=!1,C.value=2},isFindMortgageVisible:w,selectedTab:C,costBreakdownDisco:D,open:S,mainStore:t,openMab:(e,a)=>{t.isLoggedIn?t.toggleMabDialog(!0,a):t.showPopover(e)},country:e,selectedCountry:p,mortgageError:c,mortgageErrorMessage:d}}})}},3441:(e,t,a)=>{a.d(t,{S:()=>i});var l=a(8253);function i(e,t=0,a=!0){const i=(0,l.iH)(!1);let o;const r=e=>{e.forEach((e=>{e.isIntersecting?(i.value=!0,a&&o&&o.unobserve(e.target)):i.value=!1}))};return(0,l.bv)((()=>{(()=>{const a=document.getElementById(e);a&&(o=new IntersectionObserver(r,{threshold:t}),o.observe(a))})()})),(0,l.SK)((()=>{o&&o.disconnect()})),{inView:i}}},9101:(e,t,a)=>{a.d(t,{Z:()=>s});var l=a(8253);const i={key:0,class:"c-tooltip__content",role:"tooltip",type:"button"},o={class:"c-tooltip__content-inner voucher"},r={name:"GenericPopover",props:{isVisible:{type:Boolean,default:!1},position:{type:String,default:"top"}},setup:e=>({computedClass:(0,l.Fl)((()=>({"generic-popover":!0,"c-tooltip":!0,"c-tooltip--click":!0,[`c-tooltip--${e.position}`]:!0,"is-active":e.isVisible})))})},s=(0,a(3744).Z)(r,[["render",function(e,t,a,r,s,n){return(0,l.wg)(),(0,l.iD)("div",{class:(0,l.C_)([r.computedClass,"w-full md:w-auto"])},[(0,l.WI)(e.$slots,"target"),a.isVisible?((0,l.wg)(),(0,l.iD)("div",i,[(0,l._)("div",o,[(0,l.WI)(e.$slots,"content")])])):(0,l.kq)("",!0)],2)}]])},7892:(e,t,a)=>{a.d(t,{Z:()=>g});var l=a(8253);const i=(0,l._)("div",{class:"fixed inset-0 bg-brand-extra-dark-blue/75","aria-hidden":"true"},null,-1),o={class:"flex min-h-screen items-center justify-center"},r=["aria-label"],s=[(0,l._)("i",{class:"mf mf-cross","aria-hidden":"true"},null,-1)],n={class:"border-none border-[3px] lg:border-solid border-[#ABB0B4] rounded-none md:rounded-3xl bg-brand-light-grey overflow-hidden"},u=["src"];var c=a(123),d=a(6703);const p={name:"MillerModal",components:{Dialog:c.Vq,DialogTitle:c.$N,DialogPanel:c.EM,TransitionRoot:d.Q,TransitionChild:d.x},props:{isOpen:{type:Boolean,required:!1},videoUrl:{type:String,default:""},headline:{type:String,default:""},maxWidth:{type:String,default:"xl"},dialogPaddingClass:{type:String,default:"p-md"},className:{type:String,default:""},hasCloseButton:{type:Boolean,default:!0}},emits:["update:isOpen"],setup:(e,{emit:t})=>({closeDialog:()=>{t("update:isOpen",!1)},dialogClass:(0,l.Fl)((()=>{const t=e.maxWidth.includes("[")?`max-w-${e.maxWidth}`:`max-w-screen-${e.maxWidth}`;return`relative w-full ${e.dialogPaddingClass} ${t}`})),buttonClass:(0,l.Fl)((()=>`absolute right-2${e.headline?" ":" top-2 "}flex h-lg w-lg items-center justify-center rounded-full border-2 border-white bg-brand-dark-blue text-white z-10`))})},g=(0,a(3744).Z)(p,[["render",function(e,t,a,c,d,p){const g=(0,l.up)("DialogTitle"),v=(0,l.up)("DialogPanel"),m=(0,l.up)("Dialog");return(0,l.wg)(),(0,l.j4)(m,{open:a.isOpen,onClose:c.closeDialog,class:(0,l.C_)(["fixed inset-0 z-[100] overflow-y-auto",a.className])},{default:(0,l.w5)((()=>[i,(0,l._)("div",o,[(0,l.Wm)(v,{class:(0,l.C_)(c.dialogClass)},{default:(0,l.w5)((()=>[a.hasCloseButton?((0,l.wg)(),(0,l.iD)("button",{key:0,onClick:t[0]||(t[0]=(...e)=>c.closeDialog&&c.closeDialog(...e)),"aria-label":a.videoUrl?"Close video dialog":"Close dialog",class:(0,l.C_)(c.buttonClass)},s,10,r)):(0,l.kq)("",!0),a.headline?((0,l.wg)(),(0,l.j4)(g,{key:1,as:"h2",class:"text-white"},{default:(0,l.w5)((()=>[(0,l.Uk)((0,l.zw)(a.headline),1)])),_:1})):(0,l.kq)("",!0),(0,l._)("div",n,[a.videoUrl?((0,l.wg)(),(0,l.iD)("iframe",{key:0,src:a.videoUrl,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:"",class:"aspect-video w-full"},null,8,u)):(0,l.kq)("",!0),(0,l.WI)(e.$slots,"content")])])),_:3},8,["class"])])])),_:3},8,["open","onClose","class"])}]])}}]);

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.