PageSourceSearch

https://www.selectautomotive.com/static/ws/inv-data/bundle.c94fdfa4af0b5e510196f0c7bc830333.js

js selectautomotive.com collected 2026-10-09 02:48:44 UTC 29,478 bytes, 2 lines download raw bytes

1(()=>{var e={973(e,t,r){e.exports={...r(174)}},331(e,t,r){e.exports={...r(335)}},288(e,t,r){e.exports={...r(742)}},846(e,t,r){"use strict";r.d(t,{A:()=>a});const a={}},623(e,t,r){"use strict";r.d(t,{A:()=>a});const a={moreRequestData:function(e={},t){return t.error||void 0===t.payload||"SET_MORE_REQUEST_DATA"!==t.type?e:t.payload},WIS:(e=null,t)=>"SET_WIS_INVENTORY"===t.type?t.payload:e}},606(e){var t,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function n(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var o,c=[],l=!1,d=-1;function u(){l&&o&&(l=!1,o.length?c=o.concat(c):d=-1,c.length&&h())}function h(){if(!l){var e=n(u);l=!0;for(var t=c.length;t;){for(o=c,c=[];++d<t;)o&&o[d].run();d=-1,t=c.length}o=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function p(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new g(e,t)),1!==c.length||l||n(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=p,a.addListener=p,a.once=p,a.off=p,a.removeListener=p,a.removeAllListeners=p,a.emit=p,a.prependListener=p,a.prependOnceListener=p,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},743(e){e.exports={isNode:!1,isBrowser:!0,enforceServerSide:()=>{throw new Error("You are attempting to use code in the browser that has been designated server-side only. Such activity is known by the state of California to lead to usage of the dark side of the Force.")}}},335(e,t,r){e.exports=r(743)},742(e,t,r){const{log:a}=r(437);e.exports={fatal:(e,t=null)=>{a("FATAL",e,t)},error:(e,t=null)=>{a("ERROR",e,t)},warn:(e,t=null)=>{a("WARN",e,t)},info:(e,t=null)=>{a("INFO",e,t)},debug:(e,t=null)=>{a("DEBUG",e,t)},trace:(e,t=null)=>{a("TRACE",e,t)}}},437(e,t,r){const{levels:a,colors:i,logLevel:s,stderrLevels:n}=r(812);a[s];e.exports={log:(e,t,r)=>{false}}},812(e,t,r){const a=r(606).env.LOG_LEVEL||"INFO",i={FATAL:0,ERROR:1,WARN:2,INFO:3,DEBUG:4,TRACE:5},s=new Set;
1Object.keys(i).forEach(e=>{i[e]<i.INFO&&s.add(e)});e.exports={levels:i,logLevel:a,stderrLevels:s,colors:{FATAL:"red bold",ERROR:"red",WARN:"yellow",INFO:"green",DEBUG:"cyan",TRACE:"blue"}}},174(e){"use strict";e.exports=DDC.WsmCommonData}},t={};function r(a){var i=t[a];if(void 0!==i)return i.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=ReactDOM,t=React;var a=r.n(t);const i=ReactRedux;var s=r(973);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},n.apply(null,arguments)}class o extends a().Component{constructor(e){super(e),this.renderDelegate=this.renderDelegate.bind(this)}renderDelegate({labels:e}){const{HeadingTag:t,headingText:r,widgetId:i,toggleCollapse:s,showIcon:o,headingClasses:c,iconClasses:l}=this.props,d=[...l];let u={};if(s){const e="ddc-icon-expand";d.push(e),d.push("icon-style-collapse"),u={role:"button","data-toggle":"collapse","data-target":`#${i}-collapse`,"data-expand-icon-class":`${e}`,"data-collapse-icon-class":"ddc-icon-collapse","aria-expanded":"false","aria-controls":`${i}-collapse`}}return a().createElement(t,n({className:c.join(" ")},u),o&&a().createElement(a().Fragment,null,a().createElement("i",{className:d.join(" ")})," "),e.getHTML(r))}render(){return this.props.headingText&&"FALSE"!==this.props.headingText.toUpperCase()?a().createElement(s.Common,{render:this.renderDelegate}):null}}o.defaultProps={HeadingTag:"h3",headingText:""};const c=o,l=e=>{const{id:t,children:r,toggleCollapse:i}=e;return i?a().createElement("div",{id:`${t}-collapse`,className:"collapse collapse-content"},r):r};l.defaultProps={toggleCollapse:!1};const d=l;var u=r(174),h=r(331);const g=()=>"undefined"!=typeof window&&window.newrelic&&"object"==typeof window.newrelic,p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;g()&&window.newrelic.addPageAction(e,t)},y=(e,t)=>{g()&&window.newrelic.setCustomAttribute(e,t)},w=(new Set(["metadataLocation"]),(e={},t="",r=0,a={})=>{const i={...e};return t&&(Array.isArray(t)?t.some(Boolean):t.length>0)&&(i.sortBy=t),0!==r&&(i.start=r),{...i,...a}}),f=e=>{let t="";switch(typeof e){case"object":return null!==e?(Object.entries(e).forEach(([e,r])=>{(Array.isArray(r)?r:[r]).forEach(r=>{t&&(t+="&"),t+=`${encodeURIComponent(f(e))}=${encodeURIComponent(r)}`})}),`${t.length>=1?"?":""}${t}`):"";case"string":return e;case"number":return String(e);default:return""}},m=["drsa.paymentLoan","drsa.paymentLease","paymentLoan","paymentLease"],S=(e={})=>{const t=((e=[])=>e.filter(e=>e&&!m.includes(e.id)))(Array.isArray(e.facets)?[...e.facets]:[]);return{inventory:e.inventory,accounts:e.accounts,incentives:e.incentives,pageInfo:e.pageInfo,facets:t,filters:e.filters,offSiteData:e.offSiteData,suggestedFilters:e.suggestedFilters,totalCount:e?.pageInfo?.totalCount}},D=(e,t)=>Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t),v={id:"geoLocation",label:"Geo Location Label",type:"GEO",collapsed:!1,values:[{value:""}]},I={pageInfo:{totalCount:0,pageSize:0,pageStart:0,trackingData:[]},inventory:[],incentives:{},accounts:{}},T={facets:[],filters:[],suggestedFilters:[],totalCount:0},C=(e={},{geoEnabled:t=!1}={})=>{const r=S(e);let a;return Array.isArray(e.facets)&&(a=t?[v,...r.facets]:r.facets),{facetResponse:{facets:a,filters:r.filters,offSiteData:r.offSiteData,suggestedFilters:r.suggestedFilters,totalCount:r.totalCount},inventoryResponse:{accounts:r.accounts,incentives:r.incentives,inventory:r.inventory,pageInfo:r.pageInfo}}},b=(e,t={})=>{if(!e?.images||0===e.images.length)return null;return"true"===t.offsetSharedVehicleImageByOne&&e.images.length>1?e.images[1]:e.images[0]},O=({trackingData:e,sortBy:t=[],totalCount:r,pageSize:a,pageStart:i,queryFacets:s})=>{window.DDC.dataLayer&&window.DDC.dataLayer.page&&window.DDC.dataLayer.page.attributes?(window.DDC.dataLayer.vehicles=e,window.DDC.dataLayer.page.attributes.vehicleListingPageSort=t[0]||null,window.DDC.dataLayer.page.attributes.vehicleResultCount=r,window.DDC.dataLayer.page.attributes.vehicleCountPerPage=a,window.DDC.dataLayer.page.attributes.vehicleCurrentPage=i/a+1,s&&(window.DDC.dataLayer.page.queryFacets=s||{}
1)):p("WS INV DATA DATALAYER NOT DEFINED",{trackingData:e,queryFacets:s,pageSize:a,pageStart:i,totalCount:r,sortBy:t})},E=(e=[],t=[],r={},a,i)=>{const{pageInfo:{totalCount:s=0,pageSize:n,pageStart:o},trackingData:c}=r,l=((e=[])=>e.reduce((e,{id:t,values:r})=>(e[t]=r.reduce((e,{value:t})=>e.concat(t),[]).join(", "),e),{}))(e);O({trackingData:c,sortBy:t,totalCount:s,pageSize:n,pageStart:o,queryFacets:l}),((e,t,r,a,i)=>{const s="search"===t?.clickedFacetName;if(window?.DDC&&"function"==typeof window.DDC.pushToGtmDataLayer)try{"facet"===e?window.DDC.pushToGtmDataLayer({event:"ddc.inventory.filterSearch.click",eventData:{resultCount:a,facets:r,sortBy:i,...t}}):("search"===e||!e&&s)&&window.DDC.pushToGtmDataLayer({event:"ddc.inventory.typedSearch",eventData:{resultCount:a,queryFacets:r,sortBy:i}}),"sort"!==e&&"spellcheck"!==e&&window.DDC.pushToGtmDataLayer({event:"ddc.inventory.filterSearch",eventData:{resultCount:a,queryFacets:r,sortBy:i}})}catch(e){p("WS INV DATA GTM PUSH FAILED",{errorMsg:e?.message||String(e),errorStack:e?.stack})}})(a,i,l,s,t)},A=(e,t)=>{let r;return e&&(r=e.find(e=>e.name===t)?.value),r},_=e=>{const t={};return e.forEach(e=>{t[e.codeType]=e.code}),t},P=(e=[])=>e.reduce((e,t)=>(e[t.typeClass]=t.value,!0===t.isFinalPrice&&(e.finalPrice=t.value),e),{}),k=(e,t={})=>{let r=0;return e.inventory.map(a=>{r+=1;const i={accountId:a.accountId,address:e.accounts[a.accountId].address,autodataCaId:A(a.trackingAttributes,"autodataCaId"),autodataUsId:A(a.trackingAttributes,"autodataUsId"),bodyStyle:a.bodyStyle,certified:a.certified,chromeId:a.chromeId,cityFuelEfficiency:A(a.trackingAttributes,"cityFuelEconomy"),classification:a.classification,dealerCodes:_(e.accounts[a.accountId].dealerCodes),doors:A(a.trackingAttributes,"doors"),driveLine:A(a.trackingAttributes,"driveLine"),engine:A(a.trackingAttributes,"engine"),engineSize:A(a.trackingAttributes,"engineSize"),deliveryDateRange:A(a.trackingAttributes,"deliveryDateRange"),exteriorColor:A(a.trackingAttributes,"exteriorColor"),fuelType:A(a.trackingAttributes,"fuelType"),normalFuelType:A(a.trackingAttributes,"normalFuelType"),highwayFuelEfficiency:A(a.trackingAttributes,"highwayFuelEconomy"),images:a.images?[b(a,t)]:[],indexPosition:r,interiorColor:A(a.trackingAttributes,"interiorColor"),inventoryDate:a.inventoryDate,inventoryType:(o=a.type,c=a.certified,c&&"used"===o?"certified":o),link:a.link,make:a.make,model:a.model,modelCode:a.modelCode,modelYear:a.year,newOrUsed:a.type,odometer:parseInt(A(a.trackingAttributes,"odometer"),10),oemSourcedMerchandisingStatus:A(a.trackingAttributes,"oemSourcedMerchandisingStatus"),oemSerialNumber:A(a.trackingAttributes,"oemSerialNumber"),optionCodes:a.optionCodes,packageCode:A(a.trackingAttributes,"packageCode"),pricing:P(a?.pricing?.dprice),priorityType:(s=a.isNewCarBoost,n=a.spotlightedVehicle,!0===s?"ncb":!0===n?"spv":"standard"),status:a.status,stockNumber:a.stockNumber,transmission:A(a.trackingAttributes,"transmission"),trim:a.trim,uuid:a.uuid,vin:a.vin,year:a.year};var s,n,o,c;return void 0!==a?.trackingPricing&&Object.keys(a.trackingPricing).forEach(e=>{"0"!==a.trackingPricing[e]&&(i[e]=a.trackingPricing[e])}),Array.isArray(a.trackingAttributes)&&a.trackingAttributes.forEach(e=>{e.name in i==!1&&(i[e.name]=A(a.trackingAttributes,e.name))}),i})},R=(e,t,r={})=>{const a={trackingData:k(e,r),sortBy:t,totalCount:e.pageInfo.totalCount,pageSize:e.pageInfo.pageSize,pageStart:e.pageInfo.pageStart,queryFacets:void 0};O(a)};class F{constructor(e,t,r,a,i={},s=null,n="none",o=null){if(this.prefs=r,this.labels=a,this.parameterMap=i,this.ssrData=s,this.start=0,this.urlParams={},this.facets={},this.appliedFilters=[],this.inventory={},this.spellcheck="",this.appliedSpellcheck=!1,this.originalSearchTerm="",this.srpReady=!1,this.sortOptions=((e,t)=>{const{sorts:r="",sortsTitles:a=""}=e,i=new Map,s=[],n=r.split(","),o=a.split(",");return n.length===o.length&&(s.push({value:"",label:t.get("SORT_BY")}),o.forEach((e,t)=>{"BLANK"!==n[t]&&i.set(e,n[t])}
1),i.forEach((e,r)=>{let a,i;const n=t.get(r).trim().replace(/[\\"]/g,"");switch(e.toLowerCase().includes("color")||e.toLowerCase().includes("bodystyle")?(a=t.get("A_TO_Z"),i=t.get("Z_TO_A")):e.includes("year")?(a=t.get("OLD_TO_NEW"),i=t.get("NEW_TO_OLD")):e.includes("inventoryDate")?a=t.get("EARLIEST"):e.includes("geodist")?(a=t.get("NEAR_TO_FAR"),i=t.get("FAR_TO_NEAR")):e.includes("relevancyScore")?i=t.get("RELEVANCE"):(a=t.get("LOW_TO_HIGH"),i=t.get("HIGH_TO_LOW")),e){case"relevancyScore":s.push({value:`${e} desc`,label:`${n}`});break;case"inventoryDate":s.push({value:`${e} asc`,label:`${n}: ${a}`});break;default:s.push({value:`${e} asc`,label:`${n}: ${a}`}),s.push({value:`${e} desc`,label:`${n}: ${i}`})}})),s})(r,a),this.sortBy="",this.filterType="",this.filterSearchEventData={},this.TOPIC_PREFIX="ws-inv-data",this.FACETS_TOPIC=`${this.TOPIC_PREFIX}/facets`,this.INVENTORY_TOPIC=`${this.TOPIC_PREFIX}/inventory`,this.SPELLCHECK_TOPIC=`${this.TOPIC_PREFIX}/spellcheck`,this.SORT_BY_TOPIC=`${this.TOPIC_PREFIX}/sortBy`,this.TOGGLE_LISTING_VIEW_TOPIC=`${this.TOPIC_PREFIX}/toggleListingView`,this.DEBOUNCE_WAIT=100,this.useOriginalSearchTerm=!1,this.forceOriginalSearch=!1,"true"===this.prefs.geoLocationEnabled){y("srpGeoLocationEnabled","true"),y("serverGeoZipSource",n);const e=o?[o]:null;this.geoData={geoZip:e,geoRadius:[this.prefs.defaultGeoDistRadius]},this.geoDataPrefs={geoRadiusValues:this.prefs.geoRadiusValues.replaceAll(" ",""),defaultGeoDistRadius:this.prefs.defaultGeoDistRadius}}r["listing.config.id"]&&y("listingConfigId",r["listing.config.id"]),this.requestSpellcheck=e,this.requestWISInventoryAndFacets=t,this._requestSpellcheck=async()=>{this.requestSpellcheck(this.urlParams.search.toString()).then(e=>{this.spellcheck=e,this._setLocalStorageForOriginalSearch(),this._requestInventoryAndFacets("spellcheck")})},this._requestInventoryAndFacets=window._.debounce((e,t={})=>{this.spellcheck&&!this.forceOriginalSearch?this.urlParams.search=[this.spellcheck]:this.forceOriginalSearch&&(this.urlParams.search=[this.originalSearchTerm]);const{start:r,sortBy:a,...i}=this.urlParams;this.requestWISInventoryAndFacets(i,this.start,this.sortBy,e,t)},this.DEBOUNCE_WAIT),this._publishSortBy=window._.debounce(()=>{this.publishEvent(this.SORT_BY_TOPIC,this.sortBy)},this.DEBOUNCE_WAIT),"undefined"!=typeof window&&window.DDC&&(window.DDC.InvData=this),this._loadInitialData()}registerFacetNotification(e){this.subscribeEvent(this.FACETS_TOPIC,e)}registerInventoryNotification(e){this.subscribeEvent(this.INVENTORY_TOPIC,e)}registerSortByNotification(e){this.subscribeEvent(this.SORT_BY_TOPIC,e)}registerToggleListingView(e){this.subscribeEvent(this.TOGGLE_LISTING_VIEW_TOPIC,e)}getFacets(){return this.facets}getSortOptions(){return this.sortOptions}getInventory(){return this.inventory}getPaging(){return this.inventory?.pageInfo||null}getSortBy(){return this.sortBy}getAppliedFilters(){return this.appliedFilters}getGeoData(){return this.geoData}getGeoDataPrefs(){return this.geoDataPrefs}getIsWIS(){return!0}replaceSelections(e,t,r,a=!0){this.urlParams=e,this.start=r,this.sortBy=t,a&&this._updateBrowserHistory(),this._requestInventoryAndFacets()}clearFilters(){const e=((e={},t=[])=>{const r=t.length?t.map(e=>e.id):[];return Object.keys(e).filter(e=>!r.includes(e)&&"incentiveId"!==e&&"vdpUrl"!==e&&!e.match(/^SB.*/)).reduce((t,r)=>(t[r]=e[r],t),{})})(this.urlParams,this.appliedFilters);e.geoZip&&(e.geoRadius=["0"]),this._clearSpellcheckMsg(),this._clearForceOriginalSearch(),this._clearOriginalSearchTerm(),this.replaceSelections(e,this.sortBy,0,!0)}setSortBy(e=""){this.sortBy=e.split(),this._updateBrowserHistory(),this._requestInventoryAndFacets("sort"),this._publishSortBy()}setOriginalSearchTerm(){this.useOriginalSearchTerm=!0,this.spellcheck="",this.originalSearchTerm&&y("selectedOriginalSearchTerm",this.originalSearchTerm),this._setLocalStorageForForceSearch(),this._clearSpellcheckMsg(),this._requestInventoryAndFacets()}spellcheckSearchTerm(e,t){if(window.DDC.InvData.clearFilters(),t.search){const e=[];e.push(t.search),this.urlParams.search=e,window.history.pushState({urlParam
1s:this.urlParams},"",`${window.location.origin}${window.location.pathname}${this.getQueryString()}`)}this._requestSpellcheck();const r={...this.getAppliedFilters().filter(e=>e.id.includes("geo")).reduce((e,t)=>({...e,[t.id]:t.values[0].value}),{}),...t};Object.keys(r).forEach(t=>{window.DDC.InvData.setFilterSelections({filterName:t,filterValues:[r[t]],filterValue:r[t],element:e.target})})}setFilterSelections({filterName:e,filterValues:t,filterValue:r,element:a,isSelected:i=!0,isSlider:s=!1,isChip:n=!1,filterTitleText:o=""}){if(this._updateUrlParams({filterName:e,filterValues:t}),this.start=0,this.filterType=e,this.filterSearchEventData={clickedFacetName:e,clickedFacetValue:r,clickedFacetTitleText:o,checked:i,isSlider:s,isBreadcrumb:n,element:a},"geoZip"===e){const e=t?.[0];e?(this.geoData.geoZip=t,this.urlParams.geoRadius||(this.urlParams.geoRadius=this.geoData.geoRadius)):(this.geoData.geoZip=null,delete this.urlParams.geoRadius)}this._updateBrowserHistory(),Object.keys(this.urlParams).includes("search")||(this._clearSpellcheckMsg(),this._clearForceOriginalSearch(),this._clearOriginalSearchTerm());const c="search"===e?"search":"facet";this._requestInventoryAndFacets(c,this.filterSearchEventData)}setStart(e,t=!0){this.start=e.toString().split(),t&&this._updateBrowserHistory(),this._requestInventoryAndFacets()}getQueryStringObj(e={}){return w(this.urlParams,this.sortBy,this.start,e)}getQueryString(e={}){return((e={},t="",r=0,a={})=>f(w(e,t,r,a)))(this.urlParams,this.sortBy,this.start,e)}_clearForceOriginalSearch(){if(this.forceOriginalSearch){try{window.localStorage.removeItem("forceOriginalSearch")}catch{}this.forceOriginalSearch=!1}}_clearOriginalSearchTerm(){if(this.originalSearchTerm){try{window.localStorage.removeItem("originalSearchTerm")}catch{}this.originalSearchTerm=""}}_clearSpellcheckMsg(){this.spellcheck="",this.useOriginalSearchTerm=!1,this.publishEvent(`${this.TOPIC_PREFIX}/clearSpellcheckMsg`)}_setLocalStorageForOriginalSearch(){if(Object.keys(this.urlParams).includes("search")){try{window.localStorage.setItem("originalSearchTerm",this.urlParams.search.toString())}catch{}y("originalSearchTerm",this.originalSearchTerm),y("CorrectedSearchTerm",this.spellcheck),this.useOriginalSearchTerm=!0}}_setLocalStorageForForceSearch(){try{window.localStorage.setItem("forceOriginalSearch","true"),this.forceOriginalSearch=window.localStorage.getItem("forceOriginalSearch")}catch{this.forceOriginalSearch="true"}}_updateUrlParams({filterName:e,filterValues:t}){D(this.urlParams,"vdpUrl")&&(this.appliedFilters.forEach(({id:e,values:t})=>{D(this.urlParams,e)||(this.urlParams[e]=[t[0]?.value])}),delete this.urlParams.vdpUrl);const r=((e="")=>{const t={SBtype:"compositeType",SByear:"year",SBmake:"make",SBmodel:"model",SBbodystyle:"bodyStyle",SBtrim:"trim",SBprice:"price",SBmileage:"odometer",SBcityMPG:"cityMpg",SBhighwayMPG:"highwayMpg",SBstockNumber:"stockNumber",SBlinkedAccountId:"accountId"};return Object.keys(t).filter(r=>t[r]===e)})(e),a=r.length>0&&Object.prototype.hasOwnProperty.call(this.urlParams,r);t&&t.length?(a&&!t.includes(this.urlParams[r][0])&&delete this.urlParams[r],this.urlParams[e]=t):"incentiveIds"===e&&!this.urlParams.incentiveIds&&this.urlParams.incentiveId?delete this.urlParams.incentiveId:(a&&delete this.urlParams[r],delete this.urlParams[e])}_updateBrowserHistory(){window.history.pushState({urlParams:this.urlParams,sortBy:this.sortBy,start:this.start},"",`${window.location.origin}${window.location.pathname}${this.getQueryString()}`)}publishEvent(e,...t){window&&window.DDC&&window.DDC.pubsub?window.DDC.pubsub.publish(e,...t):"undefined"!=typeof window&&y("pubsubNotReadyOnPublish",e)}subscribeEvent(e,t){window&&window.DDC&&window.DDC.pubsub&&window.DDC.pubsub.subscribe(e,t)}_loadInitialData(){y("isSRP","true"),y("ws-inv-data-refactored","true");const{sortBy:e="",start:t=0,...r}=this.parameterMap,a=!!this.geoData?.geoZip,i=a&&Object.keys(this.geoData).every(e=>Object.keys(r).includes(e));a&&!i?(this.urlParams={...r,...this.geoData},window.history.pushState({urlParams:this.urlParams},"",`${window.location.origin}${window.location.pathname}${this.getQueryString()}
1`)):this.urlParams=r,this.srpReady=!0,this.sortBy=e,this.start=t,this.originalSearchTerm=null,this.forceOriginalSearch=null;try{this.originalSearchTerm=window.localStorage.getItem("originalSearchTerm"),this.forceOriginalSearch=window.localStorage.getItem("forceOriginalSearch")}catch{}const s=Object.keys(this.urlParams).includes("search"),n=s?this.urlParams.search.toString():"";s&&n!==this.originalSearchTerm?(this._clearForceOriginalSearch(),this.useOriginalSearchTerm=!1):s&&n===this.originalSearchTerm?this.useOriginalSearchTerm=!1:s?this.useOriginalSearchTerm=!0:(this.useOriginalSearchTerm=!1,this._clearOriginalSearchTerm()),this._hydrateFromSSR(s)?y("inventoryDataSource","server"):s?(y("inventoryDataSource","client-fallback"),this._requestSpellcheck()):(y("inventoryDataSource","client-fallback"),this._requestInventoryAndFacets()),this._publishSortBy()}_hydrateFromSSR(e){const{ssrData:t}=this;if(this.ssrData=null,e||!t||!Array.isArray(t.inventory)||!t.pageInfo||!Array.isArray(t.facets)){let r="unknown";return e?r="searchInUrl":t?Array.isArray(t.inventory)?t.pageInfo?Array.isArray(t.facets)||(r="noFacetsArray"):r="noPageInfo":r="noInventoryArray":r="noSsrData",y("ssrHydration.result","skipped"),y("ssrHydration.skipReason",r),!1}const r=Date.now();let a=!1,i=!1;try{const{facetResponse:e,inventoryResponse:s}=C(t,{geoEnabled:!!this.geoData});this.facets=e,this.appliedFilters=e.filters||[],this.publishEvent("ws-inv-data/facets"),a=!0,this.inventory=s,this.publishEvent("ws-inv-data/inventory"),i=!0,y("ssrHydration.dataLayerReady",!!window.DDC?.dataLayer?.page?.attributes);try{const{pageInfo:{trackingData:e,...t}}=s;E(this.appliedFilters,this.sortBy,{pageInfo:t,trackingData:e},void 0,{}),R(s,void 0)}catch(e){y("ssrHydration.trackingError",!0),p("WS INV DATA SSR HYDRATION TRACKING ERROR",{error:e?.message,stack:e?.stack?.slice(0,500)})}return y("ssrHydration.result","success"),y("ssrHydration.durationMs",Date.now()-r),y("ssrHydration.inventoryCount",t.inventory.length),!0}catch(e){return y("ssrHydration.result","error"),p("WS INV DATA SSR HYDRATION FAILED",{error:e?.message,stack:e?.stack?.slice(0,500),publishedFacets:a,publishedInventory:i}),a&&i}}}var B=r(288),L=r.n(B);const N=DDC.Hysterics,$=(e,...t)=>{h.isBrowser&&window?.DDC?.pubsub&&window.DDC.pubsub.publish(e,...t)},q=(0,N.hysteriFetch)("ws-inv-data-request-get-inventory-and-facets"),x=(e,t,r,a,i={})=>{(async()=>{let e,s,n,o,c,l="request";const d=(e=>{const{inventoryParameters:t={},preferences:r}=e,a=(i=t,s="geoZip",Object.hasOwn?Object.hasOwn(i,s):Object.prototype.hasOwnProperty.call(i,s));var i,s;const n=!!t.sortBy?.[0];return!a||n||"true"===r?.disableGeodistSort?e:{...e,inventoryParameters:{...t,sortBy:["geodist asc"]}}})(t);try{if($("ws-inv-data/inventory-request"),l="fetch",n=await q("/api/widget/ws-inv-data/getInventoryAndFacets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)},{[N.wrappers.timeout.contextKey]:{timeout:5e3}}),n&&"object"==typeof n&&(Array.isArray(n.facets)||Array.isArray(n.inventory))){if(l="process-response",({facetResponse:e,inventoryResponse:s}=C(n,{geoEnabled:h.isBrowser&&!!window.DDC?.InvData?.geoData})),e.facets?h.isBrowser&&window.DDC.InvData&&(window.DDC.InvData.facets=e,window.DDC.InvData.appliedFilters=e?.filters||[],l="publish-facets",$("ws-inv-data/facets")):(o="missing facet data",h.isBrowser&&window.DDC.InvData&&(window.DDC.InvData.facets=T)),s.inventory?h.isBrowser&&window.DDC.InvData&&(window.DDC.InvData.inventory=s,l="publish-inventory",$("ws-inv-data/inventory")):(o="missing inventory data",h.isBrowser&&window.DDC.InvData&&(window.DDC.InvData.inventory=I)),h.isBrowser&&window.DDC.InvData&&e.facets&&s.inventory){const{pageInfo:{trackingData:e,...t}}=s;l="tracking",E(window.DDC.InvData.appliedFilters,window.DDC.InvData.sortBy,{pageInfo:t,trackingData:e},r,a),R(s,d.inventoryParameters?.sortBy)}}else o="missing inventory and facet data",h.isBrowser&&window.DDC.InvData&&(window.DDC.InvData.facets=T,window.DDC.InvData.inventory=I)}catch(e){o=e.message||e,c=e.stack}finally{i["srp-track-fetch-resource-timing"]&&((e,t)=>{const r=performance.getEntriesByType("resource").filter(t=>t.name.includes(e)),a=r.length,i=r[a-1],s=`${e} | ${t} | duration: ${i?.duration}, request: ${a}`;L().info(s),p("WS INV DATA FETCH DURATION",{srpFetchType:e,srpFetchEndpoint:t,srpFetchCount:a,srpFetchDuration:i?.duration})})("getInventoryAndFacets","WIS"),s?.inventory||$("ws-inv-data/request-failed"),o&&(y("SRP ERROR",`ws-inv-data unified request failed: ${o}`),p("WS INV DATA UNIFIED REQUEST FAILED",{errorMsg:o,errorStack:c,failedStage:l,hasFacets:!!e?.facets,hasInventory:!!s?.inventory}))}})()},W=(0,N.hysteriFetch)("ws-inv-data-spellcheck-proxy-fetch"),G=()=>{const e=(0,u.useFlags)(),r=(0,u.useLabels)(),{WIS:s,moreRequestData:n,moreRequestData:{isComposer:o}}=(0,i.useSelector)(e=>e),c={...(0,u.useRequestData)(),...n},l=(0,u.usePrefs)(),d=t=>{const{siteId:r}=c,{"listing.config.id":a}=l;return(async(e,t,r,a)=>{const i={siteId:e,listingType:t,searchTerm:r,flags:a};let s;try{s=await W("/api/widget/ws-inv-data/getSpellcheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)},{[N.wrappers.timeout.contextKey]:{timeout:a["ws-inv-data-spellcheck-proxy-timeout"]}})}catch(t){L().error(`spellcheckProxyFetch : ${t.name} : ${t.message} for account id ${e}`),y("SRP ERROR",`ws-inv-data spellcheck proxy request failed for site: ${e} and search term: ${r}`),s=r}return s})(r,a,t,e)},g=(t,r,a,i,s)=>{h.isBrowser&&window.DDC?.dataLayer?.additionalInventoryFields&&(l["required.tracking.attributes"]=window.DDC.dataLayer.additionalInventoryFields.join(","));const n=(({requestData:e,prefs:t,invParams:r,sortBy:a="",start:i=0})=>{const{siteId:s,locale:n,deviceType:o,pageId:c,windowId:l,widgetName:d,pageAlias:u}=e,h={...r||e.parameterMap||{}};""!==a.toString()&&(h.sortBy=[a.toString()]),"0"!==i.toString()&&(h.start=[i.toString()]),h.geoZip&&h.geoZip.includes("null")&&(h.geoZip=[""]);const g=null!=t;return{siteId:s,locale:n,device:o,pageAlias:u,pageId:c,windowId:g?l:"inventory-data-bus2",widgetName:d,inventoryParameters:h,preferences:g?t:void 0,includePricing:!0}})({requestData:c,prefs:l,invParams:t,start:r,sortBy:a});return x(0,n,i,s,e)};if(h.isBrowser&&!window.DDC?.InvData?.srpReady){const e=n.serverGeoZipSource||"none",t=n.serverResolvedGeoZip||null,a=a=>new F(d,g,l,r,c.parameterMap||{},a,e,t);try{window.DDC.InvData=a(s)}catch(e){p("WS INV DATA CONSTRUCTOR ERROR",{error:e?.message,stack:e?.stack?.slice(0,500),hadSSRData:!!s}),window.DDC.InvData=a(null)}}return(0,t.useEffect)(()=>{const e=e=>
1{e.state?window.DDC.InvData.replaceSelections(e.state.urlParams,e.state.sortBy?e.state.sortBy:"",e.state.start?e.state.start:0,!1):window.DDC.InvData.replaceSelections({},"",0,!1)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),o?a().createElement(a().Fragment,null,a().createElement("p",{className:"box box-border p-6 bg-primary text-center mt-4"},a().createElement("div",{"data-display-sets":"TITLE,IMAGE_ALT,IMAGE_TITLE,LISTING,CALLOUT"}),a().createElement("div",{className:"composer-editor-only"},a().createElement("p",{dangerouslySetInnerHTML:{__html:r.get("INVENTORY_DATA_BUS_CONFIGURATION_VERBIAGE")}})))):null},j=(e,t,r)=>{const a=["ddc-content",t];return e&&a.push(e),r&&a.push("collapse-container"),a},H=(e,t,r)=>{const a=[],{widgetHeading:i,headingIconClasses:s,headingIconSize:n,headingIconStyle:o}=e;return i&&t&&(a.push("ddc-icon"),r||a.push(`ddc-icon-${o}`),n&&a.push(`ddc-icon-size-${n}`),s&&a.push(s)),a},M=(e,t,r)=>{const a=[],{headingSize:i,headingStyles:s,headingClasses:n}=e;return a.push("widget-heading"),"MOBILE"===t&&a.push("ddc-heading"),n&&a.push(n),i&&a.push(i),s&&a.push(`ddc-heading-${s}`),r&&a.push("collapse-heading"),a},U=({outputWrapperDiv:e,store:t,widgetId:r,widgetName:s})=>{const n=t.getState(),o=n.prefs||{},l=o.widgetHeading&&"true"===o.toggleCollapse||!1,u=!!o.headingIconStyle||l;const h=a().createElement(i.Provider,{store:t},a().createElement(c,{HeadingTag:o.headingTag,headingText:o.widgetHeading,widgetId:r,toggleCollapse:l,showIcon:u,headingClasses:M(o,n.requestData.deviceType,l),iconClasses:H(o,u,l)}),a().createElement(d,{id:r,toggleCollapse:l},a().createElement(G,null)));if(e){if(!s)throw new Error("widgetName is required if outputWrapperDiv is true.");return a().createElement("div",{id:`${r}-app-root`,className:j(o.widgetClasses,s,l).join(" "),"data-widget-name":s,"data-widget-id":r},h)}return h},V=RTK;const Z=[],Y={requestData:function(e={},t=null){return!t.error&&t.payload&&"WS_SCRIPTS_SET_REQUEST_DATA"===t.type?t.payload:e},prefs:function(e={},t=null){return t.error||void 0===t.payload||"WS_SCRIPTS_SET_PREFS"!==t.type?e:t.payload},labels:function(e={},t=null){return t.error||void 0===t.payload||"WS_SCRIPTS_ADD_LABELS"!==t.type?e:{...e,...t.payload}},sitemap:function(e={},t=null){return t.error||void 0===t.payload||"WS_SCRIPTS_ADD_SITEMAP"!==t.type?e:{...e,...t.payload}},flags:function(e={},t=null){return t.error||void 0===t.payload||"WS_SCRIPTS_SET_FEATURE_FLAGS"!==t.type?e:t.payload}};function z(e){const[t,a]=(()=>{let e={},t={};const a=[];try{e=r(623).A,a.push("../reducers")}catch(e){}try{t=r(846).A,a.push("../features")}catch(e){}return[{...e,...t},a]})();return(0,V.configureStore)({reducer:{...t,...Y},middleware:e=>e().concat(Z),preloadedState:e})}const Q={};(()=>{const t=(r="ws-inv-data",window.DDC&&window.DDC.WS&&window.DDC.WS.state&&window.DDC.WS.state[r]?window.DDC.WS.state[r]:{});var r;Object.keys(t).forEach(r=>{const a=z(((e,t)=>{let r=e[t];return"string"==typeof r&&(r=JSON.parse(r)),r})(t,r));Q[r]=a,(0,e.hydrate)(React.createElement(U,{outputWrapperDiv:!1,store:a,widgetId:r}),document.getElementById(`${r}-app-root`)),delete t[r]})})()})()})();
2//# sourceMappingURL=bundle.c94fdfa4af0b5e510196f0c7bc830333.js.map

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.