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B,UACpB,MAEM2iB,EAAeld,KAAK0D,MAEdyZ,SACFxW,EAAAA,GAAapZ,IAAI,0BADvBsQ,KAAQsf,YAENC,GAXYC,EAWWH,EAVtBld,KAAK0D,MAAQ2Z,GADFA,MAalB,OAAID,EARiB,IASV,CAAED,YAAand,KAAKsI,MAAM6U,GAAcC,WACxCE,EATQ,EAURL,EAAgBK,EAAa,GAE7B,IACX,E,WChBJ,IAAIC,EAA0B,IAC1BC,EAAc,EACdC,GAAwB,EACxBC,EAAiB,KAErB,MAAMC,EAAmBpjB,UACrBmjB,EAAiB1d,KAAK0D,MACtB,MAAMka,ODgBmBrjB,gBACZ0iB,EAAgB,GCjBEY,GAC/B,GAAID,EAAkB,CAClBH,GAAwB,EAKxB,MAAMK,EAAkB,IAAI9d,KACxB4d,EAAiBT,YAAcS,EAAiBR,SAEpDI,EAAcM,EAAgB7d,UAAYD,KAAK0D,KACnD,GAOJ,IAAIqa,EAAkB,KAMf,MAAMrlB,EAAiB6B,UAC1B,GAAI9H,EAAAA,GACA,MAAM,IAAI+D,MAAM,6BAEpB,GAbmB,OAAnBknB,GACA1d,KAAK0D,MAAQga,GAAkBH,EAYN,CACrB,MAAMS,EAAUL,IACXF,IACDM,EAAkBC,EAE1B,CAEA,GAAID,EAAiB,CACjB,UACUA,CACV,CAAE,MACE,CAEJA,EAAkB,IACtB,CAEA,OAAON,EAAwB,IAAIzd,KAAKA,KAAK0D,MAAQ8Z,GAAe,IAAI,C","sources":["webpack://touchweb/./src/apps/my-tradera/app/constants/list-types.ts","webpack://touchweb/./src/apps/nextweb/components/next-link.tsx","webpack://touchweb/./src/apps/tradera/configure-dayjs.js","webpack://touchweb/./src/components/alink/alink.tsx","webpack://touchweb/./src/components/alink/use-next-web-spa-link.ts","webpack://touchweb/./src/components/alink/use-touchweb-in-next-web-spa-link.ts","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.ts","webpack://touchweb/./src/constants/endpoints.ts","webpack://touchweb/./src/constants/hosts.ts","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.ts","webpack://touchweb/./src/lang/shared-config.ts","webpack://touchweb/./src/lang/helpers.ts","webpack://touchweb/./src/lang/translations-context.tsx","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/services/boot-site-wide-notifications.js","webpack://touchweb/./src/services/global-socket.js","webpack://touchweb/./src/services/google-tagmanager/google-tagmanager-service.ts","webpack://touchweb/./src/services/google-tagmanager/google-tagmanager-snippet.js","webpack://touchweb/./src/services/socket-io-channel.js","webpack://touchweb/./src/services/toast-queue.js","webpack://touchweb/./src/services/toasts.tsx","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/hooks.ts","webpack://touchweb/./src/state/multi-currency/selectors.ts","webpack://touchweb/./src/state/shipping-region/selectors.ts","webpack://touchweb/./src/utils/api.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/gdpr-settings.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","'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 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","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, isTouchwebInNextweb } from 'tradera/utils/nextjs';\nimport { useAppSelector } from 'tradera/state/hooks';\nimport { useNextWebSpaLink } from './use-next-web-spa-link';\nimport { useTouchwebInNextWebSpaLink } from './use-touchweb-in-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 isTouchwebInNextweb) &&\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 isTouchwebInNextWebSpaLink = useTouchwebInNextWebSpaLink(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 // We have 3 types of routing in the app:\n // 1. NextJS routing using NextLink\n const fromNextWeb = isNextJs && !isTouchwebInNextweb;\n const toNextWeb = isNextWebSpaLink && !isTouchwebInNextWebSpaLink;\n\n // 2. react-router-dom routing\n const fromTouchweb = !isNextJs && !isTouchwebInNextweb;\n const toTouchweb =\n !isNextWebSpaLink &&\n !isTouchwebInNextWebSpaLink &&\n isTouchwebSpaLink;\n\n // 3. react-router-dom routing mounted in a SSR NextJS routed page\n const fromNextWebTouchwebHybrid = isTouchwebInNextweb;\n const toNextWebTouchwebHybrid = isTouchwebInNextWebSpaLink;\n\n if (fromNextWeb && toNextWeb) {\n // NextJS routing\n return (\n \n {children}\n \n );\n } else if (\n (fromTouchweb && toTouchweb) ||\n (fromNextWebTouchwebHybrid && toTouchweb) ||\n (fromNextWebTouchwebHybrid && toNextWebTouchwebHybrid)\n ) {\n // react-router-dom routing\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 // Anything that ends up here will result in a full page load instead of SPA navigation.\n // Remaining 4 out of 9 combinations of navigations that end up in this else block:\n // if (\n // (fromNextWeb && toTouchweb) ||\n // (fromNextWeb && toNextWebTouchwebHybrid) ||\n // (fromTouchweb && toNextWeb) ||\n // (fromTouchweb && toNextWebTouchwebHybrid) ||\n // (fromNextWebTouchwebHybrid && toNextWeb)\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","import { useLocation } from 'tradera/hooks/use-location';\nimport { URL_LANGUAGES } from 'tradera/lang/constants.mjs';\nimport { selectEnvironment } from 'tradera/state/environment/selectors';\nimport { useAppSelector } from 'tradera/state/hooks';\n\n// Add any new NextWeb routes to this array to enable SPA navigation.\n// This is the art of the path after the language prefix until the end.\nexport const NEXTWEB_SPA_REGEX_PATHS = [\n '/item/[0-9]+/([0-9]+)/',\n '/cause/',\n '/charity/',\n '/campaign/',\n '/shop/',\n '/top-lists/',\n '/brand/',\n '/category/([0-9]+)',\n '/profile/information/',\n '/profile/items/',\n '/profile/feedback/',\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 '/search/detailed$'\n];\n\nconst PATH_PREFIX = `(/(${URL_LANGUAGES.join('|')}))?`;\n\nconst createPathRegex = (pathRegex: string) =>\n new RegExp(`^${PATH_PREFIX}${pathRegex}`);\n\nconst NEXTWEB_REGEX_FULL_PATHS = NEXTWEB_SPA_REGEX_PATHS.map(createPathRegex);\n\nexport const isNextWebLink = (absoluteUrl: URL, location: URL) => {\n const pathname = absoluteUrl?.pathname;\n const pathnameAndSearch = `${absoluteUrl.pathname}${absoluteUrl.search}`;\n\n if (absoluteUrl.searchParams.get('next') === '1') {\n return true;\n }\n\n if (createPathRegex('/?$').test(pathname)) {\n // Prevent SPA navigation to the start page as redux state is reset\n return pathname !== location.pathname;\n }\n\n if (createPathRegex('/search\\\\?q=.*').test(pathnameAndSearch)) {\n return true;\n }\n\n if (NEXTWEB_REGEX_FULL_PATHS.some((regex) => regex.test(pathname))) {\n return true;\n }\n\n return false;\n};\n\nexport const useNextWebSpaLink = (absoluteUrl: URL) => {\n const location = useLocation();\n const { isNativeAppContext } = useAppSelector(selectEnvironment);\n\n if (isNativeAppContext) return false;\n\n return isNextWebLink(absoluteUrl, location);\n};\n","import { 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\nconst PATH_PREFIX = `(/(${URL_LANGUAGES.join('|')}))?`;\n\nconst shippingRegex = new RegExp(`${PATH_PREFIX}/frakt`);\nconst isShippingLink = (pathname: string) => shippingRegex.test(pathname);\n\nconst valuationRegex = new RegExp(`${PATH_PREFIX}/valuation`);\nconst isValuationLink = (pathname: string) => valuationRegex.test(pathname);\n\nconst messagingRegex = new RegExp(`${PATH_PREFIX}/messaging`);\nconst isMessagingLink = (pathname: string) => messagingRegex.test(pathname);\n\nexport const useTouchwebInNextWebSpaLink = (absoluteUrl: URL) => {\n const resolver = useTouchwebInNextWebSpaLinkResolver();\n return resolver(absoluteUrl);\n};\n\nexport const useTouchwebInNextWebSpaLinkResolver = () => {\n const toggles = useAppSelector(selectFeatureSwitches) || {};\n const { isNativeAppContext } = useAppSelector(selectEnvironment);\n\n return (absoluteUrl: URL) => {\n const pathname = absoluteUrl?.pathname;\n if (isNativeAppContext) return false;\n\n if (isMessagingLink(pathname)) {\n return Boolean(toggles?.['next-web-messaging']);\n }\n\n if (isShippingLink(pathname)) {\n return Boolean(toggles?.['next-web-shipping']);\n }\n\n if (isValuationLink(pathname)) {\n return Boolean(toggles?.['next-web-valuation']);\n }\n };\n};\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: '15',\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 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';\nexport const SAVED_SEARCHES = 'saved-searches';\nexport const ENTERED_FASHION_PAGE = 'entered-fashion-page';\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';\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 [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 [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 [SAVED_SEARCHES]: COOKIE_CATEGORIES.Functional,\n [ENTERED_FASHION_PAGE]: COOKIE_CATEGORIES.Functional\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 DEFAULT_COOKIES.SITE_LAYOUT.key,\n DEFAULT_COOKIES.ITEM_LAYOUT.key,\n SAVED_SEARCHES\n];\n","import initData from 'tradera/legacy/static/packages/init-data';\nimport { isNextJs, isServer, isTouchwebInNextweb } 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 =\n isNextJs && !isTouchwebInNextweb\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, isServer, isTouchwebInNextweb } from 'tradera/utils/nextjs';\nimport { removePrivacySandboxIframes } from 'tradera/utils/privacy-sandbox-iframes';\nimport { useSelector } from 'react-redux';\nimport { selectIsNativeApp } from 'tradera/state/environment/selectors';\nimport { useTouchwebInNextWebSpaLinkResolver } from 'tradera/components/alink/use-touchweb-in-next-web-spa-link';\n\nconst PRODUCTION_URL_BASE = 'https://www.tradera.com';\n\nexport type PushConfig = {\n breakIframe?: boolean;\n};\n\nexport type PushLocation = {\n pathname?: string | number;\n search?: string;\n};\n\nconst hasPathname = (obj: unknown): obj is { pathname: string | number } =>\n obj !== null &&\n typeof obj === 'object' &&\n 'pathname' in obj &&\n typeof obj.pathname !== 'undefined';\n\nconst hasSearch = (obj: unknown): obj is { search: string } =>\n obj !== null &&\n typeof obj === 'object' &&\n 'search' in obj &&\n typeof obj.search !== 'undefined';\n\nexport const toUrlString = (location: PushLocation | string) => {\n if (typeof location === 'string') {\n return location;\n } else if (hasPathname(location) && hasSearch(location)) {\n return `${location.pathname}${location.search}`;\n } else if (hasPathname(location)) {\n return `${location.pathname}`;\n } else if (hasSearch(location)) {\n return `${location.search}`;\n }\n return '';\n};\n\nexport const useNavigation = (isNextDataFetchingDisabled?: boolean) => {\n const nextRouter = useRouter();\n const touchwebHistory = useHistory();\n const isNativeApp = useSelector(selectIsNativeApp);\n const resolveIsTouchwebInNextWebSpaLink =\n useTouchwebInNextWebSpaLinkResolver();\n\n return useMemo(\n () => ({\n push: (\n location: PushLocation | string,\n pushConfig?: PushConfig\n ) => {\n removePrivacySandboxIframes();\n\n const url = toUrlString(location);\n\n if (\n pushConfig?.breakIframe &&\n window.self !== window.top &&\n window.top !== null\n ) {\n window.top.location.href = url.toString();\n return;\n } else if (isNativeApp) {\n window.location.href = url.toString();\n return;\n } else if (\n isTouchwebInNextweb &&\n !resolveIsTouchwebInNextWebSpaLink(\n new URL(url, PRODUCTION_URL_BASE)\n )\n ) {\n window.location.href = url.toString();\n return;\n } else if (isNextJs && !isTouchwebInNextweb) {\n return nextRouter?.push(url, undefined, {\n shallow: isNextDataFetchingDisabled\n });\n }\n return touchwebHistory.push(url);\n },\n replace: (location: PushLocation | string) => {\n const url = toUrlString(location);\n if (isNextJs && !isTouchwebInNextweb) {\n return nextRouter?.replace(url, undefined, {\n shallow: isNextDataFetchingDisabled\n });\n }\n return touchwebHistory.replace(url);\n },\n back: () => {\n if (isNativeApp) {\n window.history.back();\n return;\n } else if (isNextJs && !isTouchwebInNextweb) {\n return nextRouter?.back();\n }\n return touchwebHistory.goBack();\n },\n refresh: () => {\n if (isNextJs && !isTouchwebInNextweb) {\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 hasPagesInHistory: () => !isServer && window.history.length > 1\n }),\n [\n isNativeApp,\n resolveIsTouchwebInNextWebSpaLink,\n touchwebHistory,\n nextRouter,\n isNextDataFetchingDisabled\n ]\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 type { MutableRefObject } from 'react';\nimport { createContext, createRef, useCallback, useContext } from 'react';\nimport { NS_ATTRIBUTES, NS_TOUCHWEB } from 'tradera/lang/constants.mjs';\nimport { isServer } from 'tradera/utils/nextjs';\n\ntype TranslationKeyValue = Record;\ntype NamespaceTranslations = Record | null;\n\nconst initialState: NamespaceTranslations = {\n [NS_ATTRIBUTES]: {},\n [NS_TOUCHWEB]: {}\n};\n\nexport const TranslationContext = createContext<\n MutableRefObject\n>({ current: initialState });\n\nexport const TranslationProvider = ({\n children\n}: {\n children: React.ReactNode;\n}) => {\n const translationsRef: MutableRefObject =\n createRef();\n translationsRef.current = initialState;\n\n return (\n \n {children}\n \n );\n};\n\nexport const useTranslations = () => {\n const translationsRef = useContext(TranslationContext);\n\n return translationsRef;\n};\n\nexport type AddTranslation = (\n namespace: string,\n pluralizedKey: string,\n translation: string\n) => void;\n\nexport const useAddTranslation = (): AddTranslation => {\n const translationsRef = useContext(TranslationContext);\n\n return useCallback(\n (namespace, pluralizedKey, translation) => {\n if (!isServer) {\n return;\n }\n\n if (!translationsRef?.current) {\n return;\n }\n\n if (!translationsRef.current[namespace]) {\n translationsRef.current[namespace] = {};\n }\n translationsRef.current[namespace][pluralizedKey] = translation;\n },\n [translationsRef]\n );\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/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 { isServer } from 'tradera/utils/nextjs';\nimport 'tradera/styles/global.scss';\n\nconst bootInit = () => {\n bootLanguages();\n gtm.loadGtmScript();\n\n if (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};\n\nif (!isServer) {\n bootInit();\n}\n","import * as Sentry from '@sentry/react';\nimport type { CaptureContext } from '@sentry/types';\nimport { AxiosError } from 'axios';\nimport { isClientNetworkError } from 'tradera/utils/api';\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 if (error instanceof AxiosError && isClientNetworkError(error)) {\n // Ignore client network API errors like aborts, timeouts etc.\n return;\n }\n\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 '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: 'decimal' | 'currency' | 'percent' | 'unit';\n currencyDisplay: 'code' | 'symbol' | 'narrowSymbol' | 'name';\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 {\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/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, isTouchwebInNextweb } from 'tradera/utils/nextjs';\nimport { buildInitialGtmDataLayerFromInitData } from 'tradera/utils/google-tagmanager';\nimport { queueBackgroundTask } from 'tradera/utils/scheduler';\nimport { googleTagManagerSnippet } from 'tradera/services/google-tagmanager/google-tagmanager-snippet';\nimport type { SOURCE_SCREEN } from 'tradera/services/google-tagmanager/constants';\nimport type { ItemCardSearchResultOrigin } from 'tradera/state/services/types/webapi-discover-generated';\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 || isTouchwebInNextweb) {\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 if (url === null) return;\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 * Track event to GA4 via GTM.\n *\n * `timestamp` will always be attached.\n *\n * @example\n * GtmService.trackGA4('saved_search_deleted', {\n * saved_search_id: id\n * })\n */\n trackGA4(\n eventName: string,\n eventParams: EventParams = {},\n userData: UserData = {}\n ) {\n const payload = {\n event: 'track_ga4_event',\n eventName,\n eventParams: { timestamp: Date.now(), ...eventParams },\n userData\n };\n this.push(payload);\n }\n}\n\nexport const GtmService = new GoogleTagManagerService();\n\nexport enum FlowId {\n Unknown = 0,\n SYI = 1,\n VIP = 2\n}\n\nexport type GA4Item = {\n item_id: number;\n};\n\n// All new eventParams must be added to GTM\n// Mapped in \"GA4 - Track events\" and separate variable definitions\nexport type EventParams = {\n flow_id?: FlowId;\n boolean_value?: 1 | 0;\n item_id?: number;\n timestamp?: number;\n source_section?: string;\n items?: GA4Item[];\n source_screen?: SOURCE_SCREEN;\n\n // Wishlist specific params\n wishlist_type?: string;\n\n // Purchase offer specific params\n item_status?: 'active' | 'ended';\n\n // SYI specific params\n draft_id?: string;\n form_name?: 'syi_draft';\n syi_session_id?: string;\n attribute_name?: string;\n ai_title?: 1 | 0;\n ai_description?: 1 | 0;\n ai_images?: number;\n ai_processing_time?: number;\n\n // Item card specific params\n item_placement?: number;\n pagination?: number;\n\n // pagination specific params\n direction?: string;\n\n // search specific params\n search_type?: string;\n search_term?: string;\n search_category?: number;\n sort_type?: string;\n saved_search_type?: string;\n saved_search_id?: number;\n search_model?: ItemCardSearchResultOrigin;\n exact_search?: number;\n\n // scroll specific params\n scroll_percentage?: number;\n scroll_percentage_max?: number;\n};\n\ntype UserData = {\n member_id?: number;\n};\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 { createElement } from 'react';\nimport { toast } from 'react-toastify';\n\nimport { ItemToast } from 'tradera/components/toasts/item-toast';\nimport { MessageToast } from 'tradera/components/toasts/message-toast';\nimport { isServer } from 'tradera/utils/nextjs';\nimport { webApiClient } from '../utils/http';\nimport { createQueue } from './toast-queue';\nimport type { ItemBasicInfoApiResponse } from 'tradera/state/services/types/webapi-browse-generated';\n\nconst queuedToasts = createQueue();\n\nconst openNextToast = async () => {\n if (isServer) {\n return;\n }\n if (queuedToasts.isInProgress()) {\n return;\n }\n const nextItem = queuedToasts.next();\n if (nextItem) {\n try {\n const queueLength = queuedToasts.getLength();\n const toastOptions = {\n autoClose: Math.max(2, 5 - queueLength) * 1000,\n onClose: () => {\n queuedToasts.notifyDone();\n openNextToast();\n }\n };\n if (nextItem.eventData.itemId) {\n const response =\n await webApiClient.get(\n `/browse/item-basic-info/${nextItem.eventData.itemId}`\n );\n const { imageUrl, itemUrl, shortDescription } =\n response.data.item || {};\n toast(\n // TODO: convert to JSX when we have a proper story for this\n createElement(ItemToast, {\n imageUrl,\n itemUrl,\n shortDescription,\n type: nextItem.type,\n eventData: nextItem.eventData\n }),\n toastOptions\n );\n } else if (nextItem.eventData.message) {\n const { message, header, messageData, headerData } =\n nextItem.eventData;\n toast(\n ,\n { ...toastOptions, type: nextItem.eventData.type }\n );\n }\n } catch (e) {\n queuedToasts.notifyDone();\n openNextToast();\n throw e;\n }\n }\n};\n\nconst handleNotification = async (\n type: string,\n eventData:\n | {\n message: string;\n header?: string | null;\n messageData: unknown;\n headerData: unknown;\n type: (typeof toast.TYPE)[keyof typeof toast.TYPE] | string;\n }\n | {\n itemId: number;\n newLeadingBidAmount?: number;\n price?: number;\n timeLeftMinutes?: number;\n },\n ttlInMinutes = 10\n) => {\n if (document.visibilityState !== 'visible') {\n // We don't want to show messages if page is not visible. If we do they will queue up!\n return;\n }\n queuedToasts.add({ type, eventData }, ttlInMinutes);\n openNextToast();\n};\n\nexport const showItemOutbiddedToast = (\n itemId: number,\n newLeadingBidAmount: number\n) =>\n handleNotification('ItemOutbidded', {\n itemId,\n newLeadingBidAmount\n });\n\nexport const showItemFirstBidToast = (itemId: number) =>\n handleNotification('ItemFirstBid', { itemId });\n\nexport const showItemSoldToast = (itemId: number, price: number) =>\n handleNotification('ItemSold', { itemId, price });\n\nexport const showItemWonToast = (itemId: number, price: number) =>\n handleNotification('ItemWon', { itemId, price });\n\nexport const showItemPaidToast = (itemId: number) =>\n handleNotification('ItemPaid', { itemId });\n\nexport const showItemWishListReminderToast = (\n itemId: number,\n timeLeftMinutes: number\n) =>\n handleNotification(\n 'ItemWishListReminder',\n { itemId, timeLeftMinutes },\n timeLeftMinutes > 10 ? 10 : 2\n );\n\n/**\n *\n * @param message The message translation key\n * @param header The header translation key\n * @param messageData Any data that's needed for the message translation key\n * @param headerData Any data that's needed for the header translation key\n */\nexport const showSuccessToast = (\n message: string,\n header?: string,\n messageData: unknown = null,\n headerData: unknown = null\n) => {\n handleNotification('Message', {\n message,\n header,\n messageData,\n headerData,\n type: toast.TYPE.SUCCESS\n });\n};\n\nexport const showErrorToast = (\n message: string,\n header?: string | null,\n messageData: unknown = null,\n headerData: unknown = null\n) => {\n handleNotification('Message', {\n header,\n message,\n messageData,\n headerData,\n type: toast.TYPE.ERROR\n });\n};\n\nexport const showInfoToast = (\n message: string,\n header?: string,\n messageData = null,\n headerData = null\n) => {\n handleNotification('Message', {\n message,\n header,\n messageData,\n headerData,\n type: toast.TYPE.INFO\n });\n};\n\n// export const ToastTestButton = () => (\n// {\n// e.preventDefault();\n// showItemWishListReminderToast(85391643, 3);\n// showItemOutbiddedToast(85391639, 99);\n// showItemFirstBidToast(85391639);\n// showItemSoldToast(85391639, 1234);\n// showItemWonToast(85391639, 1234);\n// showItemPaidToast(85391639);\n// }}>\n// Test\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/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 if (PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID) {\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 };\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 isNativeAppWithInternationalVerificationSupport: 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 isNativeAppWithInternationalVerificationSupport: 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.isNativeAppWithInternationalVerificationSupport =\n nativeAppSupport.isNativeAppWithInternationalVerificationSupport;\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 isNativeAppWithInternationalVerificationSupport:\n isNativeAppContext &&\n ((isIOS && isSupportedMinimumVersion(hybridAppVersion, '3.156')) ||\n (isAndroid &&\n isSupportedMinimumVersion(hybridAppVersion, '3.999'))) // TODO: Update version when implemented\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 { useSelector, useDispatch } from 'react-redux';\nimport type { TypedUseSelectorHook } from 'react-redux';\nimport type { RootState, AppDispatch } from './configure-store';\n\n// Use throughout our app instead of plain `useSelector` since this gets us typed state\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\n// Use throughout our app instead of plain `useDispatch` since it includes the thunk middleware types etc\nexport const useAppDispatch: () => AppDispatch = useDispatch;\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","import axios, {\n type AxiosError,\n type AxiosInstance,\n type AxiosResponse,\n type CancelTokenSource\n} from 'axios';\n\nimport { logger } from 'packages/logger';\nimport { isServer } from 'tradera/utils/nextjs';\nimport { getLanguage } from 'tradera/utils/language';\nimport { toLocalizedUrl } from 'tradera/utils/url';\n\n/**\n * Standardized api error codes\n */\nexport const API_ERRORS = {\n IGNORE_ME: 'IGNORE_ME',\n ABORTED: 'ABORTED',\n CANCELLED: 'CANCELLED',\n NETWORK: 'NETWORK',\n TIMEOUT: 'TIMEOUT',\n VERSION_MISMATCH: 'VERSION_MISMATCH',\n LOGGED_OUT: 'LOGGED_OUT'\n};\n\nexport const defaultJsonRequestHeaders = {\n // Force json response\n Accept: 'application/json',\n // For WebAPI and RequiresAuthorization to handle ajax request\n 'X-Requested-With': 'XMLHttpRequest'\n};\n\n/**\n * Standard Axios configs\n */\nexport const axiosConfigs = {\n // Requests to endpoints with authentication\n authenticated: {\n // Send auth cookies\n withCredentials: true,\n headers: defaultJsonRequestHeaders\n },\n notAuthenticated: {\n // Dont send auth cookies\n withCredentials: false,\n headers: defaultJsonRequestHeaders\n }\n};\n\nconst isMissingAuthToken = (responseString: string) => {\n try {\n const responseObject = JSON.parse(responseString);\n const isMissing =\n responseObject.responseStatus.errorCode === 'MissingAuthToken';\n return isMissing;\n } catch {\n return false;\n }\n};\n\nconst isUnauthorized = (statusCode: number) => statusCode === 401;\n\nexport const addAntiCacheParam = (url?: string) => {\n const antiCacheRegExp = /([?&]_=)[^&]*/;\n return antiCacheRegExp.test(url || '')\n ? url?.replace(antiCacheRegExp, '$1' + new Date().getTime())\n : url +\n (/\\?/.test(url || '') ? '&' : '?') +\n '_=' +\n new Date().getTime();\n};\n\nconst submitOriginalRequest = async (error: AxiosError) =>\n axios({\n ...error.config,\n url: addAntiCacheParam(error.config.url)\n });\n\nconst handleMissingAuthToken = async (error: AxiosError) => {\n const refreshAccessToken = async () =>\n axios.get(toLocalizedUrl('/login/state', getLanguage()));\n const handleErrorAfterRefresh = async (\n errorAfterRefreshToken: AxiosError\n ) => {\n if (isUnauthorized(errorAfterRefreshToken.request?.status)) {\n // eslint-disable-next-line better-mutation/no-mutation\n error.message = API_ERRORS.LOGGED_OUT;\n }\n return Promise.reject(error);\n };\n return refreshAccessToken()\n .then(() => submitOriginalRequest(error))\n .catch(handleErrorAfterRefresh);\n};\n\nconst handleUnauthorized = async (error: AxiosError) => {\n const checkLoginState = async () =>\n axios.get(toLocalizedUrl('/login/state', getLanguage()));\n return checkLoginState().then((response) => {\n const isLoggedIn = response.data?.isLoggedIn;\n if (isLoggedIn) {\n return submitOriginalRequest(error);\n }\n // eslint-disable-next-line better-mutation/no-mutation\n error.message = API_ERRORS.LOGGED_OUT;\n // eslint-disable-next-line promise/no-return-wrap\n return Promise.reject(error);\n });\n};\n\nexport const errorResponseInterceptor = (error: AxiosError) => {\n if (isMissingAuthToken(error.request?.response)) {\n return handleMissingAuthToken(error);\n } else if (isUnauthorized(error.request?.status)) {\n return handleUnauthorized(error);\n }\n return Promise.reject(error);\n};\n\n/**\n * Create Axios instance or decorate existing instance with interceptor for expired token responses\n *\n */\nexport const axiosWithTokenRefresh = (axiosInstance?: AxiosInstance) => {\n let instance;\n if (axiosInstance === undefined) {\n instance = axios.create();\n } else {\n instance = axiosInstance;\n }\n instance.interceptors.response.use(\n (response) => response,\n errorResponseInterceptor\n );\n return instance;\n};\n\nconst cancelTokens: Record = {};\n\n/**\n * Create new or return existing cancellation function\n *\n * Usage:\n * const { cancel, cancelToken } = utilizeCancelToken('tokenId')\n * if (cancel) cancel();\n * axios.get('http://api.com/...', { cancelToken });\n *\n * @param {string} tokenId - A string ID shared between requests that cancel together\n */\nexport const utilizeCancelToken = (tokenId: string) => {\n if (isServer) {\n throw new Error(\n 'This implementation is not compatible with SSR as global properties like cancelTokens here are shared between server instances'\n );\n }\n let cancel;\n if (tokenId in cancelTokens) {\n cancel = cancelTokens[tokenId].cancel;\n }\n // eslint-disable-next-line better-mutation/no-mutation\n cancelTokens[tokenId] = axios.CancelToken.source();\n return {\n cancel,\n cancelToken: cancelTokens[tokenId].token\n };\n};\n\n/**\n * Check response version and throw error if different from current\n *\n */\nexport const checkResponseVersion = (version = '12.0.0') => {\n return (response: AxiosResponse) => {\n if (\n response.headers &&\n response.headers['X-Tradera-Version'] &&\n response.headers['X-Tradera-Version'] !== version\n ) {\n throw new Error(API_ERRORS.VERSION_MISMATCH);\n } else {\n return response;\n }\n };\n};\n\n/**\n * Checks redirect response for logged out user\n * This is an old solution. New solutions return a 401 response instead (see handleError).\n * Requires Axios config to include { withCredentials: true }\n *\n */\nexport const checkResponseLoggedOut = () => {\n return (response: AxiosResponse) => {\n if (\n response.data &&\n typeof response.data === 'string' &&\n response.data.includes('Logga in')\n ) {\n throw new Error(API_ERRORS.LOGGED_OUT);\n } else {\n return response;\n }\n };\n};\n\n/**\n * Final standardized formatting of an api response\n *\n */\nexport const finalizeResponse = () => {\n return (response: AxiosResponse) => {\n const { data, status } = response;\n return {\n data,\n status\n };\n };\n};\n\ntype StatusHandlers = Record;\n\n/**\n * Common network request error handling\n */\nexport const handleError = (statusHandlers: StatusHandlers = {}) => {\n return (error: AxiosError) => {\n const status = error.response && error.response.status;\n const message = error.message ? error.message : error.toString();\n /* eslint-disable better-mutation/no-mutation */\n if (axios.isCancel(error)) {\n error.message = API_ERRORS.CANCELLED;\n } else if (message.includes('timeout') || status === 408) {\n error.message = API_ERRORS.TIMEOUT;\n } else if (message.includes('Network')) {\n error.message = API_ERRORS.NETWORK;\n } else if (message.includes('Request aborted')) {\n error.message = API_ERRORS.ABORTED;\n } else if (status === 401) {\n error.message = API_ERRORS.LOGGED_OUT;\n } else if (status && status in statusHandlers) {\n error.message = statusHandlers[status];\n }\n throw error;\n };\n};\n\nexport const reloadOnUnauthorized = (error: AxiosError) => {\n switch (error.message) {\n case API_ERRORS.LOGGED_OUT:\n window.location.reload();\n break;\n default:\n throw error;\n }\n};\n\nexport const isClientNetworkError = (error: AxiosError) => {\n switch (error.message) {\n case API_ERRORS.IGNORE_ME:\n case API_ERRORS.CANCELLED:\n case API_ERRORS.ABORTED:\n case API_ERRORS.NETWORK:\n case API_ERRORS.TIMEOUT:\n return true;\n default:\n return false;\n }\n};\n\nexport const logError = (error: AxiosError, scope?: object) => {\n if (!isClientNetworkError(error)) {\n logger(error, scope);\n }\n};\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 isNotNullOrUndefined(\n value: TValue | null | undefined\n): value is TValue {\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 relativeTime from 'dayjs/plugin/relativeTime';\nimport localeData from 'dayjs/plugin/localeData';\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);\nplainDayjs.extend(relativeTime);\nplainDayjs.extend(localeData);\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 formatArray = [\n options.includeWeekday && 'ddd', // tor\n 'D MMM', // 19 okt\n options.includeYear && 'YYYY', // 2023\n !options.excludeTime && 'HH:mm' // 09:50\n ];\n const format = formatArray.filter(Boolean).join(' ');\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\n/**\n *\n * @param string locale\n */\nexport const getMonths = (locale) => {\n dayjs.locale(locale);\n return dayjs.months();\n};\n","/***\n *\n * Keep track of users' GDPR settings.\n *\n */\nimport dayjs from 'dayjs';\nimport cookie from 'cookie';\n\nimport {\n GDPR_CONSENT_COOKIE,\n COOKIE_CATEGORIES\n} from 'tradera/constants/cookies';\nimport { getCookieFromBrowser, setCookieToBrowser } from './cookie-helpers';\n\nconst createCookie = (name, value, expires) => {\n const options = {\n expires,\n httpOnly: false,\n path: '/'\n };\n return cookie.serialize(name, String(value), options);\n};\n\nexport class GdprSettings {\n constructor(getCookie, setCookie) {\n if (!getCookie || !setCookie) {\n throw new Error('You must provide getCookie and setCookie');\n }\n this.getCookie = getCookie;\n this.setCookie = setCookie;\n }\n /**\n *\n * @param {int} cookieCategory use the constant COOKIE_CATEGORIES to get different values.\n */\n isCategoryEnabled(cookieCategory) {\n if (cookieCategory === COOKIE_CATEGORIES.Essential) {\n return true;\n }\n\n const encodedConsentCookie = this.getCookie(GDPR_CONSENT_COOKIE);\n const consentCookie = decodeURI(encodedConsentCookie);\n\n if (!consentCookie || consentCookie.length === 0) {\n return true;\n }\n\n const categoryPattern = new RegExp(`,${cookieCategory}:1`);\n return categoryPattern.test(consentCookie);\n }\n\n isPerformanceEnabled() {\n return this.isCategoryEnabled(COOKIE_CATEGORIES.Performance);\n }\n\n isFunctionalEnabled() {\n return this.isCategoryEnabled(COOKIE_CATEGORIES.Functional);\n }\n\n isMarketingEnabled() {\n return this.isCategoryEnabled(COOKIE_CATEGORIES.Marketing);\n }\n\n set(performance, functional, marketing) {\n const cookieValue = [\n `${COOKIE_CATEGORIES.Essential}:1`,\n `${COOKIE_CATEGORIES.Performance}:${performance ? '1' : '0'}`,\n `${COOKIE_CATEGORIES.Functional}:${functional ? '1' : '0'}`,\n `${COOKIE_CATEGORIES.Marketing}:${marketing ? '1' : '0'}`\n ];\n const cookieString = createCookie(\n GDPR_CONSENT_COOKIE,\n cookieValue.join(','),\n dayjs().add(1, 'years').toDate()\n );\n this.setCookie(cookieString);\n }\n}\n\nexport default new GdprSettings(getCookieFromBrowser, setCookieToBrowser);\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 return response.data;\n }\n return {\n command: (\n commandName: string,\n payload: TRequest,\n httpClientConfig?: HttpClientConfig\n ): Promise =>\n client\n .post<\n TResponse,\n TRequest\n >(`/commands/${commandName}`, payload, httpClientConfig)\n .then(unpackResponse),\n query: (\n queryName: string,\n httpClientConfig?: HttpClientConfig\n ) =>\n client\n .get(`/queries/${queryName}`, httpClientConfig)\n .then(unpackResponse)\n };\n};\n\nexport const defaultClient = httpClient('');\nexport const touchWebClient = httpClient('/', true);\nexport const nextwebClient = httpClient('/api');\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 isTouchwebInNextweb =\n typeof document !== 'undefined' &&\n document.getElementById('__next') !== null &&\n document.getElementById('init-data') !== null;\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","_excluded","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","i","Symbol","toPrimitive","call","TypeError","String","Number","_toPrimitive","configurable","writable","_slicedToArray","arr","Array","isArray","_arrayWithHoles","l","iterator","n","u","a","f","next","done","return","_iterableToArrayLimit","minLen","_arrayLikeToArray","prototype","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","_nonIterableRest","len","arr2","_objectWithoutProperties","source","excluded","target","hasOwnProperty","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","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","configureDayjs","preferredLanguageCode","dayjs","isBetween","isSameOrAfter","PRODUCTION_ORIGIN","_ref","isTouchwebSpaLink","useLink","givenOnClick","otherProps","dispatch","useDispatch","location","useLocation","isNativeApp","useAppSelector","selectIsNativeApp","isSpaNavigationEnabled","state","environment","isTouchwebInNextweb","isNextWebAddUrlParamEnabled","useIsFeatureEnabled","isTouchWebAddUrlParamEnabled","absoluteUrl","URL","searchParams","set","isNextWebSpaLink","useNextWebSpaLink","isTouchwebInNextWebSpaLink","useTouchwebInNextWebSpaLink","handleSpaNavigationClick","useCallback","evt","removePrivacySandboxIframes","updateEnvironmentHash","isRelativeUrl","origin","includes","relativeUrl","getRelativeUrl","url","isFragmentNavSamePage","hash","pathname","startsWith","search","fromNextWeb","isNextJs","toNextWeb","fromTouchweb","toTouchweb","fromNextWebTouchwebHybrid","toNextWebTouchwebHybrid","NextLink","to","PATH_PREFIX","URL_LANGUAGES","join","createPathRegex","pathRegex","RegExp","NEXTWEB_REGEX_FULL_PATHS","map","selectEnvironment","isNativeAppContext","isNextWebLink","pathnameAndSearch","get","some","regex","shippingRegex","valuationRegex","messagingRegex","useTouchwebInNextWebSpaLinkResolver","resolver","toggles","selectFeatureSwitches","isMessagingLink","Boolean","isShippingLink","isValuationLink","ItemToast","imageUrl","itemUrl","shortDescription","eventData","toLocalizedUrl","useUrlLocalizer","ALink","className","styles","_jsxs","src","title","alt","ToastMessage","_ref2","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","CART_ID","VIEWPORT_WIDTH","EXPERIMENT_BUCKET","PRODUCT_COMMUNICATION_DISMISSED","WISH_LIST_NOTIFICATION_DISPLAY_COUNT","WISH_LIST_NOTIFICATION_HIDDEN","RECENTLY_VIEWED_ITEM_IDS","RECENT_SEARCHES","SAVED_SEARCHES","ENTERED_FASHION_PAGE","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","undefined","request","useMemo","hasPathname","hasSearch","toUrlString","useNavigation","isNextDataFetchingDisabled","nextRouter","useRouter","touchwebHistory","useHistory","resolveIsTouchwebInNextWebSpaLink","pushConfig","breakIframe","self","top","back","goBack","history","refresh","Error","hasPagesInHistory","missingKeyLoggingConfig","saveMissing","saveMissingTo","missingKeyHandler","language","namespace","_fallbackValue","_updateMissing","options","hasLoadedAllTranslations","isAttributeStuffing","errorMessage","Sentry","missingInterpolationHandler","text","JSON","stringify","initialState","NS_ATTRIBUTES","NS_TOUCHWEB","TranslationContext","createContext","useAddTranslation","translationsRef","useContext","pluralizedKey","translation","bootInit","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","AxiosError","isClientNetworkError","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","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","_hasPreviouslyTrackedPage","_window$dataLayer","dataLayer","find","item","this","isScriptLoaded","_setWebViewHelperFunctionsToWindow","_process","_newPageFromServer","accountId","w","d","s","_f$parentNode","Date","getTime","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","trackGA4","eventParams","userData","timestamp","now","FlowId","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","inProgress","_itemData","itemData","shift","notifyDone","isInProgress","getLength","queuedToasts","openNextToast","nextItem","queueLength","toastOptions","autoClose","max","onClose","itemId","webApiClient","toast","_nextItem$eventData","handleNotification","visibilityState","showSuccessToast","TYPE","SUCCESS","showErrorToast","ERROR","showInfoToast","INFO","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","number","isNaN","_String$split$map$fil3","major","_String$split$map$fil4","minor","_String$split$map$fil5","patch","isSupportedMinimumVersion","appVersionString","minimumVersionString","minimumVersion","createSlice","gaTrackingSessionId","isHybridAppContextForAndroid","isHybridAppContextForIos","isNativeAppWithApplyPaySupport","isNativeAppWithSwishCallbackSupport","isNativeAppWithKlarnaSupport","isNativeAppWithTrustlySupport","isNativeAppWithInternationalVerificationSupport","isHybridAppContext","reducers","_ref4","_ref5","_ref6","_ref9","_ref9$payload","nativeAppSupport","hybridAppDevice","hybridAppVersion","appOsVersion","isIos13","getNativeAppSupport","_slice$actions","actions","reducer","_state$environment","_selectFeatureSwitche","_state$environment3","useAppDispatch","selectCurrencies","multiCurrency","currencies","selectPreferredCurrency","c","code","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","API_ERRORS","IGNORE_ME","ABORTED","CANCELLED","NETWORK","TIMEOUT","VERSION_MISMATCH","LOGGED_OUT","defaultJsonRequestHeaders","Accept","axiosConfigs","authenticated","withCredentials","notAuthenticated","isUnauthorized","statusCode","addAntiCacheParam","antiCacheRegExp","submitOriginalRequest","errorResponseInterceptor","_error$request","_error$request2","responseString","responseStatus","errorCode","isMissingAuthToken","response","getLanguage","refreshAccessToken","_errorAfterRefreshTok","errorAfterRefreshToken","status","Promise","reject","handleMissingAuthToken","checkLoginState","handleUnauthorized","axiosWithTokenRefresh","axiosInstance","instance","interceptors","use","cancelTokens","utilizeCancelToken","tokenId","cancel","cancelToken","token","checkResponseVersion","checkResponseLoggedOut","finalizeResponse","handleError","statusHandlers","reloadOnUnauthorized","reload","logError","isNullOrUndefined","getCookieFromBrowser","getCookieFromString","cookieString","setCookieToBrowser","plainDayjs","utc","timezone","localizedFormat","relativeTime","localeData","localizedDayjs","swedishTimeZone","swedishTimeZoneDate","date","localizedDayjsFn","tz","formatUtcDateAsSwedishTimeZoneDate","format","includeWeekday","includeYear","excludeTime","getCurrentSwedishTimeZoneDate","getTimeSpanParts","seconds","optionsWithDefaults","startUnit","endUnit","parts","remaining","started","TIME_SPAN_UNIT_LENGTHS","part","floor","TIME_SPAN_UNITS","DAYS","HOURS","MINUTES","SECONDS","GdprSettings","getCookie","setCookie","isCategoryEnabled","cookieCategory","encodedConsentCookie","consentCookie","decodeURI","isPerformanceEnabled","isFunctionalEnabled","isMarketingEnabled","performance","functional","marketing","expires","httpOnly","path","toDate","userLanguage","memberEmail","memberHashedEmail","memberEmailSha256","memberEmailMd5","memberFirstName","memberLastName","memberCountry","loginState","isNotInIframe","blueshiftEventApiKey","blueshiftEventSignature","isQuantcastConsentEnabled","isTikTokPixelEnabled","isDigitalAudienceTrackingEnabled","quantcastSite","ensureClientOnly","httpClient","baseUrl","shouldLocalizeUrl","axiosWrapper","httpClientConfig","axiosCaller","cancelTokenId","axiosConfig","_utilizeCancelToken","safeUrl","getSafeUrl","endsWith","substring","localizedUrl","post","put","enhancedConfig","trpcClient","endpoint","client","unpackResponse","commandName","query","queryName","defaultClient","ENDPOINTS","marketingApiClient","memberIdentificationClient","translationDynamicApiClient","shippingRecommendationsClient","toLocalizedRiotUrl","querySelector","getElementById","SANDBOX_IFRAME_SRC","isGoogleAdsIframe","node","HTMLIFrameElement","sandboxOrigins","isSandboxOrigin","allow","isPrivacySandbox","querySelectorAll","iframe","remove","schedulerPolyfill","scheduler","resolve","yieldToMain","setTimeout","forEachYield","array","deadline","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":""}