@dropins/storefront-account 4.0.0-beta.0 → 4.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sources":["/@dropins/storefront-account/src/api/initialize/initialize.ts","/@dropins/storefront-account/src/api/fetch-graphql/fetch-graphql.ts","/@dropins/storefront-account/src/api/getAttributesForm/graphql/getAttributesForm.graphql.ts","/@dropins/storefront-account/src/lib/network-error.ts","/@dropins/storefront-account/src/lib/fetch-error.ts","/@dropins/storefront-account/src/lib/convertCase.ts","/@dropins/storefront-account/src/data/transforms/transform-attributes-form.ts","/@dropins/storefront-account/src/data/transforms/transform-customer-address.ts","/@dropins/storefront-account/src/data/transforms/transform-customer.ts","/@dropins/storefront-account/src/data/transforms/transform-countries.ts","/@dropins/storefront-account/src/data/transforms/transform-regions.ts","/@dropins/storefront-account/src/lib/formatDateToLocale.ts","/@dropins/storefront-account/src/lib/formatTimeToLocale.ts","/@dropins/storefront-account/src/data/transforms/transform-order-history-list.ts","/@dropins/storefront-account/src/data/transforms/transform-store-config.ts","/@dropins/storefront-account/src/data/transforms/transform-account.ts","/@dropins/storefront-account/src/data/transforms/transform-stored-payment-tokens.ts","/@dropins/storefront-account/src/data/transforms/transform-admin-assistance-actions.ts","/@dropins/storefront-account/src/api/getAttributesForm/getAttributesForm.ts","/@dropins/storefront-account/src/api/createCustomerAddress/graphql/createCustomerAddress.graphql.ts","/@dropins/storefront-account/src/api/createCustomerAddress/createCustomerAddress.ts","/@dropins/storefront-account/src/api/getCustomerAddress/graphql/getCustomerAddress.graphql.ts","/@dropins/storefront-account/src/api/getCustomerAddress/getCustomerAddress.ts","/@dropins/storefront-account/src/api/getCountries/graphql/getCountries.graphql.ts","/@dropins/storefront-account/src/api/getCountries/getCountries.ts","/@dropins/storefront-account/src/api/getRegions/graphql/getRegions.graphql.ts","/@dropins/storefront-account/src/api/getRegions/getRegions.ts","/@dropins/storefront-account/src/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.ts","/@dropins/storefront-account/src/api/updateCustomerAddress/updateCustomerAddress.ts","/@dropins/storefront-account/src/api/graphql/CustomerFragment.graphql.ts","/@dropins/storefront-account/src/api/getCustomer/graphql/getCustomer.graphql.ts","/@dropins/storefront-account/src/api/getCustomer/getCustomer.ts","/@dropins/storefront-account/src/api/getAdminAssistanceActions/graphql/getAdminAssistanceActions.graphql.ts","/@dropins/storefront-account/src/api/getAdminAssistanceActions/getAdminAssistanceActions.ts","/@dropins/storefront-account/src/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.ts","/@dropins/storefront-account/src/api/removeCustomerAddress/removeCustomerAddress.ts","/@dropins/storefront-account/src/api/getCustomerPaymentTokens/graphql/getCustomerPaymentTokens.graphql.ts","/@dropins/storefront-account/src/api/getCustomerPaymentTokens/getCustomerPaymentTokens.ts","/@dropins/storefront-account/src/api/deletePaymentToken/graphql/deletePaymentToken.graphql.ts","/@dropins/storefront-account/src/api/deletePaymentToken/deletePaymentToken.ts","/@dropins/storefront-account/src/api/graphql/CustomerAddressFragment.graphql.ts","/@dropins/storefront-account/src/api/graphql/OrderSummaryFragment.graphql.ts","/@dropins/storefront-account/src/api/graphql/CustomerOrderFragment.graphql.ts","/@dropins/storefront-account/src/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.ts","/@dropins/storefront-account/src/api/getOrderHistoryList/getOrderHistoryList.ts","/@dropins/storefront-account/src/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.ts","/@dropins/storefront-account/src/api/updateCustomerPassword/updateCustomerPassword.ts","/@dropins/storefront-account/src/api/getStoreConfig/graphql/getStoreConfig.graphql.ts","/@dropins/storefront-account/src/api/getStoreConfig/getStoreConfig.ts","/@dropins/storefront-account/src/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.ts","/@dropins/storefront-account/src/api/updateCustomerEmail/updateCustomerEmail.ts","/@dropins/storefront-account/src/api/updateCustomer/graphql/updateCustomer.graphql.ts","/@dropins/storefront-account/src/api/updateCustomer/updateCustomer.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Initializer, Model } from '@adobe-commerce/elsie/lib';\nimport { Lang } from '@adobe-commerce/elsie/i18n';\nimport { OrderHistoryModel } from '@/account/data/models';\nimport { CustomerDataModelShort } from '@/account/data/models/customer';\n\ntype ConfigProps = {\n langDefinitions?: Lang;\n authHeaderConfig?: {\n header?: string;\n tokenPrefix?: string;\n };\n models?: {\n OrderHistoryModel?: Model<OrderHistoryModel>;\n CustomerDataModelShort?: Model<CustomerDataModelShort>;\n };\n};\n\nexport const initialize = new Initializer<ConfigProps>({\n init: async (config) => {\n const defaultConfig = {\n authHeaderConfig: {\n header: 'Authorization',\n tokenPrefix: 'Bearer',\n },\n };\n\n initialize.config.setConfig({ ...defaultConfig, ...config });\n },\n\n listeners: () => [],\n});\n\nexport const config = initialize.config;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FetchGraphQL } from '@adobe-commerce/fetch-graphql';\n\nexport const {\n setEndpoint,\n setFetchGraphQlHeader,\n removeFetchGraphQlHeader,\n setFetchGraphQlHeaders,\n fetchGraphQl,\n getConfig,\n} = new FetchGraphQL().getMethods();\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_ATTRIBUTES_FORM = /* GraphQL */ `\n query GET_ATTRIBUTES_FORM($formCode: String!) {\n attributesForm(formCode: $formCode) {\n items {\n code\n default_value\n entity_type\n frontend_class\n frontend_input\n is_required\n is_unique\n label\n options {\n is_default\n label\n value\n }\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n validate_rules {\n name\n value\n }\n }\n }\n errors {\n type\n message\n }\n }\n }\n`;\n\nexport const GET_ATTRIBUTES_FORM_SHORT = /* GraphQL */ `\n query GET_ATTRIBUTES_FORM_SHORT {\n attributesForm(formCode: \"customer_register_address\") {\n items {\n frontend_input\n label\n code\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n }\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { events } from '@adobe-commerce/event-bus';\n\n/**\n * A function which can be attached to fetchGraphQL to handle thrown errors in\n * a generic way.\n */\nexport const handleNetworkError = (error: Error) => {\n const isAbortError =\n error instanceof DOMException && error.name === 'AbortError';\n\n if (!isAbortError) {\n // @ts-ignore\n events.emit('error', {\n source: 'auth',\n type: 'network',\n error,\n });\n }\n throw error;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/** Actions */\nexport const handleFetchError = (errors: Array<{ message: string }>) => {\n const errorMessage = errors.map((e: any) => e.message).join(' ');\n\n throw Error(errorMessage);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const convertToCamelCase = (key: string): string => {\n return key.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());\n};\n\nexport const convertToSnakeCase = (key: string): string => {\n return key.replace(/([A-Z])/g, (letter) => `_${letter.toLowerCase()}`);\n};\n\nexport const convertKeysCase = (\n data: any,\n type: 'snakeCase' | 'camelCase',\n dictionary?: Record<string, string>\n): any => {\n const typeList = ['string', 'boolean', 'number'];\n const callback =\n type === 'camelCase' ? convertToCamelCase : convertToSnakeCase;\n\n if (Array.isArray(data)) {\n return data.map((element) => {\n if (typeList.includes(typeof element) || element === null) return element;\n\n if (typeof element === 'object') {\n return convertKeysCase(element, type, dictionary);\n }\n return element;\n });\n }\n\n if (data !== null && typeof data === 'object') {\n return Object.entries(data).reduce((acc, [key, value]) => {\n const newKey =\n dictionary && dictionary[key] ? dictionary[key] : callback(key);\n acc[newKey] =\n typeList.includes(typeof value) || value === null\n ? value\n : convertKeysCase(value, type, dictionary);\n return acc;\n }, {} as Record<string, unknown>);\n }\n\n return data;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n GetAttributesFormResponse,\n ResponseAttributesFormItemsProps,\n} from '@/account/types';\nimport { AttributesFormModel, FieldEnumList } from '../models';\nimport { convertToCamelCase } from '@/account/lib/convertCase';\n\nexport const cloneArrayIfExists = (\n fields: ResponseAttributesFormItemsProps[]\n) => {\n let multilineItems: any = [];\n\n for (const element of fields) {\n if (element.frontend_input !== 'MULTILINE' || element.multiline_count < 2) {\n continue;\n }\n\n for (let i = 2; i <= element.multiline_count; i++) {\n const newItem = {\n ...element,\n is_required: false,\n name: `${element.code}_multiline_${i}`,\n code: `${element.code}_multiline_${i}`,\n id: `${element.code}_multiline_${i}`,\n };\n\n multilineItems.push(newItem);\n }\n }\n\n return multilineItems;\n};\n\nconst transformCustomUpperCode = (code: string) => {\n switch (code) {\n case 'middlename':\n return 'middleName';\n case 'firstname':\n return 'firstName';\n case 'lastname':\n return 'lastName';\n default:\n return convertToCamelCase(code);\n }\n};\n\nconst transformOptions = (item: any) => {\n if (!item?.options) return [];\n\n return item?.options?.map((el: any) => {\n return {\n isDefault: el?.is_default ?? false,\n text: el?.label ?? '',\n value: el?.value ?? '',\n };\n });\n};\n\nexport const transformAttributesForm = (\n response: GetAttributesFormResponse\n): AttributesFormModel[] => {\n const items = response?.data?.attributesForm?.items || [];\n\n if (!items.length) return [];\n\n const fields = items\n .filter((el) => !el.frontend_input?.includes('HIDDEN'))\n ?.map(({ code, ...other }) => {\n const isDefaultCode = code !== 'country_id' ? code : 'country_code';\n\n return {\n ...other,\n name: isDefaultCode,\n id: isDefaultCode,\n code: isDefaultCode,\n };\n });\n\n const multilineItems = cloneArrayIfExists(fields as any);\n\n const attributesConfig = fields\n .concat(multilineItems)\n .map((item) => {\n return {\n code: item?.code,\n name: item?.name,\n id: item?.id,\n label: item?.label ?? '',\n entityType: item?.entity_type,\n className: item?.frontend_class ?? '',\n defaultValue: item?.default_value ?? '',\n fieldType: item?.frontend_input as FieldEnumList,\n multilineCount: item?.multiline_count ?? 0,\n orderNumber: Number(item?.sort_order) || 0,\n isHidden: false,\n isUnique: item?.is_unique ?? false,\n required: item?.is_required ?? false,\n validateRules: item?.validate_rules ?? [],\n options: transformOptions(item),\n customUpperCode: transformCustomUpperCode(item?.code),\n };\n })\n .sort((a, b) => Number(a.orderNumber) - Number(b.orderNumber));\n\n return attributesConfig;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CustomerAddressesModel } from '../models';\nimport { AddressResponse, UserAddressesProps } from '@/account/types';\nimport { convertKeysCase } from '@/account/lib/convertCase';\n\nconst expandArraysInObject = (inputObject: UserAddressesProps) => {\n const flattenedAttributes: Record<string, unknown> = {};\n\n for (const key in inputObject) {\n const element = inputObject[key as keyof UserAddressesProps];\n\n if (!Array.isArray(element) || element.length === 0) continue;\n\n if (key === 'custom_attributesV2') {\n element.forEach((item) => {\n if (typeof item === 'object' && 'value' in item) {\n flattenedAttributes[item?.code] = item?.value;\n }\n });\n } else if (element.length > 1) {\n element.forEach((value: unknown, index: number) => {\n index === 0\n ? (flattenedAttributes[key] = value)\n : (flattenedAttributes[`${key}_multiline_${index + 1}`] = value);\n });\n } else {\n flattenedAttributes[key] = element[0] as Record<string, string>;\n }\n }\n\n return flattenedAttributes;\n};\nconst transformFullName = (address: UserAddressesProps) => {\n return {\n prefix: address?.prefix ?? '',\n suffix: address?.suffix ?? '',\n firstname: address?.firstname ?? '',\n lastname: address?.lastname ?? '',\n middlename: address?.middlename ?? '',\n };\n};\n\nconst transformIds = (address: UserAddressesProps) => {\n return {\n id: address?.id ?? '',\n vat_id: address?.vat_id ?? '',\n postcode: address?.postcode ?? '',\n country_code: address?.country_code ?? '',\n uid: address?.uid ?? '',\n };\n};\n\nconst transformContacts = (address: UserAddressesProps) => {\n return {\n company: address?.company ?? '',\n telephone: address?.telephone ?? '',\n fax: address?.fax ?? '',\n };\n};\n\n// Function to transform a single address\nexport const transformSingleAddress = (\n addressData: UserAddressesProps\n): CustomerAddressesModel => {\n const result = convertKeysCase(\n {\n ...transformFullName(addressData),\n ...transformIds(addressData),\n ...transformContacts(addressData),\n city: addressData?.city ?? '',\n region: {\n region: addressData?.region?.region ?? '',\n region_code: addressData?.region?.region_code ?? '',\n region_id: addressData?.region?.region_id ?? '',\n },\n default_shipping: addressData?.default_shipping || false,\n default_billing: addressData?.default_billing || false,\n ...expandArraysInObject(addressData),\n },\n 'camelCase',\n {}\n );\n\n return result;\n};\n\n// Function to transform multiple addresses from a response\nexport const transformMultipleAddresses = (\n response: AddressResponse\n): CustomerAddressesModel[] | [] => {\n const addresses: UserAddressesProps[] =\n response?.data?.customer?.addresses || [];\n\n if (!addresses.length) return [];\n\n const result = addresses\n .map(transformSingleAddress)\n .sort(\n (a, b) =>\n (Number(b.defaultBilling) || Number(b.defaultShipping)) -\n (Number(a.defaultBilling) || Number(a.defaultShipping))\n );\n\n return result;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { getCustomerShortResponse } from '@/account/types';\nimport { CustomerDataModelShort } from '../models/customer';\nimport { convertToCamelCase } from '@/account/lib/convertCase';\nimport { config } from '@/account/api';\nimport { merge } from '@adobe-commerce/elsie/lib';\n\nexport const transformCustomer = (\n response: getCustomerShortResponse\n): CustomerDataModelShort => {\n const attributeList = response?.data?.customer?.custom_attributes\n ?.filter((el) => el)\n .reduce(\n (\n accumulator: Record<string, string | number | boolean>,\n currentValue\n ) => {\n const key = convertToCamelCase(currentValue.code as string);\n\n if (currentValue.selected_options?.length) {\n // Select/dropdown attribute — grab the first selected option's value\n accumulator[key] = currentValue.selected_options[0].value ?? '';\n } else {\n // Regular attribute\n accumulator[key] = currentValue.value ?? '';\n }\n\n return accumulator;\n },\n {} as Record<string, string | number | boolean>\n );\n\n const model = {\n email: response?.data?.customer?.email || '',\n firstName: response?.data?.customer?.firstname || '',\n lastName: response?.data?.customer?.lastname || '',\n middleName: response?.data?.customer?.middlename || '',\n gender: response?.data?.customer?.gender || '1',\n dateOfBirth: response?.data?.customer?.date_of_birth || '',\n prefix: response?.data?.customer?.prefix || '',\n suffix: response?.data?.customer?.suffix || '',\n createdAt: response?.data?.customer?.created_at || '',\n allowRemoteShoppingAssistance:\n response?.data?.customer?.allow_remote_shopping_assistance,\n ...attributeList,\n };\n\n return merge(\n model, // default transformer\n config\n ?.getConfig()\n ?.models?.CustomerDataModelShort?.transformer?.(response.data) // custom transformer\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CountriesFormResponse } from '@/account/types';\nimport { Country } from '../models';\n\nexport const transformCountries = (\n response: CountriesFormResponse\n): {\n availableCountries: Country[] | [];\n countriesWithRequiredRegion: string[];\n optionalZipCountries: string[];\n} => {\n if (!response?.data?.countries?.length) {\n return {\n availableCountries: [],\n countriesWithRequiredRegion: [],\n optionalZipCountries: [],\n };\n }\n\n const { countries, storeConfig } = response.data;\n\n const countriesWithRequiredRegion =\n storeConfig?.countries_with_required_region.split(',');\n const optionalZipCountries = storeConfig?.optional_zip_countries.split(',');\n\n const availableCountries = countries\n .filter(({ two_letter_abbreviation, full_name_locale }) =>\n Boolean(two_letter_abbreviation && full_name_locale)\n )\n .map((country) => {\n const { two_letter_abbreviation, full_name_locale, available_regions } = country;\n\n const hasRegions = Array.isArray(available_regions) && available_regions.length > 0;\n return {\n value: two_letter_abbreviation,\n text: full_name_locale,\n availableRegions: hasRegions ? available_regions : undefined,\n };\n })\n .sort((a, b) => a.text.localeCompare(b.text));\n\n return {\n availableCountries,\n countriesWithRequiredRegion,\n optionalZipCountries,\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { RegionsFormResponse } from '@/account/types';\nimport { Region, RegionTransform } from '../models';\n\nexport const transformRegions = (\n response: RegionsFormResponse\n): RegionTransform[] | [] => {\n const availableRegions = response?.data?.country?.available_regions;\n if (!availableRegions) return [];\n\n const regions = availableRegions\n .filter((item) => {\n if (!item) return false;\n\n const { id, code, name } = item;\n return Boolean(id && code && name);\n })\n .map((region) => {\n const { id } = region as Region;\n\n return { id, text: region.name, value: `${region.code},${region.id}` };\n });\n\n return regions;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/**\n * Formats a date string according to a specified locale and options.\n * Returns \"Invalid Date\" if the input date string is invalid.\n *\n * @param {string} date - The date string to be formatted.\n * @param {string} [locale='en-US'] - The locale to use for formatting. Defaults to 'en-US'.\n * @param {Intl.DateTimeFormatOptions} [options={}] - Optional formatting options to customize the output.\n * @returns {string} The formatted date string, or \"Invalid Date\" if the input is invalid.\n *\n * @example\n * // Default formatting (en-US locale, MM/DD/YYYY)\n * console.log(formatDateToLocale('2023-08-29'));\n * // Output: \"08/29/2023\"\n *\n * @example\n * // Formatting with a specified locale (e.g., en-GB for DD/MM/YYYY)\n * console.log(formatDateToLocale('2023-08-29', 'en-GB'));\n * // Output: \"29/08/2023\"\n *\n * @example\n * // Formatting with a specified locale and custom options (e.g., de-DE with long month format)\n * console.log(formatDateToLocale('2023-08-29', 'de-DE', { month: 'long', year: 'numeric' }));\n * // Output: \"29. August 2023\"\n *\n * @example\n * // Handling an invalid date string\n * console.log(formatDateToLocale('invalid-date'));\n * // Output: \"Invalid Date\"\n */\nexport const formatDateToLocale = (\n date: string,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = {}\n): string => {\n const defaultOptions: Intl.DateTimeFormatOptions = {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n };\n // ISO date-only strings parse as UTC midnight; formatting in the host timezone\n // shifts the calendar day west of UTC. Use UTC for display so the date matches\n // the string in every environment (callers can override via `options.timeZone`).\n const isDateOnly = /^\\d{4}-\\d{2}-\\d{2}$/.test(date.trim());\n\n const formatOptions: Intl.DateTimeFormatOptions = {\n ...defaultOptions,\n ...(isDateOnly ? { timeZone: 'UTC' } : {}),\n ...options,\n };\n\n const dateObj = new Date(date.trim());\n\n if (isNaN(dateObj.getTime())) {\n return 'Invalid Date';\n }\n\n const formatter = new Intl.DateTimeFormat(locale, formatOptions);\n return formatter.format(dateObj);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/**\n * Formats a time string according to a specified locale and options.\n * Returns \"Invalid Time\" if the input date string is invalid.\n *\n * @param {string} date - The date string to be formatted.\n * @param {string} [locale='en-US'] - The locale to use for formatting. Defaults to 'en-US'.\n * @param {Intl.DateTimeFormatOptions} [options={}] - Optional formatting options to customize the output.\n * @returns {string} The formatted time string, or \"Invalid Time\" if the input is invalid.\n *\n * @example\n * // Default formatting (en-US locale)\n * console.log(formatTimeToLocale('2023-08-29 12:34'));\n * // Output: \"12:34 AM\"\n */\nexport const formatTimeToLocale = (\n date: string,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = {}\n): string => {\n const defaultOptions: Intl.DateTimeFormatOptions = {\n hour: '2-digit',\n minute: '2-digit',\n };\n const formatOptions: Intl.DateTimeFormatOptions = {\n ...defaultOptions,\n ...options,\n };\n\n const dateObj = new Date(date);\n\n if (isNaN(dateObj.getTime())) {\n return 'Invalid Time';\n }\n\n const formatter = new Intl.DateTimeFormat(locale, formatOptions);\n return formatter.format(dateObj);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n OrderHistoryListResponse, OrderItemProps,\n OrderProps,\n ReturnProps,\n} from '@/account/types';\nimport { OrderHistoryModel } from '@/account/data/models';\nimport { transformSingleAddress } from '@/account/data/transforms/transform-customer-address';\nimport { formatDateToLocale } from '@/account/lib/formatDateToLocale';\nimport { formatTimeToLocale } from '@/account/lib/formatTimeToLocale';\nimport { config } from '@/account/api';\nimport { merge } from '@adobe-commerce/elsie/lib';\n\nconst initialMoneyProps = {\n value: 0,\n currency: 'USD',\n};\n\nconst transformOrderHistoryTotal = (item: any) => {\n return {\n subtotal: item?.total?.subtotal ?? initialMoneyProps,\n grandTotal: item?.total?.grand_total ?? initialMoneyProps,\n grandTotalExclTax: item?.total?.grand_total_excl_tax ?? initialMoneyProps,\n totalGiftcard: item?.total?.total_giftcard ?? initialMoneyProps,\n subtotalExclTax: item?.total?.subtotal_excl_tax ?? initialMoneyProps,\n subtotalInclTax: item?.total?.subtotal_incl_tax ?? initialMoneyProps,\n taxes: item?.total?.taxes ?? [],\n totalTax: item?.total?.total_tax ?? initialMoneyProps,\n totalShipping: item?.total?.total_shipping ?? initialMoneyProps,\n discounts: item?.total?.discounts ?? [],\n };\n};\n\nexport const transformOrderHistoryList = (\n response: OrderHistoryListResponse\n): OrderHistoryModel | null => {\n if (!response.data?.customer?.orders) return null;\n\n const returns = response?.data?.customer?.returns ?? [];\n const items = response?.data?.customer?.orders?.items ?? [];\n\n const model = {\n items: items.map((item: OrderProps) => {\n return {\n adminAssistedOrder: item?.admin_assisted_order ?? null,\n items: item?.items.map((element: OrderItemProps) => ({\n status: element?.status ?? '',\n productName: element?.product_name ?? '',\n id: element?.id,\n quantityOrdered: element?.quantity_ordered ?? 0,\n quantityShipped: element?.quantity_shipped ?? 0,\n quantityInvoiced: element?.quantity_invoiced ?? 0,\n sku: element?.product_sku ?? '',\n urlKey: element?.product_url_key ?? '',\n topLevelSku: element?.product?.sku ?? '',\n product: {\n smallImage: {\n url: element?.product?.small_image?.url ?? '',\n },\n },\n })),\n token: item?.token,\n email: item?.email,\n shippingMethod: item?.shipping_method,\n paymentMethods: item?.payment_methods ?? [],\n shipments: item?.shipments ?? [],\n id: item?.id,\n carrier: item?.carrier,\n status: item?.status,\n number: item?.number,\n returns: returns?.items?.filter(\n (returnItem: ReturnProps) => returnItem.order.id === item.id\n ),\n orderDate: formatDateToLocale(item.order_date),\n orderTime: formatTimeToLocale(item.order_date),\n shippingAddress: transformSingleAddress(item.shipping_address),\n billingAddress: transformSingleAddress(item.billing_address),\n total: transformOrderHistoryTotal(item),\n };\n }),\n pageInfo: {\n pageSize: response?.data?.customer?.orders?.page_info?.page_size ?? 10,\n totalPages: response?.data?.customer?.orders?.page_info?.total_pages ?? 1,\n currentPage:\n response?.data?.customer?.orders?.page_info?.current_page ?? 1,\n },\n totalCount: response?.data?.customer?.orders?.total_count ?? 0,\n dateOfFirstOrder:\n response?.data?.customer?.orders?.date_of_first_order ?? '',\n };\n\n return merge(\n model, // default transformer\n config?.getConfig()?.models?.OrderHistoryModel?.transformer?.(response.data) // custom transformer\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GetStoreConfigResponse } from '@/account/types';\nimport { StoreConfigModel } from '../models';\n\nexport const transformStoreConfig = (\n response: GetStoreConfigResponse\n): StoreConfigModel => {\n return {\n baseMediaUrl: response?.data?.storeConfig?.base_media_url,\n minLength: +response?.data?.storeConfig?.minimum_password_length || 3,\n requiredCharacterClasses:\n +response?.data?.storeConfig?.required_character_classes_number || 0,\n storeCode: response?.data?.storeConfig?.store_code ?? '',\n shoppingAssistanceEnabled:\n response?.data?.storeConfig?.shopping_assistance_enabled ?? false,\n shoppingAssistanceCheckboxTitle:\n response?.data?.storeConfig?.shopping_assistance_checkbox_title || '',\n shoppingAssistanceCheckboxTooltip:\n response?.data?.storeConfig?.shopping_assistance_checkbox_tooltip || '',\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n AccountModel,\n CustomerDataModelShort,\n} from '@/account/data/models/customer';\n\n/**\n * Reference:\n * https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-collector/src/handlers/account/editAccountAEP.ts\n */\nexport const transformAccount = (\n data: CustomerDataModelShort\n): AccountModel => {\n return {\n firstName: data.firstName,\n lastName: data.lastName,\n emailAddress: data?.email || '',\n accountId: data?.email || '',\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CustomerPaymentTokenItem } from '@/account/types';\nimport { StoredPaymentMethodDisplay } from '@/account/data/models/stored-payment-method';\n\n/**\n * Maps vault `brand` / legacy `type` codes (Payment Services, Braintree, etc.) to display labels.\n * Keys are uppercase with spaces normalized to underscores.\n */\nconst CARD_BRAND_LABELS: Record<string, string> = {\n // Legacy short `type` codes\n VI: 'Visa',\n MC: 'Mastercard',\n MD: 'Maestro',\n AE: 'American Express',\n DI: 'Discover',\n DN: 'Diners',\n JCB: 'JCB',\n UN: 'UnionPay',\n // Full `brand` strings (e.g. Adobe Payment Services vault JSON)\n VISA: 'Visa',\n MASTERCARD: 'Mastercard',\n MAESTRO: 'Maestro',\n AMEX: 'American Express',\n AMERICAN_EXPRESS: 'American Express',\n DISCOVER: 'Discover',\n DINERS: 'Diners',\n DINERS_CLUB: 'Diners',\n UNIONPAY: 'UnionPay',\n};\n\ntype VaultDetails = {\n brand?: string;\n type?: string;\n maskedCC?: string;\n expirationDate?: string;\n lastFour?: string;\n last_four?: string;\n ccLast4?: string;\n cc_last4?: string;\n};\n\nfunction parseVaultDetails(details: string): VaultDetails | null {\n try {\n return JSON.parse(details) as VaultDetails;\n } catch {\n return null;\n }\n}\n\nfunction normalizeBrandKey(value: string): string {\n return value.trim().toUpperCase().replaceAll(/\\s+/g, '_');\n}\n\nfunction isUnknownPlaceholder(value: string | undefined): boolean {\n return !value?.trim() || normalizeBrandKey(value) === 'UNKNOWN';\n}\n\nfunction labelForBrandOrTypeCode(code: string | undefined): string | undefined {\n if (!code?.trim()) return undefined;\n\n return CARD_BRAND_LABELS[normalizeBrandKey(code)];\n}\n\n/** Human-readable fallback when the API sends an unmapped brand string. */\nfunction titleCaseBrandFallback(raw: string): string {\n return raw\n .replaceAll('_', ' ')\n .toLowerCase()\n .split(/\\s+/)\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(' ');\n}\n\nfunction resolveCardBrandLabel(\n parsed: VaultDetails | null,\n item: CustomerPaymentTokenItem\n): string {\n const brandRaw = parsed?.brand?.trim();\n const typeRaw = parsed?.type?.trim();\n\n if (!isUnknownPlaceholder(brandRaw)) {\n const mapped = labelForBrandOrTypeCode(brandRaw);\n if (mapped) return mapped;\n\n return titleCaseBrandFallback(brandRaw!);\n }\n\n if (!isUnknownPlaceholder(typeRaw)) {\n const mapped = labelForBrandOrTypeCode(typeRaw);\n if (mapped) return mapped;\n\n return typeRaw!;\n }\n\n return item.payment_method_code;\n}\n\n/** End of calendar month for MM/YYYY (e.g. 09/2022). */\nexport function isExpirationDatePast(expirationDate: string | undefined): boolean {\n if (!expirationDate) return false;\n\n const match = /^(\\d{1,2})\\/(\\d{4})$/.exec(expirationDate.trim());\n if (!match) return false;\n\n const month = Number.parseInt(match[1], 10);\n const year = Number.parseInt(match[2], 10);\n if (month < 1 || month > 12) return false;\n\n const endOfExpiryMonth = new Date(year, month, 0, 23, 59, 59, 999);\n\n return Date.now() > endOfExpiryMonth.getTime();\n}\n\nfunction tokenMatchesFilter(\n item: CustomerPaymentTokenItem,\n filterPaymentMethodCodes: string[]\n): boolean {\n return filterPaymentMethodCodes.some(\n (code) =>\n item.payment_method_code === code ||\n item.payment_method_code.startsWith(`${code}_`)\n );\n}\n\n/** Prefer {@link PaymentCard} props: last four from common vault `details` shapes. */\nfunction extractLastFourDigits(\n parsed: VaultDetails | null,\n rawDetails: string\n): string {\n const fromMasked = (value: string | undefined) => {\n if (!value) return '';\n const digits = value.replaceAll(/\\D/g, '');\n\n return digits.length >= 4 ? digits.slice(-4) : '';\n };\n\n if (parsed) {\n const direct =\n fromMasked(parsed.maskedCC) ||\n fromMasked(parsed.lastFour) ||\n fromMasked(parsed.last_four) ||\n fromMasked(parsed.ccLast4) ||\n fromMasked(parsed.cc_last4);\n\n if (direct) return direct;\n }\n\n return rawDetails.match(/\\d{4}/g)?.at(-1) ?? '';\n}\n\n/** When details omit card last-four, still drive {@link PaymentCard} with a short stable suffix. */\nfunction fallbackLastFourFromHash(publicHash: string): string {\n const alnum = publicHash.replaceAll(/[^a-zA-Z0-9]/g, '');\n\n if (alnum.length >= 4) return alnum.slice(-4).toUpperCase();\n\n return alnum.padEnd(4, '0').slice(0, 4).toUpperCase();\n}\n\nfunction mapTokenToDisplay(\n item: CustomerPaymentTokenItem\n): StoredPaymentMethodDisplay | null {\n if (!item.public_hash) return null;\n\n const parsed = parseVaultDetails(item.details);\n const cardBrand = resolveCardBrandLabel(parsed, item);\n const lastFour =\n extractLastFourDigits(parsed, item.details) ||\n fallbackLastFourFromHash(item.public_hash);\n\n return {\n publicHash: item.public_hash,\n cardBrand,\n lastFourDigits: lastFour,\n expired: isExpirationDatePast(parsed?.expirationDate),\n };\n}\n\nexport function transformStoredPaymentTokens(\n items: CustomerPaymentTokenItem[],\n filterPaymentMethodCodes?: string[]\n): StoredPaymentMethodDisplay[] {\n const filtered =\n filterPaymentMethodCodes?.length ?\n items.filter((item) => tokenMatchesFilter(item, filterPaymentMethodCodes))\n : items;\n\n return filtered\n .map((item) => mapTokenToDisplay(item))\n .filter((row): row is StoredPaymentMethodDisplay => row !== null);\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { AdminAssistanceActionsResponse } from '@/account/types';\nimport { AdminAssistanceActions } from '@/account/data/models';\n\nexport function transformAdminAssistanceActions(\n response: AdminAssistanceActionsResponse\n): AdminAssistanceActions | null {\n const adminAssistanceActions =\n response?.data?.customer?.admin_assistance_actions;\n\n if (!adminAssistanceActions) {\n return null;\n }\n\n return {\n totalCount: adminAssistanceActions.total_count || 0,\n items:\n adminAssistanceActions.items?.map((item) => ({\n action: item.action || '',\n date: item.date || '',\n details: item.details || '',\n })) || [],\n pageInfo: {\n currentPage: adminAssistanceActions.page_info?.current_page || 1,\n pageSize: adminAssistanceActions.page_info?.page_size || 10,\n totalPages: adminAssistanceActions.page_info?.total_pages || 1,\n },\n };\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport {\n GET_ATTRIBUTES_FORM,\n GET_ATTRIBUTES_FORM_SHORT,\n} from './graphql/getAttributesForm.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { transformAttributesForm } from '@/account/data/transforms';\nimport { AttributesFormModel } from '@/account/data/models';\nimport { GetAttributesFormResponse } from '@/account/types';\n\nexport const getAttributesForm = async (\n formCode: string\n): Promise<AttributesFormModel[]> => {\n const sessionStorageKey = `_account_attributesForm_${formCode}`;\n\n const sessionStorageCache = sessionStorage.getItem(sessionStorageKey);\n\n if (sessionStorageCache) {\n return JSON.parse(sessionStorageCache);\n }\n\n return await fetchGraphQl(\n formCode !== 'shortRequest'\n ? GET_ATTRIBUTES_FORM\n : GET_ATTRIBUTES_FORM_SHORT,\n {\n method: 'GET',\n cache: 'force-cache',\n variables: { formCode },\n }\n )\n .then((response: GetAttributesFormResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const transformedData = transformAttributesForm(response);\n\n sessionStorage.setItem(\n sessionStorageKey,\n JSON.stringify(transformedData)\n );\n\n return transformedData;\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const CREATE_CUSTOMER_ADDRESS = /* GraphQL */ `\n mutation CREATE_CUSTOMER_ADDRESS($input: CustomerAddressInput!) {\n createCustomerAddress(input: $input) {\n firstname\n uid\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n CreateCustomerAddressResponse,\n CreateCustomerAddressResult,\n} from '@/account/types';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { CREATE_CUSTOMER_ADDRESS } from './graphql/createCustomerAddress.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { convertKeysCase } from '@/account/lib/convertCase';\nimport { CustomerAddressesModel } from '@/account/data/models';\n\nexport const createCustomerAddress = async (\n address: CustomerAddressesModel\n): Promise<CreateCustomerAddressResult> => {\n return await fetchGraphQl(CREATE_CUSTOMER_ADDRESS, {\n method: 'POST',\n variables: {\n input: convertKeysCase(address, 'snakeCase', {\n custom_attributesV2: 'custom_attributesV2',\n firstName: 'firstname',\n lastName: 'lastname',\n middleName: 'middlename',\n }),\n },\n })\n .then((response: CreateCustomerAddressResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const created = response?.data?.createCustomerAddress;\n return {\n firstname: created?.firstname ?? '',\n uid: created?.uid ?? '',\n };\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_CUSTOMER_ADDRESS = /* GraphQL */ `\n query GET_CUSTOMER_ADDRESS {\n customer {\n addresses {\n firstname\n lastname\n middlename\n fax\n prefix\n suffix\n city\n company\n country_code\n region {\n region\n region_code\n region_id\n }\n custom_attributesV2 {\n ... on AttributeValue {\n code\n value\n }\n }\n telephone\n id\n vat_id\n postcode\n street\n default_shipping\n default_billing\n uid\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { GET_CUSTOMER_ADDRESS } from './graphql/getCustomerAddress.graphql';\nimport { transformMultipleAddresses } from '@/account/data/transforms';\nimport { CustomerAddressesModel } from '@/account/data/models/customer-address';\nimport { AddressResponse } from '@/account/types';\nimport { handleFetchError } from '@/account/lib/fetch-error';\n\nexport const getCustomerAddress = async (): Promise<\n CustomerAddressesModel[]\n> => {\n return await fetchGraphQl(GET_CUSTOMER_ADDRESS, {\n method: 'GET',\n cache: 'no-cache',\n })\n .then((response: AddressResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformMultipleAddresses(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_COUNTRIES_QUERY = /* GraphQL */ `\n query GET_COUNTRIES_QUERY {\n countries {\n two_letter_abbreviation\n full_name_locale\n available_regions {\n id\n code\n name\n }\n }\n storeConfig {\n countries_with_required_region\n optional_zip_countries\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GET_COUNTRIES_QUERY } from './graphql/getCountries.graphql';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { transformCountries } from '@/account/data/transforms';\nimport { CountriesFormResponse } from '@/account/types';\nimport { Country } from '@/account/data/models';\n\nexport const getCountries = async (): Promise<{\n availableCountries: Country[] | [];\n countriesWithRequiredRegion: string[];\n optionalZipCountries: string[];\n}> => {\n const sessionStorageKey = '_account_countries';\n\n const sessionStorageCache = sessionStorage.getItem(sessionStorageKey);\n\n if (sessionStorageCache) {\n return JSON.parse(sessionStorageCache);\n }\n\n return await fetchGraphQl(GET_COUNTRIES_QUERY, {\n method: 'GET',\n cache: 'no-cache',\n })\n .then((response: CountriesFormResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const transformedData = transformCountries(response);\n\n sessionStorage.setItem(\n sessionStorageKey,\n JSON.stringify(transformedData)\n );\n\n return transformedData;\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_REGIONS = /* GraphQL */ `\n query GET_REGIONS($countryCode: String!) {\n country(id: $countryCode) {\n id\n available_regions {\n id\n code\n name\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { GET_REGIONS } from './graphql/getRegions.graphql';\nimport { transformRegions } from '@/account/data/transforms';\nimport { RegionsFormResponse } from '@/account/types';\nimport { RegionTransform } from '@/account/data/models';\n\nexport const getRegions = async (\n countryCode: string\n): Promise<RegionTransform[] | []> => {\n const sessionStorageKey = `_account_regions_${countryCode}`;\n\n const sessionStorageCache = sessionStorage.getItem(sessionStorageKey);\n\n if (sessionStorageCache) {\n return JSON.parse(sessionStorageCache);\n }\n\n return await fetchGraphQl(GET_REGIONS, {\n method: 'GET',\n cache: 'no-cache',\n variables: { countryCode },\n })\n .then((response: RegionsFormResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const transformedData = transformRegions(response);\n\n sessionStorage.setItem(\n sessionStorageKey,\n JSON.stringify(transformedData)\n );\n\n return transformedData;\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const UPDATE_CUSTOMER_ADDRESS = /* GraphQL */ `\n mutation UPDATE_CUSTOMER_ADDRESS($id: Int!, $input: CustomerAddressInput) {\n updateCustomerAddress(id: $id, input: $input) {\n firstname\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { UPDATE_CUSTOMER_ADDRESS } from './graphql/updateCustomerAddress.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { UpdateCustomerAddressResponse } from '@/account/types';\nimport { CustomerAddressesModel } from '@/account/data/models';\nimport { convertKeysCase } from '@/account/lib/convertCase';\n\ntype ExtendedAddressFormProps = CustomerAddressesModel & {\n addressId: number;\n};\n\nexport const updateCustomerAddress = async (\n forms: ExtendedAddressFormProps\n): Promise<string> => {\n const { addressId, ...address } = forms;\n\n if (!addressId) return '';\n\n return await fetchGraphQl(UPDATE_CUSTOMER_ADDRESS, {\n method: 'POST',\n variables: {\n id: Number(addressId),\n input: convertKeysCase(address, 'snakeCase', {\n custom_attributesV2: 'custom_attributesV2',\n firstName: 'firstname',\n lastName: 'lastname',\n middleName: 'middlename',\n }),\n },\n })\n .then((response: UpdateCustomerAddressResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response?.data?.updateCustomerAddress?.firstname || '';\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const BASIC_CUSTOMER_INFO_FRAGMENT = /* GraphQL */ `\n fragment BASIC_CUSTOMER_INFO_FRAGMENT on Customer {\n date_of_birth\n email\n firstname\n gender\n lastname\n middlename\n prefix\n suffix\n created_at\n allow_remote_shopping_assistance\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { BASIC_CUSTOMER_INFO_FRAGMENT } from '@/account/api/graphql/CustomerFragment.graphql';\n\nexport const GET_CUSTOMER = /* GraphQL */ `\n query GET_CUSTOMER {\n customer {\n ...BASIC_CUSTOMER_INFO_FRAGMENT\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n ... on AttributeSelectedOptions {\n code\n selected_options {\n value\n }\n }\n code\n }\n }\n }\n ${BASIC_CUSTOMER_INFO_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { GET_CUSTOMER } from './graphql/getCustomer.graphql';\nimport { transformCustomer } from '@/account/data/transforms';\nimport { CustomerDataModelShort } from '@/account/data/models/customer';\nimport { getCustomerShortResponse } from '@/account/types';\n\nexport const getCustomer = async (): Promise<CustomerDataModelShort> => {\n return await fetchGraphQl(GET_CUSTOMER, {\n method: 'GET',\n cache: 'no-cache',\n })\n .then((response: getCustomerShortResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformCustomer(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_ADMIN_ASSISTANCE_ACTIONS = /* GraphQL */ `\n query GET_ADMIN_ASSISTANCE_ACTIONS($currentPage: Int, $pageSize: Int) {\n customer {\n admin_assistance_actions(\n pageSize: $pageSize\n currentPage: $currentPage\n ) {\n total_count\n items {\n action\n date\n details\n }\n page_info {\n current_page\n page_size\n total_pages\n }\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { AdminAssistanceActions } from '@/account/data/models';\nimport { transformAdminAssistanceActions } from '@/account/data/transforms';\nimport { AdminAssistanceActionsResponse } from '@/account/types';\nimport { GET_ADMIN_ASSISTANCE_ACTIONS } from './graphql/getAdminAssistanceActions.graphql';\n\nexport const getAdminAssistanceActions = async (\n pageSize: number,\n currentPage: number\n): Promise<AdminAssistanceActions | null> => {\n return await fetchGraphQl(GET_ADMIN_ASSISTANCE_ACTIONS, {\n method: 'GET',\n cache: 'no-cache',\n variables: {\n pageSize,\n currentPage,\n },\n })\n .then((response: AdminAssistanceActionsResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformAdminAssistanceActions(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const REMOVE_CUSTOMER_ADDRESS = /* GraphQL */ `\n mutation REMOVE_CUSTOMER_ADDRESS($id: Int!) {\n deleteCustomerAddress(id: $id)\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { REMOVE_CUSTOMER_ADDRESS } from './graphql/removeCustomerAddress.graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { RemoveCustomerAddressResponse } from '@/account/types';\n\nexport const removeCustomerAddress = async (\n addressId: number\n): Promise<boolean> => {\n return await fetchGraphQl(REMOVE_CUSTOMER_ADDRESS, {\n method: 'POST',\n variables: { id: addressId },\n })\n .then((response: RemoveCustomerAddressResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response.data.deleteCustomerAddress;\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_CUSTOMER_PAYMENT_TOKENS = /* GraphQL */ `\n query getCustomerPaymentTokens {\n customerPaymentTokens {\n items {\n details\n public_hash\n payment_method_code\n type\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { GET_CUSTOMER_PAYMENT_TOKENS } from './graphql/getCustomerPaymentTokens.graphql';\nimport { GetCustomerPaymentTokensResponse } from '@/account/types';\nimport { transformStoredPaymentTokens } from '@/account/data/transforms';\nimport { StoredPaymentMethodDisplay } from '@/account/data/models/stored-payment-method';\n\nexport const getCustomerPaymentTokens = async (\n filterPaymentMethodCodes?: string[]\n): Promise<StoredPaymentMethodDisplay[]> => {\n return await fetchGraphQl(GET_CUSTOMER_PAYMENT_TOKENS, {\n method: 'GET',\n cache: 'no-cache',\n })\n .then((response: GetCustomerPaymentTokensResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const items = response.data?.customerPaymentTokens?.items ?? [];\n\n return transformStoredPaymentTokens(items, filterPaymentMethodCodes);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const DELETE_PAYMENT_TOKEN = /* GraphQL */ `\n mutation deletePaymentToken($public_hash: String!) {\n deletePaymentToken(public_hash: $public_hash) {\n result\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { DELETE_PAYMENT_TOKEN } from './graphql/deletePaymentToken.graphql';\nimport { DeletePaymentTokenResponse } from '@/account/types';\n\nexport const deletePaymentToken = async (\n publicHash: string\n): Promise<boolean> => {\n return await fetchGraphQl(DELETE_PAYMENT_TOKEN, {\n method: 'POST',\n variables: { public_hash: publicHash },\n })\n .then((response: DeletePaymentTokenResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return Boolean(response.data?.deletePaymentToken?.result);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment ADDRESS_FRAGMENT on OrderAddress {\n city\n company\n country_code\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region\n region_id\n street\n suffix\n telephone\n vat_id\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const ORDER_SUMMARY_FRAGMENT = /* GraphQL */ `\n fragment ORDER_SUMMARY_FRAGMENT on OrderTotal {\n grand_total {\n value\n currency\n }\n grand_total_excl_tax {\n value\n currency\n }\n total_giftcard {\n currency\n value\n }\n subtotal_excl_tax {\n currency\n value\n }\n subtotal_incl_tax {\n currency\n value\n }\n taxes {\n amount {\n currency\n value\n }\n rate\n title\n }\n total_tax {\n currency\n value\n }\n total_shipping {\n currency\n value\n }\n discounts {\n amount {\n currency\n value\n }\n label\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const CUSTOMER_ORDER_FRAGMENT = /* GraphQL */ `\n fragment CUSTOMER_ORDER_FRAGMENT on CustomerOrder {\n admin_assisted_order\n token\n email\n shipping_method\n payment_methods {\n name\n type\n }\n shipments {\n id\n number\n tracking {\n title\n number\n carrier\n }\n }\n number\n id\n order_date\n carrier\n status\n items {\n status\n product_name\n id\n quantity_ordered\n quantity_shipped\n quantity_invoiced\n product_sku\n product_url_key\n product {\n sku\n small_image {\n url\n }\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n ADDRESS_FRAGMENT,\n ORDER_SUMMARY_FRAGMENT,\n CUSTOMER_ORDER_FRAGMENT,\n} from '@/account/api/fragments';\n\nexport const GET_CUSTOMER_ORDERS_LIST = /* GraphQL */ `\n query GET_CUSTOMER_ORDERS_LIST(\n $currentPage: Int\n $pageSize: Int\n $filter: CustomerOrdersFilterInput\n $sort: CustomerOrderSortInput\n ) {\n customer {\n returns {\n items {\n uid\n number\n order {\n id\n }\n }\n }\n orders(\n currentPage: $currentPage\n pageSize: $pageSize\n filter: $filter\n sort: $sort\n ) {\n page_info {\n page_size\n total_pages\n current_page\n }\n date_of_first_order\n total_count\n items {\n ...CUSTOMER_ORDER_FRAGMENT\n shipping_address {\n ...ADDRESS_FRAGMENT\n }\n billing_address {\n ...ADDRESS_FRAGMENT\n }\n total {\n ...ORDER_SUMMARY_FRAGMENT\n }\n }\n }\n }\n }\n ${CUSTOMER_ORDER_FRAGMENT}\n ${ADDRESS_FRAGMENT}\n ${ORDER_SUMMARY_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/account/api';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { GET_CUSTOMER_ORDERS_LIST } from './graphql/getOrderHistoryList.graphql';\nimport { OrderHistoryListResponse } from '@/account/types';\nimport { transformOrderHistoryList } from '@/account/data/transforms';\nimport { OrderHistoryModel } from '@/account/data/models';\n\nconst SORT_DIRECTION = { sort_direction: 'DESC', sort_field: 'CREATED_AT' };\n\nexport const getOrderHistoryList = async (\n pageSize: number,\n selectOrdersDate: string,\n currentPage: number\n): Promise<OrderHistoryModel | null> => {\n const filterOrderDate = !selectOrdersDate.includes('viewAll')\n ? {\n order_date: JSON.parse(selectOrdersDate),\n }\n : {};\n\n return await fetchGraphQl(GET_CUSTOMER_ORDERS_LIST, {\n method: 'GET',\n cache: 'no-cache',\n variables: {\n pageSize,\n currentPage,\n filter: filterOrderDate,\n sort: SORT_DIRECTION,\n },\n })\n .then((response: OrderHistoryListResponse) => {\n return transformOrderHistoryList(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const CHANGE_CUSTOMER_PASSWORD = /* GraphQL */ `\n mutation CHANGE_CUSTOMER_PASSWORD(\n $currentPassword: String!\n $newPassword: String!\n ) {\n changeCustomerPassword(\n currentPassword: $currentPassword\n newPassword: $newPassword\n ) {\n email\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport {\n ChangeCustomerPasswordProps,\n ChangeCustomerPasswordResponse,\n} from '@/account/types';\nimport { CHANGE_CUSTOMER_PASSWORD } from './graphql/updateCustomerPassword.graphql';\n\nexport const updateCustomerPassword = async ({\n currentPassword,\n newPassword,\n}: ChangeCustomerPasswordProps): Promise<string> => {\n return await fetchGraphQl(CHANGE_CUSTOMER_PASSWORD, {\n method: 'POST',\n variables: { currentPassword, newPassword },\n })\n .then((response: ChangeCustomerPasswordResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response?.data?.changeCustomerPassword?.email || '';\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_STORE_CONFIG = /* GraphQL */ `\n query GET_STORE_CONFIG {\n storeConfig {\n base_media_url\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n store_code\n shopping_assistance_enabled\n shopping_assistance_checkbox_title\n shopping_assistance_checkbox_tooltip\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { GET_STORE_CONFIG } from './graphql/getStoreConfig.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { GetStoreConfigResponse } from '@/account/types';\nimport { transformStoreConfig } from '@/account/data/transforms';\nimport { StoreConfigModel } from '@/account/data/models';\n\nexport const getStoreConfig = async (): Promise<StoreConfigModel> => {\n return await fetchGraphQl(GET_STORE_CONFIG, {\n method: 'GET',\n cache: 'force-cache',\n })\n .then((response: GetStoreConfigResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformStoreConfig(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const UPDATE_CUSTOMER_EMAIL = /* GraphQL */ `\n mutation UPDATE_CUSTOMER_EMAIL($email: String!, $password: String!) {\n updateCustomerEmail(email: $email, password: $password) {\n customer {\n email\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { UPDATE_CUSTOMER_EMAIL } from './graphql/updateCustomerEmail.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\n\nexport const updateCustomerEmail = async ({\n email,\n password,\n}: {\n email: string;\n password: string;\n}): Promise<string> => {\n return await fetchGraphQl(UPDATE_CUSTOMER_EMAIL, {\n method: 'POST',\n variables: { email, password },\n })\n .then((response) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response?.data?.updateCustomerEmail?.customer?.email || '';\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const UPDATE_CUSTOMER_V2 = /* GraphQL */ `\n mutation UPDATE_CUSTOMER_V2($input: CustomerUpdateInput!) {\n updateCustomerV2(input: $input) {\n customer {\n email\n allow_remote_shopping_assistance\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { UPDATE_CUSTOMER_V2 } from './graphql/updateCustomer.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { convertKeysCase } from '@/account/lib/convertCase';\n\nexport const updateCustomer = async (\n form: Record<string, string | boolean>\n): Promise<string> => {\n return await fetchGraphQl(UPDATE_CUSTOMER_V2, {\n method: 'POST',\n variables: {\n input: convertKeysCase(form, 'snakeCase', {\n firstName: 'firstname',\n lastName: 'lastname',\n middleName: 'middlename',\n dob: 'date_of_birth',\n custom_attributesV2: 'custom_attributes',\n }),\n },\n })\n .then((response) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response?.data?.updateCustomerV2?.customer?.email || '';\n })\n .catch(handleNetworkError);\n};\n"],"names":["initialize","Initializer","config","defaultConfig","setEndpoint","setFetchGraphQlHeader","removeFetchGraphQlHeader","setFetchGraphQlHeaders","fetchGraphQl","getConfig","FetchGraphQL","GET_ATTRIBUTES_FORM","GET_ATTRIBUTES_FORM_SHORT","handleNetworkError","error","events","handleFetchError","errors","errorMessage","e","convertToCamelCase","key","_","letter","convertToSnakeCase","convertKeysCase","data","type","dictionary","typeList","callback","element","acc","value","newKey","cloneArrayIfExists","fields","multilineItems","i","newItem","transformCustomUpperCode","code","transformOptions","item","_a","el","transformAttributesForm","response","items","_b","_c","other","isDefaultCode","a","b","expandArraysInObject","inputObject","flattenedAttributes","index","transformFullName","address","transformIds","transformContacts","transformSingleAddress","addressData","transformMultipleAddresses","addresses","transformCustomer","attributeList","accumulator","currentValue","model","_e","_d","_g","_f","_i","_h","_k","_j","_m","_l","_o","_n","_q","_p","_s","_r","_u","_t","_w","_v","merge","_A","_z","_y","_x","transformCountries","countries","storeConfig","countriesWithRequiredRegion","optionalZipCountries","two_letter_abbreviation","full_name_locale","country","available_regions","hasRegions","transformRegions","availableRegions","id","name","region","formatDateToLocale","date","locale","options","defaultOptions","isDateOnly","formatOptions","dateObj","formatTimeToLocale","initialMoneyProps","transformOrderHistoryTotal","transformOrderHistoryList","returns","returnItem","_C","_B","transformStoreConfig","transformAccount","CARD_BRAND_LABELS","parseVaultDetails","details","normalizeBrandKey","isUnknownPlaceholder","labelForBrandOrTypeCode","titleCaseBrandFallback","raw","w","resolveCardBrandLabel","parsed","brandRaw","typeRaw","mapped","isExpirationDatePast","expirationDate","match","month","year","endOfExpiryMonth","tokenMatchesFilter","filterPaymentMethodCodes","extractLastFourDigits","rawDetails","fromMasked","digits","direct","fallbackLastFourFromHash","publicHash","alnum","mapTokenToDisplay","cardBrand","lastFour","transformStoredPaymentTokens","row","transformAdminAssistanceActions","adminAssistanceActions","getAttributesForm","formCode","sessionStorageKey","sessionStorageCache","transformedData","CREATE_CUSTOMER_ADDRESS","createCustomerAddress","created","GET_CUSTOMER_ADDRESS","getCustomerAddress","GET_COUNTRIES_QUERY","getCountries","GET_REGIONS","getRegions","countryCode","UPDATE_CUSTOMER_ADDRESS","updateCustomerAddress","forms","addressId","BASIC_CUSTOMER_INFO_FRAGMENT","GET_CUSTOMER","getCustomer","GET_ADMIN_ASSISTANCE_ACTIONS","getAdminAssistanceActions","pageSize","currentPage","REMOVE_CUSTOMER_ADDRESS","removeCustomerAddress","GET_CUSTOMER_PAYMENT_TOKENS","getCustomerPaymentTokens","DELETE_PAYMENT_TOKEN","deletePaymentToken","ADDRESS_FRAGMENT","ORDER_SUMMARY_FRAGMENT","CUSTOMER_ORDER_FRAGMENT","GET_CUSTOMER_ORDERS_LIST","SORT_DIRECTION","getOrderHistoryList","selectOrdersDate","filterOrderDate","CHANGE_CUSTOMER_PASSWORD","updateCustomerPassword","currentPassword","newPassword","GET_STORE_CONFIG","getStoreConfig","UPDATE_CUSTOMER_EMAIL","updateCustomerEmail","email","password","UPDATE_CUSTOMER_V2","updateCustomer","form"],"mappings":"oLAkCO,MAAMA,EAAa,IAAIC,EAAyB,CACrD,KAAM,MAAOC,GAAW,CACtB,MAAMC,EAAgB,CACpB,iBAAkB,CAChB,OAAQ,gBACR,YAAa,QAAA,CACf,EAGFH,EAAW,OAAO,UAAU,CAAE,GAAGG,EAAe,GAAGD,EAAQ,CAC7D,EAEA,UAAW,IAAM,CAAA,CACnB,CAAC,EAEYA,EAASF,EAAW,OC9BpB,CACX,YAAAI,GACA,sBAAAC,GACA,yBAAAC,GACA,uBAAAC,GACA,aAAAC,EACA,UAAAC,EACF,EAAI,IAAIC,GAAA,EAAe,WAAA,ECTVC,GAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkCpCC,GAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EC5B1CC,EAAsBC,GAAiB,CAIlD,MAFEA,aAAiB,cAAgBA,EAAM,OAAS,cAIhDC,EAAO,KAAK,QAAS,CACnB,OAAQ,OACR,KAAM,UACN,MAAAD,CAAA,CACD,EAEGA,CACR,EClBaE,EAAoBC,GAAuC,CACtE,MAAMC,EAAeD,EAAO,IAAKE,GAAWA,EAAE,OAAO,EAAE,KAAK,GAAG,EAE/D,MAAM,MAAMD,CAAY,CAC1B,ECLaE,EAAsBC,GAC1BA,EAAI,QAAQ,YAAa,CAACC,EAAGC,IAAWA,EAAO,aAAa,EAGxDC,GAAsBH,GAC1BA,EAAI,QAAQ,WA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,GAAa,aAClB,OAAIH,EAAAG,EAAS,SAAT,MAAAH,EAAiB,OAAe5B,EAAiB+B,EAAS,MAAM,IAE7D0B,GAAAvB,GAAAD,EAAAF,GAAA,YAAAA,EAAU,OAAV,YAAAE,EAAgB,mBAAhB,YAAAC,EAAkC,WAAlC,YAAAuB,EAA4C,QAAS,EAC9D,CAAC,EACA,MAAM5D,CAAkB"}
1
+ {"version":3,"file":"api.js","sources":["/@dropins/storefront-account/src/api/initialize/initialize.ts","/@dropins/storefront-account/src/api/fetch-graphql/fetch-graphql.ts","/@dropins/storefront-account/src/api/getAttributesForm/graphql/getAttributesForm.graphql.ts","/@dropins/storefront-account/src/lib/network-error.ts","/@dropins/storefront-account/src/lib/fetch-error.ts","/@dropins/storefront-account/src/lib/convertCase.ts","/@dropins/storefront-account/src/data/transforms/transform-attributes-form.ts","/@dropins/storefront-account/src/data/transforms/transform-customer-address.ts","/@dropins/storefront-account/src/data/transforms/transform-customer.ts","/@dropins/storefront-account/src/data/transforms/transform-countries.ts","/@dropins/storefront-account/src/data/transforms/transform-regions.ts","/@dropins/storefront-account/src/lib/formatDateToLocale.ts","/@dropins/storefront-account/src/lib/formatTimeToLocale.ts","/@dropins/storefront-account/src/data/transforms/transform-order-history-list.ts","/@dropins/storefront-account/src/data/transforms/transform-store-config.ts","/@dropins/storefront-account/src/data/transforms/transform-account.ts","/@dropins/storefront-account/src/data/transforms/transform-stored-payment-tokens.ts","/@dropins/storefront-account/src/data/transforms/transform-admin-assistance-actions.ts","/@dropins/storefront-account/src/api/getAttributesForm/getAttributesForm.ts","/@dropins/storefront-account/src/api/createCustomerAddress/graphql/createCustomerAddress.graphql.ts","/@dropins/storefront-account/src/api/createCustomerAddress/createCustomerAddress.ts","/@dropins/storefront-account/src/api/getCustomerAddress/graphql/getCustomerAddress.graphql.ts","/@dropins/storefront-account/src/api/getCustomerAddress/getCustomerAddress.ts","/@dropins/storefront-account/src/api/getCountries/graphql/getCountries.graphql.ts","/@dropins/storefront-account/src/api/getCountries/getCountries.ts","/@dropins/storefront-account/src/api/getRegions/graphql/getRegions.graphql.ts","/@dropins/storefront-account/src/api/getRegions/getRegions.ts","/@dropins/storefront-account/src/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.ts","/@dropins/storefront-account/src/api/updateCustomerAddress/updateCustomerAddress.ts","/@dropins/storefront-account/src/api/getCustomer/graphql/getCustomer.graphql.ts","/@dropins/storefront-account/src/api/getCustomer/getCustomer.ts","/@dropins/storefront-account/src/api/getAdminAssistanceActions/graphql/getAdminAssistanceActions.graphql.ts","/@dropins/storefront-account/src/api/getAdminAssistanceActions/getAdminAssistanceActions.ts","/@dropins/storefront-account/src/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.ts","/@dropins/storefront-account/src/api/removeCustomerAddress/removeCustomerAddress.ts","/@dropins/storefront-account/src/api/getCustomerPaymentTokens/graphql/getCustomerPaymentTokens.graphql.ts","/@dropins/storefront-account/src/api/getCustomerPaymentTokens/getCustomerPaymentTokens.ts","/@dropins/storefront-account/src/api/deletePaymentToken/graphql/deletePaymentToken.graphql.ts","/@dropins/storefront-account/src/api/deletePaymentToken/deletePaymentToken.ts","/@dropins/storefront-account/src/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.ts","/@dropins/storefront-account/src/api/getOrderHistoryList/getOrderHistoryList.ts","/@dropins/storefront-account/src/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.ts","/@dropins/storefront-account/src/api/updateCustomerPassword/updateCustomerPassword.ts","/@dropins/storefront-account/src/api/getStoreConfig/graphql/getStoreConfig.graphql.ts","/@dropins/storefront-account/src/api/getStoreConfig/getStoreConfig.ts","/@dropins/storefront-account/src/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.ts","/@dropins/storefront-account/src/api/updateCustomerEmail/updateCustomerEmail.ts","/@dropins/storefront-account/src/api/updateCustomer/graphql/updateCustomer.graphql.ts","/@dropins/storefront-account/src/api/updateCustomer/updateCustomer.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { Initializer, Model } from '@adobe-commerce/elsie/lib';\nimport { Lang } from '@adobe-commerce/elsie/i18n';\nimport { OrderHistoryModel } from '@/account/data/models';\nimport { CustomerDataModelShort } from '@/account/data/models/customer';\n\ntype ConfigProps = {\n langDefinitions?: Lang;\n authHeaderConfig?: {\n header?: string;\n tokenPrefix?: string;\n };\n models?: {\n OrderHistoryModel?: Model<OrderHistoryModel>;\n CustomerDataModelShort?: Model<CustomerDataModelShort>;\n };\n};\n\nexport const initialize = new Initializer<ConfigProps>({\n init: async (config) => {\n const defaultConfig = {\n authHeaderConfig: {\n header: 'Authorization',\n tokenPrefix: 'Bearer',\n },\n };\n\n initialize.config.setConfig({ ...defaultConfig, ...config });\n },\n\n listeners: () => [],\n});\n\nexport const config = initialize.config;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FetchGraphQL } from '@adobe-commerce/fetch-graphql';\n\nexport const {\n setEndpoint,\n setFetchGraphQlHeader,\n removeFetchGraphQlHeader,\n setFetchGraphQlHeaders,\n fetchGraphQl,\n getConfig,\n} = new FetchGraphQL().getMethods();\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_ATTRIBUTES_FORM = /* GraphQL */ `\n query GET_ATTRIBUTES_FORM($formCode: String!) {\n attributesForm(formCode: $formCode) {\n items {\n code\n default_value\n entity_type\n frontend_class\n frontend_input\n is_required\n is_unique\n label\n options {\n is_default\n label\n value\n }\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n validate_rules {\n name\n value\n }\n }\n }\n errors {\n type\n message\n }\n }\n }\n`;\n\nexport const GET_ATTRIBUTES_FORM_SHORT = /* GraphQL */ `\n query GET_ATTRIBUTES_FORM_SHORT {\n attributesForm(formCode: \"customer_register_address\") {\n items {\n frontend_input\n label\n code\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n }\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { events } from '@adobe-commerce/event-bus';\n\n/**\n * A function which can be attached to fetchGraphQL to handle thrown errors in\n * a generic way.\n */\nexport const handleNetworkError = (error: Error) => {\n const isAbortError =\n error instanceof DOMException && error.name === 'AbortError';\n\n if (!isAbortError) {\n // @ts-ignore\n events.emit('error', {\n source: 'auth',\n type: 'network',\n error,\n });\n }\n throw error;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/** Actions */\nexport const handleFetchError = (errors: Array<{ message: string }>) => {\n const errorMessage = errors.map((e: any) => e.message).join(' ');\n\n throw Error(errorMessage);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const convertToCamelCase = (key: string): string => {\n return key.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());\n};\n\nexport const convertToSnakeCase = (key: string): string => {\n return key.replace(/([A-Z])/g, (letter) => `_${letter.toLowerCase()}`);\n};\n\nexport const convertKeysCase = (\n data: any,\n type: 'snakeCase' | 'camelCase',\n dictionary?: Record<string, string>\n): any => {\n const typeList = ['string', 'boolean', 'number'];\n const callback =\n type === 'camelCase' ? convertToCamelCase : convertToSnakeCase;\n\n if (Array.isArray(data)) {\n return data.map((element) => {\n if (typeList.includes(typeof element) || element === null) return element;\n\n if (typeof element === 'object') {\n return convertKeysCase(element, type, dictionary);\n }\n return element;\n });\n }\n\n if (data !== null && typeof data === 'object') {\n return Object.entries(data).reduce((acc, [key, value]) => {\n const newKey =\n dictionary && dictionary[key] ? dictionary[key] : callback(key);\n acc[newKey] =\n typeList.includes(typeof value) || value === null\n ? value\n : convertKeysCase(value, type, dictionary);\n return acc;\n }, {} as Record<string, unknown>);\n }\n\n return data;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n GetAttributesFormResponse,\n ResponseAttributesFormItemsProps,\n} from '@/account/types';\nimport { AttributesFormModel, FieldEnumList } from '../models';\nimport { convertToCamelCase } from '@/account/lib/convertCase';\n\nexport const cloneArrayIfExists = (\n fields: ResponseAttributesFormItemsProps[]\n) => {\n let multilineItems: any = [];\n\n for (const element of fields) {\n if (element.frontend_input !== 'MULTILINE' || element.multiline_count < 2) {\n continue;\n }\n\n for (let i = 2; i <= element.multiline_count; i++) {\n const newItem = {\n ...element,\n is_required: false,\n name: `${element.code}_multiline_${i}`,\n code: `${element.code}_multiline_${i}`,\n id: `${element.code}_multiline_${i}`,\n };\n\n multilineItems.push(newItem);\n }\n }\n\n return multilineItems;\n};\n\nconst transformCustomUpperCode = (code: string) => {\n switch (code) {\n case 'middlename':\n return 'middleName';\n case 'firstname':\n return 'firstName';\n case 'lastname':\n return 'lastName';\n default:\n return convertToCamelCase(code);\n }\n};\n\nconst transformOptions = (item: any) => {\n if (!item?.options) return [];\n\n return item?.options?.map((el: any) => {\n return {\n isDefault: el?.is_default ?? false,\n text: el?.label ?? '',\n value: el?.value ?? '',\n };\n });\n};\n\nexport const transformAttributesForm = (\n response: GetAttributesFormResponse\n): AttributesFormModel[] => {\n const items = response?.data?.attributesForm?.items || [];\n\n if (!items.length) return [];\n\n const fields = items\n .filter((el) => !el.frontend_input?.includes('HIDDEN'))\n ?.map(({ code, ...other }) => {\n const isDefaultCode = code !== 'country_id' ? code : 'country_code';\n\n return {\n ...other,\n name: isDefaultCode,\n id: isDefaultCode,\n code: isDefaultCode,\n };\n });\n\n const multilineItems = cloneArrayIfExists(fields as any);\n\n const attributesConfig = fields\n .concat(multilineItems)\n .map((item) => {\n return {\n code: item?.code,\n name: item?.name,\n id: item?.id,\n label: item?.label ?? '',\n entityType: item?.entity_type,\n className: item?.frontend_class ?? '',\n defaultValue: item?.default_value ?? '',\n fieldType: item?.frontend_input as FieldEnumList,\n multilineCount: item?.multiline_count ?? 0,\n orderNumber: Number(item?.sort_order) || 0,\n isHidden: false,\n isUnique: item?.is_unique ?? false,\n required: item?.is_required ?? false,\n validateRules: item?.validate_rules ?? [],\n options: transformOptions(item),\n customUpperCode: transformCustomUpperCode(item?.code),\n };\n })\n .sort((a, b) => Number(a.orderNumber) - Number(b.orderNumber));\n\n return attributesConfig;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CustomerAddressesModel } from '../models';\nimport { AddressResponse, UserAddressesProps } from '@/account/types';\nimport { convertKeysCase } from '@/account/lib/convertCase';\n\nconst expandArraysInObject = (inputObject: UserAddressesProps) => {\n const flattenedAttributes: Record<string, unknown> = {};\n\n for (const key in inputObject) {\n const element = inputObject[key as keyof UserAddressesProps];\n\n if (!Array.isArray(element) || element.length === 0) continue;\n\n if (key === 'custom_attributesV2') {\n element.forEach((item) => {\n if (typeof item === 'object' && 'value' in item) {\n flattenedAttributes[item?.code] = item?.value;\n }\n });\n } else if (element.length > 1) {\n element.forEach((value: unknown, index: number) => {\n index === 0\n ? (flattenedAttributes[key] = value)\n : (flattenedAttributes[`${key}_multiline_${index + 1}`] = value);\n });\n } else {\n flattenedAttributes[key] = element[0] as Record<string, string>;\n }\n }\n\n return flattenedAttributes;\n};\nconst transformFullName = (address: UserAddressesProps) => {\n return {\n prefix: address?.prefix ?? '',\n suffix: address?.suffix ?? '',\n firstname: address?.firstname ?? '',\n lastname: address?.lastname ?? '',\n middlename: address?.middlename ?? '',\n };\n};\n\nconst transformIds = (address: UserAddressesProps) => {\n return {\n id: address?.id ?? '',\n vat_id: address?.vat_id ?? '',\n postcode: address?.postcode ?? '',\n country_code: address?.country_code ?? '',\n uid: address?.uid ?? '',\n };\n};\n\nconst transformContacts = (address: UserAddressesProps) => {\n return {\n company: address?.company ?? '',\n telephone: address?.telephone ?? '',\n fax: address?.fax ?? '',\n };\n};\n\n// Function to transform a single address\nexport const transformSingleAddress = (\n addressData: UserAddressesProps\n): CustomerAddressesModel => {\n const result = convertKeysCase(\n {\n ...transformFullName(addressData),\n ...transformIds(addressData),\n ...transformContacts(addressData),\n city: addressData?.city ?? '',\n region: {\n region: addressData?.region?.region ?? '',\n region_code: addressData?.region?.region_code ?? '',\n region_id: addressData?.region?.region_id ?? '',\n },\n default_shipping: addressData?.default_shipping || false,\n default_billing: addressData?.default_billing || false,\n ...expandArraysInObject(addressData),\n },\n 'camelCase',\n {}\n );\n\n return result;\n};\n\n// Function to transform multiple addresses from a response\nexport const transformMultipleAddresses = (\n response: AddressResponse\n): CustomerAddressesModel[] | [] => {\n const addresses: UserAddressesProps[] =\n response?.data?.customer?.addresses || [];\n\n if (!addresses.length) return [];\n\n const result = addresses\n .map(transformSingleAddress)\n .sort(\n (a, b) =>\n (Number(b.defaultBilling) || Number(b.defaultShipping)) -\n (Number(a.defaultBilling) || Number(a.defaultShipping))\n );\n\n return result;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { getCustomerShortResponse } from '@/account/types';\nimport { CustomerDataModelShort } from '../models/customer';\nimport { convertToCamelCase } from '@/account/lib/convertCase';\nimport { config } from '@/account/api';\nimport { merge } from '@adobe-commerce/elsie/lib';\n\nexport const transformCustomer = (\n response: getCustomerShortResponse\n): CustomerDataModelShort => {\n const attributeList = response?.data?.customer?.custom_attributes\n ?.filter((el) => el)\n .reduce(\n (\n accumulator: Record<string, string | number | boolean>,\n currentValue\n ) => {\n const key = convertToCamelCase(currentValue.code as string);\n\n if (currentValue.selected_options?.length) {\n // Select/dropdown attribute — grab the first selected option's value\n accumulator[key] = currentValue.selected_options[0].value ?? '';\n } else {\n // Regular attribute\n accumulator[key] = currentValue.value ?? '';\n }\n\n return accumulator;\n },\n {} as Record<string, string | number | boolean>\n );\n\n const model = {\n email: response?.data?.customer?.email || '',\n firstName: response?.data?.customer?.firstname || '',\n lastName: response?.data?.customer?.lastname || '',\n middleName: response?.data?.customer?.middlename || '',\n gender: response?.data?.customer?.gender || '1',\n dateOfBirth: response?.data?.customer?.date_of_birth || '',\n prefix: response?.data?.customer?.prefix || '',\n suffix: response?.data?.customer?.suffix || '',\n createdAt: response?.data?.customer?.created_at || '',\n allowRemoteShoppingAssistance:\n response?.data?.customer?.allow_remote_shopping_assistance,\n ...attributeList,\n };\n\n return merge(\n model, // default transformer\n config\n ?.getConfig()\n ?.models?.CustomerDataModelShort?.transformer?.(response.data) // custom transformer\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CountriesFormResponse } from '@/account/types';\nimport { Country } from '../models';\n\nexport const transformCountries = (\n response: CountriesFormResponse\n): {\n availableCountries: Country[] | [];\n countriesWithRequiredRegion: string[];\n optionalZipCountries: string[];\n} => {\n if (!response?.data?.countries?.length) {\n return {\n availableCountries: [],\n countriesWithRequiredRegion: [],\n optionalZipCountries: [],\n };\n }\n\n const { countries, storeConfig } = response.data;\n\n const countriesWithRequiredRegion =\n storeConfig?.countries_with_required_region.split(',');\n const optionalZipCountries = storeConfig?.optional_zip_countries.split(',');\n\n const availableCountries = countries\n .filter(({ two_letter_abbreviation, full_name_locale }) =>\n Boolean(two_letter_abbreviation && full_name_locale)\n )\n .map((country) => {\n const { two_letter_abbreviation, full_name_locale, available_regions } = country;\n\n const hasRegions = Array.isArray(available_regions) && available_regions.length > 0;\n return {\n value: two_letter_abbreviation,\n text: full_name_locale,\n availableRegions: hasRegions ? available_regions : undefined,\n };\n })\n .sort((a, b) => a.text.localeCompare(b.text));\n\n return {\n availableCountries,\n countriesWithRequiredRegion,\n optionalZipCountries,\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { RegionsFormResponse } from '@/account/types';\nimport { Region, RegionTransform } from '../models';\n\nexport const transformRegions = (\n response: RegionsFormResponse\n): RegionTransform[] | [] => {\n const availableRegions = response?.data?.country?.available_regions;\n if (!availableRegions) return [];\n\n const regions = availableRegions\n .filter((item) => {\n if (!item) return false;\n\n const { id, code, name } = item;\n return Boolean(id && code && name);\n })\n .map((region) => {\n const { id } = region as Region;\n\n return { id, text: region.name, value: `${region.code},${region.id}` };\n });\n\n return regions;\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/**\n * Formats a date string according to a specified locale and options.\n * Returns \"Invalid Date\" if the input date string is invalid.\n *\n * @param {string} date - The date string to be formatted.\n * @param {string} [locale='en-US'] - The locale to use for formatting. Defaults to 'en-US'.\n * @param {Intl.DateTimeFormatOptions} [options={}] - Optional formatting options to customize the output.\n * @returns {string} The formatted date string, or \"Invalid Date\" if the input is invalid.\n *\n * @example\n * // Default formatting (en-US locale, MM/DD/YYYY)\n * console.log(formatDateToLocale('2023-08-29'));\n * // Output: \"08/29/2023\"\n *\n * @example\n * // Formatting with a specified locale (e.g., en-GB for DD/MM/YYYY)\n * console.log(formatDateToLocale('2023-08-29', 'en-GB'));\n * // Output: \"29/08/2023\"\n *\n * @example\n * // Formatting with a specified locale and custom options (e.g., de-DE with long month format)\n * console.log(formatDateToLocale('2023-08-29', 'de-DE', { month: 'long', year: 'numeric' }));\n * // Output: \"29. August 2023\"\n *\n * @example\n * // Handling an invalid date string\n * console.log(formatDateToLocale('invalid-date'));\n * // Output: \"Invalid Date\"\n */\nexport const formatDateToLocale = (\n date: string,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = {}\n): string => {\n const defaultOptions: Intl.DateTimeFormatOptions = {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n };\n // ISO date-only strings parse as UTC midnight; formatting in the host timezone\n // shifts the calendar day west of UTC. Use UTC for display so the date matches\n // the string in every environment (callers can override via `options.timeZone`).\n const isDateOnly = /^\\d{4}-\\d{2}-\\d{2}$/.test(date.trim());\n\n const formatOptions: Intl.DateTimeFormatOptions = {\n ...defaultOptions,\n ...(isDateOnly ? { timeZone: 'UTC' } : {}),\n ...options,\n };\n\n const dateObj = new Date(date.trim());\n\n if (isNaN(dateObj.getTime())) {\n return 'Invalid Date';\n }\n\n const formatter = new Intl.DateTimeFormat(locale, formatOptions);\n return formatter.format(dateObj);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\n/**\n * Formats a time string according to a specified locale and options.\n * Returns \"Invalid Time\" if the input date string is invalid.\n *\n * @param {string} date - The date string to be formatted.\n * @param {string} [locale='en-US'] - The locale to use for formatting. Defaults to 'en-US'.\n * @param {Intl.DateTimeFormatOptions} [options={}] - Optional formatting options to customize the output.\n * @returns {string} The formatted time string, or \"Invalid Time\" if the input is invalid.\n *\n * @example\n * // Default formatting (en-US locale)\n * console.log(formatTimeToLocale('2023-08-29 12:34'));\n * // Output: \"12:34 AM\"\n */\nexport const formatTimeToLocale = (\n date: string,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = {}\n): string => {\n const defaultOptions: Intl.DateTimeFormatOptions = {\n hour: '2-digit',\n minute: '2-digit',\n };\n const formatOptions: Intl.DateTimeFormatOptions = {\n ...defaultOptions,\n ...options,\n };\n\n const dateObj = new Date(date);\n\n if (isNaN(dateObj.getTime())) {\n return 'Invalid Time';\n }\n\n const formatter = new Intl.DateTimeFormat(locale, formatOptions);\n return formatter.format(dateObj);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n OrderHistoryListResponse, OrderItemProps,\n OrderProps,\n ReturnProps,\n} from '@/account/types';\nimport { OrderHistoryModel } from '@/account/data/models';\nimport { transformSingleAddress } from '@/account/data/transforms/transform-customer-address';\nimport { formatDateToLocale } from '@/account/lib/formatDateToLocale';\nimport { formatTimeToLocale } from '@/account/lib/formatTimeToLocale';\nimport { config } from '@/account/api';\nimport { merge } from '@adobe-commerce/elsie/lib';\n\nconst initialMoneyProps = {\n value: 0,\n currency: 'USD',\n};\n\nconst transformOrderHistoryTotal = (item: any) => {\n return {\n subtotal: item?.total?.subtotal ?? initialMoneyProps,\n grandTotal: item?.total?.grand_total ?? initialMoneyProps,\n grandTotalExclTax: item?.total?.grand_total_excl_tax ?? initialMoneyProps,\n totalGiftcard: item?.total?.total_giftcard ?? initialMoneyProps,\n subtotalExclTax: item?.total?.subtotal_excl_tax ?? initialMoneyProps,\n subtotalInclTax: item?.total?.subtotal_incl_tax ?? initialMoneyProps,\n taxes: item?.total?.taxes ?? [],\n totalTax: item?.total?.total_tax ?? initialMoneyProps,\n totalShipping: item?.total?.total_shipping ?? initialMoneyProps,\n discounts: item?.total?.discounts ?? [],\n };\n};\n\nexport const transformOrderHistoryList = (\n response: OrderHistoryListResponse\n): OrderHistoryModel | null => {\n if (!response.data?.customer?.orders) return null;\n\n const returns = response?.data?.customer?.returns ?? [];\n const items = response?.data?.customer?.orders?.items ?? [];\n\n const model = {\n items: items.map((item: OrderProps) => {\n return {\n adminAssistedOrder: item?.admin_assisted_order ?? null,\n items: item?.items.map((element: OrderItemProps) => ({\n status: element?.status ?? '',\n productName: element?.product_name ?? '',\n id: element?.id,\n quantityOrdered: element?.quantity_ordered ?? 0,\n quantityShipped: element?.quantity_shipped ?? 0,\n quantityInvoiced: element?.quantity_invoiced ?? 0,\n sku: element?.product_sku ?? '',\n urlKey: element?.product_url_key ?? '',\n topLevelSku: element?.product?.sku ?? '',\n product: {\n smallImage: {\n url: element?.product?.small_image?.url ?? '',\n },\n },\n })),\n token: item?.token,\n email: item?.email,\n shippingMethod: item?.shipping_method,\n paymentMethods: item?.payment_methods ?? [],\n shipments: item?.shipments ?? [],\n id: item?.id,\n carrier: item?.carrier,\n status: item?.status,\n number: item?.number,\n returns: returns?.items?.filter(\n (returnItem: ReturnProps) => returnItem.order.id === item.id\n ),\n orderDate: formatDateToLocale(item.order_date),\n orderTime: formatTimeToLocale(item.order_date),\n shippingAddress: transformSingleAddress(item.shipping_address),\n billingAddress: transformSingleAddress(item.billing_address),\n total: transformOrderHistoryTotal(item),\n };\n }),\n pageInfo: {\n pageSize: response?.data?.customer?.orders?.page_info?.page_size ?? 10,\n totalPages: response?.data?.customer?.orders?.page_info?.total_pages ?? 1,\n currentPage:\n response?.data?.customer?.orders?.page_info?.current_page ?? 1,\n },\n totalCount: response?.data?.customer?.orders?.total_count ?? 0,\n dateOfFirstOrder:\n response?.data?.customer?.orders?.date_of_first_order ?? '',\n };\n\n return merge(\n model, // default transformer\n config?.getConfig()?.models?.OrderHistoryModel?.transformer?.(response.data) // custom transformer\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GetStoreConfigResponse } from '@/account/types';\nimport { StoreConfigModel } from '../models';\n\nexport const transformStoreConfig = (\n response: GetStoreConfigResponse\n): StoreConfigModel => {\n return {\n baseMediaUrl: response?.data?.storeConfig?.base_media_url,\n minLength: +response?.data?.storeConfig?.minimum_password_length || 3,\n requiredCharacterClasses:\n +response?.data?.storeConfig?.required_character_classes_number || 0,\n storeCode: response?.data?.storeConfig?.store_code ?? '',\n shoppingAssistanceEnabled:\n response?.data?.storeConfig?.shopping_assistance_enabled ?? false,\n shoppingAssistanceCheckboxTitle:\n response?.data?.storeConfig?.shopping_assistance_checkbox_title || '',\n shoppingAssistanceCheckboxTooltip:\n response?.data?.storeConfig?.shopping_assistance_checkbox_tooltip || '',\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n AccountModel,\n CustomerDataModelShort,\n} from '@/account/data/models/customer';\n\n/**\n * Reference:\n * https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-collector/src/handlers/account/editAccountAEP.ts\n */\nexport const transformAccount = (\n data: CustomerDataModelShort\n): AccountModel => {\n return {\n firstName: data.firstName,\n lastName: data.lastName,\n emailAddress: data?.email || '',\n accountId: data?.email || '',\n };\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { CustomerPaymentTokenItem } from '@/account/types';\nimport { StoredPaymentMethodDisplay } from '@/account/data/models/stored-payment-method';\n\n/**\n * Maps vault `brand` / legacy `type` codes (Payment Services, Braintree, etc.) to display labels.\n * Keys are uppercase with spaces normalized to underscores.\n */\nconst CARD_BRAND_LABELS: Record<string, string> = {\n // Legacy short `type` codes\n VI: 'Visa',\n MC: 'Mastercard',\n MD: 'Maestro',\n AE: 'American Express',\n DI: 'Discover',\n DN: 'Diners',\n JCB: 'JCB',\n UN: 'UnionPay',\n // Full `brand` strings (e.g. Adobe Payment Services vault JSON)\n VISA: 'Visa',\n MASTERCARD: 'Mastercard',\n MAESTRO: 'Maestro',\n AMEX: 'American Express',\n AMERICAN_EXPRESS: 'American Express',\n DISCOVER: 'Discover',\n DINERS: 'Diners',\n DINERS_CLUB: 'Diners',\n UNIONPAY: 'UnionPay',\n};\n\ntype VaultDetails = {\n brand?: string;\n type?: string;\n maskedCC?: string;\n expirationDate?: string;\n lastFour?: string;\n last_four?: string;\n ccLast4?: string;\n cc_last4?: string;\n};\n\nfunction parseVaultDetails(details: string): VaultDetails | null {\n try {\n return JSON.parse(details) as VaultDetails;\n } catch {\n return null;\n }\n}\n\nfunction normalizeBrandKey(value: string): string {\n return value.trim().toUpperCase().replaceAll(/\\s+/g, '_');\n}\n\nfunction isUnknownPlaceholder(value: string | undefined): boolean {\n return !value?.trim() || normalizeBrandKey(value) === 'UNKNOWN';\n}\n\nfunction labelForBrandOrTypeCode(code: string | undefined): string | undefined {\n if (!code?.trim()) return undefined;\n\n return CARD_BRAND_LABELS[normalizeBrandKey(code)];\n}\n\n/** Human-readable fallback when the API sends an unmapped brand string. */\nfunction titleCaseBrandFallback(raw: string): string {\n return raw\n .replaceAll('_', ' ')\n .toLowerCase()\n .split(/\\s+/)\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(' ');\n}\n\nfunction resolveCardBrandLabel(\n parsed: VaultDetails | null,\n item: CustomerPaymentTokenItem\n): string {\n const brandRaw = parsed?.brand?.trim();\n const typeRaw = parsed?.type?.trim();\n\n if (!isUnknownPlaceholder(brandRaw)) {\n const mapped = labelForBrandOrTypeCode(brandRaw);\n if (mapped) return mapped;\n\n return titleCaseBrandFallback(brandRaw!);\n }\n\n if (!isUnknownPlaceholder(typeRaw)) {\n const mapped = labelForBrandOrTypeCode(typeRaw);\n if (mapped) return mapped;\n\n return typeRaw!;\n }\n\n return item.payment_method_code;\n}\n\n/** End of calendar month for MM/YYYY (e.g. 09/2022). */\nexport function isExpirationDatePast(expirationDate: string | undefined): boolean {\n if (!expirationDate) return false;\n\n const match = /^(\\d{1,2})\\/(\\d{4})$/.exec(expirationDate.trim());\n if (!match) return false;\n\n const month = Number.parseInt(match[1], 10);\n const year = Number.parseInt(match[2], 10);\n if (month < 1 || month > 12) return false;\n\n const endOfExpiryMonth = new Date(year, month, 0, 23, 59, 59, 999);\n\n return Date.now() > endOfExpiryMonth.getTime();\n}\n\nfunction tokenMatchesFilter(\n item: CustomerPaymentTokenItem,\n filterPaymentMethodCodes: string[]\n): boolean {\n return filterPaymentMethodCodes.some(\n (code) =>\n item.payment_method_code === code ||\n item.payment_method_code.startsWith(`${code}_`)\n );\n}\n\n/** Prefer {@link PaymentCard} props: last four from common vault `details` shapes. */\nfunction extractLastFourDigits(\n parsed: VaultDetails | null,\n rawDetails: string\n): string {\n const fromMasked = (value: string | undefined) => {\n if (!value) return '';\n const digits = value.replaceAll(/\\D/g, '');\n\n return digits.length >= 4 ? digits.slice(-4) : '';\n };\n\n if (parsed) {\n const direct =\n fromMasked(parsed.maskedCC) ||\n fromMasked(parsed.lastFour) ||\n fromMasked(parsed.last_four) ||\n fromMasked(parsed.ccLast4) ||\n fromMasked(parsed.cc_last4);\n\n if (direct) return direct;\n }\n\n return rawDetails.match(/\\d{4}/g)?.at(-1) ?? '';\n}\n\n/** When details omit card last-four, still drive {@link PaymentCard} with a short stable suffix. */\nfunction fallbackLastFourFromHash(publicHash: string): string {\n const alnum = publicHash.replaceAll(/[^a-zA-Z0-9]/g, '');\n\n if (alnum.length >= 4) return alnum.slice(-4).toUpperCase();\n\n return alnum.padEnd(4, '0').slice(0, 4).toUpperCase();\n}\n\nfunction mapTokenToDisplay(\n item: CustomerPaymentTokenItem\n): StoredPaymentMethodDisplay | null {\n if (!item.public_hash) return null;\n\n const parsed = parseVaultDetails(item.details);\n const cardBrand = resolveCardBrandLabel(parsed, item);\n const lastFour =\n extractLastFourDigits(parsed, item.details) ||\n fallbackLastFourFromHash(item.public_hash);\n\n return {\n publicHash: item.public_hash,\n cardBrand,\n lastFourDigits: lastFour,\n expired: isExpirationDatePast(parsed?.expirationDate),\n };\n}\n\nexport function transformStoredPaymentTokens(\n items: CustomerPaymentTokenItem[],\n filterPaymentMethodCodes?: string[]\n): StoredPaymentMethodDisplay[] {\n const filtered =\n filterPaymentMethodCodes?.length ?\n items.filter((item) => tokenMatchesFilter(item, filterPaymentMethodCodes))\n : items;\n\n return filtered\n .map((item) => mapTokenToDisplay(item))\n .filter((row): row is StoredPaymentMethodDisplay => row !== null);\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { AdminAssistanceActionsResponse } from '@/account/types';\nimport { AdminAssistanceActions } from '@/account/data/models';\n\nexport function transformAdminAssistanceActions(\n response: AdminAssistanceActionsResponse\n): AdminAssistanceActions | null {\n const adminAssistanceActions =\n response?.data?.customer?.admin_assistance_actions;\n\n if (!adminAssistanceActions) {\n return null;\n }\n\n return {\n totalCount: adminAssistanceActions.total_count || 0,\n items:\n adminAssistanceActions.items?.map((item) => ({\n action: item.action || '',\n date: item.date || '',\n details: item.details || '',\n })) || [],\n pageInfo: {\n currentPage: adminAssistanceActions.page_info?.current_page || 1,\n pageSize: adminAssistanceActions.page_info?.page_size || 10,\n totalPages: adminAssistanceActions.page_info?.total_pages || 1,\n },\n };\n}\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport {\n GET_ATTRIBUTES_FORM,\n GET_ATTRIBUTES_FORM_SHORT,\n} from './graphql/getAttributesForm.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { transformAttributesForm } from '@/account/data/transforms';\nimport { AttributesFormModel } from '@/account/data/models';\nimport { GetAttributesFormResponse } from '@/account/types';\n\nexport const getAttributesForm = async (\n formCode: string\n): Promise<AttributesFormModel[]> => {\n const sessionStorageKey = `_account_attributesForm_${formCode}`;\n\n const sessionStorageCache = sessionStorage.getItem(sessionStorageKey);\n\n if (sessionStorageCache) {\n return JSON.parse(sessionStorageCache);\n }\n\n return await fetchGraphQl(\n formCode !== 'shortRequest'\n ? GET_ATTRIBUTES_FORM\n : GET_ATTRIBUTES_FORM_SHORT,\n {\n method: 'GET',\n cache: 'force-cache',\n variables: { formCode },\n }\n )\n .then((response: GetAttributesFormResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const transformedData = transformAttributesForm(response);\n\n sessionStorage.setItem(\n sessionStorageKey,\n JSON.stringify(transformedData)\n );\n\n return transformedData;\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const CREATE_CUSTOMER_ADDRESS = /* GraphQL */ `\n mutation CREATE_CUSTOMER_ADDRESS($input: CustomerAddressInput!) {\n createCustomerAddress(input: $input) {\n firstname\n uid\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n CreateCustomerAddressResponse,\n CreateCustomerAddressResult,\n} from '@/account/types';\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { CREATE_CUSTOMER_ADDRESS } from './graphql/createCustomerAddress.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { convertKeysCase } from '@/account/lib/convertCase';\nimport { CustomerAddressesModel } from '@/account/data/models';\n\nexport const createCustomerAddress = async (\n address: CustomerAddressesModel\n): Promise<CreateCustomerAddressResult> => {\n return await fetchGraphQl(CREATE_CUSTOMER_ADDRESS, {\n method: 'POST',\n variables: {\n input: convertKeysCase(address, 'snakeCase', {\n custom_attributesV2: 'custom_attributesV2',\n firstName: 'firstname',\n lastName: 'lastname',\n middleName: 'middlename',\n }),\n },\n })\n .then((response: CreateCustomerAddressResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const created = response?.data?.createCustomerAddress;\n return {\n firstname: created?.firstname ?? '',\n uid: created?.uid ?? '',\n };\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_CUSTOMER_ADDRESS = /* GraphQL */ `\n query GET_CUSTOMER_ADDRESS {\n customer {\n addresses {\n firstname\n lastname\n middlename\n fax\n prefix\n suffix\n city\n company\n country_code\n region {\n region\n region_code\n region_id\n }\n custom_attributesV2 {\n ... on AttributeValue {\n code\n value\n }\n }\n telephone\n id\n vat_id\n postcode\n street\n default_shipping\n default_billing\n uid\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { GET_CUSTOMER_ADDRESS } from './graphql/getCustomerAddress.graphql';\nimport { transformMultipleAddresses } from '@/account/data/transforms';\nimport { CustomerAddressesModel } from '@/account/data/models/customer-address';\nimport { AddressResponse } from '@/account/types';\nimport { handleFetchError } from '@/account/lib/fetch-error';\n\nexport const getCustomerAddress = async (): Promise<\n CustomerAddressesModel[]\n> => {\n return await fetchGraphQl(GET_CUSTOMER_ADDRESS, {\n method: 'GET',\n cache: 'no-cache',\n })\n .then((response: AddressResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformMultipleAddresses(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_COUNTRIES_QUERY = /* GraphQL */ `\n query GET_COUNTRIES_QUERY {\n countries {\n two_letter_abbreviation\n full_name_locale\n available_regions {\n id\n code\n name\n }\n }\n storeConfig {\n countries_with_required_region\n optional_zip_countries\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { GET_COUNTRIES_QUERY } from './graphql/getCountries.graphql';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { transformCountries } from '@/account/data/transforms';\nimport { CountriesFormResponse } from '@/account/types';\nimport { Country } from '@/account/data/models';\n\nexport const getCountries = async (): Promise<{\n availableCountries: Country[] | [];\n countriesWithRequiredRegion: string[];\n optionalZipCountries: string[];\n}> => {\n const sessionStorageKey = '_account_countries';\n\n const sessionStorageCache = sessionStorage.getItem(sessionStorageKey);\n\n if (sessionStorageCache) {\n return JSON.parse(sessionStorageCache);\n }\n\n return await fetchGraphQl(GET_COUNTRIES_QUERY, {\n method: 'GET',\n cache: 'no-cache',\n })\n .then((response: CountriesFormResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const transformedData = transformCountries(response);\n\n sessionStorage.setItem(\n sessionStorageKey,\n JSON.stringify(transformedData)\n );\n\n return transformedData;\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_REGIONS = /* GraphQL */ `\n query GET_REGIONS($countryCode: String!) {\n country(id: $countryCode) {\n id\n available_regions {\n id\n code\n name\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { GET_REGIONS } from './graphql/getRegions.graphql';\nimport { transformRegions } from '@/account/data/transforms';\nimport { RegionsFormResponse } from '@/account/types';\nimport { RegionTransform } from '@/account/data/models';\n\nexport const getRegions = async (\n countryCode: string\n): Promise<RegionTransform[] | []> => {\n const sessionStorageKey = `_account_regions_${countryCode}`;\n\n const sessionStorageCache = sessionStorage.getItem(sessionStorageKey);\n\n if (sessionStorageCache) {\n return JSON.parse(sessionStorageCache);\n }\n\n return await fetchGraphQl(GET_REGIONS, {\n method: 'GET',\n cache: 'no-cache',\n variables: { countryCode },\n })\n .then((response: RegionsFormResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const transformedData = transformRegions(response);\n\n sessionStorage.setItem(\n sessionStorageKey,\n JSON.stringify(transformedData)\n );\n\n return transformedData;\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const UPDATE_CUSTOMER_ADDRESS = /* GraphQL */ `\n mutation UPDATE_CUSTOMER_ADDRESS($id: Int!, $input: CustomerAddressInput) {\n updateCustomerAddress(id: $id, input: $input) {\n firstname\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { UPDATE_CUSTOMER_ADDRESS } from './graphql/updateCustomerAddress.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { UpdateCustomerAddressResponse } from '@/account/types';\nimport { CustomerAddressesModel } from '@/account/data/models';\nimport { convertKeysCase } from '@/account/lib/convertCase';\n\ntype ExtendedAddressFormProps = CustomerAddressesModel & {\n addressId: number;\n};\n\nexport const updateCustomerAddress = async (\n forms: ExtendedAddressFormProps\n): Promise<string> => {\n const { addressId, ...address } = forms;\n\n if (!addressId) return '';\n\n return await fetchGraphQl(UPDATE_CUSTOMER_ADDRESS, {\n method: 'POST',\n variables: {\n id: Number(addressId),\n input: convertKeysCase(address, 'snakeCase', {\n custom_attributesV2: 'custom_attributesV2',\n firstName: 'firstname',\n lastName: 'lastname',\n middleName: 'middlename',\n }),\n },\n })\n .then((response: UpdateCustomerAddressResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response?.data?.updateCustomerAddress?.firstname || '';\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { BASIC_CUSTOMER_INFO_FRAGMENT } from '@/account/api/graphql/CustomerFragment.graphql';\n\nexport const GET_CUSTOMER = /* GraphQL */ `\n query GET_CUSTOMER {\n customer {\n ...BASIC_CUSTOMER_INFO_FRAGMENT\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n ... on AttributeSelectedOptions {\n code\n selected_options {\n value\n }\n }\n code\n }\n }\n }\n ${BASIC_CUSTOMER_INFO_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { GET_CUSTOMER } from './graphql/getCustomer.graphql';\nimport { transformCustomer } from '@/account/data/transforms';\nimport { CustomerDataModelShort } from '@/account/data/models/customer';\nimport { getCustomerShortResponse } from '@/account/types';\n\nexport const getCustomer = async (): Promise<CustomerDataModelShort> => {\n return await fetchGraphQl(GET_CUSTOMER, {\n method: 'GET',\n cache: 'no-cache',\n })\n .then((response: getCustomerShortResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformCustomer(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_ADMIN_ASSISTANCE_ACTIONS = /* GraphQL */ `\n query GET_ADMIN_ASSISTANCE_ACTIONS($currentPage: Int, $pageSize: Int) {\n customer {\n admin_assistance_actions(\n pageSize: $pageSize\n currentPage: $currentPage\n ) {\n total_count\n items {\n action\n date\n details\n }\n page_info {\n current_page\n page_size\n total_pages\n }\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { AdminAssistanceActions } from '@/account/data/models';\nimport { transformAdminAssistanceActions } from '@/account/data/transforms';\nimport { AdminAssistanceActionsResponse } from '@/account/types';\nimport { GET_ADMIN_ASSISTANCE_ACTIONS } from './graphql/getAdminAssistanceActions.graphql';\n\nexport const getAdminAssistanceActions = async (\n pageSize: number,\n currentPage: number\n): Promise<AdminAssistanceActions | null> => {\n return await fetchGraphQl(GET_ADMIN_ASSISTANCE_ACTIONS, {\n method: 'GET',\n cache: 'no-cache',\n variables: {\n pageSize,\n currentPage,\n },\n })\n .then((response: AdminAssistanceActionsResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformAdminAssistanceActions(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const REMOVE_CUSTOMER_ADDRESS = /* GraphQL */ `\n mutation REMOVE_CUSTOMER_ADDRESS($id: Int!) {\n deleteCustomerAddress(id: $id)\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { REMOVE_CUSTOMER_ADDRESS } from './graphql/removeCustomerAddress.graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { RemoveCustomerAddressResponse } from '@/account/types';\n\nexport const removeCustomerAddress = async (\n addressId: number\n): Promise<boolean> => {\n return await fetchGraphQl(REMOVE_CUSTOMER_ADDRESS, {\n method: 'POST',\n variables: { id: addressId },\n })\n .then((response: RemoveCustomerAddressResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response.data.deleteCustomerAddress;\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_CUSTOMER_PAYMENT_TOKENS = /* GraphQL */ `\n query getCustomerPaymentTokens {\n customerPaymentTokens {\n items {\n details\n public_hash\n payment_method_code\n type\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { GET_CUSTOMER_PAYMENT_TOKENS } from './graphql/getCustomerPaymentTokens.graphql';\nimport { GetCustomerPaymentTokensResponse } from '@/account/types';\nimport { transformStoredPaymentTokens } from '@/account/data/transforms';\nimport { StoredPaymentMethodDisplay } from '@/account/data/models/stored-payment-method';\n\nexport const getCustomerPaymentTokens = async (\n filterPaymentMethodCodes?: string[]\n): Promise<StoredPaymentMethodDisplay[]> => {\n return await fetchGraphQl(GET_CUSTOMER_PAYMENT_TOKENS, {\n method: 'GET',\n cache: 'no-cache',\n })\n .then((response: GetCustomerPaymentTokensResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n const items = response.data?.customerPaymentTokens?.items ?? [];\n\n return transformStoredPaymentTokens(items, filterPaymentMethodCodes);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const DELETE_PAYMENT_TOKEN = /* GraphQL */ `\n mutation deletePaymentToken($public_hash: String!) {\n deletePaymentToken(public_hash: $public_hash) {\n result\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { fetchGraphQl } from '@/account/api/fetch-graphql';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { DELETE_PAYMENT_TOKEN } from './graphql/deletePaymentToken.graphql';\nimport { DeletePaymentTokenResponse } from '@/account/types';\n\nexport const deletePaymentToken = async (\n publicHash: string\n): Promise<boolean> => {\n return await fetchGraphQl(DELETE_PAYMENT_TOKEN, {\n method: 'POST',\n variables: { public_hash: publicHash },\n })\n .then((response: DeletePaymentTokenResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return Boolean(response.data?.deletePaymentToken?.result);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n ADDRESS_FRAGMENT,\n ORDER_SUMMARY_FRAGMENT,\n CUSTOMER_ORDER_FRAGMENT,\n} from '@/account/api/fragments';\n\nexport const GET_CUSTOMER_ORDERS_LIST = /* GraphQL */ `\n query GET_CUSTOMER_ORDERS_LIST(\n $currentPage: Int\n $pageSize: Int\n $filter: CustomerOrdersFilterInput\n $sort: CustomerOrderSortInput\n ) {\n customer {\n returns {\n items {\n uid\n number\n order {\n id\n }\n }\n }\n orders(\n currentPage: $currentPage\n pageSize: $pageSize\n filter: $filter\n sort: $sort\n ) {\n page_info {\n page_size\n total_pages\n current_page\n }\n date_of_first_order\n total_count\n items {\n ...CUSTOMER_ORDER_FRAGMENT\n shipping_address {\n ...ADDRESS_FRAGMENT\n }\n billing_address {\n ...ADDRESS_FRAGMENT\n }\n total {\n ...ORDER_SUMMARY_FRAGMENT\n }\n }\n }\n }\n }\n ${CUSTOMER_ORDER_FRAGMENT}\n ${ADDRESS_FRAGMENT}\n ${ORDER_SUMMARY_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '@/account/api';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { GET_CUSTOMER_ORDERS_LIST } from './graphql/getOrderHistoryList.graphql';\nimport { OrderHistoryListResponse } from '@/account/types';\nimport { transformOrderHistoryList } from '@/account/data/transforms';\nimport { OrderHistoryModel } from '@/account/data/models';\n\nconst SORT_DIRECTION = { sort_direction: 'DESC', sort_field: 'CREATED_AT' };\n\nexport const getOrderHistoryList = async (\n pageSize: number,\n selectOrdersDate: string,\n currentPage: number\n): Promise<OrderHistoryModel | null> => {\n const filterOrderDate = !selectOrdersDate.includes('viewAll')\n ? {\n order_date: JSON.parse(selectOrdersDate),\n }\n : {};\n\n return await fetchGraphQl(GET_CUSTOMER_ORDERS_LIST, {\n method: 'GET',\n cache: 'no-cache',\n variables: {\n pageSize,\n currentPage,\n filter: filterOrderDate,\n sort: SORT_DIRECTION,\n },\n })\n .then((response: OrderHistoryListResponse) => {\n return transformOrderHistoryList(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const CHANGE_CUSTOMER_PASSWORD = /* GraphQL */ `\n mutation CHANGE_CUSTOMER_PASSWORD(\n $currentPassword: String!\n $newPassword: String!\n ) {\n changeCustomerPassword(\n currentPassword: $currentPassword\n newPassword: $newPassword\n ) {\n email\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport {\n ChangeCustomerPasswordProps,\n ChangeCustomerPasswordResponse,\n} from '@/account/types';\nimport { CHANGE_CUSTOMER_PASSWORD } from './graphql/updateCustomerPassword.graphql';\n\nexport const updateCustomerPassword = async ({\n currentPassword,\n newPassword,\n}: ChangeCustomerPasswordProps): Promise<string> => {\n return await fetchGraphQl(CHANGE_CUSTOMER_PASSWORD, {\n method: 'POST',\n variables: { currentPassword, newPassword },\n })\n .then((response: ChangeCustomerPasswordResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response?.data?.changeCustomerPassword?.email || '';\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const GET_STORE_CONFIG = /* GraphQL */ `\n query GET_STORE_CONFIG {\n storeConfig {\n base_media_url\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n store_code\n shopping_assistance_enabled\n shopping_assistance_checkbox_title\n shopping_assistance_checkbox_tooltip\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { GET_STORE_CONFIG } from './graphql/getStoreConfig.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { GetStoreConfigResponse } from '@/account/types';\nimport { transformStoreConfig } from '@/account/data/transforms';\nimport { StoreConfigModel } from '@/account/data/models';\n\nexport const getStoreConfig = async (): Promise<StoreConfigModel> => {\n return await fetchGraphQl(GET_STORE_CONFIG, {\n method: 'GET',\n cache: 'force-cache',\n })\n .then((response: GetStoreConfigResponse) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return transformStoreConfig(response);\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const UPDATE_CUSTOMER_EMAIL = /* GraphQL */ `\n mutation UPDATE_CUSTOMER_EMAIL($email: String!, $password: String!) {\n updateCustomerEmail(email: $email, password: $password) {\n customer {\n email\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { UPDATE_CUSTOMER_EMAIL } from './graphql/updateCustomerEmail.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\n\nexport const updateCustomerEmail = async ({\n email,\n password,\n}: {\n email: string;\n password: string;\n}): Promise<string> => {\n return await fetchGraphQl(UPDATE_CUSTOMER_EMAIL, {\n method: 'POST',\n variables: { email, password },\n })\n .then((response) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response?.data?.updateCustomerEmail?.customer?.email || '';\n })\n .catch(handleNetworkError);\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nexport const UPDATE_CUSTOMER_V2 = /* GraphQL */ `\n mutation UPDATE_CUSTOMER_V2($input: CustomerUpdateInput!) {\n updateCustomerV2(input: $input) {\n customer {\n email\n allow_remote_shopping_assistance\n }\n }\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2026 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { fetchGraphQl } from '../fetch-graphql';\nimport { UPDATE_CUSTOMER_V2 } from './graphql/updateCustomer.graphql';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { handleFetchError } from '@/account/lib/fetch-error';\nimport { convertKeysCase } from '@/account/lib/convertCase';\n\nexport const updateCustomer = async (\n form: Record<string, string | boolean>\n): Promise<string> => {\n return await fetchGraphQl(UPDATE_CUSTOMER_V2, {\n method: 'POST',\n variables: {\n input: convertKeysCase(form, 'snakeCase', {\n firstName: 'firstname',\n lastName: 'lastname',\n middleName: 'middlename',\n dob: 'date_of_birth',\n custom_attributesV2: 'custom_attributes',\n }),\n },\n })\n .then((response) => {\n if (response.errors?.length) return handleFetchError(response.errors);\n\n return response?.data?.updateCustomerV2?.customer?.email || '';\n })\n .catch(handleNetworkError);\n};\n"],"names":["initialize","Initializer","config","defaultConfig","setEndpoint","setFetchGraphQlHeader","removeFetchGraphQlHeader","setFetchGraphQlHeaders","fetchGraphQl","getConfig","FetchGraphQL","GET_ATTRIBUTES_FORM","GET_ATTRIBUTES_FORM_SHORT","handleNetworkError","error","events","handleFetchError","errors","errorMessage","e","convertToCamelCase","key","_","letter","convertToSnakeCase","convertKeysCase","data","type","dictionary","typeList","callback","element","acc","value","newKey","cloneArrayIfExists","fields","multilineItems","i","newItem","transformCustomUpperCode","code","transformOptions","item","_a","el","transformAttributesForm","response","items","_b","_c","other","isDefaultCode","a","b","expandArraysInObject","inputObject","flattenedAttributes","index","transformFullName","address","transformIds","transformContacts","transformSingleAddress","addressData","transformMultipleAddresses","addresses","transformCustomer","attributeList","accumulator","currentValue","model","_e","_d","_g","_f","_i","_h","_k","_j","_m","_l","_o","_n","_q","_p","_s","_r","_u","_t","_w","_v","merge","_A","_z","_y","_x","transformCountries","countries","storeConfig","countriesWithRequiredRegion","optionalZipCountries","two_letter_abbreviation","full_name_locale","country","available_regions","hasRegions","transformRegions","availableRegions","id","name","region","formatDateToLocale","date","locale","options","defaultOptions","isDateOnly","formatOptions","dateObj","formatTimeToLocale","initialMoneyProps","transformOrderHistoryTotal","transformOrderHistoryList","returns","returnItem","_C","_B","transformStoreConfig","transformAccount","CARD_BRAND_LABELS","parseVaultDetails","details","normalizeBrandKey","isUnknownPlaceholder","labelForBrandOrTypeCode","titleCaseBrandFallback","raw","w","resolveCardBrandLabel","parsed","brandRaw","typeRaw","mapped","isExpirationDatePast","expirationDate","match","month","year","endOfExpiryMonth","tokenMatchesFilter","filterPaymentMethodCodes","extractLastFourDigits","rawDetails","fromMasked","digits","direct","fallbackLastFourFromHash","publicHash","alnum","mapTokenToDisplay","cardBrand","lastFour","transformStoredPaymentTokens","row","transformAdminAssistanceActions","adminAssistanceActions","getAttributesForm","formCode","sessionStorageKey","sessionStorageCache","transformedData","CREATE_CUSTOMER_ADDRESS","createCustomerAddress","created","GET_CUSTOMER_ADDRESS","getCustomerAddress","GET_COUNTRIES_QUERY","getCountries","GET_REGIONS","getRegions","countryCode","UPDATE_CUSTOMER_ADDRESS","updateCustomerAddress","forms","addressId","GET_CUSTOMER","BASIC_CUSTOMER_INFO_FRAGMENT","getCustomer","GET_ADMIN_ASSISTANCE_ACTIONS","getAdminAssistanceActions","pageSize","currentPage","REMOVE_CUSTOMER_ADDRESS","removeCustomerAddress","GET_CUSTOMER_PAYMENT_TOKENS","getCustomerPaymentTokens","DELETE_PAYMENT_TOKEN","deletePaymentToken","GET_CUSTOMER_ORDERS_LIST","CUSTOMER_ORDER_FRAGMENT","ADDRESS_FRAGMENT","ORDER_SUMMARY_FRAGMENT","SORT_DIRECTION","getOrderHistoryList","selectOrdersDate","filterOrderDate","CHANGE_CUSTOMER_PASSWORD","updateCustomerPassword","currentPassword","newPassword","GET_STORE_CONFIG","getStoreConfig","UPDATE_CUSTOMER_EMAIL","updateCustomerEmail","email","password","UPDATE_CUSTOMER_V2","updateCustomer","form"],"mappings":"qUAkCO,MAAMA,EAAa,IAAIC,EAAyB,CACrD,KAAM,MAAOC,GAAW,CACtB,MAAMC,EAAgB,CACpB,iBAAkB,CAChB,OAAQ,gBACR,YAAa,QAAA,CACf,EAGFH,EAAW,OAAO,UAAU,CAAE,GAAGG,EAAe,GAAGD,EAAQ,CAC7D,EAEA,UAAW,IAAM,CAAA,CACnB,CAAC,EAEYA,EAASF,EAAW,OC9BpB,CACX,YAAAI,GACA,sBAAAC,GACA,yBAAAC,GACA,uBAAAC,GACA,aAAAC,EACA,UAAAC,EACF,EAAI,IAAIC,GAAA,EAAe,WAAA,ECTVC,GAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkCpCC,GAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EC5B1CC,EAAsBC,GAAiB,CAIlD,MAFEA,aAAiB,cAAgBA,EAAM,OAAS,cAIhDC,EAAO,KAAK,QAAS,CACnB,OAAQ,OACR,KAAM,UACN,MAA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