PageSourceSearch

https://www.evauto.com/wp-content/plugins/space-multisite/includes…/pricing-engine-2.min.js?ver=1790620550

js evauto.com collected 2026-10-08 00:48:15 UTC 47,091 bytes, 1 lines download raw bytes

1(()=>{var e=Object.getOwnPropertyNames,i=(i,t)=>function(){return i&&(t=(0,i[e(i)[0]])(i=0)),t},t=i({"includes/assets/js/modules/common/utils/asc.ts"(){}});function n(){var e,i,t,n;return(null==(i=null==(e=null==document?void 0:document.location)?void 0:e.host)?void 0:i.includes("ddev.site"))||(null==(n=null==(t=null==document?void 0:document.location)?void 0:t.host)?void 0:n.includes("spaceauto.dev"))||"1"===(null==window?void 0:window.$sp_devMode)?"dev":"prod"}function r(){return"prod"===n()?"space.auto":"space-auto.com"}var s,a=i({"includes/assets/js/modules/common/utils/env.ts"(){}});async function l(e,i,t={},n="POST"){const r="GET"!==n&&"HEAD"!==n;try{const s=await fetch(e,{method:n,headers:{"Content-Type":"application/json",...t.headers||{}},...r?{body:JSON.stringify(i)}:{},...t});return s.ok?await s.json():null}catch(e){return null}}async function c(e,i){const t=`https://search-api.${s}/vehicles/${e}`,n=window.$space_id;if(!n)return null;const r={dealership:n,...i?{token:i}:{}};return l(t,void 0,{headers:i?{dealership:r.dealership,token:i}:{dealership:r.dealership}},"GET")}function o(e){if("albanymotorcars"!==window.$space_id||window.location.href.indexOf("debug=true")>-1)return e;const i=window.location.hostname,t=i.indexOf("bmwofalbany")>-1,n=i.indexOf("albanymotorcars")>-1;if(!t&&!n)return e;const r=e.filters||{};if(r.dealershipName&&r.dealershipName.length>0||r.vins&&r.vins.length>0)return e;const s=Array.isArray(r.condition)?r.condition:[],a=0===s.length,l=[];return(s.indexOf("new")>-1||a)&&l.push(t?"BMW of Albany":"Albany Motorcars"),(s.indexOf("used")>-1||s.indexOf("certified")>-1||a)&&l.push("Albany Used"),0===l.length?e:{...e,filters:{...r,dealershipName:l}}}async function d(e={},i){const t=`https://search-api.${s}/vehicles/search`,n=window.$space_id;if(!n)return null;const r={dealership:n,...i?{token:i}:{}};return l(t,e=o(e),{headers:i?{dealership:r.dealership,token:i}:{dealership:r.dealership}},"POST")}var p,u=i({"includes/assets/js/modules/common/utils/fetch.ts"(){a(),s=r(),"dev"===n()&&console.log("Assets are from domain: ",s)}});function v(e,i,t,n="monthly"){if(!e||e<=0)return 0;if(!i||i<=0)return 0;const r=p[n],s=i/12*r;if(!t||t<=0)return Math.round(e/s);const a=t/100/r,l=e*(a*Math.pow(1+a,s))/(Math.pow(1+a,s)-1);return Math.round(l)}function h(e,i,t){if(!e||e<=0)return 0;if(!t||t<=0)return 0;const n=.5*e,r=e-i;return(r-n)/t+(r+n)*(.035/24)}function g(){let e=parseFloat(window.$sp_vdp_default_down)||5e3,i=parseFloat(window.$sp_vdp_default_apr)||7.99,t=parseInt(window.$sp_vdp_default_term,10)||60,n="saskatoonauto"===window.$space_id;return"evauto"===window.$space_id&&(e=5e3,i=5.99,t=72),"saskatoonauto"===window.$space_id&&(e=5e3,i=6.59,t=60),{defaultAPR:i,defaultDown:e,defaultTerm:t,isBiweekly:n}}var m=i({"includes/assets/js/modules/common/utils/finance.ts"(){p={monthly:12,biweekly:26}}});function f(e){if(!e||0===e)return"0";const i="string"==typeof e?parseFloat(e):e;if(isNaN(i))return"0";const t=Math.abs(i);return(Math.round(100*t)===100*Math.round(t)?Math.round(i).toString():i.toFixed(2)).replace(/\B(?=(\d{3})+(?!\d))/g,",")}function y(e,i=!1){return`${i?"-":""}$${f(e)}`}var w=i({"includes/assets/js/modules/common/utils/price.ts"(){}}),b=i({"includes/assets/js/modules/common/utils/retailing.ts"(){}}),$=i({"includes/assets/js/modules/common/utils/index.ts"(){t(),a(),u(),m(),w(),b()}});function P(){const e=window.$sp_hide_monthly;return!0===e||1===e||"true"===String(e).toLowerCase()||"1"===String(e)}var S,M,k,T,C,O,_,D,x=i({"includes/assets/js/modules/pricing/utils/index.ts"(){}});var A,L,E=i({"includes/assets/js/modules/pricing/v2/DeskingService.ts"(){$(),x(),S=`https://customer-api.${r()}/unauthorized/desk-vehicle`,M=["galleriabmw","bmwofmeridian","albanymotorcars"],k=new Map,T=new Map,C=new WeakSet,O=null,_='<i class="fa-regular fa-spinner-third fa-spin"></i>',D={isEnabled(){var e,i;return!0===(null==(i=null==(e=window.dealer_config)?void 0:e.packages)?void 0:i.desking)},_fallbackActive:!1,isFallbackActive(){return this._fallbackActive},loadingHTML:()=>_,_isAvailable(e,i){var t,n,r;const s=null!=(r=null!=i?i:null==(n=null==(t=window.SpaceVehicleCache)?void 0:t.get(e))?void 0:n.status)?r:null;return null===s||"available"===s},async fetchPayments(e,i){if(!this.isEnabled()||!e)return null;if(!this._isAvailable(e,i))return null;const t=k.get(e);if(t)return t;const n=T.get(e);if(n)return n;const r=function(e){var i,t,n;if(!M.includes(null!=(i=window.$space_id)?i:""))return null;const r=null==(n=null==(t=window.SpaceVehicleCache)?void 0:t.get(e))?void 0:n.msrp;return!r||r<=0?null:{downPayment:Math.floor(.1*r)}}(e),s=l(S,r?{vin:e,deskingParams:r}:{vin:e});T.set(e,s);try{const i=await s;return i&&(Array.isArray(i.results)&&(i.results=i.results.filter(e=>null!=e&&"object"==typeof e)),k.set(e,i)),i}finally{T.delete(e)}},getCached(e){var i;return null!=(i=k.get(e))?i:null},getDefaultPayment(e){var i;if(!(null==(i=null==e?void 0:e.results)?void 0:i.length))return null;const t=e.results.filter(e=>null!=e&&"number"==typeof e.term);return t.length?t.reduce((e,i)=>i.term>e.term?i:e,t[0]):null},getPaymentByTerm(e,i){var t,n;return(null==(t=null==e?void 0:e.results)?void 0:t.length)&&null!=(n=e.results.find(e=>null!=e&&e.term===i))?n:null},isBiweekly:e=>
1"biWeekly"===e.termType,observeSRPCard(e,i){if(!this.isEnabled()||C.has(e))return;const t=e.querySelector(".vehicle-payment-val");if(P())return void(t&&(t.innerHTML="",t.classList.remove("biweekly"),t.style.display="none"));const n=e.getAttribute("data-vin")||"";this._isAvailable(n,i)?(C.add(e),t&&(t.innerHTML=_),this._getObserver().observe(e)):t&&(t.innerHTML="",t.classList.remove("biweekly"),t.style.display="none")},_getObserver(){return O||(O=new IntersectionObserver(e=>{for(const i of e){if(!i.isIntersecting)continue;const e=i.target;O.unobserve(e),this._fetchAndUpdateCard(e)}},{rootMargin:"200px 0px"}))},_fetchAndUpdateCard(e){const i=e.getAttribute("data-vin"),t=e.getAttribute("data-index");if(i&&null!==t){if(P()){const i=e.querySelector(".vehicle-payment-val");return void(i&&(i.innerHTML="",i.classList.remove("biweekly"),i.style.display="none"))}this.fetchPayments(i).then(i=>{const t=i?this.getDefaultPayment(i):null,n=e.querySelector(".vehicle-payment-val");if(!i||!t||t.payment<=0)return void(n&&(n.innerHTML="",n.classList.remove("biweekly"),n.style.display="none"));const r=this.isBiweekly(i),s=Math.round(t.payment);n&&(n.innerHTML=`<span>est. ${y(s)}</span>`,n.classList.toggle("biweekly",r)),e.setAttribute("data-monthly",String(s)),e.setAttribute("data-apr",String(t.rate))})}},updateVDPPayment(e,i){var t,n;this.isEnabled()&&e&&(P()?null==(t=document.querySelector(".fs-vdp-pricing-payment"))||t.remove():this._isAvailable(e,i)?this.fetchPayments(e,i).then(e=>{var i;const t=e?this.getDefaultPayment(e):null;if(!e||!t||t.payment<=0)return void(null==(i=document.querySelector(".fs-vdp-pricing-payment"))||i.remove());const n=this.isBiweekly(e),r=Math.round(t.payment),s=n?"/biweekly":"/mo",a=e.request.downPayment>=1e3?`$${e.request.downPayment/1e3%1==0?e.request.downPayment/1e3:(e.request.downPayment/1e3).toFixed(1)}K`:`$${e.request.downPayment}`,l=t.isMoneyFactor?"MF":"APR",c=`${a} down · ${t.rate}% ${l} · ${t.term} mo`,o=document.querySelector(".fs-vdp-pricing-payment-val"),d=document.querySelector(".fs-vdp-pricing-payment-terms");o&&(o.innerHTML=`${y(r)}<span>${s}</span>`),d&&(d.textContent=c)}):null==(n=document.querySelector(".fs-vdp-pricing-payment"))||n.remove())},updateVDPCalculator(e,i){this.isEnabled()&&e&&this._isAvailable(e,i)&&this.fetchPayments(e,i).then(e=>{var i,t;if(this._fallbackActive=!1,!e)return;const n=document.querySelector(".financing-content");if(!n)return;const r=null!=(t=null==(i=n.closest(".financing-container"))?void 0:i.querySelector(".slider-wrapper.down-payment"))?t:null,s=new Map;for(const i of e.results)i&&"number"==typeof i.term&&i.payment>0&&s.set(i.term,i);if(0===s.size)return this._fallbackActive=!0,r&&(r.style.display=""),void(window.vdpVehicle&&"function"==typeof window.updatePayments&&window.updatePayments(window.vdpVehicle.condition,!0));r&&(r.style.display="none");const a=n.querySelectorAll(".payment-option");let l=!1;if(a.forEach(e=>{const i=e.dataset.term,t=i?parseInt(i,10):NaN,n=Number.isFinite(t)?s.get(t):void 0;if(!n)return e.classList.contains("selected")&&(l=!0,e.classList.remove("selected")),e.style.display="none",void e.setAttribute("aria-hidden","true");e.style.display="",e.removeAttribute("aria-hidden");const r=e.querySelector(".monthly-payment");r&&(r.textContent=f(Math.round(n.payment)));const a=e.querySelector(".apr");a&&(a.textContent=`${n.rate}%`)}),l){let e=null,i=-1;a.forEach(t=>{if("none"===t.style.display)return;const n=parseInt(t.dataset.term||"",10);Number.isFinite(n)&&n>i&&(i=n,e=t)}),e&&e.classList.add("selected")}})},clearCache(){k.clear(),T.clear()}}}});function R(e){return e?function(e){if(!e)return"";let i=e.trim();return i.length>=2&&i.startsWith('"')&&i.endsWith('"')&&(i=i.slice(1,-1)),i=i.replace(/\\u([0-9a-fA-F]{4})/g,(e,i)=>String.fromCharCode(parseInt(i,16))),i=i.replace(/\\\//g,"/").replace(/\\n
1/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\"/g,'"').replace(/\\\\/g,"\\"),i}(e).trim().replace(/(\r?\n){3,}/g,"\n\n").replace(/\r\n|\r|\n/g,"<br>").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/^(<br\s*\/?>)+/i,""):""}var N,F,I,V,H,q,B,G=i({"includes/assets/js/modules/pricing/v2/PricingHTML.ts"(){$(),x(),A=["standard_price","option","total_options","price_with_options","destination_charge"],L={formatPrice(e){if(!e||0===e)return"0";const i="string"==typeof e?parseFloat(e):e;return isNaN(i)?"0":Math.round(i).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},buildVDPSkeleton:()=>'<div class="vdp-list-price-lbl vdp-price-loading"><span>&nbsp;</span></div><span class="vehicle-price-val dol-sign vdp-price-loading" data-value="0">&nbsp;</span><div class="vdp-savings-rebates"></div>',buildVDPPrice(e){const{msrp:i,totalSavings:t,displayPrice:n,display:{priceLabel:r,showSavingsAsPercent:s},instantOffers:a,conditionalOffers:l,showMsrp:c,showBlackFriday:o,lotPrice:d,siteKey:p}=e,u=a.length+l.length;let v="",h="";if(o)v='<span class="vehicle-discount-val napleton-black-friday-50">Holiday Special 50% Off</span>';else if(c&&t>0&&s){const e=this.percentDiff(i,n);e>0&&(v=`<span class="vehicle-discount-val percent">${e}</span>`)}else c&&t>0&&(v=`<span class="vehicle-discount-val dollar-sign">${this.formatPrice(t)}</span>`);if(u>0&&(h=`<span class="vehicle-rebates-count" data-count="${u}">${u}</span>`),n<=0){return`<a class="ask-for-price" href="javascript:void(0)" data-value="0">${"newbyvance"===p?"Get Our Best Price":"Ask for Price"}</a>`}if(c){const e=o?d:i,t=e>0&&e!==n?`<span class="vehicle-msrp"><span class="vehicle-msrp-val dol-sign">${this.formatPrice(e)}</span></span>`:"";return`<div class="vdp-list-price-lbl"><span>${r}</span></div><span class="vehicle-price-val dol-sign" data-value="${n}">${this.formatPrice(n)}</span>`+t+`<div class="vdp-savings-rebates">${v}${h}</div>`}return`<div class="vdp-list-price-lbl"><span>${r}</span></div><span class="vehicle-price-val dol-sign" data-value="${n}">${this.formatPrice(n)}</span><div class="vdp-savings-rebates">${v}${h}</div>`},buildSRPPrice(e){const{msrp:i,totalSavings:t,displayPrice:n,instantOffers:r,conditionalOffers:s,showMsrp:a,showBlackFriday:l,siteKey:c,display:{showSavingsAsPercent:o,aprOffer:d,showInlineEstimatedPayment:p}}=e,u=r.length+s.length;let v="",h="";if(l)v='<span class="vehicle-discount-val napleton-black-friday-50">Holiday Special 50% Off</span>';else if(a&&t>0&&o){const e=this.percentDiff(i,n);e>0&&(v=`<span class="vehicle-discount-val percent">${e}</span>`)}else a&&t>0&&(v=`<span class="vehicle-discount-val dollar-sign">${this.formatPrice(t)}</span>`);if(d?h='<span class="vehicle-apr-offer">Special Offer</span>':u>0&&(h=`<span class="vehicle-rebates-count" data-count="${u}">${u}</span>`),n<=0){return`<a class="ask-for-price" href="javascript:void(0)" data-value="0">${"newbyvance"===c?"Get Our Best Price":"Ask for Price"}</a>`}const g=p?'<div class="vehicle-payment" style="display:inline-block;"><span class="vehicle-payment-val"></span></div>':"";return`<span class="vehicle-price-val dol-sign" data-value="${n}">${this.formatPrice(n)}</span>${v}${h}${g}`},renderRow(e,i){const{type:t,label:n,value:r,display:s}=e;switch(t){case"msrp":return`<div class="v4-pricing-wrap-msrp"><div class="v4-pricing-row"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right"><span class="v4-pricing-msrp-new">${s}</span></div></div></div>`;case"list_price":return`<div class="v4-pricing-row v4-pricing-list-price-row"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`;case"dealer_discount":return`<div class="v4-pricing-row v4-pricing-row-discount"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right"><span class="v4-dealer-discount">${s}</span></div></div>`;case"addon_base":return`<div class="v4-pricing-row v4-pricing-row-addons shaver-price"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right"><span class="v4-pricing-addon">${s}</span></div></div>`;case"addon":return`<div class="v4-pricing-row v4-pricing-row-addons"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right"><span class="v4-pricing-addon">${s}</span></div></div>`;case"price_with_addons":case"intermediate_price":return`<div class="v4-pricing-row v4-pricing-with-addons"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`;case"accessory_fee":return`<div class="v4-pricing-row v4-pricing-row-accessory-fee"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right"><span class="v4-accessory-fee">${s}</span></div></div>`;case"sale_price":return`<div class="v4-pricing-row v4-pricing-row-sale-price"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`;case"dealer_fees":return`<div class="v4-pricing-row v4-pricing-row-dealer-fees"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`;case"total_rebates":return`<div class="v4-pricing-row v4-total-rebates"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`;case"total_savings":return"You Save"===n?`<div class="v4-pricing-row v4-total-savings" style="margin-bottom: 16px; font-weight: 700; display:flex;"><div class="v4-pricing-left v4-pricing-header" style="padding-bottom:0; font-size: 16px;">${n}</div><div class="v4-pricing-right" style="padding-bottom:0; font-size: 16px;">${s}</div></div>`:"Mandal Buick GMC"===i.location?`<div class="v4-pricing-row v4-total-savings" style="font-weight: 700;"><div class="v4-pricing-left v4-pricing-header" style="color: #3cae5a;">${n}</div><div class="v4-pricing-right" style="color: #3cae5a;">${s}</div></div>`:`<div class="v4-pricing-row v4-total-savings"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`;case"final_price":{const e="Mandal Buick GMC"===i.location&&"Sale Price"
1===n?"Sale Price for Everyone":n;return"Mandal CDJR"===i.location?`<div class="v4-pricing-row v4-pricing-final" data-value="${r}"><div class="v4-pricing-left v4-pricing-header" style="padding-bottom:0;">${e}</div><div class="v4-pricing-right" style="padding-bottom:0; color: #3cae5a;">${s}</div></div>`:`<div class="v4-pricing-row v4-pricing-final" data-value="${r}"><div class="v4-pricing-left v4-pricing-header">${e}</div><div class="v4-pricing-right">${s}</div></div>`}case"price_after_conditional":return`<div class="v4-pricing-row v4-pricing-final price-after-offers"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`;case"black_friday":return`<div class="v4-pricing-row v4-market-price ${{"Stock Number":"napleton-black-friday-50-stock","Market Price":"napleton-black-friday-50-market","Sales Price":"napleton-black-friday-50-sales"}[n]||""}"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`;default:return`<div class="v4-pricing-row v4-pricing-row-${t}"><div class="v4-pricing-left v4-pricing-header">${n}</div><div class="v4-pricing-right">${s}</div></div>`}},renderPriceStack(e,i,t){const{priceStack:n,instantOffers:r,conditionalOffers:s,display:{conditionalOffersLabel:a}}=e;if(e.displayPrice<=0){const r=n.find(e=>"msrp"===e.type);let l=r?this.renderRow(r,e):"";return s.length&&(l+=this.buildOffersSection(e,s,a,i,!0,t)),l}let l="",c=!1,o=!1;for(const d of n)"instant_offer"!==d.type?"conditional_offer"!==d.type?"sale_price"===d.type&&e.showMsrp&&d.value===e.msrp||A.includes(d.type)||(l+=this.renderRow(d,e)):o||(l+=this.buildOffersSection(e,s,a,i,!0,t),o=!0):c||(l+=this.buildOffersSection(e,r,"Instant Offers",i,!1),c=!0);return l},buildBreakdown(e,i,t){let n='<div class="v4-pricing-breakdown">';n+=`<div class="breakdown-ymm"><a class="vdp-link" data-vin="${i.vin}" href="/wp-json/space-multisite/v1/api/?vdp=${i.vin}">${i.year} ${i.make} ${i.model} ${i.trim||""}</a></div>`,t.showMonthly&&t.monthlyData&&(n+=this.buildMonthlySection(t.monthlyData,t.cardIndex)),n+=this.renderPriceStack(e,i,t.context);const r=e.instantOffers.length+e.conditionalOffers.length;return n+=this.buildDisclaimerSection(r>0,t),n+="</div>",n},buildMonthlySection(e,i){if(null==e?void 0:e.isDeskingLoading){const e='<i class="fa-regular fa-spinner-third fa-spin"></i>';return`<div class="v4-pricing-list-price"><div class="v4-pricing-row v4-pricing-terms"><div class="v4-pricing-left v4-pricing-data">${e}</div><div class="v4-pricing-right v4-pricing-list-price">${e}</div></div></div>`}const t=(null==e?void 0:e.isBiweekly)?" biweekly":"";return`<div class="v4-pricing-list-price"><div class="v4-pricing-row v4-pricing-terms"><div class="v4-pricing-left v4-pricing-data"><span class="v4-pricing-apr">${e.aprDisplay}</span><span class="v4-pricing-term">${e.term}</span><span class="v4-pricing-down">${this.formatPrice(e.down)}</span><a class="modify-est-terms" href="javascript:void(0);"></a></div><div class="v4-pricing-right v4-pricing-list-price"><span class="v4-pricing-monthly${t}" data-index="${i}">${e.monthly}</span></div></div></div>`},buildOffersSection(e,i,t,n,r=!1,s){const{display:{aprOffer:a},siteKey:l}=e,c="Mandal CDJR"===n.dealershipName||"Mandal Buick GMC"===n.dealershipName,o="longview"===l,d=r&&"srp"===s&&"1"===window.$sp_srp_expand_conditional_offers;let p=`<div class="v4-pricing-incentives-wrap v4-pricing-${r?"conditional-offers"+(d?"":" collapsed"):"instant-offers show"}">`;return c||o||r||"1"===window.$sp_hide_instant_offers_title||(p+=`<div class="v4-pricing-row v4-pricing-header-row"><div class="v4-pricing-left v4-pricing-header">${t} (${i.length})</div></div>`),r&&(p+=`<div class="v4-pricing-row v4-conditional-offers-header"><div class="v4-pricing-left v4-pricing-header">${t} (${i.length}) <i class="fa-light fa-chevron-${d?"up":"down"}"></i></div></div><div class="v4-conditional-offers-content">`),i.forEach((e,t)=>{const r=t===i.length-1?"last":"",s=e.programName||e.name,a=e.programCashValue,l=this.buildTooltip(e),c="Mandal CDJR"===n.dealershipName?' style="color:#3c
1ae5a"':"",o=a>=0,d=Math.abs(a);p+=`<div class="v4-pricing-incentive" title="${s}"><div class="v4-pricing-incentive-left ${r}"><span class="v4-pricing-incentive-name" title="${s}">${s}</span>${l}</div><div class="v4-pricing-incentive-right"${c}>${y(d,o)}</div></div>`}),r&&a&&(p+=this.buildAprOfferRow(a)),r&&(p+="</div>"),p+="</div>",p},buildAprOfferRow(e){const i=R(e.description);return"drivesparks"===window.$space_id||"sparksnissan"===window.$space_id?`<div class="v4-pricing-incentive apr-offer program-tooltip-trigger" data-description="${i}" title="${e.title}"><div class="v4-pricing-incentive-left last"><i class="fa-regular fa-circle-info"></i><span class="v4-pricing-incentive-name" title="${e.title}"><span>0.0% APR for 60 months |<br>1.9% APR for 72 months</span><span class="program-tooltip-trigger" style="padding-left: 16px;" data-description="${i}" title="Click for details"><i class="fa-solid fa-arrow-right"></i></span></span></div></div>`:`<div class="v4-pricing-incentive apr-offer program-tooltip-trigger" data-description="${i}" title="${e.title}"><div class="v4-pricing-incentive-left last"><i class="fa-regular fa-circle-info"></i><span class="v4-pricing-incentive-name" title="${e.title}"><span>0.00% APR for 60 months<br>+ 0 payments for 90 days</span><span class="program-tooltip-trigger" style="padding-left: 16px;" data-description="${i}" title="Click for details"><i class="fa-solid fa-arrow-right"></i></span></span></div></div>`},buildTooltip(e){const i=R(e.programDescription);if(!i)return"";let t="";e.id?t=`<br>Program ID: <b>${e.id}</b>`:e.programNumber&&(t=`<br>Program Number: <b>${e.programNumber}</b>`);return`<span class="program-tooltip-trigger" data-description="${`Program Name: <b>${e.programName}</b>${t}<br><br>${i}`}"${e.expiryDate?` data-expiry="${e.expiryDate}"`:""} title="Click for details"><i class="fa-regular fa-circle-info"></i></span>`},buildDisclaimerSection(e,i){if("1"===window.$sp_hide_pricing_disclaimer)return"";const t=e?"collapsed":"",n=e?"fa-solid fa-circle-question":"fa-light fa-chevron-up";let r="";"freemanmotor"===window.$space_id&&(r+='<div class="pricing-breakdown-disclaimer">*plus Title &amp; Registration</div>',r+='<div class="pricing-breakdown-disclaimer">*plus Freeman Advantage and optional protection products</div>'),r+=`<div class="pricing-disclaimer-wrap ${t}">`,r+=`<div class="pricing-disclaimer-toggle">Details <i class="${n}"></i></div>`,r+='<div class="pricing-disclaimer-content">',e&&(r+='<div class="rebate-disclaimer">Offers and incentives are subject to conditions and restrictions. Not all incentives are combinable. Contact the dealership to determine specific eligibility and prices.</div>');return r+=`<div class="pricing-breakdown-disclaimer">${i.disclaimer||window.$sp_vdp_disclaimer||""}</div>`,r+="</div></div>",r},percentDiff(e,i){if(0===e&&0===i)return 0;const t=Math.abs(e-i)/Math.abs(e)*100;return t<.1?Math.round(t):Math.round(10*t)/10}}}}),j=i({"includes/assets/js/modules/pricing/v2/GM.ts"(){$(),G(),N={finance:"Financing",lease:"Leasing",cash:"Cash"},F={buildVDPPaymentOptionsSection(e,i){return this.buildGMPaymentOptions(e,i)+this.buildVDPHelperRows(i)},buildGMPaymentOptions(e,i){const t=[];return t.push(this.buildGMPaymentOption(e,"cash",i)),this.hasFinance(e)&&t.push(this.buildGMPaymentOption(e,"finance",i)),this.hasLease(e)&&t.push(this.buildGMPaymentOption(e,"lease",i)),t.join("")},buildGMPaymentOption(e,i,t){let n="",r="",s="",a=e.displayPrice<=0;if("finance"===i){const i=this.bestFinanceTerm(e);n=this.formatMonthly(i.monthlyPayment),r=a?null:this.buildFinanceTerms(i),s=a?null:i.label||""}else if("lease"===i){const i=this.bestLeaseTerm(e);n=i.contactDealer?"Contact Dealer":this.formatMonthly(i.monthlyPayment),r=a?null:this.buildLeaseTerms(i),s=a?null:i.label||""}else n=a?"Ask for Price":y(e.displayPrice),r=`MSRP: ${y(e.msrp)}`;return`<div style="display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border: 1px solid rgb(224, 224, 224); padding: 14px 16px; margin-bottom: 8px;"><div><div style="font-size: 18px; font-weight: 700;">${n}<span style="font-size: 13px; font-weight: 400; color: rgb(102, 102, 102);"> – ${N[i]}</span></div>`+(r?`<div style="font-size: 12px; color: rgb(102, 102, 102); margin-top: 2px;">${r}</div>`:"")+(s?`<div style="font-size: 11px; color: rgb(136, 136, 136); margin-top: 2px;">${s}</div>`:"")+"</div>"+`<span class="gm-offer-info" data-vin="${t}" data-tab="${i}" role="button" tabindex="0" title="View ${N[i]} offers &amp; details" aria-label="View ${N[i]} offers and details" style="flex-shrink: 0; cursor: pointer; color: rgb(26, 26, 62); font-size: 16px; line-height: 1; padding: 2px;"><i class="fa-light fa-circle-info"></i></span>`+"</div>"},buildGMPaymentDisclosure:e=>e?`<div style="font-size: 11px; color: rgb(153, 153, 153); margin: -4px 0 8px; line-height: 1.4;">${e}</div>`:"",buildVDPHelperRows:e=>`<div class="gm-see-offers" data-vin="${e}" style="display: flex; justify-content: space-between; align-items: center; padding: 10px 0px; border-bottom: 1px solid rgb(240, 240, 240); cursor: pointer;"><span style="font-size: 13px; color: rgb(51, 51, 51);">Apply Incentives &amp; GM Rewards</span><span style="font-size: 12px; font-weight: 600; color: rgb(26, 26, 62); letter-spacing: 0.5px;">SEE OFFERS →</span></div>`,getValidOptions(e){const i=[];return this.hasFinance(e)&&i.push("finance"),this.hasLease(e)&&i.push("lease"),i.push("cash"),i},buildOverlayTabs(e,i){return`<div class="gm-offer-tabs" style="display: flex; border-bottom: 1px solid rgb(224, 224, 224); margin-bottom: 16px;">${this.getValidOptions(e).map(e=>{const t=e===i;return`<div class="gm-offer-tab${t?" active":""}" data-tab="${e}" style="${"flex: 1; text-align: center; padding: 12px 8px; font-size: 13px; font-weight: 600; cursor: pointer; "+(t?"color: rgb(26, 26, 62); border-bottom: 2px solid rgb(26, 26, 62);":"color: rgb(136, 136, 136); border-bottom: 2px solid transparent;")}">${N[e]}</div>`}).join("")}</div>`},buildPricingModal(e,i){return`<div class="gm-offer-modal" data-tab="${i}">`+this.buildGMBreakdown(e,i)+this.buildGMOffers(e)+this.buildGMDisclaimer(e,i)+"</div>"},buildGMBreakdown(e,i){let t="";if("finance"===i&&this.hasFinance(e)){const i=this.bestFinanceTerm(e);t=this.buildPaymentSummary(this.formatMonthly(i.monthlyPayment),this.buildFinanceTerms(i))}else if("lease"===i&&this.hasLease(e)){const i=this.bestLeaseTerm(e),n=i.contactDealer?"Contact Dealer":this.formatMonthly(i.monthlyPayment);t=this.buildPaymentSummary(n,this.buildLeaseTerms(i))}return t+`<div class="v4-pricing-breakdown">${this.priceStackFor(e,i).filter(e=>!A.includes(e.type)).map(i=>L.renderRow(i,e)).join("")}</div>`},buildGMOffers(e){const i=[...e.instantOffers,...e.conditionalOffers];if(!i.length)return"";const t=i.map(e=>this.buildOfferRow(e)).join("");return`<div class="gm-offer-list" style="margin-top: 16px;"><div style="font-size: 13px; font-weight: 700; margin-bottom: 8px;">Available Offers (${i.length})</div>`+t+"</div>"},buildGMDisclaimer(e,i){const t=[];if("finance"===i&&this.hasFinance(e)){const i=this.bestFinanceTerm(e).disclosure;i&&t.push(i)}else if("lease"===i&&this.hasLease(e)){const i=this.bestLeaseTerm(e).disclosure;i&&t.push(i)}return(e.instantOffers.length||e.conditionalOffers.length)&&t.push("Offers and incentives are subject to conditions and restrictions. Not all incentives are combinable. Contact the dealership to determine specific eligibility and prices."),t.length?'<div class="gm-offer-disclaimer" style="margin-top: 16px; font-size: 11px; color: rgb(136, 136, 136); line-height: 1.5;">'+t.map(e=>`<p style="margin: 0 0 8px;">${e}</p>`).join("")+"</div>":""},hasFinance(e){var i,t;return!!(null==(t=null==(i=e.finance)?void 0:i.terms)?void 0:t.length)},hasLease(e){var i,t;return!!(null==(t=null==(i=e.lease)?void 0:i.terms)?void 0:t.length)},lowestMonthlyTerm(e){const i=e.filter(e=>null!=e.monthlyPayment&&e.monthlyPayment>0);return i.length?i.reduce((e,i)=>i.monthlyPayment<e.monthlyPayment?i:e):e[0]},bestFinanceTerm(e){return this.lowestMonthlyTerm(e.finance.terms)},bestLeaseTerm(e){return this.lowestMonthlyTerm(e.lease.terms)},priceStackFor(e,i){var t,n;if("finance"===i&&this.hasFinance(e)){const i=this.bestFinanceTerm(e);return(null==(t=i.priceStack)?void 0:t.length)?i.priceStack:e.finance.priceStack}return"lease"===i&&this.hasLease(e)?null!=(n=this.bestLeaseTerm(e).priceStack)?n:[]:e.priceStack},buildFinanceTerms(e){var i;const t=[],n=(null==(i=e.priceStack.find(e=>"down_payment"===e.type))?void 0:i.value)||null;return null!=e.term&&t.push(`${e.term} mo`),n&&t.push(`${y(Math.abs(n))} Down`),null!=e.apr&&t.push(`${e.apr}% APR`),t.join(" · ")},buildLeaseTerms(e){const i=[];return null!=e.term&&i.push(`${e.term} mo`),null!=e.dueAtSigning&&i.push(`${y(e.dueAtSigning)} due at signing`),i.join(" · ")},buildPaymentSummary:(e,i)=>`<div style="margin-bottom: 16px;"><div style="font-size: 22px; font-weight: 700;">${e}</div>`+(i?`<div style="font-size: 12px; color: rgb(102, 102, 102); margin-top: 4px;">${i}</div>`:"")+"</div>",buildOfferRow(e){const i=e.programName||e.name||"Offer",t=e.programCashValue;return`<div style="display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgb(240, 240, 240); font-size: 13px;"><span style="color: rgb(51, 51, 51); padding-right: 12px;">${i}</span>`+(t?`<span style="font-weight: 600;">${y(Math.abs(t),t>=0)}</span>`:"")+"</div>"},formatMonthly:e=>null==e||e<=0?"Contact Dealer":`${y(e)}/mo`}}}),z=i({"includes/assets/js/modules/pricing/v2/PricingRenderer.ts"(){$(),E(),j(),G(),I=null,V={updateSRPC
1ard(e,i){const t=e.vin,{displayPrice:n}=i,r=L.buildSRPPrice(i),s=[`#vehicleResults.srp-v5-vehicles .vehicle[data-vin="${t}"] .vehicle-price`,`.v5-srp-mini-vehicles .vehicle[data-vin="${t}"] .vehicle-price`,`.sd-vehicle-pricing[data-vin="${t}"] .vehicle-price`];let a=0;for(const i of s){document.querySelectorAll(i).forEach(i=>{i.innerHTML=r;const t=i.closest(".vehicle, .srp-vehicle-card");t&&(t.setAttribute("data-price",String(n)),D.isEnabled()&&t.classList.contains("vehicle")&&D.observeSRPCard(t,e.status)),a++})}if(a>0&&this.updateMsrpDisplay(i),0===a){const e=document.querySelector(`.srp-vehicle-card[data-vin="${t}"] .srp-vehicle-pricing`);e&&this.updateSRPv4Card(e,i)}},updateMsrpDisplay(e){const{msrp:i,showMsrp:t,vin:n}=e;if(!t||!i)return;const r=[`.srp-v5-vehicles .vehicle[data-vin="${n}"] .vehicle-msrp`,`.v5-srp-mini-vehicles .vehicle[data-vin="${n}"] .vehicle-msrp`,`.sd-vehicle-pricing[data-vin="${n}"] .vehicle-msrp`],s=`<span class="retail-lbl"></span><div class="vehicle-msrp-val dol-sign">${f(i)}</div>`;for(const e of r){document.querySelectorAll(e).forEach(e=>{e.innerHTML=s})}},updateSRPv4Card(e,i){var t;const{msrp:n,displayPrice:r,showMsrp:s,vin:a}=i,l=null==(t=e.closest(".srp-vehicle-card"))?void 0:t.getAttribute("data-index");if(""!==e.innerHTML)return;let c="";n>r&&s&&(c+=`<span class="srp-vehicle-msrp dol-sign" data-msrp="${n}" data-index="${l}">${f(n)}</span>`),r>0&&(c+=`<span class="srp-vehicle-price srp-vehicle-price-desktop dol-sign" data-price="${r}" data-index="${l}">${f(r)}</span>`),c||(c=`<span class="srp-vehicle-msrp dol-sign hide" data-msrp="0" data-index="${l}"></span><span class="srp-vehicle-price srp-vehicle-price-desktop dol-sign" data-price="0" data-index="${l}"></span>`),e.innerHTML=`<div class="srp-pricing-col srp-vehicle-details-col srp-vehicle-details-row-col-2" data-index="${l}" data-price="${r}" data-permalink="/wp-json/space-multisite/v1/api/?vdp=${a}">\n\t\t\t<div class="srp-vehicle-price-monthly-wrap"><span class="srp-vehicle-price-monthly" data-index="${l}"></span></div>\n\t\t\t<div class="srp-vehicle-price-main-wrap"><div class="srp-vehicle-price-main">${c}</div></div>\n\t\t</div>`},updateVDP(e,i){var t,n;const{displayPrice:r,showMsrp:s}=i,a=e.vin,l=document.querySelectorAll(`.vdp-price-wrap[data-vin="${a}"]`);if(l.length){const e=L.buildVDPPrice(i);l.forEach(i=>{i.innerHTML=e})}document.querySelectorAll(".vdp-price-val").forEach(e=>{e.innerHTML=f(r)}),document.querySelectorAll(".total-price").forEach(e=>{e.innerHTML=f(r)});const c=document.querySelector(".vdp-msrp-val");c&&i.msrp>r&&s&&(c.innerHTML=y(i.msrp)),document.querySelectorAll(".vdp-calc-tooltip-disclaimer, .vdp-price-monthly").forEach(e=>{e.classList.add("show")}),null==(t=document.querySelector(".vdp-header-price-wrap"))||t.setAttribute("data-price",String(r)),null==(n=document.querySelector(".vdp-module-test-drive-ymmp"))||n.setAttribute("data-price",String(r)),window.listPrice=r,window.vdpPrice=r,window.totalPrice=r,document.dispatchEvent(new CustomEvent("space:vdp-pricing-ready",{detail:{vin:a,displayPrice:r}})),this.updateGMPaymentOptions(e,i)},updateBreakdown(e,i,t){const n=F.hasFinance(i)||F.hasLease(i);if(i.displayPrice<=0&&!n)return;const r=L.buildBreakdown(i,e,t);document.querySelectorAll(".vdp-v4-incentives-html").forEach(e=>{e.innerHTML=r});const s=document.getElementById("srp-pricing-overlay-content");s&&(s.innerHTML=`<div id="srp-pricing-content-${t.cardIndex}" class="srp-pricing-content">${r}</div>`);const a=document.querySelector(".cash-content .cash-info");a&&(a.innerHTML=`<div id="srp-pricing-content-${t.cardIndex}" class="srp-pricing-content">${r}</div>`),document.querySelectorAll(`.srp-v5-vehicles .vehicle[data-vin="${e.vin}"] .v4-pricing-breakdown, .sd-vehicle-pricing[data-vin="${e.vin}"] .v4-pricing-breakdown`).forEach(e=>{e.innerHTML=r})},updateVDPHeaderPayment(e){e&&!e.isDeskingLoading&&"number"==typeof e.monthly&&(I=numberWithCommas(e.monthly),this.writeVDPHeaderMonthly(I))},refreshVDPHeaderPayment(){null!==I&&this.writeVDPHeaderMonthly(I)},writeVDPHeaderMonthly(e){document.querySelectorAll(".vdp-price-monthly").forEach(i=>
1{i.innerHTML=e}),document.querySelectorAll(".vdp-price-monthly-td").forEach(i=>{i.innerHTML="$"+e})},updateGMPaymentOptions(e,i){const t=Array.from(document.querySelectorAll(".vdp-gm-payment-options")).filter(i=>!i.dataset.vin||i.dataset.vin===e.vin);if(!t.length)return;const n=F.hasFinance(i)||F.hasLease(i)?F.buildVDPPaymentOptionsSection(i,e.vin):"";t.forEach(e=>{e.innerHTML=n;const i=e.closest(".vdp-gm-payments-module");i instanceof HTMLElement&&(i.style.display=n?"":"none")});const r=document.querySelector(".fs-vdp-pricing-payment");r instanceof HTMLElement&&(r.style.display=n?"none":"")},openGMOffersOverlay(e,i){var t,n;const r=null==(t=window.SpaceVehicleCache)?void 0:t.get(e),s=null==r?void 0:r.pricingBreakdown;if(!s)return;if(s.displayPrice<=0)this.renderAskPriceOverlay(r,s);else{const e=F.getValidOptions(s),t=null!=(n=e.find(e=>e===i))?n:e[0];this.renderGMOverlay(s,t)}const a=document.querySelector(".srp-pricing-overlay-wrapper");a&&(a.dataset.gmVin=e),this.showPricingOverlay()},renderAskPriceOverlay(e,i){var t,n,r,s;const a=document.getElementById("srp-pricing-overlay-content");if(!a)return;const l=null!=(r=null==(n=null==(t=window.SpacePricing)?void 0:t.buildDisclaimer)?void 0:n.call(t,e,i))?r:"",c=L.buildBreakdown(i,e,{cardIndex:0,showMonthly:!1,disclaimer:l});a.innerHTML=`<div class="srp-pricing-content">${c}</div>`;const o=document.querySelector(".srp-pricing-overlay-tabs");o&&(o.style.display="none"),null==(s=document.querySelector(".srp-pricing-overlay-wrapper"))||s.classList.remove("gm-offers-active")},renderGMOverlay(e,i){var t;const n=document.getElementById("srp-pricing-overlay-content");if(!n)return;n.innerHTML=F.buildOverlayTabs(e,i)+`<div class="gm-offer-content">${F.buildPricingModal(e,i)}</div>`;const r=document.querySelector(".srp-pricing-overlay-tabs");r&&(r.style.display="none"),null==(t=document.querySelector(".srp-pricing-overlay-wrapper"))||t.classList.add("gm-offers-active")},switchGMOverlayTab(e){var i,t,n;const r=null==(i=document.querySelector(".srp-pricing-overlay-wrapper"))?void 0:i.dataset.gmVin,s=r?null==(n=null==(t=window.SpaceVehicleCache)?void 0:t.get(r))?void 0:n.pricingBreakdown:null;if(!s)return;const a=F.getValidOptions(s).find(i=>i===e);a&&this.renderGMOverlay(s,a)},showPricingOverlay(){var e,i;null==(e=document.querySelector(".srp-pricing-overlay-wrapper"))||e.classList.add("show"),null==(i=document.querySelector(".srp-pricing-overlay-container"))||i.classList.add("show"),document.body.classList.add("show-pricing-breakdown","noscroll")},restoreGMOverlay(){var e,i;null==(e=document.querySelector(".srp-pricing-overlay-wrapper"))||e.classList.remove("show","gm-offers-active"),null==(i=document.querySelector(".srp-pricing-overlay-container"))||i.classList.remove("show"),document.body.classList.remove("show-pricing-breakdown","noscroll");const t=document.querySelector(".srp-pricing-overlay-tabs");t&&t.style.removeProperty("display")},updateFavorites(e,i){var t;const n=document.querySelector(`.favorite-vehicle[data-vin="${e.vin}"] .vehicle-price`);if(!n)return;const r=i.displayPrice;if(r>0)n.innerHTML=`<span class="vehicle-price-val dol-sign" data-value="${r}">${f(r)}</span>`;else{const e=null==(t=n.closest(".favorite-vehicle"))?void 0:t.getAttribute("data-index"),r="newbyvance"===i.siteKey?"Get Our Best Price":"Ask for Price";n.innerHTML=`<a class="ask-for-price" href="javascript:void(0)" data-index="${e}">${r}</a>`}}}}});var K,Y,U,W,X=i({"includes/assets/js/modules/pricing/v2/SpaceCustomer.ts"(){$(),H=["Very Poor","Poor","Fair","Good","Very Good","Exceptional"],(q=class e{getCookie(e){for(var i=e+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var r=t[n];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(i))return r.substring(i.length,r.length)}return""}setCookie(e,i,t){if("undefined"==typeof document)return;let n=e+"="+i+";path=/";if("session"!==t){const e=new Date;e.setTime(e.getTime()+24*t*60*60*1e3),n+=";expires="+e.toUTCString()}document.cookie=n}eraseCookie(e){this.setCookie(e,"",-1)}getStore(e){if("undefined"==typeof localStorage)return null;try{return localStorage.getItem(e)}catch(e){return null}}setStore(e,i){if("undefined"!=typeof localStorage)try{localStorage.setItem(e,i)}catch(e){}}removeStore(e){if("undefined"!=typeof localStorage)try{localStorage.removeItem(e)}catch(e){}}toNumber(e){if(null===e||""===e)return null;const i=parseFloat(e);return Number.isFinite(i)?i:null}
1getCreditScore(){return this.getStore(e.STORE.creditScore)}setCreditScore(i){this.setStore(e.STORE.creditScore,i)}getCreditScoreValue(){return this.toNumber(this.getStore(e.STORE.creditScoreValue))}setCreditScoreValue(i){this.setStore(e.STORE.creditScoreValue,String(i))}getDownPayment(){return this.toNumber(this.getStore(e.STORE.downPayment))}setDownPayment(i){this.setStore(e.STORE.downPayment,String(i))}getTermLength(){return this.toNumber(this.getStore(e.STORE.termLength))}setTermLength(i){this.setStore(e.STORE.termLength,String(i))}getCalcCredit(){return this.getCookie(e.COOKIE.calcCredit)||null}setCalcCredit(i,t=365){this.setCookie(e.COOKIE.calcCredit,i,t)}getCalcCreditNumber(){var i;const t=this.getCalcCredit();return null===t?650:null!=(i=e.CALC_CREDIT_VALUES[t])?i:650}getCalcDownPaymentNumber(){return this.toNumber(this.getCookie(e.COOKIE.calcDown))}getCalcDownPayment(){return this.getCookie(e.COOKIE.calcDown)}setCalcDownPayment(i,t=365){this.setCookie(e.COOKIE.calcDown,String(i),t)}getCalcTradeInNumber(){return this.toNumber(this.getCookie(e.COOKIE.calcTrade))}getCalcTradeIn(){return this.getCookie(e.COOKIE.calcTrade)}setCalcTradeIn(i,t=365){this.setCookie(e.COOKIE.calcTrade,String(i),t)}getCalcFinanceTermNumber(){return this.toNumber(this.getCookie(e.COOKIE.calcTermFinance))}getCalcFinanceTerm(){return this.getCookie(e.COOKIE.calcTermFinance)}setCalcFinanceTerm(i,t=365){this.setCookie(e.COOKIE.calcTermFinance,String(i),t)}getCalcLeaseTermNumber(){return this.toNumber(this.getCookie(e.COOKIE.calcTermLease))}getCalcLeaseTerm(){return this.getCookie(e.COOKIE.calcTermLease)}setCalcLeaseTerm(i,t=365){this.setCookie(e.COOKIE.calcTermLease,String(i),t)}getAPRByAccuracy(e){const i=this.getCalcCredit();return"used"===e||"certified"===e?this.getInterestRateUsed(i):this.getInterestRateNew(i)}getInterestRateUsed(e){const i=window.$space_id;switch(e){case"very-poor":return"saskatoonauto"===i?12.75:"circlebbtrailers"===i?15:20;case"poor":return"saskatoonauto"===i?9:"circlebbtrailers"===i?13.7:12;case"fair":return"saskatoonauto"===i?8:"circlebbtrailers"===i?12.9:9;case"good":return"saskatoonauto"===i?7.5:"circlebbtrailers"===i?12.3:7;case"very-good":return"saskatoonauto"===i?6.59:"circlebbtrailers"===i?11.1:6.5;case"exceptional":return"saskatoonauto"===i?6:"circlebbtrailers"===i?9.9:6;default:return"saskatoonauto"===i?6.59:"circlebbtrailers"===i?8:7}}getInterestRateNew(e){switch(e){case"very-poor":return 20;case"poor":return 13;case"fair":return 7.5;case"good":default:return 6.8;case"very-good":return 6.4;case"exceptional":return 5.9}}getMonthlyData(e,i,t){var n;const r=null!=(n=null==t?void 0:t.condition)?n:"new";switch(i){case"vdp":return this.vdpMonthly(e,r);case"snackbar":return this.snackbarMonthly(e.displayPrice,r);default:return this.srpDefaultMonthly(e,r)}}buildMonthly(e,i,t,n,r=0){const s="saskatoonauto"===window.$space_id;return{apr:i,term:t,down:n,aprDisplay:i+"% APR",monthly:v(e.displayPrice-n-r,t,i,s?"biweekly":"monthly"),isBiweekly:s}}srpDefaultMonthly(i,t){var n,r,s,a;const l=window.$space_id,c=null!=(n=e.MONTHLY_PAYMENT_FIXED_APR[l])?n:this.getAPRByAccuracy(t),o=null!=(s=e.MONTHLY_PAYMENT_FIXED_TERM[l])?s:null!=(r=this.getCalcFinanceTermNumber())?r:72,d=null!=(a=e.MONTHLY_PAYMENT_FIXED_DOWN[l])?a:Math.round(.1*i.displayPrice);return this.buildMonthly(i,c,o,d)}vdpMonthly(i,t){var n,r,s,a;const l=window.$space_id,c=g(),o=null!=(n=this.getDownPayment())?n:c.defaultDown,d=null!=(r=this.getTermLength())?r:c.defaultTerm,p=null!=(a=e.MONTHLY_PAYMENT_FIXED_APR[l])?a:this.vdpApr(t,null!=(s=this.getCreditScore())?s:"Good",c.defaultAPR);return this.buildMonthly(i,p,d,o)}getVDPGridApr(e,i){return"evauto"===window.$space_id?5.99:this.vdpApr(e,i,g().defaultAPR)}vdpApr(e,i,t){const n=String(null!=i?i:"").toLowerCase().replace(/\s+/g,"_"),r=window[("used"===e||"certified"===e?"calc_used_apr_":"calc_new_apr_")+n];return"number"==typeof r&&Number.isFinite(r)?r:t}getSnackbarMonthly(e,i){return this.snackbarMonthly(e,i)}snackbarMonthly(e,i){var t,n,r;const s=this.getAPRByAccuracy(i),a=null!=(t=this.getCalcFinanceTermNumber())?t:72,l=null!=(n=this.getCalcDownPaymentNumber())?n:2e3;return{apr:s,term:a,down:l,aprDisplay:s+"% APR",monthly:v(e-l-(null!=(r=this.getCalcTradeInNumber())?r:0),a,s,"monthly"),isBiweekly:!1}}getDealerDefaultPayment(e){const{defaultAPR:i,defaultDown:t,defaultTerm:n,isBiweekly:r}=g(),s=Math.max(e-t,0);if(s<=0)return null;const a=v(s,n,i);return a<=0?null:{apr:i,term:n,down:t,aprDisplay:i+"% APR",monthly:r?Math.round(12*a/26):Math.round(a),isBiweekly:r}}getAll(){return{financing:{creditScore:this.getCreditScore(),creditScoreValue:this.getCreditScoreValue(),downPayment:this.getDownPayment(),termLength:this.getTermLength(),calcCredit:this.getCalcCredit(),calcDownPayment:this.getCalcDownPaymentNumber(),calcTradeIn:this.getCalcTradeInNumber(),calcFinanceTerm:this.getCalcFinanceTermNumber(),calcLeaseTerm:this.getCalcLeaseTermNumber()}}}}
1).COOKIE={calcCredit:"calc-credit",calcDown:"calc-down",calcTrade:"calc-trade",calcTermFinance:"calc-term-finance",calcTermLease:"calc-term-lease"},q.STORE={creditScore:"creditScore",creditScoreValue:"creditScoreValue",downPayment:"downPayment",termLength:"termLength"},q.CALC_CREDIT_VALUES={"very-poor":490,poor:520,fair:610,good:710,"very-good":760,exceptional:810},q.SRP_CREDIT_SCORE_RATINGS=H,q.SRP_CREDIT_SCORE_RANGE={"Very Poor":[300,549],Poor:[550,619],Fair:[620,689],Good:[690,759],"Very Good":[760,819],Exceptional:[820,850]},q.MONTHLY_PAYMENT_FIXED_DOWN={evauto:5e3,saskatoonauto:5e3},q.MONTHLY_PAYMENT_FIXED_APR={evauto:5.99,saskatoonauto:6.59},q.MONTHLY_PAYMENT_FIXED_TERM={evauto:72,saskatoonauto:60},B=q}}),J=i({"includes/assets/js/modules/pricing/v2/SpacePricing.ts"(){$(),x(),E(),G(),z(),K=new Map,Y=new Map,U=new Set,W={async fetchPricingApi(e){if(!e)return null;const i=`https://pricing-api.${r()}/pricing-breakdown/${window.$space_id}/${e}`;if(U.has(i))return null;const t=K.get(i);if(t)return t;const n=Y.get(i);if(n)return n;const s=(async()=>{try{const e=await fetch(i,{method:"GET"});if(404===e.status)return U.add(i),null;if(!e.ok)return null;const t=await e.json();return K.set(i,t),t}catch(e){return null}finally{Y.delete(i)}})();return Y.set(i,s),s},populate(e,i=null,t="srp",n=!1){var r,s,a;if(!e)return;e.vin&&(null==(r=window.SpaceVehicleCache)||r.set(e.vin,e));const{pricingBreakdown:l}=e;if(!l)return void console.warn("No Pricing Breakdown attached to this vehicle");const c=l.displayPrice;if(window.listPrice=c,"vdp"===i&&!n)return V.updateGMPaymentOptions(e,l),L.buildVDPPrice(l);const o=window.isVDPActive||"5"===window.$sp_version&&document.querySelector(".vdp-price-val");if("faves"===t?V.updateFavorites(e,l):n||(V.updateSRPCard(e,l),o&&V.updateVDP(e,l)),null!==i){const n=!P(),r=this.getMonthlyData(l,e,t),s={cardIndex:i,context:t,showMonthly:n,monthlyData:r,disclaimer:this.buildDisclaimer(e,l,r)};V.updateBreakdown(e,l,s),"vdp"===t&&V.updateVDPHeaderPayment(n?r:null),V.updateGMPaymentOptions(e,l),(null==r?void 0:r.isDeskingLoading)&&D.fetchPayments(e.vin,e.status).then(r=>{if(!r)return;const s=this.getMonthlyData(l,e,t);if(!(null==s?void 0:s.isDesking))return;const a={cardIndex:i,context:t,showMonthly:n,monthlyData:s,disclaimer:this.buildDisclaimer(e,l,s)};V.updateBreakdown(e,l,a),"vdp"===t&&V.updateVDPHeaderPayment(n?s:null)})}(null==(s=window.$sp_srp)?void 0:s.initializeProgramTooltips)&&window.$sp_srp.initializeProgramTooltips(),(null==(a=window.$sp_srp)?void 0:a.initializeCollapsibleSections)&&window.$sp_srp.initializeCollapsibleSections()},refreshVDPHeaderPayment(){V.refreshVDPHeaderPayment()},getPriceStack(e){if(e.pricingBreakdown)return e.pricingBreakdown.priceStack;console.warn("No Pricing Breakdown attached to this vehicle")},calculateMonthlyPayment:(e,i,t)=>v(e,i,t),getMonthlyData(e,i,t){if(P())return null;const n=i.vin;if(n&&D.isEnabled()){const e=D.getCached(n);if(e){const i=D.getDefaultPayment(e);
1if(i&&i.payment>0){const t=i.isMoneyFactor?"MF":"APR";return{apr:i.rate,aprDisplay:`${i.rate}% ${t}`,term:i.term,down:e.request.downPayment,monthly:Math.round(i.payment),isBiweekly:D.isBiweekly(e),isDesking:!0}}}return{apr:0,term:0,down:0,aprDisplay:"",monthly:0,isDesking:!1,isDeskingLoading:!0}}return window.SpaceCustomer.getMonthlyData(e,t,i)},buildDisclaimer(e,i,t=null){let n=window.$sp_vdp_disclaimer||"";if(e.year&&(n=n.replace("[year]",e.year.toString())),e.make&&(n=n.replace("[make]",e.make.toString())),e.model&&(n=n.replace("[model]",e.model.toString())),e.trim&&(n=n.replace("[trim]",e.trim.toString())),e.stock&&(n=n.replace("[stock]",e.stock.toString())),n="new"===e.condition&&i.msrp&&0!==i.msrp?n.replace("[msrp]",y(i.msrp)+" MSRP. "):n.replace("[msrp]",""),t){const e=t.monthly;n=e&&e>0?n.replace("[monthly]",y(Math.round(e))):n.replace("[monthly]",""),n=t.down&&t.down>0?n.replace("[down]",y(Math.round(t.down))):n.replace("[down]",""),n=n.replace("[term]",String(t.term)||""),n=n.replace("[apr]",String(t.apr)||"")}else n=n.replace("[monthly]",""),n=n.replace("[down]",""),n=n.replace("[term]",""),n=n.replace("[apr]","");return n}}}});var Q,Z,ee=i({"includes/assets/js/modules/pricing/v2/TempGlobals.ts"(){$()}});(Q={"includes/assets/js/modules/pricing/index.ts"(){E(),G(),z(),X(),J(),ee(),window.globalModules={fetchVehicles:d,fetchVehicleByVin:c,getFinancePayment:v,getLeasePayment:h,applyAlbanyDealershipScope:o},function(){const e=new B;window.SpaceCustomer=e}(),window.SpacePricing=W,window.PricingHTML=L,window.PricingRenderer=V,window.DeskingService=D}},function(){return Z||(0,Q[e(Q)[0]])((Z={exports:{}}).exports,Z),Z.exports})()})();

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.