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U,2BAA2BM,QAAQ,QAChDwI,GAEHkB,MAAAC,cAACC,EAAAA,EAAI,CAAC5J,QAAQ,aAAa0L,GAAG,KAAKhM,UAAU,iBAC1C6I,IAINN,KAIC,C,kCC/LP,MAAMoB,EAAkBA,CAC7BzC,EACA+E,KAEA,GAAsB,oBAAXC,OAAwB,CACjC,MAAMC,EAAajF,EAAIS,SAASyE,aAAe,IACzCC,EAAcnF,EAAIS,SAAS2E,cAAgB,IAE3CC,EAASnI,SAAS6F,cAAc,UACtCsC,EAAOC,MAAQL,EACfI,EAAOE,OAASJ,EAChB,MAAMK,EAAMH,EAAOI,WAAW,MAO9B,OALID,IACFA,EAAIE,UAAY,IAAIX,IACpBS,EAAIG,SAAS,EAAG,EAAGV,EAAYE,IAG1BE,EAAOO,WAChB,CAEA,MAAO,EAAE,C","sources":["webpack://react-app/./node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs","webpack://react-app/./node_modules/.pnpm/react-swipeable@7.0.2_react@19.0.0/node_modules/react-swipeable/es/index.js","webpack://react-app/./node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","webpack://react-app/./components/Shared/src/components/molecules/DetailHeroInfo/DetailHeroInfo.tsx","webpack://react-app/./components/Shared/src/utility/helpers/createColourPng.ts"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","import * as React from 'react';\n\nconst LEFT = \"Left\";\nconst RIGHT = \"Right\";\nconst UP = \"Up\";\nconst DOWN = \"Down\";\n\n/* global document */\nconst defaultProps = {\n delta: 10,\n preventScrollOnSwipe: false,\n rotationAngle: 0,\n trackMouse: false,\n trackTouch: true,\n swipeDuration: Infinity,\n touchEventOptions: { passive: true },\n};\nconst initialState = {\n first: true,\n initial: [0, 0],\n start: 0,\n swiping: false,\n xy: [0, 0],\n};\nconst mouseMove = \"mousemove\";\nconst mouseUp = \"mouseup\";\nconst touchEnd = \"touchend\";\nconst touchMove = \"touchmove\";\nconst touchStart = \"touchstart\";\nfunction getDirection(absX, absY, deltaX, deltaY) {\n if (absX > absY) {\n if (deltaX > 0) {\n return RIGHT;\n }\n return LEFT;\n }\n else if (deltaY > 0) {\n return DOWN;\n }\n return UP;\n}\nfunction rotateXYByAngle(pos, angle) {\n if (angle === 0)\n return pos;\n const angleInRadians = (Math.PI / 180) * angle;\n const x = pos[0] * Math.cos(angleInRadians) + pos[1] * Math.sin(angleInRadians);\n const y = pos[1] * Math.cos(angleInRadians) - pos[0] * Math.sin(angleInRadians);\n return [x, y];\n}\nfunction getHandlers(set, handlerProps) {\n const onStart = (event) => {\n const isTouch = \"touches\" in event;\n // if more than a single touch don't track, for now...\n if (isTouch && event.touches.length > 1)\n return;\n set((state, props) => {\n // setup mouse listeners on document to track swipe since swipe can leave container\n if (props.trackMouse && !isTouch) {\n document.addEventListener(mouseMove, onMove);\n document.addEventListener(mouseUp, onUp);\n }\n const { clientX, clientY } = isTouch ? event.touches[0] : event;\n const xy = rotateXYByAngle([clientX, clientY], props.rotationAngle);\n props.onTouchStartOrOnMouseDown &&\n props.onTouchStartOrOnMouseDown({ event });\n return Object.assign(Object.assign(Object.assign({}, state), initialState), { initial: xy.slice(), xy, start: event.timeStamp || 0 });\n });\n };\n const onMove = (event) => {\n set((state, props) => {\n const isTouch = \"touches\" in event;\n // Discount a swipe if additional touches are present after\n // a swipe has started.\n if (isTouch && event.touches.length > 1) {\n return state;\n }\n // if swipe has exceeded duration stop tracking\n if (event.timeStamp - state.start > props.swipeDuration) {\n return state.swiping ? Object.assign(Object.assign({}, state), { swiping: false }) : state;\n }\n const { clientX, clientY } = isTouch ? event.touches[0] : event;\n const [x, y] = rotateXYByAngle([clientX, clientY], props.rotationAngle);\n const deltaX = x - state.xy[0];\n const deltaY = y - state.xy[1];\n const absX = Math.abs(deltaX);\n const absY = Math.abs(deltaY);\n const time = (event.timeStamp || 0) - state.start;\n const velocity = Math.sqrt(absX * absX + absY * absY) / (time || 1);\n const vxvy = [deltaX / (time || 1), deltaY / (time || 1)];\n const dir = getDirection(absX, absY, deltaX, deltaY);\n // if swipe is under delta and we have not started to track a swipe: skip update\n const delta = typeof props.delta === \"number\"\n ? props.delta\n : props.delta[dir.toLowerCase()] ||\n defaultProps.delta;\n if (absX < delta && absY < delta && !state.swiping)\n return state;\n const eventData = {\n absX,\n absY,\n deltaX,\n deltaY,\n dir,\n event,\n first: state.first,\n initial: state.initial,\n velocity,\n vxvy,\n };\n // call onSwipeStart if present and is first swipe event\n eventData.first && props.onSwipeStart && props.onSwipeStart(eventData);\n // call onSwiping if present\n props.onSwiping && props.onSwiping(eventData);\n // track if a swipe is cancelable (handler for swiping or swiped(dir) exists)\n // so we can call preventDefault if needed\n let cancelablePageSwipe = false;\n if (props.onSwiping ||\n props.onSwiped ||\n props[`onSwiped${dir}`]) {\n cancelablePageSwipe = true;\n }\n if (cancelablePageSwipe &&\n props.preventScrollOnSwipe &&\n props.trackTouch &&\n event.cancelable) {\n event.preventDefault();\n }\n return Object.assign(Object.assign({}, state), { \n // first is now always false\n first: false, eventData, swiping: true });\n });\n };\n const onEnd = (event) => {\n set((state, props) => {\n let eventData;\n if (state.swiping && state.eventData) {\n // if swipe is less than duration fire swiped callbacks\n if (event.timeStamp - state.start < props.swipeDuration) {\n eventData = Object.assign(Object.assign({}, state.eventData), { event });\n props.onSwiped && props.onSwiped(eventData);\n const onSwipedDir = props[`onSwiped${eventData.dir}`];\n onSwipedDir && onSwipedDir(eventData);\n }\n }\n else {\n props.onTap && props.onTap({ event });\n }\n props.onTouchEndOrOnMouseUp && props.onTouchEndOrOnMouseUp({ event });\n return Object.assign(Object.assign(Object.assign({}, state), initialState), { eventData });\n });\n };\n const cleanUpMouse = () => {\n // safe to just call removeEventListener\n document.removeEventListener(mouseMove, onMove);\n document.removeEventListener(mouseUp, onUp);\n };\n const onUp = (e) => {\n cleanUpMouse();\n onEnd(e);\n };\n /**\n * The value of passive on touchMove depends on `preventScrollOnSwipe`:\n * - true => { passive: false }\n * - false => { passive: true } // Default\n *\n * NOTE: When preventScrollOnSwipe is true, we attempt to call preventDefault to prevent scroll.\n *\n * props.touchEventOptions can also be set for all touch event listeners,\n * but for `touchmove` specifically when `preventScrollOnSwipe` it will\n * supersede and force passive to false.\n *\n */\n const attachTouch = (el, props) => {\n let cleanup = () => { };\n if (el && el.addEventListener) {\n const baseOptions = Object.assign(Object.assign({}, defaultProps.touchEventOptions), props.touchEventOptions);\n // attach touch event listeners and handlers\n const tls = [\n [touchStart, onStart, baseOptions],\n // preventScrollOnSwipe option supersedes touchEventOptions.passive\n [\n touchMove,\n onMove,\n Object.assign(Object.assign({}, baseOptions), (props.preventScrollOnSwipe ? { passive: false } : {})),\n ],\n [touchEnd, onEnd, baseOptions],\n ];\n tls.forEach(([e, h, o]) => el.addEventListener(e, h, o));\n // return properly scoped cleanup method for removing listeners, options not required\n cleanup = () => tls.forEach(([e, h]) => el.removeEventListener(e, h));\n }\n return cleanup;\n };\n const onRef = (el) => {\n // \"inline\" ref functions are called twice on render, once with null then again with DOM element\n // ignore null here\n if (el === null)\n return;\n set((state, props) => {\n // if the same DOM el as previous just return state\n if (state.el === el)\n return state;\n const addState = {};\n // if new DOM el clean up old DOM and reset cleanUpTouch\n if (state.el && state.el !== el && state.cleanUpTouch) {\n state.cleanUpTouch();\n addState.cleanUpTouch = void 0;\n }\n // only attach if we want to track touch\n if (props.trackTouch && el) {\n addState.cleanUpTouch = attachTouch(el, props);\n }\n // store event attached DOM el for comparison, clean up, and re-attachment\n return Object.assign(Object.assign(Object.assign({}, state), { el }), addState);\n });\n };\n // set ref callback to attach touch event listeners\n const output = {\n ref: onRef,\n };\n // if track mouse attach mouse down listener\n if (handlerProps.trackMouse) {\n output.onMouseDown = onStart;\n }\n return [output, attachTouch];\n}\nfunction updateTransientState(state, props, previousProps, attachTouch) {\n // if trackTouch is off or there is no el, then remove handlers if necessary and exit\n if (!props.trackTouch || !state.el) {\n if (state.cleanUpTouch) {\n state.cleanUpTouch();\n }\n return Object.assign(Object.assign({}, state), { cleanUpTouch: undefined });\n }\n // trackTouch is on, so if there are no handlers attached, attach them and exit\n if (!state.cleanUpTouch) {\n return Object.assign(Object.assign({}, state), { cleanUpTouch: attachTouch(state.el, props) });\n }\n // trackTouch is on and handlers are already attached, so if preventScrollOnSwipe changes value,\n // remove and reattach handlers (this is required to update the passive option when attaching\n // the handlers)\n if (props.preventScrollOnSwipe !== previousProps.preventScrollOnSwipe ||\n props.touchEventOptions.passive !== previousProps.touchEventOptions.passive) {\n state.cleanUpTouch();\n return Object.assign(Object.assign({}, state), { cleanUpTouch: attachTouch(state.el, props) });\n }\n return state;\n}\nfunction useSwipeable(options) {\n const { trackMouse } = options;\n const transientState = React.useRef(Object.assign({}, initialState));\n const transientProps = React.useRef(Object.assign({}, defaultProps));\n // track previous rendered props\n const previousProps = React.useRef(Object.assign({}, transientProps.current));\n previousProps.current = Object.assign({}, transientProps.current);\n // update current render props & defaults\n transientProps.current = Object.assign(Object.assign({}, defaultProps), options);\n // Force defaults for config properties\n let defaultKey;\n for (defaultKey in defaultProps) {\n if (transientProps.current[defaultKey] === void 0) {\n transientProps.current[defaultKey] = defaultProps[defaultKey];\n }\n }\n const [handlers, attachTouch] = React.useMemo(() => getHandlers((stateSetter) => (transientState.current = stateSetter(transientState.current, transientProps.current)), { trackMouse }), [trackMouse]);\n transientState.current = updateTransientState(transientState.current, transientProps.current, previousProps.current, attachTouch);\n return handlers;\n}\n\nexport { DOWN, LEFT, RIGHT, UP, useSwipeable };\n//# sourceMappingURL=index.js.map\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t) => {\n const colourRef = useRef(null);\n const [imageDataUrl, setImageDataUrl] = useState();\n const isMobile = useMediaQuery(1024);\n\n useMemo(() => {\n if (site === SiteEnum.B2B || !colourHexCode) return;\n\n (async () => {\n try {\n const dataUrl = await createColourPng(colourRef, colourHexCode);\n setImageDataUrl(dataUrl);\n } catch (error) {\n console.error(error);\n }\n })();\n }, [colourHexCode]);\n\n // Determine the layout classes based on the number of images\n const getImageClasses = (index: number, length: number) => {\n if (length === 2) {\n return 'tw-w-[calc(50%-2px)]'; // Each image 50% width\n } else if (length >= 3) {\n return index === 0 || index === 1 ? 'tw-w-[calc(50%-2px)]' : 'tw-w-full'; // First two images 50%, others take 100%\n } else {\n return 'tw-w-full'; // Default to 50% width for more than 3 images\n }\n };\n\n return (\n
\n
\n
\n {variant === 'loyalty' && (\n
\n \n {trumpetText}\n \n \n {title}\n \n
\n )}\n
\n\n {wishList && (\n
\n {wishList}\n
\n )}\n {isMobile && (\n \n )}\n
\n\n
\n
\n
\n {variant === 'product' ? (\n \n ) : (\n \n {imageDataUrl && !mainImage?.url && (\n \n )}\n
\n )}\n
\n {!!images?.length && (\n
\n {images.map((image, index) => (\n \n \n
\n ))}\n
\n )}\n \n
\n
\n {wishList && (\n
\n {wishList}\n
\n )}\n {!isMobile && (\n
\n \n {trumpetText}\n \n \n {title}\n \n
\n )}\n {children}\n
\n
\n \n
\n );\n};\n\nexport default DetailHeroInfo;\n","import { RefObject } from 'react';\n\nexport const createColourPng = (\n ref: RefObject,\n colour: string\n): string => {\n if (typeof window !== 'undefined') {\n const imageWidth = ref.current?.offsetWidth || 100;\n const imageHeight = ref.current?.offsetHeight || 100;\n\n const canvas = document.createElement('canvas');\n canvas.width = imageWidth;\n canvas.height = imageHeight;\n const ctx = canvas.getContext('2d');\n\n if (ctx) {\n ctx.fillStyle = `#${colour}`;\n ctx.fillRect(0, 0, imageWidth, imageHeight);\n }\n\n return canvas.toDataURL();\n }\n\n return '';\n};\n"],"names":["falsyToString","value","cx","cva","base","config","props","_config_compoundVariants","variants","class","className","defaultVariants","getVariantClassNames","Object","keys","map","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","entries","reduce","acc","param","key","undefined","getCompoundVariantClassNames","compoundVariants","cvClass","cvClassName","compoundVariantOptions","every","Array","isArray","includes","LEFT","RIGHT","UP","DOWN","defaultProps","delta","preventScrollOnSwipe","rotationAngle","trackMouse","trackTouch","swipeDuration","Infinity","touchEventOptions","passive","initialState","first","initial","start","swiping","xy","mouseMove","mouseUp","touchEnd","touchMove","touchStart","rotateXYByAngle","pos","angle","angleInRadians","Math","PI","cos","sin","getHandlers","set","handlerProps","onStart","event","isTouch","touches","length","state","document","addEventListener","onMove","onUp","clientX","clientY","onTouchStartOrOnMouseDown","assign","slice","timeStamp","x","y","deltaX","deltaY","absX","abs","absY","time","velocity","sqrt","vxvy","dir","getDirection","toLowerCase","eventData","onSwipeStart","onSwiping","cancelablePageSwipe","onSwiped","cancelable","preventDefault","onEnd","onSwipedDir","onTap","onTouchEndOrOnMouseUp","e","removeEventListener","attachTouch","el","cleanup","baseOptions","tls","forEach","h","o","output","ref","addState","cleanUpTouch","onMouseDown","useSwipeable","options","transientState","transientProps","previousProps","current","defaultKey","handlers","stateSetter","updateTransientState","r","t","f","n","clsx","arguments","_ref","children","colourHexCode","images","mainImage","site","tags","title","trumpetText","wishList","colourRef","useRef","imageDataUrl","setImageDataUrl","useState","isMobile","useMediaQuery","useMemo","SiteEnum","B2B","dataUrl","createColourPng","error","console","getImageClasses","index","React","createElement","Text","ProductImageGallery","colourSpecialImage","url","imageAspectRatio","initialIndex","isCard","mobileFirstImage","lazyLoadProductImage","productImageClasses","showCarouselDots","showColourImage","showProductImage","swipeable","ProductCardImage","productImage","isProductCard","lazyLoad","style","backgroundImage","backgroundColor","src","alt","image","meta","contentLink","Image","aspectRatio","sizes","imageClasses","as","colour","window","imageWidth","offsetWidth","imageHeight","offsetHeight","canvas","width","height","ctx","getContext","fillStyle","fillRect","toDataURL"],"sourceRoot":""}