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YAAAA,CAAW,CAAoB,CAAAC,EAAfC,EAAAA,CAAAA,EAAAA,EAAAA,CAAAA,EAAAA,EAAAA,CAAnCnD,SAAQqC,YAAWY,sBAC7D,CACE,sBACA,GAAAJ,EAAAxK,CAAA,GACE2H,OAAQA,GAAUA,EAAOoD,MAAM,CAAGpD,EAAS,KAC3CiD,YAAaA,GAAe,GAC5BZ,UAAWA,GAAa,KACrBc,GAEN,EAEUE,uBAAyB,QAQhBC,EACFC,KATyE,CAC3FvD,OAAAA,CAAM,CACNwD,QAAAA,EAAUC,CAAAA,CAAQzD,CAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAQoD,MAAM,CAAC,CAIlC,CAAAlB,EACOoB,EAAeI,CAAAA,EAAAA,EAAAA,EAAAA,IACfT,EAAAA,OAAcK,CAAAA,EAAAA,EAAatN,IAAI,GAAjBsN,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAmBL,WAAW,CAC5CZ,EAAAA,OAAYkB,CAAAA,EAAAA,CAAAA,EAAAA,EAAAA,CAAAA,EAAoBD,EAAatN,IAAI,IAArCuN,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAwCT,gBAAgB,CAE1E,MAAOa,CAAAA,EAAAA,EAAAA,CAAAA,EAAS,CACdH,QAASF,EAAaM,SAAS,EAAIJ,EACnCpB,SAAUY,0BAA0B,CAAEhD,OAAAA,EAAQiD,YAAAA,EAAaZ,UAAAA,CAAU,GACrEwB,QAAS5B,uBACT6B,UAAW,CACb,EACF,iFCzEO,IAAMC,EAA2B,CAAC,IAAK,IAAK,IAAK,IAAK,IAAI,CAO1D,SAASC,0BAA0BC,CAAyB,EACjE,OAAOF,EAAyBG,QAAQ,CAACD,EAC3C","sources":["webpack://_N_E/./src/adaptors/cartAnalytics/index.ts","webpack://_N_E/./src/actions/miniCart.ts","webpack://_N_E/./src/constants/certonaPageType.ts","webpack://_N_E/./src/constants/fulfillmentConstants.ts","webpack://_N_E/./src/features/certona/utils/getCertonaOptions.ts","webpack://_N_E/./src/features/product/api/getProductAvailability.ts","webpack://_N_E/./src/features/product/utils/getIsSTHFulfillmentTypeId.ts","webpack://_N_E/<anon>"],"sourcesContent":["/**\n * Copyright 2021 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport type { CartAnalytics } from './types';\nimport { type OrderDetailsData } from '@/types/index';\n\nexport default function cartAnalyticsAdapter(orderDetails: OrderDetailsData): CartAnalytics {\n const orders = orderDetails?.orders || [];\n const lineItems = getLineItemsFromOrderDetails(orders);\n return lineItems.reduce(\n (result: CartAnalytics, lineItem = {}) => {\n // @ts-expect-error refine type\n const { lineItemPriceInfo = {}, productInfo = {} } = lineItem || {};\n const { corePrice, discountPrice, unitPrice } = lineItemPriceInfo || {};\n const { partNumber, skuId, skuDisplayName, brand } = productInfo || {};\n return {\n cartCorePrice: [...result.cartCorePrice, corePrice],\n cartDiscountPriceList: [...result.cartDiscountPriceList, discountPrice],\n cartProductPartIds: [...result.cartProductPartIds, partNumber],\n cartProductSkus: [...result.cartProductSkus, skuId],\n cartProductTitles: [...result.cartProductTitles, skuDisplayName],\n cartProductVendors: [...result.cartProductVendors, brand],\n cartUnitPrice: [...result.cartUnitPrice, unitPrice],\n };\n },\n {\n cartCorePrice: [],\n cartDiscountPriceList: [],\n cartProductPartIds: [],\n cartProductSkus: [],\n cartProductTitles: [],\n cartProductVendors: [],\n cartUnitPrice: [],\n }\n );\n}\n\nfunction getLineItemsFromOrderDetails(orders: Array<any>) {\n return orders.reduce((result, order) => {\n const shipmentInfoList = order.shipmentInfoList || [];\n let lineItemList: any[] = [];\n shipmentInfoList.forEach((shipmentInfo = {}) => {\n // @ts-expect-error refine type\n if (shipmentInfo.lineItemList) {\n // @ts-expect-error refine type\n lineItemList = [...lineItemList, ...shipmentInfo.lineItemList];\n }\n });\n return [...result, ...lineItemList];\n }, []);\n}\n","/**\n * Copyright 2019 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport type { AxiosInstance } from 'axios';\nimport type { Dispatch, GetState, ThunkAction } from '../types';\nimport { getOrderDetails } from '@/actions/details';\nimport cartAnalyticsAdapter from '../adaptors/cartAnalytics';\nimport actionConstant from '../types/action';\nimport azUrl, { getATGData } from '@/config/serviceAPI';\nimport { type HeaderData } from '@/features/header';\nimport { getHeaderDataKey } from '@/features/header/api/getHeader';\nimport { type QueryClient } from '@tanstack/react-query';\n\ntype MiniCartData = { itemCount: number; orderSubTotal: number; corePrice: number };\n\nconst fetchMiniCartData =\n (queryClient: QueryClient): ThunkAction =>\n async (dispatch: Dispatch, getState: GetState, axios: AxiosInstance) => {\n // TODO: API team will be returning orderDetails as part of miniCart endpoint in the future.\n // Whenever this happens, remove the extra API call here\n await getATGData<MiniCartData>(axios, azUrl('miniCart')).then(async (res) => {\n const { data: miniCartData } = res;\n\n await getOrderDetails(axios, undefined).then((res) => {\n const orderDetails = res;\n\n const cartAnalyticsData = cartAnalyticsAdapter(orderDetails);\n queryClient.setQueryData(\n getHeaderDataKey(),\n (oldData: HeaderData | undefined): HeaderData => {\n return {\n ...(oldData as HeaderData),\n miniCartMap: {\n ...miniCartData,\n orderDetails,\n cartAnalyticsData,\n },\n analyticsData: {\n ...((oldData as HeaderData)?.analyticsData || {}),\n ...(cartAnalyticsData || {}),\n },\n miniCartSuccessNote: true,\n };\n }\n );\n\n dispatch({\n type: actionConstant.UPDATE_ORDERITEM_SUCCESS,\n data: orderDetails,\n });\n });\n });\n };\n\nexport default fetchMiniCartData;\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nexport const certonaPageType = {\n homePage: 'home',\n accessoriesCategoryLandingPage: 'accessorieslanding',\n partsCategoryPage: 'partscategory',\n parentCategoryPage: 'parentcategory',\n accessoriesCategoryPage: 'accessoriescategory',\n partsSubCatPage: 'partssubcat',\n accessoriesSubCatPage: 'accessoriessubcat',\n searchResultPage: 'search',\n noSearchResultPage: 'nosearch',\n partsProductPage: 'partsproduct',\n accessoriesProductPage: 'accessoriesproduct',\n accountPage: 'account',\n orderHistoryPage: 'orderhistory',\n shoppingCartPage: 'cart',\n purchaseConfirmationPage: 'purchase',\n removeFromCartEvent: 'removefromcart',\n partsLandingEvent: 'partslanding',\n pencilpdp: 'pencilpdp',\n pdp: 'pdp',\n cartAdd: 'cartadd',\n vehicleDetails: 'vehicledetails',\n dealsDrawer: 'dealsdrawer',\n recommendations: 'recommendationslanding',\n} as const;\n\nexport type CertonaPageType = (typeof certonaPageType)[keyof typeof certonaPageType];\n","/**\n * Copyright 2019 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\n\nexport const fulfillmentLabels = {\n // Common Use mix n match\n label_shipping_OrderBefore: 'label_shipping_OrderBy', // replace with label_shipping_cutoff_ampm_head\n label_shipping_For: 'label_checkout_shipping_For',\n label_shipping_arrives: 'label_shipping_arrives', // replace with label_shipping_cutoff_ampm_tail\n labels_order_receive: 'labels_order_receive', //replace with label_shipping_cutoff_hrsmin_tail\n label_shipping_Delivery: 'label_checkout_shipping_Delivery',\n label_shipping_within: 'labels_order_within', // replace with label_shipping_cutoff_hrsmin_head\n label_shipping_to: 'labels_order_to',\n label_shipping_hrs: 'labels_order_hrs',\n label_shipping_min: 'labels_order_min',\n label_shipping_and: 'labels_order_and',\n label_shipping_Today: 'label_shipping_Today',\n label_shipping_Tomorrow: 'label_shipping_Tomorrow',\n label_shipping_tomorrow_lowercase: 'label_fulfilment_options_tomorrow',\n lblOrderBy10PM: 'label_order_by_10PM',\n label_shipping_Deliver: 'label_shipping_Deliver',\n label_inStock_sisterStores: 'Label_InStock_SisterStores',\n label_sdd: 'label_sdd',\n label_shipping_next_day_delivery: 'label_shipping_next_day_delivery',\n label_shipping_ground_delivery: 'label_shipping_ground_delivery',\n label_shipping_freight_delivery: 'label_shipping_freight_delivery',\n label_shipping_express_delivery: 'label_shipping_express_delivery',\n label_shipping_usps_ground_delivery: 'label_shipping_usps_ground_delivery',\n\n // Labels to start replacing older labels\n label_shipping_EstDelivery: 'label_shipping_EstDelivery', // use for all non-sdd/non-ndd checkout shipping method details\n label_shipping_cutoff_ampm_head: 'label_shipping_cutoff_ampm_head',\n label_shipping_cutoff_ampm_tail: 'label_shipping_cutoff_ampm_tail',\n label_shipping_cutoff_hrsmin_head: 'label_shipping_cutoff_hrsmin_head',\n label_shipping_cutoff_hrsmin_tail: 'label_shipping_cutoff_hrsmin_tail',\n label_shipping_arriveBy: 'label_shipping_arriveby',\n\n // Common cost related\n label_shipping_from: 'label.configurableSku.startingFrom',\n\n // Common Use Whole Phrases\n label_shipping_ToolTipLabel: 'label_shipping_HowDoesItWork',\n label_shipping_WhatIsIt: 'label_cart_lineItem_WhatIsIt',\n\n label_shippingOptions_Delivery: 'label_shippingOptions_Delivery',\n label_shippingOptions_DeliveryDate: 'label_shipping_DeliveryDate',\n label_shippingOptions_EnterAddress: 'label_shipment_options_enter_address',\n label_shipping_itemsShippedFromAutoZone: 'label_shipping_itemsShippedFromAutoZone',\n label_shipping_DeliveryOptions: 'label_shipping_DeliveryOptions',\n\n // 108 - BOPUS labels\n label_shipping_CheckNearbyStores: 'Label_CheckNearbyStores',\n label_shipping_AtNearByStores: 'Label_AtNearByStores',\n label_shipping_AtNearByStore: 'Label_AtNearByStore',\n label_shipping_SelectStore: 'label_DetailsPage_body_SelectStore',\n label_shipping_VisitStoreToPurchase: 'label_Visit_Store_To_Purchase',\n\n // 107 - Next Day lables\n label_shipping_NextDayDelivery: 'label.common.nextday.delivery',\n label_shipping_ndd_infoPopper_1: 'labels_order_cut_off_time_head_ndd',\n label_shipping_ndd_freeNddEligible: 'Label_freeNextDayDeliveryEligible',\n lblNDDNotAvailable: 'label_Cart_NextDayDeliveryNotAvailableForRequestedQuantity', // on Cart when QTy exceeded, update to new pattern below\n label_shipping_exceededAvailableQtyAlert: 'label_shipping_exceededAvailableQtyAlert', // use this as tail of message and append the applicable names in front in front\n // 106 - Same Day Labels\n label_shipping_SameDayDelivery: 'label.common.sameday.delivery',\n label_shipping_SameDayEligible: 'label.common.sameday.eligible',\n label_shipping_SameDayPromoExlusionInfoMessage: 'label_shipping_SameDayPromoExlusionInfoMessage',\n label_shipping_SameDay_TextMessageNotificationOptIn:\n 'label_shipping_SameDay_TextMessageNotificationOptIn',\n label_shipping_SameDay_PhoneMustBeTextEnabled: 'label_shipping_SameDay_PhoneMustBeTextEnabled',\n // Other Labels\n label_MyAccountSTH_shipaddress_EstDelivery: 'label_MyAccountSTH_shipaddress_EstDelivery',\n label_shipping_checkout_TextNotificationInfoBody1:\n 'label_shipping_checkout_TextNotificationInfoBody1',\n label_shipping_checkout_TextNotificationInfoHeader:\n 'label_shipping_checkout_TextNotificationInfoHeader',\n label_order_confirmation_shipping_items: 'label_order_confirmation_shipping_items',\n label_order_confirmation_shipping_item: 'label_order_confirmation_shipping_item',\n label_checkout_DeliveryOptions: 'label_checkout_DeliveryOptions',\n label_order_confirmation_arriving_by: 'label_order_confirmation_arriving_by',\n // New Fulfillment Stickers\n label_new_fulfillment_home_delivery_unavailable:\n 'label_new_fulfillment_home_delivery_unavailable',\n label_new_fulfillment_35_plus: 'label_new_fulfillment_35_plus',\n label_new_fulfillment_pickup_unavailable_within:\n 'label_new_fulfillment_pickup_unavailable_within',\n label_new_fulfillment_for_pickup_availability: 'label_new_fulfillment_for_pickup_availability',\n} as const;\n\nexport const fulfillmentGroupTypeIds = {\n shipToHome: 101,\n storePickup: 108,\n} as const;\n\nexport const FULFILLMENT_METHODS = {\n STOREORDER: 108,\n ONLINEORDER: 101,\n NEXTDAY: 107,\n SAMEDAY: 106,\n VDP: 102,\n VDPDS: 103,\n FREIGHT: 104,\n CUSTOMIZEDSKU: 105,\n};\n\nexport const FULFILLMENT_OPTION_TO_RENDER = {\n NO_STORE_SELECTED: 'noStoreSelected',\n BOPUS_UNAVAILABLE: 'bopusUnavailable',\n BOPUS_UNAVAILABLE_IN_STORE: 'bopusUnavailableInStore',\n BOPUS_AVAILABLE_IN_STORE: 'bopusAvailableInStore',\n NDD_AVAILABLE: 'nddAvailable',\n SDD_DELIVERY: 'sddDelivery',\n STD_DELIVERY: 'stdDelivery',\n STH_UNAVAILABLE: 'sthUnavailable',\n VDP_DS_AVAILABLE_EXPRESS_A: 'vdpDsAvailableExpressA',\n VDP_DS_AVAILABLE_EXPRESS_B: 'vdpDsAvailableExpressB',\n VDP_DS_AVAILABLE_GROUND: 'vdpDsAvailableGround',\n};\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { getDeviceType } from '@/utils/getDeviceType'; // eslint-disable-line no-restricted-imports\nimport { certonaPageType } from '@/constants/certonaPageType';\nimport type { CertonaOptions } from '../interface';\n\nexport const getCertonaOptions = (certonaOptions: CertonaOptions) => {\n const {\n certonaType,\n productData,\n skuIds,\n vehicleID,\n Category1,\n subTotal,\n transactionId,\n userId,\n parttype,\n isRecItemAddedToCart = false,\n } = certonaOptions;\n switch (certonaType) {\n case certonaPageType.pdp:\n return {\n pagetype: certonaPageType.partsProductPage,\n itemid: skuIds,\n vehicleid: vehicleID ?? '',\n Category1: Category1 ?? '',\n parttype,\n };\n\n case certonaPageType.pencilpdp:\n return {\n pagetype: certonaPageType.pencilpdp,\n itemid: skuIds,\n vehicleid: vehicleID ?? '',\n Category1: Category1 ?? '',\n parttype,\n };\n\n case certonaPageType.vehicleDetails:\n return {\n pagetype: certonaPageType.vehicleDetails,\n vehicleid: vehicleID ?? '',\n deviceType: getDeviceType(),\n recommendations: true,\n isRecItemAddedToCart: isRecItemAddedToCart,\n };\n\n case certonaPageType.accessoriesProductPage:\n return {\n pagetype: certonaPageType.accessoriesProductPage,\n itemid: skuIds,\n vehicleid: vehicleID || '',\n Category1: Category1 || '',\n recommendations: true,\n parttype,\n deviceType: getDeviceType(),\n };\n case certonaPageType.homePage:\n return {\n pagetype: certonaPageType.homePage,\n vehicleid: vehicleID,\n };\n case certonaPageType.purchaseConfirmationPage: {\n const productQuantityList = productData?.map((product) => product.itemQuantity) || [];\n const productIdList =\n productData?.map((product) => product.productInfo.skuId).join(';') || '';\n const price = productQuantityList\n .map((quantity, index) => productData?.[index].lineItemPriceInfo.retailPrice.toString())\n .join(';');\n const productQuantityListString = productQuantityList.join(';');\n\n return {\n pagetype: certonaPageType.purchaseConfirmationPage,\n recommendations: true,\n itemid: productIdList,\n qty: productQuantityListString,\n price,\n total: subTotal,\n transactionid: transactionId,\n customerid: userId,\n };\n }\n case certonaPageType.orderHistoryPage:\n return {\n pagetype: certonaPageType.orderHistoryPage,\n };\n case certonaPageType.searchResultPage:\n return {\n pagetype: certonaPageType.searchResultPage,\n recommendations: false,\n };\n case certonaPageType.accountPage:\n return {\n pagetype: certonaPageType.accountPage,\n recommendations: false,\n customerid: userId,\n };\n case certonaPageType.partsCategoryPage:\n case certonaPageType.partsSubCatPage:\n case certonaPageType.accessoriesCategoryPage:\n case certonaPageType.accessoriesSubCatPage:\n case certonaPageType.parentCategoryPage:\n return {\n pagetype: certonaType,\n vehicleid: vehicleID,\n Category1,\n };\n case certonaPageType.partsLandingEvent:\n case certonaPageType.accessoriesCategoryLandingPage: {\n return {\n itemid: skuIds,\n pagetype: certonaType,\n vehicleid: vehicleID,\n Category1,\n recommendations: true,\n parttype,\n };\n }\n case certonaPageType.noSearchResultPage: {\n return {\n pagetype: certonaPageType.noSearchResultPage,\n vehicleid: vehicleID,\n recommendations: true,\n deviceType: getDeviceType(),\n itemid: skuIds,\n };\n }\n case certonaPageType.shoppingCartPage: {\n return {\n pagetype: certonaPageType.shoppingCartPage,\n itemid: skuIds,\n vehicleid: vehicleID,\n customerid: userId,\n isRecItemAddedToCart: isRecItemAddedToCart,\n parttype,\n };\n }\n case certonaPageType.cartAdd: {\n return {\n pagetype: certonaPageType.cartAdd,\n itemid: skuIds,\n vehicleid: vehicleID,\n isRecItemAddedToCart: isRecItemAddedToCart,\n parttype,\n };\n }\n case certonaPageType.dealsDrawer:\n return {\n pagetype: certonaPageType.dealsDrawer,\n itemid: skuIds ?? '',\n vehicleid: vehicleID ?? '',\n isRecItemAddedToCart: isRecItemAddedToCart,\n };\n case certonaPageType.removeFromCartEvent: {\n return {\n pagetype: certonaPageType.removeFromCartEvent,\n itemid: skuIds,\n };\n }\n case certonaPageType.recommendations: {\n return {\n pagetype: certonaPageType.recommendations,\n vehicleid: vehicleID,\n recommendations: true,\n };\n }\n default:\n return {\n pagetype: '',\n };\n }\n};\n","/**\n * Copyright 2023 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { requestBaseURL } from '@/config/serviceAPI';\nimport { useHeaderData } from '@/features/header/api/getHeader';\nimport { getPreferredVehicle } from '@/features/header/utils/getPreferredVehicle';\nimport { getAxios } from '@/lib/axios';\nimport logger from '@/utils/logger';\nimport { type AxiosInstance } from 'axios';\nimport { type QueryFunctionContext, useQuery, type UseQueryResult } from '@tanstack/react-query';\nimport { type SkuAvailabiltyResponse } from '../interface';\nimport type { SkuAvailabilty } from '@/types/availability';\n\nconst URL = `${requestBaseURL}/ecomm/b2c/browse/v2/sku/availability`;\n\ntype Options = {\n skuIds: Array<string | number | null> | null;\n // These are not used in the API call, but the result varies depending on them\n // So we need to use them in the key for the cache\n vehicleId: string | undefined;\n storeNumber: string | undefined;\n};\nconst getProductAvailability = async (\n { queryKey }: QueryFunctionContext<ReturnType<typeof getProductAvailabilityKey>>,\n axiosInstance?: AxiosInstance\n) => {\n const [, { skuIds, vehicleId }] = queryKey;\n\n if (!skuIds) {\n logger.warn({ message: \"A 'skuId' wasn't passed\" });\n return;\n }\n\n const response = await getAxios(axiosInstance).get<SkuAvailabiltyResponse>(\n `${URL}/${skuIds.join(',')}`\n );\n\n return selector(response.data, vehicleId);\n};\n\nconst selector = (data: SkuAvailabiltyResponse, vehicleId: string): SkuAvailabilty[] => {\n return data.map((skuDetailsResponse: SkuAvailabilty) => {\n return {\n catalogVehicleId: vehicleId,\n ...skuDetailsResponse,\n };\n });\n};\n\nexport const getProductAvailabilityKey = ({ skuIds, vehicleId, storeNumber, ...rest }: Options) =>\n [\n 'productAvailability',\n {\n skuIds: skuIds && skuIds.length ? skuIds : null,\n storeNumber: storeNumber || '',\n vehicleId: vehicleId || '0',\n ...rest,\n },\n ] as const;\n\nexport const useProductAvailability = <T extends [string | number] | Array<string | number>>({\n skuIds,\n enabled = Boolean(skuIds?.length),\n}: {\n skuIds: T | null;\n enabled?: boolean;\n}): UseQueryResult<T extends [string | number] ? [SkuAvailabilty] : SkuAvailabilty[]> => {\n const headerResult = useHeaderData();\n const storeNumber = headerResult.data?.storeNumber;\n const vehicleId = getPreferredVehicle(headerResult.data)?.catalogVehicleId;\n\n return useQuery({\n enabled: headerResult.isSuccess && enabled,\n queryKey: getProductAvailabilityKey({ skuIds, storeNumber, vehicleId }),\n queryFn: getProductAvailability,\n cacheTime: 0,\n });\n};\n","/**\n * Copyright 2024 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\n\nexport const STH_FULFILLMENT_TYPE_IDS = [101, 102, 103, 104, 109];\n\n/**\n * Determines if a given fulfillment type ID is a Ship to Home (STH) type.\n * @param fulfillmentTypeId - The fulfillment type ID to check\n * @returns True if the ID is a STH type, false otherwise\n */\nexport function getIsSTHFulfillmentTypeId(fulfillmentTypeId: number) {\n return STH_FULFILLMENT_TYPE_IDS.includes(fulfillmentTypeId);\n}\n"],"names":["miniCart","dispatch","getState","axios","getATGData","azUrl","then","res","data","miniCartData","getOrderDetails","undefined","cartAnalyticsData","cartAnalyticsAdapter","orderDetails","orders","lineItems","reduce","result","order","shipmentInfoList","lineItemList","forEach","shipmentInfo","lineItem","lineItemPriceInfo","productInfo","corePrice","discountPrice","unitPrice","partNumber","skuId","skuDisplayName","brand","cartCorePrice","cartDiscountPriceList","cartProductPartIds","cartProductSkus","cartProductTitles","cartProductVendors","cartUnitPrice","queryClient","setQueryData","getHeaderDataKey","_object_spread_props","_","_object_spread","oldData","miniCartMap","analyticsData","miniCartSuccessNote","type","actionConstant","UPDATE_ORDERITEM_SUCCESS","certonaPageType","homePage","accessoriesCategoryLandingPage","partsCategoryPage","parentCategoryPage","accessoriesCategoryPage","partsSubCatPage","accessoriesSubCatPage","searchResultPage","noSearchResultPage","partsProductPage","accessoriesProductPage","accountPage","orderHistoryPage","shoppingCartPage","purchaseConfirmationPage","removeFromCartEvent","partsLandingEvent","pencilpdp","pdp","cartAdd","vehicleDetails","dealsDrawer","recommendations","fulfillmentLabels","label_shipping_OrderBefore","label_shipping_For","label_shipping_arrives","labels_order_receive","label_shipping_Delivery","label_shipping_within","label_shipping_to","label_shipping_hrs","label_shipping_min","label_shipping_and","label_shipping_Today","label_shipping_Tomorrow","label_shipping_tomorrow_lowercase","lblOrderBy10PM","label_shipping_Deliver","label_inStock_sisterStores","label_sdd","label_shipping_next_day_delivery","label_shipping_ground_delivery","label_shipping_freight_delivery","label_shipping_express_delivery","label_shipping_usps_ground_delivery","label_shipping_EstDelivery","label_shipping_cutoff_ampm_head","label_shipping_cutoff_ampm_tail","label_shipping_cutoff_hrsmin_head","label_shipping_cutoff_hrsmin_tail","label_shipping_arriveBy","label_shipping_from","label_shipping_ToolTipLabel","label_shipping_WhatIsIt","label_shippingOptions_Delivery","label_shippingOptions_DeliveryDate","label_shippingOptions_EnterAddress","label_shipping_itemsShippedFromAutoZone","label_shipping_DeliveryOptions","label_shipping_CheckNearbyStores","label_shipping_AtNearByStores","label_shipping_AtNearByStore","label_shipping_SelectStore","label_shipping_VisitStoreToPurchase","label_shipping_NextDayDelivery","label_shipping_ndd_infoPopper_1","label_shipping_ndd_freeNddEligible","lblNDDNotAvailable","label_shipping_exceededAvailableQtyAlert","label_shipping_SameDayDelivery","label_shipping_SameDayEligible","label_shipping_SameDayPromoExlusionInfoMessage","label_shipping_SameDay_TextMessageNotificationOptIn","label_shipping_SameDay_PhoneMustBeTextEnabled","label_MyAccountSTH_shipaddress_EstDelivery","label_shipping_checkout_TextNotificationInfoBody1","label_shipping_checkout_TextNotificationInfoHeader","label_order_confirmation_shipping_items","label_order_confirmation_shipping_item","label_checkout_DeliveryOptions","label_order_confirmation_arriving_by","label_new_fulfillment_home_delivery_unavailable","label_new_fulfillment_35_plus","label_new_fulfillment_pickup_unavailable_within","label_new_fulfillment_for_pickup_availability","fulfillmentGroupTypeIds","shipToHome","storePickup","FULFILLMENT_METHODS","STOREORDER","ONLINEORDER","NEXTDAY","SAMEDAY","VDP","VDPDS","FREIGHT","CUSTOMIZEDSKU","FULFILLMENT_OPTION_TO_RENDER","NO_STORE_SELECTED","BOPUS_UNAVAILABLE","BOPUS_UNAVAILABLE_IN_STORE","BOPUS_AVAILABLE_IN_STORE","NDD_AVAILABLE","SDD_DELIVERY","STD_DELIVERY","STH_UNAVAILABLE","VDP_DS_AVAILABLE_EXPRESS_A","VDP_DS_AVAILABLE_EXPRESS_B","VDP_DS_AVAILABLE_GROUND","getCertonaOptions","certonaType","productData","skuIds","vehicleID","Category1","subTotal","transactionId","userId","parttype","isRecItemAddedToCart","certonaOptions","pagetype","itemid","vehicleid","deviceType","getDeviceType","productQuantityList","map","product","itemQuantity","productIdList","join","price","quantity","index","retailPrice","toString","productQuantityListString","qty","total","transactionid","customerid","URL","concat","requestBaseURL","getProductAvailability","param","axiosInstance","queryKey","vehicleId","logger","warn","message","response","getAxios","get","selector","_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_3__","catalogVehicleId","skuDetailsResponse","getProductAvailabilityKey","storeNumber","_param","rest","length","useProductAvailability","headerResult","getPreferredVehicle","enabled","Boolean","useHeaderData","useQuery","isSuccess","queryFn","cacheTime","STH_FULFILLMENT_TYPE_IDS","getIsSTHFulfillmentTypeId","fulfillmentTypeId","includes"],"sourceRoot":""}