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AAUL,IACXF,IACDM,EAAkBC,EAE1B,CAEA,GAAID,EAAiB,CACjB,UACUA,CACV,CAAE,MACE,CAEJA,EAAkB,IACtB,CAEA,OAAON,EAAwB,IAAIvY,KAAKA,KAAKsF,MAAQgT,GAAe,IAAI,C","sources":["webpack://touchweb/./src/apps/my-tradera/app/constants/list-types.ts","webpack://touchweb/./src/apps/tradera/configure-dayjs.js","webpack://touchweb/./src/apps/nextweb/components/next-link.tsx","webpack://touchweb/./src/components/alink/use-next-web-spa-link.ts","webpack://touchweb/./src/components/alink/alink.tsx","webpack://touchweb/./src/components/toasts/item-toast.module.scss","webpack://touchweb/./src/components/toasts/item-toast.jsx","webpack://touchweb/./src/components/toasts/message-toast.tsx","webpack://touchweb/./src/constants/cookies.js","webpack://touchweb/./src/constants/endpoints.ts","webpack://touchweb/./src/constants/hosts.js","webpack://touchweb/./src/constants/time.ts","webpack://touchweb/./src/hooks/use-is-feature-enabled.ts","webpack://touchweb/./src/hooks/use-location.ts","webpack://touchweb/./src/hooks/use-navigation.js","webpack://touchweb/./src/lang/shared-config.ts","webpack://touchweb/./src/lang/helpers.ts","webpack://touchweb/./src/legacy/static/app.js","webpack://touchweb/./src/legacy/static/packages/logger.ts","webpack://touchweb/./src/legacy/static/utils/modules.js","webpack://touchweb/./src/localization/countrycode.js","webpack://touchweb/./src/localization/format-price.ts","webpack://touchweb/./src/localization/languagecode.js","webpack://touchweb/./src/localization/use-localized-price-formatter.ts","webpack://touchweb/./src/services/boot-site-wide-notifications.js","webpack://touchweb/./src/services/global-socket.js","webpack://touchweb/./src/services/google-tagmanager-service.ts","webpack://touchweb/./src/services/google-tagmanager-snippet.js","webpack://touchweb/./src/services/socket-io-channel.js","webpack://touchweb/./src/services/toast-queue.js","webpack://touchweb/./src/state/environment/native-app-info-helper.ts","webpack://touchweb/./src/state/environment/actions.ts","webpack://touchweb/./src/utils/versions.js","webpack://touchweb/./src/state/environment/reducer.ts","webpack://touchweb/./src/state/environment/native-app-support.js","webpack://touchweb/./src/state/environment/selectors.ts","webpack://touchweb/./src/state/multi-currency/selectors.ts","webpack://touchweb/./src/state/shipping-region/selectors.ts","webpack://touchweb/./src/state/translations/reducer.ts","webpack://touchweb/./src/utils/condition-check.ts","webpack://touchweb/./src/utils/cookie-helpers.ts","webpack://touchweb/./src/utils/date.js","webpack://touchweb/./src/utils/google-tagmanager.js","webpack://touchweb/./src/utils/http.ts","webpack://touchweb/./src/utils/language.js","webpack://touchweb/./src/utils/nextjs.ts","webpack://touchweb/./src/utils/privacy-sandbox-iframes.ts","webpack://touchweb/./src/utils/scheduler.ts","webpack://touchweb/./src/utils/time-api.js","webpack://touchweb/./src/utils/server-date.js"],"sourcesContent":["export const LIST_VIEW_TYPES = {\n BASIC: 'Basic',\n NORMAL: 'Normal'\n} as const;\n\nexport const PAGE_LIST_TYPES = {\n BUYER_ACTIVE_ITEMS: 'BUYER_ACTIVE_ITEMS',\n BUYER_PURCHASES: 'BUYER_PURCHASES',\n BUYER_ITEMS_LOST: 'BUYER_ITEMS_LOST',\n SELLER_ACTIVE: 'SELLER_ACTIVE',\n SELLER_SOLD: 'SELLER_SOLD',\n SELLER_NOT_SOLD: 'SELLER_NOT_SOLD'\n} as const;\n\nexport const PAGE_BULK_ACTIONS = {\n ACTIVE_CANCEL: 'ActiveItems_Cancel',\n UNSOLD_RESTART: 'UnsoldItems_Restart',\n BUYER_MARK_PAID: 'Buyer_MarkPaid',\n BUYER_SHOW_ACTIVE: 'ShowActive',\n BUYER_HIDE_ACTIVE: 'HideActive',\n PURCHASES_SHOW: 'PurchasesShow'\n} as const;\n","import dayjs from 'dayjs';\nimport isBetween from 'dayjs/plugin/isBetween';\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter';\n\nexport const configureDayjs = (preferredLanguageCode) => {\n dayjs.locale(preferredLanguageCode);\n dayjs.extend(isBetween);\n dayjs.extend(isSameOrAfter);\n};\n","'use client';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// This is a cleaned-up ES6 copy of the next/link component without prefetch from:\n// https://github.com/vercel/next.js/blob/v12.2.5/packages/next/client/link.tsx\n// This component was mainly copied to completely disable prefetch on link mouse-over\n// Update this component if needed when updating Next.js\n\nimport type { NextRouter } from 'next/dist/shared/lib/router/router';\n\nimport React from 'react';\nimport type { UrlObject } from 'url';\nimport { resolveHref } from 'next/dist/client/resolve-href';\nimport { isLocalURL } from 'next/dist/shared/lib/router/utils/is-local-url';\nimport { formatUrl } from 'next/dist/shared/lib/router/utils/format-url';\nimport { isAbsoluteUrl } from 'next/dist/shared/lib/utils';\nimport { addLocale } from 'next/dist/client/add-locale';\nimport { RouterContext } from 'next/dist/shared/lib/router-context.shared-runtime';\nimport { AppRouterContext } from 'next/dist/shared/lib/app-router-context.shared-runtime';\nimport type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';\nimport { useIntersection } from 'next/dist/client/use-intersection';\nimport { getDomainLocale } from 'next/dist/client/get-domain-locale';\nimport { addBasePath } from 'next/dist/client/add-base-path';\n\ntype Url = string | UrlObject;\ntype RequiredKeys = {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [K in keyof T]-?: {} extends Pick ? never : K;\n}[keyof T];\ntype OptionalKeys = {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [K in keyof T]-?: {} extends Pick ? K : never;\n}[keyof T];\n\ntype InternalLinkProps = {\n /**\n * The path or URL to navigate to. It can also be an object.\n *\n * @example https://nextjs.org/docs/api-reference/next/link#with-url-object\n */\n href: Url;\n /**\n * Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes).\n */\n as?: Url;\n /**\n * Replace the current `history` state instead of adding a new url into the stack.\n *\n * @defaultValue `false`\n */\n replace?: boolean;\n /**\n * Whether to override the default scroll behavior\n *\n * @example https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page\n *\n * @defaultValue `true`\n */\n scroll?: boolean;\n /**\n * Update the path of the current page without rerunning [`getStaticProps`](/docs/basic-features/data-fetching/get-static-props.md), [`getServerSideProps`](/docs/basic-features/data-fetching/get-server-side-props.md) or [`getInitialProps`](/docs/api-reference/data-fetching/get-initial-props.md).\n *\n * @defaultValue `false`\n */\n shallow?: boolean;\n /**\n * Forces `Link` to send the `href` property to its child.\n *\n * @defaultValue `false`\n */\n passHref?: boolean;\n /**\n * The active locale is automatically prepended. `locale` allows for providing a different locale.\n * When `false` `href` has to include the locale as the default behavior is disabled.\n */\n locale?: string | false;\n /**\n * Optional event handler for when the mouse pointer is moved onto Link\n */\n onMouseEnter?: React.MouseEventHandler;\n /**\n * Optional event handler for when Link is touched.\n */\n onTouchStart?: React.TouchEventHandler;\n /**\n * Optional event handler for when Link is clicked.\n */\n onClick?: React.MouseEventHandler;\n};\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when the webpack plugin runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps = InternalLinkProps;\ntype LinkPropsRequired = RequiredKeys;\ntype LinkPropsOptional = OptionalKeys;\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement;\n const target = eventTarget.getAttribute('target');\n return (\n (target && target !== '_self') ||\n event.metaKey || // open in new tab on macOS\n event.ctrlKey || // right-click on macOS, open in new tab on Windows\n event.shiftKey || // open in new window\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n );\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n router: NextRouter | AppRouterInstance,\n href: string,\n as: string,\n replace?: boolean,\n shallow?: boolean,\n scroll?: boolean,\n locale?: string | false,\n isAppRouter?: boolean\n): void {\n const { nodeName } = e.currentTarget;\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A';\n\n if (\n isAnchorNodeName &&\n (isModifiedEvent(e) ||\n // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.\n (!isAppRouter && !isLocalURL(href)))\n ) {\n // ignore click for browser’s default behavior\n return;\n }\n\n e.preventDefault();\n\n const navigate = () => {\n // If the router is an NextRouter instance it will have `beforePopState`\n const routerScroll = scroll ?? true;\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll: routerScroll\n });\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n scroll: routerScroll\n });\n }\n };\n\n if (isAppRouter) {\n React.startTransition(navigate);\n } else {\n navigate();\n }\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n Omit, keyof LinkProps> &\n LinkProps\n>;\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString;\n }\n\n return formatUrl(urlObjOrString);\n}\n\nfunction createPropError(args: {\n key: string;\n expected: string;\n actual: string;\n}) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n );\n}\n\n/**\n * React Component that enables client-side transitions between routes.\n */\nconst Link = React.forwardRef(\n function LinkComponent(props, forwardedRef) {\n if (process.env.NODE_ENV !== 'production') {\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record = {\n href: true\n } as const;\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[];\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' &&\n typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual:\n props[key] === null ? 'null' : typeof props[key]\n });\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = key;\n }\n });\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true\n } as const;\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[];\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key];\n\n if (key === 'as') {\n if (\n props[key] &&\n valType !== 'string' &&\n valType !== 'object'\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType\n });\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType\n });\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType\n });\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType\n });\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = key;\n }\n });\n }\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n passHref,\n replace,\n shallow,\n scroll,\n locale,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n ...restProps\n } = props;\n\n const children: React.ReactNode = childrenProp;\n\n const pagesRouter = React.useContext(RouterContext);\n const appRouter = React.useContext(AppRouterContext);\n const router = pagesRouter ?? appRouter;\n\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter;\n\n if (process.env.NODE_ENV !== 'production') {\n if (isAppRouter && !asProp) {\n let href: string | undefined;\n if (typeof hrefProp === 'string') {\n href = hrefProp;\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname;\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some(\n (segment) =>\n segment.startsWith('[') && segment.endsWith(']')\n );\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n );\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n if (!pagesRouter) {\n const resolvedHref = formatStringOrUrl(hrefProp);\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref\n };\n }\n\n const [resolvedHref, resolvedAs] = resolveHref(\n pagesRouter,\n hrefProp,\n true\n );\n\n return {\n href: resolvedHref,\n as: asProp\n ? resolveHref(pagesRouter, asProp)\n : resolvedAs || resolvedHref\n };\n }, [pagesRouter, hrefProp, asProp]);\n\n const previousHref = React.useRef(href);\n const previousAs = React.useRef(as);\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any;\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid with child. Please remove .\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n );\n }\n }\n\n const childRef: any = forwardedRef;\n\n const [setIntersectionRef, , resetVisible] = useIntersection({\n rootMargin: '200px'\n });\n\n const setRef = React.useCallback(\n (el: Element) => {\n // Before the link getting observed, check if visible state need to be reset\n if (\n previousAs.current !== as ||\n previousHref.current !== href\n ) {\n resetVisible();\n previousAs.current = as;\n previousHref.current = href;\n }\n\n setIntersectionRef(el);\n if (childRef) {\n if (typeof childRef === 'function') childRef(el);\n else if (typeof childRef === 'object') {\n childRef.current = el;\n }\n }\n },\n [as, childRef, href, resetVisible, setIntersectionRef]\n );\n\n const childProps: {\n onTouchStart: React.TouchEventHandler;\n onMouseEnter: React.MouseEventHandler;\n onClick: React.MouseEventHandler;\n href?: string;\n ref?: any;\n } = {\n ref: setRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n );\n }\n }\n\n if (typeof onClick === 'function') {\n onClick(e);\n }\n\n if (!router) {\n return;\n }\n\n if (e.defaultPrevented) {\n return;\n }\n\n linkClicked(\n e,\n router,\n href,\n as,\n replace,\n shallow,\n scroll,\n locale,\n isAppRouter\n );\n },\n onMouseEnter(e) {\n if (typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e);\n }\n },\n onTouchStart(e) {\n if (typeof onTouchStartProp === 'function') {\n onTouchStartProp(e);\n }\n }\n };\n\n // If child is an tag and doesn't have a href attribute, or if the 'passHref' property is\n // defined, we specify the current 'href', so that repetition is not needed by the user.\n // If the url is absolute, we can bypass the logic to prepend the domain and locale.\n if (isAbsoluteUrl(as)) {\n childProps.href = as;\n } else if (\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n const curLocale =\n typeof locale !== 'undefined' ? locale : pagesRouter?.locale;\n\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain =\n pagesRouter?.isLocaleDomain &&\n getDomainLocale(\n as,\n curLocale,\n pagesRouter?.locales,\n pagesRouter?.domainLocales\n );\n\n childProps.href =\n localeDomain ||\n addBasePath(\n addLocale(as, curLocale, pagesRouter?.defaultLocale)\n );\n }\n\n return (\n \n {children}\n \n );\n }\n);\n\nexport { Link as NextLink };\n","import { useLocation } from 'tradera/hooks/use-location';\nimport { URL_LANGUAGES } from 'tradera/lang/constants.mjs';\nimport {\n selectEnvironment,\n selectFeatureSwitches\n} from 'tradera/state/environment/selectors';\nimport { useAppSelector } from 'tradera/state/hooks';\n\nexport const NEXTWEB_PATHS = [\n '/causes',\n '/causes/items',\n '/brands',\n '/categories',\n '/how-to-buy',\n '/how-to-sell',\n '/my/overview-seller',\n '/my/wish-list',\n '/top-lists',\n '/my/picklist'\n];\n\nconst PATH_PREFIX = `(/(${URL_LANGUAGES.join('|')}))?`;\nconst vipPathRegex = new RegExp(`${PATH_PREFIX}/item/[0-9]+/([0-9]+)/`);\nconst isVipLink = (pathname: string) => vipPathRegex.test(pathname);\n\nconst causePathRegex = new RegExp(`${PATH_PREFIX}/cause/`);\nconst isCauseLink = (pathname: string) => causePathRegex.test(pathname);\n\nconst charityPathRegex = new RegExp(`${PATH_PREFIX}/charity/`);\nconst isCharityLink = (pathname: string) => charityPathRegex.test(pathname);\n\nconst campaignPathRegex = new RegExp(`${PATH_PREFIX}/campaign/`);\nconst isCampaignLink = (pathname: string) => campaignPathRegex.test(pathname);\n\nconst shopPathRegex = new RegExp(`${PATH_PREFIX}/shop/`);\nconst isShopLink = (pathname: string) => shopPathRegex.test(pathname);\n\nconst topListsPathRegex = new RegExp(`${PATH_PREFIX}/top-lists/`);\nconst isTopListsLink = (pathname: string) => topListsPathRegex.test(pathname);\n\nconst brandPathRegex = new RegExp(`${PATH_PREFIX}/brand/`);\nconst isBrandLink = (pathname: string) => brandPathRegex.test(pathname);\n\nconst categoryPathRegex = new RegExp(`${PATH_PREFIX}/category/([0-9]+)`);\nconst isCategoryLink = (pathname: string) => categoryPathRegex.test(pathname);\n\nconst searchPathRegex = new RegExp(`${PATH_PREFIX}/search\\\\?q=.*`);\nconst isSearchLink = (pathname: string) => searchPathRegex.test(pathname);\n\nconst startPagePathRegex = new RegExp(`^${PATH_PREFIX}/?$`);\nconst isStartPageLink = (pathname: string) => startPagePathRegex.test(pathname);\n\nconst profilePageInformationPathRegex = new RegExp(\n `${PATH_PREFIX}/profile/information/`\n);\nconst isProfilePageInformationLink = (pathname: string) =>\n profilePageInformationPathRegex.test(pathname);\n\nconst profilePageItemsPathRegex = new RegExp(`${PATH_PREFIX}/profile/items/`);\nconst isProfilePageItemsLink = (pathname: string) =>\n profilePageItemsPathRegex.test(pathname);\n\nconst profilePageFeedbackPathRegex = new RegExp(\n `${PATH_PREFIX}/profile/feedback/`\n);\n\nconst detailedSearchPathRegex = new RegExp(`${PATH_PREFIX}/search/detailed$`);\nconst isDetailedSearchPageLink = (pathname: string) =>\n detailedSearchPathRegex.test(pathname);\n\nconst isProfilePageFeedbackLink = (pathname: string) =>\n profilePageFeedbackPathRegex.test(pathname);\n\nconst isLinkToNextWebPage = (url: URL) =>\n url.searchParams.get('next') === '1' ||\n NEXTWEB_PATHS.some((nextwebPath) => url.pathname.endsWith(nextwebPath));\n\nexport const isLastDigitEnabled = (\n digits: string,\n enabledDigits: Array\n) => enabledDigits.includes(digits.slice(-1));\n\nexport const useNextWebSpaLink = (absoluteUrl: URL) => {\n const location = useLocation();\n const toggles = useAppSelector(selectFeatureSwitches) || {};\n const pathname = absoluteUrl?.pathname;\n const { isNativeAppContext } = useAppSelector(selectEnvironment);\n\n if (isNativeAppContext) return false;\n\n if (isStartPageLink(pathname)) {\n return pathname !== location.pathname;\n }\n\n if (isVipLink(pathname)) return true;\n\n if (isCategoryLink(pathname)) return true;\n\n if (isCauseLink(pathname)) return true;\n\n if (isShopLink(pathname)) return true;\n\n if (isSearchLink(absoluteUrl.href)) return true;\n\n if (isCampaignLink(pathname)) return true;\n\n if (isCharityLink(pathname)) return true;\n\n if (isTopListsLink(pathname)) return true;\n\n if (isBrandLink(pathname)) return true;\n\n if (isProfilePageInformationLink(pathname)) return true;\n\n if (isProfilePageItemsLink(pathname)) return true;\n\n if (isProfilePageFeedbackLink(pathname)) return true;\n\n if (isDetailedSearchPageLink(pathname)) {\n return Boolean(toggles?.['next-web-detailed-search']);\n }\n\n return isLinkToNextWebPage(absoluteUrl);\n};\n","import React, { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { NextLink } from 'tradera/apps/nextweb/components/next-link';\nimport { updateEnvironmentHash } from 'tradera/state/environment/actions';\nimport { useIsFeatureEnabled } from 'tradera/hooks/use-is-feature-enabled';\nimport { useLocation } from 'tradera/hooks/use-location';\nimport { isNextJs } from 'tradera/utils/nextjs';\nimport { useAppSelector } from 'tradera/state/hooks';\nimport { useNextWebSpaLink } from './use-next-web-spa-link';\nimport { removePrivacySandboxIframes } from 'tradera/utils/privacy-sandbox-iframes';\nimport { selectIsNativeApp } from 'tradera/state/environment/selectors';\n\nconst PRODUCTION_ORIGIN = 'https://www.tradera.com';\n\nconst isFragmentNavSamePage = (url: URL, href?: string) =>\n !!url.hash && url.pathname === '/' && !href?.startsWith('/#');\n\nconst getRelativeUrl = (url: URL, href?: string) => {\n if (isFragmentNavSamePage(url, href)) return `${url.search}${url.hash}`;\n return `${url.pathname}${url.search}${url.hash}`;\n};\n\nexport type ALinkProps = React.ComponentPropsWithRef<'a'> & {\n useLink?: boolean;\n};\n\nconst ALink = React.forwardRef(function ALink(\n {\n useLink: isTouchwebSpaLink,\n href,\n children,\n onClick: givenOnClick,\n ...otherProps\n }: ALinkProps,\n forwardedRef\n) {\n const dispatch = useDispatch();\n const location = useLocation();\n const isNativeApp = useAppSelector(selectIsNativeApp);\n const isSpaNavigationEnabled =\n useAppSelector((state) => state.environment.isSpaNavigationEnabled) &&\n !isNativeApp; // Apps cannot handle history correctly if SPA navigation is enabled\n const isNextWebAddUrlParamEnabled = useIsFeatureEnabled(\n 'next-web-add-url-param'\n );\n const isTouchWebAddUrlParamEnabled = useIsFeatureEnabled(\n 'touch-web-add-url-param'\n );\n const absoluteUrl = new URL(href ?? '', PRODUCTION_ORIGIN);\n\n if (isTouchWebAddUrlParamEnabled) {\n absoluteUrl.searchParams.set('next', '0');\n } else if (isNextWebAddUrlParamEnabled) {\n absoluteUrl.searchParams.set('next', '1');\n }\n\n const isNextWebSpaLink = useNextWebSpaLink(absoluteUrl);\n const handleSpaNavigationClick = useCallback(\n (evt: React.MouseEvent) => {\n removePrivacySandboxIframes();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dispatch(updateEnvironmentHash());\n if (givenOnClick) givenOnClick(evt);\n },\n [dispatch, givenOnClick]\n );\n\n const spaNavigationOrigins = [PRODUCTION_ORIGIN, location?.origin];\n const isRelativeUrl = spaNavigationOrigins.includes(absoluteUrl.origin);\n\n // Strip away origin for SPA links\n const relativeUrl = getRelativeUrl(absoluteUrl, href);\n\n if (isSpaNavigationEnabled && isRelativeUrl) {\n if (isNextJs && isNextWebSpaLink) {\n // NextJS routing\n return (\n \n {children}\n \n );\n } else if (!isNextJs && !isNextWebSpaLink && isTouchwebSpaLink) {\n // react-router-dom\n return (\n \n {/* @ts-ignore: TS2322 because types from react-router relies on some other React version. */}\n {children}\n \n );\n }\n }\n\n const url = isRelativeUrl ? relativeUrl : absoluteUrl.toString();\n return (\n \n {children}\n \n );\n});\n\n// Deprecated, please use the named export instead\nexport default ALink;\n","// extracted by mini-css-extract-plugin\nexport default {\"item-toast\":\"item-toast--S7lV1\",\"itemToast\":\"item-toast--S7lV1\",\"item-toast-image\":\"item-toast-image--LsD4b\",\"itemToastImage\":\"item-toast-image--LsD4b\"};","import React from 'react';\nimport ALink from 'tradera/components/alink/alink';\nimport { useTranslator, useUrlLocalizer } from 'tradera/lang/translate';\nimport styles from './item-toast.module.scss';\nimport { useLocalizedPriceFormatter } from 'tradera/localization/use-localized-price-formatter';\n\nexport const ItemToast = ({\n imageUrl,\n itemUrl,\n shortDescription,\n type,\n eventData\n}) => {\n const { toLocalizedUrl } = useUrlLocalizer();\n\n return (\n \n
\n \n \n
\n
\n );\n};\n\nconst ToastMessage = ({ type, shortDescription, eventData }) => {\n const { t } = useTranslator();\n const localizedPriceFormatter = useLocalizedPriceFormatter();\n let message;\n switch (type) {\n case 'ItemOutbidded':\n message = t('siteWideNotifications_itemOutbidded_localized', {\n newLeadingBid: localizedPriceFormatter(\n eventData.newLeadingBidAmount\n ),\n shortDescription\n });\n break;\n case 'ItemFirstBid':\n message = t('siteWideNotifications_itemFirstBid', {\n shortDescription\n });\n break;\n case 'ItemSold':\n message = t('siteWideNotifications_itemSold_localized', {\n price: localizedPriceFormatter(eventData.price),\n shortDescription\n });\n break;\n case 'ItemWon':\n message = t('siteWideNotifications_itemWon_localized', {\n price: localizedPriceFormatter(eventData.price),\n shortDescription\n });\n break;\n case 'ItemPaid':\n message = t('siteWideNotifications_itemPaid', {\n shortDescription\n });\n break;\n case 'ItemWishListReminder':\n message = t('siteWideNotifications_itemWishListReminder', {\n shortDescription,\n timeLeftMinutes: eventData.timeLeftMinutes\n });\n }\n return
{message}
;\n};\n","import React from 'react';\nimport { useTranslator } from 'tradera/lang/translate';\n\ntype Props = {\n message: string;\n header?: string;\n messageData?: Record;\n headerData?: Record;\n};\n\nexport const MessageToast = ({\n message,\n header,\n messageData,\n headerData\n}: Props) => {\n const { t } = useTranslator();\n\n return (\n
\n {header &&

{t(header, headerData)}

}\n {message && (\n \n {t(message, messageData)}\n \n )}\n
\n );\n};\n","import { PAGE_LIST_TYPES } from 'tradera/apps/my-tradera/app/constants/list-types';\n\n/**\n * @returns {object} list of default cookies that could be set in Touchweb\n * @desc\n * key: Cookie Name\n * default: Default Value if not set\n * length: Time to be stored (months)\n */\nexport const DEFAULT_COOKIES = {\n ITEM_LAYOUT: {\n key: 'Srp_Item_Layout',\n default: 'layout-grid',\n length: 365\n },\n SITE_LAYOUT: {\n key: 'Srp_Site_Layout',\n default: 'site-width-default',\n length: 365\n }\n};\n\nexport const MYTRADERA_DEFAULT_COOKIES = {\n LIST_VIEW_TYPE: {\n key: 'MyTradera_ListViewType',\n default: 'Basic',\n length: 14\n },\n ITEMS_PER_PAGE: {\n key: 'MyTradera_ItemsPerPage',\n default: '25',\n length: 14\n },\n SHOW_FILTERS: {\n key: 'MyTradera_ShowFiltersToolbar',\n default: 'hidden',\n length: 14\n },\n LIST_VIEW_TYPE_BUYER_ACTIVE_ITEMS: {\n key: 'MyTradera_ListViewType_' + PAGE_LIST_TYPES.BUYER_ACTIVE_ITEMS,\n default: 'Basic',\n length: 14\n },\n LIST_VIEW_TYPE_BUYER_PURCHASES: {\n key: 'MyTradera_ListViewType_' + PAGE_LIST_TYPES.BUYER_PURCHASES,\n default: 'Normal',\n length: 14\n },\n LIST_VIEW_TYPE_BUYER_ITEMS_LOST: {\n key: 'MyTradera_ListViewType_' + PAGE_LIST_TYPES.BUYER_ITEMS_LOST,\n default: 'Basic',\n length: 14\n },\n LIST_VIEW_TYPE_SELLER_ACTIVE: {\n key: 'MyTradera_ListViewType_' + PAGE_LIST_TYPES.SELLER_ACTIVE,\n default: 'Basic',\n length: 14\n },\n LIST_VIEW_TYPE_SELLER_SOLD: {\n key: 'MyTradera_ListViewType_' + PAGE_LIST_TYPES.SELLER_SOLD,\n default: 'Normal',\n length: 14\n },\n LIST_VIEW_TYPE_SELLER_NOT_SOLD: {\n key: 'MyTradera_ListViewType_' + PAGE_LIST_TYPES.SELLER_NOT_SOLD,\n default: 'Basic',\n length: 14\n }\n};\n\nexport const APP_DOWNLOAD_MODAL_DISMISSED = 'app_download_modal_dismissed';\nexport const CURRENCY_SELECTED_BY_USER = 'currency_selected_by_user';\nexport const GDPR_CONSENT_COOKIE = 'gdpr_consent_v1';\nexport const FORCE_GEO_DEV = 'force-geo-dev';\nexport const ITEMS_PER_PAGE = 'ITEMS_PER_PAGE';\nexport const LIST_VIEW_TYPE = 'LIST_VIEW_TYPE';\nexport const MOBILE_OPT_IN_TAGS = 'mobile-opt-in-tags';\nexport const NATIVE_APP_ENVIRONMENT = 'native-app-environment';\nexport const PREFERRED_CURRENCY = 'preferred_currency';\nexport const REGION_PICKER_DISMISSED = 'region_picker_dismissed_session';\nexport const S = 's';\nexport const SHIPPING_COUNTRY = 'shipping_country';\nexport const SHOW_FILTERS = 'SHOW_FILTERS';\nexport const SIGNUP_REFERRAL_PATH = 'signup_referral_path';\nexport const SOLD_VIEW_PICKLIST = 'sold_view_picklist';\nexport const TEST = 'test';\nexport const SAVE_SEARCH_MODAL_DISMISSED = 'save_search_modal_dismissed';\nexport const USERPREFERENCES = 'UserPreferences';\nexport const CART_ID = 'cartId';\nexport const VIEWPORT_WIDTH = 'viewport-width';\nexport const SHIP_TO_SWEDEN_DISCLAIMER_DISMISSED =\n 'ship-to-sweden-disclaimer-dismissed';\nexport const HAS_LOGGED_IN = 'has-logged-in';\nexport const EXPERIMENT_BUCKET = 'experiment_bucket';\nexport const PRODUCT_COMMUNICATION_DISMISSED =\n 'product_communication_dismissed';\nexport const WISH_LIST_NOTIFICATION_DISPLAY_COUNT =\n 'wish-list-nudge-notification-display-count';\nexport const WISH_LIST_NOTIFICATION_HIDDEN =\n 'wish-list-nudge-notification-hidden';\nexport const RECENTLY_VIEWED_ITEM_IDS = 'recently-viewed-items';\nexport const RECENT_SEARCHES = 'recent-searches';\n\n// Social login cookies -->\nexport const APPLE_ATTEMPTED_ID = 'apple_attempted_id';\nexport const APPLE_ATTEMPTED_TOKEN = 'apple_attempted_token';\n\nexport const FACEBOOK_ATTEMPTED_ID = 'fb_attempted_id';\nexport const FACEBOOK_ATTEMPTED_TOKEN = 'fb_attempted_token';\n\nexport const GOOGLE_ATTEMPTED_ID = 'google_attempted_id';\nexport const GOOGLE_ATTEMPTED_TOKEN = 'google_attempted_token';\n\nexport const KLARNA_ATTEMPTED_ID = 'klarna_attempted_id';\nexport const KLARNA_ATTEMPTED_TOKEN = 'klarna_attempted_token';\nexport const KLARNA_ATTEMPTED_REFRESH_TOKEN = 'klarna_attempted_refresh_token';\n// <-- Social login cookies\n\nexport const COOKIE_CATEGORIES = {\n Essential: 1,\n Performance: 2,\n Functional: 3,\n Marketing: 4\n};\n\nexport const COLLECT_SSN_MODAL_DISMISSED = 'collect-ssn-modal-dismissed';\nexport const TRADERA_PAY_CONSENT_MODAL_DISMISSED =\n 'tradera-pay-consent-modal-dismissed';\nexport const HAS_SEEN_COMBINEDSHIPPING_MODAL =\n 'has-seen-combined-shipping-modal';\nexport const HAS_SEEN_ONBOARDING_AUTOMATICSHIPPING_MODAL =\n 'has-seen-onboarding-automatic-shipping-modal';\n\n/**\n * all cookies that are used by tradera must be categorized in the array below.\n */\nexport const CATEGORIZED_COOKIES = {\n [GDPR_CONSENT_COOKIE]: COOKIE_CATEGORIES.Essential,\n [NATIVE_APP_ENVIRONMENT]: COOKIE_CATEGORIES.Essential,\n [TEST]: COOKIE_CATEGORIES.Essential, // Unit test cookie\n\n [EXPERIMENT_BUCKET]: COOKIE_CATEGORIES.Performance,\n\n [APP_DOWNLOAD_MODAL_DISMISSED]: COOKIE_CATEGORIES.Functional,\n [CURRENCY_SELECTED_BY_USER]: COOKIE_CATEGORIES.Functional,\n [DEFAULT_COOKIES.ITEM_LAYOUT.key]: COOKIE_CATEGORIES.Functional,\n [DEFAULT_COOKIES.SITE_LAYOUT.key]: COOKIE_CATEGORIES.Functional,\n [FORCE_GEO_DEV]: COOKIE_CATEGORIES.Functional,\n [HAS_LOGGED_IN]: COOKIE_CATEGORIES.Functional,\n [ITEMS_PER_PAGE]: COOKIE_CATEGORIES.Functional,\n [LIST_VIEW_TYPE]: COOKIE_CATEGORIES.Functional,\n [MOBILE_OPT_IN_TAGS]: COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.ITEMS_PER_PAGE.key]:\n COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.LIST_VIEW_TYPE.key]:\n COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.SHOW_FILTERS.key]: COOKIE_CATEGORIES.Functional,\n [PREFERRED_CURRENCY]: COOKIE_CATEGORIES.Functional,\n [REGION_PICKER_DISMISSED]: COOKIE_CATEGORIES.Functional,\n [S]: COOKIE_CATEGORIES.Functional, // saved search\n [SHIPPING_COUNTRY]: COOKIE_CATEGORIES.Essential,\n [SHOW_FILTERS]: COOKIE_CATEGORIES.Functional,\n [SIGNUP_REFERRAL_PATH]: COOKIE_CATEGORIES.Functional,\n [SOLD_VIEW_PICKLIST]: COOKIE_CATEGORIES.Functional,\n [USERPREFERENCES]: COOKIE_CATEGORIES.Functional,\n [SAVE_SEARCH_MODAL_DISMISSED]: COOKIE_CATEGORIES.Functional,\n [CART_ID]: COOKIE_CATEGORIES.Functional,\n [VIEWPORT_WIDTH]: COOKIE_CATEGORIES.Functional,\n [SHIP_TO_SWEDEN_DISCLAIMER_DISMISSED]: COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.LIST_VIEW_TYPE_BUYER_ACTIVE_ITEMS.key]:\n COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.LIST_VIEW_TYPE_BUYER_ITEMS_LOST.key]:\n COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.LIST_VIEW_TYPE_BUYER_PURCHASES.key]:\n COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.LIST_VIEW_TYPE_SELLER_ACTIVE.key]:\n COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.LIST_VIEW_TYPE_SELLER_NOT_SOLD.key]:\n COOKIE_CATEGORIES.Functional,\n [MYTRADERA_DEFAULT_COOKIES.LIST_VIEW_TYPE_SELLER_SOLD.key]:\n COOKIE_CATEGORIES.Functional,\n [PRODUCT_COMMUNICATION_DISMISSED]: COOKIE_CATEGORIES.Functional,\n [WISH_LIST_NOTIFICATION_DISPLAY_COUNT]: COOKIE_CATEGORIES.Functional,\n [WISH_LIST_NOTIFICATION_HIDDEN]: COOKIE_CATEGORIES.Functional,\n [COLLECT_SSN_MODAL_DISMISSED]: COOKIE_CATEGORIES.Functional,\n [TRADERA_PAY_CONSENT_MODAL_DISMISSED]: COOKIE_CATEGORIES.Functional,\n [HAS_SEEN_COMBINEDSHIPPING_MODAL]: COOKIE_CATEGORIES.Functional,\n [HAS_SEEN_ONBOARDING_AUTOMATICSHIPPING_MODAL]: COOKIE_CATEGORIES.Functional,\n [RECENTLY_VIEWED_ITEM_IDS]: COOKIE_CATEGORIES.Functional,\n [RECENT_SEARCHES]: COOKIE_CATEGORIES.Functional,\n [APPLE_ATTEMPTED_ID]: COOKIE_CATEGORIES.Essential,\n [APPLE_ATTEMPTED_TOKEN]: COOKIE_CATEGORIES.Essential,\n [FACEBOOK_ATTEMPTED_ID]: COOKIE_CATEGORIES.Essential,\n [FACEBOOK_ATTEMPTED_TOKEN]: COOKIE_CATEGORIES.Essential,\n [GOOGLE_ATTEMPTED_ID]: COOKIE_CATEGORIES.Essential,\n [GOOGLE_ATTEMPTED_TOKEN]: COOKIE_CATEGORIES.Essential,\n [KLARNA_ATTEMPTED_ID]: COOKIE_CATEGORIES.Essential,\n [KLARNA_ATTEMPTED_TOKEN]: COOKIE_CATEGORIES.Essential,\n [KLARNA_ATTEMPTED_REFRESH_TOKEN]: COOKIE_CATEGORIES.Essential\n};\n\nexport const COOKIE_DEFAULT_CATEGORY = COOKIE_CATEGORIES.Functional;\n\n/**\n * List of cookies which are OK for any JavaScript to access. Never add cookies\n * that would be a security risk if exposed to third party scripts.\n */\nexport const COOKIES_REQUIRED_FOR_SSR_EXPOSED_TO_JS_IN_BROWSER = [\n CART_ID,\n EXPERIMENT_BUCKET,\n FORCE_GEO_DEV,\n GDPR_CONSENT_COOKIE,\n REGION_PICKER_DISMISSED,\n PRODUCT_COMMUNICATION_DISMISSED,\n SHIPPING_COUNTRY,\n RECENTLY_VIEWED_ITEM_IDS,\n RECENT_SEARCHES\n];\n","import initData from 'tradera/legacy/static/packages/init-data';\nimport { isNextJs, isServer } from 'tradera/utils/nextjs';\n\nconst getSiteBaseUrl = () =>\n isServer\n ? process.env.PUBLIC_TOUCHWEB_WINDOW_LOCATION_ORIGIN\n : window.location.origin;\n\nconst webApiUrl: string = isNextJs\n ? `${getSiteBaseUrl()}/api/webapi`\n : initData.webApiUrl;\n\nexport default {\n AVAILABLE_SHIPPING_COUNTRIES:\n webApiUrl + '/member/getavailablecountriesforshipping',\n CART_OVERVIEW_VIEW: webApiUrl + '/shopping/checkout/cartoverview',\n CART_ADD_ITEM: webApiUrl + '/shopping/cart/item',\n CART_REMOVE_ITEMS: webApiUrl + '/shopping/cart/removeitems',\n CART_SET_ITEM_QUANTITY: webApiUrl + '/shopping/cart/setitemquantity',\n FAVOURITE_SELLERS: webApiUrl + `/discover/favouritesellers-and-items2`,\n HYPERWALLET_PAYOUT_COMPLETE:\n webApiUrl + '/member/paymentprovider/completehyperwallettransfermethod',\n HYPERWALLET_PAYOUT_TOKEN:\n webApiUrl + '/member/paymentprovider/hyperwalletauthenticationtoken',\n HYPERWALLET_PAYOUT:\n webApiUrl +\n '/member/paymentprovider/hyperwallettransfermethodviewmodel',\n INTERNATIONAL_SHIPPING_CALCULATOR:\n webApiUrl + '/browse/internationalshippingcalculator',\n ORDER_CHECKOUT_PAYMENT: initData.orderCheckoutPaymentUrl,\n ORDER_CHECKOUT_REQUEST_COMBINED_PRICE:\n webApiUrl + '/shopping/ordercheckout/requestcombinedshippingprice',\n ORDER_CHECKOUT_CREATE_UNCOMMITTED_PURCHASE_ORDER:\n webApiUrl + '/shopping/ordercheckout/createuncommittedpurchaseorder',\n ORDER_PURCHASE_SHOP_ITEMS:\n webApiUrl + '/shopping/ordercheckout/purchaseshopitems',\n PERSONALISED_SUGGESTIONS: '/api/personalised-suggestions',\n SEARCH: '/search',\n WEB_API: webApiUrl,\n UPI: (purchaseOrderId: string) =>\n webApiUrl + '/member/uppo-strike/?PurchaseOrderId=' + purchaseOrderId,\n MCP: (purchaseOrderId: string) =>\n webApiUrl + '/member/mcp-strike/?PurchaseOrderId=' + purchaseOrderId,\n MCP_CONFIRM: (purchaseOrderId: string) =>\n webApiUrl +\n '/member/mcp-strike-confirm/?PurchaseOrderId=' +\n purchaseOrderId,\n PURCHASE_ORDER: (purchaseOrderId: string) =>\n webApiUrl + '/member/purchaseorder/?PurchaseOrderId=' + purchaseOrderId,\n MARKETING_PUBLIC_API: '/api/marketing',\n SHIPPING_CHECKOUT_DELETE: '/my/shipping/checkout/delete'\n};\n","export default {\n TRADERA: 'https://www.tradera.com'\n};\n","export const DAY_IN_SECONDS = 24 * 60 * 60;\nexport const HOUR_IN_SECONDS = 60 * 60;\nexport const MINUTE_IN_SECONDS = 60;\n\nexport const DAY_IN_MILLISECONDS = DAY_IN_SECONDS * 1000;\nexport const HOUR_IN_MILLISECONDS = HOUR_IN_SECONDS * 1000;\nexport const MINUTE_IN_MILLISECONDS = MINUTE_IN_SECONDS * 1000;\nexport const SECOND_IN_MILLISECONDS = 1000;\n","import { useSelector } from 'react-redux';\nimport { selectIsFeatureEnabled } from 'tradera/state/environment/selectors';\n\nexport const useIsFeatureEnabled = (featureName: string) =>\n useSelector(selectIsFeatureEnabled(featureName));\n","import { useMemo } from 'react';\nimport { useAppSelector } from 'tradera/state/hooks';\nimport { isServer } from 'tradera/utils/nextjs';\n\nexport const useLocation = (fallback = '') => {\n const request = useAppSelector((state) => state.request);\n const location = isServer\n ? // During static site generation isServer will be true, but we do not\n // have access to a request object. In those cases the consumer can pass in a fallback.\n request.location ?? fallback\n : window.location.href;\n const url = useMemo(() => new URL(location), [location]);\n return url;\n};\n","import { useMemo } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { useRouter } from 'next/compat/router';\nimport { isNextJs } from 'tradera/utils/nextjs';\nimport { removePrivacySandboxIframes } from 'tradera/utils/privacy-sandbox-iframes';\n\nexport const useNavigation = (isNextDataFetchingDisabled) => {\n const nextRouter = useRouter();\n const touchwebHistory = useHistory();\n\n return useMemo(\n () => ({\n push: (location) => {\n removePrivacySandboxIframes();\n\n const url = location.pathname\n ? `${location.pathname}${location.search}`\n : location;\n if (isNextJs) {\n return nextRouter.push(url, undefined, {\n shallow: isNextDataFetchingDisabled\n });\n }\n return touchwebHistory.push(url);\n },\n replace: (location) => {\n const url = location.pathname\n ? `${location.pathname}${location.search}`\n : location;\n if (isNextJs) {\n return nextRouter.replace(url, undefined, {\n shallow: isNextDataFetchingDisabled\n });\n }\n return touchwebHistory.replace(url);\n },\n back: () => {\n if (isNextJs) {\n return nextRouter.back();\n }\n return touchwebHistory.goBack();\n },\n refresh: () => {\n if (isNextJs) {\n // Trigger fetching data from getServerSideProps().\n return nextRouter.replace(window.location, undefined, {\n shallow: isNextDataFetchingDisabled\n });\n }\n throw new Error('This is only for NextWeb!');\n }\n }),\n [isNextDataFetchingDisabled, nextRouter, touchwebHistory]\n );\n};\n","import * as Sentry from '@sentry/nextjs';\nimport { isNextJs, isServer } from 'tradera/utils/nextjs';\nimport type { InitOptions } from 'i18next';\nimport { isAttributeStuffing } from 'tradera/lang/helpers';\n\nexport const missingKeyLoggingConfig = {\n saveMissing: true,\n saveMissingTo: 'current' as const,\n missingKeyHandler: (\n language,\n namespace,\n key,\n _fallbackValue,\n _updateMissing,\n options\n ) => {\n if (\n (!isNextJs ||\n isServer ||\n (isNextJs && !isServer && options.hasLoadedAllTranslations)) &&\n !isAttributeStuffing(key, namespace)\n ) {\n const errorMessage = `TranslationMissing (javascript) - Unable to find key ${key} (namespace ${namespace}) in language ${language}!`;\n Sentry.captureException(new Error(errorMessage));\n }\n },\n missingInterpolationHandler: (text, value) => {\n Sentry.captureException(\n new Error(\n `InterpolationFailure (javascript) - Unable to interpolate the text \"${text}\" fully. The following placeholder values were missing: ${JSON.stringify(\n value\n )}`\n )\n );\n return undefined;\n }\n};\n","/**\n * This is used to filter away errors that would otherwise be logged to Sentry and flood the logs.\n * It happens when people try to use the attributes to try to inject code or markup.\n */\nexport function isAttributeStuffing(key: string, namespace: string): boolean {\n if (namespace !== 'attributes') return false;\n return /[[\\]#<*()]+/.test(key);\n}\n","import 'core-js/modules/es.promise.finally';\nimport 'core-js/modules/es.array.iterator';\nimport 'intersection-observer';\nimport 'custom-event-polyfill';\nimport 'whatwg-fetch';\n\nimport initData from 'init-data';\nimport {\n handleModuleError,\n isSpaModule,\n loadModule,\n loadSpaModule,\n runModule\n} from 'utils/modules';\nimport { bootLanguages } from 'tradera/lang/boot-languages';\nimport { GtmService as gtm } from 'tradera/services/google-tagmanager-service';\nimport { bootSiteWideNotifications } from 'tradera/services/boot-site-wide-notifications';\nimport { syncServerTime } from 'tradera/utils/server-date';\nimport { configureDayjs } from 'tradera/apps/tradera/configure-dayjs';\nimport 'tradera/styles/global.scss';\n\nbootLanguages();\ngtm.loadGtmScript();\n\nif (initData) {\n configureDayjs(initData.languageCodeIso2);\n syncServerTime();\n\n if (initData.featureSwitches['site-wide-notifications']) {\n bootSiteWideNotifications({\n socketUrl: initData.webLiveUrl,\n joinMemberRoom: !!initData.memberId\n });\n }\n\n const module = initData.module.split('/')[4];\n let moduleLoader;\n if (isSpaModule(module, initData)) {\n moduleLoader = loadSpaModule(initData);\n } else {\n moduleLoader = import('./init-module')\n .then((initModule) => initModule.default(initData))\n .then(() => loadModule(module, initData))\n .then((loadedModule) => runModule(loadedModule, initData));\n }\n moduleLoader\n .then(() => {\n window.document.body.setAttribute('data-module-loaded', 'true');\n return;\n })\n .catch(handleModuleError);\n}\n","import * as Sentry from '@sentry/react';\nimport type { CaptureContext } from '@sentry/types';\n\ntype SomeError = Error | string | object | unknown;\n\n/**\n * @param {object} error - takes an exception and logs to Sentry or the console in development\n * @param {object} [scope] - Sentry CaptureContext created with new Sentry.Scope() or plain object\n * @desc logger is designed for logging errors. It will accept an argument of any type and create a stacktrace containing a reference to the callee.\n * @TODO Migrate this functionality to a logging module that handles different levels of logs\n */\nexport const logger = (error: SomeError, scope?: CaptureContext) => {\n let sentryException;\n if (error instanceof Error) {\n sentryException = error;\n } else if (typeof error === 'string') {\n sentryException = new Error(error);\n } else {\n sentryException = new Error(JSON.stringify(error));\n }\n if (scope) {\n Sentry.captureException(sentryException, scope);\n } else {\n Sentry.captureException(sentryException);\n }\n};\n","import { logger } from 'packages/logger';\n\nfunction isSpaModule(module, initData) {\n const { isSinglePageApp } = initData;\n switch (module) {\n case 'endless-recommendation':\n case 'favourite-sellers':\n case 'landing':\n case 'report-item':\n case 'verify-bankid':\n case 'tradera-shop':\n return true;\n\n default:\n return isSinglePageApp;\n }\n}\n\nasync function loadSpaModule(initData) {\n const module = await import(\n /* webpackChunkName: \"tradera\" */ '../../../apps/tradera/'\n );\n return module.default(initData);\n}\n\nasync function loadModule(module) {\n switch (module) {\n // Fallback modules for when SPA is toggled off\n // TODO: Remove when fully incorporated in SPA\n case 'order-checkout':\n case 'verify-bankid':\n case 'landing':\n case 'cart':\n case 'upi':\n case 'inr':\n return await import(\n /* webpackChunkName: \"tradera\" */ '../../../apps/tradera/'\n );\n\n // Non-SPA modules\n case 'basic':\n return await import(\n /* webpackChunkName: \"basic\" */ '../app/pages/basic'\n );\n case 'detailed-search':\n return await import(\n /* webpackChunkName: \"detailed-search\" */ '../app/pages/detailed-search'\n );\n case 'messages':\n return await import(\n /* webpackChunkName: \"messages\" */ '../app/pages/messages'\n );\n default:\n return await import(\n /* webpackChunkName: \"basic\" */ '../app/pages/basic'\n );\n }\n}\n\nfunction runModule(module, initData = {}) {\n if (!module.default) {\n console.error(`Cannot run module \"${module}\" without exported default`);\n }\n return module.default(initData);\n}\n\nconst handleModuleError = (error) => logger(error);\n\nexport { isSpaModule, loadSpaModule, loadModule, runModule, handleModuleError };\n","export const isSwedenCountryCodeOrUndefined = (countryCodeIso2) =>\n countryCodeIso2 === undefined ||\n countryCodeIso2 === null ||\n countryCodeIso2.toLowerCase() === 'se';\n\nexport const isSwedenCountryNameOrUndefined = (countryName) =>\n countryName === undefined ||\n countryName === null ||\n countryName.toLowerCase() === 'sweden';\n\nexport const isDenmarkCountryCode = (countryCodeIso2) =>\n !isSwedenCountryCodeOrUndefined(countryCodeIso2) &&\n countryCodeIso2.toLowerCase() === 'dk';\n\nexport const isNetherlandsCountryCode = (countryCodeIso2) =>\n !isSwedenCountryCodeOrUndefined(countryCodeIso2) &&\n countryCodeIso2.toLowerCase() === 'nl';\n\nexport const areCountryCodesIso2Equal = (first, second) =>\n (first || 'SE').toUpperCase() === (second || 'SE').toUpperCase();\n","import { formatNumberWithSeparators } from 'tradera/utils/format';\n\nexport type Price = string | number;\n\ntype FormatPriceOptions = {\n currency: string;\n preferredCurrency: string;\n style: string;\n currencyDisplay: string;\n useGrouping: boolean;\n roundUp: boolean;\n minimumFractionDigits: number;\n maximumFractionDigits: number;\n};\n\nexport type OverrideFormatPriceOptions = Partial;\n\nexport const formatPrice = (\n price: Price,\n inputLocale: string | null,\n overrideOptions: OverrideFormatPriceOptions = {}\n): string => {\n const locale = inputLocale || 'sv-SE';\n const defaultOptions: FormatPriceOptions = {\n style: 'currency',\n currency: 'SEK',\n preferredCurrency: 'SEK',\n currencyDisplay:\n locale.startsWith('sv') &&\n (overrideOptions.currency || 'SEK') === 'SEK' &&\n (overrideOptions.preferredCurrency || 'SEK') === 'SEK'\n ? 'symbol'\n : 'code',\n useGrouping: false,\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n roundUp: false\n };\n const options = {\n ...defaultOptions,\n ...overrideOptions\n };\n let priceAsNumber = typeof price !== 'number' ? parseInt(price) : price;\n\n if (options.roundUp) {\n const decimalFactorForRounding = Math.pow(\n 10,\n options.maximumFractionDigits\n );\n priceAsNumber =\n Math.ceil(priceAsNumber * decimalFactorForRounding) /\n decimalFactorForRounding;\n }\n\n if (!isLocaleFormattingSupportedInBrowser) {\n const suffix =\n options.currencyDisplay === 'code' && options.currency === 'SEK'\n ? 'kr'\n : options.currency;\n return `${priceAsNumber} ${suffix}`;\n }\n\n const formattedPrice = priceAsNumber.toLocaleString(locale, options);\n return formatNumberWithSeparators(formattedPrice);\n};\n\n// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString\nfunction toLocaleStringSupportsLocales() {\n try {\n Number(0).toLocaleString('i');\n } catch (e: unknown) {\n return (\n e !== null &&\n typeof e === 'object' &&\n 'name' in e &&\n e.name === 'RangeError'\n );\n }\n return false;\n}\n\n// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString\nfunction toLocaleStringSupportsOptions() {\n return !!(\n typeof Intl === 'object' &&\n Intl &&\n typeof Intl.NumberFormat === 'function'\n );\n}\n\nconst isLocaleFormattingSupportedInBrowser =\n toLocaleStringSupportsLocales() && toLocaleStringSupportsOptions();\n","export const isSwedishOrUndefined = (languageCodeIso2) =>\n languageCodeIso2 === undefined || languageCodeIso2.toLowerCase() === 'sv';\n\nexport const getLanguageFromCountryCode = (countryCodeIso2) => {\n const key = countryCodeIso2?.toLowerCase() || 'se';\n const languageMap = {\n se: 'sv',\n dk: 'da',\n de: 'de',\n fr: 'fr',\n nl: 'nl'\n };\n return languageMap[key] || 'en';\n};\n\nexport const getCountryCodeForFlagFromLanguage = (languageCode) => {\n const key = languageCode?.toLowerCase() || 'sv';\n const countryMap = {\n en: 'gb', // We default to GB which isn't strictly correct\n da: 'dk',\n de: 'de',\n fr: 'fr',\n nl: 'nl'\n };\n return countryMap[key] || 'se';\n};\n\nexport const getCountryCodeFromLanguage = (languageCode) => {\n const key = languageCode?.toLowerCase() || 'sv';\n const countryMap = {\n da: 'dk',\n de: 'de',\n fr: 'fr',\n nl: 'nl'\n };\n return countryMap[key] || 'se';\n};\n\nexport const areLanguageCodesIso2Equal = (first, second) =>\n (first || 'SV').toUpperCase() === (second || 'SV').toUpperCase();\n","import { useCallback } from 'react';\nimport { useCurrentLanguage } from 'tradera/lang/translate';\nimport { useAppSelector } from 'tradera/state/hooks';\nimport { selectPreferredCurrency } from 'tradera/state/multi-currency/selectors';\nimport type {\n OverrideFormatPriceOptions,\n Price\n} from 'tradera/localization/format-price';\nimport { formatPrice } from 'tradera/localization/format-price';\n\n/**\n * Formats a price in the current language and currency.\n */\nexport const useLocalizedPriceFormatter = () => _useLocalizedPriceFormatter();\n\n/**\n * Same as useLocalizedPriceFormatter but it always rounds up. Needed for fixed prices,\n * so we never display a price that is lower than what the user will pay in the end.\n */\nexport const useLocalizedPriceFormatterRoundingUp = () =>\n _useLocalizedPriceFormatter({ roundUp: true });\n\n/**\n * Does not convert anything. If you for some reason are working with the local currency\n * it could be used but avoid it. Example of usage: in the bid-modal we want to display\n * the exact amount that was input\n */\nexport const useLocalizedPriceFormatterNoConversion = () =>\n _useLocalizedPriceFormatter({ conversion: false });\n\n/**\n * Makes the conversion but leaves the symbol. Used to compare local amounts to make a\n * decision in the code.\n */\nexport const useLocalizedPriceFormatterNoSymbol = () =>\n _useLocalizedPriceFormatter({ style: 'decimal' });\n\n/**\n * Formats a price in the current language and currency but forces the value to be\n * rendered using up to two decimals, even for currencies which are normally without\n * decimals.\n */\nexport const useLocalizedPriceFormatterAllowFractions = () =>\n _useLocalizedPriceFormatter({ allowFractions: true });\n\ntype LocalizedPriceFormatterOptions = {\n allowFractions?: boolean;\n conversion?: boolean;\n roundUp?: OverrideFormatPriceOptions['roundUp'];\n style?: OverrideFormatPriceOptions['style'];\n};\n\n/**\n * Internal to this module, needed to limit the scope of the API.\n */\nconst _useLocalizedPriceFormatter = ({\n conversion = true,\n style,\n roundUp,\n allowFractions\n}: LocalizedPriceFormatterOptions = {}) => {\n const { language } = useCurrentLanguage();\n const preferredCurrency = useAppSelector(selectPreferredCurrency);\n\n return useCallback(\n (price: Price) =>\n formatPrice(\n conversion ? preferredCurrency.rate * Number(price) : price,\n language,\n {\n currency: preferredCurrency.code,\n minimumFractionDigits: preferredCurrency.decimals,\n maximumFractionDigits: allowFractions\n ? 2\n : preferredCurrency.decimals,\n ...(style ? { style } : {}),\n ...(roundUp ? { roundUp } : {})\n }\n ),\n [\n conversion,\n language,\n preferredCurrency,\n roundUp,\n style,\n allowFractions\n ]\n );\n};\n","import {\n showItemFirstBidToast,\n showItemOutbiddedToast,\n showItemPaidToast,\n showItemSoldToast,\n showItemWishListReminderToast,\n showItemWonToast\n} from './toasts';\nimport { getGlobalSocket } from './global-socket';\nimport { touchWebClient } from 'tradera/utils/http';\n\nconst refreshLoginState = async (socket) => {\n try {\n const response = await touchWebClient.get('login/state');\n\n if (!response.data?.isLoggedIn) {\n return;\n }\n\n socket.disconnect();\n socket.connect();\n } catch {\n // Could not get token.\n }\n};\n\nexport const bootSiteWideNotifications = ({ socketUrl, joinMemberRoom }) => {\n if (!joinMemberRoom) {\n return;\n }\n\n const socket = getGlobalSocket(socketUrl);\n let isRetry = false;\n socket.on('JoinMemberRoom', async ({ success }) => {\n // To avoid infinite loop\n if (success || isRetry) {\n // eslint-disable-next-line better-mutation/no-mutation\n isRetry = false;\n return;\n }\n\n // eslint-disable-next-line better-mutation/no-mutation\n isRetry = true;\n await refreshLoginState(socket);\n });\n socket.addEventListener('MemberItemOutbidded', (data) =>\n showItemOutbiddedToast(data.ItemId, data.NewLeadingBidAmount)\n );\n socket.addEventListener('MemberItemFirstBid', (data) =>\n showItemFirstBidToast(data.ItemId)\n );\n socket.addEventListener('MemberItemSold', (data) =>\n showItemSoldToast(data.ItemId, data.Price)\n );\n socket.addEventListener('MemberItemWon', (data) =>\n showItemWonToast(data.ItemId, data.Price)\n );\n socket.addEventListener('MemberItemPaid', (data) =>\n showItemPaidToast(data.ItemId)\n );\n socket.addEventListener('MemberItemWishListReminder', (data) =>\n showItemWishListReminderToast(data.ItemId, data.TimeLeftMinutes)\n );\n socket.join('member');\n};\n","import { SocketIoChannel } from 'tradera/services/socket-io-channel';\nimport { isServer } from 'tradera/utils/nextjs';\n\nlet globalSocket = null;\n\nexport const getGlobalSocket = (socketUrl) => {\n if (isServer) {\n throw new Error('Must not be used on server.');\n }\n if (!globalSocket) {\n // eslint-disable-next-line better-mutation/no-mutation\n globalSocket = new SocketIoChannel(socketUrl, true);\n }\n return globalSocket;\n};\n","/* eslint-disable better-mutation/no-mutation */\n\n/**\n *\n * # track events:\n * import { GtmService } from 'tradera/services/google-tagmanager-service';\n * GtmService.trackGtmEvent(\"zorro\", { marvel: false, black: true })\n *\n *\n *\n */\n\nimport * as Sentry from '@sentry/react';\nimport initData from 'tradera/legacy/static/packages/init-data';\nimport { isServer, isNextJs } from 'tradera/utils/nextjs';\nimport { buildInitialGtmDataLayerFromInitData } from 'tradera/utils/google-tagmanager';\nimport { queueBackgroundTask } from 'tradera/utils/scheduler';\nimport { googleTagManagerSnippet } from 'tradera/services/google-tagmanager-snippet';\n\ndeclare global {\n interface Window {\n dataLayer: unknown[];\n legacyDataLayer: unknown[];\n logGaWebViewEvent?: (name: string, params: unknown) => void;\n setGaWebViewUserProperty?: (name: string, value: string) => void;\n AnalyticsWebInterface?: {\n logEvent: (name: string, params: string) => void;\n setUserProperty: (name: string, value: string) => void;\n };\n webkit?: {\n messageHandlers?: {\n firebase: {\n postMessage: (message: unknown) => void;\n };\n };\n };\n }\n}\n\n/**\n * SPA page view tracking becomes enabled after first\n * page view tracking which happens after the first\n * page is loaded from server.\n * This prevents reset of data layer after a SPA route has\n * changed (happens late after full page load) and prevents\n * duplicated trackPageView events.\n */\nlet spaPageViewTrackingEnabled = false;\n\nclass GoogleTagManagerService {\n isScriptLoaded: boolean;\n constructor() {\n this.isScriptLoaded = false;\n\n if (!isNextJs) this._setWebViewHelperFunctionsToWindow();\n }\n\n loadGtmScript() {\n if (!isNextJs) {\n this._newPageFromServer();\n }\n const accountId =\n (typeof process === 'object' &&\n process?.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ACCOUNT_ID) ||\n 'GTM-5TMB2D';\n googleTagManagerSnippet(accountId);\n this.isScriptLoaded = true;\n }\n\n push(payload: object) {\n if (isServer) {\n return;\n }\n\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push(payload);\n }\n\n pushArguments(...args: unknown[]) {\n if (isServer) {\n return;\n }\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push(...args);\n }\n\n _getDatalayerObject(): Record {\n let output = {};\n if (window.dataLayer) {\n for (const entry of window.dataLayer) {\n output = { ...output, ...(entry as Record) };\n }\n }\n return output;\n }\n\n /**\n * destroy datalayer from previous loading. this is really only useful in spa pages, it's backwards compatible so it doesnt do any harm on old pages\n */\n _reset() {\n if (!window.dataLayer) {\n return;\n }\n\n const data = this._getDatalayerObject();\n for (const key of Object.keys(data)) {\n data[key] = undefined;\n }\n window.dataLayer.push({ ...data, event: 'reset' });\n }\n\n _hasPreviouslyTrackedPage = () =>\n !!window.dataLayer?.find(\n (item) => (item as { event: string }).event === 'trackPageview'\n );\n\n newPage(pageType: string, initialDataLayer: object) {\n if (this._hasPreviouslyTrackedPage()) {\n this._reset();\n }\n this._pushInitialDataLayer(initialDataLayer);\n // It is important that the \"Container loaded\" triggered by dataLayer.push({event: \"gtm.js\", ...})\n // happens after \"initialDataLayer\" otherwise variables for the GDPR banner may have the wrong\n // values in Tagmanager. For that reason the GTM script is loaded here after initialDatalayer is set.\n if (!this.isScriptLoaded) {\n this.loadGtmScript();\n }\n this.push({ event: 'pageType', 'page.pageType': pageType });\n }\n\n /**\n * Same as newPage but with logic for case in Touchweb where initial\n * datalayer was set on server and already tracked on landing page.\n * This function does nothing until after first call to trackPageView\n * (e.g. after a SPA-navigation away from the landing page).\n */\n newSpaPage(pageType: string, initialDataLayer: Record) {\n if (!spaPageViewTrackingEnabled) {\n return;\n }\n this.newPage(pageType, initialDataLayer);\n }\n\n _newPageFromServer() {\n const initialDataLayer = buildInitialGtmDataLayerFromInitData(initData);\n this._pushInitialDataLayer(initialDataLayer);\n // ------------------------------------------------\n // backwards compatibility\n // get old datalayer info and push it in\n if (window.legacyDataLayer) {\n for (const entry of window.legacyDataLayer) {\n window.dataLayer.push({\n event: 'tradera/legacyDataLayer',\n ...(entry as unknown[])\n });\n }\n }\n }\n\n _pushInitialDataLayer(initialDataLayer: object) {\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n ...initialDataLayer,\n event: 'initialDataLayer'\n });\n }\n\n /**\n * Tracks a google analytics event asynchronously\n * Good for SEO, users and Web Vitals Interaction to Next Paint.\n * @param {string} category ga category\n * @param {string} action ga action what happens, ie: \"Filter box - open/close\"\n * @param {string} [label] ga label what the value of the action was, ie \"close\"\n * @param {integer} [value] ga interger value of the action\n * @param {boolean} [nonInteractive] if the action does not stems from a user interaction\n */\n trackAction(\n category: string,\n action: string,\n label?: string,\n value?: number,\n nonInteractive?: boolean\n ) {\n queueBackgroundTask(() =>\n this.trackActionSynchronously(\n category,\n action,\n label,\n value || 0,\n nonInteractive ?? false\n )\n );\n }\n\n /**\n * Tracks a google analytics event synchronously\n * @deprecated In 99% of cases, use `trackAction` instead. Using this can cause high Web Vitals INP.\n * @param {string} category ga category\n * @param {string} action ga action what happens, ie: \"Filter box - open/close\"\n * @param {string} [label] ga label what the value of the action was, ie \"close\"\n * @param {integer} [value] ga interger value of the action\n * @param {boolean} [nonInteractive] if the action does not stems from a user interaction\n */\n trackActionSynchronously(\n category: string,\n action: string,\n label?: string,\n value?: number,\n nonInteractive?: boolean\n ) {\n this.push({\n event: 'trackEvent',\n eventCategory: category || '',\n eventAction: action || '',\n eventLabel: label || '',\n eventValue: value || '0',\n eventNonInteractive: nonInteractive || false\n });\n\n Sentry.addBreadcrumb({\n type: 'default',\n level: 'info',\n category: nonInteractive ? 'tracking' : 'ui-action',\n message: 'Analytics Event',\n data: {\n category,\n action,\n label,\n value: value ?? 0\n }\n });\n }\n\n /**\n * google tag manager event. Note: if you want to send google analytics events use trackAction instead\n * @param {string} eventName\n * @param {object} [data] data\n */\n trackGtmEvent(eventName: string, data: object = {}) {\n this.push({\n event: eventName,\n ...data\n });\n }\n\n /**\n * Track a pageview. Use this script in SPA's to make sure that analytics gets pageview information.\n * This creates a virtual page view since google analytics by default doesn't track changes to url via\n * push state.\n */\n trackPageView() {\n this.trackGtmEvent('trackPageview');\n spaPageViewTrackingEnabled = true;\n }\n\n trackLinkClickAndCallback(\n category: string,\n action: string,\n label: string,\n callback: () => void,\n value: unknown = 0\n ) {\n this.push({\n event: 'trackEvent',\n eventCategory: category || '',\n eventAction: action || '',\n eventLabel: label || '',\n eventValue: value || '0',\n eventNonInteractive: false,\n eventCallback: callback // part of google tag manager api to execute code after all tags in datalayer have been executed\n });\n }\n\n trackLinkClickAndGotoUrl(\n category: string,\n action: string,\n label: string,\n url: string,\n value = 0\n ) {\n const callback = () => {\n location.href = url;\n };\n this.trackLinkClickAndCallback(\n category,\n action,\n label,\n callback,\n value\n );\n }\n\n /**\n * Set up helper functions which purpose is to post data to\n * either Android or iOS\n * These are accessed by Google Tag Manager\n *\n * https://firebase.google.com/docs/analytics/webview?platform=ios\n */\n _setWebViewHelperFunctionsToWindow() {\n window.logGaWebViewEvent = (name: string, params: unknown) => {\n if (!name) {\n return;\n }\n\n if (window.AnalyticsWebInterface) {\n // Call Android interface\n window.AnalyticsWebInterface.logEvent(\n name,\n JSON.stringify(params)\n );\n } else if (\n window.webkit &&\n window.webkit.messageHandlers &&\n window.webkit.messageHandlers.firebase\n ) {\n // Call iOS interface\n const message = {\n command: 'logEvent',\n name: name,\n parameters: params\n };\n window.webkit.messageHandlers.firebase.postMessage(message);\n }\n };\n\n window.setGaWebViewUserProperty = (name, value) => {\n if (!name || !value) {\n return;\n }\n\n if (window.AnalyticsWebInterface) {\n // Call Android interface\n window.AnalyticsWebInterface.setUserProperty(name, value);\n } else if (\n window.webkit &&\n window.webkit.messageHandlers &&\n window.webkit.messageHandlers.firebase\n ) {\n // Call iOS interface\n const message = {\n command: 'setUserProperty',\n name: name,\n value: value\n };\n window.webkit.messageHandlers.firebase.postMessage(message);\n }\n };\n }\n}\n\nexport const GtmService = new GoogleTagManagerService();\n","/* eslint-disable better-mutation/no-mutation */\n\nexport const googleTagManagerSnippet = (accountId) =>\n (function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({\n 'gtm.start': new Date().getTime(),\n event: 'gtm.js'\n });\n const f = d.getElementsByTagName(s)[0];\n const j = d.createElement(s);\n j.async = true;\n j.src = '//www.googletagmanager.com/gtm.js?id=' + i;\n f.parentNode?.insertBefore(j, f);\n })(window, document, 'script', 'dataLayer', accountId);\n","import io from 'socket.io-client';\nimport { logger } from 'packages/logger';\nimport { isServer } from 'tradera/utils/nextjs';\n\nexport class MissingSocketIoServerUrl extends ReferenceError {}\nexport class MissingRoomId extends ReferenceError {}\n\nconst isAllowedToConnect = !isServer;\n\n/**\n * Connect to a socket.io channel & add callbacks for events it broadcasts\n * @param {string} socketIoServerUrl\n */\nexport class SocketIoChannel {\n constructor(socketIoServerUrl, autoConnect = false) {\n if (!socketIoServerUrl) {\n throw new MissingSocketIoServerUrl();\n }\n this.socket = io(socketIoServerUrl, {\n autoConnect: isAllowedToConnect && autoConnect\n });\n this.events = {};\n this.rooms = new Set();\n\n this.socket.on('connect', () => {\n // Rejoin room on reconnect if network connection is lost\n this.rooms.forEach((room) => this.join(room));\n });\n\n this.socket.on('clientEvent', (payload) => {\n if (!payload.Type) {\n logger('socket.io missing clientEvent Type', {\n contexts: {\n socketIo: {\n payload\n }\n }\n });\n return;\n }\n const callback = this.events[payload.Type];\n if (callback) {\n callback(payload.Event, this);\n } else {\n logger(`socket.io unknown clientEvent type`, {\n contexts: {\n socketIo: {\n type: payload.Type\n }\n }\n });\n }\n });\n }\n\n connect() {\n if (isAllowedToConnect && !this.isConnected()) this.socket.connect();\n }\n\n join(room) {\n if (!room) {\n throw new MissingRoomId();\n }\n if (this.isConnected()) {\n this.socket.emit('join', room);\n }\n if (!this.rooms.has(room)) {\n // Queue join until connect\n this.rooms.add(room);\n }\n }\n\n leave(room, rejoinOnConnect = false) {\n if (!room) {\n throw new MissingRoomId();\n }\n if (this.isConnected() && this.rooms.has(room)) {\n this.socket.emit('leave', room);\n }\n if (!rejoinOnConnect) {\n this.rooms.delete(room);\n }\n }\n\n addEventListener(event, callback) {\n this.events[event] = callback;\n }\n\n removeEventListener(event) {\n delete this.events[event];\n }\n\n on(event, callback) {\n this.socket.on(event, callback);\n }\n\n off(event, callback) {\n this.socket.off(event, callback);\n }\n\n isConnected() {\n return this.socket?.connected;\n }\n\n disconnect() {\n if (!this || !this.isConnected()) return;\n this.rooms.forEach((room) => this.leave(room, true));\n this.socket.disconnect();\n }\n}\n","/**\n * A queue with a that handled max age (ttl) for messages.\n * @returns\n */\nexport const createQueue = () => {\n const items = [];\n const dayInMinutes = 60 * 24;\n const add = (item, ttlInMinutes = dayInMinutes) => {\n const timeStamp = Date.now();\n items.push({ item, ttlInMinutes, timeStamp });\n };\n const isAlive = ({ ttlInMinutes, timeStamp }) => {\n return timeStamp + ttlInMinutes * 60 * 1000 >= Date.now();\n };\n let inProgress = null;\n return {\n add,\n next: () => {\n let itemData = items.shift();\n while (itemData && !isAlive(itemData)) {\n itemData = items.shift();\n }\n // eslint-disable-next-line better-mutation/no-mutation\n inProgress = itemData?.item || null;\n return inProgress;\n },\n notifyDone: () => {\n // eslint-disable-next-line better-mutation/no-mutation\n inProgress = null;\n },\n isInProgress: () => inProgress !== null,\n getLength: () => items.length\n };\n};\n","import cookie from 'cookie';\nimport type { IncomingHttpHeaders } from 'http';\nimport { addCookie } from 'tradera-backend/utils/cookies';\nimport type { Request, Response } from 'tradera/backend/http/types/http';\nimport { NATIVE_APP_ENVIRONMENT } from 'tradera/constants/cookies';\n\nexport type NativeAppInfo = {\n osVersion?: string;\n appDevice?: string;\n appVersion?: string;\n appContext?: string;\n appLanguage?: string;\n appInstanceId?: string;\n};\n\ntype NativeAppCookieAndHeaderConfig = {\n [P in keyof NativeAppInfo]: {\n header: string;\n initDataName: string;\n };\n};\n\nconst NATIVE_APP_COOKIE_AND_HEADER_CONFIG: NativeAppCookieAndHeaderConfig = {\n osVersion: {\n header: 'x-tradera-app-os-version',\n initDataName: 'nativeAppOsVersion'\n },\n appDevice: {\n header: 'x-tradera-app-device',\n initDataName: 'nativeAppDevice'\n },\n appVersion: {\n header: 'x-tradera-app-version',\n initDataName: 'nativeAppVersion'\n },\n appContext: { header: 'x-tradera-app', initDataName: 'nativeAppContext' },\n appLanguage: {\n header: 'x-language',\n initDataName: 'nativeAppLanguage'\n },\n appInstanceId: {\n header: 'X-Tradera-App-GA-App-Instance-Id',\n initDataName: 'nativeAppInstanceId'\n }\n};\n\nconst createCookie = (name: string, value: string) => {\n const options = {\n httpOnly: false,\n path: '/'\n };\n return cookie.serialize(name, String(value), options);\n};\n\nconst isString = (s: unknown) => typeof s === 'string';\n\nexport const createNativeAppCookieValue = (\n nativeAppInfo: Record\n) => {\n const valueObject = Object.fromEntries(\n Object.entries(nativeAppInfo).filter(\n ([key, value]) =>\n key in NATIVE_APP_COOKIE_AND_HEADER_CONFIG && isString(value)\n )\n );\n return JSON.stringify(valueObject);\n};\n\nexport const createNativeAppCookie = (\n nativeAppInfo: Record\n) => {\n return createCookie(\n NATIVE_APP_ENVIRONMENT,\n createNativeAppCookieValue(nativeAppInfo)\n );\n};\n\n/**\n * Gets info about the native app if in native app context.\n * The function also updates a cookie with the same information\n * to be used for later calls to this function if the headers are\n * not present.\n *\n * @param {*} req\n * @param {*} res\n * @returns An object with these properties: {\n osVersion,\n appDevice,\n appVersion,\n appContext\n }\n */\nexport const getAndUpdateNativeAppInfo = (\n req: Request,\n res: Response\n): NativeAppInfo => {\n const nativeAppInfoFromHeaders = extractNativeAppInfoFromHeaders(\n req.headers\n );\n\n const hasAppHeaders =\n Object.values(nativeAppInfoFromHeaders).filter(Boolean).length > 0;\n if (hasAppHeaders) {\n const cookie = createNativeAppCookie(nativeAppInfoFromHeaders);\n addCookie(res, cookie);\n return nativeAppInfoFromHeaders;\n }\n\n const nativeAppInfoFromCookie = extractNativeAppInfoFromCookie(\n req.cookies[NATIVE_APP_ENVIRONMENT]\n );\n return nativeAppInfoFromCookie;\n};\n\nexport const extractNativeAppInfoFromCookie = (\n nativeAppCookieString: string | null | undefined\n): NativeAppInfo =>\n nativeAppCookieString\n ? Object.fromEntries(\n Object.entries(\n JSON.parse(decodeURIComponent(nativeAppCookieString))\n ).filter(([key]) => key in NATIVE_APP_COOKIE_AND_HEADER_CONFIG)\n )\n : {};\n\nexport const extractNativeAppInfoFromHeaders = (\n headers: IncomingHttpHeaders\n) => {\n return Object.entries(NATIVE_APP_COOKIE_AND_HEADER_CONFIG).reduce(\n (obj: Record, [key, config]) => {\n const header = headers[config.header];\n const singleValue = Array.isArray(header) ? header[0] : header;\n obj[key] = singleValue || '';\n return obj;\n },\n {}\n );\n};\n\nexport const extractNativeAppInfoFromInitData = (\n initData: Record\n) => {\n return Object.entries(NATIVE_APP_COOKIE_AND_HEADER_CONFIG).reduce(\n (obj: Record, [key, config]) => {\n obj[key] = initData[config.initDataName] || '';\n return obj;\n },\n {}\n );\n};\n","import axios from 'axios';\nimport { selectPreferredLanguageCode } from 'tradera/state/language/selectors';\nimport { toLocalizedUrl } from 'tradera/utils/url';\nimport {\n setEnvironmentHash,\n setIsSpaNavigationEnabled,\n setGATrackingData,\n setNativeAppInfo,\n setVariables,\n setVersion,\n setFeatureSwitches,\n setSplitTestGroups,\n setEnvironment\n} from './reducer';\nimport { isNextJs } from 'tradera/utils/nextjs';\nimport { selectMemberId } from 'tradera/state/member/selectors';\nimport {\n createNativeAppCookieValue,\n extractNativeAppInfoFromCookie,\n extractNativeAppInfoFromInitData\n} from './native-app-info-helper';\nimport cookie from 'tradera/utils/cookie';\nimport { NATIVE_APP_ENVIRONMENT } from 'tradera/constants/cookies';\nimport { GtmService as gtm } from 'tradera/services/google-tagmanager-service';\nimport type { AppDispatch, GetState } from 'tradera/state/configure-store';\nimport {\n isAndroid,\n isMobile,\n isMobileSafari,\n isIOS,\n browserName\n} from 'react-device-detect';\n\nconst getVersionUrl = (getState: GetState) => {\n if (isNextJs) {\n const queryParameters = new URLSearchParams({ next: '1' });\n const memberId = selectMemberId(getState());\n if (memberId) {\n queryParameters.set('memberId', `${memberId}`);\n }\n return `/api/version?${queryParameters}`;\n }\n\n const preferredLanguageCode = selectPreferredLanguageCode(getState());\n\n return toLocalizedUrl('/ping', preferredLanguageCode);\n};\n\nexport const updateEnvironmentHash =\n () => async (dispatch: AppDispatch, getState: GetState) => {\n const url = getVersionUrl(getState);\n const response = await axios.get(url);\n const environmentHash = response.headers['x-tradera-environment'];\n const current = getState().environment.environmentHash;\n if (environmentHash !== current) {\n dispatch(setEnvironmentHash(environmentHash));\n dispatch(setIsSpaNavigationEnabled(false));\n }\n };\n\nconst getAndUpdateNativeAppInfo = (initData: Record) => {\n const nativeAppInfoFromInitData =\n extractNativeAppInfoFromInitData(initData);\n const hasAnyValidProperties =\n Object.values(nativeAppInfoFromInitData).filter(Boolean).length > 0;\n if (hasAnyValidProperties) {\n const nativeAppCookieValue = createNativeAppCookieValue(\n nativeAppInfoFromInitData\n );\n cookie.createCookie(NATIVE_APP_ENVIRONMENT, nativeAppCookieValue);\n return nativeAppInfoFromInitData;\n }\n\n const cookieValue = cookie.readCookie(NATIVE_APP_ENVIRONMENT);\n const nativeAppInfo = extractNativeAppInfoFromCookie(cookieValue);\n return nativeAppInfo;\n};\n\nexport const setupGATrackingData =\n () => (dispatch: AppDispatch, getState: GetState) => {\n const {\n environment: { variables }\n } = getState();\n const { PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID } = variables;\n\n gtm.pushArguments(\n 'get',\n PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID,\n 'session_id',\n (sessionId: string) => {\n dispatch(setGATrackingData({ sessionId }));\n }\n );\n };\n\nexport const initEnvironment =\n (initData: {\n environment: string;\n environmentHash: string;\n featureSwitches: Record;\n googleAnalyticsTrackingId: string;\n googleAnalyticsMeasurementId: string;\n geoPublicApiBaseUrl: string;\n isSinglePageApp: boolean;\n splitTests: Record;\n splitTestGroups: Record;\n version: string;\n webLiveUrl: string;\n }) =>\n async (dispatch: AppDispatch) => {\n const {\n environment,\n environmentHash,\n featureSwitches,\n googleAnalyticsTrackingId,\n googleAnalyticsMeasurementId,\n geoPublicApiBaseUrl,\n isSinglePageApp,\n splitTestGroups,\n version,\n webLiveUrl\n } = initData;\n\n const isSpaNavigationEnabled =\n isSinglePageApp && !window.frameElement ? true : false; // No SPA navigation in native apps or iFrame\n dispatch(setIsSpaNavigationEnabled(isSpaNavigationEnabled));\n dispatch(setEnvironment(environment));\n dispatch(setEnvironmentHash(environmentHash));\n dispatch(setFeatureSwitches(featureSwitches));\n dispatch(setSplitTestGroups(splitTestGroups));\n dispatch(setVersion(version));\n dispatch(\n setVariables({\n // Names must be the same as NextWeb's .env variables\n PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: googleAnalyticsTrackingId,\n PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID:\n googleAnalyticsMeasurementId,\n PUBLIC_GEO_PUBLIC_API_BASE_URL: geoPublicApiBaseUrl,\n PUBLIC_WEB_LIVE_URL: webLiveUrl\n })\n );\n dispatch(\n setNativeAppInfo({\n ...getAndUpdateNativeAppInfo(initData),\n browserName,\n isMobileDevice: isMobile,\n isMobileSafari,\n isIOS,\n isAndroid\n })\n );\n\n dispatch(setupGATrackingData());\n };\n","export const parseAppVersion = (version) => {\n const [major = 0, minor = 0, patch = 0] = String(version)\n .split('.')\n .map(Number)\n .filter((number) => !Number.isNaN(number));\n return { major, minor, patch };\n};\n\nexport const isSupportedMinimumVersion = (\n appVersionString,\n minimumVersionString\n) => {\n const appVersion = parseAppVersion(appVersionString);\n const minimumVersion = parseAppVersion(minimumVersionString);\n if (appVersion.major > minimumVersion.major) {\n return true;\n }\n if (appVersion.major === minimumVersion.major) {\n if (appVersion.minor > minimumVersion.minor) {\n return true;\n }\n if (appVersion.minor === minimumVersion.minor) {\n if (appVersion.patch >= minimumVersion.patch) {\n return true;\n }\n }\n }\n\n return false;\n};\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { type PayloadAction, createSlice } from '@reduxjs/toolkit';\nimport type { NativeAppInfo } from 'tradera/state/environment/native-app-info-helper';\nimport { getNativeAppSupport } from 'tradera/state/environment/native-app-support';\n\ntype EnvironmentSlice = {\n isSpaNavigationEnabled: boolean;\n featureSwitches: Record;\n splitTestGroups: Record;\n variables: Record;\n environmentHash: string | null;\n gaTrackingSessionId: string | null;\n isHybridAppContextForAndroid: boolean;\n isHybridAppContextForIos: boolean;\n isNativeAppWithApplyPaySupport: boolean;\n isNativeAppWithSwishCallbackSupport: boolean;\n isNativeAppWithKlarnaSupport: boolean;\n isNativeAppWithTrustlySupport: boolean;\n isHybridAppContext: boolean;\n appInstanceId: string | null;\n isIOS: boolean;\n isNativeAppContext?: boolean;\n isMobileDevice: boolean;\n isMobileSafari: boolean;\n version: string | null;\n browserName: string | null;\n appLanguage: string | null;\n appVersion: string | null;\n environment: string;\n};\n\nexport const initialState: EnvironmentSlice = {\n featureSwitches: {},\n splitTestGroups: {},\n variables: {},\n isSpaNavigationEnabled: true,\n environment: process.env.NODE_ENV,\n version: null,\n environmentHash: null,\n gaTrackingSessionId: null,\n isHybridAppContextForAndroid: false,\n isHybridAppContextForIos: false,\n isNativeAppWithApplyPaySupport: false,\n isNativeAppWithSwishCallbackSupport: false,\n isNativeAppWithKlarnaSupport: false,\n isNativeAppWithTrustlySupport: false,\n isHybridAppContext: false,\n isIOS: false,\n appInstanceId: null,\n isMobileDevice: false,\n isMobileSafari: false,\n browserName: null,\n appLanguage: null,\n appVersion: null\n};\n\nconst slice = createSlice({\n name: 'environment',\n initialState,\n reducers: {\n setEnvironmentHash: (state, { payload }) => {\n state.environmentHash = payload;\n },\n setEnvironment: (state, { payload }: PayloadAction) => {\n state.environment = payload;\n },\n setIsSpaNavigationEnabled: (state, { payload }) => {\n state.isSpaNavigationEnabled = payload;\n },\n setGATrackingData: (state, { payload }) => {\n state.gaTrackingSessionId = payload.sessionId;\n },\n setFeatureSwitches: (\n state,\n { payload }: PayloadAction>\n ) => {\n state.featureSwitches = payload;\n },\n setSplitTestGroups: (\n state,\n { payload }: PayloadAction>\n ) => {\n state.splitTestGroups = payload;\n },\n setVariables: (\n state,\n { payload }: PayloadAction>\n ) => {\n state.variables = payload;\n },\n setVersion: (state, { payload }: PayloadAction) => {\n state.version = payload;\n },\n setNativeAppInfo: (\n state,\n {\n payload: {\n appContext,\n appDevice,\n appInstanceId,\n appLanguage,\n appVersion,\n browserName,\n osVersion,\n isIOS,\n isAndroid,\n isMobileDevice,\n isMobileSafari\n }\n }: PayloadAction<\n NativeAppInfo & {\n browserName: string;\n isMobileDevice: boolean;\n isMobileSafari: boolean;\n isIOS: boolean;\n isAndroid: boolean;\n }\n >\n ) => {\n const isHybridAppContext = Boolean(appContext);\n const isNativeAppContext = appContext === 'Native';\n const nativeAppSupport = getNativeAppSupport({\n isNativeAppContext,\n isHybridAppContext,\n hybridAppDevice: appDevice,\n hybridAppVersion: appVersion,\n appOsVersion: osVersion,\n isIOS,\n isAndroid\n });\n\n state.isHybridAppContextForAndroid =\n nativeAppSupport.isHybridAppContextForAndroid;\n state.isHybridAppContextForIos =\n nativeAppSupport.isHybridAppContextForIos;\n state.isNativeAppWithApplyPaySupport =\n nativeAppSupport.isNativeAppWithApplyPaySupport;\n state.isNativeAppWithSwishCallbackSupport =\n nativeAppSupport.isNativeAppWithSwishCallbackSupport;\n state.isNativeAppWithKlarnaSupport =\n nativeAppSupport.isNativeAppWithKlarnaSupport;\n state.isNativeAppWithTrustlySupport =\n nativeAppSupport.isNativeAppWithTrustlySupport;\n state.isHybridAppContext = isHybridAppContext;\n state.appInstanceId = appInstanceId || null;\n state.isIOS = isIOS;\n state.isMobileDevice = isMobileDevice;\n state.isMobileSafari = isMobileSafari;\n state.isNativeAppContext = isNativeAppContext;\n state.appLanguage = appLanguage || null;\n state.appVersion = appVersion || null;\n state.browserName = browserName;\n }\n }\n});\n\nexport const {\n setEnvironment,\n setEnvironmentHash,\n setIsSpaNavigationEnabled,\n setGATrackingData,\n setNativeAppInfo,\n setFeatureSwitches,\n setSplitTestGroups,\n setVariables,\n setVersion\n} = slice.actions;\nexport const reducer = slice.reducer;\n","import { isSupportedMinimumVersion } from 'tradera/utils/versions';\n\nexport const getNativeAppSupport = ({\n isNativeAppContext,\n isHybridAppContext,\n hybridAppDevice,\n hybridAppVersion,\n appOsVersion,\n isIOS,\n isAndroid\n}) => {\n const isHybridAppContextForAndroid = Boolean(\n isHybridAppContext &&\n (hybridAppDevice?.toLowerCase().includes('android') || isAndroid)\n );\n const isHybridAppContextForIos = Boolean(\n isHybridAppContext &&\n (hybridAppDevice?.toLowerCase().includes('iphone') ||\n hybridAppDevice?.toLowerCase().includes('ipad') ||\n isIOS)\n );\n const isIos13 =\n isNativeAppContext &&\n isHybridAppContextForIos &&\n isSupportedMinimumVersion(appOsVersion, '13');\n return {\n isHybridAppContextForAndroid,\n isHybridAppContextForIos,\n isNativeAppWithApplyPaySupport:\n isIos13 && isSupportedMinimumVersion(hybridAppVersion, '3.51'),\n isNativeAppWithSwishCallbackSupport:\n isIos13 && isSupportedMinimumVersion(hybridAppVersion, '3.57'),\n isNativeAppWithKlarnaSupport:\n isNativeAppContext &&\n ((isIOS && isSupportedMinimumVersion(hybridAppVersion, '3.68')) ||\n (isAndroid &&\n isSupportedMinimumVersion(hybridAppVersion, '3.58'))),\n isNativeAppWithTrustlySupport:\n isNativeAppContext &&\n ((isIOS && isSupportedMinimumVersion(hybridAppVersion, '3.123')) ||\n (isAndroid &&\n isSupportedMinimumVersion(hybridAppVersion, '3.87')))\n };\n};\n","import type { RootState } from '../configure-store';\n\nexport const selectEnvironment = (state: RootState) => state.environment;\n\nexport const selectFeatureSwitches = (state: RootState) =>\n state?.environment?.featureSwitches;\nexport const selectIsFeatureEnabled =\n (featureName: string) => (state: RootState) =>\n selectFeatureSwitches(state)?.[featureName] === true;\n\nexport const selectEnvVariables = (state: RootState) =>\n state.environment.variables;\n\nexport const selectWebLiveUrl = (state: RootState) =>\n state.environment.variables.PUBLIC_WEB_LIVE_URL;\n\nexport const selectBrowserName = (state: RootState) =>\n state?.environment?.browserName;\n\nexport const selectIsNativeApp = (state: RootState) =>\n !!state?.environment?.isNativeAppContext;\n\nexport const selectNativeAppLanguage = (state: RootState) =>\n state?.environment?.appLanguage;\n","import type { RootState } from '../configure-store';\nimport { defaultCurrency } from './reducer';\n\nexport const selectCurrencies = (state: RootState) =>\n state.multiCurrency.currencies;\n\nexport const selectPreferredCurrency = (state: RootState) =>\n state.multiCurrency.preferredCurrency ||\n state.multiCurrency.currencies.find((c) => c.code === 'SEK') ||\n defaultCurrency;\n\nexport const selectIsPreferredCurrencySEK = (state: RootState) =>\n selectPreferredCurrency(state)?.code === 'SEK';\n\nexport const selectShowCurrencySelection = (state: RootState) =>\n !!(\n state.multiCurrency.enabled &&\n state.multiCurrency.preferredCurrency &&\n state.multiCurrency.currencies &&\n state.multiCurrency.currencies.length > 0\n );\n","import {\n selectGeolocation,\n selectIsLoggedIn,\n selectIsOutsideSweden\n} from 'tradera/state/member/selectors';\nimport { selectPreferredLanguage } from 'tradera/state/language/selectors';\nimport { getLanguageFromCountryCode } from 'tradera/localization/languagecode';\nimport {\n isDenmarkCountryCode,\n isNetherlandsCountryCode,\n isSwedenCountryCodeOrUndefined\n} from 'tradera/localization/countrycode';\nimport type { RootState } from '../configure-store';\n\nexport const selectShowRegionSelection = (state: RootState) =>\n !selectIsLoggedIn(state) && selectIsOutsideSweden(state);\nexport const selectAvailableShippingCountryCodes = (state: RootState) =>\n state.shippingRegion.availableShippingCountryCodes;\nexport const selectAvailableShippingCountries = (state: RootState) =>\n state.shippingRegion.availableShippingCountries;\nexport const selectShippingCountry = (state: RootState) =>\n state.shippingRegion.shippingCountry;\nexport const selectIsLoadingAvailableShippingCountries = (state: RootState) =>\n state.shippingRegion.isLoadingAvailableShippingCountries;\nexport const selectHasLoadedAvailableShippingCountries = (state: RootState) =>\n state.shippingRegion.hasLoadedAvailableShippingCountries;\nexport const selectShippingRegionCountryCodeIso2 = (state: RootState) =>\n state.shippingRegion.shippingCountry?.countryCodeIso2;\nexport const selectIsSwedishVisitor = (state: RootState) =>\n isSwedenCountryCodeOrUndefined(selectShippingRegionCountryCodeIso2(state));\nexport const selectIsDanishVisitor = (state: RootState) =>\n isDenmarkCountryCode(selectShippingRegionCountryCodeIso2(state));\nexport const selectIsDutchVisitor = (state: RootState) =>\n isNetherlandsCountryCode(selectShippingRegionCountryCodeIso2(state));\n\nconst gpsMatchesLanguage = (state: RootState) => {\n const geoLocation = selectGeolocation(state);\n if (!geoLocation) {\n return true;\n }\n const country = geoLocation?.isoCode?.toLowerCase();\n const expectedLang = getLanguageFromCountryCode(country);\n const language =\n selectPreferredLanguage(state)?.languageCodeIso2?.toLowerCase() || 'sv';\n return expectedLang === language;\n};\n\nexport const selectShowLocalizationRegionPicker = (state: RootState) =>\n !selectIsLoggedIn(state) &&\n !state.shippingRegion.regionPickerDismissed &&\n !state.shippingRegion.shippingCountryCookieValue &&\n !gpsMatchesLanguage(state);\n","/* eslint-disable better-mutation/no-mutation */\nimport { createSlice } from '@reduxjs/toolkit';\nimport { NS_ATTRIBUTES, NS_TOUCHWEB } from 'tradera/lang/constants.mjs';\n\ntype TranslationKeyValue = Record;\ntype NamespaceTranslations = Record;\n\nexport type TranslationsState = {\n renderedKeys: NamespaceTranslations;\n};\n\nexport const initialState: TranslationsState = {\n renderedKeys: {\n [NS_TOUCHWEB]: {},\n [NS_ATTRIBUTES]: {}\n }\n};\n\nconst slice = createSlice({\n name: 'translations',\n initialState,\n reducers: {\n addTranslationKey: (state, { payload }) => {\n const { namespace, key, translation } = payload;\n state.renderedKeys[namespace][key] = translation;\n }\n }\n});\n\nexport const { addTranslationKey } = slice.actions;\nexport const reducer = slice.reducer;\n","export function isNullOrUndefined(value: unknown): value is null | undefined {\n // For undeclared variables, typeof foo will return the string literal\n // \"undefined\", whereas the identity check foo === undefined would\n // trigger the error \"foo is not defined\".\n return value === null || typeof value === 'undefined';\n}\n\nexport function isUndefinedOrEmpty(value: string | undefined) {\n return value === undefined || (value as string).trim() === '';\n}\n","import cookie from 'cookie';\n\nexport const getCookieFromString = (cookieString: string, key: string) =>\n cookie.parse(cookieString)[key] || null;\n\n/**\n * Helper function for cookie and GDPR utilities do NOT use this directly. Use the cookie\n * utility instead as that is GDPR compliant.\n * @returns\n */\nexport const getCookieFromBrowser = (key: string) =>\n getCookieFromString(window.document.cookie, key);\n\n/**\n * Helper function for cookie and GDPR utilities do NOT use this directly. Use the cookie\n * utility instead as that is GDPR compliant.\n * @returns\n */\nexport const setCookieToBrowser = (s: string) => {\n window.document.cookie = s;\n};\n","import plainDayjs from 'dayjs';\nimport isBetween from 'dayjs/plugin/isBetween';\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\nimport {\n DAY_IN_SECONDS,\n HOUR_IN_SECONDS,\n MINUTE_IN_SECONDS\n} from 'tradera/constants/time';\nimport 'dayjs/locale/sv';\nimport 'dayjs/locale/da';\nimport 'dayjs/locale/de';\nimport 'dayjs/locale/fr';\nimport 'dayjs/locale/nl';\n\nplainDayjs.extend(isBetween);\nplainDayjs.extend(isSameOrAfter);\nplainDayjs.extend(utc);\nplainDayjs.extend(timezone);\nplainDayjs.extend(localizedFormat);\n\nexport const dayjs = plainDayjs;\n\nexport const localizedDayjs =\n (locale) =>\n (...args) =>\n dayjs(...args).locale(locale);\n\nconst swedishTimeZone = 'Europe/Stockholm';\n\nexport const swedishTimeZoneDate = (date, localizedDayjsFn) => {\n // This is a workaround for locale being lost when using .tz() in Nextweb\n const locale = localizedDayjsFn().locale();\n return localizedDayjsFn(date).tz(swedishTimeZone).locale(locale);\n};\n\nexport const formatUtcDateAsSwedishTimeZoneDate = (\n date,\n localizedDayjsFn,\n options = {}\n) => {\n const standardFormat = 'D MMM HH:mm'; // 19 okt 09:50\n const format = options.includeWeekday\n ? `ddd ${standardFormat}` // tor 19 okt 09:50\n : standardFormat;\n\n return swedishTimeZoneDate(date, localizedDayjsFn).format(format);\n};\n\nexport const getCurrentSwedishTimeZoneDate = () =>\n dayjs().tz(swedishTimeZone).format('YYYYMMDD');\n\n/**\n * Format a number of seconds to an object of time units\n *\n * @param {number} seconds\n * @param {object} [options]\n * @param {string} [options.startUnit] - Time part to start counting from, empty for all parts\n * @param {string} [options.endUnit] - Time part to stop counting on, empty for all parts\n * @returns {{string: integer}}\n */\nexport const getTimeSpanParts = (seconds, options = {}) => {\n const optionsWithDefaults = {\n startUnit: '',\n endUnit: '',\n ...options\n };\n const parts = {};\n let remaining = seconds;\n let started = !optionsWithDefaults.startUnit;\n for (const [part, length] of Object.entries(TIME_SPAN_UNIT_LENGTHS)) {\n if (!started && part === optionsWithDefaults.startUnit) started = true;\n if (started) {\n if (remaining >= length) {\n parts[part] = Math.floor(remaining / length);\n }\n // eslint-disable-next-line better-mutation/no-mutation\n remaining %= length;\n if (remaining === 0 || optionsWithDefaults.endUnit === part) break;\n }\n }\n return parts;\n};\n\nexport const TIME_SPAN_UNITS = {\n DAYS: 'days',\n HOURS: 'hours',\n MINUTES: 'minutes',\n SECONDS: 'seconds'\n};\n\nconst TIME_SPAN_UNIT_LENGTHS = {\n [TIME_SPAN_UNITS.DAYS]: DAY_IN_SECONDS,\n [TIME_SPAN_UNITS.HOURS]: HOUR_IN_SECONDS,\n [TIME_SPAN_UNITS.MINUTES]: MINUTE_IN_SECONDS,\n [TIME_SPAN_UNITS.SECONDS]: 1\n};\n","export const buildInitialGtmDataLayerFromInitData = (initData) => {\n // ***** ATTENTION !!! *****\n // If you change anything here you must\n // also change in buildInitialGtmDataLayerFromState\n // so that they match. Otherwise values\n // between Touchweb and NextWeb don't match.\n const initialDataLayer = {\n memberId: initData.memberId || 0,\n userLanguage: initData.languageCodeIso2,\n memberEmail: initData.isLoggedIn ? initData.memberEmail : '',\n memberHashedEmail: initData.isLoggedIn\n ? initData.memberEmailSha256\n : '',\n 'criteo.hashedEmail': initData.isLoggedIn\n ? initData.memberEmailMd5\n : '',\n memberFirstName: initData.isLoggedIn ? initData.memberFirstName : '',\n memberLastName: initData.isLoggedIn ? initData.memberLastName : '',\n memberCountry: initData.isLoggedIn ? initData.memberCountry : '',\n loginState: initData.isLoggedIn ? 'logged in' : 'not logged in',\n isNotInIframe: window.self === window.top,\n 'blueshift.event-api-key': initData.blueshiftEventApiKey,\n 'blueshift.event-signature': initData.blueshiftEventSignature || '',\n 'blueshift.event-verification-key': initData.memberId || 0,\n isSinglePageApp: initData.isSinglePageApp,\n isNativeAppContext: initData.isNativeAppContext,\n isQuantcastConsentEnabled:\n initData.featureSwitches['quantcast-consent'],\n isTikTokPixelEnabled: initData.featureSwitches['tiktok-pixel'],\n isDigitalAudienceTrackingEnabled:\n initData.featureSwitches['digital-audience-tracking'],\n quantcastSite: initData.featureSwitches['use-beta-consent-property']\n ? 'beta.tradera.com'\n : 'www.tradera.com'\n };\n // add split tests to datalayer\n if (initData.splitTestGroups) {\n for (const [key, value] of Object.entries(initData.splitTestGroups)) {\n initialDataLayer[`splittest_${key}`] = value;\n }\n }\n return initialDataLayer;\n};\n\nexport const buildInitialGtmDataLayerFromState = (state) => {\n const { environment, language, member } = state;\n const { featureSwitches } = environment;\n const isQuantcastConsentEnabled = featureSwitches['quantcast-consent'];\n const isTikTokPixelEnabled = featureSwitches['tiktok-pixel'];\n const isDigitalAudienceTrackingEnabled =\n featureSwitches['digital-audience-tracking'];\n const quantcastSite = featureSwitches['use-beta-consent-property']\n ? 'beta.tradera.com'\n : 'www.tradera.com';\n const splitTestGroups = Object.entries(environment.splitTestGroups).reduce(\n (groups, [key, value]) => {\n return {\n ...groups,\n [`splittest_${key}`]: value\n };\n },\n {}\n );\n // ***** ATTENTION !!! *****\n // If you change anything here you must\n // also change in buildInitialGtmDataLayerFromInitData\n // so that they match. Otherwise values\n // between Touchweb and NextWeb don't match.\n return {\n memberId: member.memberId || 0,\n userLanguage: language.preferred.languageCodeIso2,\n memberEmail: member.memberEmail || '',\n memberHashedEmail: member.memberEmailSha256 || '',\n 'criteo.hashedEmail': member.memberEmailMd5 || '',\n memberFirstName: member.memberFirstName || '',\n memberLastName: member.memberLastName || '',\n memberCountry: member.memberCountry || '',\n loginState: member.isLoggedIn ? 'logged in' : 'not logged in',\n isNotInIframe: window.self === window.top,\n 'blueshift.event-api-key':\n environment.variables.PUBLIC_BLUESHIFT_EVENT_API_KEY,\n 'blueshift.event-signature': member.blueshiftEventSignature || '',\n 'blueshift.event-verification-key': member.memberId || 0,\n isSinglePageApp: true,\n isNativeAppContext: environment.isNativeAppContext,\n isQuantcastConsentEnabled,\n isDigitalAudienceTrackingEnabled,\n isTikTokPixelEnabled,\n quantcastSite,\n ...splitTestGroups\n };\n};\n","import ENDPOINTS from 'tradera/constants/endpoints';\nimport {\n axiosWithTokenRefresh,\n checkResponseVersion,\n finalizeResponse,\n handleError,\n utilizeCancelToken,\n axiosConfigs\n} from 'tradera/utils/api';\nimport initData from 'tradera/legacy/static/packages/init-data';\nimport { toLocalizedUrl } from 'tradera/utils/url';\nimport { getLanguage } from 'tradera/utils/language';\nimport { isServer } from 'tradera/utils/nextjs';\nimport type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';\n\ntype HttpClientConfig = AxiosRequestConfig & { cancelTokenId?: string };\n\nconst ensureClientOnly = () => {\n // Cancel tokens would be shared per server instance so ensure we are not on server.\n if (isServer) {\n throw new Error('This HTTP client is only safe to use on frontend');\n }\n};\n\n// Prevents URL:s that begins with // when that was not intended.\nconst getSafeUrl = (baseUrl: string, url?: string) => {\n if (baseUrl.endsWith('/') && url?.startsWith('/')) {\n return baseUrl + url.substring(1);\n }\n return baseUrl + url;\n};\n\nconst httpClient = (baseUrl: string, shouldLocalizeUrl?: boolean) => {\n const axiosWrapper = (\n url: string | undefined,\n httpClientConfig: HttpClientConfig,\n axiosCaller: (\n axios: AxiosInstance,\n url: string,\n config: AxiosRequestConfig\n ) => Promise>\n ) => {\n const { cancelTokenId, ...axiosConfig } = httpClientConfig;\n const version = initData.version;\n if (cancelTokenId) {\n const { cancel, cancelToken } = utilizeCancelToken(cancelTokenId);\n // eslint-disable-next-line better-mutation/no-mutation\n axiosConfig.cancelToken = cancelToken;\n if (cancel) {\n cancel();\n }\n }\n const safeUrl = getSafeUrl(baseUrl, url);\n const localizedUrl = shouldLocalizeUrl\n ? toLocalizedUrl(safeUrl, getLanguage())\n : safeUrl;\n return axiosCaller(axiosWithTokenRefresh(), localizedUrl, axiosConfig)\n .then(\n version ? checkResponseVersion(version) : (response) => response\n )\n .then(finalizeResponse())\n .catch(handleError());\n };\n\n return {\n get: (\n url: string,\n httpClientConfig: HttpClientConfig = axiosConfigs.authenticated\n ) => {\n ensureClientOnly();\n return axiosWrapper(url, httpClientConfig, (axios, url, config) =>\n axios.get(url, config)\n );\n },\n post: (\n url: string,\n payload: TRequest,\n httpClientConfig: HttpClientConfig = axiosConfigs.authenticated\n ) => {\n ensureClientOnly();\n return axiosWrapper(url, httpClientConfig, (axios, url, config) =>\n axios.post, TRequest>(\n url,\n payload,\n config\n )\n );\n },\n put: (\n url: string,\n payload: TRequest,\n httpClientConfig: HttpClientConfig = axiosConfigs.authenticated\n ) => {\n ensureClientOnly();\n return axiosWrapper(url, httpClientConfig, (axios, url, config) =>\n axios.put, TRequest>(\n url,\n payload,\n config\n )\n );\n },\n delete: (\n url: string,\n httpClientConfig: HttpClientConfig = axiosConfigs.authenticated\n ) => {\n ensureClientOnly();\n return axiosWrapper(url, httpClientConfig, (axios, url, config) =>\n axios.delete(url, config)\n );\n },\n request: (\n config: AxiosRequestConfig,\n httpClientConfig: HttpClientConfig = axiosConfigs.authenticated\n ) => {\n ensureClientOnly();\n return axiosWrapper(\n config.url,\n httpClientConfig,\n (axios, url, enhancedConfig) => {\n return axios.request({ ...config, ...enhancedConfig, url });\n }\n );\n }\n };\n};\n\nconst trpcClient = (endpoint: string) => {\n const client = httpClient(`/api/${endpoint}`, false);\n function unpackResponse(response: { data: TResponse }) {\n if (typeof response === 'object' && 'data' in response) {\n return response.data;\n }\n }\n return {\n command: (\n commandName: string,\n payload: TRequest,\n httpClientConfig?: HttpClientConfig\n ): Promise =>\n client\n .post(\n `/commands/${commandName}`,\n payload,\n httpClientConfig\n )\n .then(unpackResponse),\n query: (queryName: string, httpClientConfig: HttpClientConfig) =>\n client\n .get(`/queries/${queryName}`, httpClientConfig)\n .then(unpackResponse)\n };\n};\n\nexport const defaultClient = httpClient('');\nexport const touchWebClient = httpClient('/', true);\nexport const webApiClient = httpClient(ENDPOINTS.WEB_API, false);\nexport const cmsApiClient = httpClient('/api/cms');\nexport const marketingApiClient = httpClient(ENDPOINTS.MARKETING_PUBLIC_API);\nexport const memberIdentificationClient = trpcClient('member-identification');\nexport const translationDynamicApiClient = trpcClient(\n 'translation-dynamic-api'\n);\nexport const shippingRecommendationsClient = trpcClient(\n 'shipping-recommendations'\n);\n","import { toLocalizedUrl } from 'tradera/utils/url';\nimport { isServer } from 'tradera/utils/nextjs';\n\nexport const toLocalizedRiotUrl = (url) => toLocalizedUrl(url, getLanguage());\n\nlet language;\nexport const getLanguage = () => {\n if (isServer) {\n return;\n }\n if (language === '' || language === null || language === undefined) {\n // If we did this on the server in NextWeb all requests to the\n // same server would get the same language. This code is only\n // OK to run in the browser.\n // eslint-disable-next-line better-mutation/no-mutation\n language = document.querySelector('html').getAttribute('lang');\n }\n\n return language;\n};\n","import type { Request } from 'tradera/backend/http/types/http';\n\nexport const isServer = typeof window === 'undefined';\nexport const isServerFunc = () => typeof window === 'undefined';\n\nexport const isTest = process.env.NODE_ENV === 'test';\n\nexport const isClientApiRequest = (req: Request) =>\n Boolean(req?.url?.startsWith('/_next/data'));\n\nexport const isNextJs = isServer || document.getElementById('__next') !== null;\n","/**\n * This is a workaround to remove the following predefined GTM tag iframes on SPA navigation:\n * - Google Ads Remarketing\n * - Google Ads Conversion Tracking\n * - Floodlight Counter\n * - Floodlight Sales\n * - Criteo\n * Iframe are removed to prevent these iframes from duplicating the browser\n * back/forward-history entries, which seems to be a bug on Google's side:\n * https://support.google.com/tagmanager/thread/237899073/?hl=en\n *\n * This issue is likely originating from the introduction of the\n * Privacy Sandbox https://privacysandbox.com/\n */\n\nconst SANDBOX_IFRAME_SRC = [\n 'https://td.doubleclick.net/',\n 'https://fledge.eu.criteo.com/'\n];\n\nconst isSandboxOrigin = (node: HTMLIFrameElement) =>\n typeof node.src === 'string' &&\n SANDBOX_IFRAME_SRC.some((sandboxOrigins) =>\n node.src.startsWith(sandboxOrigins)\n );\n\nconst isPrivacySandbox = (node: HTMLIFrameElement) =>\n typeof node.allow === 'string' &&\n node.allow.includes('join-ad-interest-group');\n\nconst isGoogleAdsIframe = (node: Node): boolean =>\n node instanceof HTMLIFrameElement &&\n isSandboxOrigin(node) &&\n isPrivacySandbox(node);\n\nexport const removePrivacySandboxIframes = () =>\n Array.from(\n document.body.querySelectorAll(\n 'iframe[allow=\"join-ad-interest-group\"]'\n )\n )\n .filter(isGoogleAdsIframe)\n .forEach((iframe) => iframe.remove());\n","import { logger } from 'tradera/legacy/static/packages/logger';\nimport { isServer } from 'tradera/utils/nextjs';\nimport type { TaskPriority } from 'src/types/scheduler-polyfill.d.ts';\n\ntype isInputPendingOptions = { includeContinuous: boolean };\ntype PostTaskCallback = () => unknown;\n\ndeclare global {\n interface Navigator {\n scheduling: {\n isInputPending: (options?: isInputPendingOptions) => boolean;\n };\n }\n\n interface Window {\n scheduler: Scheduler;\n }\n}\n\nconst LONG_RUNNING_TASK_DURATION = 50; // ms\n\nconst polyfillScheduler = () => {\n if (isServer) {\n return Promise.reject();\n }\n\n if (typeof window.scheduler !== 'undefined') {\n return Promise.resolve();\n }\n\n return import('scheduler-polyfill');\n};\n\nconst schedulerPolyfill = polyfillScheduler();\n\nexport const isInputPending = (): boolean =>\n Boolean(navigator.scheduling?.isInputPending({ includeContinuous: true }));\n\n/**\n * Pauses a synchronous task to allow other main thread tasks on the event loop to run (good for INP)\n * Note that nested setTimeout can cause an up to a 15ms delay in loops\n * (https://chromestatus.com/feature/5710690097561600), so use sparingly and with `isInputPending`:\n * if (isInputPending()) {\n * await yieldToMain();\n * }\n * Docs: https://web.dev/articles/optimize-long-tasks#use_asyncawait_to_create_yield_points\n */\nexport const yieldToMain = (): Promise =>\n new Promise((resolve) => {\n setTimeout(resolve, 0);\n });\n\n/**\n * Loop through an array (or other iterable object) of as a background task\n *\n * For each iteration this will pause if there is a user interaction event that needs\n * to be handled on the main thread or if it has exceeded the limit of a long running task (>=50ms);\n */\nexport const forEachYield = async (\n array: Array,\n callback: (\n element: ArrayType,\n index: number,\n array: Array\n ) => void\n): Promise => {\n let deadline = performance.now() + LONG_RUNNING_TASK_DURATION;\n let index = 0;\n\n for (const element of array) {\n if (isInputPending() || performance.now() >= deadline) {\n // There's a pending user input. Yield here:\n await yieldToMain();\n deadline = performance.now() + LONG_RUNNING_TASK_DURATION;\n }\n callback(element, index, array);\n index += 1;\n }\n};\n\nconst postTask = async (\n taskCallback: PostTaskCallback,\n priority: TaskPriority\n) => {\n try {\n await schedulerPolyfill;\n } catch (error) {\n if (isServer) {\n logger('scheduler-polyfill does not support a node environment');\n }\n // Fallback to ensure taskCallback() is always called\n await yieldToMain();\n return taskCallback();\n }\n\n return await scheduler.postTask(taskCallback, { priority });\n};\n\nexport const queueUserBlockingTask = (taskCallback: PostTaskCallback) =>\n postTask(taskCallback, 'user-blocking');\n\nexport const queueUserVisibleTask = (taskCallback: PostTaskCallback) =>\n postTask(taskCallback, 'user-visible');\n\nexport const queueBackgroundTask = (taskCallback: PostTaskCallback) =>\n postTask(taskCallback, 'background');\n","import { webApiClient } from 'tradera/utils/http';\n\nconst timeDiffInMs = (start) => {\n return Date.now() - start;\n};\n\nconst queryServerTime = async (retryCount) => {\n const latencyLimit = 2000;\n const maxRetries = 2;\n const requestStart = Date.now();\n const {\n data: { currentTime }\n } = await webApiClient.get('/discover/server-time');\n const latency = timeDiffInMs(requestStart);\n\n if (latency < latencyLimit) {\n return { currentTime: Date.parse(currentTime), latency };\n } else if (retryCount < maxRetries) {\n return queryServerTime(retryCount + 1);\n } else {\n return null;\n }\n};\n\n/**\n * Requests server time and returns\n * { currentTime, latency }\n */\nexport const getServerTime = async () => {\n return await queryServerTime(0);\n};\n","/* eslint-disable better-mutation/no-mutation */\n\nimport { getServerTime } from 'tradera/utils/time-api';\nimport { isServer } from 'tradera/utils/nextjs';\n\nlet _minServerCheckInterval = 1000 * 60 * 5;\nlet _serverDiff = 0;\nlet _didGetServerResponse = false;\nlet _lastCheckAtMs = null;\n\nconst updateServerDiff = async () => {\n _lastCheckAtMs = Date.now();\n const serverTimeObject = await getServerTime();\n if (serverTimeObject) {\n _didGetServerResponse = true;\n // We add the whole latency even though it may give a later\n // time than in reality since a later time gives less time\n // left until auctions expire. This is better than showing\n // too much time left.\n const timeNowOnServer = new Date(\n serverTimeObject.currentTime + serverTimeObject.latency\n );\n _serverDiff = timeNowOnServer.getTime() - Date.now();\n }\n};\n\nconst shouldCheckServer = () =>\n _lastCheckAtMs === null ||\n Date.now() - _lastCheckAtMs >= _minServerCheckInterval;\n\nlet _initialPromise = null;\n\n/**\n * Gets the date on the server and shall be used for calculating auction time left.\n * @returns The date or null if server did not respond at least once.\n */\nexport const syncServerTime = async () => {\n if (isServer) {\n throw new Error('Never call this on server');\n }\n if (shouldCheckServer()) {\n const promise = updateServerDiff();\n if (!_didGetServerResponse) {\n _initialPromise = promise;\n }\n }\n\n if (_initialPromise) {\n try {\n await _initialPromise;\n } catch {\n // Don't throw any errors.\n }\n _initialPromise = null;\n }\n\n return _didGetServerResponse ? new Date(Date.now() + _serverDiff) : null;\n};\n\nexport const resetForTesting = () => {\n _minServerCheckInterval = 0;\n _didGetServerResponse = null;\n};\n"],"names":["LIST_VIEW_TYPES","BASIC","NORMAL","PAGE_LIST_TYPES","BUYER_ACTIVE_ITEMS","BUYER_PURCHASES","BUYER_ITEMS_LOST","SELLER_ACTIVE","SELLER_SOLD","SELLER_NOT_SOLD","PAGE_BULK_ACTIONS","ACTIVE_CANCEL","UNSOLD_RESTART","BUYER_MARK_PAID","BUYER_SHOW_ACTIVE","BUYER_HIDE_ACTIVE","PURCHASES_SHOW","configureDayjs","preferredLanguageCode","dayjs","isBetween","isSameOrAfter","_excluded","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","arg","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_i","iterator","_s","_e","_x","_r","_arr","_n","_d","next","done","err","return","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","n","prototype","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","formatStringOrUrl","urlObjOrString","formatUrl","Link","React","props","forwardedRef","hrefProp","href","asProp","as","childrenProp","children","passHref","replace","shallow","scroll","locale","onClick","onMouseEnterProp","onMouseEnter","onTouchStartProp","onTouchStart","restProps","pagesRouter","RouterContext","appRouter","AppRouterContext","router","isAppRouter","_React$useMemo","resolvedHref","_resolveHref2","resolveHref","resolvedAs","previousHref","previousAs","child","childRef","_useIntersection2","useIntersection","rootMargin","setIntersectionRef","resetVisible","childProps","ref","el","current","e","defaultPrevented","currentTarget","nodeName","toUpperCase","event","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","isModifiedEvent","isLocalURL","preventDefault","navigate","routerScroll","linkClicked","isAbsoluteUrl","type","curLocale","localeDomain","isLocaleDomain","getDomainLocale","locales","domainLocales","addBasePath","addLocale","defaultLocale","_jsx","NEXTWEB_PATHS","PATH_PREFIX","URL_LANGUAGES","join","vipPathRegex","RegExp","causePathRegex","charityPathRegex","campaignPathRegex","shopPathRegex","topListsPathRegex","brandPathRegex","categoryPathRegex","searchPathRegex","startPagePathRegex","profilePageInformationPathRegex","profilePageItemsPathRegex","profilePageFeedbackPathRegex","detailedSearchPathRegex","useNextWebSpaLink","absoluteUrl","location","useLocation","toggles","useAppSelector","selectFeatureSwitches","pathname","selectEnvironment","isNativeAppContext","isStartPageLink","isVipLink","isCategoryLink","isCauseLink","isShopLink","isSearchLink","isCampaignLink","isCharityLink","isTopListsLink","isBrandLink","isProfilePageInformationLink","isProfilePageItemsLink","isProfilePageFeedbackLink","isDetailedSearchPageLink","Boolean","url","searchParams","get","some","nextwebPath","endsWith","PRODUCTION_ORIGIN","_ref","isTouchwebSpaLink","useLink","givenOnClick","otherProps","dispatch","useDispatch","isNativeApp","selectIsNativeApp","isSpaNavigationEnabled","state","environment","isNextWebAddUrlParamEnabled","useIsFeatureEnabled","isTouchWebAddUrlParamEnabled","URL","set","isNextWebSpaLink","handleSpaNavigationClick","useCallback","evt","removePrivacySandboxIframes","updateEnvironmentHash","isRelativeUrl","origin","includes","relativeUrl","getRelativeUrl","isFragmentNavSamePage","hash","startsWith","search","isNextJs","NextLink","to","ItemToast","imageUrl","itemUrl","shortDescription","eventData","toLocalizedUrl","useUrlLocalizer","ALink","className","styles","_jsxs","src","title","alt","ToastMessage","_ref2","t","useTranslator","localizedPriceFormatter","useLocalizedPriceFormatter","message","newLeadingBid","newLeadingBidAmount","price","timeLeftMinutes","MessageToast","header","messageData","headerData","DEFAULT_COOKIES","ITEM_LAYOUT","default","SITE_LAYOUT","MYTRADERA_DEFAULT_COOKIES","LIST_VIEW_TYPE","ITEMS_PER_PAGE","SHOW_FILTERS","LIST_VIEW_TYPE_BUYER_ACTIVE_ITEMS","LIST_VIEW_TYPE_BUYER_PURCHASES","LIST_VIEW_TYPE_BUYER_ITEMS_LOST","LIST_VIEW_TYPE_SELLER_ACTIVE","LIST_VIEW_TYPE_SELLER_SOLD","LIST_VIEW_TYPE_SELLER_NOT_SOLD","APP_DOWNLOAD_MODAL_DISMISSED","GDPR_CONSENT_COOKIE","FORCE_GEO_DEV","NATIVE_APP_ENVIRONMENT","REGION_PICKER_DISMISSED","SHIPPING_COUNTRY","SAVE_SEARCH_MODAL_DISMISSED","CART_ID","VIEWPORT_WIDTH","SHIP_TO_SWEDEN_DISCLAIMER_DISMISSED","EXPERIMENT_BUCKET","PRODUCT_COMMUNICATION_DISMISSED","WISH_LIST_NOTIFICATION_DISPLAY_COUNT","WISH_LIST_NOTIFICATION_HIDDEN","RECENTLY_VIEWED_ITEM_IDS","RECENT_SEARCHES","COOKIE_CATEGORIES","Essential","Performance","Functional","Marketing","COLLECT_SSN_MODAL_DISMISSED","TRADERA_PAY_CONSENT_MODAL_DISMISSED","CATEGORIZED_COOKIES","COOKIE_DEFAULT_CATEGORY","webApiUrl","isServer","process","env","PUBLIC_TOUCHWEB_WINDOW_LOCATION_ORIGIN","window","initData","AVAILABLE_SHIPPING_COUNTRIES","CART_OVERVIEW_VIEW","CART_ADD_ITEM","CART_REMOVE_ITEMS","CART_SET_ITEM_QUANTITY","FAVOURITE_SELLERS","HYPERWALLET_PAYOUT_COMPLETE","HYPERWALLET_PAYOUT_TOKEN","HYPERWALLET_PAYOUT","INTERNATIONAL_SHIPPING_CALCULATOR","ORDER_CHECKOUT_PAYMENT","orderCheckoutPaymentUrl","ORDER_CHECKOUT_REQUEST_COMBINED_PRICE","ORDER_CHECKOUT_CREATE_UNCOMMITTED_PURCHASE_ORDER","ORDER_PURCHASE_SHOP_ITEMS","PERSONALISED_SUGGESTIONS","SEARCH","WEB_API","UPI","purchaseOrderId","MCP","MCP_CONFIRM","PURCHASE_ORDER","MARKETING_PUBLIC_API","SHIPPING_CHECKOUT_DELETE","TRADERA","DAY_IN_SECONDS","HOUR_IN_SECONDS","MINUTE_IN_SECONDS","MINUTE_IN_MILLISECONDS","SECOND_IN_MILLISECONDS","featureName","useSelector","selectIsFeatureEnabled","_request$location","fallback","request","useMemo","useNavigation","isNextDataFetchingDisabled","nextRouter","useRouter","touchwebHistory","useHistory","back","goBack","refresh","Error","missingKeyLoggingConfig","saveMissing","saveMissingTo","missingKeyHandler","language","namespace","_fallbackValue","_updateMissing","options","hasLoadedAllTranslations","isAttributeStuffing","errorMessage","Sentry","missingInterpolationHandler","text","JSON","stringify","bootLanguages","gtm","loadGtmScript","languageCodeIso2","syncServerTime","featureSwitches","bootSiteWideNotifications","socketUrl","webLiveUrl","joinMemberRoom","memberId","module","split","moduleLoader","isSpaModule","loadSpaModule","then","initModule","loadModule","loadedModule","runModule","document","body","setAttribute","catch","handleModuleError","logger","error","scope","sentryException","isSinglePageApp","async","console","isSwedenCountryCodeOrUndefined","countryCodeIso2","toLowerCase","isDenmarkCountryCode","isNetherlandsCountryCode","areCountryCodesIso2Equal","first","second","formatPrice","inputLocale","overrideOptions","style","currency","preferredCurrency","currencyDisplay","useGrouping","minimumFractionDigits","maximumFractionDigits","roundUp","priceAsNumber","parseInt","decimalFactorForRounding","Math","pow","ceil","isLocaleFormattingSupportedInBrowser","formattedPrice","toLocaleString","formatNumberWithSeparators","toLocaleStringSupportsLocales","Intl","NumberFormat","isSwedishOrUndefined","getLanguageFromCountryCode","se","dk","de","fr","nl","getCountryCodeForFlagFromLanguage","languageCode","en","da","getCountryCodeFromLanguage","areLanguageCodesIso2Equal","_useLocalizedPriceFormatter","useLocalizedPriceFormatterRoundingUp","useLocalizedPriceFormatterNoSymbol","_ref$conversion","conversion","allowFractions","useCurrentLanguage","selectPreferredCurrency","rate","code","decimals","socket","getGlobalSocket","isRetry","on","success","_response$data","touchWebClient","data","isLoggedIn","disconnect","connect","refreshLoginState","addEventListener","showItemOutbiddedToast","ItemId","NewLeadingBidAmount","showItemFirstBidToast","showItemSoldToast","Price","showItemWonToast","showItemPaidToast","showItemWishListReminderToast","TimeLeftMinutes","globalSocket","SocketIoChannel","spaPageViewTrackingEnabled","GtmService","isScriptLoaded","_hasPreviouslyTrackedPage","_window$dataLayer","dataLayer","find","item","this","_setWebViewHelperFunctionsToWindow","_process","_newPageFromServer","accountId","w","d","s","l","_f$parentNode","Date","getTime","f","getElementsByTagName","j","createElement","parentNode","insertBefore","googleTagManagerSnippet","NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ACCOUNT_ID","payload","pushArguments","_getDatalayerObject","output","entry","_reset","newPage","pageType","initialDataLayer","_pushInitialDataLayer","newSpaPage","buildInitialGtmDataLayerFromInitData","legacyDataLayer","trackAction","category","action","label","nonInteractive","queueBackgroundTask","trackActionSynchronously","eventCategory","eventAction","eventLabel","eventValue","eventNonInteractive","level","trackGtmEvent","eventName","trackPageView","trackLinkClickAndCallback","callback","eventCallback","trackLinkClickAndGotoUrl","logGaWebViewEvent","params","AnalyticsWebInterface","logEvent","webkit","messageHandlers","firebase","command","parameters","postMessage","setGaWebViewUserProperty","setUserProperty","MissingSocketIoServerUrl","ReferenceError","MissingRoomId","isAllowedToConnect","socketIoServerUrl","autoConnect","io","events","rooms","Set","room","Type","contexts","socketIo","Event","isConnected","emit","has","add","leave","rejoinOnConnect","delete","removeEventListener","off","_this$socket","connected","createQueue","items","isAlive","ttlInMinutes","timeStamp","now","inProgress","_itemData","itemData","shift","notifyDone","isInProgress","getLength","NATIVE_APP_COOKIE_AND_HEADER_CONFIG","osVersion","initDataName","appDevice","appVersion","appContext","appLanguage","appInstanceId","createNativeAppCookieValue","nativeAppInfo","valueObject","fromEntries","entries","extractNativeAppInfoFromCookie","nativeAppCookieString","parse","decodeURIComponent","_ref3","getVersionUrl","getState","queryParameters","URLSearchParams","selectMemberId","selectPreferredLanguageCode","environmentHash","axios","headers","setEnvironmentHash","setIsSpaNavigationEnabled","getAndUpdateNativeAppInfo","nativeAppInfoFromInitData","reduce","_ref7","_ref8","config","extractNativeAppInfoFromInitData","values","nativeAppCookieValue","cookie","createCookie","cookieValue","readCookie","initEnvironment","googleAnalyticsTrackingId","googleAnalyticsMeasurementId","geoPublicApiBaseUrl","splitTestGroups","version","frameElement","setEnvironment","setFeatureSwitches","setSplitTestGroups","setVersion","setVariables","PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID","PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID","PUBLIC_GEO_PUBLIC_API_BASE_URL","PUBLIC_WEB_LIVE_URL","setNativeAppInfo","browserName","isMobileDevice","isMobile","isMobileSafari","isIOS","isAndroid","variables","sessionId","setGATrackingData","parseAppVersion","_String$split$map$fil2","map","number","isNaN","_String$split$map$fil3","major","_String$split$map$fil4","minor","_String$split$map$fil5","patch","isSupportedMinimumVersion","appVersionString","minimumVersionString","minimumVersion","createSlice","initialState","gaTrackingSessionId","isHybridAppContextForAndroid","isHybridAppContextForIos","isNativeAppWithApplyPaySupport","isNativeAppWithSwishCallbackSupport","isNativeAppWithKlarnaSupport","isNativeAppWithTrustlySupport","isHybridAppContext","reducers","_ref4","_ref5","_ref6","_ref9","_ref9$payload","nativeAppSupport","hybridAppDevice","hybridAppVersion","appOsVersion","isIos13","getNativeAppSupport","_slice$actions","actions","reducer","_state$environment","_selectFeatureSwitche","selectWebLiveUrl","_state$environment3","selectCurrencies","multiCurrency","currencies","c","defaultCurrency","selectIsPreferredCurrencySEK","_selectPreferredCurre","selectShowCurrencySelection","enabled","selectShowRegionSelection","selectIsLoggedIn","selectIsOutsideSweden","selectAvailableShippingCountryCodes","shippingRegion","availableShippingCountryCodes","selectAvailableShippingCountries","availableShippingCountries","selectShippingCountry","shippingCountry","selectIsLoadingAvailableShippingCountries","isLoadingAvailableShippingCountries","selectHasLoadedAvailableShippingCountries","hasLoadedAvailableShippingCountries","selectShippingRegionCountryCodeIso2","_state$shippingRegion","selectIsSwedishVisitor","selectIsDanishVisitor","selectIsDutchVisitor","selectShowLocalizationRegionPicker","regionPickerDismissed","shippingCountryCookieValue","_geoLocation$isoCode","_selectPreferredLangu","_selectPreferredLangu2","geoLocation","selectGeolocation","country","isoCode","selectPreferredLanguage","gpsMatchesLanguage","renderedKeys","NS_TOUCHWEB","NS_ATTRIBUTES","addTranslationKey","translation","isNullOrUndefined","getCookieFromBrowser","getCookieFromString","cookieString","setCookieToBrowser","plainDayjs","utc","timezone","localizedFormat","localizedDayjs","swedishTimeZone","swedishTimeZoneDate","date","localizedDayjsFn","tz","formatUtcDateAsSwedishTimeZoneDate","standardFormat","format","includeWeekday","getCurrentSwedishTimeZoneDate","getTimeSpanParts","seconds","optionsWithDefaults","startUnit","endUnit","parts","remaining","started","TIME_SPAN_UNIT_LENGTHS","part","floor","TIME_SPAN_UNITS","DAYS","HOURS","MINUTES","SECONDS","userLanguage","memberEmail","memberHashedEmail","memberEmailSha256","memberEmailMd5","memberFirstName","memberLastName","memberCountry","loginState","isNotInIframe","self","top","blueshiftEventApiKey","blueshiftEventSignature","isQuantcastConsentEnabled","isTikTokPixelEnabled","isDigitalAudienceTrackingEnabled","quantcastSite","ensureClientOnly","httpClient","baseUrl","shouldLocalizeUrl","axiosWrapper","httpClientConfig","axiosCaller","cancelTokenId","axiosConfig","_utilizeCancelToken","utilizeCancelToken","cancel","cancelToken","safeUrl","getSafeUrl","substring","localizedUrl","getLanguage","axiosWithTokenRefresh","checkResponseVersion","response","finalizeResponse","handleError","axiosConfigs","authenticated","post","put","enhancedConfig","trpcClient","endpoint","client","unpackResponse","commandName","query","queryName","defaultClient","webApiClient","ENDPOINTS","marketingApiClient","memberIdentificationClient","translationDynamicApiClient","shippingRecommendationsClient","toLocalizedRiotUrl","querySelector","getElementById","SANDBOX_IFRAME_SRC","isGoogleAdsIframe","node","HTMLIFrameElement","sandboxOrigins","isSandboxOrigin","allow","isPrivacySandbox","querySelectorAll","iframe","remove","schedulerPolyfill","Promise","reject","scheduler","resolve","yieldToMain","setTimeout","forEachYield","array","deadline","performance","index","element","_navigator$scheduling","navigator","scheduling","isInputPending","includeContinuous","postTask","taskCallback","priority","queueUserBlockingTask","queryServerTime","requestStart","currentTime","latency","start","retryCount","_minServerCheckInterval","_serverDiff","_didGetServerResponse","_lastCheckAtMs","updateServerDiff","serverTimeObject","getServerTime","timeNowOnServer","_initialPromise","promise"],"sourceRoot":""}