1"use strict";(self.webpackChunktaggbaa=self.webpackChunktaggbaa||[]).push([[414],{4493:function(e,t,r){r.r(t),r.d(t,{load:function(){return v}});var n=r(9312);const a={fire(e){if(!e)return;const t=window._trackAnalytics;if("function"!=typeof t)return;const r=window.pageInfoDataLayer??{},n=Array.isArray(e)?e:[e];for(const e of n)e&&t({...r,...e})}};var i=r(8092),c=r(1714);function o(e){return{vehicle_stock_number:e?.stockNumber??"",price:e?.price??"",model_year:e?.year??"",nameplate:[e?.make,e?.model].filter(Boolean).join(" "),trim:e?.trim??"",epa_city:e?.mpgCity??"",epa_highway:e?.mpgHighway??""}}const l=new Set(["facebook.com","x.com","instagram.com","linkedin.com","youtube.com","pinterest.com","flickr.com","foursquare.com","yelp.com"]),s=e=>{if(!e?.linkUrl)return null;let t;try{t=new URL(e.linkUrl)}catch{return null}if(l.has(t.hostname)){const e=t.hostname.replace(".com",""),r=t.pathname.includes("/share")||t.search.includes("status=");return{event_name:"social media follow",exit_url:t.href,social_platform:"x"===e?"twitter":e,site_events:{social_media_follow:!r,social_media_share:r,property_referral:!0}}}if(t.hostname!==window.location.hostname){const r=e.linkType===c.Id.Directions;return{event_name:r?"get directions":"exit link",exit_link_url:t.href,site_events:{property_referral:!0,...r?{get_directions:!0}:{}}}}return null},u={"request a quote":"request_quote_click","schedule a test drive":"schedule_test_drive_click","payment calculator":"payment_calculator_click","contact us":"contact_us_click","value trade-in":"value_trade_in_click","view inventory":"view_inventory_click","get this offer":"get_this_offer_click","confirm availability":"confirm_availability_click","get pre-approved":"get_pre_approved_click"},y={[i.u.ClickToCall]:()=>({event_name:"click to call",call_type:"sales",site_events:{click_to_call:!0}}),[i.u.TrackLinkClick]:s,[i.u.TrackSocialMediaClick]:s,[i.u.TrackFormShown]:e=>{const t=e?.leadSource?.toLowerCase()??"",r=u[t],n={event_name:`${t} click`,site_events:r?{[r]:!0}:{}};return e?.formVehicle&&(n.vehicles=[o(e.formVehicle)]),n},[i.u.TrackVehicleQuickViewClick]:e=>{const t=e?.vehicle;return{event_name:"SearchInventory: Click Search Result",vehicles:[o(t)],inventory_type:"new"===t?.status?.toLowerCase()?"new":"pre-owned",site_section:"search",site_events:{search_inventory_result_click:!0}}},[i.u.TrackPaymentCalculator]:e=>({event_name:"Payment Calculator: Results",calculation_type:"power"===e?.calculationType?"calculate buying power":"calculate monthly payment",site_events:{payment_calculator:!0}})},_={Pricerange:"price",Mileagerange:"mileage",CityMpgrange:"fuel economy",HwyMpgrange:"fuel economy",ExtColor:"exterior color",Bodystyle:"body style",DriveTrainType:"drivetrain",FuelType:"fuel type"},f={[i.u.FilterInteraction]:e=>{var t;return{event_name:"refine search",inventory_type:"pre-owned",inventory_filter_value:e.filterValue,inventory_filter_action:e.filterAction,inventory_filter_category:(t=e.filterCategory,_[t]??t.toLowerCase()),page_name:"Vehicle Listing",site_events:{refine_search_inventory:!0}}}},m={srp:()=>f},p={async load(e,t,r){const{pageKey:i,replayFrom:c,overrides:o}=r,l=function(e){const t=m[e];return t?t():{}}(i),s=new Set([...Object.keys(y),...Object.keys(l),...Object.keys(o??{})]),u={};for(const e of s){const t=o?.[e]??l[e]??y[e];t&&(u[e]=e=>{const r=e?.payload??e;a.fire(t(r))})}t.debug(`hyundaiTracker: loaded for page="${i}", ${s.size} event(s) wired, replaying ${c?.length??0}`),await(0,n.$)(e,t,u,{replayFrom:c}).initialize()}};async function v(e,t,r){const n=e.getStoreState().oemEvents??[];await p.load(e,t,{pageKey:r,replayFrom:n})}},9312:function(e,t,r){function n(e,t,r,n){return{async initialize(){const a=e.getStoreState();if(!a)return void t.warn("createTrackerListener: store is unavailable");for(const e of n?.replayFrom??[]){const n=r[e.event];if(n)try{n(e)}catch(r){t.error(`Listener replay: ${e.event} threw`,r)}}let i=a.latestOemEvent??{};e.subscribeOem(()=>{const n=e.getStoreState()?.latestOemEvent;if(n===i)return;i=n;const a=n?.event;if(!a)return;const c=r[a];if(c)try{c(n)}catch(e){t.error(`Listener: ${a} threw`,e)}})}}}r.d(t,{$:function(){return n}})}}]);
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.