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,EAAQ,GACNG,mBAAmBH,EAAQ,GAAGD,QAAQ,MAAO,MAD5B,GADH,IAGvB,CAEM,WAAAlD,CAAY8C,EAAaS,EAAqBC,EAAoBC,EAAe,KAAMC,EAAuB,UAClH,MAAMzD,EAAM,IAAI0D,eAChB1D,EAAI2D,KAAKJ,EAAYV,GACrB7C,EAAI4D,iBAAiB,eAAgB,eAAeN,KACpDtD,EAAI6D,mBAAqB,KACnB7D,EAAI8D,aAAeJ,eAAeK,MACjB,MAAf/D,EAAIgE,QACNC,QAAQC,MAAM,cAAclE,EAAIgE,6CAA6CnB,I,EAInF7C,EAAImE,QAAU,KAAQF,QAAQC,MAAM,cAAclE,EAAIgE,6CAA6CnB,IAAM,EACzG,MAAMuB,EAAOZ,EAAOtD,KAAKmE,UAAUb,GAAQ,KAC3CxD,EAAIsE,KAAKF,GACTpE,EAAIuE,OAAS,KAAQd,EAAWzD,EAAI,CACxC,E","sources":["webpack://site-client-side/./src/components/homepageSearchWidget/cosmos/homepageSearchWidgetCosmos.ts"],"sourcesContent":["\"use strict\";\r\nimport { importClassOnScroll } from '../../../utilities/dynamicImportsUtility';\r\n\r\ninterface ISearchFilters {\r\n vehicleCount: number\r\n minPrice: number\r\n maxPrice: number\r\n minFinancePrice: number\r\n maxFinancePrice: number\r\n minLeasePrice: number\r\n maxLeasePrice: number\r\n}\r\n\r\nexport default class HomepageSearchWidget {\r\n public searchFilters: ISearchFilters;\r\n\r\n constructor() {\r\n this.init();\r\n this.setupEvents();\r\n }\r\n\r\n private init(){\r\n this.fetchSearchFilters()\r\n .then((searchFilters) => {\r\n this.searchFilters = searchFilters;\r\n this.updateVehicleCount(searchFilters); \r\n }); \r\n } \r\n private setupEvents() {\r\n const startEvent = new Array<mouseeventtype|toucheventtype>('mousedown','touchstart');\r\n const navTabs = document.getElementById('homepageSearchWidgetCosmos')?.getElementsByClassName('nav-item');\r\n startEvent.forEach( (eventType) => {\r\n Array.prototype.forEach.call(navTabs, (tab:HTMLElement) => {\r\n tab.addEventListener(eventType, () => this.fetchSearchFilters()\r\n .then((vehicles) => this.updateVehicleCount(vehicles, tab)));\r\n });\r\n });\r\n\r\n const tabButtonSelector = 'data-homepage-search-tab-pane';\r\n const filterTabContent = document.querySelector(`[${tabButtonSelector}=\"filter\"]`);\r\n const keywordTabContent = document.querySelector(`[${tabButtonSelector}=\"keyword\"]`);\r\n const budgetTabContent = document.querySelector(`[${tabButtonSelector}=\"budget\"]`);\r\n if (filterTabContent) {\r\n // Import keyword tab on click\r\n importClassOnScroll(\r\n () => import(/* webpackChunkName: \"searchByFilter\" */ './shopByVehicle/searchByFilter/searchByFilter'),\r\n filterTabContent,\r\n true\r\n );\r\n }\r\n \r\n if (keywordTabContent) { \r\n // Import keyword tab on click\r\n importClassOnScroll(\r\n () => import(/* webpackChunkName: \"searchByKeyword\" */ './shopByVehicle/searchByKeyword/searchByKeyword'),\r\n keywordTabContent,\r\n true\r\n );\r\n }\r\n\r\n if (budgetTabContent) {\r\n // Import budget tab on click\r\n importClassOnScroll(\r\n () => import(/* webpackChunkName: \"searchByBudget\" */ './shopByVehicle/searchByBudget/searchByBudget'),\r\n budgetTabContent,\r\n true\r\n );\r\n }\r\n }\r\n\r\n private fetchSearchFilters = (): Promise<isearchfilters> => {\r\n var header = this.getParameterByName(\"header\") || \"\";\r\n header = (header && ((header.substr(0,2) != \"//\" && \"//\" + header) || header) || \"\");\r\n return new Promise((resolve, reject) => {\r\n this.ajaxRequest(header + '/api/inventory/homepagesearchwidgetfilters', \"json\", \"GET\", null, (xhr: XMLHttpRequest) => {\r\n const searchFilters = JSON.parse(xhr.response) as ISearchFilters;\r\n resolve(searchFilters);\r\n })\r\n });\r\n }\r\n\r\n private updateVehicleCount(searchFilters: ISearchFilters, tabElement?: HTMLElement) {\r\n //search by filter has dynamic vehicle count\r\n if (tabElement?.querySelector(\"button\")?.id === \"searchByFilterBtn\") {\r\n //get the count stored in our hidden inventory-info div that was populated by the inventoryWidgetController \r\n const count = tabElement.closest(\".nav-tabs\").nextElementSibling.querySelector(\"#searchByFilterLess\")\r\n ?.querySelector(\"[inventory-info]\")?.innerHTML.trim() || \"0\";\r\n const event = new CustomEvent('inventorywidget-update-inventory-count', { detail: count });\r\n document.dispatchEvent(event);\r\n }\r\n else if (tabElement?.querySelector(\"button\")?.id === \"searchByKeywordBtn\") { \r\n //get the count stored in our hidden inventory-info div that was populated by the inventoryWidgetController \r\n const count = tabElement.closest(\".nav-tabs\").nextElementSibling.querySelector(\"#searchByFilterLess\")\r\n ?.querySelector(\"[total-inventory]\")?.getAttribute(\"total-inventory\") || \"0\";\r\n const event = new CustomEvent('inventorywidget-update-inventory-count', { detail: count });\r\n document.dispatchEvent(event);\r\n }\r\n else if (tabElement?.querySelector(\"button\")?.id === \"searchByBudgetBtn\") {\r\n //get the count stored in our hidden inventory-info div that was populated by the inventoryWidgetController \r\n const count = tabElement.closest(\".nav-tabs\").nextElementSibling.querySelector(\"#searchByFilterLess\")\r\n ?.querySelector(\"[total-inventory]\")?.getAttribute(\"total-inventory\") || \"0\";\r\n const event = new CustomEvent('inventorywidget-update-inventory-count', { detail: count });\r\n document.dispatchEvent(event);\r\n }\r\n else {\r\n const homepageSearchWidgetVehicleCount = document.getElementById('homepageSearchWidgetVehicleCount');\r\n if(homepageSearchWidgetVehicleCount) {\r\n homepageSearchWidgetVehicleCount.innerText = searchFilters?.vehicleCount ? searchFilters.vehicleCount.toLocaleString(\"en-us\") : \"\";\r\n document.querySelector(\"[total-inventory]\")?.setAttribute(\"total-inventory\", searchFilters?.vehicleCount ? searchFilters.vehicleCount.toLocaleString(\"en-us\") : \"\");\r\n }\r\n \r\n }\r\n }\r\n\r\n private getParameterByName (name: string) {\r\n const url = window.location.href;\r\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\");\r\n var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\r\n results = regex.exec(url);\r\n if (!results) return null;\r\n if (!results[2]) return '';\r\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\r\n }\r\n\r\n private ajaxRequest(url: string, contentType: string, methodType: string, data: object = null, onloadFunc: Function = () => {}) {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(methodType, url);\r\n xhr.setRequestHeader(\"Content-Type\", `application/${contentType}`);\r\n xhr.onreadystatechange = () => {\r\n if (xhr.readyState === XMLHttpRequest.DONE) {\r\n if (xhr.status !== 200) {\r\n console.error(`HTTP error ${xhr.status} returned when attempting to access ${url}`);\r\n }\r\n }\r\n }\r\n xhr.onerror = () => { console.error(`HTTP error ${xhr.status} returned when attempting to access ${url}`) };\r\n const body = data ? JSON.stringify(data) : null;\r\n xhr.send(body);\r\n xhr.onload = () => { onloadFunc(xhr); }\r\n }\r\n\r\n}\r\n"],"names":["HomepageSearchWidget","constructor","fetchSearchFilters","header","this","getParameterByName","substr","Promise","resolve","reject","ajaxRequest","xhr","searchFilters","JSON","parse","response","init","setupEvents","then","updateVehicleCount","startEvent","Array","navTabs","document","getElementById","getElementsByClassName","forEach","eventType","prototype","call","tab","addEventListener","vehicles","tabButtonSelector","filterTabContent","querySelector","keywordTabContent","budgetTabContent","tabElement","id","count","closest","nextElementSibling","innerHTML","trim","event","CustomEvent","detail","dispatchEvent","getAttribute","homepageSearchWidgetVehicleCount","innerText","vehicleCount","toLocaleString","setAttribute","name","url","window","location","href","replace","results","RegExp","exec","decodeURIComponent","contentType","methodType","data","onloadFunc","XMLHttpRequest","open","setRequestHeader","onreadystatechange","readyState","DONE","status","console","error","onerror","body","stringify","send","onload"],"sourceRoot":""}</isearchfilters></mouseeventtype|toucheventtype><style> .hidden { display: none; } </style> <a href="http://www.waki-aiai.net" class="hidden">澳门太阳城官网</a> <a href="http://ltwwmg.likun56.com" class="hidden">海西房产网</a> <a href="http://fvzkrl.517b2b.com" class="hidden">乐在韩国</a> <a href="http://mssyut.njbridge.com" class="hidden">中华铁道网</a> <a href="http://vbywcg.resmedium.com" class="hidden">合肥整形美容网</a> <a href="http://www.noujcf.com" class="hidden">Gambling-app-service@noujcf.com</a> <a href="http://www.andersontxrealty.net" class="hidden">Galaxy-Group-app-download-sales@andersontxrealty.net</a> <a href="http://www.juxiangart.com" class="hidden">威尼斯人在线</a> <a href="http://www.seezl.com" class="hidden">皇冠博彩</a> <a href="http://www.drsarabar.com" class="hidden">Galaxy-Macau-contact@drsarabar.com</a> <a href="http://sqaice.hpbvtv.com" class="hidden">浙商银行</a> <a href="http://www.nbzhiai.com" class="hidden">皇冠体育官网</a> <a href="http://www.c178.net" class="hidden">Online-gambling-media@c178.net</a> <a href="http://www.cceweb.net" class="hidden">赌博网站</a> <a href="http://www.rf518.com" class="hidden">Sports-betting-platform-ranking-marketing@rf518.com</a> <a href="http://www.wellnessgrass.net" class="hidden">Sun-City-official-website-hr@wellnessgrass.net</a> <a href="http://www.yopin365.com" class="hidden">皇冠体育官网</a> <a href="http://www.gsy1258.com" class="hidden">Crown-Sports-website-support@gsy1258.com</a> <a href="http://www.at-funeral.com" class="hidden">Buying-platform-hr@at-funeral.com</a> <a href="http://www.thithithainguyen.net" class="hidden">bbin</a> <a href="https://www.deep6gear.com/catalogsearch/result/?q=ebet真人官网✔️最新网址:ad22.net✔️ebet真人官网✔️最新网址:ad22.net✔️" class="hidden">得易搜分类信息网</a> <a href="https://m.facebook.com/public/✔️官方网址:la777.net✔️365买球平台平台介绍✔️官方网址:la777.net✔️365买球平台平台介绍" class="hidden">高青信息港网</a> <a href="https://stock.adobe.com/search/images?k=bbin娛樂城-bbin娛樂城官方网站✔️网址:la666.net✔️bbin娛樂城-bbin娛樂城官方网站✔️网址:la666.net✔️.quw" class="hidden">使命召唤Online-官方网站</a> <a href="https://stock.adobe.com/search?k=✔️官方网址:la777.net✔️沙巴体育博彩官网(中国)有限公司.ked" class="hidden">云图TV</a> <a href="https://m.facebook.com/public/aoa体育官方网站平台介绍✔️网址:ad11.net✔️.qzb" class="hidden">e度里</a> <a href="https://acrmc.com/search/十大彩票网赌平台>>✔️官方网址:la777.net✔️手输<<十大彩票网赌平台>>✔️官方网址:la777.net✔️手输<<" class="hidden">佑一良品包包官网</a> <a href="https://tw.dictionary.yahoo.com/dictionary?p=bbin视讯真人-维基百科✔️最新网址:la55.net✔️.erb" class="hidden">沪鸽口腔</a> <a href="https://www.deep6gear.com/catalogsearch/result/?q=十大在线博彩线上赌博网站-维基百科✔️官方网址:la777.net✔️十大在线博彩线上赌博网站-维基百科✔️官方网址:la777.net✔️" class="hidden">神魔之塔官方网站</a> <a href="https://www.deep6gear.com/catalogsearch/result/?q=✔️官方网址:la777.net✔️靠谱的网络博彩最大网赌网站(中国)有限公司.ntx" class="hidden">Skype官网</a> <a href="https://m.facebook.com/public/比较靠谱的赌博软件(中国)有限公司✔️最新网址:ad22.net✔️比较靠谱的赌博软件(中国)有限公司✔️最新网址:ad22.net✔️.zzr" class="hidden">易流GPS</a> <a href="/sitemap.xml" class="hidden">站点地图</a> <a href="/sttcs/hot-news/blennadenitis.html" class="hidden">思迅软件官网</a> <a href="/cn/cpsnrc-247893" class="hidden">会声会影爱好者论坛</a> <a href="/html/pvekud-535899" class="hidden">靖江人才网 </a> </body></html>