PageSourceSearch

https://www.longotoyota.com/resources/searchByKeywordChunk.js?v=23…&h=8abfb70828bba05f95e9

js longotoyota.com collected 2026-09-25 21:17:35 UTC 12,271 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksite_client_side=self.webpackChunksite_client_side||[]).push([[810],{6423:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var i=s(9483),r=s(2315);s(9320);const o={"two door":"2-door","2door":"2-door","2dr":"2-door","2d":"2-door","two wheel":"2-wheel","two-wheel":"2-wheel","2 wheel":"2-wheel","three door":"3-door","three-door":"3-door","3 door":"3-door","3dr":"3-door","3d":"3-door","3 series":"3-series","3series":"3-series","four door":"4-door","4door":"4-door","4dr":"4-door","4d":"4-door","4wd":"4-wheel drive","four wheel":"4-wheel","four-wheel":"4-wheel","4 wheel":"4-wheel","five door":"5-door","five-door":"5-door","5 door":"5-door","5dr":"5-door","5d":"5-door","7 series":"7-series","7series":"7-series","8 series":"8-series","8series":"8-series","9 2x":"9-2x","92x":"9-2x","9 4x":"9-4x","94x":"9-4x","9 7x":"9-7x","97x":"9-7x","all new":"all-new",auto:"automatic","four wheel drive":"awd","all wheel drive":"awd","b class":"b-class","b series":"b-series","certified pre owned":"certified","certified pre-owned":"certified",cpo:"certified","chassis cabs":"chassis-cabs",chevy:"chevrolet","c hr":"c-hr","c max":"c-max","cr v":"cr-v",crv:"cr-v",crz:"cr-z","ct4 v":"ct4-v",ct4v:"ct4-v","ct5 v":"ct5-v",ct5v:"ct5-v","cx 3":"cx-3",cx3:"cx-3","cx 30":"cx-30",cx30:"cx-30","cx 5":"cx-5",cx5:"cx-5","cx 7":"cx-7",cx7:"cx-7","cx 9":"cx-9",cx9:"cx-9","e 350":"e-350",e350:"e-350","e 450":"e-450",e450:"e-450","e 550":"e-550",e550:"e-550","eco max":"eco-max",ecomax:"eco-max","e golf":"e-golf",egolf:"e-golf","e pace":"e-pace",epace:"e-pace","e series":"e-series",eseries:"e-series","e transit":"e-transit",etransit:"e-transit","e tron":"e-tron",etron:"e-tron","f 150":"f-150",f150:"f-150","f 250":"f-250",f250:"f-250","f 350":"f-350",f350:"f-350","f 450":"f-450",f450:"f-450","f 53":"f-53",f53:"f-53","f 50":"f-550",f550:"f-550","f 59":"f-59",f59:"f-59","f 600":"f-600",f600:"f-600","f 650":"f-650",f650:"f-650","f 750":"f-750",f750:"f-750","f 800":"f-800",f800:"f-800","f pace":"f-pace",fpace:"f-pace","fr s":"fr-s",frs:"fr-s","f super":"f-super",fsuper:"f-super","f type":"f-type",ftype:"f-type","gs 6":"gs-6",gs6:"gs-6","gt r":"gt-r",gtr:"gt-r","hi cube":"hi-cube",hicube:"hi-cube","hr v":"hr-v",hrv:"hr-v","i 280":"i-280",i280:"i-280","i 290":"i-290",i290:"i-290","i 350":"i-350",i350:"i-350","i 370":"i-370",i370:"i-370","i mark":"i-mark",imark:"i-mark","i miev":"i-miev",imiev:"i-miev","i pace":"i-pace",ipace:"i-pace","l series":"l-series",lseries:"l-series","mach e":"mach-e","mp4 12c":"mp4-12c",mp412c:"mp4-12c","mx 30":"mx-30",mx30:"mx-30","mx 5":"mx-5",mx5:"mx-5","nsx t":"nsx-t",nsxt:"nsx-t","plug in":"plug-in",plugin:"plug-in","pre owned":"pre-owned",used:"pre-owned","right hand drive":"right-hand-drive","rx 7":"rx-7",rx7:"rx-7","rx 8":"rx-8",rx8:"rx-8","s 10":"s-10",s10:"s-10","sport utility vehicle":"sport-utility","sport utility":"sport-utility",suv:"sport-utility","srt 10":"srt-10",srt10:"srt-10","s type":"s-type",stype:"s-type",vw:"volkswagen","v series":"v-series",vseries:"v-series","x 90":"x-9",x90:"x-90",xl7:"xl-7","xl 7":"xl-7","x type":"x-type",xtype:"x-type"},a=new RegExp(Object.keys(o).map((e=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"))).join("|"),"g");function n(e){return e.toLowerCase().replace(a,(e=>o[e]))}const l=s(2214);var c;!function(e){e[e.UP=38]="UP",e[e.DOWN=40]="DOWN",e[e.ENTER=13]="ENTER"}(c||(c={}));class h extends r.wA{constructor(e){super(e),this._fuse=null,this._submitButton=document.getElementById("opensearch-submit"),this._id="opensearch-"+Math.random().toString(36).substring(7).toUpperCase(),this.state={value:e.value||"",suggestions:[],highlight:null,showSuggestions:!1,disableBlur:!1,type:e.type||""},this._refreshSuggestions=function(e,t){let s=0;return function(){this.dispose=()=>{s&&clearTimeout(s)},s&&clearTimeout(s),s=window.setTimeout((()=>{s=0,e()}),200)}}((()=>{if(!this._fuse)return;const e=n(this.state.value.trim()),t=this._fuse.search(e).slice(0,10).map((e=>e.phrase));this.setState({suggestions:t})})),function(e=""){const t=`dealeron.search.phrases:${e}`,s=sessionStorage.getItem(t);if(s)return Promise.resolve(JSON.parse(s));let i="/api/search/suggestions";return e>""&&(i+="?filter="+encodeURIComponent(e)),fetch(i).then((e=>e.json())).then((e=>
1{try{sessionStorage.setItem(t,JSON.stringify(e))}catch(e){console.warn("Error writing to session storage: ",e)}return e}))}(e.filter||"").then((e=>{const t=e.map((e=>({phrase:e,normalized:n(e)})));this._fuse=new l(t,{shouldSort:!0,tokenize:!0,matchAllTokens:!0,threshold:.4,location:0,distance:4,maxPatternLength:50,minMatchCharLength:1,keys:["phrase","normalized"]})}))}_keyup(e){var t;if(e.keyCode!==c.UP&&e.keyCode!==c.DOWN&&e.keyCode!==c.ENTER)return;e.preventDefault(),e.keyCode===c.ENTER&&(null===(t=this._submitButton)||void 0===t||t.click());const{highlight:s,suggestions:i}=this.state,r=i.indexOf(s);e.keyCode===c.UP&&r>0?this.setState({highlight:i[r-1]}):e.keyCode===c.DOWN&&r<i.length-1&&this.setState({highlight:i[r+1]})}_input(e){this.setState({highlight:null,value:e.target.value}),this._refreshSuggestions()}_select(e,t){this.setState({highlight:null,value:t,showSuggestions:!1},(()=>this._submitButton.click()))}get _textValue(){return this.state.highlight||this.state.value||""}render({placeholderLong:e,placeholderShort:t,disabled:s}){const{value:i,showSuggestions:o,suggestions:a,highlight:n,disableBlur:l}=this.state,c=this._id,h=i.toLowerCase().trim();return(0,r.h)("div",{id:c,className:o?"opensearch wasabi open":"opensearch wasabi","aria-owns":c+"-suggestions"},(0,r.h)("input",{id:c+"-input-mobile",name:"q",className:"search_bar text-muted stat-search-input","data-loc":"homepage search by keyword",type:"search",disabled:s,value:this._textValue,placeholder:t,onKeyUp:e=>this._keyup(e),onInput:e=>this._input(e),onFocus:e=>this.setState({showSuggestions:!0}),onBlur:l?void 0:e=>this.setState({showSuggestions:!1}),autoComplete:"off","aria-controls":c+"-suggestions","aria-autocomplete":"list"}),(0,r.h)("input",{id:c+"-input-desktop",name:"q",className:"search_bar text-muted stat-search-input","data-loc":"homepage search by keyword",type:"search",disabled:s,value:this._textValue,placeholder:e,onKeyUp:e=>this._keyup(e),onInput:e=>this._input(e),onFocus:e=>this.setState({showSuggestions:!0}),onBlur:l?void 0:e=>this.setState({showSuggestions:!1}),autoComplete:"off","aria-controls":c+"-suggestions","aria-autocomplete":"list"}),(0,r.h)("ul",{className:"opensearch-suggestions",id:c+"-suggestions",role:"listbox",onMouseEnter:e=>this.setState({disableBlur:!0}),onMouseLeave:e=>this.setState({disableBlur:!1}),"aria-label":"Search Suggestions","aria-expanded":o},a.map((e=>(0,r.h)("li",{key:e,role:"option","aria-selected":e===n,className:e===n?"stat-text-link highlighted":"stat-text-link","data-loc":"homepage search by keyword",onClick:t=>this._select(t,e)},function(e,t){const s=e.split(/\s+/g);return t.split(/\s+/g).map((e=>{const t=s.find((t=>0===e.indexOf(t)));return{word:e,match:t}})).reduce(((e,{match:t,word:s})=>{const[i,r]=function(e,t){return e?e===t?[{text:t,isMatch:!0}]:[{text:t.substring(0,e.length),isMatch:!0},{text:t.substring(e.length),isMatch:!1}]:[{text:t,isMatch:!1}]}(t,s),o=e.length?e[e.length-1]:null;return(null==o?void 0:o.isMatch)==i.isMatch?o.text+=" "+i.text:o&&!o.isMatch?(i.text=" "+i.text,e.push(i)):(null==o?void 0:o.isMatch)?(o.text+=" ",e.push(i)):e.push(i),r&&e.push(r),e}),[])}(h,e.toLowerCase().trim()).map((e=>e.isMatch?e.text:(0,r.h)("b",null,e.text))))))))}}class u extends r.wA{constructor(e){super(e),this.state={searching:!1}}_submit(e){e.preventDefault(),this.setState({searching:!0}),window.TrackTypedSearch(e.target.q.value);const t=new URLSearchParams(window.location.search);t.delete("pt"),t.delete("StockVin"),t.delete("StockNum"),t.delete("sv"),t.set("q",e.target.q.value),location.search=t.toString()}render({placeholderLong:e,placeholderShort:t,value:s,filter:i,type:o}){return(0,r.h)("form",{id:"opensearch-form",name:"opensearch",onSubmit:e=>this._submit(e)},(0,r.h)(h,{filter:i,disabled:this.state.searching,placeholderLong:e,placeholderShort:t,value:s,type:o}))}}const d=document.querySelectorAll("[data-keyword-search-field]");var p;document.querySelector('[data-keyword-search-element="loading"]'),Array.prototype.forEach.call(d,(e=>((0,i.bI)("[data-keyword-search]",'[data-keyword-search-element="loading"]'),(0,r.sY)((0,r.h)(u,Object.assign({},e.dataset)),e)))),function(e){e.NEW="N",e.USED="U",e.VIRTUAL="V",e.UNKNOWN="UNK"}(p||(p={}));class f{constructor(e){this.photoPath="/",this.Vin=e.Vin||e.vin||"",this.Type=e.Type||e.type||p.UNKNOWN,this.Year=e.Year||e.year||0,this.Make=e.Make||e.make||"",this.Model=e.Model||e.model||"",this.Trim=e.Trim||e.trim||"",this.StockNum=e.StockNum||e.stockNum||"",this.Bodystyle=e.Bodystyle||e.bodystyle||e.bodyStyle||"",this.Bodytype=e.BodyType||e.bodyType||e.Bodytype||e.bodytype||"",this.Photo=e.Photo||e.photo||"",this.Cpo=e.Cpo||e.cpo||!1,this.CarBravo=e.CarBravo||e.Carbravo||e.carbravo||e.carBravo||!1,this.Location=e.Location||e.location||"",this.Dealership=e.Dealership||e.dealership||"",this.Features=e.Features||e.features||[],this.Price=e.Price||e.price||0,this.Tags=e.Tags||e.tags||"",this.Manufacturer=e.Manufacturer||e.manufacturer||"",this.RvType=e.RvType||e.rvType||""}isNew(){return this.Type.toUpperCase()===p.NEW}isUsed(){return this.Type.toUpperCase()===p.USED}isVirtual(){return this.Type.toUpperCase()===p.VIRTUAL}getPhotoUrl(){return`${this.photoPath}${this.Photo}`}get name(){return`${this.Year} ${this.Make} ${this.Model} ${this.Trim}`}getDetailsPageUrl(){const e=/[^/a-zA-Z0-9\-+\s]/gi,t=this.Year,s=this.Make.replace(e,""),i=this.Model.replace(e,""),r=this.Trim.replace(e,""),o=this.Vin,a=this.Location.split(",")[0].trim().replace(e,"");if(this.isNew())return`/new-${a}-${t}-${s}-${i}-${r}-${o}`.replace(/\s+/g,"+");if(this.isUsed())return`/used-${a}-${t}-${s}-${i}-${r}-${o}`.replace(/\s+/g,"+");if(this.isVirtual())throw new Error("Cannot construct details URL for Virtual Inventory")}getRouteVinDetailsPageUrl(){return`/routevin.aspx?vin=${this.Vin}`}}
1var g=function(e,t,s,i){return new(s||(s=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function n(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,n)}l((i=i.apply(e,t||[])).next())}))};class m{constructor(){this.initialize()}initialize(){document.getElementById("opensearch-submit").addEventListener("click",(e=>{this.search(e.currentTarget)}))}search(e){var t,s,i,r;return g(this,void 0,void 0,(function*(){const o=null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.querySelector("input[id^='opensearch-']"),a=null===(s=null==o?void 0:o.value)||void 0===s?void 0:s.trim();if(a){if(1===a.split(" ").length){const e=yield this.searchStockVin(a);if(e){const t=e.getRouteVinDetailsPageUrl();return console.info("Navigating to vehicle {0}",t),void(location.href=t)}}let t=null!==(r=null===(i=null==e?void 0:e.dataset)||void 0===i?void 0:i.searchUrl)&&void 0!==r?r:`//${location.host}/searchall.aspx`;t=`${t}?q=${a}`,location.href=t}}))}searchStockVin(e){return g(this,void 0,void 0,(function*(){const t=`(vin = '${e}') or (stocknum = '${e}')`;let s=this.getParameterByName("header")||"";s=s&&(!s.startsWith("//")&&"//"+s||s)||"";try{const i=yield fetch(`${s}/api/inventory/query/?filter=${window.btoa(t)}&encoded=true`,{method:"GET"});if(!i.ok)throw new Error(`Inventory API failed with status ${i.status}: ${i.statusText}`);const r=yield i.json();return r&&0!==r.length?r.length>1?(console.info(`Inventory API returned ${r.length} results for ${e}. Redirecting to SRP instead of VDP due to duplicate stock numbers in shared inventory.`),null):new f(r[0]):(console.error(`Inventory API returned zero results! Will not redirect to VDP. There likely isn't any vehicle with VIN/stock number ${e}.`),null)}catch(e){return console.error(e),null}}))}getParameterByName(e,t){t||(t=window.location.href),e=e.replace(/[[\]]/g,"\\$&");const s=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return s?s[2]?decodeURIComponent(s[2].replace(/\+/g," ")):"":null}}}}]);
2//# sourceMappingURL=searchByKeywordChunk.js.map?v=23.116.0+20260924.10.cf1de5f1f4d4b9684c3a72f57e64cdbc99f7122f&h=8abfb70828bba05f95e9

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.