{"version":3,"sources":["webpack:///./app/javascript/checkout_application_v3/components/Error/Error.tsx","webpack:///./app/javascript/checkout_application_v3/util/mixpanel.ts","webpack:///./app/javascript/checkout_application_v3/components/common/ScrollToTop/ScrollToTop.ts","webpack:///./app/javascript/checkout_application_v3/util/importWithRetry.ts","webpack:///./app/javascript/checkout_application_v3/router/routes/routes.ts","webpack:///./app/javascript/checkout_application_v3/router/Router.tsx","webpack:///./app/javascript/checkout_application_v3/App.tsx","webpack:///./app/javascript/checkout_application_v3/components/common/AppProviders/AppProviders.tsx","webpack:///./app/javascript/checkout_application_v3/index.js","webpack:///./app/javascript/packs/checkout_application_v3.js","webpack:///./app/javascript/checkout_application_v3/common/i18n/index.ts","webpack:///./app/javascript/checkout_application_v3/util/nodeEnv.ts","webpack:///./app/javascript/checkout_application_v3/util/transformArrayToCommaSeparatedString.ts","webpack:///./app/javascript/checkout_application_v3/util/api.ts","webpack:///./app/javascript/checkout_application_v3/util/getXCSRFToken.ts","webpack:///./app/javascript/checkout_application_v3/api/index.ts","webpack:///./app/javascript/checkout_application_v3/util/isNotNil.ts","webpack:///./app/javascript/checkout_application_v3/hooks/useMerchantSettings/useMerchantSettings.util.ts","webpack:///./app/javascript/checkout_application_v3/hooks/useMerchantSettings/useMerchantSettings.ts","webpack:///./app/javascript/checkout_application_v3/util/emptyCallback.ts","webpack:///./app/javascript/checkout_application_v3/hooks/useCreateShipment/useCreateShipment.selectors.ts","webpack:///./app/javascript/checkout_application_v3/common/types/merchant.ts","webpack:///./app/javascript/checkout_application_v3/hooks/useSessionStorage/useSessionStorage.ts","webpack:///./app/javascript/checkout_application_v3/util/getCountryLabel.ts","webpack:///./app/javascript/checkout_application_v3/hooks/useLanguage/useLanguage.ts","webpack:///./app/javascript/checkout_application_v3/context/LanguageContext/LanguageContext.tsx","webpack:///./app/javascript/checkout_application_v3/components/common/ReactQueryClientProvider/ReactQueryClientProvider.tsx","webpack:///./app/javascript/checkout_application_v3/util/format.ts","webpack:///./app/javascript/checkout_application_v3/common/types/return.ts","webpack:///./app/javascript/checkout_application_v3/common/types/common.ts","webpack:///./app/javascript/polyfills.js","webpack:///./app/javascript/importRetry.js","webpack:///./app/javascript/checkout_application_v3/router/routes/path.ts","webpack:///./app/javascript/checkout_application_v3/context/FormatContext/FormatContext.tsx","webpack:///./app/javascript/checkout_application_v3/context/MerchantSettingsContext/MerchantSettingsContext.tsx","webpack:///./app/javascript/checkout_application_v3/hooks/useReturnState/useReturnState.tsx","webpack:///./app/javascript/checkout_application_v3/context/ReturnContext/ReturnContext.tsx","webpack:///./app/javascript/checkout_application_v3/hooks/useReturnState/useReturnState.util.ts","webpack:///./app/javascript/checkout_application_v3/components/Login/hooks/useLoginState/useLoginState.ts","webpack:///./app/javascript/checkout_application_v3/context/LoginStateContext/LoginStateContext.tsx","webpack:///./app/javascript/checkout_application_v3/util/isNotEmpty.ts","webpack:///./app/javascript/checkout_application_v3/context/ThemeContext/ThemeContext.tsx","webpack:///./app/javascript/checkout_application_v3/util/transformCommaSeparatedStringToArray.ts","webpack:///./app/javascript/checkout_application_v3/hooks/useReturnMethods/useReturnMethods.ts","webpack:///./app/javascript/checkout_application_v3/context/ReturnMethodsContext/ReturnMethodsContext.tsx","webpack:///./app/javascript/checkout_application_v3/hooks/useReturnMethods/useReturnMethods.util.ts","webpack:///./app/javascript/checkout_application_v3/components/ReturnOverview/index.util.ts","webpack:///./app/javascript/checkout_application_v3/context/CollectionsNavigationVisibilityContext/CollectionsNavigationVisibilityContext.tsx","webpack:///./app/javascript/checkout_application_v3/context/CartVisibilityContext/CartVisibilityContext.tsx","webpack:///./app/javascript/checkout_application_v3/hooks/useUpdateCustomerData/useUpdateCustomerData.tsx","webpack:///./app/javascript/checkout_application_v3/context/CustomerDataContext/CustomerDataContext.tsx","webpack:///./app/javascript/checkout_application_v3/context/ConfirmReturnContext/ConfirmReturnContext.tsx","webpack:///./app/javascript/checkout_application_v3/hooks/useConfirmReturn/useConfirmReturn.tsx","webpack:///./app/javascript/checkout_application_v3/hooks/useConfirmReturn/useConfirmReturn.util.ts","webpack:///./app/javascript/checkout_application_v3/context/ShipmentContext/ShipmentContext.tsx","webpack:///./app/javascript/checkout_application_v3/hooks/useCreateShipment/useCreateShipment.tsx","webpack:///./app/javascript/checkout_application_v3/hooks/useCreateShipment/useCreateShipment.util.ts","webpack:///./app/javascript/checkout_application_v3/ui-kit/components/FallbackSpinner/FallbackSpinner.tsx","webpack:///./app/javascript/checkout_application_v3/components/common/PayPalProvider/PayPalProvider.tsx","webpack:///./app/javascript/checkout_application_v3/components/common/PayPalProvider/PayPalProvider.util.ts"],"names":["Error","React","createElement","mixpanel","init","debug","mixpanelTrackUser","_ref","merchantName","customerEmail","orderId","identify","mixpanelIdentifyUser","people","set","$email","append","mixpanelStoreUserProfile","trackRefundTypeSelectedEvent","refundType","_textByRefundTypeMap","textByRefundTypeMap","_defineProperty","RefundType","OriginalPaymentMethod","StoreCredit","ShopExchange","track","trackRefundTooltipTriggeredEvent","tooltipTitle","interaction","Title","Interaction","trackShopNowRefundSelectedEvent","trackProductAddedToCartEvent","product","selectedVariant","globalId","id","trackProductRemovedFromCartEvent","trackCollectionSeeAllClickedEvent","trackBrowseAllClickedEvent","trackCollectionClickedEvent","trackProductClickedEvent","productId","productGlobalId","source","searchQuery","searchQueryPayload","payload","_objectSpread","trackCartCheckoutClickedEvent","cartItems","map","_ref2","selectedQuantity","trackPaginationNextButtonClickedEvent","trackPaginationPreviousButtonClickedEvent","trackConfirmReturnButtonClickedEvent","returnItems","cartItemsEventContext","length","_ref3","eventContext","_ref4","variantId","returnQuantity","trackProductSearch","ScrollToTop","pathname","useLocation","useEffect","window","scrollTo","_regeneratorRuntime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","key","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","call","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","done","methodName","undefined","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","asyncGeneratorStep","gen","_next","_throw","importWithRetry","_x","_importWithRetry","apply","arguments","_callee","importFn","retries","interval","_args","_context","t0","wait","clearCache","location","href","args","sessionStorage","clear","queryCache","ms","setTimeout","authRoutes","path","Path","Login","Component","lazy","exact","authenticatedRoutes","SelectItems","ReturnType","ExchangeVariant","CustomReturn","SelectQuantity","ReturnReason","ReturnMethod","MoreDetails","ReturnOverview","ReturnConfirmation","Payment","CollectionsList","CollectionDetails","ProductDetailsShop","errorRoute","appRoutes","concat","Router","MemoryRouter","Switch","Route","render","props","Suspense","fallback","FallbackSpinner","component","App","AppProviders","children","_useMerchantSettings$","useMerchantSettings","data","viewSettings","currency","merchant","locales","theme","primaryColor","secondaryColor","logoUrl","ThemeContextProvider","MerchantSettingsContextProvider","LanguageContextProvider","merchantLanguages","FormatContextProvider","merchantCurrency","LoginStateContextProvider","ReturnContextProvider","ReturnMethodsContextProvider","CustomerDataContextProvider","ShipmentContextProvider","ConfirmReturnContextProvider","PayPalProvider","CartVisibilityContextProvider","CollectionsNavigationVisibilityContextProvider","Root","ReactQueryClientProvider","ToastContainer","newestOnTop","className","document","addEventListener","ReactDOM","getElementById","includes","process","importRetry","i18next","use","Backend","BrowserLanguageDetector","initReactI18next","backend","loadPath","detection","order","ns","defaultNS","fallbackLng","load","interpolation","escapeValue","react","useSuspense","supportedLngs","translationsMap","en","translationEN","de","translationDE","fr","translationFR","loadStaticTranslations","supportedLanguages","language","loadStaticTranslationsByLocaleCode","locale","translation","addResourceBundle","transformArrayToCommaSeparatedString","join","generateQueryString","items","parentKey","item","_ref8","childKey1","childKey2","childKey3","_ref7","generateQueryParamKeyName","encodeURIComponent","generateQueryParams","getCreateShipmentRequestPayload","_ref9","_customerAddress$stre","_customerAddress$stre2","_getInitiatedReturnIt","_ref9$initiatedReturn","initiatedReturnItems","_ref9$order","orderItems","ruleToken","returnAddress","_ref9$customerAddress","customerAddress","customerName","returnMethod","shipment","from","first_name","firstName","last_name","lastName","street","trim","street_no","streetNumber","city","zip_code","zip","province_code","provinceCode","country_iso2","countryCode","phone_number","phone","to","company","name2","toString","customs_document","displayed_currency","getInitiatedReturnItemOriginalOrderItem","displayedCurrency","initiatedReturnItem","returnType","TradeIn","tradeInItem","quantity","unit_weight_in_grams","unit_price","inventory_item_id","orderItem","Math","round","weightInKg","displayedPrice","inventoryItemId","reference_number","getShipmentReferenceNumber","shop_order_id","notification_email","package_weight","getShipmentPackageWeight","merchant_return_method_id","pickup_date","rule_token","shopBackend","ShopBackend","Shopify","noteAttributesValue","getNoteAttributeValue","noteAttributes","returnAddressNoteAttributeName","removeHashFromOrderName","orderName","orderNumber","_sum","sum","noteAttributeName","_noteAttribute$","_noteAttribute$$value","filter","_ref10","getCustomerPayload","_ref11","_shippingAddress$stre","_shippingAddress$stre2","_shippingAddress$stre3","customerFirstName","customerLastName","tags","shippingFirstName","shippingLastName","shippingAddress","email","address","street_number","street_2","street2","country","getCountryLabel","province","getConfirmReturnRequestPayload","_ref12","_order$shippingMethod","shipments","_ref12$customerAddres","payment","storeCreditOption","_ref12$cartItems","_order$senderCustomer","senderCustomer","tradeInItemsPayload","orderInitiatedReturnItems","paymentPayload","getConfirmReturnPaymentPayload","refund","getItemsPayload","trade_in_items","compact","exchange_items","_ref13","price","product_id","variant_id","displayed_price","customer","return_address","order_name","vendor_order_number","invoice_number","invoiceNumber","order_id","order_shipping_cost","shippingCost","order_date","orderDate","order_shipping_method","shippingMethod","JSON","stringify","note_attributes","no_of_items","noOfItems","payment_methods","paymentMethods","shipping_company","returnMethodCarrier","shipping_method","returnMethodName","tracking_number","carrierTrackingNo","refund_type","getConfirmReturnRefundType","getInitiatedReturnItemReasonImagesUrls","initiatedReturn","_initiatedReturn$retu","_initiatedReturn$retu2","images","returnReasonMoreDetails","_ref14","uploadId","_objectWithoutProperties","_excluded","_initiatedReturn$exch","_initiatedReturn$retu3","_initiatedReturn$retu4","_initiatedReturn$retu5","_initiatedReturn$retu6","_getInitiatedReturnIt2","additionalComments","sku","ean","discount","categories","imageUrl","originalQuantity","exchangeVariant","title","additional_comments","category","original_quantity","amount","image_url","weight_in_kg","return_reason_id","returnReasonId","refund_reason_text","text","return_reason_picture","return_type","variant_title","exchange_variant_id","isNil","authorizationId","authorization_id","getXCSRFToken","querySelector","content","_asyncToGenerator","fetchMerchantSettings","fetch","response","json","fetchCookiesSettings","fetchOrder","params","currentPage","queryParamItems","queryString","fetchOrderRegisteredItems","_ref5","fetchReturnMethods","_ref6","customerCountry","orderAmount","numberOfItemsToReturn","returnReasonIds","customerTags","orderTags","refundTotalValue","_ref6$returnTags","returnTags","_ref6$returnItemsCust","returnItemsCustomData","noOfRegisteredReturns","uniqueReturnTags","requestPayload","uniq","rule","order_country","order_value","number_of_items","return_reason_ids","customer_tags","order_tags","payment_method","refund_total_value","customer_email","order_registered_returns","return_item_product_tags","tag","product_custom_data","headers","body","createShipment","_data$error","status","confirmReturn","_callee2","checksum","_context2","sha256","hmac","_x2","fetchReturnMethodsNotes","_callee3","_context3","customerReturnId","merchantReturnMethodId","_x3","fetchProductDetails","exchangedOrderItemId","useShopProductEndpoint","_ref17","isNotNil","getFetchProductDetailsQueryString","fetchDHLDownStatus","fetchTradeInItems","createPayPalOrder","_ref15","_order$shippingMethod2","_ref15$customerAddres","clientPaymentAmount","originalOrderShippingCost","_ref15$isShopNowPayme","isShopNowPaymentFlow","_ref15$cartItems","_order$senderCustomer2","customerPayload","shop_now_items","_ref16","productTitle","validation","client_payment_amount","payment_flow","authorizePayPalOrder","purchaseUnit","_authorizePaymentOrde","authorizePaymentOrderResponse","purchase_units","authorization","_purchaseUnit$payment","_purchaseUnit$payment2","payments","authorizations","fetchCollections","fetchCollection","collectionId","nextPage","prevPage","queryParam","fetchSearchProducts","paginationQueryParam","negate","shopBackendMap","shopify_integration","shopware_integration","Shopware","refundShippingCostPolicyMap","RefundShippingCostPolicy","Refund","no_refund","NoRefund","if_all_items_returned","IfAllItemsReturned","_useQuery","useQuery","restProps","useMemo","responseData","settings","_settings$checkout_vi","_settings$merchant","_settings$return_poli","_settings$return_reas","_settings$merchant2","_settings$return_poli2","checkout_view_setting","primary_color","secondary_color","shop_url","custom_script","_ref2$currency","climate_compensation","return_address1_note_attribute_name","shop_backend","show_exchange","show_store_credit","show_instant_store_credit","show_trade_in_items","merchant_languages","shop_now_exchange_enabled","active_paypal_checkout","return_policy","policy_url","expected_refund","refund_shipping_cost","custom_return_name","exchange_without_track_quantity","store_credit_added_percentage","custom_missing_optional_translations","returnReasons","return_reasons","shopUrl","customScript","lang_code","climateCompensation","showExchange","showCustomReturn","show_custom_return","showStoreCredit","showInstantStoreCredit","showTradeInItems","shopNowEnabled","shopNowPaymentEnabled","langCode","langName","lang_name","returnPolicy","policyUrl","showExpectedRefund","refundShippingCost","customReturnName","exchangeWithoutTrackQuantity","storeCreditAddedPercentage","inAppShoppingAddedPercentage","customMissingOptionalTranslations","external_text_by_locale","additional_text_required","additional_text","image_upload","image_upload_required","text_title_by_locale","show_for_refund","show_for_exchange_reasons","show_for_custom_reasons","_ref6$applicable_cate","applicable_categories","externalText","isAdditionalTextSupported","isAdditionalTextRequired","isImageSupported","isImageRequired","textTitle","visible","exchange","custom","applicableCategories","transformCommaSeparatedStringToArray","transformMerchantSettingsResponse","emptyCallback","_orderItems$find","find","orderItemId","useSessionStorage","storageKey","fallbackState","_JSON$parse","_useState2","_slicedToArray","useState","parse","getItem","setValue","setItem","countryList","getLabel","LanguageContext","createContext","changeLanguage","_useLanguage","LocaleCode","setLanguage","changeI18nextLanguage","updatedLanguage","_i18next$languages","isEmpty","i18nextLanguage","languages","changeDropdownLanguage","setFormattingLocale","useCallback","alignI18nextAndDropdownLanguage","_i18next$languages2","i18nextOnInitialized","on","off","useLanguage","Provider","useLanguageContext","useContext","QueryCache","queryClient","QueryClient","defaultOptions","queries","refetchOnWindowFocus","retry","cacheTime","staleTime","sessionStoragePersistor","createWebStoragePersistor","storage","persistQueryClient","persistor","QueryClientProvider","client","NumberFormat","numberFormatterMap","Currency","Intl","style","minimumFractionDigits","maximumFractionDigits","format","formatNumberCurried","curry","getNumberFormatter","formatCurrency","newLocale","formatDate","formatting","month","day","year","DateTimeFormat","Date","formatTime","timestamp","toLocaleString","hour","minute","StoreCreditType","ShopExchangeRefundType","_toConsumableArray","split","replace","entries","Function","WeakMap","Array","globalThis","_importRetry","pathResolvers","ColletionsList","FormatContext","formatInMerchantCurrency","identity","useFormatContext","MerchantSettingsContext","useMerchantSettingsContext","ReturnContext","selectedItemId","setSelectedItemId","selectedReturnQuantity","setSelectedReturnQuantity","selectedReturnMethodId","setSelectedReturnMethodId","addInitiatedReturnItem","removeInitiatedReturnItem","selectedReturnReasonId","setSelectedReturnReasonId","returnReasonImages","setReturnReasonImages","returnReasonText","setReturnReasonText","resetReturnState","resetCurrentItemReturnState","selectedReturnType","setSelectedReturnType","selectedExchangeVariant","setSelectedExchangeVariant","selectedRefundType","setSelectedRefundType","selectedShopExchangeRefundType","setSelectedShopExchangeRefundType","selectedTradeInItemId","setSelectedTradeInItemId","selectedStoreCreditOption","setSelectedStoreCreditOption","selectedCollectionId","setSelectedCollectionId","selectedShoppingProductId","setSelectedShoppingProductId","addItemToCart","removeItemFromCart","changeItemQuantityInCart","cartItemsTotalCost","resetInAppShoppingState","resetSelectedReturnMethod","_useState4","_useState6","_useState8","_useState10","_useState12","_useState14","_useSessionStorage2","setInitiatedReturnItems","_useState16","_useState18","_useState20","_useState22","_useState24","_useState26","_useState28","_useState30","cart","setCart","selectedProductVariant","image","isDefaultVariant","prevCart","prevCartItem","updatedCartItem","omit","increment","reduce","total","calculateCartItemsCost","existingItems","idToRemove","_ref$tradeInItem","tradeInItemId","useReturnContext","LoginStateContext","setOrderId","setCustomerEmail","resetLoginState","isDisableCTA","_useSessionStorage4","useLoginStateContext","isNotEmpty","ThemeContext","useThemeContext","str","useReturnMethods","_useMutation","useMutation","mutate","transformReturnMethodsResponse","ReturnMethodsContext","isError","isLoading","useReturnMethodsContext","_responseData$setting","_responseData$setting2","_responseData$setting3","_responseData$setting4","_responseData$setting5","returnMethods","merchant_return_methods","cost","return_method_carrier","return_method_name","name_map","description_map","cost_message_map","parseFloat","nameMap","descriptionMap","costMessageMap","getFetchReturnMethodsVariables","shippingDate","returnItem","getReturnTypes","getRefundTotalValue","getReturnTags","getReturnItemsCustomData","amounts","getRefundInitiatedReturnItems","_orderItem$price","_ref4$returnQuantity","_orderItems$find2","flatten","_orderItems$find3","productCustomData","valueOf","getIsIncludeOriginalShippingCostInRefund","refundShippingCostPolicy","orderItemsQuantity","registeredItemsQuantity","initiatedItems","some","Exchange","acc","curr","CollectionsNavigationVisibilityContext","setIsVisible","isVisible","useCollectionsNavigationVisibilityContext","CartVisibilityContext","setIsCartVisible","isCartVisible","useCartVisibilityContext","CustomerDataContext","setCustomerName","setCustomerAddress","useCustomerDataContext","ConfirmReturnContext","_responseData$refund","customer_return_id","_responseData$refund$","created_at","dhl_pickup_confirmation_number","label_url","labelUrl","createdAt","updatedAt","updated_at","DHLPickupConfirmationNumber","shippingCompany","trackingNumber","transformConfirmReturnResponse","useConfirmReturnContext","ShipmentContext","_responseData$json$ma","_responseData$json","carrier_tracking_no","QRCodeUrl","qrcode_url","useShipmentContext","getPayPalScriptProviderOptions","clientId","intent","components","PAYPAL_CLIENT_ID","getPayPalClientIdFromRootDocument","Fragment","options","PayPalScriptProvider","root","dataset"],"mappings":";4FAAA,2BAMeA,UAJG,WAChB,OAAOC,IAAAC,cAAA,WAAK,QACd,C,2hJCmBAC,IAASC,KATmB,mCASa,CAAEC,OAAO,IAElD,IAaaC,EAAoB,SAAHC,GAQvB,IAPLC,EAAYD,EAAZC,aACAC,EAAaF,EAAbE,cACAC,EAAOH,EAAPG,SAN2B,SAACD,GAC5BN,IAASQ,SAASF,EAAe,CAWjCG,CAAqBH,GAtBU,SAC/BD,EACAC,EACAC,GAEAP,IAASU,OAAOC,IAAI,CAAE,gBAAiBN,IACvCL,IAASU,OAAOC,IAAI,CAAEC,OAAQN,IAC9BN,IAASU,OAAOG,OAAO,CAAE,YAAaN,GACxC,CAeEO,CAAyBT,EAAcC,EAAeC,EACxD,EAEaQ,EAA+B,SAACC,GAA4B,IAADC,EAChEC,GAAmBC,EAAAF,EAAA,GACtBG,IAAWC,sBAAwB,2BAAyBF,EAAAF,EAC5DG,IAAWE,YAAc,gBAAcH,EAAAF,EACvCG,IAAWG,aAAe,YAAUN,GAEvCjB,IAASwB,MAAM,kBAAmB,CAChC,cAAeN,EAAoBF,IAEvC,EAEaS,EAAmC,SAC9CC,EACAC,GAEA3B,IAASwB,MAAM,2BAA4B,CACzCI,MAAOF,EACPG,YAAaF,GAEjB,EAEaG,EAAkC,WAC7C9B,IAASwB,MAAM,gCACjB,EAEaO,EAA+B,SAC1CC,EACAC,GAEAjC,IAASwB,MAAM,wBAAyB,CACtC,aAAcQ,EAAQE,SACtB,aAAcD,EAAgBE,IAElC,EAEaC,EAAmC,WAC9CpC,IAASwB,MAAM,4BACjB,EAEaa,EAAoC,WAC/CrC,IAASwB,MAAM,+BACjB,EAEac,EAA6B,WACx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I,QACJE,GAAI,QACJE,GAAI,SAGmBI,GAMvBorB,OAAQ,YACRC,WAAY,UAEhB,EAEa/tB,EAAqB,SAAHnS,GAAsB,IAAhB2Q,EAAQ3Q,EAAR2Q,SAC3BkE,EAAa0c,cAAb1c,SAEFsrB,EAAmBC,cAITpvB,EAEZH,cAHFC,KACEG,SAAYD,SAMhB,GAAIgR,gBAAMme,GACR,OAAOzgC,IAAAC,cAAAD,IAAA2gC,SAAA,KAAG1vB,GAGZ,IAAM2vB,EAAUP,EACdlrB,EACAsrB,EACAnvB,GAGF,OACEtR,IAAAC,cAAC4gC,IAAoB,CAACD,QAASA,GAAU3vB,EAE7C,C,mCC7DA,kCAAO,IAAMyvB,EAAoC,WAC/C,IAAMI,EAAO7tB,SAASG,eAAe,QACrC,OAAW,OAAJ0tB,QAAI,IAAJA,OAAI,EAAJA,EAAMC,QAAwB,cACvC,C","file":"js/checkout_application_v3-5199c400d99f08d375e8.chunk.js","sourcesContent":["import React, { FC } from \"react\";\n\nconst Error: FC = () => {\n  return <div>Error</div>;\n};\n\nexport default Error;\n","import mixpanel from \"mixpanel-browser\";\n\nimport { RefundType } from \"~/common/types/return\";\nimport { Product, ProductVariant } from \"~/common/types/product\";\nimport {\n  CartItem,\n  InitiatedReturnItem,\n} from \"~/hooks/useReturnState/useReturnState.types\";\nimport { OrderItem } from \"~/common/types/order\";\n\nimport { isProductionEnvironment } from \"./isProductionEnvironment\";\n\n// Note: These project tokens are not a secret, rather a project identifier\n// Therefore it can be safely stored in the client\nconst MIXPANEL_PROD_TOKEN = \"15e1ede12f79c0aa7b83e95e7578e34a\";\nconst MIXPANEL_TEST_TOKEN = \"47ff8cd048e0ca1dd843b0b521c56b02\";\n\nconst isProduction = isProductionEnvironment();\n\nconst getMixpanelProjectToken = () => {\n  return isProduction ? MIXPANEL_PROD_TOKEN : MIXPANEL_TEST_TOKEN;\n};\n\nmixpanel.init(getMixpanelProjectToken(), { debug: !isProduction });\n\nconst mixpanelStoreUserProfile = (\n  merchantName: string,\n  customerEmail: string,\n  orderId: string\n) => {\n  mixpanel.people.set({ \"Merchant Name\": merchantName });\n  mixpanel.people.set({ $email: customerEmail });\n  mixpanel.people.append({ \"Order IDs\": orderId });\n};\n\nconst mixpanelIdentifyUser = (customerEmail: string) =>\n  mixpanel.identify(customerEmail);\n\nexport const mixpanelTrackUser = ({\n  merchantName,\n  customerEmail,\n  orderId,\n}: {\n  merchantName: string;\n  customerEmail: string;\n  orderId: string;\n}) => {\n  mixpanelIdentifyUser(customerEmail);\n  mixpanelStoreUserProfile(merchantName, customerEmail, orderId);\n};\n\nexport const trackRefundTypeSelectedEvent = (refundType: RefundType) => {\n  const textByRefundTypeMap = {\n    [RefundType.OriginalPaymentMethod]: \"Original Payment Method\",\n    [RefundType.StoreCredit]: \"Store Credit\",\n    [RefundType.ShopExchange]: \"Shop Now\",\n  };\n  mixpanel.track(\"Refund selected\", {\n    \"Refund Type\": textByRefundTypeMap[refundType],\n  });\n};\n\nexport const trackRefundTooltipTriggeredEvent = (\n  tooltipTitle: string,\n  interaction: \"click\" | \"hover\"\n) => {\n  mixpanel.track(\"Refund tooltip triggered\", {\n    Title: tooltipTitle,\n    Interaction: interaction,\n  });\n};\n\nexport const trackShopNowRefundSelectedEvent = () => {\n  mixpanel.track(\"Shop Now refund type selected\");\n};\n\nexport const trackProductAddedToCartEvent = (\n  product: DeepPartial<Product>,\n  selectedVariant: DeepPartial<ProductVariant>\n) => {\n  mixpanel.track(\"Product added to cart\", {\n    \"Product ID\": product.globalId,\n    \"Variant ID\": selectedVariant.id,\n  });\n};\n\nexport const trackProductRemovedFromCartEvent = () => {\n  mixpanel.track(\"Product removed from cart\");\n};\n\nexport const trackCollectionSeeAllClickedEvent = () => {\n  mixpanel.track(`Collection \"See All\" clicked`);\n};\n\nexport const trackBrowseAllClickedEvent = () => {\n  mixpanel.track(\"Browse All clicked\");\n};\n\nexport const trackCollectionClickedEvent = () => {\n  mixpanel.track(\"Collection page opened\");\n};\n\nexport const trackProductClickedEvent = (\n  productId: string,\n  productGlobalId: string,\n  source: \"Search\" | \"Collection\" | \"Home Page\",\n  searchQuery?: string\n) => {\n  const searchQueryPayload =\n    searchQuery !== \"\"\n      ? {\n          \"Search Query\": searchQuery,\n        }\n      : {};\n  const payload = {\n    source,\n    \"Product ID\": productGlobalId,\n    \"Product Slug\": productId,\n  };\n  mixpanel.track(\"Product page opened\", {\n    ...payload,\n    ...searchQueryPayload,\n  });\n};\n\nexport const trackCartCheckoutClickedEvent = (cartItems: CartItem[]) => {\n  mixpanel.track(\"Checkout button clicked\", {\n    \"Cart Items\": cartItems.map(({ productId, id, selectedQuantity }) => ({\n      \"Product ID\": productId,\n      \"Variant ID\": id,\n      \"Selected Quantity\": selectedQuantity,\n    })),\n  });\n};\n\nexport const trackPaginationNextButtonClickedEvent = () => {\n  mixpanel.track(\"Pagination next button clicked\");\n};\n\nexport const trackPaginationPreviousButtonClickedEvent = () => {\n  mixpanel.track(\"Pagination previous button clicked\");\n};\n\nexport const trackConfirmReturnButtonClickedEvent = (\n  returnItems: (InitiatedReturnItem & DeepPartial<OrderItem>)[],\n  cartItems?: CartItem[]\n) => {\n  const hasCartItems = cartItems && cartItems.length;\n  const cartItemsEventContext = hasCartItems\n    ? {\n        \"Cart Items\": cartItems.map(({ productId, id, selectedQuantity }) => ({\n          \"Product ID\": productId,\n          \"Variant ID\": id,\n          \"Selected Quantity\": selectedQuantity,\n        })),\n      }\n    : {};\n  const eventContext = {\n    \"Returned Items\": returnItems.map(\n      ({ productId, variantId, returnQuantity }) => ({\n        \"Product ID\": productId,\n        \"Variant ID\": variantId,\n        \"Selected Quantity\": returnQuantity,\n      })\n    ),\n    ...cartItemsEventContext,\n  };\n  mixpanel.track(\"Confirm return button clicked\", eventContext);\n};\n\nexport const trackProductSearch = (searchQuery: string) => {\n  if (searchQuery !== \"\") {\n    mixpanel.track(\"Product search\", {\n      \"Search Query\": searchQuery,\n    });\n  }\n};\n","import { useEffect } from \"react\";\nimport { useLocation } from \"react-router-dom\";\n\nexport const ScrollToTop = () => {\n  const { pathname } = useLocation();\n  useEffect(() => {\n    window.scrollTo(0, 0);\n  }, [pathname]);\n  return null;\n};\n","import { queryCache } from \"~/components/common/ReactQueryClientProvider/ReactQueryClientProvider\";\n\nexport async function importWithRetry(\n  importFn: () => Promise<any>,\n  retries = 5,\n  interval = 1000\n) {\n  try {\n    return await importFn();\n  } catch (error) {\n    if (retries) {\n      await wait(interval);\n      return importWithRetry(importFn, retries - 1, interval);\n    } else {\n      clearCache();\n      window.location.href = \"/\";\n    }\n  }\n}\n\nfunction clearCache() {\n  sessionStorage.clear();\n  queryCache.clear();\n}\n\nfunction wait(ms: number) {\n  return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","import { lazy } from \"react\";\n\nimport { RouteType } from \"~/common/types/common\";\nimport { importWithRetry } from \"~/util/importWithRetry\";\n\n/* To disable code splitting / lazy loading of components\n   Just replace the dynamic lazy imports with the static imports (commented out)\n*/\n// import Login from \"~/components/Login/index\";\n// import SelectItems from \"~/components/SelectItems/index\";\n// import ReturnType from \"~/components/ReturnType/index\";\n// import ExchangeVariant from \"~/components/ExchangeVariant/index\";\n// import CustomReturn from \"~/components/CustomReturn/index\";\n// import SelectQuantity from \"~/components/SelectQuantity/index\";\n// import ReturnReasons from \"~/components/ReturnReasons/index\";\n// import ReturnMethods from \"~/components/ReturnMethods/index\";\n// import MoreDetails from \"~/components/MoreDetails/index\";\n// import ReturnOverview from \"~/components/ReturnOverview/index\";\n// import RefundInfo from \"~/components/RefundInfo/index\";\n// import RefundType from \"~/components/RefundType/index\";\n// import ReturnConfirmation from \"~/components/ReturnConfirmation/index\";\n// import Error from \"~/components/Error/Error\";\n// import Payment from \"~/components/Payment/Payment\";\n// import CollectionsList from \"~/components/CollectionsList/index\";\n// import CollectionDetails from \"~/components/CollectionDetails/index\";\n// import ProductDetails from \"~/components/ProductDetails/index\";\nimport { Path } from \"./path\";\n\nconst authRoutes: RouteType[] = [\n  {\n    path: Path.Login,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/Login/index\"))\n    ),\n    // Component: Login,\n    exact: true,\n  },\n];\n\nconst authenticatedRoutes: RouteType[] = [\n  {\n    path: Path.SelectItems,\n    // Component: lazy(() =>\n    //   importWithRetry(() => import(\"../../components/CollectionsList/index\"))\n    // ),\n    // Component: lazy(() =>\n    //   importWithRetry(() => import(\"../../components/CollectionDetails/index\"))\n    // ),\n    // Component: lazy(() =>\n    //   importWithRetry(() => import(\"../../components/ProductDetails/index\"))\n    // ),\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/SelectItems/index\"))\n    ),\n    // Component: SelectItems,\n    exact: true,\n  },\n  {\n    path: Path.ReturnType,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/ReturnType/index\"))\n    ),\n    // Component: ReturnType,\n    exact: true,\n  },\n  {\n    path: Path.ExchangeVariant,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/ExchangeVariant/index\"))\n    ),\n    // Component: ExchangeVariant,\n    exact: true,\n  },\n  {\n    path: Path.CustomReturn,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/CustomReturn/index\"))\n    ),\n    // Component: CustomReturn,\n    exact: true,\n  },\n  {\n    path: Path.SelectQuantity,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/SelectQuantity/index\"))\n    ),\n    // Component: SelectQuantity,\n    exact: true,\n  },\n  {\n    path: Path.ReturnReason,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/ReturnReasons/index\"))\n    ),\n    // Component: ReturnReasons,\n    exact: true,\n  },\n  {\n    path: Path.ReturnMethod,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/ReturnMethods/index\"))\n    ),\n    // Component: ReturnMethods,\n    exact: true,\n  },\n  {\n    path: Path.MoreDetails,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/MoreDetails/index\"))\n    ),\n    // Component: MoreDetails,\n    exact: true,\n  },\n  {\n    path: Path.ReturnOverview,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/ReturnOverview/index\"))\n    ),\n    // Component: ReturnOverview,\n    exact: true,\n  },\n  // {\n  //   path: Path.RefundInfo,\n  //   Component: lazy(() =>\n  //     importWithRetry(() => import(\"../../components/RefundInfo/index\"))\n  //   ),\n  //   // Component: RefundInfo,\n  //   exact: true,\n  // },\n  {\n    path: Path.RefundType,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/RefundType/index\"))\n    ),\n    // Component: RefundType,\n    exact: true,\n  },\n  {\n    path: Path.ReturnConfirmation,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/ReturnConfirmation/index\"))\n    ),\n    // Component: ReturnConfirmation,\n    exact: true,\n  },\n  {\n    path: Path.Payment,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/Payment/index\"))\n    ),\n    // Component: Payment,\n    exact: true,\n  },\n  {\n    path: Path.CollectionsList,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/CollectionsList/index\"))\n    ),\n    // Component: CollectionsList,\n    exact: true,\n  },\n  {\n    path: Path.CollectionDetails,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/CollectionDetails/index\"))\n    ),\n    // Component: CollectionDetails,\n    exact: true,\n  },\n  {\n    path: Path.ProductDetailsShop,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/ProductDetailsShop/index\"))\n    ),\n    // Component: ProductDetails,\n    exact: true,\n  },\n];\n\nconst errorRoute: RouteType[] = [\n  {\n    path: Path.Error,\n    Component: lazy(() =>\n      importWithRetry(() => import(\"../../components/Error/Error\"))\n    ),\n    // Component: Error,\n    exact: true,\n  },\n];\n\nconst publicRoutes: RouteType[] = [];\n\nexport const appRoutes: RouteType[] = [\n  ...publicRoutes,\n  ...authRoutes,\n  ...authenticatedRoutes,\n  ...errorRoute,\n];\n","import React, { Suspense, FC } from \"react\";\nimport { MemoryRouter, Switch, Route } from \"react-router-dom\";\n\nimport Error from \"../components/Error/Error\";\nimport { ScrollToTop } from \"../components/common/ScrollToTop/ScrollToTop\";\n// import { isUserLoggedIn } from \"../util/isUserLoggedIn\";\n// import { getUserData } from \"../util/getUserData\";\nimport { FallbackSpinner } from \"~/ui-kit/components/FallbackSpinner/FallbackSpinner\";\n\nimport { appRoutes } from \"./routes/routes\";\n\nexport const Router: FC = () => {\n  // Note: Using MemoryRouter to avoid having to deal with the complexity\n  // Of handling state changes when the user uses default browser navigation\n  // To use BrowserRouter, just use <BrowserRouter basename=\"/v3\"></BrowserRouter>\n  return (\n    <MemoryRouter>\n      <Switch>\n        {appRoutes.map(({ Component, path, exact }, i) => {\n          return (\n            <Route\n              key={`${i}-${path}`}\n              path={path}\n              exact={exact === true}\n              render={(props) => {\n                return (\n                  <Suspense fallback={<FallbackSpinner />}>\n                    <ScrollToTop />\n                    <Component {...props} />\n                  </Suspense>\n                );\n              }}\n            />\n          );\n        })}\n        <Route path=\"*\" component={Error} />\n      </Switch>\n    </MemoryRouter>\n  );\n};\n","import React from \"react\";\n\nimport { Router } from \"./router/Router\";\n\nexport const App = () => <Router />;\n","import React, { FC } from \"react\";\n\nimport { ConfirmReturnContextProvider } from \"~/context/ConfirmReturnContext/ConfirmReturnContext\";\nimport { CustomerDataContextProvider } from \"~/context/CustomerDataContext/CustomerDataContext\";\nimport { FormatContextProvider } from \"~/context/FormatContext/FormatContext\";\nimport { LanguageContextProvider } from \"~/context/LanguageContext/LanguageContext\";\nimport { LoginStateContextProvider } from \"~/context/LoginStateContext/LoginStateContext\";\nimport { MerchantSettingsContextProvider } from \"~/context/MerchantSettingsContext/MerchantSettingsContext\";\nimport { ReturnContextProvider } from \"~/context/ReturnContext/ReturnContext\";\nimport { ReturnMethodsContextProvider } from \"~/context/ReturnMethodsContext/ReturnMethodsContext\";\nimport { ShipmentContextProvider } from \"~/context/ShipmentContext/ShipmentContext\";\nimport { ThemeContextProvider } from \"~/context/ThemeContext/ThemeContext\";\nimport { useMerchantSettings } from \"~/hooks/useMerchantSettings/useMerchantSettings\";\nimport { PayPalProvider } from \"../PayPalProvider/PayPalProvider\";\nimport { CartVisibilityContextProvider } from \"~/context/CartVisibilityContext/CartVisibilityContext\";\nimport { CollectionsNavigationVisibilityContextProvider } from \"~/context/CollectionsNavigationVisibilityContext/CollectionsNavigationVisibilityContext\";\n\nexport const AppProviders: FC = ({ children }) => {\n  const {\n    data: {\n      viewSettings,\n      merchant: { currency },\n      locales,\n    },\n  } = useMerchantSettings();\n  const { primaryColor, secondaryColor, logoUrl } = viewSettings;\n  const theme = {\n    primaryColor,\n    secondaryColor,\n    logoUrl,\n  };\n  return (\n    <ThemeContextProvider theme={theme}>\n      <MerchantSettingsContextProvider>\n        <LanguageContextProvider merchantLanguages={locales}>\n          <FormatContextProvider merchantCurrency={currency}>\n            <LoginStateContextProvider>\n              <ReturnContextProvider>\n                <ReturnMethodsContextProvider>\n                  <CustomerDataContextProvider>\n                    <ShipmentContextProvider>\n                      <ConfirmReturnContextProvider>\n                        <PayPalProvider>\n                          <CartVisibilityContextProvider>\n                            <CollectionsNavigationVisibilityContextProvider>\n                              {children}\n                            </CollectionsNavigationVisibilityContextProvider>\n                          </CartVisibilityContextProvider>\n                        </PayPalProvider>\n                      </ConfirmReturnContextProvider>\n                    </ShipmentContextProvider>\n                  </CustomerDataContextProvider>\n                </ReturnMethodsContextProvider>\n              </ReturnContextProvider>\n            </LoginStateContextProvider>\n          </FormatContextProvider>\n        </LanguageContextProvider>\n      </MerchantSettingsContextProvider>\n    </ThemeContextProvider>\n  );\n};\n","/* TODO: Convert this file to TS file if possible */\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ToastContainer } from \"react-toastify\";\n\nimport { App } from \"./App\";\nimport { ReactQueryClientProvider } from \"./components/common/ReactQueryClientProvider/ReactQueryClientProvider\";\nimport { AppProviders } from \"./components/common/AppProviders/AppProviders\";\n\nimport \"./common/i18n/index\";\n\nimport \"./styles/index.scss\";\nimport \"react-toastify/dist/ReactToastify.css\";\nimport \"~/util/mixpanel\";\n\nconst Root = () => {\n  return (\n    <ReactQueryClientProvider>\n      <AppProviders>\n        <App />\n        <ToastContainer newestOnTop className=\"w-100\" />\n      </AppProviders>\n    </ReactQueryClientProvider>\n  );\n};\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n  ReactDOM.render(<Root />, document.getElementById(\"root\"));\n});\n","// polyfills help supporting older browsers like IE, iOS<9 etc\nimport \"../polyfills\";\n\nimport importRetry from \"../importRetry\";\n\n// Rollbar\n[\"production\", \"staging\"].includes(process.env.RAILS_ENV) &&\n  importRetry(() => import(\"../vendor/rollbar\"));\n\n// Microsoft Clarity\n[\"production\", \"staging\"].includes(process.env.RAILS_ENV) &&\n  importRetry(() => import(\"../vendor/clarity\"));\n\n// Google Analytics\nprocess.env.RAILS_ENV === \"production\" &&\n  importRetry(() => import(\"../vendor/google/analytics/checkout\"));\n\n// Google Fonts\n[\"production\", \"staging\"].includes(process.env.RAILS_ENV) &&\n  importRetry(() => import(\"../vendor/google/fonts/inter\"));\n\n[\"production\", \"staging\"].includes(process.env.RAILS_ENV) &&\n  importRetry(() => import(\"../vendor/google/fonts/source_sans_pro\"));\n\n// Cookie consent\n[\"production\", \"staging\"].includes(process.env.RAILS_ENV) &&\n  importRetry(() => import(\"../vendor/cookieconsent\"));\n\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n\n// require(\"@rails/ujs\").start()\n// require(\"channels\")\n\n// Bootstrap (V5)\nimport \"../checkout_application_v3/styles/custom.scss\";\n\nimport \"../checkout_application_v3\";\n\n// Uncomment to copy all static images under ../images to the output folder and reference\n// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)\n// or the `imagePath` JavaScript helper below.\n//\n// const images = require.context('../images', true)\n// const imagePath = (name) => images(name, true)\n\n// css styles\n// import '../checkout_application/css/application'\n","import i18next from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport Backend from \"i18next-http-backend\";\nimport BrowserLanguageDetector from \"i18next-browser-languagedetector\";\n\nimport translationEN from \"~/locales/EN.json\";\nimport translationDE from \"~/locales/DE.json\";\nimport translationFR from \"~/locales/FR.json\";\nimport { LocaleCodes } from \"~/common/types/common\";\nimport { isDevelopmentEnvironment } from \"~/util/nodeEnv\";\n\n// const supportedLanguages: LocaleCodes[] = [\"en\", \"de\", \"fr\"];\n\ni18next\n  .use(Backend)\n  .use(BrowserLanguageDetector)\n  .use(initReactI18next)\n  .init({\n    backend: {\n      loadPath: \"/{{lng}}/text_block\",\n    },\n    detection: {\n      order: [\"navigator\"],\n    },\n    ns: [\"static\", \"backend\"],\n    defaultNS: \"static\",\n    fallbackLng: \"en\",\n    load: \"languageOnly\",\n    debug: isDevelopmentEnvironment,\n    interpolation: {\n      escapeValue: false,\n    },\n    react: {\n      useSuspense: true,\n    },\n    supportedLngs: false,\n    // supportedLngs: supportedLanguages,\n  });\n\nconst translationsMap = {\n  en: translationEN,\n  de: translationDE,\n  fr: translationFR,\n};\n\nexport const loadStaticTranslations = (supportedLanguages: LocaleCodes[]) =>\n  supportedLanguages.forEach((language) =>\n    loadStaticTranslationsByLocaleCode(language)\n  );\n\nexport const loadStaticTranslationsByLocaleCode = (locale: LocaleCodes) => {\n  const translation = translationsMap[locale];\n  if (!translation) return;\n\n  i18next.addResourceBundle(locale, \"static\", translation);\n};\n\nexport default i18next;\n","export const isDevelopmentEnvironment = process.env.NODE_ENV === \"development\";\n","export const transformArrayToCommaSeparatedString = (arr: string[] = []) =>\n  arr.join(\",\");\n","import { compact, isNil, round, sum, uniq } from \"lodash\";\n\nimport {\n  ConfirmReturnPayload,\n  ConfirmReturnPaymentVariables,\n  ConfirmReturnVariables,\n  CreatePayPalOrderPayload,\n  CreatePayPalOrderVariables,\n  CreateShipmentPayload,\n  CreateShipmentVariables,\n  FetchOrderRegisteredItemsVariables,\n  FetchOrderVariables,\n  FetchProductDetailsVariables,\n  FetchReturnMethodsNotesVariables,\n  FetchReturnMethodsVariables,\n  QueryParamItem,\n  QueryParamParentKey,\n} from \"~/common/types/api\";\nimport { MerchantSettings, ShopBackend } from \"~/common/types/merchant\";\nimport {\n  ConfirmReturnOrderItemRaw,\n  NoteAttribute,\n  Order,\n  OrderItem,\n} from \"~/common/types/order\";\nimport { AuthorizePayPalOrderResponse } from \"~/common/types/paypal\";\nimport { RefundType, ReturnType, StoreCreditType } from \"~/common/types/return\";\nimport { getInitiatedReturnItemOriginalOrderItem } from \"~/hooks/useCreateShipment/useCreateShipment.selectors\";\nimport { InitiatedReturnItem } from \"~/hooks/useReturnState/useReturnState.types\";\n\nimport { getCountryLabel } from \"./getCountryLabel\";\nimport { transformArrayToCommaSeparatedString } from \"./transformArrayToCommaSeparatedString\";\nimport { isNotNil } from \"./isNotNil\";\n\nexport const getFetchOrderQueryString = ({\n  orderId,\n  customerEmail,\n  currentPage,\n}: FetchOrderVariables) => {\n  const queryParamItems: QueryParamItem[] = [\n    {\n      childKey1: \"invoice_number\",\n      value: orderId.trim(),\n    },\n    {\n      childKey1: \"customer\",\n      childKey2: \"email\",\n      value: customerEmail.trim(),\n    },\n  ];\n  if (currentPage)\n    queryParamItems.push({\n      childKey1: \"current_page\",\n      value: currentPage,\n    });\n  return generateQueryString(queryParamItems, \"filter\");\n};\n\nexport const getFetchReturnMethodsNotesQueryString = ({\n  customerReturnId,\n  shipments,\n}: FetchReturnMethodsNotesVariables) => {\n  const queryParamItems = [\n    {\n      childKey1: \"shipment_ids\",\n      value: shipments.map(({ id }) => id),\n    },\n    {\n      childKey1: \"customer_return_id\",\n      value: customerReturnId,\n    },\n  ];\n\n  return queryParamItems\n    .map(({ childKey1, value }) => childKey1 + \"=\" + value)\n    .join(\"&\");\n};\n\nexport const getFetchOrderRegisteredItemsQueryString = ({\n  orderNumber,\n  currentPage,\n}: FetchOrderRegisteredItemsVariables) => {\n  const queryParamItems: QueryParamItem[] = [\n    {\n      childKey1: \"order_number\",\n      value: orderNumber,\n    },\n  ];\n  if (currentPage)\n    queryParamItems.push({\n      childKey1: \"current_page\",\n      value: currentPage,\n    });\n  return generateQueryString(queryParamItems, \"filter\");\n};\n\nexport const getFetchReturnMethodsRequestPayload = ({\n  customerCountry,\n  orderAmount,\n  numberOfItemsToReturn,\n  returnReasonIds,\n  returnType,\n  customerTags,\n  orderTags,\n  paymentMethods,\n  refundTotalValue,\n  customerEmail,\n  orderDate,\n  returnTags = [],\n  returnItemsCustomData = [],\n  noOfRegisteredReturns,\n  orderId,\n}: FetchReturnMethodsVariables) => {\n  const uniqueReturnTags = uniq(returnTags).join(\",\");\n  return {\n    rule: {\n      order_country: customerCountry,\n      order_value: orderAmount,\n      number_of_items: numberOfItemsToReturn,\n      return_reason_ids: returnReasonIds.join(\",\"),\n      return_type: returnType,\n      customer_tags: customerTags,\n      order_tags: orderTags,\n      payment_method: paymentMethods,\n      refund_total_value: refundTotalValue,\n      customer_email: customerEmail,\n      order_date: orderDate,\n      order_registered_returns: noOfRegisteredReturns,\n      return_item_product_tags: [\n        {\n          tag: uniqueReturnTags,\n        },\n      ],\n      product_custom_data: returnItemsCustomData,\n      order_id: orderId,\n    },\n  };\n};\n\nexport const generateQueryParamKeyName = (\n  parentKey: QueryParamParentKey,\n  { childKey1, childKey2, childKey3 }: Partial<QueryParamItem>\n) => {\n  if (childKey3) {\n    return `${parentKey}[${childKey1}][${childKey2}][${childKey3}]`;\n  }\n  if (childKey2) {\n    return `${parentKey}[${childKey1}][${childKey2}]`;\n  }\n  return `${parentKey}[${childKey1}]`;\n};\n\nexport const generateQueryParams = (\n  { value, childKey1, childKey2, childKey3 }: QueryParamItem,\n  parentKey: QueryParamParentKey\n) => {\n  return `${generateQueryParamKeyName(parentKey, {\n    childKey1,\n    childKey2,\n    childKey3,\n  })}=${encodeURIComponent(value)}`;\n};\n\nexport const generateQueryString = (\n  items: QueryParamItem[],\n  parentKey: QueryParamParentKey\n) => {\n  return items.map((item) => generateQueryParams(item, parentKey)).join(\"&\");\n};\n\nexport const getCreateShipmentRequestPayload = ({\n  initiatedReturnItems = [],\n  order = {},\n  orderItems,\n  ruleToken,\n  returnAddress,\n  customerAddress = {},\n  customerName,\n  returnMethod,\n  merchant,\n  customerEmail,\n}: CreateShipmentVariables): CreateShipmentPayload => {\n  return {\n    shipment: {\n      from: {\n        first_name: customerName.firstName,\n        last_name: customerName.lastName,\n        street: customerAddress.street?.trim(),\n        street_no: customerAddress.streetNumber?.trim(),\n        city: customerAddress.city,\n        zip_code: customerAddress.zip,\n        province_code: customerAddress.provinceCode,\n        country_iso2: customerAddress.countryCode,\n        phone_number: customerAddress.phone,\n      },\n      to: {\n        company: returnAddress.name2,\n        last_name: returnAddress.name,\n        street: returnAddress.street,\n        street_no: returnAddress.streetNumber,\n        city: returnAddress.city,\n        zip_code: returnAddress.zip.toString(),\n        province_code: returnAddress.state,\n        country_iso2: returnAddress.countryCode,\n      },\n      customs_document: {\n        displayed_currency:\n          getInitiatedReturnItemOriginalOrderItem(\n            initiatedReturnItems[0],\n            orderItems\n          ).displayedCurrency ?? merchant.currency,\n        items: initiatedReturnItems.map((initiatedReturnItem) => {\n          if (initiatedReturnItem.returnType === ReturnType.TradeIn) {\n            const { name } = initiatedReturnItem.tradeInItem;\n            return {\n              name,\n              quantity: initiatedReturnItem.returnQuantity,\n              unit_weight_in_grams: 0,\n              unit_price: 0.0,\n              inventory_item_id: \"\",\n            };\n          }\n\n          const orderItem = getInitiatedReturnItemOriginalOrderItem(\n            initiatedReturnItem,\n            orderItems\n          );\n          return {\n            name: orderItem.name,\n            quantity: initiatedReturnItem.returnQuantity,\n            unit_weight_in_grams: Math.round(orderItem.weightInKg * 1000),\n            unit_price: orderItem.displayedPrice,\n            inventory_item_id: orderItem.inventoryItemId,\n          };\n        }),\n      },\n      reference_number: getShipmentReferenceNumber(merchant, order),\n      shop_order_id: order.id,\n      notification_email: customerEmail,\n      package_weight: getShipmentPackageWeight(\n        initiatedReturnItems,\n        orderItems\n      ),\n      merchant_return_method_id: returnMethod.id,\n      pickup_date: null,\n      rule_token: ruleToken,\n    },\n  };\n};\n\nexport const getShipmentReferenceNumber = (\n  merchant: MerchantSettings,\n  order: DeepPartial<Order>\n) => {\n  if (merchant.shopBackend === ShopBackend.Shopify) {\n    const noteAttributesValue = getNoteAttributeValue(\n      order.noteAttributes,\n      merchant.returnAddressNoteAttributeName\n    );\n    if (noteAttributesValue?.length <= 30) {\n      return noteAttributesValue;\n    }\n    return removeHashFromOrderName(order.orderName);\n  }\n  return order.orderNumber;\n};\n\nexport const getShipmentPackageWeight = (\n  initiatedReturnItems: InitiatedReturnItem[],\n  orderItems: OrderItem[]\n): number => {\n  return (\n    sum(\n      initiatedReturnItems.map((initiatedReturnItem) => {\n        const orderItem = getInitiatedReturnItemOriginalOrderItem(\n          initiatedReturnItem,\n          orderItems\n        );\n        // For tradeInItems We don't get weightInKg from the back-end\n        // that's why we use 0 as a fallback\n        return initiatedReturnItem.returnQuantity * (orderItem.weightInKg || 0);\n      })\n    ) ?? 0\n  );\n};\n\nexport const getNoteAttributeValue = (\n  noteAttributes: Partial<NoteAttribute>[],\n  noteAttributeName: string\n): string => {\n  const noteAttribute = noteAttributes.filter(\n    ({ name }) => name === noteAttributeName\n  );\n  return noteAttribute[0]?.value?.toString();\n};\n\nexport const removeHashFromOrderName = (orderName: string): string => {\n  if (orderName.charAt(0) === \"#\") {\n    return orderName.slice(1);\n  }\n  return orderName;\n};\n\nconst getCustomerPayload = ({\n  customerFirstName,\n  customerLastName,\n  customerEmail,\n  tags,\n  shippingFirstName,\n  shippingLastName,\n  shippingAddress,\n}): ConfirmReturnPayload[\"refund\"][\"customer\"] => {\n  return {\n    email: customerEmail,\n    name: `${customerFirstName} ${customerLastName}`,\n    first_name: customerFirstName,\n    last_name: customerLastName,\n    tags,\n    address: {\n      first_name: shippingFirstName,\n      last_name: shippingLastName,\n      street: shippingAddress.street?.trim(),\n      street_number: shippingAddress.streetNumber?.trim(),\n      street_2: shippingAddress.street2?.trim(),\n      zip: shippingAddress.zip,\n      city: shippingAddress.city,\n      country: getCountryLabel(shippingAddress.countryCode),\n      phone: shippingAddress.phone,\n      province: shippingAddress.province,\n      province_code: shippingAddress.provinceCode,\n      company: shippingAddress.company,\n    },\n  };\n};\n\nexport const getConfirmReturnRequestPayload = ({\n  order,\n  orderItems,\n  shipments,\n  returnAddress,\n  customerAddress = {},\n  customerEmail,\n  customerName,\n  ruleToken,\n  language,\n  returnMethod,\n  initiatedReturnItems,\n  refundType,\n  payment,\n  storeCreditOption,\n  cartItems = [],\n}: ConfirmReturnVariables): ConfirmReturnPayload => {\n  const { senderCustomer = {} } = order;\n\n  const tradeInItemsPayload = initiatedReturnItems.map((item) => {\n    if (item.returnType === ReturnType.TradeIn) {\n      const {\n        tradeInItem: { id },\n        returnQuantity: quantity,\n      } = item;\n\n      return { id, quantity };\n    }\n  });\n\n  const orderInitiatedReturnItems = initiatedReturnItems.filter(\n    (item) => item.returnType !== ReturnType.TradeIn\n  );\n\n  const paymentPayload = getConfirmReturnPaymentPayload(payment);\n\n  return {\n    refund: {\n      items: getItemsPayload(orderInitiatedReturnItems, orderItems),\n      trade_in_items: compact(tradeInItemsPayload),\n      exchange_items: cartItems.map(\n        ({ price, id, selectedQuantity, productId }) => ({\n          product_id: productId,\n          variant_id: id,\n          quantity: selectedQuantity,\n          displayed_price: price,\n        })\n      ),\n      customer: getCustomerPayload({\n        customerFirstName: senderCustomer.firstName,\n        customerLastName: senderCustomer.lastName,\n        customerEmail,\n        tags: order.customer.tags,\n        shippingFirstName: customerName.firstName,\n        shippingLastName: customerName.lastName,\n        shippingAddress: customerAddress,\n      }),\n      return_address: {\n        company: returnAddress.name2,\n        last_name: returnAddress.name,\n        street: returnAddress.street,\n        street_no: returnAddress.streetNumber,\n        city: returnAddress.city,\n        state: returnAddress.state,\n        zip_code: returnAddress.zip.toString(),\n        country_iso2: returnAddress.countryCode,\n      },\n      order_name: removeHashFromOrderName(order.orderName),\n      rule_token: ruleToken,\n      vendor_order_number: order.orderNumber,\n      invoice_number: order.invoiceNumber,\n      merchant_return_method_id: returnMethod.id,\n      order_id: order.id,\n      language,\n      order_shipping_cost: order.shippingCost,\n      order_date: order.orderDate,\n      order_shipping_method:\n        order.shippingMethod ?? JSON.stringify(order.shippingMethod),\n      note_attributes: JSON.stringify(order.noteAttributes),\n      no_of_items: order.noOfItems,\n      payment_methods: order.paymentMethods,\n      shipments: shipments.map((shipment) => ({\n        id: shipment.id,\n        shipping_company: returnMethod?.returnMethodCarrier,\n        shipping_method:\n          returnMethod?.returnMethodName || returnMethod?.returnMethodCarrier,\n        tracking_number: shipment.carrierTrackingNo,\n        price: shipment.price,\n      })),\n      ...paymentPayload,\n      refund_type: getConfirmReturnRefundType(refundType, storeCreditOption),\n    },\n  };\n};\n\nconst getInitiatedReturnItemReasonImagesUrls = (\n  initiatedReturn: InitiatedReturnItem\n): string => {\n  const images =\n    initiatedReturn.returnReasonMoreDetails?.images.map(\n      ({ uploadId, ...rest }) => ({\n        ...rest,\n        id: uploadId,\n      })\n    ) ?? [];\n  return JSON.stringify(images);\n};\n\nconst getItemsPayload = (\n  orderInitiatedReturnItems,\n  orderItems\n): ConfirmReturnOrderItemRaw[] =>\n  orderInitiatedReturnItems.map((initiatedReturn) => {\n    const {\n      id,\n      name,\n      additionalComments,\n      sku,\n      ean,\n      discount,\n      price,\n      displayedPrice,\n      displayedCurrency,\n      categories,\n      imageUrl,\n      weightInKg,\n      variantId,\n      inventoryItemId,\n      productId,\n      originalQuantity,\n    } = getInitiatedReturnItemOriginalOrderItem(initiatedReturn, orderItems);\n\n    const exchangeVariant = initiatedReturn.exchangeVariant ?? {\n      title: \"\",\n      id: \"\",\n    };\n\n    return {\n      id,\n      name,\n      additional_comments: additionalComments,\n      sku,\n      ean,\n      category: transformArrayToCommaSeparatedString(categories),\n      discount,\n      price,\n      original_quantity: originalQuantity,\n      quantity: initiatedReturn.returnQuantity,\n      displayed_price: displayedPrice,\n      displayed_currency: displayedCurrency,\n      amount: initiatedReturn.returnQuantity * price,\n      image_url: imageUrl,\n      weight_in_kg: weightInKg,\n      return_reason_id: initiatedReturn.returnReasonId?.toString() ?? \"\",\n      refund_reason_text: initiatedReturn.returnReasonMoreDetails?.text ?? \"\",\n      return_reason_picture:\n        getInitiatedReturnItemReasonImagesUrls(initiatedReturn),\n      inventory_item_id: inventoryItemId,\n      variant_id: variantId,\n      product_id: productId,\n      return_type: initiatedReturn.returnType,\n      // Note: this is the title of the *exchange* variant (not the variant itself)\n      variant_title: exchangeVariant.title,\n      exchange_variant_id: exchangeVariant.id,\n    };\n  });\n\nexport const getCreatePayPalOrderRequestPayload = ({\n  order,\n  orderItems,\n  returnAddress,\n  customerAddress = {},\n  customerEmail,\n  customerName,\n  returnMethod,\n  initiatedReturnItems,\n  clientPaymentAmount,\n  originalOrderShippingCost,\n  isShopNowPaymentFlow = false,\n  cartItems = [],\n}: CreatePayPalOrderVariables): CreatePayPalOrderPayload => {\n  const { senderCustomer = {} } = order;\n\n  const orderInitiatedReturnItems = initiatedReturnItems.filter(\n    (item) => item.returnType !== ReturnType.TradeIn\n  );\n\n  const customerPayload = getCustomerPayload({\n    customerFirstName: senderCustomer.firstName,\n    customerLastName: senderCustomer.lastName,\n    customerEmail,\n    tags: order.customer.tags,\n    shippingFirstName: customerName.firstName,\n    shippingLastName: customerName.lastName,\n    shippingAddress: customerAddress,\n  });\n\n  return {\n    order: {\n      items: getItemsPayload(orderInitiatedReturnItems, orderItems),\n      shop_now_items: cartItems.map(\n        ({ selectedQuantity, price, productTitle, sku }) => ({\n          sku,\n          name: productTitle,\n          amount: selectedQuantity * price,\n          quantity: selectedQuantity,\n          price,\n          return_type: \"shop_exchange\",\n        })\n      ),\n      customer: {\n        ...customerPayload,\n        address: {\n          ...customerPayload.address,\n          country_iso2: customerAddress.countryCode,\n        },\n      },\n      return_address: {\n        company: returnAddress.name2,\n        last_name: returnAddress.name,\n        street: returnAddress.street,\n        street_no: returnAddress.streetNumber,\n        city: returnAddress.city,\n        state: returnAddress.state,\n        zip_code: returnAddress.zip.toString(),\n        country_iso2: returnAddress.countryCode,\n      },\n      merchant_return_method_id: returnMethod.id,\n      order_id: order.id,\n      order_shipping_cost: originalOrderShippingCost,\n      order_date: order.orderDate,\n      order_shipping_method:\n        order.shippingMethod ?? JSON.stringify(order.shippingMethod),\n    },\n\n    validation: {\n      // Note: This is the value of payment amount as calculated on the front-end client\n      client_payment_amount: round(clientPaymentAmount, 2),\n    },\n\n    // Note: this is hard-coded for now\n    // PayPal integration is only available for Instant Store Credit feature\n    payment_flow: isShopNowPaymentFlow ? \"shop_now\" : \"instant_store_credit\",\n  };\n};\n\nexport const getConfirmReturnPaymentPayload = (\n  payment?: ConfirmReturnPaymentVariables\n): Pick<ConfirmReturnPayload[\"refund\"], \"payment\"> => {\n  if (isNil(payment)) {\n    return {};\n  }\n  const { authorizationId, orderId } = payment;\n  return {\n    payment: {\n      order_id: orderId,\n      authorization_id: authorizationId,\n    },\n  };\n};\n\nexport const getConfirmReturnPaymentVariablesFromPaymentAuthorizationResponse =\n  (\n    authorizePaymentOrderResponse: AuthorizePayPalOrderResponse\n  ): ConfirmReturnPaymentVariables => {\n    const purchaseUnits = authorizePaymentOrderResponse?.purchase_units ?? [];\n    const purchaseUnit = purchaseUnits[0];\n    const authorizations = purchaseUnit?.payments?.authorizations ?? [];\n    const authorization = authorizations[0];\n    return {\n      orderId: authorizePaymentOrderResponse?.id,\n      authorizationId: authorization?.id,\n    };\n  };\n\nexport const getConfirmReturnRefundType = (\n  refundType: RefundType,\n  storeCreditOption: StoreCreditType\n): ConfirmReturnPayload[\"refund\"][\"refund_type\"] => {\n  switch (refundType) {\n    case RefundType.OriginalPaymentMethod:\n      return RefundType.OriginalPaymentMethod;\n    case RefundType.StoreCredit:\n      return storeCreditOption;\n    case RefundType.ShopExchange:\n      return RefundType.ShopExchange;\n    default:\n      return null;\n  }\n};\n\nexport const getFetchProductDetailsQueryString = ({\n  orderId,\n  exchangedOrderItemId,\n}: Pick<FetchProductDetailsVariables, \"orderId\" | \"exchangedOrderItemId\">) => {\n  if (isNotNil(orderId) && isNotNil(exchangedOrderItemId)) {\n    return `?order_id=${orderId}&order_item_id=${exchangedOrderItemId}`;\n  }\n  return \"\";\n};\n","export const getXCSRFToken = () =>\n  document.querySelector<HTMLMetaElement>('meta[name=\"csrf-token\"]').content;\n","import { sha256 } from \"js-sha256\";\n\nimport {\n  ConfirmReturnVariables,\n  CreateShipmentVariables,\n  FetchOrderRegisteredItemsVariables,\n  FetchReturnMethodsNotesVariables,\n  FetchOrderVariables,\n  FetchProductDetailsVariables,\n  FetchReturnMethodsVariables,\n  CreatePayPalOrderVariables,\n  ConfirmReturnPaymentVariables,\n} from \"~/common/types/api\";\nimport {\n  AuthorizePayPalOrderResponse,\n  CreatePayPalOrderResponse,\n} from \"~/common/types/paypal\";\nimport { ProductRaw } from \"~/common/types/product\";\nimport {\n  CollectionDetailsRaw,\n  CollectionRaw,\n  ProductSearchResponseRaw,\n} from \"~/common/types/collection\";\nimport { ConfirmReturnResponseRaw } from \"~/hooks/useConfirmReturn/useConfirmReturn.types\";\nimport { CookiesSettingsRaw } from \"~/hooks/useCookiesSettings/useCookiesSettings.types\";\nimport { CreateShipmentResponseRaw } from \"~/hooks/useCreateShipment/useCreateShipment.types\";\nimport { DHLDownStatusResponseRaw } from \"~/hooks/useDHLDownStatus/useDHLDownStatus.types\";\nimport { MerchantSettingsResponseRaw } from \"~/hooks/useMerchantSettings/useMerchantSettings.types\";\nimport { OrderDetailsResponseRaw } from \"~/hooks/useOrderDetails/useOrderDetails.types\";\nimport { OrderRegisteredItemsResponseRaw } from \"~/hooks/useOrderRegisteredItems/useOrderRegisteredItems.types\";\nimport { ReturnMethodsResponseRaw } from \"~/hooks/useReturnMethods/useReturnMethods.types\";\nimport { ReturnMethodsNotesResponseRaw } from \"~/hooks/useReturnMethodsNotes/useReturnMethodsNotes.types\";\nimport { TradeInItemsResponseRaw } from \"~/hooks/useTradeInItems/useTradeInItems.types\";\nimport {\n  getConfirmReturnPaymentVariablesFromPaymentAuthorizationResponse,\n  getConfirmReturnRequestPayload,\n  getCreatePayPalOrderRequestPayload,\n  getCreateShipmentRequestPayload,\n  getFetchOrderQueryString,\n  getFetchOrderRegisteredItemsQueryString,\n  getFetchProductDetailsQueryString,\n  getFetchReturnMethodsNotesQueryString,\n  getFetchReturnMethodsRequestPayload,\n} from \"~/util/api\";\nimport { getXCSRFToken } from \"~/util/getXCSRFToken\";\n\nexport const fetchMerchantSettings = () => {\n  return fetch(\"/settings\").then<MerchantSettingsResponseRaw>((response) =>\n    response.json()\n  );\n};\n\nexport const fetchCookiesSettings = () => {\n  return fetch(\"/settings/cookie_enabled\").then<CookiesSettingsRaw>(\n    (response) => {\n      return response.json();\n    }\n  );\n};\n\nexport const fetchOrder = (params: FetchOrderVariables) => {\n  const queryString = getFetchOrderQueryString(params);\n  return fetch(`/orders.json?${queryString}`)\n    .then<OrderDetailsResponseRaw>((response) => response.json())\n    .then((response) => {\n      if (response.error) {\n        throw new Error(response.error);\n      }\n      return response;\n    });\n};\n\nexport const fetchOrderRegisteredItems = (\n  params: FetchOrderRegisteredItemsVariables\n) => {\n  const queryString = getFetchOrderRegisteredItemsQueryString(params);\n  return fetch(\n    `/orders/registered_items.json?${queryString}`\n  ).then<OrderRegisteredItemsResponseRaw>((response) => response.json());\n};\n\nexport const fetchReturnMethods = (params: FetchReturnMethodsVariables) => {\n  const requestPayload = getFetchReturnMethodsRequestPayload(params);\n  return fetch(`/rules`, {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"X-CSRF-Token\": getXCSRFToken(),\n    },\n    body: JSON.stringify(requestPayload),\n  }).then<ReturnMethodsResponseRaw>((response) => response.json());\n};\n\nexport const createShipment = async (params: CreateShipmentVariables) => {\n  const requestPayload = getCreateShipmentRequestPayload(params);\n  const response = await fetch(\"/shipments\", {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"X-CSRF-Token\": getXCSRFToken(),\n    },\n    body: JSON.stringify(requestPayload),\n  });\n  if (response.status === 500) {\n    throw new Error(\n      \"Failed to create return label. Please recheck your address and try again or contact customer support\"\n    );\n  }\n  const data: CreateShipmentResponseRaw = await response.json();\n  if (data.error?.length) {\n    throw new Error(data.error[0]);\n  }\n  return data;\n};\n\nexport const confirmReturn = async (params: ConfirmReturnVariables) => {\n  const requestPayload = getConfirmReturnRequestPayload(params);\n\n  const checksum = sha256.hmac(getXCSRFToken(), JSON.stringify(requestPayload));\n  const response = await fetch(\"/refunds\", {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"X-CSRF-Token\": getXCSRFToken(),\n      \"X-Checksum\": checksum,\n    },\n    body: JSON.stringify(requestPayload),\n  });\n  if (response.status >= 500) {\n    throw new Error(\n      \"Failed to confirm return. Please try again or contact customer support\"\n    );\n  }\n  const data: ConfirmReturnResponseRaw = await response.json();\n  if (data.error) {\n    throw new Error(data.error);\n  }\n  return data;\n};\n\nexport const fetchReturnMethodsNotes = async (\n  params: FetchReturnMethodsNotesVariables\n) => {\n  const queryString = getFetchReturnMethodsNotesQueryString(params);\n  const response = await fetch(\n    `/merchant_return_methods/${params.merchantReturnMethodId}/notes?${queryString}`\n  );\n  const result: ReturnMethodsNotesResponseRaw = await response.json();\n  return result;\n};\n\nexport const fetchProductDetails = ({\n  productId,\n  orderId,\n  exchangedOrderItemId,\n  useShopProductEndpoint,\n}: FetchProductDetailsVariables) => {\n  if (useShopProductEndpoint) {\n    return fetch(`/shop_now/products/${productId}.json`).then<ProductRaw>(\n      (response) => response.json()\n    );\n  }\n  const queryString = getFetchProductDetailsQueryString({\n    orderId,\n    exchangedOrderItemId,\n  });\n  return fetch(`/products/${productId}${queryString}`).then<ProductRaw>(\n    (response) => response.json()\n  );\n};\n\nexport const fetchDHLDownStatus = () =>\n  fetch(\"/settings/dhl_not_working\").then<DHLDownStatusResponseRaw>(\n    (response) => response.json()\n  );\n\nexport const fetchTradeInItems = (orderId: string) =>\n  fetch(`/trade_in_items?order_id=${orderId}`).then<TradeInItemsResponseRaw>(\n    (response) => response.json()\n  );\n\nexport const createPayPalOrder = (params: CreatePayPalOrderVariables) => {\n  const requestPayload = getCreatePayPalOrderRequestPayload(params);\n  return fetch(\"/payment/orders\", {\n    method: \"POST\",\n    body: JSON.stringify(requestPayload),\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"X-CSRF-Token\": getXCSRFToken(),\n    },\n  })\n    .then<CreatePayPalOrderResponse>((response) => response.json())\n    .then<string>((order) => order.id);\n};\n\nexport const authorizePayPalOrder = (orderId: string) =>\n  fetch(`/payment/orders/${orderId}/authorize`, {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"X-CSRF-Token\": getXCSRFToken(),\n    },\n  })\n    .then<AuthorizePayPalOrderResponse>((response) => response.json())\n    .then<ConfirmReturnPaymentVariables>((data) =>\n      getConfirmReturnPaymentVariablesFromPaymentAuthorizationResponse(data)\n    );\n\nexport const fetchCollections = () => {\n  return fetch(`/shop_now/collections?product_limit=4`).then<CollectionRaw[]>(\n    (response) => response.json()\n  );\n};\n\nexport const fetchCollection = (\n  collectionId: string,\n  nextPage?: string,\n  prevPage?: string\n) => {\n  let queryParam = \"\";\n  if (nextPage) {\n    queryParam = `next_page=${nextPage}`;\n  }\n  if (prevPage) {\n    queryParam = `prev_page=${prevPage}`;\n  }\n  return fetch(\n    `/shop_now/collections/${collectionId}?${queryParam}&product_limit=12`\n  ).then<CollectionDetailsRaw>((response) => response.json());\n};\n\nexport const fetchSearchProducts = (\n  searchQuery: string,\n  nextPage?: string,\n  prevPage?: string\n) => {\n  let paginationQueryParam = \"\";\n  if (nextPage) {\n    paginationQueryParam = `next_page=${nextPage}`;\n  }\n  if (prevPage) {\n    paginationQueryParam = `prev_page=${prevPage}`;\n  }\n  return fetch(\n    `shop_now/search_products?query=${searchQuery}&product_limit=12&${paginationQueryParam}`\n  ).then<ProductSearchResponseRaw>((response) => response.json());\n};\n","import { isNil, negate } from \"lodash\";\n\nexport const isNotNil = negate(isNil);\n","import { ShopBackend, ShopBackendRaw } from \"~/common/types/merchant\";\nimport {\n  RefundShippingCostPolicy,\n  RefundShippingCostPolicyRaw,\n} from \"~/common/types/return\";\nimport { transformCommaSeparatedStringToArray } from \"~/util/transformCommaSeparatedStringToArray\";\nimport { LocaleCodes } from \"~/common/types/common\";\n\nimport {\n  MerchantSettingsResponse,\n  MerchantSettingsResponseRaw,\n} from \"./useMerchantSettings.types\";\n\nexport const transformMerchantSettingsResponse = (\n  responseData: MerchantSettingsResponseRaw\n): MerchantSettingsResponse => {\n  const settings = responseData?.settings;\n  if (settings) {\n    const {\n      image_url,\n      primary_color,\n      secondary_color,\n      shop_url,\n      custom_script,\n    } = settings.checkout_view_setting ?? {};\n    const {\n      name,\n      currency = \"EUR\",\n      climate_compensation,\n      return_address1_note_attribute_name,\n      shop_backend,\n      show_exchange,\n      show_store_credit,\n      show_instant_store_credit,\n      show_trade_in_items,\n      merchant_languages,\n      shop_now_exchange_enabled,\n      active_paypal_checkout,\n    } = settings.merchant ?? {};\n    const {\n      policy_url,\n      expected_refund,\n      refund_shipping_cost,\n      custom_return_name,\n      exchange_without_track_quantity,\n      store_credit_added_percentage,\n      custom_missing_optional_translations,\n    } = settings.return_policy ?? {};\n    const returnReasons = settings.return_reasons ?? [];\n    const merchantLanguages = merchant_languages ?? [];\n    return {\n      viewSettings: {\n        primaryColor: primary_color,\n        secondaryColor: secondary_color,\n        logoUrl: image_url,\n        shopUrl: shop_url,\n        customScript: custom_script,\n      },\n      locales: merchantLanguages.map(\n        ({ lang_code }) => lang_code as LocaleCodes\n      ),\n      merchant: {\n        name,\n        currency,\n        climateCompensation: climate_compensation,\n        returnAddressNoteAttributeName: return_address1_note_attribute_name,\n        shopBackend: shopBackendMap[shop_backend],\n        showExchange: show_exchange,\n        // Note: return_policy.show_custom_return is set by the merchant\n        // merchant.show_custom_return is set by 8returns admins (to overwrite if needed, i.e. paywall)\n        showCustomReturn:\n          settings.merchant?.show_custom_return &&\n          settings.return_policy?.show_custom_return,\n        showStoreCredit: show_store_credit,\n        showInstantStoreCredit: show_instant_store_credit,\n        showTradeInItems: show_trade_in_items,\n        shopNowEnabled: shop_now_exchange_enabled,\n        shopNowPaymentEnabled: active_paypal_checkout,\n        merchantLanguages: merchantLanguages.map(\n          ({ lang_code, lang_name }) => ({\n            langCode: lang_code,\n            langName: lang_name,\n          })\n        ),\n      },\n      returnPolicy: {\n        policyUrl: policy_url,\n        showExpectedRefund: expected_refund,\n        refundShippingCost: refundShippingCostPolicyMap[refund_shipping_cost],\n        customReturnName: custom_return_name,\n        exchangeWithoutTrackQuantity: exchange_without_track_quantity,\n        storeCreditAddedPercentage: store_credit_added_percentage || 0,\n        // Note: For the first iteration, the additional bonus for in-app shopping is set to 0\n        // In next iteration, this value should be returned from the backend\n        inAppShoppingAddedPercentage: 0,\n        customMissingOptionalTranslations: custom_missing_optional_translations,\n      },\n      returnReasons: returnReasons.map(\n        ({\n          id,\n          external_text_by_locale,\n          additional_text_required,\n          additional_text,\n          image_upload,\n          image_upload_required,\n          text_title_by_locale,\n          show_for_refund,\n          show_for_exchange_reasons,\n          show_for_custom_reasons,\n          applicable_categories = \"\",\n        }) => ({\n          id,\n          externalText: external_text_by_locale,\n          isAdditionalTextSupported: additional_text,\n          isAdditionalTextRequired: additional_text_required,\n          isImageSupported: image_upload,\n          isImageRequired: image_upload_required,\n          textTitle: text_title_by_locale,\n          visible: {\n            refund: show_for_refund,\n            exchange: show_for_exchange_reasons,\n            custom: show_for_custom_reasons,\n          },\n          applicableCategories: transformCommaSeparatedStringToArray(\n            applicable_categories\n          ),\n        })\n      ),\n    };\n  }\n  return {\n    viewSettings: {},\n    locales: [],\n    merchant: {\n      currency: \"EUR\",\n      merchantLanguages: [],\n    },\n    returnPolicy: {},\n    returnReasons: [],\n  };\n};\n\nexport const shopBackendMap: Record<ShopBackendRaw, ShopBackend> = {\n  shopify_integration: ShopBackend.Shopify,\n  shopware_integration: ShopBackend.Shopware,\n};\n\nexport const refundShippingCostPolicyMap: Record<\n  RefundShippingCostPolicyRaw,\n  RefundShippingCostPolicy\n> = {\n  refund: RefundShippingCostPolicy.Refund,\n  no_refund: RefundShippingCostPolicy.NoRefund,\n  if_all_items_returned: RefundShippingCostPolicy.IfAllItemsReturned,\n};\n","import { useMemo } from \"react\";\nimport { useQuery } from \"react-query\";\n\nimport { fetchMerchantSettings } from \"~/api\";\n\nimport { transformMerchantSettingsResponse } from \"./useMerchantSettings.util\";\n\nexport const useMerchantSettings = () => {\n  const { data: response, ...restProps } = useQuery(\n    \"merchantSettingsQuery\",\n    fetchMerchantSettings\n  );\n  const data = useMemo(\n    () => transformMerchantSettingsResponse(response),\n    [response]\n  );\n  return {\n    data,\n    ...restProps,\n  };\n};\n","// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport const emptyCallback = () => {};\n","import { OrderItem } from \"~/common/types/order\";\nimport { InitiatedReturnItem } from \"../useReturnState/useReturnState.types\";\n\nexport const getInitiatedReturnItemOriginalOrderItem = (\n  initiatedReturnItem: InitiatedReturnItem,\n  orderItems: OrderItem[] = []\n): OrderItem =>\n  orderItems.find(({ id }) => id === initiatedReturnItem.orderItemId) ?? {};\n","export type CheckoutViewSettingsRaw = DeepPartial<{\n  image_url: string;\n  primary_color: string;\n  secondary_color: string;\n  shop_url: string;\n  custom_script: string;\n}>;\n\nexport type MerchantLanguageRaw = DeepPartial<{\n  lang_name: string;\n  lang_code: string;\n}>;\n\nexport type MerchantLanguage = DeepPartial<{\n  langName: string;\n  langCode: string;\n}>;\n\nexport type MerchantSettingsRaw = DeepPartial<{\n  climate_compensation: boolean;\n  currency: string;\n  name: string;\n  return_address1_note_attribute_name: string;\n  shop_backend: ShopBackendRaw;\n  show_custom_return: boolean;\n  show_exchange: boolean;\n  show_store_credit: boolean;\n  show_instant_store_credit: boolean;\n  show_trade_in_items: boolean;\n  merchant_languages: MerchantLanguageRaw[];\n  shop_now_exchange_enabled: boolean;\n  active_paypal_checkout: boolean;\n}>;\n\nexport type CheckoutViewSettings = DeepPartial<{\n  logoUrl: string;\n  shopUrl: string;\n  primaryColor: string;\n  secondaryColor: string;\n  customScript: string;\n}>;\n\nexport type ShopBackendRaw = `${ShopBackend}`;\n\nexport enum ShopBackend {\n  Shopify = \"shopify_integration\",\n  Shopware = \"shopware_integration\",\n}\n\nexport type MerchantSettings = DeepPartial<{\n  climateCompensation: boolean;\n  currency: string;\n  name: string;\n  shopBackend: ShopBackend;\n  showCustomReturn: boolean;\n  showExchange: boolean;\n  showStoreCredit: boolean;\n  showInstantStoreCredit: boolean;\n  returnAddressNoteAttributeName: string;\n  showTradeInItems: boolean;\n  shopNowEnabled: boolean;\n  shopNowPaymentEnabled: boolean;\n  merchantLanguages: MerchantLanguage[];\n}>;\n","import { useState, useEffect } from \"react\";\n\n// Adapted from https://www.robinwieruch.de/react-uselocalstorage-hook/\nexport const useSessionStorage = <T>(storageKey: string, fallbackState: T) => {\n  const [value, setValue] = useState<T>(\n    JSON.parse(sessionStorage.getItem(storageKey)) ?? fallbackState\n  );\n\n  useEffect(() => {\n    sessionStorage.setItem(storageKey, JSON.stringify(value));\n  }, [value, storageKey]);\n\n  return [value, setValue] as const;\n};\n","import countryList from \"react-select-country-list\";\n\nexport const getCountryLabel = (countryCode: string) =>\n  countryCode ? countryList().getLabel(countryCode) : \"\";\n","import { useCallback, useEffect, useState } from \"react\";\nimport { isEmpty } from \"lodash\";\n\nimport i18next, { loadStaticTranslations } from \"~/common/i18n\";\nimport { LocaleCode, LocaleCodes } from \"~/common/types/common\";\nimport { setFormattingLocale } from \"~/util/format\";\n\nexport type UseLanguageProps = {\n  merchantLanguages: LocaleCodes[];\n};\n\nexport const useLanguage = ({ merchantLanguages }: UseLanguageProps) => {\n  const [language, setLanguage] = useState<LocaleCodes>(LocaleCode.en);\n\n  const changeI18nextLanguage = (updatedLanguage: LocaleCodes) => {\n    i18next.changeLanguage(updatedLanguage);\n  };\n\n  useEffect(() => {\n    if (isEmpty(merchantLanguages)) return;\n\n    loadStaticTranslations(merchantLanguages);\n\n    const i18nextLanguage = i18next.languages?.[0] as LocaleCodes;\n    if (i18nextLanguage) {\n      if (merchantLanguages.includes(i18nextLanguage)) {\n        changeLanguage(i18nextLanguage);\n      } else {\n        changeI18nextLanguage(LocaleCode.en as LocaleCodes);\n      }\n    }\n  }, [merchantLanguages]);\n\n  const changeDropdownLanguage = (updatedLanguage: LocaleCodes) => {\n    setLanguage(updatedLanguage);\n    setFormattingLocale(updatedLanguage);\n  };\n\n  const changeLanguage = useCallback((updatedLanguage: LocaleCodes) => {\n    changeI18nextLanguage(updatedLanguage);\n    changeDropdownLanguage(updatedLanguage);\n  }, []);\n\n  const alignI18nextAndDropdownLanguage = useCallback(\n    (i18nextLanguage: LocaleCodes) => {\n      if (merchantLanguages.includes(i18nextLanguage)) {\n        changeDropdownLanguage(i18nextLanguage);\n      } else {\n        changeI18nextLanguage(LocaleCode.en as LocaleCodes);\n      }\n    },\n    [merchantLanguages]\n  );\n\n  useEffect(() => {\n    const i18nextLanguage = i18next.languages?.[0] as LocaleCodes;\n    if (!i18nextLanguage) return;\n    alignI18nextAndDropdownLanguage(i18nextLanguage);\n  }, [merchantLanguages]);\n\n  const i18nextOnInitialized = useCallback(() => {\n    if (isEmpty(merchantLanguages)) return;\n    const i18nextLanguage = i18next.languages[0] as LocaleCodes;\n    alignI18nextAndDropdownLanguage(i18nextLanguage);\n  }, [merchantLanguages]);\n\n  useEffect(() => {\n    i18next.on(\"initialized\", i18nextOnInitialized);\n    return () => i18next.off(\"initialized\", i18nextOnInitialized);\n  }, [i18nextOnInitialized]);\n\n  return {\n    language,\n    changeLanguage,\n  };\n};\n","import React, { createContext, FC, useContext, useMemo } from \"react\";\n\nimport { LocaleCodes } from \"~/common/types/common\";\nimport { useLanguage } from \"~/hooks/useLanguage/useLanguage\";\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type LanguageContextType = {\n  language: LocaleCodes;\n  changeLanguage: (language: string) => void;\n};\n\nexport const LanguageContext = createContext<LanguageContextType>({\n  language: \"en\" as LocaleCodes,\n  changeLanguage: emptyCallback,\n});\n\nexport type LanguageContextProviderProps = {\n  merchantLanguages: LocaleCodes[];\n};\n\nexport const LanguageContextProvider: FC<LanguageContextProviderProps> = ({\n  children,\n  merchantLanguages,\n}) => {\n  const { language, changeLanguage } = useLanguage({ merchantLanguages });\n\n  const value = useMemo(\n    () => ({\n      language,\n      changeLanguage,\n    }),\n    [language, changeLanguage]\n  );\n  return (\n    <LanguageContext.Provider value={value}>\n      {children}\n    </LanguageContext.Provider>\n  );\n};\n\nexport const useLanguageContext = () => useContext(LanguageContext);\n","import React, { FC } from \"react\";\nimport { QueryCache, QueryClient, QueryClientProvider } from \"react-query\";\nimport { persistQueryClient } from \"react-query/persistQueryClient-experimental\";\nimport { createWebStoragePersistor } from \"react-query/createWebStoragePersistor-experimental\";\n\nexport const queryCache = new QueryCache();\n\nconst queryClient = new QueryClient({\n  defaultOptions: {\n    queries: {\n      refetchOnWindowFocus: false,\n      retry: false,\n      cacheTime: 1000 * 60 * 60 * 24, // 24 hours,\n      staleTime: 1000 * 60 * 60 * 24,\n    },\n  },\n  queryCache,\n});\n\nconst sessionStoragePersistor = createWebStoragePersistor({\n  storage: window.sessionStorage,\n});\n\npersistQueryClient({\n  queryClient,\n  persistor: sessionStoragePersistor,\n});\n\nexport const ReactQueryClientProvider: FC = ({ children }) => {\n  return (\n    <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>\n  );\n};\n","import { curry } from \"lodash\";\n\nimport { LocaleCodes } from \"~/common/types/common\";\n\nlet locale: LocaleCodes = \"en\";\n\nexport enum NumberFormat {\n  Currency = \"currency\",\n}\n\nconst numberFormatterMap = {\n  [NumberFormat.Currency]: (currency: string) =>\n    new Intl.NumberFormat(locale, {\n      style: \"currency\",\n      minimumFractionDigits: 2,\n      maximumFractionDigits: 2,\n      currency,\n    }).format,\n};\n\nconst getNumberFormatter = (format: NumberFormat) => numberFormatterMap[format];\n\nconst formatNumber = (\n  format: NumberFormat,\n  currency: string,\n  value: number | bigint\n): string => getNumberFormatter(format)(currency)(value);\n\nconst formatNumberCurried = curry(formatNumber);\n\nexport const formatCurrency = formatNumberCurried(NumberFormat.Currency);\n\nexport function setFormattingLocale(newLocale: LocaleCodes) {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  locale = newLocale;\n}\n\nexport const formatDate = (\n  value: string | number | Date,\n  formatting: {\n    month: \"numeric\" | \"short\";\n    day: \"numeric\" | \"2-digit\";\n    year: \"numeric\" | \"2-digit\";\n  } = {\n    month: \"short\",\n    day: \"numeric\",\n    year: \"numeric\",\n  }\n) => {\n  if (!value) return value;\n  return new Intl.DateTimeFormat(\"en-US\", formatting).format(new Date(value));\n};\n\nexport const formatTime = (\n  timestamp: string | number | Date,\n  locale: LocaleCodes = \"en\"\n) => {\n  return new Date(timestamp).toLocaleString(locale, {\n    hour: \"2-digit\",\n    minute: \"2-digit\",\n  });\n};\n","import { LocaleCode } from \"./common\";\n\nexport type ReturnPolicyRaw = DeepPartial<{\n  custom_return_name: string;\n  exchange_without_track_quantity: boolean;\n  expected_refund: boolean;\n  inventory_threshold: number;\n  policy_url: string;\n  refund_shipping_cost: RefundShippingCostPolicyRaw;\n  returns_window: number;\n  show_custom_return: boolean;\n  store_credit_added_percentage: number;\n  custom_missing_optional_translations: boolean;\n}>;\n\nexport type ReturnReasonRaw = DeepPartial<{\n  additional_text: boolean;\n  additional_text_required: boolean;\n  applicable_categories: string;\n  id: number;\n  image_upload: boolean;\n  image_upload_required: boolean;\n  show_for_custom_reasons: boolean;\n  show_for_exchange_reasons: boolean;\n  show_for_refund: boolean;\n  text_title_by_locale: any;\n  external_text_by_locale: any;\n}>;\n\nexport type ReturnAddressRaw = DeepPartial<{\n  city: string;\n  state: string;\n  country_iso2: string;\n  name: string;\n  name2: string;\n  street: string;\n  street_number: string;\n  zip: string;\n}>;\n\nexport type ReturnAddressShipmentRaw = {\n  company: string;\n  last_name: string;\n  street: string;\n  street_no: string;\n  city: string;\n  zip_code: string;\n  province_code: string;\n  country_iso2: string;\n};\n\nexport type ReturnLabelAddressRaw = {\n  return_address_city: string;\n  return_address_state: string;\n  return_address_company: string;\n  return_address_country_iso2: string;\n  return_address_last_name: string;\n  return_address_street: string;\n  return_address_street_no: string;\n  return_address_zip_code: string;\n};\n\nexport type ReturnPolicy = DeepPartial<{\n  customReturnName: string;\n  exchangeWithoutTrackQuantity: boolean;\n  showExpectedRefund: boolean;\n  inventoryThreshold: number;\n  policyUrl: string;\n  refundShippingCost: RefundShippingCostPolicy;\n  returnsWindow: number;\n  storeCreditAddedPercentage: number;\n  inAppShoppingAddedPercentage: number;\n  customMissingOptionalTranslations: boolean;\n}>;\n\nexport type ReturnReason = DeepPartial<{\n  id: number;\n  externalText: Record<LocaleCode, string>;\n  isImageSupported: boolean;\n  isImageRequired: boolean;\n  isAdditionalTextRequired: boolean;\n  isAdditionalTextSupported: boolean;\n  textTitle: Record<LocaleCode, string>;\n  visible: Record<ReturnTypeRaw, boolean>;\n  applicableCategories: string[];\n}>;\n\nexport type Address = {\n  name: string;\n  name2?: string;\n  countryCode: string;\n  city: string;\n  street: string;\n  streetNumber: string;\n  zip: string;\n  street2?: string;\n  province?: string;\n  provinceCode?: string;\n  state?: string; // TODO: remove later\n  company?: string;\n  phone?: string;\n};\n\nexport type ReturnLabelAddress = {\n  companyName: string;\n  city: string;\n  state: string;\n  countryCode: string;\n  street: string;\n  streetNumber: string;\n  zip: string;\n  name: string;\n};\n\nexport type ReturnTypeRaw = `${ReturnType}`;\n\nexport enum ReturnType {\n  Refund = \"refund\",\n  Exchange = \"exchange\",\n  Custom = \"custom\",\n  TradeIn = \"trade_in\",\n  shop_now = \"shop_exchange\",\n}\n\nexport type RefundShippingCostPolicyRaw = `${RefundShippingCostPolicy}`;\n\nexport enum RefundShippingCostPolicy {\n  Refund = \"refund\",\n  NoRefund = \"no_refund\",\n  IfAllItemsReturned = \"if_all_items_returned\",\n}\n\nexport enum RefundType {\n  OriginalPaymentMethod = \"original_payment_method\",\n  StoreCredit = \"store_credit\",\n  ShopExchange = \"shop_exchange\",\n}\n\nexport enum StoreCreditType {\n  StoreCreditLater = \"store_credit\",\n  StoreCreditInstant = \"instant_store_credit\",\n}\n\nexport enum ShopExchangeRefundType {\n  OriginalPaymentMethod = \"original_payment_method\",\n  StoreCredit = \"store_credit\",\n}\n","import { FC } from \"react\";\n\nimport { Path } from \"~/router/routes/path\";\n\nexport type SVGIconComponentProps = {\n  color?: string;\n  className?: string;\n  size?: string;\n  strokeWidth?: number;\n};\n\nexport enum LocaleCode {}\n\nconst locales =\n  \"aa, ab, af, ak, sq, am, ar, an, hy, as, av, ae, ay, az, ba, bm, eu, be, bn, bh, bi, bs, br, bg, my, ca, ch, ce, zh, cu, cv, kw, co, cr, cs, da, dv, nl, dz, eo, et, ee, fo, fj, fi, fy, ff, ka, gd, ga, gl, gv, el, gn, gu, ht, ha, he, hz, hi, ho, hr, hu, ig, is, io, ii, iu, ie, ia, id, ik, it, jv, ja, kl, kn, ks, kr, kk, km, ki, rw, ky, kv, kg, ko, kj, ku, lo, la, lv, li, ln, lt, lb, lu, lg, mk, mh, ml, mi, mr, ms, mg, mt, mn, na, nv, nr, nd, ng, ne, nn, nb, no, ny, oc, oj, or, om, os, pa, fa, pi, pl, pt, ps, qu, rm, ro, rn, ru, sg, sa, si, sk, sl, se, sm, sn, sd, so, st, es, sc, sr, ss, su, sw, sv, ty, ta, tt, te, tg, tl, th, bo, ti, to, tn, ts, tk, tr, tw, ug, uk, ur, uz, ve, vi, vo, cy, wa, wo, xh, yi, yo, za, zu\";\n\nconst initialLocales = \"en, de, fr\";\n\nconst localeArray = [\n  ...initialLocales.split(\",\").map((locale) => locale.trim()),\n  ...locales.replace(/\\s/g, \"\").split(\",\"),\n];\n\nlocaleArray.forEach((locale) => {\n  LocaleCode[locale] = locale;\n});\n\nexport type LocaleCodes = keyof typeof LocaleCode;\n\nexport type RouteType = {\n  path: Path;\n  Component: FC<any>;\n  exact: boolean;\n};\n","import importRetry from './importRetry'\n\n// https://github.com/facebook/create-react-app/tree/master/packages/react-app-polyfill\n// importing IE9 would also include IE10/11 support\nimport 'react-app-polyfill/ie9';\n\n// https://babeljs.io/docs/en/babel-plugin-syntax-dynamic-import#working-with-webpack-and-babelpreset-env\nimport 'core-js/stable/array/iterator'\nimport 'core-js/stable/promise'\n\n// Object.entries()\ntypeof Object.entries !== typeof Function && importRetry(() => import('core-js/stable/object/entries'))\n\n// WeakMap\ntypeof WeakMap === 'undefined' && importRetry(() => import('core-js/stable/weak-map'))\n\n// Array.prototype.includes()\ntypeof Array.prototype.includes !== typeof Function && importRetry(() => import('core-js/stable/array/includes'))\n\n// globalThis\ntypeof globalThis === 'undefined' && importRetry(() => import('core-js/stable/global-this'))\n","export default async function importRetry(importFn, retries = 5, interval = 1000) {\n  try {\n    return await importFn()\n  } catch (error) {\n    if (retries) {\n      await wait(interval)\n      return importRetry(importFn, retries - 1, interval)\n    } else {\n      window.location = '/'\n    }\n  }\n}\n\nfunction wait(ms) {\n  return new Promise(resolve => setTimeout(resolve, ms))\n}\n","export enum Path {\n  Login = \"/\",\n  SelectItems = \"/items\",\n  ReturnType = \"/return-type\",\n  ExchangeVariant = \"/exchange-variant\",\n  CustomReturn = \"/custom-type\",\n  SelectQuantity = \"/quantity\",\n  ReturnReason = \"/reason\",\n  ReturnMethod = \"/method\",\n  MoreDetails = \"/more-details\",\n  ReturnOverview = \"/overview\",\n  // RefundInfo = \"/refund-info\",\n  RefundType = \"/refund-type\",\n  ReturnConfirmation = \"/confirmation\",\n  Payment = \"/payment\",\n  Error = \"/error\",\n  CollectionsList = \"/collections\",\n  CollectionDetails = \"/collection\",\n  ProductDetailsShop = \"/product\",\n}\n\n// Note: If the order ID has a hash prefix, it gets removed\n// As it currently causes issues with React Memory Router\n// We can potentially remove orderId and orderItemId from URL in future versions\n// If the plan is to continue using memory based routing\nexport const pathResolvers = {\n  Login: \"/\",\n  SelectItems: `/items`,\n  ReturnType: `/return-type`,\n  ExchangeVariant: `/exchange-variant`,\n  CustomReturn: `/custom-type`,\n  SelectQuantity: `/quantity`,\n  ReturnReason: `/reason`,\n  ReturnMethod: `/method`,\n  MoreDetails: `/more-details`,\n  ReturnOverview: `/overview`,\n  // RefundInfo: `/refund-info`,\n  RefundType: `/refund-type`,\n  ReturnConfirmation: `/confirmation`,\n  Payment: \"/payment\",\n  ColletionsList: \"/collections\",\n  CollectionDetails: \"/collection\",\n  ProductDetailsShop: \"/product\",\n};\n","import { identity } from \"lodash\";\nimport React, { createContext, FC, useContext, useMemo } from \"react\";\n\nimport { formatCurrency } from \"~/util/format\";\n\nexport type FormatContextType = {\n  formatInMerchantCurrency: (value: number | bigint) => string;\n};\n\nexport type FormatContextProviderProps = {\n  merchantCurrency: string;\n};\n\nexport const FormatContext = createContext<FormatContextType>({\n  formatInMerchantCurrency: identity,\n});\n\nexport const FormatContextProvider: FC<FormatContextProviderProps> = ({\n  children,\n  merchantCurrency,\n}) => {\n  const formatInMerchantCurrency = formatCurrency(merchantCurrency);\n  const value = useMemo(\n    () => ({\n      formatInMerchantCurrency,\n    }),\n    [formatInMerchantCurrency]\n  );\n  return (\n    <FormatContext.Provider value={value}>{children}</FormatContext.Provider>\n  );\n};\n\nexport const useFormatContext = () => useContext(FormatContext);\n","import React, { createContext, FC, useContext } from \"react\";\nimport { UseQueryResult } from \"react-query\";\n\nimport { useMerchantSettings } from \"~/hooks/useMerchantSettings/useMerchantSettings\";\nimport { MerchantSettingsResponse } from \"~/hooks/useMerchantSettings/useMerchantSettings.types\";\n\nexport type MerchantSettingsContextType = DeepPartial<\n  Omit<UseQueryResult, \"data\">\n> & {\n  data?: MerchantSettingsResponse;\n};\n\nexport const MerchantSettingsContext =\n  createContext<MerchantSettingsContextType>({});\n\nexport const MerchantSettingsContextProvider: FC = ({ children }) => {\n  const value = useMerchantSettings();\n  return (\n    <MerchantSettingsContext.Provider value={value}>\n      {children}\n    </MerchantSettingsContext.Provider>\n  );\n};\n\nexport const useMerchantSettingsContext = () =>\n  useContext(MerchantSettingsContext);\n","import { useCallback, useMemo, useState } from \"react\";\nimport { omit } from \"lodash\";\n\nimport { Product, ProductVariant } from \"~/common/types/product\";\nimport {\n  RefundType,\n  ReturnType,\n  ShopExchangeRefundType,\n  StoreCreditType,\n} from \"~/common/types/return\";\nimport { useSessionStorage } from \"../useSessionStorage/useSessionStorage\";\nimport { isNotNil } from \"~/util/isNotNil\";\n\nimport {\n  Cart,\n  InitiatedReturnItem,\n  ReturnReasonImageData,\n} from \"./useReturnState.types\";\nimport { calculateCartItemsCost } from \"./useReturnState.util\";\n\nexport const useReturnState = () => {\n  const [selectedItemId, setSelectedItemId] = useState(\"\");\n  const [selectedTradeInItemId, setSelectedTradeInItemId] = useState(-1);\n  const [selectedReturnQuantity, setSelectedReturnQuantity] = useState(1);\n  const [selectedReturnReasonId, setSelectedReturnReasonId] = useState(-1);\n  const [returnReasonImages, setReturnReasonImages] = useState<\n    ReturnReasonImageData[]\n  >([]);\n  const [returnReasonText, setReturnReasonText] = useState(\"\");\n  const [selectedReturnMethodId, setSelectedReturnMethodId] = useState(-1);\n  const [initiatedReturnItems, setInitiatedReturnItems] = useSessionStorage<\n    InitiatedReturnItem[]\n  >(\"initiatedReturnItems\", []);\n\n  const [selectedReturnType, setSelectedReturnType] =\n    useState<ReturnType>(null);\n\n  const [selectedExchangeVariant, setSelectedExchangeVariant] =\n    useState<DeepPartial<ProductVariant>>();\n\n  const [selectedRefundType, setSelectedRefundType] = useState<RefundType>(\n    RefundType.OriginalPaymentMethod\n  );\n\n  const [selectedShopExchangeRefundType, setSelectedShopExchangeRefundType] =\n    useState<ShopExchangeRefundType>(\n      ShopExchangeRefundType.OriginalPaymentMethod\n    );\n\n  const [selectedStoreCreditOption, setSelectedStoreCreditOption] =\n    useState<StoreCreditType>(null);\n\n  const [selectedCollectionId, setSelectedCollectionId] =\n    useState<string>(null);\n\n  const [selectedShoppingProductId, setSelectedShoppingProductId] =\n    useState<string>(null);\n\n  const [cart, setCart] = useState<Cart>({});\n\n  const addItemToCart = useCallback(\n    (\n      product: DeepPartial<Product>,\n      selectedProductVariant: DeepPartial<ProductVariant>\n    ) => {\n      const { id, title, price, image, isDefaultVariant, sku } =\n        selectedProductVariant;\n\n      setCart((prevCart) => {\n        const isItemAlreadyExists = isNotNil(prevCart[id]);\n        if (isItemAlreadyExists) {\n          const prevCartItem = prevCart[id];\n          const updatedCartItem = {\n            ...prevCartItem,\n            selectedQuantity: prevCartItem.selectedQuantity + 1,\n          };\n          return { ...prevCart, [id]: updatedCartItem };\n        }\n        return {\n          ...prevCart,\n          [id]: {\n            productId: product.globalId,\n            productTitle: product.title,\n            selectedQuantity: 1,\n            id,\n            title,\n            price,\n            image,\n            isDefaultVariant,\n            sku,\n          },\n        };\n      });\n    },\n    []\n  );\n\n  const removeItemFromCart = useCallback(\n    (selectedProductVariant: DeepPartial<ProductVariant>) => {\n      const { id } = selectedProductVariant;\n      setCart((prevCart) => omit(prevCart, [id]));\n    },\n    []\n  );\n\n  const changeItemQuantityInCart = useCallback(\n    (\n      selectedProductVariant: DeepPartial<ProductVariant>,\n      increment: 1 | -1\n    ) => {\n      const { id } = selectedProductVariant;\n      setCart((prevCart) => {\n        const prevCartItem = prevCart[id];\n        const updatedCartItem = {\n          ...prevCartItem,\n          selectedQuantity: prevCartItem.selectedQuantity + increment,\n        };\n        return { ...prevCart, [id]: updatedCartItem };\n      });\n    },\n    []\n  );\n\n  const resetSelectedReturnMethod = useCallback(() => {\n    setSelectedReturnMethodId(-1);\n  }, []);\n\n  const resetInAppShoppingState = useCallback(() => {\n    setCart({});\n    setSelectedShoppingProductId(null);\n    setSelectedCollectionId(null);\n  }, []);\n\n  const cartItems = useMemo(() => Object.values(cart), [cart]);\n\n  const cartItemsTotalCost = useMemo(\n    () => calculateCartItemsCost(cartItems),\n    [cartItems]\n  );\n\n  const addInitiatedReturnItem = useCallback(\n    (initiatedReturnItem: InitiatedReturnItem) => {\n      setInitiatedReturnItems((existingItems) => [\n        ...existingItems,\n        initiatedReturnItem,\n      ]);\n    },\n    []\n  );\n\n  const removeInitiatedReturnItem = useCallback(\n    (idToRemove: string | number) => {\n      setInitiatedReturnItems((existingItems) =>\n        existingItems.filter(\n          ({ orderItemId, tradeInItem: { id: tradeInItemId } = {} }) => {\n            if (orderItemId) {\n              return orderItemId !== idToRemove;\n            } else if (tradeInItemId) {\n              return tradeInItemId !== idToRemove;\n            }\n\n            return false;\n          }\n        )\n      );\n    },\n    []\n  );\n\n  const resetCurrentItemReturnState = useCallback(() => {\n    setSelectedItemId(\"\");\n    setSelectedReturnQuantity(1);\n    setSelectedReturnReasonId(-1);\n    setReturnReasonText(\"\");\n    setReturnReasonImages([]);\n    setSelectedReturnMethodId(-1);\n    setSelectedReturnType(null);\n    setSelectedExchangeVariant(null);\n    setSelectedStoreCreditOption(null);\n  }, []);\n\n  const resetReturnState = useCallback(() => {\n    resetCurrentItemReturnState();\n    setInitiatedReturnItems([]);\n    setSelectedRefundType(RefundType.OriginalPaymentMethod);\n    setSelectedShopExchangeRefundType(\n      ShopExchangeRefundType.OriginalPaymentMethod\n    );\n  }, []);\n\n  return {\n    selectedItemId,\n    setSelectedItemId,\n    selectedTradeInItemId,\n    setSelectedTradeInItemId,\n    selectedReturnQuantity,\n    setSelectedReturnQuantity,\n    selectedReturnMethodId,\n    setSelectedReturnMethodId,\n    initiatedReturnItems,\n    addInitiatedReturnItem,\n    removeInitiatedReturnItem,\n    selectedReturnReasonId,\n    setSelectedReturnReasonId,\n    returnReasonImages,\n    setReturnReasonImages,\n    returnReasonText,\n    setReturnReasonText,\n    selectedReturnType,\n    setSelectedReturnType,\n    selectedExchangeVariant,\n    setSelectedExchangeVariant,\n    selectedRefundType,\n    setSelectedRefundType,\n    selectedShopExchangeRefundType,\n    setSelectedShopExchangeRefundType,\n    resetReturnState,\n    resetCurrentItemReturnState,\n    selectedStoreCreditOption,\n    setSelectedStoreCreditOption,\n    selectedCollectionId,\n    setSelectedCollectionId,\n    selectedShoppingProductId,\n    setSelectedShoppingProductId,\n    cartItems,\n    cartItemsTotalCost,\n    addItemToCart,\n    removeItemFromCart,\n    changeItemQuantityInCart,\n    resetInAppShoppingState,\n    resetSelectedReturnMethod,\n  };\n};\n","import React, {\n  createContext,\n  Dispatch,\n  FC,\n  SetStateAction,\n  useContext,\n} from \"react\";\n\nimport { Product, ProductVariant } from \"~/common/types/product\";\nimport {\n  RefundType,\n  ReturnType,\n  ShopExchangeRefundType,\n  StoreCreditType,\n} from \"~/common/types/return\";\nimport { useReturnState } from \"~/hooks/useReturnState/useReturnState\";\nimport {\n  CartItem,\n  InitiatedReturnItem,\n  ReturnReasonImageData,\n} from \"~/hooks/useReturnState/useReturnState.types\";\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type ReturnContextType = {\n  selectedItemId: string;\n  setSelectedItemId: (selectedItemId: string) => void;\n  selectedReturnQuantity: number;\n  setSelectedReturnQuantity: (quantity: number) => void;\n  selectedReturnMethodId: number;\n  setSelectedReturnMethodId: (returnMethodId: number) => void;\n  initiatedReturnItems: InitiatedReturnItem[];\n  addInitiatedReturnItem: (initiatedReturnItem: InitiatedReturnItem) => void;\n  removeInitiatedReturnItem: (orderItemId: string | number) => void;\n  selectedReturnReasonId: number;\n  setSelectedReturnReasonId: (reasonId: number) => void;\n  returnReasonImages: ReturnReasonImageData[];\n  setReturnReasonImages: Dispatch<SetStateAction<ReturnReasonImageData[]>>;\n  returnReasonText: string;\n  setReturnReasonText: (returnReasonText: string) => void;\n  resetReturnState: () => void;\n  resetCurrentItemReturnState: () => void;\n  selectedReturnType: ReturnType;\n  setSelectedReturnType: (returnType: ReturnType) => void;\n  selectedExchangeVariant: DeepPartial<ProductVariant>;\n  setSelectedExchangeVariant: (\n    selectedExchangeVariant: DeepPartial<ProductVariant>\n  ) => void;\n  selectedRefundType: RefundType;\n  setSelectedRefundType: (refundType: RefundType) => void;\n  selectedShopExchangeRefundType: ShopExchangeRefundType;\n  setSelectedShopExchangeRefundType: (\n    shopExchangeRefundType: ShopExchangeRefundType\n  ) => void;\n  selectedTradeInItemId: number;\n  setSelectedTradeInItemId: (selectedTradeInItemId: number) => void;\n  selectedStoreCreditOption: StoreCreditType;\n  setSelectedStoreCreditOption: (storeCreditOption: StoreCreditType) => void;\n  selectedCollectionId: string;\n  setSelectedCollectionId: (selectedCollectionId: string) => void;\n  selectedShoppingProductId: string;\n  setSelectedShoppingProductId: (selectedShoppingProductId: string) => void;\n  cartItems: CartItem[];\n  removeItemFromCart: (\n    selectedProductVariant: DeepPartial<ProductVariant>\n  ) => void;\n  addItemToCart: (\n    product: DeepPartial<Product>,\n    selectedProductVariant: DeepPartial<ProductVariant>\n  ) => void;\n  changeItemQuantityInCart: (\n    selectedProductVariant: DeepPartial<ProductVariant>,\n    increment: 1 | -1\n  ) => void;\n  cartItemsTotalCost: number;\n  resetInAppShoppingState: () => void;\n  resetSelectedReturnMethod: () => void;\n};\n\nexport const ReturnContext = createContext<ReturnContextType>({\n  selectedItemId: \"\",\n  setSelectedItemId: emptyCallback,\n  selectedReturnQuantity: 1,\n  setSelectedReturnQuantity: emptyCallback,\n  selectedReturnMethodId: -1,\n  setSelectedReturnMethodId: emptyCallback,\n  initiatedReturnItems: [],\n  addInitiatedReturnItem: emptyCallback,\n  removeInitiatedReturnItem: emptyCallback,\n  selectedReturnReasonId: -1,\n  setSelectedReturnReasonId: emptyCallback,\n  returnReasonImages: [],\n  setReturnReasonImages: emptyCallback,\n  returnReasonText: \"\",\n  setReturnReasonText: emptyCallback,\n  resetReturnState: emptyCallback,\n  resetCurrentItemReturnState: emptyCallback,\n  selectedReturnType: null,\n  setSelectedReturnType: emptyCallback,\n  selectedExchangeVariant: null,\n  setSelectedExchangeVariant: emptyCallback,\n  selectedRefundType: null,\n  setSelectedRefundType: emptyCallback,\n  selectedShopExchangeRefundType: null,\n  setSelectedShopExchangeRefundType: emptyCallback,\n  selectedTradeInItemId: -1,\n  setSelectedTradeInItemId: emptyCallback,\n  selectedStoreCreditOption: null,\n  setSelectedStoreCreditOption: emptyCallback,\n  selectedCollectionId: null,\n  setSelectedCollectionId: emptyCallback,\n  selectedShoppingProductId: null,\n  setSelectedShoppingProductId: emptyCallback,\n  addItemToCart: emptyCallback,\n  removeItemFromCart: emptyCallback,\n  cartItems: [],\n  changeItemQuantityInCart: emptyCallback,\n  cartItemsTotalCost: 0,\n  resetInAppShoppingState: emptyCallback,\n  resetSelectedReturnMethod: emptyCallback,\n});\n\nexport const ReturnContextProvider: FC = ({ children }) => {\n  const value = useReturnState();\n  return (\n    <ReturnContext.Provider value={value}>{children}</ReturnContext.Provider>\n  );\n};\n\nexport const useReturnContext = () => useContext(ReturnContext);\n","import { CartItem } from \"./useReturnState.types\";\n\nexport const calculateCartItemsCost = (cartItems: CartItem[]) => {\n  return cartItems.reduce((total, item) => {\n    return total + item.price * item.selectedQuantity;\n  }, 0);\n};\n","import { useSessionStorage } from \"~/hooks/useSessionStorage/useSessionStorage\";\n\nexport const useLoginState = () => {\n  const [orderId, setOrderId] = useSessionStorage(\"orderId\", \"\");\n  const [customerEmail, setCustomerEmail] = useSessionStorage(\n    \"customerEmail\",\n    \"\"\n  );\n  const isDisableCTA = orderId === \"\" || customerEmail === \"\";\n  const resetLoginState = () => {\n    setOrderId(\"\");\n    setCustomerEmail(\"\");\n  };\n  return {\n    orderId,\n    customerEmail,\n    setOrderId,\n    setCustomerEmail,\n    isDisableCTA,\n    resetLoginState,\n  };\n};\n","import React, { createContext, FC, useContext } from \"react\";\n\nimport { useLoginState } from \"~/components/Login/hooks/useLoginState/useLoginState\";\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type LoginStateContextType = {\n  orderId: string;\n  setOrderId: (orderId: string) => void;\n  customerEmail: string;\n  setCustomerEmail: (customerEmail: string) => void;\n  resetLoginState: () => void;\n  isDisableCTA: boolean;\n};\n\nexport const LoginStateContext = createContext<LoginStateContextType>({\n  orderId: \"\",\n  setOrderId: emptyCallback,\n  customerEmail: \"\",\n  setCustomerEmail: emptyCallback,\n  resetLoginState: emptyCallback,\n  isDisableCTA: false,\n});\n\nexport const LoginStateContextProvider: FC = ({ children }) => {\n  const value = useLoginState();\n  return (\n    <LoginStateContext.Provider value={value}>\n      {children}\n    </LoginStateContext.Provider>\n  );\n};\n\nexport const useLoginStateContext = () => useContext(LoginStateContext);\n","import { isEmpty, negate } from \"lodash\";\n\nexport const isNotEmpty = negate(isEmpty);\n","import React, { useContext, createContext, FC } from \"react\";\n\nexport type ThemeContextType = {\n  logoUrl?: string;\n  primaryColor?: string;\n  secondaryColor?: string;\n};\n\nexport const ThemeContext = createContext<ThemeContextType>({});\n\nexport type ThemeContextProviderProps = {\n  theme: ThemeContextType;\n};\n\nexport const ThemeContextProvider: FC<ThemeContextProviderProps> = ({\n  theme,\n  children,\n}) => {\n  return (\n    <ThemeContext.Provider value={theme}>{children}</ThemeContext.Provider>\n  );\n};\n\nexport const useThemeContext = () => useContext(ThemeContext);\n","import { isNotEmpty } from \"./isNotEmpty\";\n\nexport const transformCommaSeparatedStringToArray = (str: string) =>\n  str\n    .split(\",\")\n    .filter(isNotEmpty)\n    .map((item) => item.trim());\n","import { useMemo } from \"react\";\nimport { useMutation } from \"react-query\";\n\nimport { fetchReturnMethods } from \"~/api\";\nimport { FetchReturnMethodsVariables } from \"~/common/types/api\";\n\nimport { ReturnMethodsResponseRaw } from \"./useReturnMethods.types\";\nimport { transformReturnMethodsResponse } from \"./useReturnMethods.util\";\n\nexport type UseReturnMethodsProps = {\n  variables: FetchReturnMethodsVariables;\n};\n\nexport const useReturnMethods = () => {\n  const {\n    data: response,\n    mutate,\n    ...restProps\n  } = useMutation<ReturnMethodsResponseRaw, Error, FetchReturnMethodsVariables>(\n    \"returnMethodsMutation\",\n    fetchReturnMethods\n  );\n  const data = useMemo(\n    () => transformReturnMethodsResponse(response),\n    [response]\n  );\n  return {\n    data,\n    fetchReturnMethods: mutate,\n    ...restProps,\n  };\n};\n","import React, { createContext, FC, useContext } from \"react\";\nimport { UseMutateFunction } from \"react-query\";\n\nimport { FetchReturnMethodsVariables } from \"~/common/types/api\";\nimport { useReturnMethods } from \"~/hooks/useReturnMethods/useReturnMethods\";\nimport {\n  ReturnMethodsResponse,\n  ReturnMethodsResponseRaw,\n} from \"~/hooks/useReturnMethods/useReturnMethods.types\";\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type ReturnMethodsContextType = {\n  fetchReturnMethods: UseMutateFunction<\n    ReturnMethodsResponseRaw,\n    Error,\n    FetchReturnMethodsVariables\n  >;\n  isError: boolean;\n  isLoading: boolean;\n  data: ReturnMethodsResponse;\n};\n\nexport const ReturnMethodsContext = createContext<ReturnMethodsContextType>({\n  fetchReturnMethods: emptyCallback,\n  isError: false,\n  isLoading: false,\n  data: null,\n});\n\nexport const ReturnMethodsContextProvider: FC = ({ children }) => {\n  const value = useReturnMethods();\n  return (\n    <ReturnMethodsContext.Provider value={value}>\n      {children}\n    </ReturnMethodsContext.Provider>\n  );\n};\n\nexport const useReturnMethodsContext = () => useContext(ReturnMethodsContext);\n","import { flatten, sum, uniq } from \"lodash\";\n\nimport { FetchReturnMethodsVariables } from \"~/common/types/api\";\nimport { Order, OrderItem } from \"~/common/types/order\";\nimport { getRefundInitiatedReturnItems } from \"~/components/ReturnOverview/index.util\";\nimport { getCountryLabel } from \"~/util/getCountryLabel\";\nimport { isNotNil } from \"~/util/isNotNil\";\nimport { InitiatedReturnItem } from \"../useReturnState/useReturnState.types\";\nimport { RefundType, ReturnType, StoreCreditType } from \"~/common/types/return\";\n\nimport {\n  ReturnMethodsResponse,\n  ReturnMethodsResponseRaw,\n} from \"./useReturnMethods.types\";\n\nexport const transformReturnMethodsResponse = (\n  responseData: ReturnMethodsResponseRaw\n): ReturnMethodsResponse => {\n  if (responseData) {\n    const returnMethods = responseData.settings?.merchant_return_methods ?? [];\n    const ruleToken = responseData.settings?.rule_token;\n    const {\n      name2,\n      name,\n      street,\n      street_number,\n      zip,\n      city,\n      state,\n      country_iso2,\n    } = responseData.settings?.return_address ?? {};\n    return {\n      returnMethods: returnMethods.map(\n        ({\n          id,\n          cost,\n          image_url,\n          return_method_carrier,\n          return_method_name,\n          name_map,\n          description_map,\n          cost_message_map,\n        }) => ({\n          id,\n          cost: parseFloat(cost),\n          imageUrl: image_url,\n          returnMethodCarrier: return_method_carrier,\n          returnMethodName: return_method_name,\n          nameMap: name_map,\n          descriptionMap: description_map,\n          costMessageMap: cost_message_map,\n        })\n      ),\n      ruleToken,\n      returnAddress: {\n        name,\n        name2,\n        city,\n        state,\n        zip: zip,\n        countryCode: country_iso2,\n        street,\n        streetNumber: street_number,\n      },\n    };\n  }\n  return {\n    returnMethods: [],\n    ruleToken: null,\n    returnAddress: {},\n  };\n};\n\nexport const getFetchReturnMethodsVariables = (\n  order: Order,\n  orderItems: OrderItem[],\n  returnItems: InitiatedReturnItem[],\n  selectedRefundType: RefundType,\n  selectedStoreCreditOption: StoreCreditType\n): FetchReturnMethodsVariables => {\n  return {\n    customerCountry:\n      getCountryLabel(order.customer.address.countryCode) ||\n      order.customer.address.countryCode,\n    customerTags: order.customer.tags,\n    customerEmail: order.customer.email,\n    orderAmount: order.amount,\n    orderTags: order.orderTags,\n    orderDate: order.shippingDate || order.orderDate,\n    paymentMethods: order.paymentMethods,\n    numberOfItemsToReturn: returnItems.reduce(\n      (sum, returnItem) => sum + returnItem.returnQuantity,\n      0\n    ),\n    returnReasonIds: returnItems.map(({ returnReasonId }) => returnReasonId),\n    returnType: getReturnTypes(\n      returnItems,\n      selectedRefundType,\n      selectedStoreCreditOption\n    ),\n    refundTotalValue: getRefundTotalValue(orderItems, returnItems),\n    returnTags: getReturnTags(orderItems, returnItems),\n    returnItemsCustomData: getReturnItemsCustomData(orderItems, returnItems),\n    noOfRegisteredReturns: order.noOfRegisteredReturns,\n    orderId: order.id,\n  };\n};\n\n// Note: Currently when calculating the return amount, we only consider items of return type Refund\n// For exchange items, currently what happens: neither the customer nor the merchant has to pay price difference\n// This logic will change later with the introduction of store credit & payments feature\nexport const getRefundTotalValue = (\n  orderItems: OrderItem[] = [],\n  returnItems: InitiatedReturnItem[]\n) => {\n  const amounts = getRefundInitiatedReturnItems(returnItems).map(\n    ({ orderItemId, returnQuantity = 1 }) => {\n      const orderItem = orderItems.find(({ id }) => id === orderItemId) ?? {};\n      return (orderItem.price ?? 0) * returnQuantity;\n    }\n  );\n  return sum(amounts);\n};\n\nexport const getReturnTags = (\n  orderItems: OrderItem[] = [],\n  returnItems: InitiatedReturnItem[]\n): string[] => {\n  const tags = returnItems.map(({ orderItemId }) => {\n    const orderItem = orderItems.find(({ id }) => id === orderItemId) ?? {};\n    return orderItem.categories;\n  });\n  // TODO: Should we also filter duplicate items?\n  return flatten(tags).filter(isNotNil);\n};\n\nexport const getReturnItemsCustomData = (\n  orderItems: OrderItem[],\n  returnItems: InitiatedReturnItem[]\n): string[] => {\n  return returnItems.map(({ orderItemId }) => {\n    const orderItem = orderItems.find(({ id }) => id === orderItemId) ?? {};\n    return orderItem.productCustomData;\n  });\n};\n\nexport const getReturnTypes = (\n  returnItems: InitiatedReturnItem[],\n  selectedRefundType: RefundType,\n  selectedStoreCreditOption: StoreCreditType\n): string => {\n  return uniq(\n    returnItems\n      .map(({ returnType }) => returnType)\n      .filter(uniq)\n      .map((returnType) => {\n        if (returnType.valueOf() === ReturnType.Refund) {\n          if (selectedRefundType === RefundType.StoreCredit) {\n            return selectedStoreCreditOption;\n          } else if (selectedRefundType === RefundType.ShopExchange) {\n            return selectedRefundType.valueOf();\n          }\n        }\n        return returnType.valueOf();\n      })\n  ).join(\",\");\n};\n","import { RefundShippingCostPolicy, RefundType, ReturnType } from \"~/common/types/return\";\nimport { InitiatedReturnItem } from \"~/hooks/useReturnState/useReturnState.types\";\n\nexport const getIsIncludeOriginalShippingCostInRefund = (\n  refundShippingCostPolicy: RefundShippingCostPolicy,\n  orderItemsQuantity: number,\n  registeredItemsQuantity: number,\n  initiatedItems: InitiatedReturnItem[],\n  refundType: RefundType\n): boolean => {\n  if (refundShippingCostPolicy === RefundShippingCostPolicy.Refund) {\n    return true;\n  }\n  if (refundShippingCostPolicy === RefundShippingCostPolicy.NoRefund) {\n    return false;\n  }\n\n  // Check if any ineligible items exist\n  const hasIneligibleItems = initiatedItems.some(item =>\n      [ReturnType.Refund, ReturnType.Exchange].includes(item.returnType) && refundType === RefundType.ShopExchange\n  );\n\n  // If ineligible items exist, no refund on shipping\n  if (hasIneligibleItems) {\n    return false;\n  }\n  const initiatedItemsQuantity = initiatedItems.reduce(\n    (acc, curr) => acc + curr.returnQuantity,\n    0\n  );\n  return (\n    initiatedItemsQuantity + registeredItemsQuantity === orderItemsQuantity\n  );\n};\n\nexport const getRefundInitiatedReturnItems = (\n  initiatedItems: InitiatedReturnItem[]\n) =>\n  initiatedItems.filter(({ returnType }) => returnType === ReturnType.Refund);\n","import React, { createContext, FC, useContext, useState } from \"react\";\n\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type CollectionsNavigationVisibilityContextType = {\n  setIsVisible: React.Dispatch<React.SetStateAction<boolean>>;\n  isVisible: boolean;\n};\n\nexport const CollectionsNavigationVisibilityContext =\n  createContext<CollectionsNavigationVisibilityContextType>({\n    setIsVisible: emptyCallback,\n    isVisible: false,\n  });\n\nexport const CollectionsNavigationVisibilityContextProvider: FC = ({\n  children,\n}) => {\n  const [isVisible, setIsVisible] = useState(false);\n  return (\n    <CollectionsNavigationVisibilityContext.Provider\n      value={{\n        isVisible,\n        setIsVisible,\n      }}\n    >\n      {children}\n    </CollectionsNavigationVisibilityContext.Provider>\n  );\n};\n\nexport const useCollectionsNavigationVisibilityContext = () =>\n  useContext(CollectionsNavigationVisibilityContext);\n","import React, { createContext, FC, useContext, useState } from \"react\";\n\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type CartVisibilityContextType = {\n  setIsCartVisible: React.Dispatch<React.SetStateAction<boolean>>;\n  isCartVisible: boolean;\n};\n\nexport const CartVisibilityContext = createContext<CartVisibilityContextType>({\n  setIsCartVisible: emptyCallback,\n  isCartVisible: false,\n});\n\nexport const CartVisibilityContextProvider: FC = ({ children }) => {\n  const [isCartVisible, setIsCartVisible] = useState(false);\n  return (\n    <CartVisibilityContext.Provider\n      value={{\n        isCartVisible,\n        setIsCartVisible,\n      }}\n    >\n      {children}\n    </CartVisibilityContext.Provider>\n  );\n};\n\nexport const useCartVisibilityContext = () => useContext(CartVisibilityContext);\n","import { useState } from \"react\";\n\nimport { CustomerName } from \"~/common/types/customer\";\nimport { Address } from \"~/common/types/return\";\n\nexport const useUpdateCustomerData = () => {\n  const [customerAddress, setCustomerAddress] = useState<Partial<Address>>({});\n  const [customerName, setCustomerName] = useState<CustomerName>({\n    firstName: \"\",\n    lastName: \"\",\n  });\n  const [customerEmail, setCustomerEmail] = useState<string>(\"\");\n  return {\n    customerEmail,\n    setCustomerEmail,\n    customerName,\n    setCustomerName,\n    customerAddress,\n    setCustomerAddress,\n  };\n};\n","import React, { createContext, FC, useContext } from \"react\";\n\nimport { CustomerName } from \"~/common/types/customer\";\nimport { Address } from \"~/common/types/return\";\nimport { useUpdateCustomerData } from \"~/hooks/useUpdateCustomerData/useUpdateCustomerData\";\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type CustomerDataContextType = {\n  customerEmail: string;\n  setCustomerEmail: (customerEmail: string) => void;\n  customerName: CustomerName;\n  setCustomerName: (customerName: CustomerName) => void;\n  customerAddress: Partial<Address>;\n  setCustomerAddress: (customerAddress: Partial<Address>) => void;\n};\n\nexport const CustomerDataContext = createContext<CustomerDataContextType>({\n  customerEmail: \"\",\n  setCustomerEmail: emptyCallback,\n  customerName: {\n    firstName: \"\",\n    lastName: \"\",\n  },\n  setCustomerName: emptyCallback,\n  customerAddress: {},\n  setCustomerAddress: emptyCallback,\n});\n\nexport const CustomerDataContextProvider: FC = ({ children }) => {\n  const value = useUpdateCustomerData();\n  return (\n    <CustomerDataContext.Provider value={value}>\n      {children}\n    </CustomerDataContext.Provider>\n  );\n};\n\nexport const useCustomerDataContext = () => useContext(CustomerDataContext);\n","import React, { createContext, FC, useContext } from \"react\";\nimport { UseMutateFunction } from \"react-query\";\n\nimport { ConfirmReturnVariables } from \"~/common/types/api\";\nimport { useConfirmReturn } from \"~/hooks/useConfirmReturn/useConfirmReturn\";\nimport {\n  ConfirmReturnResponse,\n  ConfirmReturnResponseRaw,\n} from \"~/hooks/useConfirmReturn/useConfirmReturn.types\";\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type ConfirmReturnContextType = {\n  confirmReturn: UseMutateFunction<\n    ConfirmReturnResponseRaw,\n    Error,\n    ConfirmReturnVariables,\n    unknown\n  >;\n  data: DeepPartial<ConfirmReturnResponse>;\n  isError: boolean;\n  isLoading: boolean;\n};\n\nexport const ConfirmReturnContext = createContext<ConfirmReturnContextType>({\n  confirmReturn: emptyCallback,\n  data: {},\n  isError: false,\n  isLoading: false,\n});\n\nexport const ConfirmReturnContextProvider: FC = ({ children }) => {\n  const value = useConfirmReturn();\n  return (\n    <ConfirmReturnContext.Provider value={value}>\n      {children}\n    </ConfirmReturnContext.Provider>\n  );\n};\n\nexport const useConfirmReturnContext = () => useContext(ConfirmReturnContext);\n","import { useMemo } from \"react\";\nimport { useMutation } from \"react-query\";\n\nimport { confirmReturn } from \"~/api\";\n\nimport { transformConfirmReturnResponse } from \"./useConfirmReturn.util\";\n\nexport const useConfirmReturn = () => {\n  const {\n    mutate,\n    data: response,\n    isError,\n    isLoading,\n  } = useMutation(\"confirmReturnMutation\", confirmReturn);\n  const data = useMemo(\n    () => transformConfirmReturnResponse(response),\n    [response]\n  );\n  return {\n    confirmReturn: mutate,\n    data,\n    isError,\n    isLoading,\n  };\n};\n","import {\n  ConfirmReturnResponse,\n  ConfirmReturnResponseRaw,\n} from \"./useConfirmReturn.types\";\n\nexport const transformConfirmReturnResponse = (\n  responseData: ConfirmReturnResponseRaw\n): ConfirmReturnResponse => {\n  if (responseData?.refund) {\n    const {\n      refund: { customer_return_id, shipment: shipments = [] },\n    } = responseData;\n\n    return {\n      customerReturnId: customer_return_id,\n      shipments: shipments.map(\n        ({\n          created_at,\n          dhl_pickup_confirmation_number,\n          id,\n          label_url,\n          price,\n          shipping_company,\n          shipping_method,\n          status,\n          tracking_number,\n          updated_at,\n        }) => ({\n          id,\n          price,\n          status,\n          labelUrl: label_url,\n          createdAt: created_at,\n          updatedAt: updated_at,\n          DHLPickupConfirmationNumber: dhl_pickup_confirmation_number,\n          shippingCompany: shipping_company,\n          shippingMethod: shipping_method,\n          trackingNumber: tracking_number,\n        })\n      ),\n    };\n  }\n  return {\n    customerReturnId: 0,\n    shipments: [],\n  };\n};\n","import React, { createContext, FC, useContext } from \"react\";\nimport { UseMutateFunction } from \"react-query\";\n\nimport { CreateShipmentVariables } from \"~/common/types/api\";\nimport { useCreateShipment } from \"~/hooks/useCreateShipment/useCreateShipment\";\nimport {\n  CreateShipmentResponse,\n  CreateShipmentResponseRaw,\n} from \"~/hooks/useCreateShipment/useCreateShipment.types\";\nimport { emptyCallback } from \"~/util/emptyCallback\";\n\nexport type ShipmentContextType = {\n  createShipment: UseMutateFunction<\n    CreateShipmentResponseRaw,\n    Error,\n    CreateShipmentVariables\n  >;\n  isError: boolean;\n  isLoading: boolean;\n  data: CreateShipmentResponse;\n};\n\nexport const ShipmentContext = createContext<ShipmentContextType>({\n  createShipment: emptyCallback,\n  isError: false,\n  isLoading: false,\n  data: null,\n});\n\nexport const ShipmentContextProvider: FC = ({ children }) => {\n  const value = useCreateShipment();\n  return (\n    <ShipmentContext.Provider value={value}>\n      {children}\n    </ShipmentContext.Provider>\n  );\n};\n\nexport const useShipmentContext = () => useContext(ShipmentContext);\n","import { useMemo } from \"react\";\nimport { useMutation } from \"react-query\";\n\nimport { createShipment } from \"~/api\";\n\nimport { transformCreateShipmentResponse } from \"./useCreateShipment.util\";\n\nexport const useCreateShipment = () => {\n  const {\n    mutate,\n    data: response,\n    isError,\n    isLoading,\n  } = useMutation(\"createShipmentMutation\", createShipment);\n  const data = useMemo(\n    () => transformCreateShipmentResponse(response),\n    [response]\n  );\n  return {\n    createShipment: mutate,\n    data,\n    isError,\n    isLoading,\n  };\n};\n","import {\n  CreateShipmentResponse,\n  CreateShipmentResponseRaw,\n} from \"./useCreateShipment.types\";\n\nexport const transformCreateShipmentResponse = (\n  responseData: CreateShipmentResponseRaw\n): CreateShipmentResponse => {\n  return {\n    shipments: responseData?.json?.map(({\n      carrier_tracking_no,\n      dhl_pickup_confirmation_number,\n      id,\n      label_url,\n      price,\n      qrcode_url,\n    }) => ({\n      id,\n      labelUrl: label_url,\n      carrierTrackingNo: carrier_tracking_no,\n      price,\n      QRCodeUrl: qrcode_url,\n      DHLPickupConfirmationNumber: dhl_pickup_confirmation_number,\n    })) ?? [],\n  };\n};\n","import React from \"react\";\n\nimport \"./FallbackSpinner.scss\";\n\nexport const FallbackSpinner = () => {\n  return (\n    <div className=\"fallback-spinner vh-100\">\n      <div className=\"loading\">\n        <div className=\"effect-1 effects\"></div>\n        <div className=\"effect-2 effects\"></div>\n        <div className=\"effect-3 effects\"></div>\n      </div>\n    </div>\n  );\n};\n","import React, { FC } from \"react\";\nimport {\n  PayPalScriptProvider,\n  ScriptProviderProps,\n} from \"@paypal/react-paypal-js\";\nimport { isNil } from \"lodash\";\n\nimport { useMerchantSettings } from \"~/hooks/useMerchantSettings/useMerchantSettings\";\nimport { useLanguageContext } from \"~/context/LanguageContext/LanguageContext\";\nimport { LocaleCodes } from \"~/common/types/common\";\n\nimport { getPayPalClientIdFromRootDocument } from \"./PayPalProvider.util\";\n\nexport const getPayPalScriptProviderOptions = (\n  language: LocaleCodes,\n  clientId: string,\n  merchantCurrency: string\n): ScriptProviderProps[\"options\"] => {\n  const localeMap = {\n    en: \"en_US\",\n    de: \"de_DE\",\n    fr: \"fr_FR\",\n  };\n\n  const locale = localeMap[language];\n\n  return {\n    \"client-id\": clientId,\n    currency: merchantCurrency,\n    locale,\n    intent: \"authorize\",\n    components: \"buttons\",\n  };\n};\n\nexport const PayPalProvider: FC = ({ children }) => {\n  const { language } = useLanguageContext();\n\n  const PAYPAL_CLIENT_ID = getPayPalClientIdFromRootDocument();\n\n  const {\n    data: {\n      merchant: { currency },\n    },\n  } = useMerchantSettings();\n\n  // Only attempt to render the PayPalScriptProvider\n  // If the PayPal client ID exists (which means this merchant has set-up PayPal integration)\n  if (isNil(PAYPAL_CLIENT_ID)) {\n    return <>{children}</>;\n  }\n\n  const options = getPayPalScriptProviderOptions(\n    language,\n    PAYPAL_CLIENT_ID,\n    currency\n  );\n\n  return (\n    <PayPalScriptProvider options={options}>{children}</PayPalScriptProvider>\n  );\n};\n","export const getPayPalClientIdFromRootDocument = () => {\n  const root = document.getElementById(\"root\");\n  return root?.dataset[\"paypalClientId\"];\n};\n"],"sourceRoot":""}