@shopito/design-system-fe 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/Carousel/Carousel.d.ts +10 -0
- package/dist/common/Carousel/Carousel.d.ts.map +1 -0
- package/dist/common/Carousel/index.d.ts +2 -0
- package/dist/common/Carousel/index.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3196 -597
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -2
- package/package.json +3 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/components/common/Container/Container.tsx","../src/components/common/Main/Main.tsx","../node_modules/classnames/index.js","../src/components/common/Button/Button.tsx","../src/components/common/LoadingSpin/LoadingSpin.tsx","../src/components/common/IconButton/IconButton.tsx","../src/components/common/Input/Input.tsx","../src/components/common/Select/Select.tsx","../src/components/common/Typography/Heading.tsx","../src/components/common/Typography/Text.tsx","../src/components/common/Badge/Badge.tsx","../src/components/common/Card/Card.tsx","../src/components/common/Spinner/Spinner.tsx","../src/components/common/Alert/Alert.tsx","../src/components/common/Modal/Modal.tsx","../src/components/common/Checkbox/Checkbox.tsx","../src/components/common/Toggle/Toggle.tsx","../src/components/common/Avatar/Avatar.tsx","../src/components/common/Stack/Stack.tsx","../src/components/common/Grid/Grid.tsx","../src/components/common/QuantityInput/QuantityInput.tsx","../src/components/common/Pagination/Pagination.tsx","../src/components/Header/Header.tsx","../src/components/CategoryTree/CategoryTree.tsx","../src/components/MegaMenu/MegaMenu.tsx","../src/components/BannerCarousel/BannerCarousel.tsx","../src/components/ProductCard/ProductCard.tsx","../src/components/ProductGrid/ProductGrid.tsx","../src/components/CallToAction/CallToAction.tsx","../src/components/Footer/Footer.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nexport interface ContainerProps {\n children: ReactNode;\n}\n\nexport const Container = ({ children }: ContainerProps) => {\n return <div className=\"container\">{children}</div>;\n};\n","import { type ReactNode } from 'react';\nimport { Container } from '../Container';\n\nexport interface MainProps {\n children: ReactNode;\n}\n\nexport const Main = ({ children }: MainProps) => {\n return (\n <main className=\"main\">\n <Container>{children}</Container>\n </main>\n );\n};\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { forwardRef } from 'react';\nimport type { ButtonHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\ntype Variant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';\ntype Size = 'xs' | 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: Variant;\n size?: Size;\n loading?: boolean;\n fullWidth?: boolean;\n}\n\n// const variantClasses: Record<Variant, string> = {\n// primary:\n// 'bg-primary-600 text-white hover:bg-primary-700 active:bg-primary-800 focus-visible:ring-primary-500',\n// secondary:\n// 'bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 focus-visible:ring-gray-400',\n// outline:\n// 'border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 active:bg-gray-100 focus-visible:ring-gray-400',\n// ghost:\n// 'bg-transparent text-gray-700 hover:bg-gray-100 active:bg-gray-200 focus-visible:ring-gray-400',\n// danger:\n// 'bg-danger-600 text-white hover:bg-danger-700 active:bg-danger-800 focus-visible:ring-danger-500',\n// };\n\n// const sizeClasses: Record<Size, string> = {\n// xs: 'h-7 px-2.5 text-xs gap-1',\n// sm: 'h-8 px-3 text-sm gap-1.5',\n// md: 'h-10 px-4 text-sm gap-2',\n// lg: 'h-11 px-5 text-base gap-2',\n// };\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'primary',\n size = 'md',\n loading = false,\n fullWidth = false,\n disabled,\n children,\n className = '',\n ...props\n },\n ref,\n ) => {\n const isDisabled = disabled || loading;\n\n return (\n <button\n ref={ref}\n disabled={isDisabled}\n className={clx(\n 'btn',\n variant && `btn-${variant}`,\n size && `btn-${size}`,\n fullWidth && 'w-full',\n className,\n )}\n {...props}\n >\n {loading && (\n <svg\n className=\"animate-spin h-4 w-4 shrink-0\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n )}\n {children}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n","import clx from 'classnames';\n\ntype Size = 'xs' | 'sm' | 'md' | 'lg';\n\nexport interface LoadingSpinProps {\n size: Size;\n}\n\nexport const LoadingSpin = ({ size = 'md' }: LoadingSpinProps) => {\n return (\n <svg\n className={clx('loading-spin', `loading-spin-${size}`)}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n );\n};\n","import { forwardRef } from 'react';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\nimport { LoadingSpin } from '../LoadingSpin';\n\ntype Variant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';\ntype Size = 'xs' | 'sm' | 'md' | 'lg';\n\nexport interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n icon: ReactNode;\n label: string;\n variant?: Variant;\n size?: Size;\n loading?: boolean;\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n icon,\n label,\n variant = 'ghost',\n size = 'md',\n loading = false,\n disabled,\n className = '',\n ...props\n },\n ref,\n ) => {\n const isDisabled = disabled || loading;\n\n return (\n <button\n ref={ref}\n disabled={isDisabled}\n aria-label={label}\n title={label}\n className={clx(\n 'icon-button',\n `icon-button-${variant}`,\n `icon-button-${size}`,\n className,\n )}\n {...props}\n >\n {loading ? <LoadingSpin size={size} /> : icon}\n </button>\n );\n },\n);\n\nIconButton.displayName = 'IconButton';\n","import { forwardRef } from 'react';\nimport type { InputHTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n error?: string;\n hint?: string;\n leftIcon?: ReactNode;\n rightIcon?: ReactNode;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n { label, error, hint, leftIcon, rightIcon, className = '', id, ...props },\n ref,\n ) => {\n const inputId = id ?? label?.toLowerCase().replace(/\\s+/g, '-');\n\n return (\n <div className={'w-full'}>\n {label && (\n <label htmlFor={inputId} className=\"input-label\">\n {label}\n </label>\n )}\n <div className=\"relative\">\n {leftIcon && <span className=\"left-icon\">{leftIcon}</span>}\n <input\n ref={ref}\n id={inputId}\n className={clx(\n 'input',\n error && 'has-error',\n !!leftIcon && 'with-left-icon',\n !!rightIcon && 'with-right-icon',\n 'w-full',\n className,\n )}\n {...props}\n />\n {rightIcon && <span className=\"right-icon\">{rightIcon}</span>}\n </div>\n {(error || hint) && (\n <p className={clx('helper-text', error && 'has-error')}>\n {error ?? hint}\n </p>\n )}\n </div>\n );\n },\n);\n\nInput.displayName = 'Input';\n","import { forwardRef } from 'react';\nimport type { SelectHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\nexport interface SelectOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n label?: string;\n error?: string;\n hint?: string;\n options: SelectOption[];\n placeholder?: string;\n}\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n (\n { label, error, hint, options, placeholder, className = '', id, ...props },\n ref,\n ) => {\n const selectId = id ?? label?.toLowerCase().replace(/\\s+/g, '-');\n\n return (\n <div className={clx('select-wrapper', 'w-full')}>\n {label && (\n <label htmlFor={selectId} className=\"select-label\">\n {label}\n </label>\n )}\n <div className=\"relative\">\n <select\n ref={ref}\n id={selectId}\n className={clx('select', 'w-full', error && 'has-error', className)}\n {...props}\n >\n {placeholder && (\n <option value=\"\" disabled>\n {placeholder}\n </option>\n )}\n {options.map((opt) => (\n <option key={opt.value} value={opt.value} disabled={opt.disabled}>\n {opt.label}\n </option>\n ))}\n </select>\n {/* Chevron icon */}\n <span className=\"select-chevron-icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\"\n />\n </svg>\n </span>\n </div>\n {(error || hint) && (\n <p className={clx('select-helper', error && 'has-error')}>\n {error ?? hint}\n </p>\n )}\n </div>\n );\n },\n);\n\nSelect.displayName = 'Select';\n","import type { HTMLAttributes, ReactNode } from 'react';\nimport cx from 'classnames';\nimport type { Color } from './Text';\n\ntype HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\ninterface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n as?: HeadingLevel;\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n color?: Color;\n children: ReactNode;\n}\n\nexport const Heading = ({\n as,\n level = 1,\n color = 'default',\n className = '',\n children,\n ...props\n}: HeadingProps) => {\n const Tag = as ?? (`h${level}` as HeadingLevel);\n\n return (\n <Tag\n className={cx(`text-color-${color}`, `heading-size-${level}`, className)}\n {...props}\n >\n {children}\n </Tag>\n );\n};\n","import type { ElementType, HTMLAttributes, ReactNode } from 'react';\nimport cx from 'classnames';\n\ntype TextVariant = 'body' | 'body-sm' | 'caption' | 'overline' | 'code';\n\nexport type Color =\n | 'default'\n | 'muted'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'inherit';\n\ninterface TextProps extends HTMLAttributes<HTMLElement> {\n variant?: TextVariant;\n color?: Color;\n as?: ElementType;\n children: ReactNode;\n}\n\nexport const Text = ({\n variant = 'body',\n color = 'default',\n as: Tag = 'p',\n className = '',\n children,\n ...props\n}: TextProps) => {\n return (\n <Tag\n className={cx(\n `text-color-${color}`,\n `text-variant-${variant}`,\n className,\n )}\n {...props}\n >\n {children}\n </Tag>\n );\n};\n","import type { HTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\n\ntype BadgeVariant =\n | 'default'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'outline';\n\ntype BadgeSize = 'sm' | 'md';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n variant?: BadgeVariant;\n size?: BadgeSize;\n dot?: boolean;\n children: ReactNode;\n}\n\nexport function Badge({\n variant = 'default',\n size = 'md',\n dot = false,\n className,\n children,\n ...props\n}: BadgeProps) {\n return (\n <span\n className={clx('badge', `badge-${variant}`, `badge-${size}`, className)}\n {...props}\n >\n {dot && <span className={clx('badge-dot', `badge-dot-${variant}`)} />}\n {children}\n </span>\n );\n}\n","import type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n padding?: 'none' | 'sm' | 'md' | 'lg'\n shadow?: boolean\n border?: boolean\n}\n\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nconst paddingClasses = {\n none: '',\n sm: 'p-4',\n md: 'p-6',\n lg: 'p-8',\n}\n\nexport function Card({\n children,\n padding = 'md',\n shadow = true,\n border = true,\n className = '',\n ...props\n}: CardProps) {\n return (\n <div\n className={[\n 'bg-white rounded-xl overflow-hidden',\n border ? 'border border-gray-200' : '',\n shadow ? 'shadow-sm' : '',\n paddingClasses[padding],\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nexport function CardHeader({ children, className = '', ...props }: CardHeaderProps) {\n return (\n <div\n className={['px-6 py-4 border-b border-gray-100', className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nexport function CardBody({ children, className = '', ...props }: CardBodyProps) {\n return (\n <div className={['p-6', className].filter(Boolean).join(' ')} {...props}>\n {children}\n </div>\n )\n}\n\nexport function CardFooter({ children, className = '', ...props }: CardFooterProps) {\n return (\n <div\n className={[\n 'px-6 py-4 border-t border-gray-100 bg-gray-50',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n )\n}\n","import type { HTMLAttributes } from 'react';\nimport clx from 'classnames';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\ntype SpinnerColor = 'primary' | 'white' | 'gray';\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n size?: SpinnerSize;\n color?: SpinnerColor;\n label?: string;\n}\n\nexport function Spinner({\n size = 'md',\n color = 'primary',\n label = 'Loading…',\n className = '',\n ...props\n}: SpinnerProps) {\n return (\n <span\n role=\"status\"\n aria-label={label}\n className={clx('spinner-wrapper', className)}\n {...props}\n >\n <span className={clx('spinner', `spinner-${size}`, `spinner-${color}`)} />\n <span className=\"sr-only\">{label}</span>\n </span>\n );\n}\n","import type { HTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\n\ntype AlertVariant = 'info' | 'success' | 'warning' | 'danger';\n\nexport interface AlertProps extends HTMLAttributes<HTMLDivElement> {\n variant?: AlertVariant;\n title?: string;\n children: ReactNode;\n onClose?: () => void;\n}\n\nconst variantIcon: Record<AlertVariant, ReactNode> = {\n info: (\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z\"\n />\n ),\n success: (\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n ),\n warning: (\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\"\n />\n ),\n danger: (\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z\"\n />\n ),\n};\n\nexport function Alert({\n variant = 'info',\n title,\n children,\n onClose,\n className = '',\n ...props\n}: AlertProps) {\n return (\n <div\n role=\"alert\"\n className={clx('alert', `alert-${variant}`, 'w-full', className)}\n {...props}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className={clx('alert-icon', `alert-icon-${variant}`)}\n >\n {variantIcon[variant]}\n </svg>\n <div className=\"flex-1 min-w-0\">\n {title && <p className=\"alert-title\">{title}</p>}\n <div className=\"alert-text\">{children}</div>\n </div>\n {onClose && (\n <button\n onClick={onClose}\n className=\"alert-close-btn\"\n aria-label=\"Close\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n )}\n </div>\n );\n}\n","import { useEffect, useRef } from 'react'\nimport type { ReactNode } from 'react'\nimport { createPortal } from 'react-dom'\n\ntype ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full'\n\nexport interface ModalProps {\n open: boolean\n onClose: () => void\n title?: string\n children: ReactNode\n footer?: ReactNode\n size?: ModalSize\n closeOnBackdrop?: boolean\n}\n\nconst sizeClasses: Record<ModalSize, string> = {\n sm: 'max-w-sm',\n md: 'max-w-md',\n lg: 'max-w-lg',\n xl: 'max-w-xl',\n full: 'max-w-full mx-4',\n}\n\nexport function Modal({\n open,\n onClose,\n title,\n children,\n footer,\n size = 'md',\n closeOnBackdrop = true,\n}: ModalProps) {\n const backdropRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (!open) return\n const prev = document.body.style.overflow\n document.body.style.overflow = 'hidden'\n return () => {\n document.body.style.overflow = prev\n }\n }, [open])\n\n useEffect(() => {\n if (!open) return\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose()\n }\n document.addEventListener('keydown', onKey)\n return () => document.removeEventListener('keydown', onKey)\n }, [open, onClose])\n\n if (!open) return null\n\n return createPortal(\n <div\n ref={backdropRef}\n className=\"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm\"\n onClick={(e) => {\n if (closeOnBackdrop && e.target === backdropRef.current) onClose()\n }}\n >\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? 'modal-title' : undefined}\n className={[\n 'relative w-full bg-white rounded-xl shadow-xl flex flex-col max-h-[90vh]',\n sizeClasses[size],\n ].join(' ')}\n >\n {title && (\n <div className=\"flex items-center justify-between px-6 py-4 border-b border-gray-100 shrink-0\">\n <h2 id=\"modal-title\" className=\"text-lg font-semibold text-gray-900\">\n {title}\n </h2>\n <button\n onClick={onClose}\n className=\"text-gray-400 hover:text-gray-600 transition-colors\"\n aria-label=\"Close modal\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-5 h-5\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n </div>\n )}\n <div className=\"flex-1 overflow-y-auto px-6 py-4\">{children}</div>\n {footer && (\n <div className=\"px-6 py-4 border-t border-gray-100 shrink-0 bg-gray-50 rounded-b-xl\">\n {footer}\n </div>\n )}\n </div>\n </div>,\n document.body,\n )\n}\n","import { forwardRef } from 'react';\nimport type { InputHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\nexport interface CheckboxProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'type'\n> {\n label?: string;\n description?: string;\n error?: string;\n indeterminate?: boolean;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n { label, description, error, indeterminate, className = '', id, ...props },\n ref,\n ) => {\n const inputId = id ?? label?.toLowerCase().replace(/\\s+/g, '-');\n\n return (\n <div className={clx('checkbox-wrapper', className)}>\n <div className=\"checkbox-wrapper-inner\">\n <input\n ref={(el) => {\n if (el) el.indeterminate = indeterminate ?? false;\n if (typeof ref === 'function') ref(el);\n else if (ref) ref.current = el;\n }}\n id={inputId}\n type=\"checkbox\"\n className={clx('checkbox', error && 'has-error')}\n {...props}\n />\n </div>\n {(label || description) && (\n <div>\n {label && (\n <label htmlFor={inputId} className=\"checkbox-label\">\n {label}\n </label>\n )}\n {description && (\n <p className=\"checkbox-description\">{description}</p>\n )}\n {error && <p className=\"checkbox-error\">{error}</p>}\n </div>\n )}\n </div>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n","import { forwardRef } from 'react';\nimport type { InputHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\ntype ToggleSize = 'sm' | 'md' | 'lg';\n\nexport interface ToggleProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'type' | 'size'\n> {\n label?: string;\n description?: string;\n size?: ToggleSize;\n}\n\nexport const Toggle = forwardRef<HTMLInputElement, ToggleProps>(\n ({ label, description, size = 'md', className = '', id, ...props }, ref) => {\n const inputId = id ?? label?.toLowerCase().replace(/\\s+/g, '-');\n\n return (\n <label\n htmlFor={inputId}\n className={clx(\n 'toggle',\n props.disabled && 'toggle-disabled',\n className,\n )}\n >\n <div className={clx('toggle-wrapper', `toggle-wrapper-${size}`)}>\n <input\n ref={ref}\n id={inputId}\n type=\"checkbox\"\n role=\"switch\"\n className=\"sr-only peer\"\n {...props}\n />\n <div className=\"toggle-track\" />\n <div className={clx('toggle-thumb', `toggle-thumb-${size}`)} />\n </div>\n {(label || description) && (\n <div>\n {label && <span className=\"toggle-label\">{label}</span>}\n {description && (\n <span className=\"toggle-description\">{description}</span>\n )}\n </div>\n )}\n </label>\n );\n },\n);\n\nToggle.displayName = 'Toggle';\n","import type { HTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\n\ntype AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n src?: string;\n alt?: string;\n name?: string;\n size?: AvatarSize;\n}\n\nexport interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {\n max?: number;\n size?: AvatarSize;\n children: ReactNode;\n}\n\nconst bgColors = [\n 'bg-red-500',\n 'bg-orange-500',\n 'bg-amber-500',\n 'bg-emerald-500',\n 'bg-teal-500',\n 'bg-cyan-500',\n 'bg-blue-500',\n 'bg-violet-500',\n 'bg-pink-500',\n];\n\nexport function Avatar({\n src,\n alt,\n name,\n size = 'md',\n className,\n ...props\n}: AvatarProps) {\n const baseClasses = ['avatar', `avatar-${size}`, className];\n\n const nameToColor = (n: string) => {\n let hash = 0;\n for (let i = 0; i < n.length; i++) hash += n.charCodeAt(i);\n return bgColors[hash % bgColors.length];\n };\n\n const getInitials = (name: string) =>\n name\n .split(' ')\n .slice(0, 2)\n .map((n) => n[0])\n .join('')\n .toUpperCase();\n\n if (src) {\n return (\n <span className={clx(baseClasses)} {...props}>\n <img\n src={src}\n alt={alt ?? name ?? ''}\n className=\"w-full h-full object-cover\"\n />\n </span>\n );\n }\n\n if (name) {\n return (\n <span\n className={clx(baseClasses, nameToColor(name))}\n aria-label={name}\n {...props}\n >\n {getInitials(name)}\n </span>\n );\n }\n\n // Fallback icon\n return (\n <span className={clx(baseClasses, 'avatar-fallback')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n className=\"w-3/5 h-3/5\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0 01-.437.695A18.683 18.683 0 0112 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 01-.437-.695z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n );\n}\n","import type { ReactNode } from 'react';\nimport cx from 'classnames';\n\ninterface StackProps {\n direction?: 'row' | 'column';\n gap?: number;\n alignItems?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';\n justifyItems?: 'start' | 'end' | 'center' | 'stretch';\n justifyContent?:\n | 'normal'\n | 'start'\n | 'end'\n | 'center'\n | 'between'\n | 'around'\n | 'evenly'\n | 'stretch';\n className?: string;\n children?: ReactNode;\n}\n\nexport const Stack = ({\n direction = 'row',\n gap,\n alignItems = 'start',\n justifyItems = 'start',\n justifyContent = 'normal',\n className,\n children,\n}: StackProps) => {\n const alignItemsMap: Record<string, string> = {\n start: 'items-start',\n end: 'items-end',\n center: 'items-center',\n baseline: 'items-baseline',\n stretch: 'items-stretch',\n };\n\n const justifyItemsMap: Record<string, string> = {\n start: 'justify-items-start',\n end: 'justify-items-end',\n center: 'justify-items-center',\n stretch: 'justify-items-stretch',\n };\n\n const justifyContentMap: Record<string, string> = {\n normal: 'justify-normal',\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n stretch: 'justify-stretch',\n };\n\n return (\n <div\n className={cx(\n 'stack',\n `stack-${direction}`,\n gap && `gap-${gap}`,\n alignItemsMap[alignItems],\n justifyItemsMap[justifyItems],\n justifyContentMap[justifyContent],\n className,\n )}\n >\n {children}\n </div>\n );\n};\n","import type { ElementType, HTMLAttributes, ReactNode } from 'react';\nimport cx from 'classnames';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type ColSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\nexport type ColOffset = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;\nexport type GridCols = 1 | 2 | 3 | 4 | 6 | 12;\nexport type GapSize = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16;\n\nexport interface GridProps {\n children?: ReactNode;\n cols?: GridCols;\n gap?: GapSize;\n rowGap?: GapSize;\n colGap?: GapSize;\n as?: ElementType;\n className?: string;\n}\n\nexport interface ColProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /** Výchozí šířka (mobile-first) */\n span?: ColSpan;\n sm?: ColSpan;\n md?: ColSpan;\n lg?: ColSpan;\n xl?: ColSpan;\n /** Přeskočit N sloupců od aktuální pozice (mobile-first) */\n offset?: ColOffset;\n smOffset?: ColOffset;\n mdOffset?: ColOffset;\n lgOffset?: ColOffset;\n xlOffset?: ColOffset;\n}\n\n// ─── Class maps — všechny literální stringy, Tailwind je detekuje při scanu ──\n\nconst colsMap: Record<GridCols, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 6: 'grid-cols-6',\n 12: 'grid-cols-12',\n};\n\nconst gapMap: Record<GapSize, string> = {\n 0: 'gap-0',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3',\n 4: 'gap-4',\n 5: 'gap-5',\n 6: 'gap-6',\n 8: 'gap-8',\n 10: 'gap-10',\n 12: 'gap-12',\n 16: 'gap-16',\n};\n\nconst rowGapMap: Record<GapSize, string> = {\n 0: 'gap-y-0',\n 1: 'gap-y-1',\n 2: 'gap-y-2',\n 3: 'gap-y-3',\n 4: 'gap-y-4',\n 5: 'gap-y-5',\n 6: 'gap-y-6',\n 8: 'gap-y-8',\n 10: 'gap-y-10',\n 12: 'gap-y-12',\n 16: 'gap-y-16',\n};\n\nconst colGapMap: Record<GapSize, string> = {\n 0: 'gap-x-0',\n 1: 'gap-x-1',\n 2: 'gap-x-2',\n 3: 'gap-x-3',\n 4: 'gap-x-4',\n 5: 'gap-x-5',\n 6: 'gap-x-6',\n 8: 'gap-x-8',\n 10: 'gap-x-10',\n 12: 'gap-x-12',\n 16: 'gap-x-16',\n};\n\n// Span — bez prefixu (výchozí, mobile-first)\nconst spanMap: Record<ColSpan, string> = {\n 1: 'col-span-1',\n 2: 'col-span-2',\n 3: 'col-span-3',\n 4: 'col-span-4',\n 5: 'col-span-5',\n 6: 'col-span-6',\n 7: 'col-span-7',\n 8: 'col-span-8',\n 9: 'col-span-9',\n 10: 'col-span-10',\n 11: 'col-span-11',\n 12: 'col-span-12',\n};\n\nconst smSpanMap: Record<ColSpan, string> = {\n 1: 'sm:col-span-1',\n 2: 'sm:col-span-2',\n 3: 'sm:col-span-3',\n 4: 'sm:col-span-4',\n 5: 'sm:col-span-5',\n 6: 'sm:col-span-6',\n 7: 'sm:col-span-7',\n 8: 'sm:col-span-8',\n 9: 'sm:col-span-9',\n 10: 'sm:col-span-10',\n 11: 'sm:col-span-11',\n 12: 'sm:col-span-12',\n};\n\nconst mdSpanMap: Record<ColSpan, string> = {\n 1: 'md:col-span-1',\n 2: 'md:col-span-2',\n 3: 'md:col-span-3',\n 4: 'md:col-span-4',\n 5: 'md:col-span-5',\n 6: 'md:col-span-6',\n 7: 'md:col-span-7',\n 8: 'md:col-span-8',\n 9: 'md:col-span-9',\n 10: 'md:col-span-10',\n 11: 'md:col-span-11',\n 12: 'md:col-span-12',\n};\n\nconst lgSpanMap: Record<ColSpan, string> = {\n 1: 'lg:col-span-1',\n 2: 'lg:col-span-2',\n 3: 'lg:col-span-3',\n 4: 'lg:col-span-4',\n 5: 'lg:col-span-5',\n 6: 'lg:col-span-6',\n 7: 'lg:col-span-7',\n 8: 'lg:col-span-8',\n 9: 'lg:col-span-9',\n 10: 'lg:col-span-10',\n 11: 'lg:col-span-11',\n 12: 'lg:col-span-12',\n};\n\nconst xlSpanMap: Record<ColSpan, string> = {\n 1: 'xl:col-span-1',\n 2: 'xl:col-span-2',\n 3: 'xl:col-span-3',\n 4: 'xl:col-span-4',\n 5: 'xl:col-span-5',\n 6: 'xl:col-span-6',\n 7: 'xl:col-span-7',\n 8: 'xl:col-span-8',\n 9: 'xl:col-span-9',\n 10: 'xl:col-span-10',\n 11: 'xl:col-span-11',\n 12: 'xl:col-span-12',\n};\n\n// Offset: přeskočit N sloupců → col-start-(N+1)\nconst offsetMap: Record<ColOffset, string> = {\n 1: 'col-start-2',\n 2: 'col-start-3',\n 3: 'col-start-4',\n 4: 'col-start-5',\n 5: 'col-start-6',\n 6: 'col-start-7',\n 7: 'col-start-8',\n 8: 'col-start-9',\n 9: 'col-start-10',\n 10: 'col-start-11',\n 11: 'col-start-12',\n};\n\nconst smOffsetMap: Record<ColOffset, string> = {\n 1: 'sm:col-start-2',\n 2: 'sm:col-start-3',\n 3: 'sm:col-start-4',\n 4: 'sm:col-start-5',\n 5: 'sm:col-start-6',\n 6: 'sm:col-start-7',\n 7: 'sm:col-start-8',\n 8: 'sm:col-start-9',\n 9: 'sm:col-start-10',\n 10: 'sm:col-start-11',\n 11: 'sm:col-start-12',\n};\n\nconst mdOffsetMap: Record<ColOffset, string> = {\n 1: 'md:col-start-2',\n 2: 'md:col-start-3',\n 3: 'md:col-start-4',\n 4: 'md:col-start-5',\n 5: 'md:col-start-6',\n 6: 'md:col-start-7',\n 7: 'md:col-start-8',\n 8: 'md:col-start-9',\n 9: 'md:col-start-10',\n 10: 'md:col-start-11',\n 11: 'md:col-start-12',\n};\n\nconst lgOffsetMap: Record<ColOffset, string> = {\n 1: 'lg:col-start-2',\n 2: 'lg:col-start-3',\n 3: 'lg:col-start-4',\n 4: 'lg:col-start-5',\n 5: 'lg:col-start-6',\n 6: 'lg:col-start-7',\n 7: 'lg:col-start-8',\n 8: 'lg:col-start-9',\n 9: 'lg:col-start-10',\n 10: 'lg:col-start-11',\n 11: 'lg:col-start-12',\n};\n\nconst xlOffsetMap: Record<ColOffset, string> = {\n 1: 'xl:col-start-2',\n 2: 'xl:col-start-3',\n 3: 'xl:col-start-4',\n 4: 'xl:col-start-5',\n 5: 'xl:col-start-6',\n 6: 'xl:col-start-7',\n 7: 'xl:col-start-8',\n 8: 'xl:col-start-9',\n 9: 'xl:col-start-10',\n 10: 'xl:col-start-11',\n 11: 'xl:col-start-12',\n};\n\n// ─── Components ───────────────────────────────────────────────────────────────\n\nexport const Grid = ({\n children,\n cols = 12,\n gap,\n rowGap,\n colGap,\n as: Tag = 'div',\n className,\n}: GridProps) => (\n <Tag\n className={cx(\n 'grid',\n 'w-full',\n colsMap[cols],\n gap !== undefined && gapMap[gap],\n rowGap !== undefined && rowGapMap[rowGap],\n colGap !== undefined && colGapMap[colGap],\n className,\n )}\n >\n {children}\n </Tag>\n);\n\nGrid.displayName = 'Grid';\n\nexport const Col = ({\n children,\n span,\n sm,\n md,\n lg,\n xl,\n offset,\n smOffset,\n mdOffset,\n lgOffset,\n xlOffset,\n className,\n ...rest\n}: ColProps) => (\n <div\n className={cx(\n span && spanMap[span],\n sm && smSpanMap[sm],\n md && mdSpanMap[md],\n lg && lgSpanMap[lg],\n xl && xlSpanMap[xl],\n offset && offsetMap[offset],\n smOffset && smOffsetMap[smOffset],\n mdOffset && mdOffsetMap[mdOffset],\n lgOffset && lgOffsetMap[lgOffset],\n xlOffset && xlOffsetMap[xlOffset],\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n);\n\nCol.displayName = 'Col';\n","import { useEffect, useId, useRef, useState } from 'react';\nimport clx from 'classnames';\n\nexport interface QuantityInputProps {\n value: number;\n onChange: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n disabled?: boolean;\n label?: string;\n error?: string;\n hint?: string;\n id?: string;\n className?: string;\n}\n\nexport const QuantityInput = ({\n value,\n onChange,\n min = 1,\n max = 999,\n step = 1,\n disabled = false,\n label,\n error,\n hint,\n id,\n className,\n}: QuantityInputProps) => {\n const generatedId = useId();\n const inputId = id ?? generatedId;\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Lokální string stav — umožňuje volné psaní, clamping proběhne při blur\n const [inputValue, setInputValue] = useState(String(value));\n\n // Synchronizace při změně value zvenčí (controlled)\n useEffect(() => {\n if (document.activeElement !== inputRef.current) {\n setInputValue(String(value));\n }\n }, [value]);\n\n const clamp = (n: number) => Math.min(max, Math.max(min, n));\n\n const commitValue = (raw: string) => {\n const parsed = parseInt(raw, 10);\n const next = isNaN(parsed) ? value : clamp(parsed);\n setInputValue(String(next));\n if (next !== value) onChange(next);\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const raw = e.target.value.replace(/[^0-9]/g, '');\n setInputValue(raw);\n // Průběžně volej onChange jen pokud je platné číslo\n const parsed = parseInt(raw, 10);\n if (!isNaN(parsed)) onChange(clamp(parsed));\n };\n\n const handleBlur = () => commitValue(inputValue);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n commitValue(inputValue);\n inputRef.current?.blur();\n return;\n }\n // Blokuj vše kromě číslic a ovládacích kláves\n const allowed = [\n 'Backspace', 'Delete', 'Tab', 'Escape',\n 'ArrowLeft', 'ArrowRight', 'Home', 'End',\n ];\n if (!allowed.includes(e.key) && !/^[0-9]$/.test(e.key) && !e.metaKey && !e.ctrlKey) {\n e.preventDefault();\n }\n };\n\n const decrement = () => onChange(clamp(value - step));\n const increment = () => onChange(clamp(value + step));\n\n const canDecrement = value - step >= min;\n const canIncrement = value + step <= max;\n\n return (\n <div className={clx('quantity-input-wrapper', className)}>\n {label && (\n <label htmlFor={inputId} className=\"input-label\">\n {label}\n </label>\n )}\n\n <div className={clx('quantity-input', error && 'has-error', disabled && 'is-disabled')}>\n <button\n type=\"button\"\n className=\"quantity-btn\"\n onClick={decrement}\n disabled={disabled || !canDecrement}\n aria-label=\"Snížit množství\"\n tabIndex={-1}\n >\n <MinusIcon />\n </button>\n\n <input\n ref={inputRef}\n id={inputId}\n type=\"text\"\n inputMode=\"numeric\"\n className=\"quantity-field\"\n value={inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n aria-label={label ?? 'Množství'}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n />\n\n <button\n type=\"button\"\n className=\"quantity-btn\"\n onClick={increment}\n disabled={disabled || !canIncrement}\n aria-label=\"Zvýšit množství\"\n tabIndex={-1}\n >\n <PlusIcon />\n </button>\n </div>\n\n {(error || hint) && (\n <p className={clx('helper-text', error && 'has-error')}>{error ?? hint}</p>\n )}\n </div>\n );\n};\n\nQuantityInput.displayName = 'QuantityInput';\n\nconst MinusIcon = () => (\n <svg width=\"12\" height=\"2\" viewBox=\"0 0 12 2\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M1 1H11\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n);\n\nconst PlusIcon = () => (\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M6 1V11M1 6H11\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n);\n","'use client';\n\nimport type { ButtonHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\nexport interface PaginationProps {\n page: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n siblingsCount?: number;\n}\n\nconst range = (start: number, end: number) =>\n Array.from({ length: end - start + 1 }, (_, i) => start + i);\n\nconst buildPages = (\n page: number,\n totalPages: number,\n siblings: number,\n): (number | '…')[] => {\n const totalNumbers = siblings * 2 + 5;\n\n if (totalPages <= totalNumbers) return range(1, totalPages);\n\n const leftSibling = Math.max(page - siblings, 1);\n const rightSibling = Math.min(page + siblings, totalPages);\n const showLeftDots = leftSibling > 2;\n const showRightDots = rightSibling < totalPages - 1;\n\n if (!showLeftDots && showRightDots) {\n const leftRange = range(1, 3 + siblings * 2);\n return [...leftRange, '…', totalPages];\n }\n\n if (showLeftDots && !showRightDots) {\n const rightRange = range(totalPages - (2 + siblings * 2), totalPages);\n return [1, '…', ...rightRange];\n }\n\n return [1, '…', ...range(leftSibling, rightSibling), '…', totalPages];\n};\n\nconst PageButton = ({\n active,\n disabled,\n children,\n ...props\n}: ButtonHTMLAttributes<HTMLButtonElement> & { active?: boolean }) => {\n return (\n <button\n disabled={disabled}\n className={clx(\n 'pagination-button',\n `pagination-button-${active ? 'active' : 'inactive'}`,\n )}\n {...props}\n >\n {children}\n </button>\n );\n};\n\nexport const Pagination = ({\n page,\n totalPages,\n onPageChange,\n siblingsCount = 1,\n}: PaginationProps) => {\n const pages = buildPages(page, totalPages, siblingsCount);\n\n return (\n <nav aria-label=\"Pagination\" className=\"pagination\">\n <PageButton\n disabled={page <= 1}\n onClick={() => onPageChange(page - 1)}\n aria-label=\"Previous page\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15.75 19.5L8.25 12l7.5-7.5\"\n />\n </svg>\n </PageButton>\n\n {pages.map((p, i) =>\n p === '…' ? (\n <span key={`dots-${i}`} className=\"pagination-dots\">\n …\n </span>\n ) : (\n <PageButton\n key={p}\n active={p === page}\n onClick={() => onPageChange(p)}\n aria-label={`Page ${p}`}\n aria-current={p === page ? 'page' : undefined}\n >\n {p}\n </PageButton>\n ),\n )}\n\n <PageButton\n disabled={page >= totalPages}\n onClick={() => onPageChange(page + 1)}\n aria-label=\"Next page\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"\n />\n </svg>\n </PageButton>\n </nav>\n );\n};\n","import { useRef, useState } from 'react';\nimport type { ReactNode, KeyboardEvent } from 'react';\nimport { Input } from '../common/Input/Input';\n\nexport interface CurrencyOption {\n code: string;\n symbol: string;\n label: string;\n}\n\nexport interface LocaleOption {\n code: string;\n label: string;\n flag?: string;\n}\n\nexport interface HeaderProps {\n /** Logo — ReactNode (image, SVG, text) */\n logo?: ReactNode;\n /** Search placeholder */\n searchPlaceholder?: string;\n onSearch?: (query: string) => void;\n /** Cart */\n cartItemCount?: number;\n onCartClick?: () => void;\n /** Customer */\n isLoggedIn?: boolean;\n customerName?: string;\n onCustomerClick?: () => void;\n /** Currency */\n currencies?: CurrencyOption[];\n selectedCurrency?: string;\n onCurrencyChange?: (code: string) => void;\n /** Locale / eshop */\n locales?: LocaleOption[];\n selectedLocale?: string;\n onLocaleChange?: (code: string) => void;\n /** Extra right slot */\n rightSlot?: ReactNode;\n}\n\n// ─── Small internal dropdown ────────────────────────────────────────────────\n\ninterface DropdownProps<T extends { label: string }> {\n trigger: ReactNode;\n items: T[];\n onSelect: (item: T) => void;\n getKey: (item: T) => string;\n renderItem?: (item: T) => ReactNode;\n}\n\nfunction Dropdown<T extends { label: string }>({\n trigger,\n items,\n onSelect,\n getKey,\n renderItem,\n}: DropdownProps<T>) {\n const [open, setOpen] = useState(false);\n const ref = useRef<HTMLDivElement>(null);\n\n const close = () => setOpen(false);\n\n // Close on outside click\n const handleBlur = (e: React.FocusEvent) => {\n if (!ref.current?.contains(e.relatedTarget as Node)) close();\n };\n\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') close();\n };\n\n return (\n <div ref={ref} className=\"relative\" onBlur={handleBlur} onKeyDown={onKey}>\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => setOpen((v) => !v)}\n onKeyDown={(e) => e.key === 'Enter' && setOpen((v) => !v)}\n className=\"cursor-pointer\"\n >\n {trigger}\n </div>\n {open && (\n <ul\n role=\"menu\"\n className=\"absolute right-0 top-full mt-1 z-50 min-w-28 bg-white rounded-lg shadow-lg border border-gray-100 py-1 text-sm\"\n >\n {items.map((item) => (\n <li key={getKey(item)} role=\"none\">\n <button\n role=\"menuitem\"\n className=\"w-full px-3 py-1.5 text-left hover:bg-gray-50 text-gray-700 whitespace-nowrap\"\n onClick={() => {\n onSelect(item);\n close();\n }}\n >\n {renderItem ? renderItem(item) : item.label}\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\n\n// ─── Search icon ─────────────────────────────────────────────────────────────\n\nfunction SearchIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 15.803a7.5 7.5 0 0010.607 10.607z\"\n />\n </svg>\n );\n}\n\n// ─── Header ──────────────────────────────────────────────────────────────────\n\nexport function Header({\n logo,\n searchPlaceholder = 'Hledat produkty…',\n onSearch,\n cartItemCount = 0,\n onCartClick,\n isLoggedIn = false,\n customerName,\n onCustomerClick,\n currencies = [],\n selectedCurrency,\n onCurrencyChange,\n locales = [],\n selectedLocale,\n onLocaleChange,\n rightSlot,\n}: HeaderProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const activeCurrency = currencies.find((c) => c.code === selectedCurrency);\n const activeLocale = locales.find((l) => l.code === selectedLocale);\n\n const handleSearchKey = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') onSearch?.(searchQuery);\n };\n\n return (\n <header className=\"bg-white border-b border-gray-200 sticky top-0 z-40\">\n <div className=\"max-w-7xl mx-auto px-4 h-16 flex items-center gap-4\">\n {/* Logo */}\n <div className=\"shrink-0\">\n {logo ?? (\n <span className=\"text-xl font-bold text-primary-600 tracking-tight\">\n shopito\n </span>\n )}\n </div>\n\n {/* Search */}\n <div className=\"flex-1 max-w-xl\">\n <Input\n placeholder={searchPlaceholder}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n onKeyDown={handleSearchKey}\n leftIcon={<SearchIcon />}\n rightIcon={\n searchQuery ? (\n <button\n onClick={() => {\n setSearchQuery('');\n onSearch?.('');\n }}\n className=\"hover:text-gray-600 transition-colors\"\n aria-label=\"Clear search\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-3.5 h-3.5\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n ) : undefined\n }\n />\n </div>\n\n {/* Right controls */}\n <div className=\"flex items-center gap-1 shrink-0 ml-auto\">\n {/* Currency switcher */}\n {currencies.length > 0 && (\n <Dropdown\n trigger={\n <button className=\"flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors font-medium\">\n <span>{activeCurrency?.symbol ?? selectedCurrency}</span>\n <span className=\"text-xs text-gray-400\">\n {activeCurrency?.code ?? selectedCurrency}\n </span>\n <ChevronDown className=\"w-3 h-3 text-gray-400\" />\n </button>\n }\n items={currencies}\n getKey={(c) => c.code}\n onSelect={(c) => onCurrencyChange?.(c.code)}\n renderItem={(c) => (\n <span className=\"flex items-center gap-2\">\n <span className=\"w-6 text-center font-medium text-gray-500\">\n {c.symbol}\n </span>\n <span>{c.label}</span>\n </span>\n )}\n />\n )}\n\n {/* Locale switcher */}\n {locales.length > 0 && (\n <Dropdown\n trigger={\n <button className=\"flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors\">\n {activeLocale?.flag && (\n <span className=\"text-base leading-none\">\n {activeLocale.flag}\n </span>\n )}\n <span className=\"font-medium uppercase\">\n {activeLocale?.code ?? selectedLocale}\n </span>\n <ChevronDown className=\"w-3 h-3 text-gray-400\" />\n </button>\n }\n items={locales}\n getKey={(l) => l.code}\n onSelect={(l) => onLocaleChange?.(l.code)}\n renderItem={(l) => (\n <span className=\"flex items-center gap-2\">\n {l.flag && <span className=\"text-base\">{l.flag}</span>}\n <span>{l.label}</span>\n </span>\n )}\n />\n )}\n\n {/* Divider */}\n {(currencies.length > 0 || locales.length > 0) && (\n <div className=\"w-px h-5 bg-gray-200 mx-1\" />\n )}\n\n {/* Customer button */}\n <button\n onClick={onCustomerClick}\n className=\"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors\"\n aria-label={isLoggedIn ? 'My account' : 'Sign in'}\n >\n {isLoggedIn ? (\n <>\n <div className=\"w-6 h-6 rounded-full bg-primary-600 text-white flex items-center justify-center text-xs font-bold\">\n {(customerName ?? 'U')[0].toUpperCase()}\n </div>\n {customerName && (\n <span className=\"hidden sm:block font-medium max-w-32 truncate\">\n {customerName}\n </span>\n )}\n </>\n ) : (\n <>\n <UserIcon className=\"w-5 h-5\" />\n <span className=\"hidden sm:block font-medium\">\n Přihlásit se\n </span>\n </>\n )}\n </button>\n\n {/* Cart */}\n <button\n onClick={onCartClick}\n className=\"relative flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors\"\n aria-label={`Cart, ${cartItemCount} items`}\n >\n <CartIcon className=\"w-5 h-5\" />\n <span className=\"hidden sm:block font-medium\">Košík</span>\n {cartItemCount > 0 && (\n <span className=\"absolute -top-0.5 -right-0.5 min-w-4.5 h-4.5 flex items-center justify-center rounded-full bg-primary-600 text-white text-[10px] font-bold leading-none px-1\">\n {cartItemCount > 99 ? '99+' : cartItemCount}\n </span>\n )}\n </button>\n\n {rightSlot}\n </div>\n </div>\n </header>\n );\n}\n\n// ─── Icon helpers ─────────────────────────────────────────────────────────────\n\nfunction ChevronDown({ className }: { className?: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className={className}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\"\n />\n </svg>\n );\n}\n\nfunction UserIcon({ className }: { className?: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className={className}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z\"\n />\n </svg>\n );\n}\n\nfunction CartIcon({ className }: { className?: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className={className}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z\"\n />\n </svg>\n );\n}\n","import { useState } from 'react'\n\nexport interface Category {\n id: string\n label: string\n icon?: string\n count?: number\n children?: Category[]\n}\n\nexport interface CategoryTreeProps {\n categories: Category[]\n activeId?: string\n onSelect?: (category: Category) => void\n /** Show product counts */\n showCounts?: boolean\n /** All nodes expanded by default */\n defaultExpandAll?: boolean\n className?: string\n}\n\ninterface TreeNodeProps {\n node: Category\n activeId: string | undefined\n onSelect: (category: Category) => void\n showCounts: boolean\n depth: number\n defaultExpandAll: boolean\n}\n\nfunction TreeNode({\n node,\n activeId,\n onSelect,\n showCounts,\n depth,\n defaultExpandAll,\n}: TreeNodeProps) {\n const hasChildren = node.children && node.children.length > 0\n const [expanded, setExpanded] = useState(defaultExpandAll || isAncestorOf(node, activeId))\n const isActive = node.id === activeId\n\n return (\n <li>\n <div\n className={[\n 'group flex items-center gap-1.5 rounded-lg px-2 py-1.5 cursor-pointer select-none',\n 'transition-colors text-sm',\n isActive\n ? 'bg-primary-50 text-primary-700 font-medium'\n : 'text-gray-700 hover:bg-gray-50 hover:text-gray-900',\n depth > 0 ? `ml-${Math.min(depth * 4, 8)}` : '',\n ]\n .filter(Boolean)\n .join(' ')}\n style={depth > 0 ? { marginLeft: depth * 16 } : undefined}\n onClick={() => {\n onSelect(node)\n if (hasChildren) setExpanded((v) => !v)\n }}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n onSelect(node)\n if (hasChildren) setExpanded((v) => !v)\n }\n }}\n aria-expanded={hasChildren ? expanded : undefined}\n >\n {/* Expand toggle */}\n {hasChildren ? (\n <span\n className={`shrink-0 text-gray-400 transition-transform duration-150 ${expanded ? 'rotate-90' : ''}`}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-3.5 h-3.5\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\" />\n </svg>\n </span>\n ) : (\n <span className=\"w-3.5 shrink-0\" />\n )}\n\n {/* Icon */}\n {node.icon && <span className=\"text-base leading-none\">{node.icon}</span>}\n\n {/* Label */}\n <span className=\"flex-1 truncate\">{node.label}</span>\n\n {/* Count */}\n {showCounts && node.count !== undefined && (\n <span\n className={`text-xs rounded-full px-1.5 py-0.5 font-medium ${\n isActive ? 'bg-primary-100 text-primary-600' : 'bg-gray-100 text-gray-500'\n }`}\n >\n {node.count}\n </span>\n )}\n </div>\n\n {/* Children */}\n {hasChildren && expanded && (\n <ul role=\"group\">\n {node.children!.map((child) => (\n <TreeNode\n key={child.id}\n node={child}\n activeId={activeId}\n onSelect={onSelect}\n showCounts={showCounts}\n depth={depth + 1}\n defaultExpandAll={defaultExpandAll}\n />\n ))}\n </ul>\n )}\n </li>\n )\n}\n\nfunction isAncestorOf(node: Category, activeId: string | undefined): boolean {\n if (!activeId) return false\n if (!node.children) return false\n return node.children.some(\n (c) => c.id === activeId || isAncestorOf(c, activeId),\n )\n}\n\nexport function CategoryTree({\n categories,\n activeId,\n onSelect,\n showCounts = true,\n defaultExpandAll = false,\n className = '',\n ...props\n}: CategoryTreeProps) {\n const handleSelect = (cat: Category) => onSelect?.(cat)\n\n return (\n <nav\n aria-label=\"Category navigation\"\n className={['w-full', className].filter(Boolean).join(' ')}\n {...props}\n >\n <ul role=\"tree\" className=\"space-y-0.5\">\n {categories.map((cat) => (\n <TreeNode\n key={cat.id}\n node={cat}\n activeId={activeId}\n onSelect={handleSelect}\n showCounts={showCounts}\n depth={0}\n defaultExpandAll={defaultExpandAll}\n />\n ))}\n </ul>\n </nav>\n )\n}\n","import { useState, useRef } from 'react'\n\nexport interface MegaMenuSubItem {\n id: string\n label: string\n href?: string\n badge?: string\n}\n\nexport interface MegaMenuColumn {\n heading?: string\n items: MegaMenuSubItem[]\n}\n\nexport interface MegaMenuFeatured {\n image?: string\n eyebrow?: string\n title: string\n description?: string\n cta?: string\n href?: string\n}\n\nexport interface MegaMenuItem {\n id: string\n label: string\n icon?: string\n href?: string\n /** If columns are present, hovering opens the mega panel */\n columns?: MegaMenuColumn[]\n featured?: MegaMenuFeatured\n}\n\nexport interface MegaMenuProps {\n items: MegaMenuItem[]\n activeId?: string\n onNavigate?: (item: MegaMenuSubItem | MegaMenuItem) => void\n}\n\n// ─── Mega panel ──────────────────────────────────────────────────────────────\n\ninterface MegaPanelProps {\n item: MegaMenuItem\n onNavigate: (subItem: MegaMenuSubItem | MegaMenuItem) => void\n onClose: () => void\n}\n\nfunction MegaPanel({ item, onNavigate, onClose }: MegaPanelProps) {\n if (!item.columns?.length) return null\n\n return (\n <div className=\"absolute left-0 right-0 top-full z-50 bg-white border-b border-gray-200 shadow-lg\">\n <div className=\"max-w-7xl mx-auto px-4 py-6 flex gap-8\">\n {/* Columns */}\n <div className=\"flex-1 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6\">\n {item.columns.map((col, ci) => (\n <div key={ci}>\n {col.heading && (\n <p className=\"text-xs font-semibold uppercase tracking-wider text-gray-400 mb-2\">\n {col.heading}\n </p>\n )}\n <ul className=\"space-y-1\">\n {col.items.map((sub) => (\n <li key={sub.id}>\n <button\n className=\"flex items-center gap-1.5 text-sm text-gray-700 hover:text-primary-600 transition-colors py-0.5\"\n onClick={() => {\n onNavigate(sub)\n onClose()\n }}\n >\n {sub.label}\n {sub.badge && (\n <span className=\"text-[10px] font-semibold px-1.5 py-0.5 rounded-full bg-danger-50 text-danger-600 leading-none\">\n {sub.badge}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n\n {/* Featured card */}\n {item.featured && (\n <div className=\"w-52 shrink-0\">\n <button\n className=\"group block w-full rounded-xl overflow-hidden border border-gray-100 text-left hover:shadow-md transition-shadow\"\n onClick={() => {\n onNavigate(item)\n onClose()\n }}\n >\n {item.featured.image ? (\n <img\n src={item.featured.image}\n alt={item.featured.title}\n className=\"w-full h-28 object-cover\"\n />\n ) : (\n <div className=\"w-full h-28 bg-linear-to-br from-primary-100 to-primary-200 flex items-center justify-center text-4xl\">\n {item.icon ?? '🛍️'}\n </div>\n )}\n <div className=\"p-3\">\n {item.featured.eyebrow && (\n <p className=\"text-[10px] font-semibold uppercase tracking-wider text-primary-500 mb-0.5\">\n {item.featured.eyebrow}\n </p>\n )}\n <p className=\"text-sm font-semibold text-gray-900 group-hover:text-primary-600 transition-colors\">\n {item.featured.title}\n </p>\n {item.featured.description && (\n <p className=\"text-xs text-gray-500 mt-0.5 line-clamp-2\">\n {item.featured.description}\n </p>\n )}\n {item.featured.cta && (\n <span className=\"inline-block mt-2 text-xs font-medium text-primary-600\">\n {item.featured.cta} →\n </span>\n )}\n </div>\n </button>\n </div>\n )}\n </div>\n </div>\n )\n}\n\n// ─── MegaMenu ────────────────────────────────────────────────────────────────\n\nexport function MegaMenu({\n items,\n activeId,\n onNavigate,\n}: MegaMenuProps) {\n const [openId, setOpenId] = useState<string | null>(null)\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n const open = (id: string) => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n setOpenId(id)\n }\n\n const scheduleClose = () => {\n timeoutRef.current = setTimeout(() => setOpenId(null), 120)\n }\n\n const cancelClose = () => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n }\n\n const activeItem = items.find((i) => i.id === openId)\n\n return (\n <nav\n aria-label=\"Main navigation\"\n className=\"relative bg-white border-b border-gray-100\"\n onMouseLeave={scheduleClose}\n >\n <div className=\"max-w-7xl mx-auto px-4\">\n <ul className=\"flex items-center gap-0\" role=\"menubar\">\n {items.map((item) => {\n const hasMega = !!item.columns?.length\n const isOpen = openId === item.id\n const isActive = activeId === item.id\n\n return (\n <li key={item.id} role=\"none\">\n <button\n role=\"menuitem\"\n aria-haspopup={hasMega ? 'true' : undefined}\n aria-expanded={hasMega ? isOpen : undefined}\n className={[\n 'flex items-center gap-1.5 px-4 py-3.5 text-sm font-medium transition-colors relative',\n 'outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500',\n isActive || isOpen\n ? 'text-primary-600'\n : 'text-gray-700 hover:text-gray-900',\n isOpen\n ? 'after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary-600'\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onMouseEnter={() => hasMega ? open(item.id) : setOpenId(null)}\n onFocus={() => hasMega && open(item.id)}\n onClick={() => {\n if (!hasMega) {\n onNavigate?.(item)\n setOpenId(null)\n }\n }}\n >\n {item.icon && <span className=\"text-base leading-none\">{item.icon}</span>}\n {item.label}\n {hasMega && (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className={`w-3.5 h-3.5 transition-transform duration-150 ${isOpen ? 'rotate-180' : ''}`}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\"\n />\n </svg>\n )}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n {/* Mega panel */}\n {activeItem?.columns?.length && (\n <div\n onMouseEnter={cancelClose}\n onMouseLeave={scheduleClose}\n >\n <MegaPanel\n item={activeItem}\n onNavigate={(sub) => onNavigate?.(sub)}\n onClose={() => setOpenId(null)}\n />\n </div>\n )}\n </nav>\n )\n}\n","import { useState, useEffect, useCallback, useRef } from 'react'\n\nexport interface Banner {\n id: string\n /** Background image URL or gradient CSS value */\n backgroundImage?: string\n backgroundColor?: string\n /** Overlaid text content */\n eyebrow?: string\n title: string\n subtitle?: string\n ctaLabel?: string\n ctaHref?: string\n onCtaClick?: () => void\n /** Image on the right side of the banner */\n sideImage?: string\n /** Text colors — default to white for dark backgrounds */\n textColor?: 'light' | 'dark'\n}\n\nexport interface BannerCarouselProps {\n banners: Banner[]\n autoPlay?: boolean\n autoPlayInterval?: number\n /** Show arrow navigation */\n arrows?: boolean\n /** Show dot indicators */\n dots?: boolean\n className?: string\n /** Aspect ratio of the banner — default 3/1 */\n aspectRatio?: string\n}\n\nexport function BannerCarousel({\n banners,\n autoPlay = true,\n autoPlayInterval = 5000,\n arrows = true,\n dots = true,\n className = '',\n aspectRatio = '3 / 1',\n}: BannerCarouselProps) {\n const [current, setCurrent] = useState(0)\n const [paused, setPaused] = useState(false)\n const timerRef = useRef<ReturnType<typeof setInterval> | null>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n\n const count = banners.length\n\n const goTo = useCallback(\n (index: number) => {\n setCurrent(((index % count) + count) % count)\n },\n [count],\n )\n\n const prev = () => goTo(current - 1)\n const next = useCallback(() => goTo(current + 1), [current, goTo])\n\n // Auto-play\n useEffect(() => {\n if (!autoPlay || paused || count <= 1) return\n timerRef.current = setInterval(next, autoPlayInterval)\n return () => {\n if (timerRef.current) clearInterval(timerRef.current)\n }\n }, [autoPlay, paused, autoPlayInterval, next, count])\n\n // Swipe support\n const touchStartX = useRef<number | null>(null)\n const handleTouchStart = (e: React.TouchEvent) => {\n touchStartX.current = e.touches[0].clientX\n }\n const handleTouchEnd = (e: React.TouchEvent) => {\n if (touchStartX.current === null) return\n const delta = e.changedTouches[0].clientX - touchStartX.current\n if (Math.abs(delta) > 50) delta < 0 ? next() : prev()\n touchStartX.current = null\n }\n\n if (count === 0) return null\n\n const banner = banners[current]\n const isLight = banner.textColor === 'light' || !banner.textColor\n\n return (\n <div\n className={['relative overflow-hidden rounded-xl', className].filter(Boolean).join(' ')}\n style={{ aspectRatio }}\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n >\n {/* Slides */}\n <div ref={trackRef} className=\"relative w-full h-full\">\n {banners.map((b, i) => (\n <div\n key={b.id}\n aria-hidden={i !== current}\n className={[\n 'absolute inset-0 transition-opacity duration-700',\n i === current ? 'opacity-100 z-10' : 'opacity-0 z-0',\n ].join(' ')}\n style={{\n background: b.backgroundImage\n ? `url(${b.backgroundImage}) center/cover no-repeat`\n : b.backgroundColor ?? 'linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%)',\n }}\n >\n {/* Overlay for readability */}\n {b.backgroundImage && (\n <div className=\"absolute inset-0 bg-gradient-to-r from-black/50 via-black/20 to-transparent\" />\n )}\n\n {/* Content */}\n <div className=\"relative z-10 h-full flex items-center px-8 md:px-12 gap-8\">\n <div className=\"flex-1 max-w-lg\">\n {b.eyebrow && (\n <p\n className={`text-xs font-semibold uppercase tracking-widest mb-2 ${\n isLight ? 'text-white/70' : 'text-gray-500'\n }`}\n >\n {b.eyebrow}\n </p>\n )}\n <h2\n className={`text-2xl md:text-3xl lg:text-4xl font-bold leading-tight ${\n isLight ? 'text-white' : 'text-gray-900'\n }`}\n >\n {b.title}\n </h2>\n {b.subtitle && (\n <p\n className={`mt-2 text-sm md:text-base ${\n isLight ? 'text-white/80' : 'text-gray-600'\n }`}\n >\n {b.subtitle}\n </p>\n )}\n {b.ctaLabel && (\n <button\n onClick={b.onCtaClick}\n className={[\n 'mt-5 inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-sm font-semibold transition-all',\n isLight\n ? 'bg-white text-gray-900 hover:bg-gray-100'\n : 'bg-primary-600 text-white hover:bg-primary-700',\n ].join(' ')}\n >\n {b.ctaLabel}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\" />\n </svg>\n </button>\n )}\n </div>\n\n {/* Side image */}\n {b.sideImage && (\n <div className=\"hidden md:block flex-1 h-full flex items-end justify-end overflow-hidden\">\n <img\n src={b.sideImage}\n alt=\"\"\n className=\"h-full w-auto object-contain object-bottom drop-shadow-2xl\"\n />\n </div>\n )}\n </div>\n </div>\n ))}\n </div>\n\n {/* Arrow navigation */}\n {arrows && count > 1 && (\n <>\n <button\n onClick={prev}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 z-20 w-9 h-9 flex items-center justify-center rounded-full bg-black/30 text-white hover:bg-black/50 transition-colors backdrop-blur-sm\"\n aria-label=\"Previous banner\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={2} stroke=\"currentColor\" className=\"w-5 h-5\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15.75 19.5L8.25 12l7.5-7.5\" />\n </svg>\n </button>\n <button\n onClick={next}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 z-20 w-9 h-9 flex items-center justify-center rounded-full bg-black/30 text-white hover:bg-black/50 transition-colors backdrop-blur-sm\"\n aria-label=\"Next banner\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={2} stroke=\"currentColor\" className=\"w-5 h-5\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\" />\n </svg>\n </button>\n </>\n )}\n\n {/* Dot indicators */}\n {dots && count > 1 && (\n <div className=\"absolute bottom-3 left-1/2 -translate-x-1/2 z-20 flex gap-1.5\">\n {banners.map((_, i) => (\n <button\n key={i}\n onClick={() => goTo(i)}\n aria-label={`Go to slide ${i + 1}`}\n className={[\n 'rounded-full transition-all duration-300',\n i === current\n ? 'w-5 h-2 bg-white'\n : 'w-2 h-2 bg-white/50 hover:bg-white/80',\n ].join(' ')}\n />\n ))}\n </div>\n )}\n\n {/* Auto-play progress bar */}\n {autoPlay && count > 1 && (\n <div className=\"absolute bottom-0 left-0 right-0 h-0.5 bg-white/20 z-20\">\n <div\n key={`${current}-${paused}`}\n className={`h-full bg-white/60 ${paused ? '' : 'animate-progress'}`}\n style={{\n animation: paused ? 'none' : `progress ${autoPlayInterval}ms linear`,\n }}\n />\n </div>\n )}\n </div>\n )\n}\n","import { useState } from 'react'\nimport { Badge } from '../common/Badge/Badge'\nimport { Button } from '../common/Button/Button'\n\nexport interface ProductCardProduct {\n id: string\n name: string\n slug?: string\n /** Primary image URL */\n image?: string\n /** Secondary image on hover */\n imageHover?: string\n price: number\n originalPrice?: number\n currency?: string\n /** 'new' | 'sale' | 'hot' | custom string */\n badge?: string\n /** 0–5 */\n rating?: number\n reviewCount?: number\n inStock?: boolean\n /** Variants available (e.g. colors) */\n variants?: { id: string; color?: string; label: string }[]\n}\n\nexport interface ProductCardProps {\n product: ProductCardProduct\n onAddToCart?: (product: ProductCardProduct) => void\n onWishlistToggle?: (product: ProductCardProduct) => void\n isWishlisted?: boolean\n onProductClick?: (product: ProductCardProduct) => void\n /** compact — narrower, used in grids with 4+ columns */\n size?: 'default' | 'compact'\n className?: string\n}\n\nfunction StarIcon({ filled }: { filled: boolean }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n className={`w-3.5 h-3.5 ${filled ? 'fill-amber-400 stroke-amber-400' : 'fill-gray-200 stroke-gray-300'}`}\n strokeWidth={1}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z\"\n />\n </svg>\n )\n}\n\nfunction StarRating({ value, count }: { value: number; count?: number }) {\n return (\n <div className=\"flex items-center gap-1\">\n <div className=\"flex gap-0.5\">\n {[1, 2, 3, 4, 5].map((s) => (\n <StarIcon key={s} filled={s <= Math.round(value)} />\n ))}\n </div>\n {count !== undefined && (\n <span className=\"text-xs text-gray-400\">({count})</span>\n )}\n </div>\n )\n}\n\nfunction badgeVariant(badge: string) {\n const b = badge.toLowerCase()\n if (b === 'sale' || b === 'akce') return 'danger' as const\n if (b === 'new' || b === 'nové') return 'primary' as const\n if (b === 'hot') return 'warning' as const\n return 'default' as const\n}\n\nfunction formatPrice(price: number, currency = 'Kč') {\n return `${price.toLocaleString('cs-CZ')} ${currency}`\n}\n\nfunction discountPercent(original: number, current: number) {\n return Math.round((1 - current / original) * 100)\n}\n\nexport function ProductCard({\n product,\n onAddToCart,\n onWishlistToggle,\n isWishlisted = false,\n onProductClick,\n size = 'default',\n className = '',\n}: ProductCardProps) {\n const [hovered, setHovered] = useState(false)\n const [addedToCart, setAddedToCart] = useState(false)\n\n const hasDiscount =\n product.originalPrice !== undefined && product.originalPrice > product.price\n\n const handleAddToCart = (e: React.MouseEvent) => {\n e.stopPropagation()\n onAddToCart?.(product)\n setAddedToCart(true)\n setTimeout(() => setAddedToCart(false), 1500)\n }\n\n const handleWishlist = (e: React.MouseEvent) => {\n e.stopPropagation()\n onWishlistToggle?.(product)\n }\n\n return (\n <article\n className={[\n 'group relative flex flex-col bg-white rounded-xl border border-gray-200',\n 'hover:shadow-md transition-shadow duration-200 overflow-hidden cursor-pointer',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onProductClick?.(product)}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n >\n {/* Image */}\n <div className={`relative overflow-hidden bg-gray-50 ${size === 'compact' ? 'aspect-square' : 'aspect-4/3'}`}>\n {product.image ? (\n <img\n src={hovered && product.imageHover ? product.imageHover : product.image}\n alt={product.name}\n className=\"w-full h-full object-contain p-4 transition-transform duration-300 group-hover:scale-105\"\n />\n ) : (\n <div className=\"w-full h-full flex items-center justify-center text-5xl bg-linear-to-br from-gray-100 to-gray-200\">\n 🛍️\n </div>\n )}\n\n {/* Badge */}\n {product.badge && (\n <div className=\"absolute top-2 left-2\">\n <Badge variant={badgeVariant(product.badge)} size=\"sm\">\n {product.badge === 'sale' && hasDiscount\n ? `-${discountPercent(product.originalPrice!, product.price)}%`\n : product.badge}\n </Badge>\n </div>\n )}\n\n {/* Out of stock overlay */}\n {product.inStock === false && (\n <div className=\"absolute inset-0 bg-white/70 flex items-center justify-center\">\n <span className=\"text-sm font-semibold text-gray-500 bg-white/90 px-3 py-1 rounded-full border border-gray-200\">\n Vyprodáno\n </span>\n </div>\n )}\n\n {/* Wishlist button */}\n <button\n onClick={handleWishlist}\n aria-label={isWishlisted ? 'Remove from wishlist' : 'Add to wishlist'}\n className={[\n 'absolute top-2 right-2 w-8 h-8 flex items-center justify-center rounded-full bg-white shadow-sm border border-gray-100',\n 'transition-all duration-200',\n 'opacity-0 group-hover:opacity-100 focus:opacity-100',\n isWishlisted ? 'text-danger-500' : 'text-gray-400 hover:text-danger-400',\n ].join(' ')}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className={`w-4 h-4 ${isWishlisted ? 'fill-current' : 'fill-none'}`}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z\"\n />\n </svg>\n </button>\n\n {/* Quick add — slides up on hover */}\n <div\n className={[\n 'absolute bottom-0 left-0 right-0 p-2 transition-transform duration-200',\n hovered ? 'translate-y-0' : 'translate-y-full',\n ].join(' ')}\n >\n <Button\n variant=\"primary\"\n size=\"sm\"\n fullWidth\n loading={false}\n disabled={product.inStock === false}\n onClick={handleAddToCart}\n className=\"shadow-lg\"\n >\n {addedToCart ? (\n <span className=\"flex items-center gap-1.5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={2} stroke=\"currentColor\" className=\"w-4 h-4\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\" />\n </svg>\n Přidáno\n </span>\n ) : (\n 'Přidat do košíku'\n )}\n </Button>\n </div>\n </div>\n\n {/* Info */}\n <div className={`flex flex-col gap-1.5 ${size === 'compact' ? 'p-3' : 'p-4'}`}>\n {/* Color variants */}\n {product.variants && product.variants.length > 0 && (\n <div className=\"flex gap-1\">\n {product.variants.slice(0, 5).map((v) => (\n <span\n key={v.id}\n title={v.label}\n className=\"w-4 h-4 rounded-full border border-gray-300 shrink-0\"\n style={{ backgroundColor: v.color ?? '#ccc' }}\n />\n ))}\n {product.variants.length > 5 && (\n <span className=\"text-xs text-gray-400\">+{product.variants.length - 5}</span>\n )}\n </div>\n )}\n\n {/* Name */}\n <h3\n className={`font-medium text-gray-900 leading-snug line-clamp-2 group-hover:text-primary-600 transition-colors ${\n size === 'compact' ? 'text-xs' : 'text-sm'\n }`}\n >\n {product.name}\n </h3>\n\n {/* Rating */}\n {product.rating !== undefined && (\n <StarRating value={product.rating} count={product.reviewCount} />\n )}\n\n {/* Price */}\n <div className=\"flex items-baseline gap-2 mt-auto pt-1\">\n <span\n className={`font-bold text-gray-900 ${size === 'compact' ? 'text-base' : 'text-lg'}`}\n >\n {formatPrice(product.price, product.currency)}\n </span>\n {hasDiscount && (\n <span className=\"text-sm text-gray-400 line-through\">\n {formatPrice(product.originalPrice!, product.currency)}\n </span>\n )}\n </div>\n </div>\n </article>\n )\n}\n","import type { ReactNode } from 'react'\nimport { ProductCard } from '../ProductCard/ProductCard'\nimport type { ProductCardProduct, ProductCardProps } from '../ProductCard/ProductCard'\nimport { Pagination } from '../common/Pagination/Pagination'\nimport { Select } from '../common/Select/Select'\n\nexport type GridColumns = 2 | 3 | 4 | 5\n\nexport interface SortOption {\n value: string\n label: string\n}\n\nexport interface ProductGridProps {\n products: ProductCardProduct[]\n /** Total products (for pagination) */\n totalCount?: number\n /** Current page */\n page?: number\n onPageChange?: (page: number) => void\n /** Products per page */\n perPage?: number\n /** Column count */\n columns?: GridColumns\n /** Sort options */\n sortOptions?: SortOption[]\n selectedSort?: string\n onSortChange?: (value: string) => void\n /** Active filters summary */\n activeFilters?: string[]\n onRemoveFilter?: (filter: string) => void\n onClearFilters?: () => void\n /** Loading skeleton */\n loading?: boolean\n /** Empty state slot */\n emptyState?: ReactNode\n /** ProductCard passthrough props */\n onAddToCart?: ProductCardProps['onAddToCart']\n onWishlistToggle?: ProductCardProps['onWishlistToggle']\n onProductClick?: ProductCardProps['onProductClick']\n wishlisted?: string[]\n className?: string\n}\n\nconst colClasses: Record<GridColumns, string> = {\n 2: 'grid-cols-2',\n 3: 'grid-cols-2 md:grid-cols-3',\n 4: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-4',\n 5: 'grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5',\n}\n\nconst DEFAULT_SORT_OPTIONS: SortOption[] = [\n { value: 'newest', label: 'Nejnovější' },\n { value: 'price-asc', label: 'Cena: od nejnižší' },\n { value: 'price-desc', label: 'Cena: od nejvyšší' },\n { value: 'rating', label: 'Hodnocení' },\n { value: 'bestseller', label: 'Bestsellery' },\n]\n\nfunction SkeletonCard() {\n return (\n <div className=\"rounded-xl border border-gray-100 overflow-hidden animate-pulse\">\n <div className=\"aspect-4/3 bg-gray-200\" />\n <div className=\"p-4 space-y-2\">\n <div className=\"h-3 bg-gray-200 rounded w-3/4\" />\n <div className=\"h-3 bg-gray-200 rounded w-1/2\" />\n <div className=\"h-5 bg-gray-200 rounded w-1/3 mt-2\" />\n </div>\n </div>\n )\n}\n\nexport function ProductGrid({\n products,\n totalCount,\n page = 1,\n onPageChange,\n perPage = 20,\n columns = 4,\n sortOptions = DEFAULT_SORT_OPTIONS,\n selectedSort,\n onSortChange,\n activeFilters = [],\n onRemoveFilter,\n onClearFilters,\n loading = false,\n emptyState,\n onAddToCart,\n onWishlistToggle,\n onProductClick,\n wishlisted = [],\n className = '',\n}: ProductGridProps) {\n const totalPages = totalCount ? Math.ceil(totalCount / perPage) : undefined\n const cardSize = columns >= 5 ? 'compact' : 'default'\n\n return (\n <div className={['w-full', className].filter(Boolean).join(' ')}>\n {/* Toolbar */}\n <div className=\"flex flex-wrap items-center justify-between gap-3 mb-4\">\n {/* Left: count + active filters */}\n <div className=\"flex flex-wrap items-center gap-2\">\n {totalCount !== undefined && (\n <span className=\"text-sm text-gray-500\">\n <span className=\"font-semibold text-gray-900\">{totalCount}</span> produktů\n </span>\n )}\n {activeFilters.map((f) => (\n <span\n key={f}\n className=\"inline-flex items-center gap-1 text-xs bg-primary-50 text-primary-700 border border-primary-200 rounded-full px-2.5 py-1\"\n >\n {f}\n <button\n onClick={() => onRemoveFilter?.(f)}\n aria-label={`Remove filter ${f}`}\n className=\"hover:text-primary-900 transition-colors\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={2} stroke=\"currentColor\" className=\"w-3 h-3\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n </span>\n ))}\n {activeFilters.length > 1 && (\n <button\n onClick={onClearFilters}\n className=\"text-xs text-gray-400 hover:text-gray-600 underline underline-offset-2 transition-colors\"\n >\n Zrušit vše\n </button>\n )}\n </div>\n\n {/* Right: sort */}\n <Select\n options={sortOptions}\n value={selectedSort ?? ''}\n onChange={(e) => onSortChange?.(e.target.value)}\n aria-label=\"Sort products\"\n className=\"text-sm\"\n />\n </div>\n\n {/* Grid */}\n {loading ? (\n <div className={`grid gap-4 ${colClasses[columns]}`}>\n {Array.from({ length: perPage > 12 ? 12 : perPage }).map((_, i) => (\n <SkeletonCard key={i} />\n ))}\n </div>\n ) : products.length === 0 ? (\n <div className=\"py-16 text-center\">\n {emptyState ?? (\n <div className=\"space-y-2\">\n <p className=\"text-4xl\">🔍</p>\n <p className=\"font-semibold text-gray-900\">Žádné produkty nenalezeny</p>\n <p className=\"text-sm text-gray-500\">Zkuste upravit filtry nebo hledat jinak.</p>\n {activeFilters.length > 0 && (\n <button\n onClick={onClearFilters}\n className=\"mt-3 text-sm text-primary-600 hover:underline\"\n >\n Zrušit všechny filtry\n </button>\n )}\n </div>\n )}\n </div>\n ) : (\n <div className={`grid gap-4 ${colClasses[columns]}`}>\n {products.map((product) => (\n <ProductCard\n key={product.id}\n product={product}\n size={cardSize}\n onAddToCart={onAddToCart}\n onWishlistToggle={onWishlistToggle}\n onProductClick={onProductClick}\n isWishlisted={wishlisted.includes(product.id)}\n />\n ))}\n </div>\n )}\n\n {/* Pagination */}\n {totalPages && totalPages > 1 && onPageChange && (\n <div className=\"flex justify-center mt-8\">\n <Pagination\n page={page}\n totalPages={totalPages}\n onPageChange={onPageChange}\n />\n </div>\n )}\n </div>\n )\n}\n","import type { ReactNode, CSSProperties } from 'react'\nimport { Button } from '../common/Button/Button'\nimport type { ButtonProps } from '../common/Button/Button'\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\ntype CtaAlign = 'left' | 'center' | 'right'\ntype CtaSize = 'sm' | 'md' | 'lg' | 'xl'\ntype CtaVariant = 'default' | 'primary' | 'dark' | 'gradient' | 'outline' | 'image'\ntype CtaLayout = 'stacked' | 'inline'\n\nexport interface CtaAction {\n label: string\n onClick?: () => void\n href?: string\n variant?: ButtonProps['variant']\n size?: ButtonProps['size']\n}\n\nexport interface CallToActionProps {\n // Content\n eyebrow?: string\n title: string\n description?: string\n actions?: CtaAction[]\n\n // Layout\n align?: CtaAlign\n layout?: CtaLayout\n size?: CtaSize\n\n // Visual\n variant?: CtaVariant\n /** Custom background colour or gradient CSS value (overrides variant background) */\n background?: string\n /** For variant=\"image\": URL of background image */\n backgroundImage?: string\n /** Extra decorative slot — e.g. an illustration, icon or badge */\n media?: ReactNode\n\n // Misc\n className?: string\n style?: CSSProperties\n}\n\n// ─── Config maps ─────────────────────────────────────────────────────────────\n\nconst variantClasses: Record<CtaVariant, string> = {\n default: 'bg-gray-50 border border-gray-200',\n primary: 'bg-primary-600',\n dark: 'bg-gray-900',\n gradient: 'bg-linear-to-br from-primary-600 via-primary-700 to-violet-700',\n outline: 'bg-white border-2 border-primary-600',\n image: 'relative overflow-hidden', // bg applied inline via style\n}\n\nconst variantTextClasses: Record<CtaVariant, { eyebrow: string; title: string; description: string }> = {\n default: { eyebrow: 'text-primary-600', title: 'text-gray-900', description: 'text-gray-600' },\n primary: { eyebrow: 'text-primary-100', title: 'text-white', description: 'text-primary-100' },\n dark: { eyebrow: 'text-primary-400', title: 'text-white', description: 'text-gray-400' },\n gradient: { eyebrow: 'text-primary-200', title: 'text-white', description: 'text-primary-100' },\n outline: { eyebrow: 'text-primary-600', title: 'text-gray-900', description: 'text-gray-600' },\n image: { eyebrow: 'text-white/70', title: 'text-white', description: 'text-white/80' },\n}\n\nconst sizeClasses: Record<CtaSize, { wrapper: string; title: string; description: string; eyebrow: string }> = {\n sm: { wrapper: 'px-6 py-6 rounded-xl', title: 'text-xl font-bold', description: 'text-sm', eyebrow: 'text-xs' },\n md: { wrapper: 'px-8 py-10 rounded-2xl', title: 'text-2xl font-bold', description: 'text-base', eyebrow: 'text-xs' },\n lg: { wrapper: 'px-10 py-14 rounded-2xl', title: 'text-3xl font-bold', description: 'text-lg', eyebrow: 'text-sm' },\n xl: { wrapper: 'px-12 py-20 rounded-3xl', title: 'text-4xl font-extrabold leading-tight', description: 'text-xl', eyebrow: 'text-sm' },\n}\n\nconst alignClasses: Record<CtaAlign, { wrapper: string; actions: string }> = {\n left: { wrapper: 'items-start text-left', actions: 'justify-start' },\n center: { wrapper: 'items-center text-center', actions: 'justify-center' },\n right: { wrapper: 'items-end text-right', actions: 'justify-end' },\n}\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport function CallToAction({\n eyebrow,\n title,\n description,\n actions = [],\n align = 'center',\n layout = 'stacked',\n size = 'md',\n variant = 'default',\n background,\n backgroundImage,\n media,\n className = '',\n style,\n}: CallToActionProps) {\n const textColors = variantTextClasses[variant]\n const sizes = sizeClasses[size]\n const alignment = alignClasses[align]\n const isInline = layout === 'inline'\n\n const inlineStyle: CSSProperties = {\n ...(background ? { background } : {}),\n ...(backgroundImage ? { backgroundImage: `url(${backgroundImage})`, backgroundSize: 'cover', backgroundPosition: 'center' } : {}),\n ...style,\n }\n\n return (\n <div\n className={[\n 'w-full',\n variantClasses[variant],\n sizes.wrapper,\n className,\n ].filter(Boolean).join(' ')}\n style={Object.keys(inlineStyle).length ? inlineStyle : undefined}\n >\n {/* Image overlay */}\n {(variant === 'image' || backgroundImage) && (\n <div className=\"absolute inset-0 bg-black/50\" />\n )}\n\n <div className={`relative ${isInline ? 'flex flex-wrap items-center justify-between gap-6' : `flex flex-col gap-4 ${alignment.wrapper}`}`}>\n\n {/* Text block */}\n <div className={`flex flex-col gap-2 ${isInline ? 'flex-1 min-w-0' : alignment.wrapper}`}>\n {eyebrow && (\n <p className={`font-semibold uppercase tracking-widest ${sizes.eyebrow} ${textColors.eyebrow}`}>\n {eyebrow}\n </p>\n )}\n <h2 className={`${sizes.title} ${textColors.title}`}>\n {title}\n </h2>\n {description && (\n <p className={`max-w-2xl ${sizes.description} ${textColors.description}`}>\n {description}\n </p>\n )}\n </div>\n\n {/* Media slot */}\n {media && !isInline && (\n <div className=\"mt-2\">{media}</div>\n )}\n\n {/* Actions */}\n {actions.length > 0 && (\n <div className={`flex flex-wrap gap-3 ${isInline ? 'shrink-0' : alignment.actions}`}>\n {actions.map((action, i) => {\n const btn = (\n <Button\n key={i}\n variant={action.variant ?? (i === 0 ? resolveDefaultPrimaryVariant(variant) : 'outline')}\n size={action.size ?? (size === 'sm' ? 'sm' : size === 'xl' ? 'lg' : 'md')}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n )\n return action.href ? (\n <a key={i} href={action.href} className=\"contents\">{btn}</a>\n ) : btn\n })}\n </div>\n )}\n </div>\n </div>\n )\n}\n\n/** Pick a sensible default button variant that contrasts with the CTA background */\nfunction resolveDefaultPrimaryVariant(ctaVariant: CtaVariant): ButtonProps['variant'] {\n if (ctaVariant === 'default' || ctaVariant === 'outline') return 'primary'\n return 'secondary' // white-ish on dark/coloured backgrounds\n}\n","import type { ReactNode } from 'react';\nimport { Container } from '../common/Container';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface FooterContact {\n icon?: 'phone' | 'email' | 'address' | 'hours' | ReactNode;\n label: string;\n value: string;\n href?: string;\n}\n\nexport interface FooterLink {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface FooterLinkGroup {\n heading: string;\n links: FooterLink[];\n}\n\nexport interface FooterSocialLink {\n label: string;\n href?: string;\n icon: 'facebook' | 'instagram' | 'twitter' | 'youtube' | 'tiktok' | ReactNode;\n}\n\nexport interface FooterProps {\n // Branding\n logo?: ReactNode;\n tagline?: string;\n\n // Contact section\n contactHeading?: string;\n contacts?: FooterContact[];\n\n // Links section\n linkGroups?: FooterLinkGroup[];\n\n // Social\n socialLinks?: FooterSocialLink[];\n\n // Bottom bar\n copyright?: string;\n bottomLinks?: FooterLink[];\n\n className?: string;\n}\n\n// ─── Icons ────────────────────────────────────────────────────────────────────\n\nfunction PhoneIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4 shrink-0\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z\"\n />\n </svg>\n );\n}\n\nfunction EmailIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4 shrink-0\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75\"\n />\n </svg>\n );\n}\n\nfunction AddressIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4 shrink-0\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15 10.5a3 3 0 11-6 0 3 3 0 016 0z\"\n />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z\"\n />\n </svg>\n );\n}\n\nfunction HoursIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4 shrink-0\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n );\n}\n\nfunction FacebookIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M24 12.073C24 5.405 18.627 0 12 0S0 5.405 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.886v2.267h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z\" />\n </svg>\n );\n}\n\nfunction InstagramIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z\" />\n </svg>\n );\n}\n\nfunction TwitterIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\" />\n </svg>\n );\n}\n\nfunction YoutubeIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z\" />\n </svg>\n );\n}\n\nfunction TiktokIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-2.88 2.5 2.89 2.89 0 01-2.89-2.89 2.89 2.89 0 012.89-2.89c.28 0 .54.04.79.1V9.01a6.33 6.33 0 00-.79-.05 6.34 6.34 0 00-6.34 6.34 6.34 6.34 0 006.34 6.34 6.34 6.34 0 006.33-6.34V8.69a8.18 8.18 0 004.78 1.52V6.76a4.85 4.85 0 01-1.01-.07z\" />\n </svg>\n );\n}\n\nconst SOCIAL_ICONS = {\n facebook: FacebookIcon,\n instagram: InstagramIcon,\n twitter: TwitterIcon,\n youtube: YoutubeIcon,\n tiktok: TiktokIcon,\n};\nconst CONTACT_ICONS = {\n phone: PhoneIcon,\n email: EmailIcon,\n address: AddressIcon,\n hours: HoursIcon,\n};\n\nfunction resolveContactIcon(icon: FooterContact['icon']) {\n if (!icon) return null;\n if (typeof icon === 'string') {\n const Icon = CONTACT_ICONS[icon as keyof typeof CONTACT_ICONS];\n return Icon ? <Icon /> : null;\n }\n return icon;\n}\n\nfunction resolveSocialIcon(icon: FooterSocialLink['icon']) {\n if (typeof icon === 'string') {\n const Icon = SOCIAL_ICONS[icon as keyof typeof SOCIAL_ICONS];\n return Icon ? <Icon /> : null;\n }\n return icon;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport function Footer({\n logo,\n tagline,\n contactHeading = 'Kontakty',\n contacts = [],\n linkGroups = [],\n socialLinks = [],\n copyright,\n bottomLinks = [],\n className = '',\n}: FooterProps) {\n const year = new Date().getFullYear();\n\n return (\n <footer\n className={['bg-gray-900 text-gray-300', className]\n .filter(Boolean)\n .join(' ')}\n >\n <Container>\n {/* ── Main section ───────────────────────────────────────────────────── */}\n <div className=\"max-w-7xl mx-auto px-4 py-12 grid grid-cols-1 md:grid-cols-2 gap-10 lg:gap-16\">\n {/* ── Left: Contact section ──────────────────────────────────────── */}\n <div className=\"flex flex-col gap-6\">\n {/* Logo + tagline */}\n <div>\n {logo ? (\n <div className=\"mb-3\">{logo}</div>\n ) : (\n <span className=\"text-xl font-bold text-white tracking-tight mb-3 block\">\n shopito\n </span>\n )}\n {tagline && (\n <p className=\"text-sm text-gray-400 max-w-xs\">{tagline}</p>\n )}\n </div>\n\n {/* Contacts */}\n {contacts.length > 0 && (\n <div>\n <h3 className=\"text-xs font-semibold uppercase tracking-widest text-gray-500 mb-3\">\n {contactHeading}\n </h3>\n <ul className=\"space-y-3\">\n {contacts.map((c, i) => {\n const icon = resolveContactIcon(c.icon);\n const inner = (\n <div className=\"flex items-start gap-2.5\">\n {icon && (\n <span className=\"mt-0.5 text-primary-400\">\n {icon}\n </span>\n )}\n <div>\n <p className=\"text-xs text-gray-500 leading-none mb-0.5\">\n {c.label}\n </p>\n <p\n className={`text-sm text-gray-200 ${c.href ? 'hover:text-white transition-colors' : ''}`}\n >\n {c.value}\n </p>\n </div>\n </div>\n );\n\n return (\n <li key={i}>\n {c.href ? <a href={c.href}>{inner}</a> : inner}\n </li>\n );\n })}\n </ul>\n </div>\n )}\n\n {/* Social links */}\n {socialLinks.length > 0 && (\n <div className=\"flex gap-2 flex-wrap\">\n {socialLinks.map((s, i) => (\n <a\n key={i}\n href={s.href}\n aria-label={s.label}\n className=\"w-8 h-8 flex items-center justify-center rounded-lg bg-gray-800 text-gray-400 hover:bg-primary-600 hover:text-white transition-colors\"\n >\n {resolveSocialIcon(s.icon)}\n </a>\n ))}\n </div>\n )}\n </div>\n\n {/* ── Right: Link groups ─────────────────────────────────────────── */}\n {linkGroups.length > 0 && (\n <div\n className={`grid gap-8 ${linkGroups.length === 1 ? 'grid-cols-1' : linkGroups.length === 2 ? 'grid-cols-2' : 'grid-cols-2 sm:grid-cols-3'}`}\n >\n {linkGroups.map((group, gi) => (\n <div key={gi}>\n <h3 className=\"text-xs font-semibold uppercase tracking-widest text-gray-500 mb-3\">\n {group.heading}\n </h3>\n <ul className=\"space-y-2\">\n {group.links.map((link, li) => (\n <li key={li}>\n {link.href ? (\n <a\n href={link.href}\n className=\"text-sm text-gray-400 hover:text-white transition-colors\"\n >\n {link.label}\n </a>\n ) : (\n <button\n onClick={link.onClick}\n className=\"text-sm text-gray-400 hover:text-white transition-colors text-left\"\n >\n {link.label}\n </button>\n )}\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* ── Bottom bar ─────────────────────────────────────────────────────── */}\n <div className=\"border-t border-gray-800\">\n <div className=\"max-w-7xl mx-auto px-4 py-4 flex flex-wrap items-center justify-between gap-3\">\n <p className=\"text-xs text-gray-500\">\n {copyright ?? `© ${year} Shopito. Všechna práva vyhrazena.`}\n </p>\n {bottomLinks.length > 0 && (\n <nav className=\"flex flex-wrap gap-4\">\n {bottomLinks.map((link, i) =>\n link.href ? (\n <a\n key={i}\n href={link.href}\n className=\"text-xs text-gray-500 hover:text-gray-300 transition-colors\"\n >\n {link.label}\n </a>\n ) : (\n <button\n key={i}\n onClick={link.onClick}\n className=\"text-xs text-gray-500 hover:text-gray-300 transition-colors\"\n >\n {link.label}\n </button>\n ),\n )}\n </nav>\n )}\n </div>\n </div>\n </Container>\n </footer>\n );\n}\n"],"x_google_ignoreList":[2],"mappings":";;;;;;;;;;;;;aAMa,KAAa,EAAE,kBACnB,kBAAC,OAAD;CAAK,WAAU;CAAa;CAAe,CAAA,ECAvC,KAAQ,EAAE,kBAEnB,kBAAC,QAAD;CAAM,WAAU;WACd,kBAAC,GAAD,EAAY,aAAqB,CAAA;CAC5B,CAAA;ACJX,EAAC,WAAY;EAGZ,IAAI,IAAS,EAAE,CAAC;EAEhB,SAAS,IAAc;AAGtB,QAAK,IAFD,IAAU,IAEL,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;IAC1C,IAAI,IAAM,UAAU;AACpB,IAAI,MACH,IAAU,EAAY,GAAS,EAAW,EAAI,CAAC;;AAIjD,UAAO;;EAGR,SAAS,EAAY,GAAK;AACzB,OAAI,OAAO,KAAQ,YAAY,OAAO,KAAQ,SAC7C,QAAO;AAGR,OAAI,OAAO,KAAQ,SAClB,QAAO;AAGR,OAAI,MAAM,QAAQ,EAAI,CACrB,QAAO,EAAW,MAAM,MAAM,EAAI;AAGnC,OAAI,EAAI,aAAa,OAAO,UAAU,YAAY,CAAC,EAAI,SAAS,UAAU,CAAC,SAAS,gBAAgB,CACnG,QAAO,EAAI,UAAU;GAGtB,IAAI,IAAU;AAEd,QAAK,IAAI,KAAO,EACf,CAAI,EAAO,KAAK,GAAK,EAAI,IA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B,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eACX,EAAM;KACJ,CAAA,EACL,kBAAC,MAAD;KAAI,WAAU;eACX,EAAM,MAAM,KAAK,GAAM,MACtB,kBAAC,MAAD,EAAA,UACG,EAAK,OACJ,kBAAC,KAAD;MACE,MAAM,EAAK;MACX,WAAU;gBAET,EAAK;MACJ,CAAA,GAEJ,kBAAC,UAAD;MACE,SAAS,EAAK;MACd,WAAU;gBAET,EAAK;MACC,CAAA,EAER,EAhBI,EAgBJ,CACL;KACC,CAAA,CACD,EAAA,EAzBI,EAyBJ,CACN;IACE,CAAA,CAEJ;MAGN,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD;KAAG,WAAU;eACV,KAAa,KAAK,EAAK;KACtB,CAAA,EACH,EAAY,SAAS,KACpB,kBAAC,OAAD;KAAK,WAAU;eACZ,EAAY,KAAK,GAAM,MACtB,EAAK,OACH,kBAAC,KAAD;MAEE,MAAM,EAAK;MACX,WAAU;gBAET,EAAK;MACJ,EALG,EAKH,GAEJ,kBAAC,UAAD;MAEE,SAAS,EAAK;MACd,WAAU;gBAET,EAAK;MACC,EALF,EAKE,CAEZ;KACG,CAAA,CAEJ;;GACF,CAAA,CACI,EAAA,CAAA;EACL,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["isObject","extend","getComputedStyle","isObject","extend","Swiper","extend","Pagination"],"sources":["../src/components/common/Container/Container.tsx","../src/components/common/Main/Main.tsx","../node_modules/classnames/index.js","../src/components/common/Button/Button.tsx","../src/components/common/LoadingSpin/LoadingSpin.tsx","../src/components/common/IconButton/IconButton.tsx","../src/components/common/Input/Input.tsx","../src/components/common/Select/Select.tsx","../src/components/common/Typography/Heading.tsx","../src/components/common/Typography/Text.tsx","../src/components/common/Badge/Badge.tsx","../src/components/common/Card/Card.tsx","../src/components/common/Spinner/Spinner.tsx","../src/components/common/Alert/Alert.tsx","../src/components/common/Modal/Modal.tsx","../src/components/common/Checkbox/Checkbox.tsx","../src/components/common/Toggle/Toggle.tsx","../src/components/common/Avatar/Avatar.tsx","../src/components/common/Stack/Stack.tsx","../src/components/common/Grid/Grid.tsx","../src/components/common/QuantityInput/QuantityInput.tsx","../src/components/common/Pagination/Pagination.tsx","../node_modules/swiper/shared/ssr-window.esm.mjs","../node_modules/swiper/shared/utils.mjs","../node_modules/swiper/shared/swiper-core.mjs","../node_modules/swiper/shared/update-swiper.mjs","../node_modules/swiper/shared/update-on-virtual-data.mjs","../node_modules/swiper/swiper-react.mjs","../node_modules/swiper/shared/create-element-if-not-defined.mjs","../node_modules/swiper/modules/navigation.mjs","../node_modules/swiper/shared/classes-to-selector.mjs","../node_modules/swiper/modules/pagination.mjs","../node_modules/swiper/modules/autoplay.mjs","../src/components/common/Carousel/Carousel.tsx","../src/components/Header/Header.tsx","../src/components/CategoryTree/CategoryTree.tsx","../src/components/MegaMenu/MegaMenu.tsx","../src/components/BannerCarousel/BannerCarousel.tsx","../src/components/ProductCard/ProductCard.tsx","../src/components/ProductGrid/ProductGrid.tsx","../src/components/CallToAction/CallToAction.tsx","../src/components/Footer/Footer.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\n\nexport interface ContainerProps {\n children: ReactNode;\n}\n\nexport const Container = ({ children }: ContainerProps) => {\n return <div className=\"container\">{children}</div>;\n};\n","import { type ReactNode } from 'react';\nimport { Container } from '../Container';\n\nexport interface MainProps {\n children: ReactNode;\n}\n\nexport const Main = ({ children }: MainProps) => {\n return (\n <main className=\"main\">\n <Container>{children}</Container>\n </main>\n );\n};\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { forwardRef } from 'react';\nimport type { ButtonHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\ntype Variant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';\ntype Size = 'xs' | 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: Variant;\n size?: Size;\n loading?: boolean;\n fullWidth?: boolean;\n}\n\n// const variantClasses: Record<Variant, string> = {\n// primary:\n// 'bg-primary-600 text-white hover:bg-primary-700 active:bg-primary-800 focus-visible:ring-primary-500',\n// secondary:\n// 'bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 focus-visible:ring-gray-400',\n// outline:\n// 'border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 active:bg-gray-100 focus-visible:ring-gray-400',\n// ghost:\n// 'bg-transparent text-gray-700 hover:bg-gray-100 active:bg-gray-200 focus-visible:ring-gray-400',\n// danger:\n// 'bg-danger-600 text-white hover:bg-danger-700 active:bg-danger-800 focus-visible:ring-danger-500',\n// };\n\n// const sizeClasses: Record<Size, string> = {\n// xs: 'h-7 px-2.5 text-xs gap-1',\n// sm: 'h-8 px-3 text-sm gap-1.5',\n// md: 'h-10 px-4 text-sm gap-2',\n// lg: 'h-11 px-5 text-base gap-2',\n// };\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'primary',\n size = 'md',\n loading = false,\n fullWidth = false,\n disabled,\n children,\n className = '',\n ...props\n },\n ref,\n ) => {\n const isDisabled = disabled || loading;\n\n return (\n <button\n ref={ref}\n disabled={isDisabled}\n className={clx(\n 'btn',\n variant && `btn-${variant}`,\n size && `btn-${size}`,\n fullWidth && 'w-full',\n className,\n )}\n {...props}\n >\n {loading && (\n <svg\n className=\"animate-spin h-4 w-4 shrink-0\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n )}\n {children}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n","import clx from 'classnames';\n\ntype Size = 'xs' | 'sm' | 'md' | 'lg';\n\nexport interface LoadingSpinProps {\n size: Size;\n}\n\nexport const LoadingSpin = ({ size = 'md' }: LoadingSpinProps) => {\n return (\n <svg\n className={clx('loading-spin', `loading-spin-${size}`)}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z\"\n />\n </svg>\n );\n};\n","import { forwardRef } from 'react';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\nimport { LoadingSpin } from '../LoadingSpin';\n\ntype Variant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';\ntype Size = 'xs' | 'sm' | 'md' | 'lg';\n\nexport interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n icon: ReactNode;\n label: string;\n variant?: Variant;\n size?: Size;\n loading?: boolean;\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n icon,\n label,\n variant = 'ghost',\n size = 'md',\n loading = false,\n disabled,\n className = '',\n ...props\n },\n ref,\n ) => {\n const isDisabled = disabled || loading;\n\n return (\n <button\n ref={ref}\n disabled={isDisabled}\n aria-label={label}\n title={label}\n className={clx(\n 'icon-button',\n `icon-button-${variant}`,\n `icon-button-${size}`,\n className,\n )}\n {...props}\n >\n {loading ? <LoadingSpin size={size} /> : icon}\n </button>\n );\n },\n);\n\nIconButton.displayName = 'IconButton';\n","import { forwardRef } from 'react';\nimport type { InputHTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n label?: string;\n error?: string;\n hint?: string;\n leftIcon?: ReactNode;\n rightIcon?: ReactNode;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n { label, error, hint, leftIcon, rightIcon, className = '', id, ...props },\n ref,\n ) => {\n const inputId = id ?? label?.toLowerCase().replace(/\\s+/g, '-');\n\n return (\n <div className={'w-full'}>\n {label && (\n <label htmlFor={inputId} className=\"input-label\">\n {label}\n </label>\n )}\n <div className=\"relative\">\n {leftIcon && <span className=\"left-icon\">{leftIcon}</span>}\n <input\n ref={ref}\n id={inputId}\n className={clx(\n 'input',\n error && 'has-error',\n !!leftIcon && 'with-left-icon',\n !!rightIcon && 'with-right-icon',\n 'w-full',\n className,\n )}\n {...props}\n />\n {rightIcon && <span className=\"right-icon\">{rightIcon}</span>}\n </div>\n {(error || hint) && (\n <p className={clx('helper-text', error && 'has-error')}>\n {error ?? hint}\n </p>\n )}\n </div>\n );\n },\n);\n\nInput.displayName = 'Input';\n","import { forwardRef } from 'react';\nimport type { SelectHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\nexport interface SelectOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n label?: string;\n error?: string;\n hint?: string;\n options: SelectOption[];\n placeholder?: string;\n}\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n (\n { label, error, hint, options, placeholder, className = '', id, ...props },\n ref,\n ) => {\n const selectId = id ?? label?.toLowerCase().replace(/\\s+/g, '-');\n\n return (\n <div className={clx('select-wrapper', 'w-full')}>\n {label && (\n <label htmlFor={selectId} className=\"select-label\">\n {label}\n </label>\n )}\n <div className=\"relative\">\n <select\n ref={ref}\n id={selectId}\n className={clx('select', 'w-full', error && 'has-error', className)}\n {...props}\n >\n {placeholder && (\n <option value=\"\" disabled>\n {placeholder}\n </option>\n )}\n {options.map((opt) => (\n <option key={opt.value} value={opt.value} disabled={opt.disabled}>\n {opt.label}\n </option>\n ))}\n </select>\n {/* Chevron icon */}\n <span className=\"select-chevron-icon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\"\n />\n </svg>\n </span>\n </div>\n {(error || hint) && (\n <p className={clx('select-helper', error && 'has-error')}>\n {error ?? hint}\n </p>\n )}\n </div>\n );\n },\n);\n\nSelect.displayName = 'Select';\n","import type { HTMLAttributes, ReactNode } from 'react';\nimport cx from 'classnames';\nimport type { Color } from './Text';\n\ntype HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\ninterface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n as?: HeadingLevel;\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n color?: Color;\n children: ReactNode;\n}\n\nexport const Heading = ({\n as,\n level = 1,\n color = 'default',\n className = '',\n children,\n ...props\n}: HeadingProps) => {\n const Tag = as ?? (`h${level}` as HeadingLevel);\n\n return (\n <Tag\n className={cx(`text-color-${color}`, `heading-size-${level}`, className)}\n {...props}\n >\n {children}\n </Tag>\n );\n};\n","import type { ElementType, HTMLAttributes, ReactNode } from 'react';\nimport cx from 'classnames';\n\ntype TextVariant = 'body' | 'body-sm' | 'caption' | 'overline' | 'code';\n\nexport type Color =\n | 'default'\n | 'muted'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'inherit';\n\ninterface TextProps extends HTMLAttributes<HTMLElement> {\n variant?: TextVariant;\n color?: Color;\n as?: ElementType;\n children: ReactNode;\n}\n\nexport const Text = ({\n variant = 'body',\n color = 'default',\n as: Tag = 'p',\n className = '',\n children,\n ...props\n}: TextProps) => {\n return (\n <Tag\n className={cx(\n `text-color-${color}`,\n `text-variant-${variant}`,\n className,\n )}\n {...props}\n >\n {children}\n </Tag>\n );\n};\n","import type { HTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\n\ntype BadgeVariant =\n | 'default'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'outline';\n\ntype BadgeSize = 'sm' | 'md';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n variant?: BadgeVariant;\n size?: BadgeSize;\n dot?: boolean;\n children: ReactNode;\n}\n\nexport function Badge({\n variant = 'default',\n size = 'md',\n dot = false,\n className,\n children,\n ...props\n}: BadgeProps) {\n return (\n <span\n className={clx('badge', `badge-${variant}`, `badge-${size}`, className)}\n {...props}\n >\n {dot && <span className={clx('badge-dot', `badge-dot-${variant}`)} />}\n {children}\n </span>\n );\n}\n","import type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n padding?: 'none' | 'sm' | 'md' | 'lg'\n shadow?: boolean\n border?: boolean\n}\n\nexport interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nexport interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode\n}\n\nconst paddingClasses = {\n none: '',\n sm: 'p-4',\n md: 'p-6',\n lg: 'p-8',\n}\n\nexport function Card({\n children,\n padding = 'md',\n shadow = true,\n border = true,\n className = '',\n ...props\n}: CardProps) {\n return (\n <div\n className={[\n 'bg-white rounded-xl overflow-hidden',\n border ? 'border border-gray-200' : '',\n shadow ? 'shadow-sm' : '',\n paddingClasses[padding],\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nexport function CardHeader({ children, className = '', ...props }: CardHeaderProps) {\n return (\n <div\n className={['px-6 py-4 border-b border-gray-100', className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nexport function CardBody({ children, className = '', ...props }: CardBodyProps) {\n return (\n <div className={['p-6', className].filter(Boolean).join(' ')} {...props}>\n {children}\n </div>\n )\n}\n\nexport function CardFooter({ children, className = '', ...props }: CardFooterProps) {\n return (\n <div\n className={[\n 'px-6 py-4 border-t border-gray-100 bg-gray-50',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n )\n}\n","import type { HTMLAttributes } from 'react';\nimport clx from 'classnames';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\ntype SpinnerColor = 'primary' | 'white' | 'gray';\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n size?: SpinnerSize;\n color?: SpinnerColor;\n label?: string;\n}\n\nexport function Spinner({\n size = 'md',\n color = 'primary',\n label = 'Loading…',\n className = '',\n ...props\n}: SpinnerProps) {\n return (\n <span\n role=\"status\"\n aria-label={label}\n className={clx('spinner-wrapper', className)}\n {...props}\n >\n <span className={clx('spinner', `spinner-${size}`, `spinner-${color}`)} />\n <span className=\"sr-only\">{label}</span>\n </span>\n );\n}\n","import type { HTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\n\ntype AlertVariant = 'info' | 'success' | 'warning' | 'danger';\n\nexport interface AlertProps extends HTMLAttributes<HTMLDivElement> {\n variant?: AlertVariant;\n title?: string;\n children: ReactNode;\n onClose?: () => void;\n}\n\nconst variantIcon: Record<AlertVariant, ReactNode> = {\n info: (\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z\"\n />\n ),\n success: (\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n ),\n warning: (\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\"\n />\n ),\n danger: (\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z\"\n />\n ),\n};\n\nexport function Alert({\n variant = 'info',\n title,\n children,\n onClose,\n className = '',\n ...props\n}: AlertProps) {\n return (\n <div\n role=\"alert\"\n className={clx('alert', `alert-${variant}`, 'w-full', className)}\n {...props}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className={clx('alert-icon', `alert-icon-${variant}`)}\n >\n {variantIcon[variant]}\n </svg>\n <div className=\"flex-1 min-w-0\">\n {title && <p className=\"alert-title\">{title}</p>}\n <div className=\"alert-text\">{children}</div>\n </div>\n {onClose && (\n <button\n onClick={onClose}\n className=\"alert-close-btn\"\n aria-label=\"Close\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n )}\n </div>\n );\n}\n","import { useEffect, useRef } from 'react'\nimport type { ReactNode } from 'react'\nimport { createPortal } from 'react-dom'\n\ntype ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full'\n\nexport interface ModalProps {\n open: boolean\n onClose: () => void\n title?: string\n children: ReactNode\n footer?: ReactNode\n size?: ModalSize\n closeOnBackdrop?: boolean\n}\n\nconst sizeClasses: Record<ModalSize, string> = {\n sm: 'max-w-sm',\n md: 'max-w-md',\n lg: 'max-w-lg',\n xl: 'max-w-xl',\n full: 'max-w-full mx-4',\n}\n\nexport function Modal({\n open,\n onClose,\n title,\n children,\n footer,\n size = 'md',\n closeOnBackdrop = true,\n}: ModalProps) {\n const backdropRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (!open) return\n const prev = document.body.style.overflow\n document.body.style.overflow = 'hidden'\n return () => {\n document.body.style.overflow = prev\n }\n }, [open])\n\n useEffect(() => {\n if (!open) return\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose()\n }\n document.addEventListener('keydown', onKey)\n return () => document.removeEventListener('keydown', onKey)\n }, [open, onClose])\n\n if (!open) return null\n\n return createPortal(\n <div\n ref={backdropRef}\n className=\"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm\"\n onClick={(e) => {\n if (closeOnBackdrop && e.target === backdropRef.current) onClose()\n }}\n >\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? 'modal-title' : undefined}\n className={[\n 'relative w-full bg-white rounded-xl shadow-xl flex flex-col max-h-[90vh]',\n sizeClasses[size],\n ].join(' ')}\n >\n {title && (\n <div className=\"flex items-center justify-between px-6 py-4 border-b border-gray-100 shrink-0\">\n <h2 id=\"modal-title\" className=\"text-lg font-semibold text-gray-900\">\n {title}\n </h2>\n <button\n onClick={onClose}\n className=\"text-gray-400 hover:text-gray-600 transition-colors\"\n aria-label=\"Close modal\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-5 h-5\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n </div>\n )}\n <div className=\"flex-1 overflow-y-auto px-6 py-4\">{children}</div>\n {footer && (\n <div className=\"px-6 py-4 border-t border-gray-100 shrink-0 bg-gray-50 rounded-b-xl\">\n {footer}\n </div>\n )}\n </div>\n </div>,\n document.body,\n )\n}\n","import { forwardRef } from 'react';\nimport type { InputHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\nexport interface CheckboxProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'type'\n> {\n label?: string;\n description?: string;\n error?: string;\n indeterminate?: boolean;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n { label, description, error, indeterminate, className = '', id, ...props },\n ref,\n ) => {\n const inputId = id ?? label?.toLowerCase().replace(/\\s+/g, '-');\n\n return (\n <div className={clx('checkbox-wrapper', className)}>\n <div className=\"checkbox-wrapper-inner\">\n <input\n ref={(el) => {\n if (el) el.indeterminate = indeterminate ?? false;\n if (typeof ref === 'function') ref(el);\n else if (ref) ref.current = el;\n }}\n id={inputId}\n type=\"checkbox\"\n className={clx('checkbox', error && 'has-error')}\n {...props}\n />\n </div>\n {(label || description) && (\n <div>\n {label && (\n <label htmlFor={inputId} className=\"checkbox-label\">\n {label}\n </label>\n )}\n {description && (\n <p className=\"checkbox-description\">{description}</p>\n )}\n {error && <p className=\"checkbox-error\">{error}</p>}\n </div>\n )}\n </div>\n );\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n","import { forwardRef } from 'react';\nimport type { InputHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\ntype ToggleSize = 'sm' | 'md' | 'lg';\n\nexport interface ToggleProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'type' | 'size'\n> {\n label?: string;\n description?: string;\n size?: ToggleSize;\n}\n\nexport const Toggle = forwardRef<HTMLInputElement, ToggleProps>(\n ({ label, description, size = 'md', className = '', id, ...props }, ref) => {\n const inputId = id ?? label?.toLowerCase().replace(/\\s+/g, '-');\n\n return (\n <label\n htmlFor={inputId}\n className={clx(\n 'toggle',\n props.disabled && 'toggle-disabled',\n className,\n )}\n >\n <div className={clx('toggle-wrapper', `toggle-wrapper-${size}`)}>\n <input\n ref={ref}\n id={inputId}\n type=\"checkbox\"\n role=\"switch\"\n className=\"sr-only peer\"\n {...props}\n />\n <div className=\"toggle-track\" />\n <div className={clx('toggle-thumb', `toggle-thumb-${size}`)} />\n </div>\n {(label || description) && (\n <div>\n {label && <span className=\"toggle-label\">{label}</span>}\n {description && (\n <span className=\"toggle-description\">{description}</span>\n )}\n </div>\n )}\n </label>\n );\n },\n);\n\nToggle.displayName = 'Toggle';\n","import type { HTMLAttributes, ReactNode } from 'react';\nimport clx from 'classnames';\n\ntype AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n src?: string;\n alt?: string;\n name?: string;\n size?: AvatarSize;\n}\n\nexport interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {\n max?: number;\n size?: AvatarSize;\n children: ReactNode;\n}\n\nconst bgColors = [\n 'bg-red-500',\n 'bg-orange-500',\n 'bg-amber-500',\n 'bg-emerald-500',\n 'bg-teal-500',\n 'bg-cyan-500',\n 'bg-blue-500',\n 'bg-violet-500',\n 'bg-pink-500',\n];\n\nexport function Avatar({\n src,\n alt,\n name,\n size = 'md',\n className,\n ...props\n}: AvatarProps) {\n const baseClasses = ['avatar', `avatar-${size}`, className];\n\n const nameToColor = (n: string) => {\n let hash = 0;\n for (let i = 0; i < n.length; i++) hash += n.charCodeAt(i);\n return bgColors[hash % bgColors.length];\n };\n\n const getInitials = (name: string) =>\n name\n .split(' ')\n .slice(0, 2)\n .map((n) => n[0])\n .join('')\n .toUpperCase();\n\n if (src) {\n return (\n <span className={clx(baseClasses)} {...props}>\n <img\n src={src}\n alt={alt ?? name ?? ''}\n className=\"w-full h-full object-cover\"\n />\n </span>\n );\n }\n\n if (name) {\n return (\n <span\n className={clx(baseClasses, nameToColor(name))}\n aria-label={name}\n {...props}\n >\n {getInitials(name)}\n </span>\n );\n }\n\n // Fallback icon\n return (\n <span className={clx(baseClasses, 'avatar-fallback')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n className=\"w-3/5 h-3/5\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M7.5 6a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM3.751 20.105a8.25 8.25 0 0116.498 0 .75.75 0 01-.437.695A18.683 18.683 0 0112 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 01-.437-.695z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n );\n}\n","import type { ReactNode } from 'react';\nimport cx from 'classnames';\n\ninterface StackProps {\n direction?: 'row' | 'column';\n gap?: number;\n alignItems?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';\n justifyItems?: 'start' | 'end' | 'center' | 'stretch';\n justifyContent?:\n | 'normal'\n | 'start'\n | 'end'\n | 'center'\n | 'between'\n | 'around'\n | 'evenly'\n | 'stretch';\n className?: string;\n children?: ReactNode;\n}\n\nexport const Stack = ({\n direction = 'row',\n gap,\n alignItems = 'start',\n justifyItems = 'start',\n justifyContent = 'normal',\n className,\n children,\n}: StackProps) => {\n const alignItemsMap: Record<string, string> = {\n start: 'items-start',\n end: 'items-end',\n center: 'items-center',\n baseline: 'items-baseline',\n stretch: 'items-stretch',\n };\n\n const justifyItemsMap: Record<string, string> = {\n start: 'justify-items-start',\n end: 'justify-items-end',\n center: 'justify-items-center',\n stretch: 'justify-items-stretch',\n };\n\n const justifyContentMap: Record<string, string> = {\n normal: 'justify-normal',\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n stretch: 'justify-stretch',\n };\n\n return (\n <div\n className={cx(\n 'stack',\n `stack-${direction}`,\n gap && `gap-${gap}`,\n alignItemsMap[alignItems],\n justifyItemsMap[justifyItems],\n justifyContentMap[justifyContent],\n className,\n )}\n >\n {children}\n </div>\n );\n};\n","import type { ElementType, HTMLAttributes, ReactNode } from 'react';\nimport cx from 'classnames';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type ColSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\nexport type ColOffset = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;\nexport type GridCols = 1 | 2 | 3 | 4 | 6 | 12;\nexport type GapSize = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16;\n\nexport interface GridProps {\n children?: ReactNode;\n cols?: GridCols;\n gap?: GapSize;\n rowGap?: GapSize;\n colGap?: GapSize;\n as?: ElementType;\n className?: string;\n}\n\nexport interface ColProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /** Výchozí šířka (mobile-first) */\n span?: ColSpan;\n sm?: ColSpan;\n md?: ColSpan;\n lg?: ColSpan;\n xl?: ColSpan;\n /** Přeskočit N sloupců od aktuální pozice (mobile-first) */\n offset?: ColOffset;\n smOffset?: ColOffset;\n mdOffset?: ColOffset;\n lgOffset?: ColOffset;\n xlOffset?: ColOffset;\n}\n\n// ─── Class maps — všechny literální stringy, Tailwind je detekuje při scanu ──\n\nconst colsMap: Record<GridCols, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 6: 'grid-cols-6',\n 12: 'grid-cols-12',\n};\n\nconst gapMap: Record<GapSize, string> = {\n 0: 'gap-0',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3',\n 4: 'gap-4',\n 5: 'gap-5',\n 6: 'gap-6',\n 8: 'gap-8',\n 10: 'gap-10',\n 12: 'gap-12',\n 16: 'gap-16',\n};\n\nconst rowGapMap: Record<GapSize, string> = {\n 0: 'gap-y-0',\n 1: 'gap-y-1',\n 2: 'gap-y-2',\n 3: 'gap-y-3',\n 4: 'gap-y-4',\n 5: 'gap-y-5',\n 6: 'gap-y-6',\n 8: 'gap-y-8',\n 10: 'gap-y-10',\n 12: 'gap-y-12',\n 16: 'gap-y-16',\n};\n\nconst colGapMap: Record<GapSize, string> = {\n 0: 'gap-x-0',\n 1: 'gap-x-1',\n 2: 'gap-x-2',\n 3: 'gap-x-3',\n 4: 'gap-x-4',\n 5: 'gap-x-5',\n 6: 'gap-x-6',\n 8: 'gap-x-8',\n 10: 'gap-x-10',\n 12: 'gap-x-12',\n 16: 'gap-x-16',\n};\n\n// Span — bez prefixu (výchozí, mobile-first)\nconst spanMap: Record<ColSpan, string> = {\n 1: 'col-span-1',\n 2: 'col-span-2',\n 3: 'col-span-3',\n 4: 'col-span-4',\n 5: 'col-span-5',\n 6: 'col-span-6',\n 7: 'col-span-7',\n 8: 'col-span-8',\n 9: 'col-span-9',\n 10: 'col-span-10',\n 11: 'col-span-11',\n 12: 'col-span-12',\n};\n\nconst smSpanMap: Record<ColSpan, string> = {\n 1: 'sm:col-span-1',\n 2: 'sm:col-span-2',\n 3: 'sm:col-span-3',\n 4: 'sm:col-span-4',\n 5: 'sm:col-span-5',\n 6: 'sm:col-span-6',\n 7: 'sm:col-span-7',\n 8: 'sm:col-span-8',\n 9: 'sm:col-span-9',\n 10: 'sm:col-span-10',\n 11: 'sm:col-span-11',\n 12: 'sm:col-span-12',\n};\n\nconst mdSpanMap: Record<ColSpan, string> = {\n 1: 'md:col-span-1',\n 2: 'md:col-span-2',\n 3: 'md:col-span-3',\n 4: 'md:col-span-4',\n 5: 'md:col-span-5',\n 6: 'md:col-span-6',\n 7: 'md:col-span-7',\n 8: 'md:col-span-8',\n 9: 'md:col-span-9',\n 10: 'md:col-span-10',\n 11: 'md:col-span-11',\n 12: 'md:col-span-12',\n};\n\nconst lgSpanMap: Record<ColSpan, string> = {\n 1: 'lg:col-span-1',\n 2: 'lg:col-span-2',\n 3: 'lg:col-span-3',\n 4: 'lg:col-span-4',\n 5: 'lg:col-span-5',\n 6: 'lg:col-span-6',\n 7: 'lg:col-span-7',\n 8: 'lg:col-span-8',\n 9: 'lg:col-span-9',\n 10: 'lg:col-span-10',\n 11: 'lg:col-span-11',\n 12: 'lg:col-span-12',\n};\n\nconst xlSpanMap: Record<ColSpan, string> = {\n 1: 'xl:col-span-1',\n 2: 'xl:col-span-2',\n 3: 'xl:col-span-3',\n 4: 'xl:col-span-4',\n 5: 'xl:col-span-5',\n 6: 'xl:col-span-6',\n 7: 'xl:col-span-7',\n 8: 'xl:col-span-8',\n 9: 'xl:col-span-9',\n 10: 'xl:col-span-10',\n 11: 'xl:col-span-11',\n 12: 'xl:col-span-12',\n};\n\n// Offset: přeskočit N sloupců → col-start-(N+1)\nconst offsetMap: Record<ColOffset, string> = {\n 1: 'col-start-2',\n 2: 'col-start-3',\n 3: 'col-start-4',\n 4: 'col-start-5',\n 5: 'col-start-6',\n 6: 'col-start-7',\n 7: 'col-start-8',\n 8: 'col-start-9',\n 9: 'col-start-10',\n 10: 'col-start-11',\n 11: 'col-start-12',\n};\n\nconst smOffsetMap: Record<ColOffset, string> = {\n 1: 'sm:col-start-2',\n 2: 'sm:col-start-3',\n 3: 'sm:col-start-4',\n 4: 'sm:col-start-5',\n 5: 'sm:col-start-6',\n 6: 'sm:col-start-7',\n 7: 'sm:col-start-8',\n 8: 'sm:col-start-9',\n 9: 'sm:col-start-10',\n 10: 'sm:col-start-11',\n 11: 'sm:col-start-12',\n};\n\nconst mdOffsetMap: Record<ColOffset, string> = {\n 1: 'md:col-start-2',\n 2: 'md:col-start-3',\n 3: 'md:col-start-4',\n 4: 'md:col-start-5',\n 5: 'md:col-start-6',\n 6: 'md:col-start-7',\n 7: 'md:col-start-8',\n 8: 'md:col-start-9',\n 9: 'md:col-start-10',\n 10: 'md:col-start-11',\n 11: 'md:col-start-12',\n};\n\nconst lgOffsetMap: Record<ColOffset, string> = {\n 1: 'lg:col-start-2',\n 2: 'lg:col-start-3',\n 3: 'lg:col-start-4',\n 4: 'lg:col-start-5',\n 5: 'lg:col-start-6',\n 6: 'lg:col-start-7',\n 7: 'lg:col-start-8',\n 8: 'lg:col-start-9',\n 9: 'lg:col-start-10',\n 10: 'lg:col-start-11',\n 11: 'lg:col-start-12',\n};\n\nconst xlOffsetMap: Record<ColOffset, string> = {\n 1: 'xl:col-start-2',\n 2: 'xl:col-start-3',\n 3: 'xl:col-start-4',\n 4: 'xl:col-start-5',\n 5: 'xl:col-start-6',\n 6: 'xl:col-start-7',\n 7: 'xl:col-start-8',\n 8: 'xl:col-start-9',\n 9: 'xl:col-start-10',\n 10: 'xl:col-start-11',\n 11: 'xl:col-start-12',\n};\n\n// ─── Components ───────────────────────────────────────────────────────────────\n\nexport const Grid = ({\n children,\n cols = 12,\n gap,\n rowGap,\n colGap,\n as: Tag = 'div',\n className,\n}: GridProps) => (\n <Tag\n className={cx(\n 'grid',\n 'w-full',\n colsMap[cols],\n gap !== undefined && gapMap[gap],\n rowGap !== undefined && rowGapMap[rowGap],\n colGap !== undefined && colGapMap[colGap],\n className,\n )}\n >\n {children}\n </Tag>\n);\n\nGrid.displayName = 'Grid';\n\nexport const Col = ({\n children,\n span,\n sm,\n md,\n lg,\n xl,\n offset,\n smOffset,\n mdOffset,\n lgOffset,\n xlOffset,\n className,\n ...rest\n}: ColProps) => (\n <div\n className={cx(\n span && spanMap[span],\n sm && smSpanMap[sm],\n md && mdSpanMap[md],\n lg && lgSpanMap[lg],\n xl && xlSpanMap[xl],\n offset && offsetMap[offset],\n smOffset && smOffsetMap[smOffset],\n mdOffset && mdOffsetMap[mdOffset],\n lgOffset && lgOffsetMap[lgOffset],\n xlOffset && xlOffsetMap[xlOffset],\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n);\n\nCol.displayName = 'Col';\n","import { useEffect, useId, useRef, useState } from 'react';\nimport clx from 'classnames';\n\nexport interface QuantityInputProps {\n value: number;\n onChange: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n disabled?: boolean;\n label?: string;\n error?: string;\n hint?: string;\n id?: string;\n className?: string;\n}\n\nexport const QuantityInput = ({\n value,\n onChange,\n min = 1,\n max = 999,\n step = 1,\n disabled = false,\n label,\n error,\n hint,\n id,\n className,\n}: QuantityInputProps) => {\n const generatedId = useId();\n const inputId = id ?? generatedId;\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Lokální string stav — umožňuje volné psaní, clamping proběhne při blur\n const [inputValue, setInputValue] = useState(String(value));\n\n // Synchronizace při změně value zvenčí (controlled)\n useEffect(() => {\n if (document.activeElement !== inputRef.current) {\n setInputValue(String(value));\n }\n }, [value]);\n\n const clamp = (n: number) => Math.min(max, Math.max(min, n));\n\n const commitValue = (raw: string) => {\n const parsed = parseInt(raw, 10);\n const next = isNaN(parsed) ? value : clamp(parsed);\n setInputValue(String(next));\n if (next !== value) onChange(next);\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const raw = e.target.value.replace(/[^0-9]/g, '');\n setInputValue(raw);\n // Průběžně volej onChange jen pokud je platné číslo\n const parsed = parseInt(raw, 10);\n if (!isNaN(parsed)) onChange(clamp(parsed));\n };\n\n const handleBlur = () => commitValue(inputValue);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n commitValue(inputValue);\n inputRef.current?.blur();\n return;\n }\n // Blokuj vše kromě číslic a ovládacích kláves\n const allowed = [\n 'Backspace', 'Delete', 'Tab', 'Escape',\n 'ArrowLeft', 'ArrowRight', 'Home', 'End',\n ];\n if (!allowed.includes(e.key) && !/^[0-9]$/.test(e.key) && !e.metaKey && !e.ctrlKey) {\n e.preventDefault();\n }\n };\n\n const decrement = () => onChange(clamp(value - step));\n const increment = () => onChange(clamp(value + step));\n\n const canDecrement = value - step >= min;\n const canIncrement = value + step <= max;\n\n return (\n <div className={clx('quantity-input-wrapper', className)}>\n {label && (\n <label htmlFor={inputId} className=\"input-label\">\n {label}\n </label>\n )}\n\n <div className={clx('quantity-input', error && 'has-error', disabled && 'is-disabled')}>\n <button\n type=\"button\"\n className=\"quantity-btn\"\n onClick={decrement}\n disabled={disabled || !canDecrement}\n aria-label=\"Snížit množství\"\n tabIndex={-1}\n >\n <MinusIcon />\n </button>\n\n <input\n ref={inputRef}\n id={inputId}\n type=\"text\"\n inputMode=\"numeric\"\n className=\"quantity-field\"\n value={inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n aria-label={label ?? 'Množství'}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n />\n\n <button\n type=\"button\"\n className=\"quantity-btn\"\n onClick={increment}\n disabled={disabled || !canIncrement}\n aria-label=\"Zvýšit množství\"\n tabIndex={-1}\n >\n <PlusIcon />\n </button>\n </div>\n\n {(error || hint) && (\n <p className={clx('helper-text', error && 'has-error')}>{error ?? hint}</p>\n )}\n </div>\n );\n};\n\nQuantityInput.displayName = 'QuantityInput';\n\nconst MinusIcon = () => (\n <svg width=\"12\" height=\"2\" viewBox=\"0 0 12 2\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M1 1H11\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n);\n\nconst PlusIcon = () => (\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M6 1V11M1 6H11\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n);\n","'use client';\n\nimport type { ButtonHTMLAttributes } from 'react';\nimport clx from 'classnames';\n\nexport interface PaginationProps {\n page: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n siblingsCount?: number;\n}\n\nconst range = (start: number, end: number) =>\n Array.from({ length: end - start + 1 }, (_, i) => start + i);\n\nconst buildPages = (\n page: number,\n totalPages: number,\n siblings: number,\n): (number | '…')[] => {\n const totalNumbers = siblings * 2 + 5;\n\n if (totalPages <= totalNumbers) return range(1, totalPages);\n\n const leftSibling = Math.max(page - siblings, 1);\n const rightSibling = Math.min(page + siblings, totalPages);\n const showLeftDots = leftSibling > 2;\n const showRightDots = rightSibling < totalPages - 1;\n\n if (!showLeftDots && showRightDots) {\n const leftRange = range(1, 3 + siblings * 2);\n return [...leftRange, '…', totalPages];\n }\n\n if (showLeftDots && !showRightDots) {\n const rightRange = range(totalPages - (2 + siblings * 2), totalPages);\n return [1, '…', ...rightRange];\n }\n\n return [1, '…', ...range(leftSibling, rightSibling), '…', totalPages];\n};\n\nconst PageButton = ({\n active,\n disabled,\n children,\n ...props\n}: ButtonHTMLAttributes<HTMLButtonElement> & { active?: boolean }) => {\n return (\n <button\n disabled={disabled}\n className={clx(\n 'pagination-button',\n `pagination-button-${active ? 'active' : 'inactive'}`,\n )}\n {...props}\n >\n {children}\n </button>\n );\n};\n\nexport const Pagination = ({\n page,\n totalPages,\n onPageChange,\n siblingsCount = 1,\n}: PaginationProps) => {\n const pages = buildPages(page, totalPages, siblingsCount);\n\n return (\n <nav aria-label=\"Pagination\" className=\"pagination\">\n <PageButton\n disabled={page <= 1}\n onClick={() => onPageChange(page - 1)}\n aria-label=\"Previous page\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15.75 19.5L8.25 12l7.5-7.5\"\n />\n </svg>\n </PageButton>\n\n {pages.map((p, i) =>\n p === '…' ? (\n <span key={`dots-${i}`} className=\"pagination-dots\">\n …\n </span>\n ) : (\n <PageButton\n key={p}\n active={p === page}\n onClick={() => onPageChange(p)}\n aria-label={`Page ${p}`}\n aria-current={p === page ? 'page' : undefined}\n >\n {p}\n </PageButton>\n ),\n )}\n\n <PageButton\n disabled={page >= totalPages}\n onClick={() => onPageChange(page + 1)}\n aria-label=\"Next page\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"\n />\n </svg>\n </PageButton>\n </nav>\n );\n};\n","/**\n * SSR Window 5.0.1\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2025, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: June 27, 2025\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;\n}\nfunction extend(target = {}, src = {}) {\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n Object.keys(src).filter(key => noExtend.indexOf(key) < 0).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\nconst ssrDocument = {\n body: {},\n addEventListener() {},\n removeEventListener() {},\n activeElement: {\n blur() {},\n nodeName: ''\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() {}\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() {},\n getElementsByTagName() {\n return [];\n }\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n }\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: ''\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n },\n history: {\n replaceState() {},\n pushState() {},\n go() {},\n back() {}\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() {},\n removeEventListener() {},\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n }\n };\n },\n Image() {},\n Date() {},\n screen: {},\n setTimeout() {},\n clearTimeout() {},\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n }\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { getWindow as a, getDocument as g };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\n\nfunction classesToTokens(classes = '') {\n return classes.trim().split(' ').filter(c => !!c.trim());\n}\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {\n // no getter for object\n }\n try {\n delete object[key];\n } catch (e) {\n // something got wrong\n }\n });\n}\nfunction nextTick(callback, delay = 0) {\n return setTimeout(callback, delay);\n}\nfunction now() {\n return Date.now();\n}\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n if (!style) {\n style = el.style;\n }\n return style;\n}\nfunction getTranslate(el, axis = 'x') {\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n return curTransform || 0;\n}\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\nfunction extend(...args) {\n const to = Object(args[0]);\n for (let i = 1; i < args.length; i += 1) {\n const nextSource = args[i];\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => key !== '__proto__' && key !== 'constructor' && key !== 'prototype');\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n}\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\nfunction animateCSSModeScroll({\n swiper,\n targetPosition,\n side\n}) {\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n const animate = () => {\n time = new Date().getTime();\n if (startTime === null) {\n startTime = time;\n }\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n animate();\n}\nfunction getSlideTransformEl(slideEl) {\n return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl;\n}\nfunction elementChildren(element, selector = '') {\n const window = getWindow();\n const children = [...element.children];\n if (window.HTMLSlotElement && element instanceof HTMLSlotElement) {\n children.push(...element.assignedElements());\n }\n if (!selector) {\n return children;\n }\n return children.filter(el => el.matches(selector));\n}\nfunction elementIsChildOfSlot(el, slot) {\n // Breadth-first search through all parent's children and assigned elements\n const elementsQueue = [slot];\n while (elementsQueue.length > 0) {\n const elementToCheck = elementsQueue.shift();\n if (el === elementToCheck) {\n return true;\n }\n elementsQueue.push(...elementToCheck.children, ...(elementToCheck.shadowRoot ? elementToCheck.shadowRoot.children : []), ...(elementToCheck.assignedElements ? elementToCheck.assignedElements() : []));\n }\n}\nfunction elementIsChildOf(el, parent) {\n const window = getWindow();\n let isChild = parent.contains(el);\n if (!isChild && window.HTMLSlotElement && parent instanceof HTMLSlotElement) {\n const children = [...parent.assignedElements()];\n isChild = children.includes(el);\n if (!isChild) {\n isChild = elementIsChildOfSlot(el, parent);\n }\n }\n return isChild;\n}\nfunction showWarning(text) {\n try {\n console.warn(text);\n return;\n } catch (err) {\n // err\n }\n}\nfunction createElement(tag, classes = []) {\n const el = document.createElement(tag);\n el.classList.add(...(Array.isArray(classes) ? classes : classesToTokens(classes)));\n return el;\n}\nfunction elementOffset(el) {\n const window = getWindow();\n const document = getDocument();\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n}\nfunction elementPrevAll(el, selector) {\n const prevEls = [];\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n if (selector) {\n if (prev.matches(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n el = prev;\n }\n return prevEls;\n}\nfunction elementNextAll(el, selector) {\n const nextEls = [];\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n if (selector) {\n if (next.matches(selector)) nextEls.push(next);\n } else nextEls.push(next);\n el = next;\n }\n return nextEls;\n}\nfunction elementStyle(el, prop) {\n const window = getWindow();\n return window.getComputedStyle(el, null).getPropertyValue(prop);\n}\nfunction elementIndex(el) {\n let child = el;\n let i;\n if (child) {\n i = 0;\n // eslint-disable-next-line\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n return i;\n }\n return undefined;\n}\nfunction elementParents(el, selector) {\n const parents = []; // eslint-disable-line\n let parent = el.parentElement; // eslint-disable-line\n while (parent) {\n if (selector) {\n if (parent.matches(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n parent = parent.parentElement;\n }\n return parents;\n}\nfunction elementTransitionEnd(el, callback) {\n function fireCallBack(e) {\n if (e.target !== el) return;\n callback.call(el, e);\n el.removeEventListener('transitionend', fireCallBack);\n }\n if (callback) {\n el.addEventListener('transitionend', fireCallBack);\n }\n}\nfunction elementOuterSize(el, size, includeMargins) {\n const window = getWindow();\n if (includeMargins) {\n return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom'));\n }\n return el.offsetWidth;\n}\nfunction makeElementsArray(el) {\n return (Array.isArray(el) ? el : [el]).filter(e => !!e);\n}\nfunction getRotateFix(swiper) {\n return v => {\n if (Math.abs(v) > 0 && swiper.browser && swiper.browser.need3dFix && Math.abs(v) % 90 === 0) {\n return v + 0.001;\n }\n return v;\n };\n}\nfunction setInnerHTML(el, html = '') {\n if (typeof trustedTypes !== 'undefined') {\n el.innerHTML = trustedTypes.createPolicy('html', {\n createHTML: s => s\n }).createHTML(html);\n } else {\n el.innerHTML = html;\n }\n}\n\nexport { getRotateFix as a, setCSSProperty as b, createElement as c, elementParents as d, elementChildren as e, elementOffset as f, getSlideTransformEl as g, now as h, elementOuterSize as i, elementIndex as j, classesToTokens as k, getTranslate as l, makeElementsArray as m, nextTick as n, elementTransitionEnd as o, isObject as p, elementStyle as q, elementNextAll as r, setInnerHTML as s, elementPrevAll as t, animateCSSModeScroll as u, showWarning as v, elementIsChildOf as w, extend as x, deleteProps as y };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\nimport { d as elementParents, q as elementStyle, e as elementChildren, b as setCSSProperty, i as elementOuterSize, r as elementNextAll, t as elementPrevAll, l as getTranslate, u as animateCSSModeScroll, n as nextTick, v as showWarning, c as createElement, w as elementIsChildOf, h as now, x as extend, j as elementIndex, y as deleteProps } from './utils.mjs';\n\nlet support;\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch)\n };\n}\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n return support;\n}\n\nlet deviceCached;\nfunction calcDevice({\n userAgent\n} = {}) {\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n let ipad = ua.match(/(iPad)(?!\\1).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel';\n\n // iPadOs 13 fix\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n }\n\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n\n // Export object\n return device;\n}\nfunction getDevice(overrides = {}) {\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n return deviceCached;\n}\n\nlet browser;\nfunction calcBrowser() {\n const window = getWindow();\n const device = getDevice();\n let needPerspectiveFix = false;\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n if (isSafari()) {\n const ua = String(window.navigator.userAgent);\n if (ua.includes('Version/')) {\n const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));\n needPerspectiveFix = major < 16 || major === 16 && minor < 2;\n }\n }\n const isWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent);\n const isSafariBrowser = isSafari();\n const need3dFix = isSafariBrowser || isWebView && device.ios;\n return {\n isSafari: needPerspectiveFix || isSafariBrowser,\n needPerspectiveFix,\n need3dFix,\n isWebView\n };\n}\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n return browser;\n}\n\nfunction Resize({\n swiper,\n on,\n emit\n}) {\n const window = getWindow();\n let observer = null;\n let animationFrame = null;\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n animationFrame = window.requestAnimationFrame(() => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(({\n contentBoxSize,\n contentRect,\n target\n }) => {\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n });\n observer.observe(swiper.el);\n };\n const removeObserver = () => {\n if (animationFrame) {\n window.cancelAnimationFrame(animationFrame);\n }\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}\n\nfunction Observer({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const observers = [];\n const window = getWindow();\n const attach = (target, options = {}) => {\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (swiper.__preventObserver__) return;\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: swiper.isElement || (typeof options.childList === 'undefined' ? true : options).childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n const init = () => {\n if (!swiper.params.observer) return;\n if (swiper.params.observeParents) {\n const containerParents = elementParents(swiper.hostEl);\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n }\n // Observe container\n attach(swiper.hostEl, {\n childList: swiper.params.observeSlideChildren\n });\n\n // Observe wrapper\n attach(swiper.wrapperEl, {\n attributes: false\n });\n };\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}\n\n/* eslint-disable no-underscore-dangle */\n\nvar eventsEmitter = {\n on(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n once(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n function onceHandler(...args) {\n self.off(events, onceHandler);\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n handler.apply(self, args);\n }\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n onAny(handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n return self;\n },\n offAny(handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n return self;\n },\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n emit(...args) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n};\n\nfunction updateSize() {\n const swiper = this;\n let width;\n let height;\n const el = swiper.el;\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = el.clientWidth;\n }\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = el.clientHeight;\n }\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n }\n\n // Subtract paddings\n width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);\n height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}\n\nfunction updateSlides() {\n const swiper = this;\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0);\n }\n const params = swiper.params;\n const {\n wrapperEl,\n slidesEl,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n let offsetAfter = params.slidesOffsetAfter;\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n const swiperSize = swiper.size - offsetBefore - offsetAfter;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n if (typeof swiperSize === 'undefined') {\n return;\n }\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n swiper.virtualSize = -spaceBetween - offsetBefore - offsetAfter;\n\n // reset margins\n slides.forEach(slideEl => {\n if (rtl) {\n slideEl.style.marginLeft = '';\n } else {\n slideEl.style.marginRight = '';\n }\n slideEl.style.marginBottom = '';\n slideEl.style.marginTop = '';\n });\n\n // reset cssMode offsets\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');\n }\n\n // set cssMode offsets\n if (params.cssMode) {\n setCSSProperty(wrapperEl, '--swiper-slides-offset-before', `${offsetBefore}px`);\n setCSSProperty(wrapperEl, '--swiper-slides-offset-after', `${offsetAfter}px`);\n }\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n if (gridEnabled) {\n swiper.grid.initSlides(slides);\n } else if (swiper.grid) {\n swiper.grid.unsetSlides();\n }\n\n // Calc slides\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n const slide = slides[i];\n if (slide) {\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slides);\n }\n if (elementStyle(slide, 'display') === 'none') continue; // eslint-disable-line\n }\n\n if (isVirtual && params.slidesPerView === 'auto') {\n if (params.virtual.slidesPerViewAutoSlideSize) {\n slideSize = params.virtual.slidesPerViewAutoSlideSize;\n }\n if (slideSize && slide) {\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n slide.style[swiper.getDirectionLabel('width')] = `${slideSize}px`;\n }\n } else if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slide.style[swiper.getDirectionLabel('width')] = ``;\n }\n const slideStyles = getComputedStyle(slide);\n const currentTransform = slide.style.transform;\n const currentWebKitTransform = slide.style.webkitTransform;\n if (currentTransform) {\n slide.style.transform = 'none';\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = 'none';\n }\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? elementOuterSize(slide, 'width', true) : elementOuterSize(slide, 'height', true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide;\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n if (currentTransform) {\n slide.style.transform = currentTransform;\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = currentWebKitTransform;\n }\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n if (slide) {\n slide.style[swiper.getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n if (slide) {\n slide.swiperSlideSize = slideSize;\n }\n slidesSizesGrid.push(slideSize);\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (params.setWrapperSize) {\n wrapperEl.style[swiper.getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid);\n }\n\n // Remove last grid elements depending on width\n if (!params.centeredSlides) {\n // Check if snapToSlideEdge should be applied\n const isFractionalSlidesPerView = params.slidesPerView !== 'auto' && params.slidesPerView % 1 !== 0;\n const shouldSnapToSlideEdge = params.snapToSlideEdge && !params.loop && (params.slidesPerView === 'auto' || isFractionalSlidesPerView);\n\n // Calculate the last allowed snap index when snapToSlideEdge is enabled\n // This ensures minimum slides are visible at the end\n let lastAllowedSnapIndex = snapGrid.length;\n if (shouldSnapToSlideEdge) {\n let minVisibleSlides;\n if (params.slidesPerView === 'auto') {\n // For 'auto' mode, calculate how many slides fit based on actual sizes\n minVisibleSlides = 1;\n let accumulatedSize = 0;\n for (let i = slidesSizesGrid.length - 1; i >= 0; i -= 1) {\n accumulatedSize += slidesSizesGrid[i] + (i < slidesSizesGrid.length - 1 ? spaceBetween : 0);\n if (accumulatedSize <= swiperSize) {\n minVisibleSlides = slidesSizesGrid.length - i;\n } else {\n break;\n }\n }\n } else {\n minVisibleSlides = Math.floor(params.slidesPerView);\n }\n lastAllowedSnapIndex = Math.max(slidesLength - minVisibleSlides, 0);\n }\n const newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (shouldSnapToSlideEdge) {\n // When snapToSlideEdge is enabled, only keep snaps up to lastAllowedSnapIndex\n if (i <= lastAllowedSnapIndex) {\n newSlidesGrid.push(slidesGridItem);\n }\n } else if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n // When snapToSlideEdge is disabled, keep snaps that fit within scrollable area\n newSlidesGrid.push(slidesGridItem);\n }\n }\n snapGrid = newSlidesGrid;\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n // Only add edge-aligned snap if snapToSlideEdge is not enabled\n if (!shouldSnapToSlideEdge) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n }\n if (isVirtual && params.loop) {\n const size = slidesSizesGrid[0] + spaceBetween;\n if (params.slidesPerGroup > 1) {\n const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);\n const groupSize = size * params.slidesPerGroup;\n for (let i = 0; i < groups; i += 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);\n }\n }\n for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {\n if (params.slidesPerGroup === 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + size);\n }\n slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);\n swiper.virtualSize += size;\n }\n }\n if (snapGrid.length === 0) snapGrid = [0];\n if (spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : swiper.getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode || params.loop) return true;\n if (slideIndex === slides.length - 1) {\n return false;\n }\n return true;\n }).forEach(slideEl => {\n slideEl.style[key] = `${spaceBetween}px`;\n });\n }\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n const maxSnap = allSlidesSize > swiperSize ? allSlidesSize - swiperSize : 0;\n snapGrid = snapGrid.map(snap => {\n if (snap <= 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n swiper.emit('slidesUpdated');\n if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {\n const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;\n const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);\n if (slidesLength <= params.maxBackfaceHiddenSlides) {\n if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);\n } else if (hasClassBackfaceClassAdded) {\n swiper.el.classList.remove(backFaceHiddenClass);\n }\n }\n}\n\nfunction updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides[swiper.getSlideIndexByData(index)];\n }\n return swiper.slides[index];\n };\n // Find slides currently in view\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n (swiper.visibleSlides || []).forEach(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n }\n\n // Find new height from highest slide in view\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n\n // Update Height\n if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;\n}\n\nfunction updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n // eslint-disable-next-line\n const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment();\n }\n}\n\nconst toggleSlideClasses$1 = (slideEl, condition, className) => {\n if (condition && !slideEl.classList.contains(className)) {\n slideEl.classList.add(className);\n } else if (!condition && slideEl.classList.contains(className)) {\n slideEl.classList.remove(className);\n }\n};\nfunction updateSlidesProgress(translate = this && this.translate || 0) {\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate;\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n let spaceBetween = params.spaceBetween;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isFullyVisible = slideBefore >= 0 && slideBefore <= swiper.size - swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n }\n toggleSlideClasses$1(slide, isVisible, params.slideVisibleClass);\n toggleSlideClasses$1(slide, isFullyVisible, params.slideFullyVisibleClass);\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n}\n\nfunction updateProgress(translate) {\n const swiper = this;\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1;\n // eslint-disable-next-line\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd,\n progressLoop\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;\n const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;\n isBeginning = isBeginningRounded || progress <= 0;\n isEnd = isEndRounded || progress >= 1;\n if (isBeginningRounded) progress = 0;\n if (isEndRounded) progress = 1;\n }\n if (params.loop) {\n const firstSlideIndex = swiper.getSlideIndexByData(0);\n const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);\n const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];\n const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];\n const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];\n const translateAbs = Math.abs(translate);\n if (translateAbs >= firstSlideTranslate) {\n progressLoop = (translateAbs - firstSlideTranslate) / translateMax;\n } else {\n progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;\n }\n if (progressLoop > 1) progressLoop -= 1;\n }\n Object.assign(swiper, {\n progress,\n progressLoop,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n swiper.emit('progress', progress);\n}\n\nconst toggleSlideClasses = (slideEl, condition, className) => {\n if (condition && !slideEl.classList.contains(className)) {\n slideEl.classList.add(className);\n } else if (!condition && slideEl.classList.contains(className)) {\n slideEl.classList.remove(className);\n }\n};\nfunction updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n slidesEl,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n const getFilteredSlide = selector => {\n return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];\n };\n let activeSlide;\n let prevSlide;\n let nextSlide;\n if (isVirtual) {\n if (params.loop) {\n let slideIndex = activeIndex - swiper.virtual.slidesBefore;\n if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;\n if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${slideIndex}\"]`);\n } else {\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${activeIndex}\"]`);\n }\n } else {\n if (gridEnabled) {\n activeSlide = slides.find(slideEl => slideEl.column === activeIndex);\n nextSlide = slides.find(slideEl => slideEl.column === activeIndex + 1);\n prevSlide = slides.find(slideEl => slideEl.column === activeIndex - 1);\n } else {\n activeSlide = slides[activeIndex];\n }\n }\n if (activeSlide) {\n if (!gridEnabled) {\n // Next Slide\n nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !nextSlide) {\n nextSlide = slides[0];\n }\n\n // Prev Slide\n prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !prevSlide === 0) {\n prevSlide = slides[slides.length - 1];\n }\n }\n }\n slides.forEach(slideEl => {\n toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);\n toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);\n toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);\n });\n swiper.emitSlidesClasses();\n}\n\nconst processLazyPreloader = (swiper, imageEl) => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;\n const slideEl = imageEl.closest(slideSelector());\n if (slideEl) {\n let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (!lazyEl && swiper.isElement) {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n } else {\n // init later\n requestAnimationFrame(() => {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (lazyEl && !lazyEl.lazyPreloaderManaged) lazyEl.remove();\n }\n });\n }\n }\n // Skip removal if managed by React/Vue component\n if (lazyEl && !lazyEl.lazyPreloaderManaged) lazyEl.remove();\n }\n};\nconst unlazy = (swiper, index) => {\n if (!swiper.slides[index]) return;\n const imageEl = swiper.slides[index].querySelector('[loading=\"lazy\"]');\n if (imageEl) imageEl.removeAttribute('loading');\n};\nconst preload = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n let amount = swiper.params.lazyPreloadPrevNext;\n const len = swiper.slides.length;\n if (!len || !amount || amount < 0) return;\n amount = Math.min(amount, len);\n const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);\n const activeIndex = swiper.activeIndex;\n if (swiper.params.grid && swiper.params.grid.rows > 1) {\n const activeColumn = activeIndex;\n const preloadColumns = [activeColumn - amount];\n preloadColumns.push(...Array.from({\n length: amount\n }).map((_, i) => {\n return activeColumn + slidesPerView + i;\n }));\n swiper.slides.forEach((slideEl, i) => {\n if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);\n });\n return;\n }\n const slideIndexLastInView = activeIndex + slidesPerView - 1;\n if (swiper.params.rewind || swiper.params.loop) {\n for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {\n const realIndex = (i % len + len) % len;\n if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);\n }\n } else {\n for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {\n if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {\n unlazy(swiper, i);\n }\n }\n }\n};\n\nfunction getActiveIndexByTranslate(swiper) {\n const {\n slidesGrid,\n params\n } = swiper;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n let activeIndex;\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n }\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n return activeIndex;\n}\nfunction updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n const getVirtualRealIndex = aIndex => {\n let realIndex = aIndex - swiper.virtual.slidesBefore;\n if (realIndex < 0) {\n realIndex = swiper.virtual.slides.length + realIndex;\n }\n if (realIndex >= swiper.virtual.slides.length) {\n realIndex -= swiper.virtual.slides.length;\n }\n return realIndex;\n };\n if (typeof activeIndex === 'undefined') {\n activeIndex = getActiveIndexByTranslate(swiper);\n }\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n if (activeIndex === previousIndex && !swiper.params.loop) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n return;\n }\n if (activeIndex === previousIndex && swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.realIndex = getVirtualRealIndex(activeIndex);\n return;\n }\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n\n // Get real index\n let realIndex;\n if (swiper.virtual && params.virtual.enabled) {\n if (params.loop) {\n realIndex = getVirtualRealIndex(activeIndex);\n } else {\n realIndex = activeIndex;\n }\n } else if (gridEnabled) {\n const firstSlideInColumn = swiper.slides.find(slideEl => slideEl.column === activeIndex);\n let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);\n if (Number.isNaN(activeSlideIndex)) {\n activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);\n }\n realIndex = Math.floor(activeSlideIndex / params.grid.rows);\n } else if (swiper.slides[activeIndex]) {\n const slideIndex = swiper.slides[activeIndex].getAttribute('data-swiper-slide-index');\n if (slideIndex) {\n realIndex = parseInt(slideIndex, 10);\n } else {\n realIndex = activeIndex;\n }\n } else {\n realIndex = activeIndex;\n }\n Object.assign(swiper, {\n previousSnapIndex,\n snapIndex,\n previousRealIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n if (swiper.initialized) {\n preload(swiper);\n }\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n swiper.emit('slideChange');\n }\n}\n\nfunction updateClickedSlide(el, path) {\n const swiper = this;\n const params = swiper.params;\n let slide = el.closest(`.${params.slideClass}, swiper-slide`);\n if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) {\n [...path.slice(path.indexOf(el) + 1, path.length)].forEach(pathEl => {\n if (!slide && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {\n slide = pathEl;\n }\n });\n }\n let slideFound = false;\n let slideIndex;\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}\n\nvar update = {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};\n\nfunction getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n wrapperEl\n } = swiper;\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n if (params.cssMode) {\n return translate;\n }\n let currentTranslate = getTranslate(wrapperEl, axis);\n currentTranslate += swiper.cssOverflowAdjustment();\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}\n\nfunction setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y;\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n if (swiper.isHorizontal()) {\n x -= swiper.cssOverflowAdjustment();\n } else {\n y -= swiper.cssOverflowAdjustment();\n }\n wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;\n }\n\n // Check if we need to update progress\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n swiper.emit('setTranslate', swiper.translate, byController);\n}\n\nfunction minTranslate() {\n return -this.snapGrid[0];\n}\n\nfunction maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}\n\nfunction translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;\n\n // Update progress\n swiper.updateProgress(newTranslate);\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n return true;\n }\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n swiper.animating = false;\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n return true;\n}\n\nvar translate = {\n getTranslate: getSwiperTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};\n\nfunction setTransition(duration, byController) {\n const swiper = this;\n if (!swiper.params.cssMode) {\n swiper.wrapperEl.style.transitionDuration = `${duration}ms`;\n swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : '';\n }\n swiper.emit('setTransition', duration, byController);\n}\n\nfunction transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step\n}) {\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n swiper.emit(`transition${step}`);\n if (runCallbacks && dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n } else if (runCallbacks && activeIndex !== previousIndex) {\n swiper.emit(`slideChangeTransition${step}`);\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}\n\nfunction transitionStart(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}\n\nfunction transitionEnd(runCallbacks = true, direction) {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}\n\nvar transition = {\n setTransition,\n transitionStart,\n transitionEnd\n};\n\nfunction slideTo(index = 0, speed, runCallbacks = true, internal, initial) {\n if (typeof index === 'string') {\n index = parseInt(index, 10);\n }\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n if (typeof speed === 'undefined') {\n speed = swiper.params.speed;\n }\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n const translate = -snapGrid[snapIndex];\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n }\n // Directions locks\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) {\n return false;\n }\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) {\n return false;\n }\n }\n }\n if (slideIndex !== (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n // Update progress\n swiper.updateProgress(translate);\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';\n\n // initial virtual\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n const isInitialVirtual = isVirtual && initial;\n // Update Index\n if (!isInitialVirtual && (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate)) {\n swiper.updateActiveIndex(slideIndex);\n // Update Height\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n swiper.updateSlidesClasses();\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n return false;\n }\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n if (speed === 0) {\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {\n swiper._cssModeVirtualInitialSet = true;\n requestAnimationFrame(() => {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n });\n } else {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n }\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._immediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n return true;\n }\n const browser = getBrowser();\n const isSafari = browser.isSafari;\n if (isVirtual && !initial && isSafari && swiper.isElement) {\n swiper.virtual.update(false, false, slideIndex);\n }\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n }\n return true;\n}\n\nfunction slideToLoop(index = 0, speed, runCallbacks = true, internal) {\n if (typeof index === 'string') {\n const indexAsNumber = parseInt(index, 10);\n index = indexAsNumber;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n if (typeof speed === 'undefined') {\n speed = swiper.params.speed;\n }\n const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;\n let newIndex = index;\n if (swiper.params.loop) {\n if (swiper.virtual && swiper.params.virtual.enabled) {\n // eslint-disable-next-line\n newIndex = newIndex + swiper.virtual.slidesBefore;\n } else {\n let targetSlideIndex;\n if (gridEnabled) {\n const slideIndex = newIndex * swiper.params.grid.rows;\n targetSlideIndex = swiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex).column;\n } else {\n targetSlideIndex = swiper.getSlideIndexByData(newIndex);\n }\n const cols = gridEnabled ? Math.ceil(swiper.slides.length / swiper.params.grid.rows) : swiper.slides.length;\n const {\n centeredSlides,\n slidesOffsetBefore,\n slidesOffsetAfter\n } = swiper.params;\n const bothDirections = centeredSlides || !!slidesOffsetBefore || !!slidesOffsetAfter;\n let slidesPerView = swiper.params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = swiper.slidesPerViewDynamic();\n } else {\n slidesPerView = Math.ceil(parseFloat(swiper.params.slidesPerView, 10));\n if (bothDirections && slidesPerView % 2 === 0) {\n slidesPerView = slidesPerView + 1;\n }\n }\n let needLoopFix = cols - targetSlideIndex < slidesPerView;\n if (bothDirections) {\n needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);\n }\n if (internal && bothDirections && swiper.params.slidesPerView !== 'auto' && !gridEnabled) {\n needLoopFix = false;\n }\n if (needLoopFix) {\n const direction = bothDirections ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';\n swiper.loopFix({\n direction,\n slideTo: true,\n activeSlideIndex: direction === 'next' ? targetSlideIndex + 1 : targetSlideIndex - cols + 1,\n slideRealIndex: direction === 'next' ? swiper.realIndex : undefined\n });\n }\n if (gridEnabled) {\n const slideIndex = newIndex * swiper.params.grid.rows;\n newIndex = swiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex).column;\n } else {\n newIndex = swiper.getSlideIndexByData(newIndex);\n }\n }\n }\n requestAnimationFrame(() => {\n swiper.slideTo(newIndex, speed, runCallbacks, internal);\n });\n return swiper;\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideNext(speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n enabled,\n params,\n animating\n } = swiper;\n if (!enabled || swiper.destroyed) return swiper;\n if (typeof speed === 'undefined') {\n speed = swiper.params.speed;\n }\n let perGroup = params.slidesPerGroup;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'next'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n });\n return true;\n }\n }\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slidePrev(speed, runCallbacks = true, internal) {\n const swiper = this;\n const {\n params,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled,\n animating\n } = swiper;\n if (!enabled || swiper.destroyed) return swiper;\n if (typeof speed === 'undefined') {\n speed = swiper.params.speed;\n }\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'prev'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n }\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n const isFreeMode = params.freeMode && params.freeMode.enabled;\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n if (typeof prevSnap === 'undefined' && (params.cssMode || isFreeMode)) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = isFreeMode ? snapGrid[prevSnapIndex] : snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n let prevIndex = 0;\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n if (params.rewind && swiper.isBeginning) {\n const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n return swiper.slideTo(lastIndex, speed, runCallbacks, internal);\n } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n });\n return true;\n }\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideReset(speed, runCallbacks = true, internal) {\n const swiper = this;\n if (swiper.destroyed) return;\n if (typeof speed === 'undefined') {\n speed = swiper.params.speed;\n }\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideToClosest(speed, runCallbacks = true, internal, threshold = 0.5) {\n const swiper = this;\n if (swiper.destroyed) return;\n if (typeof speed === 'undefined') {\n speed = swiper.params.speed;\n }\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}\n\nfunction slideToClickedSlide() {\n const swiper = this;\n if (swiper.destroyed) return;\n const {\n params,\n slidesEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.getSlideIndexWhenGrid(swiper.clickedIndex);\n let realIndex;\n const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;\n const isGrid = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);\n if (params.centeredSlides) {\n swiper.slideToLoop(realIndex);\n } else if (slideToIndex > (isGrid ? (swiper.slides.length - slidesPerView) / 2 - (swiper.params.grid.rows - 1) : swiper.slides.length - slidesPerView)) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}\n\nvar slide = {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};\n\nfunction loopCreate(slideRealIndex, initial) {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n const initSlides = () => {\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n slides.forEach((el, index) => {\n el.setAttribute('data-swiper-slide-index', index);\n });\n };\n const clearBlankSlides = () => {\n const slides = elementChildren(slidesEl, `.${params.slideBlankClass}`);\n slides.forEach(el => {\n el.remove();\n });\n if (slides.length > 0) {\n swiper.recalcSlides();\n swiper.updateSlides();\n }\n };\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n if (params.loopAddBlankSlides && (params.slidesPerGroup > 1 || gridEnabled)) {\n clearBlankSlides();\n }\n const slidesPerGroup = params.slidesPerGroup * (gridEnabled ? params.grid.rows : 1);\n const shouldFillGroup = swiper.slides.length % slidesPerGroup !== 0;\n const shouldFillGrid = gridEnabled && swiper.slides.length % params.grid.rows !== 0;\n const addBlankSlides = amountOfSlides => {\n for (let i = 0; i < amountOfSlides; i += 1) {\n const slideEl = swiper.isElement ? createElement('swiper-slide', [params.slideBlankClass]) : createElement('div', [params.slideClass, params.slideBlankClass]);\n swiper.slidesEl.append(slideEl);\n }\n };\n if (shouldFillGroup) {\n if (params.loopAddBlankSlides) {\n const slidesToAdd = slidesPerGroup - swiper.slides.length % slidesPerGroup;\n addBlankSlides(slidesToAdd);\n swiper.recalcSlides();\n swiper.updateSlides();\n } else {\n showWarning('Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');\n }\n initSlides();\n } else if (shouldFillGrid) {\n if (params.loopAddBlankSlides) {\n const slidesToAdd = params.grid.rows - swiper.slides.length % params.grid.rows;\n addBlankSlides(slidesToAdd);\n swiper.recalcSlides();\n swiper.updateSlides();\n } else {\n showWarning('Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');\n }\n initSlides();\n } else {\n initSlides();\n }\n const bothDirections = params.centeredSlides || !!params.slidesOffsetBefore || !!params.slidesOffsetAfter;\n swiper.loopFix({\n slideRealIndex,\n direction: bothDirections ? undefined : 'next',\n initial\n });\n}\n\nfunction loopFix({\n slideRealIndex,\n slideTo = true,\n direction,\n setTranslate,\n activeSlideIndex,\n initial,\n byController,\n byMousewheel\n} = {}) {\n const swiper = this;\n if (!swiper.params.loop) return;\n swiper.emit('beforeLoopFix');\n const {\n slides,\n allowSlidePrev,\n allowSlideNext,\n slidesEl,\n params\n } = swiper;\n const {\n centeredSlides,\n slidesOffsetBefore,\n slidesOffsetAfter,\n initialSlide\n } = params;\n const bothDirections = centeredSlides || !!slidesOffsetBefore || !!slidesOffsetAfter;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n if (swiper.virtual && params.virtual.enabled) {\n if (slideTo) {\n if (!bothDirections && swiper.snapIndex === 0) {\n swiper.slideTo(swiper.virtual.slides.length, 0, false, true);\n } else if (bothDirections && swiper.snapIndex < params.slidesPerView) {\n swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);\n } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {\n swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n return;\n }\n let slidesPerView = params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = swiper.slidesPerViewDynamic();\n } else {\n slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10));\n if (bothDirections && slidesPerView % 2 === 0) {\n slidesPerView = slidesPerView + 1;\n }\n }\n const slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup;\n let loopedSlides = bothDirections ? Math.max(slidesPerGroup, Math.ceil(slidesPerView / 2)) : slidesPerGroup;\n if (loopedSlides % slidesPerGroup !== 0) {\n loopedSlides += slidesPerGroup - loopedSlides % slidesPerGroup;\n }\n loopedSlides += params.loopAdditionalSlides;\n swiper.loopedSlides = loopedSlides;\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n if (slides.length < slidesPerView + loopedSlides || swiper.params.effect === 'cards' && slides.length < slidesPerView + loopedSlides * 2) {\n showWarning('Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters');\n } else if (gridEnabled && params.grid.fill === 'row') {\n showWarning('Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`');\n }\n const prependSlidesIndexes = [];\n const appendSlidesIndexes = [];\n const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;\n const isInitialOverflow = initial && cols - initialSlide < slidesPerView && !bothDirections;\n let activeIndex = isInitialOverflow ? initialSlide : swiper.activeIndex;\n if (typeof activeSlideIndex === 'undefined') {\n activeSlideIndex = swiper.getSlideIndex(slides.find(el => el.classList.contains(params.slideActiveClass)));\n } else {\n activeIndex = activeSlideIndex;\n }\n const isNext = direction === 'next' || !direction;\n const isPrev = direction === 'prev' || !direction;\n let slidesPrepended = 0;\n let slidesAppended = 0;\n const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex;\n const activeColIndexWithShift = activeColIndex + (bothDirections && typeof setTranslate === 'undefined' ? -slidesPerView / 2 + 0.5 : 0);\n // prepend last slides before start\n if (activeColIndexWithShift < loopedSlides) {\n slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup);\n for (let i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) {\n const index = i - Math.floor(i / cols) * cols;\n if (gridEnabled) {\n const colIndexToPrepend = cols - index - 1;\n for (let i = slides.length - 1; i >= 0; i -= 1) {\n if (slides[i].column === colIndexToPrepend) prependSlidesIndexes.push(i);\n }\n // slides.forEach((slide, slideIndex) => {\n // if (slide.column === colIndexToPrepend) prependSlidesIndexes.push(slideIndex);\n // });\n } else {\n prependSlidesIndexes.push(cols - index - 1);\n }\n }\n } else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) {\n slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup);\n if (isInitialOverflow) {\n slidesAppended = Math.max(slidesAppended, slidesPerView - cols + initialSlide + 1);\n }\n for (let i = 0; i < slidesAppended; i += 1) {\n const index = i - Math.floor(i / cols) * cols;\n if (gridEnabled) {\n slides.forEach((slide, slideIndex) => {\n if (slide.column === index) appendSlidesIndexes.push(slideIndex);\n });\n } else {\n appendSlidesIndexes.push(index);\n }\n }\n }\n swiper.__preventObserver__ = true;\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n if (swiper.params.effect === 'cards' && slides.length < slidesPerView + loopedSlides * 2) {\n if (appendSlidesIndexes.includes(activeSlideIndex)) {\n appendSlidesIndexes.splice(appendSlidesIndexes.indexOf(activeSlideIndex), 1);\n }\n if (prependSlidesIndexes.includes(activeSlideIndex)) {\n prependSlidesIndexes.splice(prependSlidesIndexes.indexOf(activeSlideIndex), 1);\n }\n }\n if (isPrev) {\n prependSlidesIndexes.forEach(index => {\n slides[index].swiperLoopMoveDOM = true;\n slidesEl.prepend(slides[index]);\n slides[index].swiperLoopMoveDOM = false;\n });\n }\n if (isNext) {\n appendSlidesIndexes.forEach(index => {\n slides[index].swiperLoopMoveDOM = true;\n slidesEl.append(slides[index]);\n slides[index].swiperLoopMoveDOM = false;\n });\n }\n swiper.recalcSlides();\n if (params.slidesPerView === 'auto') {\n swiper.updateSlides();\n } else if (gridEnabled && (prependSlidesIndexes.length > 0 && isPrev || appendSlidesIndexes.length > 0 && isNext)) {\n swiper.slides.forEach((slide, slideIndex) => {\n swiper.grid.updateSlide(slideIndex, slide, swiper.slides);\n });\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n if (slideTo) {\n if (prependSlidesIndexes.length > 0 && isPrev) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex + Math.ceil(slidesPrepended), 0, false, true);\n if (setTranslate) {\n swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;\n swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;\n }\n }\n } else {\n if (setTranslate) {\n const shift = gridEnabled ? prependSlidesIndexes.length / params.grid.rows : prependSlidesIndexes.length;\n swiper.slideTo(swiper.activeIndex + shift, 0, false, true);\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else if (appendSlidesIndexes.length > 0 && isNext) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex - slidesAppended, 0, false, true);\n if (setTranslate) {\n swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;\n swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;\n }\n }\n } else {\n const shift = gridEnabled ? appendSlidesIndexes.length / params.grid.rows : appendSlidesIndexes.length;\n swiper.slideTo(swiper.activeIndex - shift, 0, false, true);\n }\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.controller && swiper.controller.control && !byController) {\n const loopParams = {\n slideRealIndex,\n direction,\n setTranslate,\n activeSlideIndex,\n byController: true\n };\n if (Array.isArray(swiper.controller.control)) {\n swiper.controller.control.forEach(c => {\n if (!c.destroyed && c.params.loop) c.loopFix({\n ...loopParams,\n slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n });\n } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {\n swiper.controller.control.loopFix({\n ...loopParams,\n slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n }\n }\n swiper.emit('loopFix');\n}\n\nfunction loopDestroy() {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || !slidesEl || swiper.virtual && swiper.params.virtual.enabled) return;\n swiper.recalcSlides();\n const newSlidesOrder = [];\n swiper.slides.forEach(slideEl => {\n const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex;\n newSlidesOrder[index] = slideEl;\n });\n swiper.slides.forEach(slideEl => {\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n newSlidesOrder.forEach(slideEl => {\n slidesEl.append(slideEl);\n });\n swiper.recalcSlides();\n swiper.slideTo(swiper.realIndex, 0);\n}\n\nvar loop = {\n loopCreate,\n loopFix,\n loopDestroy\n};\n\nfunction setGrabCursor(moving) {\n const swiper = this;\n if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n el.style.cursor = 'move';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nfunction unsetGrabCursor() {\n const swiper = this;\n if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nvar grabCursor = {\n setGrabCursor,\n unsetGrabCursor\n};\n\n// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\nfunction closestElement(selector, base = this) {\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n if (!found && !el.getRootNode) {\n return null;\n }\n return found || __closestFrom(el.getRootNode().host);\n }\n return __closestFrom(base);\n}\nfunction preventEdgeSwipe(swiper, event, startX) {\n const window = getWindow();\n const {\n params\n } = swiper;\n const edgeSwipeDetection = params.edgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold;\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n return true;\n }\n return false;\n }\n return true;\n}\nfunction onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n const data = swiper.touchEventsData;\n if (e.type === 'pointerdown') {\n if (data.pointerId !== null && data.pointerId !== e.pointerId) {\n return;\n }\n data.pointerId = e.pointerId;\n } else if (e.type === 'touchstart' && e.targetTouches.length === 1) {\n data.touchId = e.targetTouches[0].identifier;\n }\n if (e.type === 'touchstart') {\n // don't proceed touch event\n preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX);\n return;\n }\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && e.pointerType === 'mouse') return;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n let targetEl = e.target;\n if (params.touchEventsTarget === 'wrapper') {\n if (!elementIsChildOf(targetEl, swiper.wrapperEl)) return;\n }\n if ('which' in e && e.which === 3) return;\n if ('button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return;\n\n // change target el for shadow root component\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n // eslint-disable-next-line\n const eventPath = e.composedPath ? e.composedPath() : e.path;\n if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {\n targetEl = eventPath[0];\n }\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot);\n\n // use closestElement for shadow root element to get the actual closest for nested shadow root element\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {\n swiper.allowClick = true;\n return;\n }\n if (params.swipeHandler) {\n if (!targetEl.closest(params.swipeHandler)) return;\n }\n touches.currentX = e.pageX;\n touches.currentY = e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY;\n\n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n if (!preventEdgeSwipe(swiper, e, startX)) {\n return;\n }\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n let preventDefault = true;\n if (targetEl.matches(data.focusableElements)) {\n preventDefault = false;\n if (targetEl.nodeName === 'SELECT') {\n data.isTouched = false;\n }\n }\n if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl && (e.pointerType === 'mouse' || e.pointerType !== 'mouse' && !targetEl.matches(data.focusableElements))) {\n document.activeElement.blur();\n }\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {\n e.preventDefault();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {\n swiper.freeMode.onTouchStart();\n }\n swiper.emit('touchStart', e);\n}\n\nfunction onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (e.type === 'pointermove') {\n if (data.touchId !== null) return; // return from pointer if we use touch\n const id = e.pointerId;\n if (id !== data.pointerId) return;\n }\n let targetTouch;\n if (e.type === 'touchmove') {\n targetTouch = [...e.changedTouches].find(t => t.identifier === data.touchId);\n if (!targetTouch || targetTouch.identifier !== data.touchId) return;\n } else {\n targetTouch = e;\n }\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n return;\n }\n const pageX = targetTouch.pageX;\n const pageY = targetTouch.pageY;\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n if (!swiper.allowTouchMove) {\n if (!e.target.matches(data.focusableElements)) {\n swiper.allowClick = false;\n }\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n return;\n }\n if (params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (rtl && (pageX > touches.startX && -swiper.translate <= swiper.maxTranslate() || pageX < touches.startX && -swiper.translate >= swiper.minTranslate())) {\n return;\n } else if (!rtl && (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate())) {\n return;\n }\n }\n if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== e.target && e.pointerType !== 'mouse') {\n document.activeElement.blur();\n }\n if (document.activeElement) {\n if (e.target === document.activeElement && e.target.matches(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n touches.previousX = touches.currentX;\n touches.previousY = touches.currentY;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n if (data.isScrolling || e.type === 'touchmove' && data.preventTouchMoveFromPointerMove) {\n data.isTouched = false;\n return;\n }\n if (!data.startMoving) {\n return;\n }\n swiper.allowClick = false;\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n let diff = swiper.isHorizontal() ? diffX : diffY;\n let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;\n if (params.oneWayMovement) {\n diff = Math.abs(diff) * (rtl ? 1 : -1);\n touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);\n }\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) {\n diff = -diff;\n touchesDiff = -touchesDiff;\n }\n const prevTouchesDirection = swiper.touchesDirection;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';\n const isLoop = swiper.params.loop && !params.cssMode;\n const allowLoopFix = swiper.touchesDirection === 'next' && swiper.allowSlideNext || swiper.touchesDirection === 'prev' && swiper.allowSlidePrev;\n if (!data.isMoved) {\n if (isLoop && allowLoopFix) {\n swiper.loopFix({\n direction: swiper.swipeDirection\n });\n }\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n if (swiper.animating) {\n const evt = new window.CustomEvent('transitionend', {\n bubbles: true,\n cancelable: true,\n detail: {\n bySwiperTouchMove: true\n }\n });\n swiper.wrapperEl.dispatchEvent(evt);\n }\n data.allowMomentumBounce = false;\n // Grab Cursor\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n swiper.emit('sliderFirstMove', e);\n }\n let loopFixed;\n new Date().getTime();\n if (params._loopSwapReset !== false && data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY,\n startTranslate: data.currentTranslate\n });\n data.loopSwapReset = true;\n data.startTranslate = data.currentTranslate;\n return;\n }\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n if (diff > 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] - (params.slidesPerView !== 'auto' && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.activeIndex + 1] + swiper.params.spaceBetween : 0) - swiper.params.spaceBetween : swiper.minTranslate())) {\n swiper.loopFix({\n direction: 'prev',\n setTranslate: true,\n activeSlideIndex: 0\n });\n }\n if (data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n }\n }\n } else if (diff < 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween + (params.slidesPerView !== 'auto' && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween : 0) : swiper.maxTranslate())) {\n swiper.loopFix({\n direction: 'next',\n setTranslate: true,\n activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))\n });\n }\n if (data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n }\n }\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n\n // Directions locks\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n }\n\n // Threshold\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n if (!params.followFinger || params.cssMode) return;\n\n // Update active index in free mode\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n }\n // Update progress\n swiper.updateProgress(data.currentTranslate);\n // Update translate\n swiper.setTranslate(data.currentTranslate);\n}\n\nfunction onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let targetTouch;\n const isTouchEvent = e.type === 'touchend' || e.type === 'touchcancel';\n if (!isTouchEvent) {\n if (data.touchId !== null) return; // return from pointer if we use touch\n if (e.pointerId !== data.pointerId) return;\n targetTouch = e;\n } else {\n targetTouch = [...e.changedTouches].find(t => t.identifier === data.touchId);\n if (!targetTouch || targetTouch.identifier !== data.touchId) return;\n }\n if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(e.type)) {\n const proceed = ['pointercancel', 'contextmenu'].includes(e.type) && (swiper.browser.isSafari || swiper.browser.isWebView);\n if (!proceed) {\n return;\n }\n }\n data.pointerId = null;\n data.touchId = null;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && e.pointerType === 'mouse') return;\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n data.allowTouchCallbacks = false;\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n // Return Grab Cursor\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n }\n\n // Time diff\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n // Tap, doubleTap, Click\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);\n swiper.emit('tap click', e);\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 && !data.loopSwapReset || data.currentTranslate === data.startTranslate && !data.loopSwapReset) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n if (params.cssMode) {\n return;\n }\n if (params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n }\n\n // Find current slide\n const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop;\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (swipeToLast || currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (swipeToLast || currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n }\n let rewindFirstIndex = null;\n let rewindLastIndex = null;\n if (params.rewind) {\n if (swiper.isBeginning) {\n rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n } else if (swiper.isEnd) {\n rewindFirstIndex = 0;\n }\n }\n // Find current slide size\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) {\n swiper.slideTo(stopIndex + increment);\n } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {\n swiper.slideTo(rewindLastIndex);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);\n }\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}\n\nfunction onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return;\n\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Save locks\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n // Disable locks on resize\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n const isVirtualLoop = isVirtual && params.loop;\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {\n const slides = isVirtual ? swiper.virtual.slides : swiper.slides;\n swiper.slideTo(slides.length - 1, 0, false, true);\n } else {\n if (swiper.params.loop && !isVirtual) {\n swiper.slideToLoop(swiper.realIndex, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n }\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n clearTimeout(swiper.autoplay.resizeTimeout);\n swiper.autoplay.resizeTimeout = setTimeout(() => {\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.resume();\n }\n }, 500);\n }\n // Return locks after resize\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}\n\nfunction onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}\n\nfunction onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n }\n // eslint-disable-next-line\n if (swiper.translate === 0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n swiper.emit('setTranslate', swiper.translate, false);\n}\n\nfunction onLoad(e) {\n const swiper = this;\n processLazyPreloader(swiper, e.target);\n if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) {\n return;\n }\n swiper.update();\n}\n\nfunction onDocumentTouchStart() {\n const swiper = this;\n if (swiper.documentTouchHandlerProceeded) return;\n swiper.documentTouchHandlerProceeded = true;\n if (swiper.params.touchReleaseOnEdges) {\n swiper.el.style.touchAction = 'auto';\n }\n}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n el,\n wrapperEl,\n device\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method;\n if (!el || typeof el === 'string') return;\n\n // Touch Events\n document[domMethod]('touchstart', swiper.onDocumentTouchStart, {\n passive: false,\n capture\n });\n el[domMethod]('touchstart', swiper.onTouchStart, {\n passive: false\n });\n el[domMethod]('pointerdown', swiper.onTouchStart, {\n passive: false\n });\n document[domMethod]('touchmove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('pointermove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('touchend', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerup', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointercancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('touchcancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerout', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerleave', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('contextmenu', swiper.onTouchEnd, {\n passive: true\n });\n\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n }\n\n // Resize handler\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n\n // Images loader\n el[domMethod]('load', swiper.onLoad, {\n capture: true\n });\n};\nfunction attachEvents() {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper);\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n swiper.onClick = onClick.bind(swiper);\n swiper.onLoad = onLoad.bind(swiper);\n events(swiper, 'on');\n}\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\nvar events$1 = {\n attachEvents,\n detachEvents\n};\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\nfunction setBreakpoint() {\n const swiper = this;\n const {\n realIndex,\n initialized,\n params,\n el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;\n const document = getDocument();\n\n // Get breakpoint for window/container width and update parameters\n const breakpointsBase = params.breakpointsBase === 'window' || !params.breakpointsBase ? params.breakpointsBase : 'container';\n const breakpointContainer = ['window', 'container'].includes(params.breakpointsBase) || !params.breakpointsBase ? swiper.el : document.querySelector(params.breakpointsBase);\n const breakpoint = swiper.getBreakpoint(breakpoints, breakpointsBase, breakpointContainer);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasGrabCursor = swiper.params.grabCursor;\n const isGrabCursor = breakpointParams.grabCursor;\n const wasEnabled = params.enabled;\n if (wasMultiRow && !isMultiRow) {\n el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n el.classList.add(`${params.containerModifierClass}grid`);\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n el.classList.add(`${params.containerModifierClass}grid-column`);\n }\n swiper.emitContainerClasses();\n }\n if (wasGrabCursor && !isGrabCursor) {\n swiper.unsetGrabCursor();\n } else if (!wasGrabCursor && isGrabCursor) {\n swiper.setGrabCursor();\n }\n\n // Toggle navigation, pagination, scrollbar\n ['navigation', 'pagination', 'scrollbar'].forEach(prop => {\n if (typeof breakpointParams[prop] === 'undefined') return;\n const wasModuleEnabled = params[prop] && params[prop].enabled;\n const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;\n if (wasModuleEnabled && !isModuleEnabled) {\n swiper[prop].disable();\n }\n if (!wasModuleEnabled && isModuleEnabled) {\n swiper[prop].enable();\n }\n });\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n const wasLoop = params.loop;\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n const hasLoop = swiper.params.loop;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n if (initialized) {\n if (needsReLoop) {\n swiper.loopDestroy();\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (!wasLoop && hasLoop) {\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (wasLoop && !hasLoop) {\n swiper.loopDestroy();\n }\n }\n swiper.emit('breakpoint', breakpointParams);\n}\n\nfunction getBreakpoint(breakpoints, base = 'window', containerEl) {\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n}\n\nvar breakpoints = {\n setBreakpoint,\n getBreakpoint\n};\n\nfunction prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\nfunction addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n el,\n device\n } = swiper;\n // prettier-ignore\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }, {\n 'watch-progress': params.watchSlidesProgress\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n el.classList.add(...classNames);\n swiper.emitContainerClasses();\n}\n\nfunction removeClasses() {\n const swiper = this;\n const {\n el,\n classNames\n } = swiper;\n if (!el || typeof el === 'string') return;\n el.classList.remove(...classNames);\n swiper.emitContainerClasses();\n}\n\nvar classes = {\n addClasses,\n removeClasses\n};\n\nfunction checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\nvar checkOverflow$1 = {\n checkOverflow\n};\n\nvar defaults = {\n init: true,\n direction: 'horizontal',\n oneWayMovement: false,\n swiperElementNodeName: 'SWIPER-CONTAINER',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n eventsPrefix: 'swiper',\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n snapToSlideEdge: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 5,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // loop\n loop: false,\n loopAddBlankSlides: true,\n loopAdditionalSlides: 0,\n loopPreventsSliding: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n maxBackfaceHiddenSlides: 10,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-blank',\n slideActiveClass: 'swiper-slide-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideFullyVisibleClass: 'swiper-slide-fully-visible',\n slideNextClass: 'swiper-slide-next',\n slidePrevClass: 'swiper-slide-prev',\n wrapperClass: 'swiper-wrapper',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n lazyPreloadPrevNext: 0,\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};\n\nfunction moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj = {}) {\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n if (moduleParamName === 'navigation' && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {\n params[moduleParamName].auto = true;\n }\n if (['pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {\n params[moduleParamName].auto = true;\n }\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}\n\n/* eslint no-param-reassign: \"off\" */\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events: events$1,\n breakpoints,\n checkOverflow: checkOverflow$1,\n classes\n};\nconst extendedDefaults = {};\nclass Swiper {\n constructor(...args) {\n let el;\n let params;\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n const document = getDocument();\n if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) {\n const swipers = [];\n document.querySelectorAll(params.el).forEach(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n // eslint-disable-next-line no-constructor-return\n return swipers;\n }\n\n // Swiper Instance\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n if (params.modules && Array.isArray(params.modules)) {\n params.modules.forEach(mod => {\n if (typeof mod === 'function' && swiper.modules.indexOf(mod) < 0) {\n swiper.modules.push(mod);\n }\n });\n }\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n params,\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n });\n\n // Extend defaults with modules params\n const swiperParams = extend({}, defaults, allModulesParams);\n\n // Extend defaults with passed params\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params);\n\n // add event listeners\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n }\n\n // Extend Swiper\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: [],\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n cssOverflowAdjustment() {\n // Returns 0 unless `translate` is > 2**23\n // Should be subtracted from css values to prevent overflow\n return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;\n },\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: 0,\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n startMoving: undefined,\n pointerId: null,\n touchId: null\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper');\n\n // Init\n if (swiper.params.init) {\n swiper.init();\n }\n\n // Return app instance\n // eslint-disable-next-line no-constructor-return\n return swiper;\n }\n getDirectionLabel(property) {\n if (this.isHorizontal()) {\n return property;\n }\n // prettier-ignore\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n getSlideIndex(slideEl) {\n const {\n slidesEl,\n params\n } = this;\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n const firstSlideIndex = elementIndex(slides[0]);\n return elementIndex(slideEl) - firstSlideIndex;\n }\n getSlideIndexByData(index) {\n return this.getSlideIndex(this.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index));\n }\n getSlideIndexWhenGrid(index) {\n if (this.grid && this.params.grid && this.params.grid.rows > 1) {\n if (this.params.grid.fill === 'column') {\n index = Math.floor(index / this.params.grid.rows);\n } else if (this.params.grid.fill === 'row') {\n index = index % Math.ceil(this.slides.length / this.params.grid.rows);\n }\n }\n return index;\n }\n recalcSlides() {\n const swiper = this;\n const {\n slidesEl,\n params\n } = swiper;\n swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n }\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n swiper.emit('enable');\n }\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n swiper.emit('disable');\n }\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n getSlideClasses(slideEl) {\n const swiper = this;\n if (swiper.destroyed) return '';\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.forEach(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n slidesPerViewDynamic(view = 'current', exact = false) {\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n if (typeof params.slidesPerView === 'number') return params.slidesPerView;\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex] ? Math.ceil(slides[activeIndex].swiperSlideSize) : 0;\n let breakLoop;\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += Math.ceil(slides[i].swiperSlideSize);\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n return spv;\n }\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper;\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n [...swiper.el.querySelectorAll('[loading=\"lazy\"]')].forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n }\n });\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n let translated;\n if (params.freeMode && params.freeMode.enabled && !params.cssMode) {\n setTranslate();\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {\n const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;\n translated = swiper.slideTo(slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n if (!translated) {\n setTranslate();\n }\n }\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n swiper.emit('update');\n }\n changeDirection(newDirection, needUpdate = true) {\n const swiper = this;\n const currentDirection = swiper.params.direction;\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);\n swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.forEach(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n changeLanguageDirection(direction) {\n const swiper = this;\n if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return;\n swiper.rtl = direction === 'rtl';\n swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl;\n if (swiper.rtl) {\n swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'rtl';\n } else {\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'ltr';\n }\n swiper.update();\n }\n mount(element) {\n const swiper = this;\n if (swiper.mounted) return true;\n\n // Find el\n let el = element || swiper.params.el;\n if (typeof el === 'string') {\n el = document.querySelector(el);\n }\n if (!el) {\n return false;\n }\n el.swiper = swiper;\n if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === swiper.params.swiperElementNodeName.toUpperCase()) {\n swiper.isElement = true;\n }\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = el.shadowRoot.querySelector(getWrapperSelector());\n // Children needs to return slot items\n return res;\n }\n return elementChildren(el, getWrapperSelector())[0];\n };\n // Find Wrapper\n let wrapperEl = getWrapper();\n if (!wrapperEl && swiper.params.createElements) {\n wrapperEl = createElement('div', swiper.params.wrapperClass);\n el.append(wrapperEl);\n elementChildren(el, `.${swiper.params.slideClass}`).forEach(slideEl => {\n wrapperEl.append(slideEl);\n });\n }\n Object.assign(swiper, {\n el,\n wrapperEl,\n slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,\n hostEl: swiper.isElement ? el.parentNode.host : el,\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl'),\n wrongRTL: elementStyle(wrapperEl, 'display') === '-webkit-box'\n });\n return true;\n }\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit');\n\n // Set breakpoint\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Add Classes\n swiper.addClasses();\n\n // Update size\n swiper.updateSize();\n\n // Update slides\n swiper.updateSlides();\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n }\n\n // Set Grab Cursor\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n // Slide To Initial Slide\n if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n }\n\n // Create loop\n if (swiper.params.loop) {\n swiper.loopCreate(undefined, true);\n }\n\n // Attach events\n swiper.attachEvents();\n const lazyElements = [...swiper.el.querySelectorAll('[loading=\"lazy\"]')];\n if (swiper.isElement) {\n lazyElements.push(...swiper.hostEl.querySelectorAll('[loading=\"lazy\"]'));\n }\n lazyElements.forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n } else {\n imageEl.addEventListener('load', e => {\n processLazyPreloader(swiper, e.target);\n });\n }\n });\n preload(swiper);\n\n // Init Flag\n swiper.initialized = true;\n preload(swiper);\n\n // Emit\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n destroy(deleteInstance = true, cleanStyles = true) {\n const swiper = this;\n const {\n params,\n el,\n wrapperEl,\n slides\n } = swiper;\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n swiper.emit('beforeDestroy');\n\n // Init Flag\n swiper.initialized = false;\n\n // Detach events\n swiper.detachEvents();\n\n // Destroy loop\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n // Cleanup styles\n if (cleanStyles) {\n swiper.removeClasses();\n if (el && typeof el !== 'string') {\n el.removeAttribute('style');\n }\n if (wrapperEl) {\n wrapperEl.removeAttribute('style');\n }\n if (slides && slides.length) {\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n slideEl.removeAttribute('style');\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n }\n }\n swiper.emit('destroy');\n\n // Detach emitter events\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n if (deleteInstance !== false) {\n if (swiper.el && typeof swiper.el !== 'string') {\n swiper.el.swiper = null;\n }\n deleteProps(swiper);\n }\n swiper.destroyed = true;\n return null;\n }\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n static get extendedDefaults() {\n return extendedDefaults;\n }\n static get defaults() {\n return defaults;\n }\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n Swiper.installModule(module);\n return Swiper;\n }\n}\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\n\nexport { Swiper as S, defaults as d };\n","import { s as setInnerHTML } from './utils.mjs';\n\n/* underscore in name -> watch for changes */\nconst paramsList = ['eventsPrefix', 'injectStyles', 'injectStylesUrls', 'modules', 'init', '_direction', 'oneWayMovement', 'swiperElementNodeName', 'touchEventsTarget', 'initialSlide', '_speed', 'cssMode', 'updateOnWindowResize', 'resizeObserver', 'nested', 'focusableElements', '_enabled', '_width', '_height', 'preventInteractionOnTransition', 'userAgent', 'url', '_edgeSwipeDetection', '_edgeSwipeThreshold', '_freeMode', '_autoHeight', 'setWrapperSize', 'virtualTranslate', '_effect', 'breakpoints', 'breakpointsBase', '_spaceBetween', '_slidesPerView', 'maxBackfaceHiddenSlides', '_grid', '_slidesPerGroup', '_slidesPerGroupSkip', '_slidesPerGroupAuto', '_centeredSlides', '_centeredSlidesBounds', '_slidesOffsetBefore', '_slidesOffsetAfter', 'normalizeSlideIndex', '_centerInsufficientSlides', '_snapToSlideEdge', '_watchOverflow', 'roundLengths', 'touchRatio', 'touchAngle', 'simulateTouch', '_shortSwipes', '_longSwipes', 'longSwipesRatio', 'longSwipesMs', '_followFinger', 'allowTouchMove', '_threshold', 'touchMoveStopPropagation', 'touchStartPreventDefault', 'touchStartForcePreventDefault', 'touchReleaseOnEdges', 'uniqueNavElements', '_resistance', '_resistanceRatio', '_watchSlidesProgress', '_grabCursor', 'preventClicks', 'preventClicksPropagation', '_slideToClickedSlide', '_loop', 'loopAdditionalSlides', 'loopAddBlankSlides', 'loopPreventsSliding', '_rewind', '_allowSlidePrev', '_allowSlideNext', '_swipeHandler', '_noSwiping', 'noSwipingClass', 'noSwipingSelector', 'passiveListeners', 'containerModifierClass', 'slideClass', 'slideActiveClass', 'slideVisibleClass', 'slideFullyVisibleClass', 'slideNextClass', 'slidePrevClass', 'slideBlankClass', 'wrapperClass', 'lazyPreloaderClass', 'lazyPreloadPrevNext', 'runCallbacksOnInit', 'observer', 'observeParents', 'observeSlideChildren',\n// modules\n'a11y', '_autoplay', '_controller', 'coverflowEffect', 'cubeEffect', 'fadeEffect', 'flipEffect', 'creativeEffect', 'cardsEffect', 'hashNavigation', 'history', 'keyboard', 'mousewheel', '_navigation', '_pagination', 'parallax', '_scrollbar', '_thumbs', 'virtual', 'zoom', 'control'];\n\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object' && !o.__swiper__;\n}\nfunction extend(target, src) {\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n Object.keys(src).filter(key => noExtend.indexOf(key) < 0).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n if (src[key].__swiper__) target[key] = src[key];else extend(target[key], src[key]);\n } else {\n target[key] = src[key];\n }\n });\n}\nfunction needsNavigation(params = {}) {\n return params.navigation && typeof params.navigation.nextEl === 'undefined' && typeof params.navigation.prevEl === 'undefined';\n}\nfunction needsPagination(params = {}) {\n return params.pagination && typeof params.pagination.el === 'undefined';\n}\nfunction needsScrollbar(params = {}) {\n return params.scrollbar && typeof params.scrollbar.el === 'undefined';\n}\nfunction uniqueClasses(classNames = '') {\n const classes = classNames.split(' ').map(c => c.trim()).filter(c => !!c);\n const unique = [];\n classes.forEach(c => {\n if (unique.indexOf(c) < 0) unique.push(c);\n });\n return unique.join(' ');\n}\nfunction attrToProp(attrName = '') {\n return attrName.replace(/-[a-z]/g, l => l.toUpperCase().replace('-', ''));\n}\nfunction wrapperClass(className = '') {\n if (!className) return 'swiper-wrapper';\n if (!className.includes('swiper-wrapper')) return `swiper-wrapper ${className}`;\n return className;\n}\n\nfunction updateSwiper({\n swiper,\n slides,\n passedParams,\n changedParams,\n nextEl,\n prevEl,\n scrollbarEl,\n paginationEl\n}) {\n const updateParams = changedParams.filter(key => key !== 'children' && key !== 'direction' && key !== 'wrapperClass');\n const {\n params: currentParams,\n pagination,\n navigation,\n scrollbar,\n virtual,\n thumbs\n } = swiper;\n let needThumbsInit;\n let needControllerInit;\n let needPaginationInit;\n let needScrollbarInit;\n let needNavigationInit;\n let loopNeedDestroy;\n let loopNeedEnable;\n let loopNeedReloop;\n if (changedParams.includes('thumbs') && passedParams.thumbs && passedParams.thumbs.swiper && !passedParams.thumbs.swiper.destroyed && currentParams.thumbs && (!currentParams.thumbs.swiper || currentParams.thumbs.swiper.destroyed)) {\n needThumbsInit = true;\n }\n if (changedParams.includes('controller') && passedParams.controller && passedParams.controller.control && currentParams.controller && !currentParams.controller.control) {\n needControllerInit = true;\n }\n if (changedParams.includes('pagination') && passedParams.pagination && (passedParams.pagination.el || paginationEl) && (currentParams.pagination || currentParams.pagination === false) && pagination && !pagination.el) {\n needPaginationInit = true;\n }\n if (changedParams.includes('scrollbar') && passedParams.scrollbar && (passedParams.scrollbar.el || scrollbarEl) && (currentParams.scrollbar || currentParams.scrollbar === false) && scrollbar && !scrollbar.el) {\n needScrollbarInit = true;\n }\n if (changedParams.includes('navigation') && passedParams.navigation && (passedParams.navigation.prevEl || prevEl) && (passedParams.navigation.nextEl || nextEl) && (currentParams.navigation || currentParams.navigation === false) && navigation && !navigation.prevEl && !navigation.nextEl) {\n needNavigationInit = true;\n }\n const destroyModule = mod => {\n if (!swiper[mod]) return;\n swiper[mod].destroy();\n if (mod === 'navigation') {\n if (swiper.isElement) {\n swiper[mod].prevEl.remove();\n swiper[mod].nextEl.remove();\n }\n currentParams[mod].prevEl = undefined;\n currentParams[mod].nextEl = undefined;\n swiper[mod].prevEl = undefined;\n swiper[mod].nextEl = undefined;\n } else {\n if (swiper.isElement) {\n swiper[mod].el.remove();\n }\n currentParams[mod].el = undefined;\n swiper[mod].el = undefined;\n }\n };\n if (changedParams.includes('loop') && swiper.isElement) {\n if (currentParams.loop && !passedParams.loop) {\n loopNeedDestroy = true;\n } else if (!currentParams.loop && passedParams.loop) {\n loopNeedEnable = true;\n } else {\n loopNeedReloop = true;\n }\n }\n updateParams.forEach(key => {\n if (isObject(currentParams[key]) && isObject(passedParams[key])) {\n Object.assign(currentParams[key], passedParams[key]);\n if ((key === 'navigation' || key === 'pagination' || key === 'scrollbar') && 'enabled' in passedParams[key] && !passedParams[key].enabled) {\n destroyModule(key);\n }\n } else {\n const newValue = passedParams[key];\n if ((newValue === true || newValue === false) && (key === 'navigation' || key === 'pagination' || key === 'scrollbar')) {\n if (newValue === false) {\n destroyModule(key);\n }\n } else {\n currentParams[key] = passedParams[key];\n }\n }\n });\n if (updateParams.includes('controller') && !needControllerInit && swiper.controller && swiper.controller.control && currentParams.controller && currentParams.controller.control) {\n swiper.controller.control = currentParams.controller.control;\n }\n if (changedParams.includes('children') && slides && virtual && currentParams.virtual.enabled) {\n virtual.slides = slides;\n virtual.update(true);\n } else if (changedParams.includes('virtual') && virtual && currentParams.virtual.enabled) {\n if (slides) virtual.slides = slides;\n virtual.update(true);\n }\n if (changedParams.includes('children') && slides && currentParams.loop) {\n loopNeedReloop = true;\n }\n if (needThumbsInit) {\n const initialized = thumbs.init();\n if (initialized) thumbs.update(true);\n }\n if (needControllerInit) {\n swiper.controller.control = currentParams.controller.control;\n }\n if (needPaginationInit) {\n if (swiper.isElement && (!paginationEl || typeof paginationEl === 'string')) {\n paginationEl = document.createElement('div');\n paginationEl.classList.add('swiper-pagination');\n paginationEl.part.add('pagination');\n swiper.el.appendChild(paginationEl);\n }\n if (paginationEl) currentParams.pagination.el = paginationEl;\n pagination.init();\n pagination.render();\n pagination.update();\n }\n if (needScrollbarInit) {\n if (swiper.isElement && (!scrollbarEl || typeof scrollbarEl === 'string')) {\n scrollbarEl = document.createElement('div');\n scrollbarEl.classList.add('swiper-scrollbar');\n scrollbarEl.part.add('scrollbar');\n swiper.el.appendChild(scrollbarEl);\n }\n if (scrollbarEl) currentParams.scrollbar.el = scrollbarEl;\n scrollbar.init();\n scrollbar.updateSize();\n scrollbar.setTranslate();\n }\n if (needNavigationInit) {\n if (swiper.isElement) {\n if (!nextEl || typeof nextEl === 'string') {\n nextEl = document.createElement('div');\n nextEl.classList.add('swiper-button-next');\n setInnerHTML(nextEl, swiper.navigation.arrowSvg);\n nextEl.part.add('button-next');\n swiper.el.appendChild(nextEl);\n }\n if (!prevEl || typeof prevEl === 'string') {\n prevEl = document.createElement('div');\n prevEl.classList.add('swiper-button-prev');\n setInnerHTML(prevEl, swiper.navigation.arrowSvg);\n prevEl.part.add('button-prev');\n swiper.el.appendChild(prevEl);\n }\n }\n if (nextEl) currentParams.navigation.nextEl = nextEl;\n if (prevEl) currentParams.navigation.prevEl = prevEl;\n navigation.init();\n navigation.update();\n }\n if (changedParams.includes('allowSlideNext')) {\n swiper.allowSlideNext = passedParams.allowSlideNext;\n }\n if (changedParams.includes('allowSlidePrev')) {\n swiper.allowSlidePrev = passedParams.allowSlidePrev;\n }\n if (changedParams.includes('direction')) {\n swiper.changeDirection(passedParams.direction, false);\n }\n if (loopNeedDestroy || loopNeedReloop) {\n swiper.loopDestroy();\n }\n if (loopNeedEnable || loopNeedReloop) {\n swiper.loopCreate();\n }\n swiper.update();\n}\n\nexport { needsPagination as a, needsScrollbar as b, attrToProp as c, uniqueClasses as d, extend as e, isObject as i, needsNavigation as n, paramsList as p, updateSwiper as u, wrapperClass as w };\n","import { e as extend, p as paramsList, i as isObject, n as needsNavigation, a as needsPagination, b as needsScrollbar } from './update-swiper.mjs';\nimport { d as defaults } from './swiper-core.mjs';\n\nfunction getParams(obj = {}, splitEvents = true) {\n const params = {\n on: {}\n };\n const events = {};\n const passedParams = {};\n extend(params, defaults);\n params._emitClasses = true;\n params.init = false;\n const rest = {};\n const allowedParams = paramsList.map(key => key.replace(/_/, ''));\n const plainObj = Object.assign({}, obj);\n Object.keys(plainObj).forEach(key => {\n if (typeof obj[key] === 'undefined') return;\n if (allowedParams.indexOf(key) >= 0) {\n if (isObject(obj[key])) {\n params[key] = {};\n passedParams[key] = {};\n extend(params[key], obj[key]);\n extend(passedParams[key], obj[key]);\n } else {\n params[key] = obj[key];\n passedParams[key] = obj[key];\n }\n } else if (key.search(/on[A-Z]/) === 0 && typeof obj[key] === 'function') {\n if (splitEvents) {\n events[`${key[2].toLowerCase()}${key.substr(3)}`] = obj[key];\n } else {\n params.on[`${key[2].toLowerCase()}${key.substr(3)}`] = obj[key];\n }\n } else {\n rest[key] = obj[key];\n }\n });\n ['navigation', 'pagination', 'scrollbar'].forEach(key => {\n if (params[key] === true) params[key] = {};\n if (params[key] === false) delete params[key];\n });\n return {\n params,\n passedParams,\n rest,\n events\n };\n}\n\nfunction mountSwiper({\n el,\n nextEl,\n prevEl,\n paginationEl,\n scrollbarEl,\n swiper\n}, swiperParams) {\n if (needsNavigation(swiperParams) && nextEl && prevEl) {\n swiper.params.navigation.nextEl = nextEl;\n swiper.originalParams.navigation.nextEl = nextEl;\n swiper.params.navigation.prevEl = prevEl;\n swiper.originalParams.navigation.prevEl = prevEl;\n }\n if (needsPagination(swiperParams) && paginationEl) {\n swiper.params.pagination.el = paginationEl;\n swiper.originalParams.pagination.el = paginationEl;\n }\n if (needsScrollbar(swiperParams) && scrollbarEl) {\n swiper.params.scrollbar.el = scrollbarEl;\n swiper.originalParams.scrollbar.el = scrollbarEl;\n }\n swiper.init(el);\n}\n\nfunction getChangedParams(swiperParams, oldParams, children, oldChildren, getKey) {\n const keys = [];\n if (!oldParams) return keys;\n const addKey = key => {\n if (keys.indexOf(key) < 0) keys.push(key);\n };\n if (children && oldChildren) {\n const oldChildrenKeys = oldChildren.map(getKey);\n const childrenKeys = children.map(getKey);\n if (oldChildrenKeys.join('') !== childrenKeys.join('')) addKey('children');\n if (oldChildren.length !== children.length) addKey('children');\n }\n const watchParams = paramsList.filter(key => key[0] === '_').map(key => key.replace(/_/, ''));\n watchParams.forEach(key => {\n if (key in swiperParams && key in oldParams) {\n if (isObject(swiperParams[key]) && isObject(oldParams[key])) {\n const newKeys = Object.keys(swiperParams[key]);\n const oldKeys = Object.keys(oldParams[key]);\n if (newKeys.length !== oldKeys.length) {\n addKey(key);\n } else {\n newKeys.forEach(newKey => {\n if (swiperParams[key][newKey] !== oldParams[key][newKey]) {\n addKey(key);\n }\n });\n oldKeys.forEach(oldKey => {\n if (swiperParams[key][oldKey] !== oldParams[key][oldKey]) addKey(key);\n });\n }\n } else if (swiperParams[key] !== oldParams[key]) {\n addKey(key);\n }\n }\n });\n return keys;\n}\n\nconst updateOnVirtualData = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params.virtual || swiper.params.virtual && !swiper.params.virtual.enabled) return;\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n swiper.emit('_virtualUpdated');\n if (swiper.parallax && swiper.params.parallax && swiper.params.parallax.enabled) {\n swiper.parallax.setTranslate();\n }\n};\n\nexport { getChangedParams as a, getParams as g, mountSwiper as m, updateOnVirtualData as u };\n","/**\n * Swiper React 12.1.4\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2026 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: April 29, 2026\n */\n\nimport React, { useEffect, useLayoutEffect, useContext, createContext, forwardRef, useState, useRef } from 'react';\nimport { S as Swiper$1 } from './shared/swiper-core.mjs';\nimport { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnVirtualData } from './shared/update-on-virtual-data.mjs';\nimport { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.mjs';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction isChildSwiperSlide(child) {\n return child.type && child.type.displayName && child.type.displayName.includes('SwiperSlide');\n}\nfunction processChildren(c) {\n const slides = [];\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.children) {\n processChildren(child.props.children).forEach(slide => slides.push(slide));\n }\n });\n return slides;\n}\nfunction getChildren(c) {\n const slides = [];\n const slots = {\n 'container-start': [],\n 'container-end': [],\n 'wrapper-start': [],\n 'wrapper-end': []\n };\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.slot && slots[child.props.slot]) {\n slots[child.props.slot].push(child);\n } else if (child.props && child.props.children) {\n const foundSlides = processChildren(child.props.children);\n if (foundSlides.length > 0) {\n foundSlides.forEach(slide => slides.push(slide));\n } else {\n slots['container-end'].push(child);\n }\n } else {\n slots['container-end'].push(child);\n }\n });\n return {\n slides,\n slots\n };\n}\n\nfunction renderVirtual(swiper, slides, virtualData) {\n if (!virtualData) return null;\n const getSlideIndex = index => {\n let slideIndex = index;\n if (index < 0) {\n slideIndex = slides.length + index;\n } else if (slideIndex >= slides.length) {\n // eslint-disable-next-line\n slideIndex = slideIndex - slides.length;\n }\n return slideIndex;\n };\n const style = swiper.isHorizontal() ? {\n [swiper.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`\n } : {\n top: `${virtualData.offset}px`\n };\n const {\n from,\n to\n } = virtualData;\n const loopFrom = swiper.params.loop ? -slides.length : 0;\n const loopTo = swiper.params.loop ? slides.length * 2 : slides.length;\n const slidesToRender = [];\n for (let i = loopFrom; i < loopTo; i += 1) {\n if (i >= from && i <= to) {\n slidesToRender.push(slides[getSlideIndex(i)]);\n }\n }\n return slidesToRender.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper,\n style,\n key: child.props.virtualIndex || child.key || `slide-${index}`\n });\n });\n}\n\nfunction useIsomorphicLayoutEffect(callback, deps) {\n // eslint-disable-next-line\n if (typeof window === 'undefined') return useEffect(callback, deps);\n return useLayoutEffect(callback, deps);\n}\n\nconst SwiperSlideContext = /*#__PURE__*/createContext(null);\nconst useSwiperSlide = () => {\n return useContext(SwiperSlideContext);\n};\nconst SwiperContext = /*#__PURE__*/createContext(null);\nconst useSwiper = () => {\n return useContext(SwiperContext);\n};\n\nconst Swiper = /*#__PURE__*/forwardRef(({\n className,\n tag: Tag = 'div',\n wrapperTag: WrapperTag = 'div',\n children,\n onSwiper,\n ...rest\n} = {}, externalElRef) => {\n let eventsAssigned = false;\n const [containerClasses, setContainerClasses] = useState('swiper');\n const [virtualData, setVirtualData] = useState(null);\n const [breakpointChanged, setBreakpointChanged] = useState(false);\n const initializedRef = useRef(false);\n const swiperElRef = useRef(null);\n const swiperRef = useRef(null);\n const oldPassedParamsRef = useRef(null);\n const oldSlides = useRef(null);\n const nextElRef = useRef(null);\n const prevElRef = useRef(null);\n const paginationElRef = useRef(null);\n const scrollbarElRef = useRef(null);\n const {\n params: swiperParams,\n passedParams,\n rest: restProps,\n events\n } = getParams(rest);\n const {\n slides,\n slots\n } = getChildren(children);\n const onBeforeBreakpoint = () => {\n setBreakpointChanged(!breakpointChanged);\n };\n Object.assign(swiperParams.on, {\n _containerClasses(swiper, classes) {\n setContainerClasses(classes);\n }\n });\n const initSwiper = () => {\n // init swiper\n Object.assign(swiperParams.on, events);\n eventsAssigned = true;\n const passParams = {\n ...swiperParams\n };\n delete passParams.wrapperClass;\n swiperRef.current = new Swiper$1(passParams);\n if (swiperRef.current.virtual && swiperRef.current.params.virtual.enabled) {\n swiperRef.current.virtual.slides = slides;\n const extendWith = {\n cache: false,\n slides,\n renderExternal: setVirtualData,\n renderExternalUpdate: false\n };\n extend(swiperRef.current.params.virtual, extendWith);\n extend(swiperRef.current.originalParams.virtual, extendWith);\n }\n };\n if (!swiperElRef.current) {\n initSwiper();\n }\n\n // Listen for breakpoints change\n if (swiperRef.current) {\n swiperRef.current.on('_beforeBreakpoint', onBeforeBreakpoint);\n }\n const attachEvents = () => {\n if (eventsAssigned || !events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.on(eventName, events[eventName]);\n });\n };\n const detachEvents = () => {\n if (!events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.off(eventName, events[eventName]);\n });\n };\n useEffect(() => {\n return () => {\n if (swiperRef.current) swiperRef.current.off('_beforeBreakpoint', onBeforeBreakpoint);\n };\n });\n\n // set initialized flag\n useEffect(() => {\n if (!initializedRef.current && swiperRef.current) {\n swiperRef.current.emitSlidesClasses();\n initializedRef.current = true;\n }\n });\n\n // mount swiper\n useIsomorphicLayoutEffect(() => {\n if (externalElRef) {\n externalElRef.current = swiperElRef.current;\n }\n if (!swiperElRef.current) return;\n if (swiperRef.current.destroyed) {\n initSwiper();\n }\n mountSwiper({\n el: swiperElRef.current,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n paginationEl: paginationElRef.current,\n scrollbarEl: scrollbarElRef.current,\n swiper: swiperRef.current\n }, swiperParams);\n if (onSwiper && !swiperRef.current.destroyed) onSwiper(swiperRef.current);\n // eslint-disable-next-line\n return () => {\n if (swiperRef.current && !swiperRef.current.destroyed) {\n swiperRef.current.destroy(true, false);\n }\n };\n }, []);\n\n // watch for params change\n useIsomorphicLayoutEffect(() => {\n attachEvents();\n const changedParams = getChangedParams(passedParams, oldPassedParamsRef.current, slides, oldSlides.current, c => c.key);\n oldPassedParamsRef.current = passedParams;\n oldSlides.current = slides;\n if (changedParams.length && swiperRef.current && !swiperRef.current.destroyed) {\n updateSwiper({\n swiper: swiperRef.current,\n slides,\n passedParams,\n changedParams,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n scrollbarEl: scrollbarElRef.current,\n paginationEl: paginationElRef.current\n });\n }\n return () => {\n detachEvents();\n };\n });\n\n // update on virtual update\n useIsomorphicLayoutEffect(() => {\n updateOnVirtualData(swiperRef.current);\n }, [virtualData]);\n\n // bypass swiper instance to slides\n function renderSlides() {\n if (swiperParams.virtual) {\n return renderVirtual(swiperRef.current, slides, virtualData);\n }\n return slides.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper: swiperRef.current,\n swiperSlideIndex: index\n });\n });\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: swiperElRef,\n className: uniqueClasses(`${containerClasses}${className ? ` ${className}` : ''}`)\n }, restProps), /*#__PURE__*/React.createElement(SwiperContext.Provider, {\n value: swiperRef.current\n }, slots['container-start'], /*#__PURE__*/React.createElement(WrapperTag, {\n className: wrapperClass(swiperParams.wrapperClass)\n }, slots['wrapper-start'], renderSlides(), slots['wrapper-end']), needsNavigation(swiperParams) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n ref: prevElRef,\n className: \"swiper-button-prev\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n ref: nextElRef,\n className: \"swiper-button-next\"\n })), needsScrollbar(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: scrollbarElRef,\n className: \"swiper-scrollbar\"\n }), needsPagination(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: paginationElRef,\n className: \"swiper-pagination\"\n }), slots['container-end']));\n});\nSwiper.displayName = 'Swiper';\n\nconst SwiperSlide = /*#__PURE__*/forwardRef(({\n tag: Tag = 'div',\n children,\n className = '',\n swiper,\n zoom,\n lazy,\n virtualIndex,\n swiperSlideIndex,\n ...rest\n} = {}, externalRef) => {\n const slideElRef = useRef(null);\n const [slideClasses, setSlideClasses] = useState('swiper-slide');\n const [lazyLoaded, setLazyLoaded] = useState(false);\n function updateClasses(_s, el, classNames) {\n if (el === slideElRef.current) {\n setSlideClasses(classNames);\n }\n }\n useIsomorphicLayoutEffect(() => {\n if (typeof swiperSlideIndex !== 'undefined') {\n slideElRef.current.swiperSlideIndex = swiperSlideIndex;\n }\n if (externalRef) {\n externalRef.current = slideElRef.current;\n }\n if (!slideElRef.current || !swiper) {\n return;\n }\n if (swiper.destroyed) {\n if (slideClasses !== 'swiper-slide') {\n setSlideClasses('swiper-slide');\n }\n return;\n }\n swiper.on('_slideClass', updateClasses);\n // eslint-disable-next-line\n return () => {\n if (!swiper) return;\n swiper.off('_slideClass', updateClasses);\n };\n });\n useIsomorphicLayoutEffect(() => {\n if (swiper && slideElRef.current && !swiper.destroyed) {\n setSlideClasses(swiper.getSlideClasses(slideElRef.current));\n }\n }, [swiper]);\n const slideData = {\n isActive: slideClasses.indexOf('swiper-slide-active') >= 0,\n isVisible: slideClasses.indexOf('swiper-slide-visible') >= 0,\n isFullyVisible: slideClasses.indexOf('swiper-slide-fully-visible') >= 0,\n isPrev: slideClasses.indexOf('swiper-slide-prev') >= 0,\n isNext: slideClasses.indexOf('swiper-slide-next') >= 0\n };\n const renderChildren = () => {\n return typeof children === 'function' ? children(slideData) : children;\n };\n const onLoad = () => {\n setLazyLoaded(true);\n };\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: slideElRef,\n className: uniqueClasses(`${slideClasses}${className ? ` ${className}` : ''}`),\n \"data-swiper-slide-index\": virtualIndex,\n onLoad: onLoad\n }, rest), zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-zoom-container\",\n \"data-swiper-zoom\": typeof zoom === 'number' ? zoom : undefined\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n }))), !zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n })));\n});\nSwiperSlide.displayName = 'SwiperSlide';\n\nexport { Swiper, SwiperSlide, useSwiper, useSwiperSlide };\n","import { e as elementChildren, c as createElement } from './utils.mjs';\n\nfunction createElementIfNotDefined(swiper, originalParams, params, checkProps) {\n if (swiper.params.createElements) {\n Object.keys(checkProps).forEach(key => {\n if (!params[key] && params.auto === true) {\n let element = elementChildren(swiper.el, `.${checkProps[key]}`)[0];\n if (!element) {\n element = createElement('div', checkProps[key]);\n element.className = checkProps[key];\n swiper.el.append(element);\n }\n params[key] = element;\n originalParams[key] = element;\n }\n });\n }\n return params;\n}\n\nexport { createElementIfNotDefined as c };\n","import { c as createElementIfNotDefined } from '../shared/create-element-if-not-defined.mjs';\nimport { m as makeElementsArray, s as setInnerHTML } from '../shared/utils.mjs';\n\nconst arrowSvg = `<svg class=\"swiper-navigation-icon\" width=\"11\" height=\"20\" viewBox=\"0 0 11 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z\" fill=\"currentColor\"/></svg>`;\nfunction Navigation({\n swiper,\n extendParams,\n on,\n emit\n}) {\n extendParams({\n navigation: {\n nextEl: null,\n prevEl: null,\n addIcons: true,\n hideOnClick: false,\n disabledClass: 'swiper-button-disabled',\n hiddenClass: 'swiper-button-hidden',\n lockClass: 'swiper-button-lock',\n navigationDisabledClass: 'swiper-navigation-disabled'\n }\n });\n swiper.navigation = {\n nextEl: null,\n prevEl: null,\n arrowSvg\n };\n function getEl(el) {\n let res;\n if (el && typeof el === 'string' && swiper.isElement) {\n res = swiper.el.querySelector(el) || swiper.hostEl.querySelector(el);\n if (res) return res;\n }\n if (el) {\n if (typeof el === 'string') res = [...document.querySelectorAll(el)];\n if (swiper.params.uniqueNavElements && typeof el === 'string' && res && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) {\n res = swiper.el.querySelector(el);\n } else if (res && res.length === 1) {\n res = res[0];\n }\n }\n if (el && !res) return el;\n // if (Array.isArray(res) && res.length === 1) res = res[0];\n return res;\n }\n function toggleEl(el, disabled) {\n const params = swiper.params.navigation;\n el = makeElementsArray(el);\n el.forEach(subEl => {\n if (subEl) {\n subEl.classList[disabled ? 'add' : 'remove'](...params.disabledClass.split(' '));\n if (subEl.tagName === 'BUTTON') subEl.disabled = disabled;\n if (swiper.params.watchOverflow && swiper.enabled) {\n subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);\n }\n }\n });\n }\n function update() {\n // Update Navigation Buttons\n const {\n nextEl,\n prevEl\n } = swiper.navigation;\n if (swiper.params.loop) {\n toggleEl(prevEl, false);\n toggleEl(nextEl, false);\n return;\n }\n toggleEl(prevEl, swiper.isBeginning && !swiper.params.rewind);\n toggleEl(nextEl, swiper.isEnd && !swiper.params.rewind);\n }\n function onPrevClick(e) {\n e.preventDefault();\n if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slidePrev();\n emit('navigationPrev');\n }\n function onNextClick(e) {\n e.preventDefault();\n if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;\n swiper.slideNext();\n emit('navigationNext');\n }\n function init() {\n const params = swiper.params.navigation;\n swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, {\n nextEl: 'swiper-button-next',\n prevEl: 'swiper-button-prev'\n });\n if (!(params.nextEl || params.prevEl)) return;\n let nextEl = getEl(params.nextEl);\n let prevEl = getEl(params.prevEl);\n Object.assign(swiper.navigation, {\n nextEl,\n prevEl\n });\n nextEl = makeElementsArray(nextEl);\n prevEl = makeElementsArray(prevEl);\n const initButton = (el, dir) => {\n if (el) {\n if (params.addIcons && el.matches('.swiper-button-next,.swiper-button-prev') && !el.querySelector('svg')) {\n const tempEl = document.createElement('div');\n setInnerHTML(tempEl, arrowSvg);\n el.appendChild(tempEl.querySelector('svg'));\n tempEl.remove();\n }\n el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick);\n }\n if (!swiper.enabled && el) {\n el.classList.add(...params.lockClass.split(' '));\n }\n };\n nextEl.forEach(el => initButton(el, 'next'));\n prevEl.forEach(el => initButton(el, 'prev'));\n }\n function destroy() {\n let {\n nextEl,\n prevEl\n } = swiper.navigation;\n nextEl = makeElementsArray(nextEl);\n prevEl = makeElementsArray(prevEl);\n const destroyButton = (el, dir) => {\n el.removeEventListener('click', dir === 'next' ? onNextClick : onPrevClick);\n el.classList.remove(...swiper.params.navigation.disabledClass.split(' '));\n };\n nextEl.forEach(el => destroyButton(el, 'next'));\n prevEl.forEach(el => destroyButton(el, 'prev'));\n }\n on('init', () => {\n if (swiper.params.navigation.enabled === false) {\n // eslint-disable-next-line\n disable();\n } else {\n init();\n update();\n }\n });\n on('toEdge fromEdge lock unlock', () => {\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n let {\n nextEl,\n prevEl\n } = swiper.navigation;\n nextEl = makeElementsArray(nextEl);\n prevEl = makeElementsArray(prevEl);\n if (swiper.enabled) {\n update();\n return;\n }\n [...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList.add(swiper.params.navigation.lockClass));\n });\n on('click', (_s, e) => {\n let {\n nextEl,\n prevEl\n } = swiper.navigation;\n nextEl = makeElementsArray(nextEl);\n prevEl = makeElementsArray(prevEl);\n const targetEl = e.target;\n let targetIsButton = prevEl.includes(targetEl) || nextEl.includes(targetEl);\n if (swiper.isElement && !targetIsButton) {\n const path = e.path || e.composedPath && e.composedPath();\n if (path) {\n targetIsButton = path.find(pathEl => nextEl.includes(pathEl) || prevEl.includes(pathEl));\n }\n }\n if (swiper.params.navigation.hideOnClick && !targetIsButton) {\n if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return;\n let isHidden;\n if (nextEl.length) {\n isHidden = nextEl[0].classList.contains(swiper.params.navigation.hiddenClass);\n } else if (prevEl.length) {\n isHidden = prevEl[0].classList.contains(swiper.params.navigation.hiddenClass);\n }\n if (isHidden === true) {\n emit('navigationShow');\n } else {\n emit('navigationHide');\n }\n [...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList.toggle(swiper.params.navigation.hiddenClass));\n }\n });\n const enable = () => {\n swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(' '));\n init();\n update();\n };\n const disable = () => {\n swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(' '));\n destroy();\n };\n Object.assign(swiper.navigation, {\n enable,\n disable,\n update,\n init,\n destroy\n });\n}\n\nexport { Navigation as default };\n","function classesToSelector(classes = '') {\n // Escape all CSS selector special characters\n return `.${classes.trim().replace(/([\\.:!+\\/()[\\]#>~*^$|=,'\"@{}\\\\])/g, '\\\\$1') // eslint-disable-line\n .replace(/ /g, '.')}`;\n}\n\nexport { classesToSelector as c };\n","import { c as classesToSelector } from '../shared/classes-to-selector.mjs';\nimport { c as createElementIfNotDefined } from '../shared/create-element-if-not-defined.mjs';\nimport { m as makeElementsArray, i as elementOuterSize, j as elementIndex, s as setInnerHTML, d as elementParents } from '../shared/utils.mjs';\n\nfunction Pagination({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const pfx = 'swiper-pagination';\n extendParams({\n pagination: {\n el: null,\n bulletElement: 'span',\n clickable: false,\n hideOnClick: false,\n renderBullet: null,\n renderProgressbar: null,\n renderFraction: null,\n renderCustom: null,\n progressbarOpposite: false,\n type: 'bullets',\n // 'bullets' or 'progressbar' or 'fraction' or 'custom'\n dynamicBullets: false,\n dynamicMainBullets: 1,\n formatFractionCurrent: number => number,\n formatFractionTotal: number => number,\n bulletClass: `${pfx}-bullet`,\n bulletActiveClass: `${pfx}-bullet-active`,\n modifierClass: `${pfx}-`,\n currentClass: `${pfx}-current`,\n totalClass: `${pfx}-total`,\n hiddenClass: `${pfx}-hidden`,\n progressbarFillClass: `${pfx}-progressbar-fill`,\n progressbarOppositeClass: `${pfx}-progressbar-opposite`,\n clickableClass: `${pfx}-clickable`,\n lockClass: `${pfx}-lock`,\n horizontalClass: `${pfx}-horizontal`,\n verticalClass: `${pfx}-vertical`,\n paginationDisabledClass: `${pfx}-disabled`\n }\n });\n swiper.pagination = {\n el: null,\n bullets: []\n };\n let bulletSize;\n let dynamicBulletIndex = 0;\n function isPaginationDisabled() {\n return !swiper.params.pagination.el || !swiper.pagination.el || Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0;\n }\n function setSideBullets(bulletEl, position) {\n const {\n bulletActiveClass\n } = swiper.params.pagination;\n if (!bulletEl) return;\n bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];\n if (bulletEl) {\n bulletEl.classList.add(`${bulletActiveClass}-${position}`);\n bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];\n if (bulletEl) {\n bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);\n }\n }\n }\n function getMoveDirection(prevIndex, nextIndex, length) {\n prevIndex = prevIndex % length;\n nextIndex = nextIndex % length;\n if (nextIndex === prevIndex + 1) {\n return 'next';\n } else if (nextIndex === prevIndex - 1) {\n return 'previous';\n }\n return;\n }\n function onBulletClick(e) {\n const bulletEl = e.target.closest(classesToSelector(swiper.params.pagination.bulletClass));\n if (!bulletEl) {\n return;\n }\n e.preventDefault();\n const index = elementIndex(bulletEl) * swiper.params.slidesPerGroup;\n if (swiper.params.loop) {\n if (swiper.realIndex === index) return;\n const moveDirection = getMoveDirection(swiper.realIndex, index, swiper.slides.length);\n if (moveDirection === 'next') {\n swiper.slideNext();\n } else if (moveDirection === 'previous') {\n swiper.slidePrev();\n } else {\n swiper.slideToLoop(index);\n }\n } else {\n swiper.slideTo(index);\n }\n }\n function update() {\n // Render || Update Pagination bullets/items\n const rtl = swiper.rtl;\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n let el = swiper.pagination.el;\n el = makeElementsArray(el);\n // Current/Total\n let current;\n let previousIndex;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;\n const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.loop) {\n previousIndex = swiper.previousRealIndex || 0;\n current = swiper.params.slidesPerGroup > 1 ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup) : swiper.realIndex;\n } else if (typeof swiper.snapIndex !== 'undefined') {\n current = swiper.snapIndex;\n previousIndex = swiper.previousSnapIndex;\n } else {\n previousIndex = swiper.previousIndex || 0;\n current = swiper.activeIndex || 0;\n }\n // Types\n if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {\n const bullets = swiper.pagination.bullets;\n let firstIndex;\n let lastIndex;\n let midIndex;\n if (params.dynamicBullets) {\n bulletSize = elementOuterSize(bullets[0], swiper.isHorizontal() ? 'width' : 'height', true);\n el.forEach(subEl => {\n subEl.style[swiper.isHorizontal() ? 'width' : 'height'] = `${bulletSize * (params.dynamicMainBullets + 4)}px`;\n });\n if (params.dynamicMainBullets > 1 && previousIndex !== undefined) {\n dynamicBulletIndex += current - (previousIndex || 0);\n if (dynamicBulletIndex > params.dynamicMainBullets - 1) {\n dynamicBulletIndex = params.dynamicMainBullets - 1;\n } else if (dynamicBulletIndex < 0) {\n dynamicBulletIndex = 0;\n }\n }\n firstIndex = Math.max(current - dynamicBulletIndex, 0);\n lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);\n midIndex = (lastIndex + firstIndex) / 2;\n }\n bullets.forEach(bulletEl => {\n const classesToRemove = [...['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`)].map(s => typeof s === 'string' && s.includes(' ') ? s.split(' ') : s).flat();\n bulletEl.classList.remove(...classesToRemove);\n });\n if (el.length > 1) {\n bullets.forEach(bullet => {\n const bulletIndex = elementIndex(bullet);\n if (bulletIndex === current) {\n bullet.classList.add(...params.bulletActiveClass.split(' '));\n } else if (swiper.isElement) {\n bullet.setAttribute('part', 'bullet');\n }\n if (params.dynamicBullets) {\n if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {\n bullet.classList.add(...`${params.bulletActiveClass}-main`.split(' '));\n }\n if (bulletIndex === firstIndex) {\n setSideBullets(bullet, 'prev');\n }\n if (bulletIndex === lastIndex) {\n setSideBullets(bullet, 'next');\n }\n }\n });\n } else {\n const bullet = bullets[current];\n if (bullet) {\n bullet.classList.add(...params.bulletActiveClass.split(' '));\n }\n if (swiper.isElement) {\n bullets.forEach((bulletEl, bulletIndex) => {\n bulletEl.setAttribute('part', bulletIndex === current ? 'bullet-active' : 'bullet');\n });\n }\n if (params.dynamicBullets) {\n const firstDisplayedBullet = bullets[firstIndex];\n const lastDisplayedBullet = bullets[lastIndex];\n for (let i = firstIndex; i <= lastIndex; i += 1) {\n if (bullets[i]) {\n bullets[i].classList.add(...`${params.bulletActiveClass}-main`.split(' '));\n }\n }\n setSideBullets(firstDisplayedBullet, 'prev');\n setSideBullets(lastDisplayedBullet, 'next');\n }\n }\n if (params.dynamicBullets) {\n const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);\n const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;\n const offsetProp = rtl ? 'right' : 'left';\n bullets.forEach(bullet => {\n bullet.style[swiper.isHorizontal() ? offsetProp : 'top'] = `${bulletsOffset}px`;\n });\n }\n }\n el.forEach((subEl, subElIndex) => {\n if (params.type === 'fraction') {\n subEl.querySelectorAll(classesToSelector(params.currentClass)).forEach(fractionEl => {\n fractionEl.textContent = params.formatFractionCurrent(current + 1);\n });\n subEl.querySelectorAll(classesToSelector(params.totalClass)).forEach(totalEl => {\n totalEl.textContent = params.formatFractionTotal(total);\n });\n }\n if (params.type === 'progressbar') {\n let progressbarDirection;\n if (params.progressbarOpposite) {\n progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';\n } else {\n progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';\n }\n const scale = (current + 1) / total;\n let scaleX = 1;\n let scaleY = 1;\n if (progressbarDirection === 'horizontal') {\n scaleX = scale;\n } else {\n scaleY = scale;\n }\n subEl.querySelectorAll(classesToSelector(params.progressbarFillClass)).forEach(progressEl => {\n progressEl.style.transform = `translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`;\n progressEl.style.transitionDuration = `${swiper.params.speed}ms`;\n });\n }\n if (params.type === 'custom' && params.renderCustom) {\n setInnerHTML(subEl, params.renderCustom(swiper, current + 1, total));\n if (subElIndex === 0) emit('paginationRender', subEl);\n } else {\n if (subElIndex === 0) emit('paginationRender', subEl);\n emit('paginationUpdate', subEl);\n }\n if (swiper.params.watchOverflow && swiper.enabled) {\n subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);\n }\n });\n }\n function render() {\n // Render Container\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.grid && swiper.params.grid.rows > 1 ? swiper.slides.length / Math.ceil(swiper.params.grid.rows) : swiper.slides.length;\n let el = swiper.pagination.el;\n el = makeElementsArray(el);\n let paginationHTML = '';\n if (params.type === 'bullets') {\n let numberOfBullets = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;\n if (swiper.params.freeMode && swiper.params.freeMode.enabled && numberOfBullets > slidesLength) {\n numberOfBullets = slidesLength;\n }\n for (let i = 0; i < numberOfBullets; i += 1) {\n if (params.renderBullet) {\n paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);\n } else {\n // prettier-ignore\n paginationHTML += `<${params.bulletElement} ${swiper.isElement ? 'part=\"bullet\"' : ''} class=\"${params.bulletClass}\"></${params.bulletElement}>`;\n }\n }\n }\n if (params.type === 'fraction') {\n if (params.renderFraction) {\n paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);\n } else {\n paginationHTML = `<span class=\"${params.currentClass}\"></span>` + ' / ' + `<span class=\"${params.totalClass}\"></span>`;\n }\n }\n if (params.type === 'progressbar') {\n if (params.renderProgressbar) {\n paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);\n } else {\n paginationHTML = `<span class=\"${params.progressbarFillClass}\"></span>`;\n }\n }\n swiper.pagination.bullets = [];\n el.forEach(subEl => {\n if (params.type !== 'custom') {\n setInnerHTML(subEl, paginationHTML || '');\n }\n if (params.type === 'bullets') {\n swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass)));\n }\n });\n if (params.type !== 'custom') {\n emit('paginationRender', el[0]);\n }\n }\n function init() {\n swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {\n el: 'swiper-pagination'\n });\n const params = swiper.params.pagination;\n if (!params.el) return;\n let el;\n if (typeof params.el === 'string' && swiper.isElement) {\n el = swiper.el.querySelector(params.el);\n }\n if (!el && typeof params.el === 'string') {\n el = [...document.querySelectorAll(params.el)];\n }\n if (!el) {\n el = params.el;\n }\n if (!el || el.length === 0) return;\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) {\n el = [...swiper.el.querySelectorAll(params.el)];\n // check if it belongs to another nested Swiper\n if (el.length > 1) {\n el = el.find(subEl => {\n if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false;\n return true;\n });\n }\n }\n if (Array.isArray(el) && el.length === 1) el = el[0];\n Object.assign(swiper.pagination, {\n el\n });\n el = makeElementsArray(el);\n el.forEach(subEl => {\n if (params.type === 'bullets' && params.clickable) {\n subEl.classList.add(...(params.clickableClass || '').split(' '));\n }\n subEl.classList.add(params.modifierClass + params.type);\n subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n if (params.type === 'bullets' && params.dynamicBullets) {\n subEl.classList.add(`${params.modifierClass}${params.type}-dynamic`);\n dynamicBulletIndex = 0;\n if (params.dynamicMainBullets < 1) {\n params.dynamicMainBullets = 1;\n }\n }\n if (params.type === 'progressbar' && params.progressbarOpposite) {\n subEl.classList.add(params.progressbarOppositeClass);\n }\n if (params.clickable) {\n subEl.addEventListener('click', onBulletClick);\n }\n if (!swiper.enabled) {\n subEl.classList.add(params.lockClass);\n }\n });\n }\n function destroy() {\n const params = swiper.params.pagination;\n if (isPaginationDisabled()) return;\n let el = swiper.pagination.el;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => {\n subEl.classList.remove(params.hiddenClass);\n subEl.classList.remove(params.modifierClass + params.type);\n subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n if (params.clickable) {\n subEl.classList.remove(...(params.clickableClass || '').split(' '));\n subEl.removeEventListener('click', onBulletClick);\n }\n });\n }\n if (swiper.pagination.bullets) swiper.pagination.bullets.forEach(subEl => subEl.classList.remove(...params.bulletActiveClass.split(' ')));\n }\n on('changeDirection', () => {\n if (!swiper.pagination || !swiper.pagination.el) return;\n const params = swiper.params.pagination;\n let {\n el\n } = swiper.pagination;\n el = makeElementsArray(el);\n el.forEach(subEl => {\n subEl.classList.remove(params.horizontalClass, params.verticalClass);\n subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n });\n });\n on('init', () => {\n if (swiper.params.pagination.enabled === false) {\n // eslint-disable-next-line\n disable();\n } else {\n init();\n render();\n update();\n }\n });\n on('activeIndexChange', () => {\n if (typeof swiper.snapIndex === 'undefined') {\n update();\n }\n });\n on('snapIndexChange', () => {\n update();\n });\n on('snapGridLengthChange', () => {\n render();\n update();\n });\n on('destroy', () => {\n destroy();\n });\n on('enable disable', () => {\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.pagination.lockClass));\n }\n });\n on('lock unlock', () => {\n update();\n });\n on('click', (_s, e) => {\n const targetEl = e.target;\n const el = makeElementsArray(swiper.pagination.el);\n if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && el && el.length > 0 && !targetEl.classList.contains(swiper.params.pagination.bulletClass)) {\n if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;\n const isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass);\n if (isHidden === true) {\n emit('paginationShow');\n } else {\n emit('paginationHide');\n }\n el.forEach(subEl => subEl.classList.toggle(swiper.params.pagination.hiddenClass));\n }\n });\n const enable = () => {\n swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass);\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList.remove(swiper.params.pagination.paginationDisabledClass));\n }\n init();\n render();\n update();\n };\n const disable = () => {\n swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass);\n let {\n el\n } = swiper.pagination;\n if (el) {\n el = makeElementsArray(el);\n el.forEach(subEl => subEl.classList.add(swiper.params.pagination.paginationDisabledClass));\n }\n destroy();\n };\n Object.assign(swiper.pagination, {\n enable,\n disable,\n render,\n update,\n init,\n destroy\n });\n}\n\nexport { Pagination as default };\n","import { g as getDocument } from '../shared/ssr-window.esm.mjs';\n\n/* eslint no-underscore-dangle: \"off\" */\n/* eslint no-use-before-define: \"off\" */\nfunction Autoplay({\n swiper,\n extendParams,\n on,\n emit,\n params\n}) {\n swiper.autoplay = {\n running: false,\n paused: false,\n timeLeft: 0\n };\n extendParams({\n autoplay: {\n enabled: false,\n delay: 3000,\n waitForTransition: true,\n disableOnInteraction: false,\n stopOnLastSlide: false,\n reverseDirection: false,\n pauseOnMouseEnter: false\n }\n });\n let timeout;\n let raf;\n let autoplayDelayTotal = params && params.autoplay ? params.autoplay.delay : 3000;\n let autoplayDelayCurrent = params && params.autoplay ? params.autoplay.delay : 3000;\n let autoplayTimeLeft;\n let autoplayStartTime = new Date().getTime();\n let wasPaused;\n let isTouched;\n let pausedByTouch;\n let touchStartTimeout;\n let pausedByInteraction;\n let pausedByPointerEnter;\n function onTransitionEnd(e) {\n if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;\n if (e.target !== swiper.wrapperEl) return;\n swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd);\n if (pausedByPointerEnter || e.detail && e.detail.bySwiperTouchMove) {\n return;\n }\n resume();\n }\n const calcTimeLeft = () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (swiper.autoplay.paused) {\n wasPaused = true;\n } else if (wasPaused) {\n autoplayDelayCurrent = autoplayTimeLeft;\n wasPaused = false;\n }\n const timeLeft = swiper.autoplay.paused ? autoplayTimeLeft : autoplayStartTime + autoplayDelayCurrent - new Date().getTime();\n swiper.autoplay.timeLeft = timeLeft;\n emit('autoplayTimeLeft', timeLeft, timeLeft / autoplayDelayTotal);\n raf = requestAnimationFrame(() => {\n calcTimeLeft();\n });\n };\n const getSlideDelay = () => {\n let activeSlideEl;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n activeSlideEl = swiper.slides.find(slideEl => slideEl.classList.contains('swiper-slide-active'));\n } else {\n activeSlideEl = swiper.slides[swiper.activeIndex];\n }\n if (!activeSlideEl) return undefined;\n const currentSlideDelay = parseInt(activeSlideEl.getAttribute('data-swiper-autoplay'), 10);\n return currentSlideDelay;\n };\n const getTotalDelay = () => {\n let totalDelay = swiper.params.autoplay.delay;\n const currentSlideDelay = getSlideDelay();\n if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0) {\n totalDelay = currentSlideDelay;\n }\n return totalDelay;\n };\n const run = delayForce => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n cancelAnimationFrame(raf);\n calcTimeLeft();\n let delay = delayForce;\n if (typeof delay === 'undefined') {\n delay = getTotalDelay();\n autoplayDelayTotal = delay;\n autoplayDelayCurrent = delay;\n }\n autoplayTimeLeft = delay;\n const speed = swiper.params.speed;\n const proceed = () => {\n if (!swiper || swiper.destroyed) return;\n if (swiper.params.autoplay.reverseDirection) {\n if (!swiper.isBeginning || swiper.params.loop || swiper.params.rewind) {\n swiper.slidePrev(speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n swiper.slideTo(swiper.slides.length - 1, speed, true, true);\n emit('autoplay');\n }\n } else {\n if (!swiper.isEnd || swiper.params.loop || swiper.params.rewind) {\n swiper.slideNext(speed, true, true);\n emit('autoplay');\n } else if (!swiper.params.autoplay.stopOnLastSlide) {\n swiper.slideTo(0, speed, true, true);\n emit('autoplay');\n }\n }\n if (swiper.params.cssMode) {\n autoplayStartTime = new Date().getTime();\n requestAnimationFrame(() => {\n run();\n });\n }\n };\n if (delay > 0) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n proceed();\n }, delay);\n } else {\n requestAnimationFrame(() => {\n proceed();\n });\n }\n\n // eslint-disable-next-line\n return delay;\n };\n const start = () => {\n autoplayStartTime = new Date().getTime();\n swiper.autoplay.running = true;\n run();\n emit('autoplayStart');\n };\n const stop = () => {\n swiper.autoplay.running = false;\n clearTimeout(timeout);\n cancelAnimationFrame(raf);\n emit('autoplayStop');\n };\n const pause = (internal, reset) => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n clearTimeout(timeout);\n if (!internal) {\n pausedByInteraction = true;\n }\n const proceed = () => {\n emit('autoplayPause');\n if (swiper.params.autoplay.waitForTransition) {\n swiper.wrapperEl.addEventListener('transitionend', onTransitionEnd);\n } else {\n resume();\n }\n };\n swiper.autoplay.paused = true;\n if (reset) {\n proceed();\n return;\n }\n const delay = autoplayTimeLeft || swiper.params.autoplay.delay;\n autoplayTimeLeft = delay - (new Date().getTime() - autoplayStartTime);\n if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop) return;\n if (autoplayTimeLeft < 0) autoplayTimeLeft = 0;\n proceed();\n };\n const resume = () => {\n if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop || swiper.destroyed || !swiper.autoplay.running) return;\n autoplayStartTime = new Date().getTime();\n if (pausedByInteraction) {\n pausedByInteraction = false;\n run(autoplayTimeLeft);\n } else {\n run();\n }\n swiper.autoplay.paused = false;\n emit('autoplayResume');\n };\n const onVisibilityChange = () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n const document = getDocument();\n if (document.visibilityState === 'hidden') {\n pausedByInteraction = true;\n pause(true);\n }\n if (document.visibilityState === 'visible') {\n resume();\n }\n };\n const onPointerEnter = e => {\n if (e.pointerType !== 'mouse') return;\n pausedByInteraction = true;\n pausedByPointerEnter = true;\n if (swiper.animating || swiper.autoplay.paused) return;\n pause(true);\n };\n const onPointerLeave = e => {\n if (e.pointerType !== 'mouse') return;\n pausedByPointerEnter = false;\n if (swiper.autoplay.paused) {\n resume();\n }\n };\n const attachMouseEvents = () => {\n if (swiper.params.autoplay.pauseOnMouseEnter) {\n swiper.el.addEventListener('pointerenter', onPointerEnter);\n swiper.el.addEventListener('pointerleave', onPointerLeave);\n }\n };\n const detachMouseEvents = () => {\n if (swiper.el && typeof swiper.el !== 'string') {\n swiper.el.removeEventListener('pointerenter', onPointerEnter);\n swiper.el.removeEventListener('pointerleave', onPointerLeave);\n }\n };\n const attachDocumentEvents = () => {\n const document = getDocument();\n document.addEventListener('visibilitychange', onVisibilityChange);\n };\n const detachDocumentEvents = () => {\n const document = getDocument();\n document.removeEventListener('visibilitychange', onVisibilityChange);\n };\n on('init', () => {\n if (swiper.params.autoplay.enabled) {\n attachMouseEvents();\n attachDocumentEvents();\n start();\n }\n });\n on('destroy', () => {\n detachMouseEvents();\n detachDocumentEvents();\n if (swiper.autoplay.running) {\n stop();\n }\n });\n on('_freeModeStaticRelease', () => {\n if (pausedByTouch || pausedByInteraction) {\n resume();\n }\n });\n on('_freeModeNoMomentumRelease', () => {\n if (!swiper.params.autoplay.disableOnInteraction) {\n pause(true, true);\n } else {\n stop();\n }\n });\n on('beforeTransitionStart', (_s, speed, internal) => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (internal || !swiper.params.autoplay.disableOnInteraction) {\n pause(true, true);\n } else {\n stop();\n }\n });\n on('sliderFirstMove', () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (swiper.params.autoplay.disableOnInteraction) {\n stop();\n return;\n }\n isTouched = true;\n pausedByTouch = false;\n pausedByInteraction = false;\n touchStartTimeout = setTimeout(() => {\n pausedByInteraction = true;\n pausedByTouch = true;\n pause(true);\n }, 200);\n });\n on('touchEnd', () => {\n if (swiper.destroyed || !swiper.autoplay.running || !isTouched) return;\n clearTimeout(touchStartTimeout);\n clearTimeout(timeout);\n if (swiper.params.autoplay.disableOnInteraction) {\n pausedByTouch = false;\n isTouched = false;\n return;\n }\n if (pausedByTouch && swiper.params.cssMode) resume();\n pausedByTouch = false;\n isTouched = false;\n });\n on('slideChange', () => {\n if (swiper.destroyed || !swiper.autoplay.running) return;\n if (swiper.autoplay.paused) {\n autoplayTimeLeft = getTotalDelay();\n autoplayDelayTotal = getTotalDelay();\n }\n });\n Object.assign(swiper.autoplay, {\n start,\n stop,\n pause,\n resume\n });\n}\n\nexport { Autoplay as default };\n","'use client';\n\nimport { Swiper, SwiperSlide } from 'swiper/react';\nimport 'swiper/css';\nimport 'swiper/css/pagination';\nimport 'swiper/css/navigation';\n\nimport { Autoplay, Navigation, Pagination } from 'swiper/modules';\n\ninterface CarouselProps {\n images: string[];\n autoPlay?: false | number;\n}\n\nexport const Carousel = ({ images, autoPlay = false }: CarouselProps) => {\n if (images.length === 0) {\n return null;\n }\n\n const swipers = images.map((image) => (\n <SwiperSlide>\n <img src={image} />\n </SwiperSlide>\n ));\n\n return (\n <Swiper\n spaceBetween={30}\n centeredSlides={true}\n autoplay={\n typeof autoPlay === 'number'\n ? {\n delay: autoPlay,\n disableOnInteraction: false,\n }\n : undefined\n }\n pagination={{\n clickable: true,\n }}\n navigation={true}\n modules={[Autoplay, Pagination, Navigation]}\n className=\"swiper\"\n >\n {swipers}\n </Swiper>\n );\n};\n","import { useRef, useState } from 'react';\nimport type { ReactNode, KeyboardEvent } from 'react';\nimport { Input } from '../common/Input/Input';\n\nexport interface CurrencyOption {\n code: string;\n symbol: string;\n label: string;\n}\n\nexport interface LocaleOption {\n code: string;\n label: string;\n flag?: string;\n}\n\nexport interface HeaderProps {\n /** Logo — ReactNode (image, SVG, text) */\n logo?: ReactNode;\n /** Search placeholder */\n searchPlaceholder?: string;\n onSearch?: (query: string) => void;\n /** Cart */\n cartItemCount?: number;\n onCartClick?: () => void;\n /** Customer */\n isLoggedIn?: boolean;\n customerName?: string;\n onCustomerClick?: () => void;\n /** Currency */\n currencies?: CurrencyOption[];\n selectedCurrency?: string;\n onCurrencyChange?: (code: string) => void;\n /** Locale / eshop */\n locales?: LocaleOption[];\n selectedLocale?: string;\n onLocaleChange?: (code: string) => void;\n /** Extra right slot */\n rightSlot?: ReactNode;\n}\n\n// ─── Small internal dropdown ────────────────────────────────────────────────\n\ninterface DropdownProps<T extends { label: string }> {\n trigger: ReactNode;\n items: T[];\n onSelect: (item: T) => void;\n getKey: (item: T) => string;\n renderItem?: (item: T) => ReactNode;\n}\n\nfunction Dropdown<T extends { label: string }>({\n trigger,\n items,\n onSelect,\n getKey,\n renderItem,\n}: DropdownProps<T>) {\n const [open, setOpen] = useState(false);\n const ref = useRef<HTMLDivElement>(null);\n\n const close = () => setOpen(false);\n\n // Close on outside click\n const handleBlur = (e: React.FocusEvent) => {\n if (!ref.current?.contains(e.relatedTarget as Node)) close();\n };\n\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') close();\n };\n\n return (\n <div ref={ref} className=\"relative\" onBlur={handleBlur} onKeyDown={onKey}>\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => setOpen((v) => !v)}\n onKeyDown={(e) => e.key === 'Enter' && setOpen((v) => !v)}\n className=\"cursor-pointer\"\n >\n {trigger}\n </div>\n {open && (\n <ul\n role=\"menu\"\n className=\"absolute right-0 top-full mt-1 z-50 min-w-28 bg-white rounded-lg shadow-lg border border-gray-100 py-1 text-sm\"\n >\n {items.map((item) => (\n <li key={getKey(item)} role=\"none\">\n <button\n role=\"menuitem\"\n className=\"w-full px-3 py-1.5 text-left hover:bg-gray-50 text-gray-700 whitespace-nowrap\"\n onClick={() => {\n onSelect(item);\n close();\n }}\n >\n {renderItem ? renderItem(item) : item.label}\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\n\n// ─── Search icon ─────────────────────────────────────────────────────────────\n\nfunction SearchIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 15.803a7.5 7.5 0 0010.607 10.607z\"\n />\n </svg>\n );\n}\n\n// ─── Header ──────────────────────────────────────────────────────────────────\n\nexport function Header({\n logo,\n searchPlaceholder = 'Hledat produkty…',\n onSearch,\n cartItemCount = 0,\n onCartClick,\n isLoggedIn = false,\n customerName,\n onCustomerClick,\n currencies = [],\n selectedCurrency,\n onCurrencyChange,\n locales = [],\n selectedLocale,\n onLocaleChange,\n rightSlot,\n}: HeaderProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const activeCurrency = currencies.find((c) => c.code === selectedCurrency);\n const activeLocale = locales.find((l) => l.code === selectedLocale);\n\n const handleSearchKey = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') onSearch?.(searchQuery);\n };\n\n return (\n <header className=\"bg-white border-b border-gray-200 sticky top-0 z-40\">\n <div className=\"max-w-7xl mx-auto px-4 h-16 flex items-center gap-4\">\n {/* Logo */}\n <div className=\"shrink-0\">\n {logo ?? (\n <span className=\"text-xl font-bold text-primary-600 tracking-tight\">\n shopito\n </span>\n )}\n </div>\n\n {/* Search */}\n <div className=\"flex-1 max-w-xl\">\n <Input\n placeholder={searchPlaceholder}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n onKeyDown={handleSearchKey}\n leftIcon={<SearchIcon />}\n rightIcon={\n searchQuery ? (\n <button\n onClick={() => {\n setSearchQuery('');\n onSearch?.('');\n }}\n className=\"hover:text-gray-600 transition-colors\"\n aria-label=\"Clear search\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-3.5 h-3.5\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n ) : undefined\n }\n />\n </div>\n\n {/* Right controls */}\n <div className=\"flex items-center gap-1 shrink-0 ml-auto\">\n {/* Currency switcher */}\n {currencies.length > 0 && (\n <Dropdown\n trigger={\n <button className=\"flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors font-medium\">\n <span>{activeCurrency?.symbol ?? selectedCurrency}</span>\n <span className=\"text-xs text-gray-400\">\n {activeCurrency?.code ?? selectedCurrency}\n </span>\n <ChevronDown className=\"w-3 h-3 text-gray-400\" />\n </button>\n }\n items={currencies}\n getKey={(c) => c.code}\n onSelect={(c) => onCurrencyChange?.(c.code)}\n renderItem={(c) => (\n <span className=\"flex items-center gap-2\">\n <span className=\"w-6 text-center font-medium text-gray-500\">\n {c.symbol}\n </span>\n <span>{c.label}</span>\n </span>\n )}\n />\n )}\n\n {/* Locale switcher */}\n {locales.length > 0 && (\n <Dropdown\n trigger={\n <button className=\"flex items-center gap-1 px-2 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors\">\n {activeLocale?.flag && (\n <span className=\"text-base leading-none\">\n {activeLocale.flag}\n </span>\n )}\n <span className=\"font-medium uppercase\">\n {activeLocale?.code ?? selectedLocale}\n </span>\n <ChevronDown className=\"w-3 h-3 text-gray-400\" />\n </button>\n }\n items={locales}\n getKey={(l) => l.code}\n onSelect={(l) => onLocaleChange?.(l.code)}\n renderItem={(l) => (\n <span className=\"flex items-center gap-2\">\n {l.flag && <span className=\"text-base\">{l.flag}</span>}\n <span>{l.label}</span>\n </span>\n )}\n />\n )}\n\n {/* Divider */}\n {(currencies.length > 0 || locales.length > 0) && (\n <div className=\"w-px h-5 bg-gray-200 mx-1\" />\n )}\n\n {/* Customer button */}\n <button\n onClick={onCustomerClick}\n className=\"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors\"\n aria-label={isLoggedIn ? 'My account' : 'Sign in'}\n >\n {isLoggedIn ? (\n <>\n <div className=\"w-6 h-6 rounded-full bg-primary-600 text-white flex items-center justify-center text-xs font-bold\">\n {(customerName ?? 'U')[0].toUpperCase()}\n </div>\n {customerName && (\n <span className=\"hidden sm:block font-medium max-w-32 truncate\">\n {customerName}\n </span>\n )}\n </>\n ) : (\n <>\n <UserIcon className=\"w-5 h-5\" />\n <span className=\"hidden sm:block font-medium\">\n Přihlásit se\n </span>\n </>\n )}\n </button>\n\n {/* Cart */}\n <button\n onClick={onCartClick}\n className=\"relative flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-sm text-gray-600 hover:bg-gray-50 transition-colors\"\n aria-label={`Cart, ${cartItemCount} items`}\n >\n <CartIcon className=\"w-5 h-5\" />\n <span className=\"hidden sm:block font-medium\">Košík</span>\n {cartItemCount > 0 && (\n <span className=\"absolute -top-0.5 -right-0.5 min-w-4.5 h-4.5 flex items-center justify-center rounded-full bg-primary-600 text-white text-[10px] font-bold leading-none px-1\">\n {cartItemCount > 99 ? '99+' : cartItemCount}\n </span>\n )}\n </button>\n\n {rightSlot}\n </div>\n </div>\n </header>\n );\n}\n\n// ─── Icon helpers ─────────────────────────────────────────────────────────────\n\nfunction ChevronDown({ className }: { className?: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className={className}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\"\n />\n </svg>\n );\n}\n\nfunction UserIcon({ className }: { className?: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className={className}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z\"\n />\n </svg>\n );\n}\n\nfunction CartIcon({ className }: { className?: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className={className}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z\"\n />\n </svg>\n );\n}\n","import { useState } from 'react'\n\nexport interface Category {\n id: string\n label: string\n icon?: string\n count?: number\n children?: Category[]\n}\n\nexport interface CategoryTreeProps {\n categories: Category[]\n activeId?: string\n onSelect?: (category: Category) => void\n /** Show product counts */\n showCounts?: boolean\n /** All nodes expanded by default */\n defaultExpandAll?: boolean\n className?: string\n}\n\ninterface TreeNodeProps {\n node: Category\n activeId: string | undefined\n onSelect: (category: Category) => void\n showCounts: boolean\n depth: number\n defaultExpandAll: boolean\n}\n\nfunction TreeNode({\n node,\n activeId,\n onSelect,\n showCounts,\n depth,\n defaultExpandAll,\n}: TreeNodeProps) {\n const hasChildren = node.children && node.children.length > 0\n const [expanded, setExpanded] = useState(defaultExpandAll || isAncestorOf(node, activeId))\n const isActive = node.id === activeId\n\n return (\n <li>\n <div\n className={[\n 'group flex items-center gap-1.5 rounded-lg px-2 py-1.5 cursor-pointer select-none',\n 'transition-colors text-sm',\n isActive\n ? 'bg-primary-50 text-primary-700 font-medium'\n : 'text-gray-700 hover:bg-gray-50 hover:text-gray-900',\n depth > 0 ? `ml-${Math.min(depth * 4, 8)}` : '',\n ]\n .filter(Boolean)\n .join(' ')}\n style={depth > 0 ? { marginLeft: depth * 16 } : undefined}\n onClick={() => {\n onSelect(node)\n if (hasChildren) setExpanded((v) => !v)\n }}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n onSelect(node)\n if (hasChildren) setExpanded((v) => !v)\n }\n }}\n aria-expanded={hasChildren ? expanded : undefined}\n >\n {/* Expand toggle */}\n {hasChildren ? (\n <span\n className={`shrink-0 text-gray-400 transition-transform duration-150 ${expanded ? 'rotate-90' : ''}`}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-3.5 h-3.5\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\" />\n </svg>\n </span>\n ) : (\n <span className=\"w-3.5 shrink-0\" />\n )}\n\n {/* Icon */}\n {node.icon && <span className=\"text-base leading-none\">{node.icon}</span>}\n\n {/* Label */}\n <span className=\"flex-1 truncate\">{node.label}</span>\n\n {/* Count */}\n {showCounts && node.count !== undefined && (\n <span\n className={`text-xs rounded-full px-1.5 py-0.5 font-medium ${\n isActive ? 'bg-primary-100 text-primary-600' : 'bg-gray-100 text-gray-500'\n }`}\n >\n {node.count}\n </span>\n )}\n </div>\n\n {/* Children */}\n {hasChildren && expanded && (\n <ul role=\"group\">\n {node.children!.map((child) => (\n <TreeNode\n key={child.id}\n node={child}\n activeId={activeId}\n onSelect={onSelect}\n showCounts={showCounts}\n depth={depth + 1}\n defaultExpandAll={defaultExpandAll}\n />\n ))}\n </ul>\n )}\n </li>\n )\n}\n\nfunction isAncestorOf(node: Category, activeId: string | undefined): boolean {\n if (!activeId) return false\n if (!node.children) return false\n return node.children.some(\n (c) => c.id === activeId || isAncestorOf(c, activeId),\n )\n}\n\nexport function CategoryTree({\n categories,\n activeId,\n onSelect,\n showCounts = true,\n defaultExpandAll = false,\n className = '',\n ...props\n}: CategoryTreeProps) {\n const handleSelect = (cat: Category) => onSelect?.(cat)\n\n return (\n <nav\n aria-label=\"Category navigation\"\n className={['w-full', className].filter(Boolean).join(' ')}\n {...props}\n >\n <ul role=\"tree\" className=\"space-y-0.5\">\n {categories.map((cat) => (\n <TreeNode\n key={cat.id}\n node={cat}\n activeId={activeId}\n onSelect={handleSelect}\n showCounts={showCounts}\n depth={0}\n defaultExpandAll={defaultExpandAll}\n />\n ))}\n </ul>\n </nav>\n )\n}\n","import { useState, useRef } from 'react'\n\nexport interface MegaMenuSubItem {\n id: string\n label: string\n href?: string\n badge?: string\n}\n\nexport interface MegaMenuColumn {\n heading?: string\n items: MegaMenuSubItem[]\n}\n\nexport interface MegaMenuFeatured {\n image?: string\n eyebrow?: string\n title: string\n description?: string\n cta?: string\n href?: string\n}\n\nexport interface MegaMenuItem {\n id: string\n label: string\n icon?: string\n href?: string\n /** If columns are present, hovering opens the mega panel */\n columns?: MegaMenuColumn[]\n featured?: MegaMenuFeatured\n}\n\nexport interface MegaMenuProps {\n items: MegaMenuItem[]\n activeId?: string\n onNavigate?: (item: MegaMenuSubItem | MegaMenuItem) => void\n}\n\n// ─── Mega panel ──────────────────────────────────────────────────────────────\n\ninterface MegaPanelProps {\n item: MegaMenuItem\n onNavigate: (subItem: MegaMenuSubItem | MegaMenuItem) => void\n onClose: () => void\n}\n\nfunction MegaPanel({ item, onNavigate, onClose }: MegaPanelProps) {\n if (!item.columns?.length) return null\n\n return (\n <div className=\"absolute left-0 right-0 top-full z-50 bg-white border-b border-gray-200 shadow-lg\">\n <div className=\"max-w-7xl mx-auto px-4 py-6 flex gap-8\">\n {/* Columns */}\n <div className=\"flex-1 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6\">\n {item.columns.map((col, ci) => (\n <div key={ci}>\n {col.heading && (\n <p className=\"text-xs font-semibold uppercase tracking-wider text-gray-400 mb-2\">\n {col.heading}\n </p>\n )}\n <ul className=\"space-y-1\">\n {col.items.map((sub) => (\n <li key={sub.id}>\n <button\n className=\"flex items-center gap-1.5 text-sm text-gray-700 hover:text-primary-600 transition-colors py-0.5\"\n onClick={() => {\n onNavigate(sub)\n onClose()\n }}\n >\n {sub.label}\n {sub.badge && (\n <span className=\"text-[10px] font-semibold px-1.5 py-0.5 rounded-full bg-danger-50 text-danger-600 leading-none\">\n {sub.badge}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n\n {/* Featured card */}\n {item.featured && (\n <div className=\"w-52 shrink-0\">\n <button\n className=\"group block w-full rounded-xl overflow-hidden border border-gray-100 text-left hover:shadow-md transition-shadow\"\n onClick={() => {\n onNavigate(item)\n onClose()\n }}\n >\n {item.featured.image ? (\n <img\n src={item.featured.image}\n alt={item.featured.title}\n className=\"w-full h-28 object-cover\"\n />\n ) : (\n <div className=\"w-full h-28 bg-linear-to-br from-primary-100 to-primary-200 flex items-center justify-center text-4xl\">\n {item.icon ?? '🛍️'}\n </div>\n )}\n <div className=\"p-3\">\n {item.featured.eyebrow && (\n <p className=\"text-[10px] font-semibold uppercase tracking-wider text-primary-500 mb-0.5\">\n {item.featured.eyebrow}\n </p>\n )}\n <p className=\"text-sm font-semibold text-gray-900 group-hover:text-primary-600 transition-colors\">\n {item.featured.title}\n </p>\n {item.featured.description && (\n <p className=\"text-xs text-gray-500 mt-0.5 line-clamp-2\">\n {item.featured.description}\n </p>\n )}\n {item.featured.cta && (\n <span className=\"inline-block mt-2 text-xs font-medium text-primary-600\">\n {item.featured.cta} →\n </span>\n )}\n </div>\n </button>\n </div>\n )}\n </div>\n </div>\n )\n}\n\n// ─── MegaMenu ────────────────────────────────────────────────────────────────\n\nexport function MegaMenu({\n items,\n activeId,\n onNavigate,\n}: MegaMenuProps) {\n const [openId, setOpenId] = useState<string | null>(null)\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n const open = (id: string) => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n setOpenId(id)\n }\n\n const scheduleClose = () => {\n timeoutRef.current = setTimeout(() => setOpenId(null), 120)\n }\n\n const cancelClose = () => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n }\n\n const activeItem = items.find((i) => i.id === openId)\n\n return (\n <nav\n aria-label=\"Main navigation\"\n className=\"relative bg-white border-b border-gray-100\"\n onMouseLeave={scheduleClose}\n >\n <div className=\"max-w-7xl mx-auto px-4\">\n <ul className=\"flex items-center gap-0\" role=\"menubar\">\n {items.map((item) => {\n const hasMega = !!item.columns?.length\n const isOpen = openId === item.id\n const isActive = activeId === item.id\n\n return (\n <li key={item.id} role=\"none\">\n <button\n role=\"menuitem\"\n aria-haspopup={hasMega ? 'true' : undefined}\n aria-expanded={hasMega ? isOpen : undefined}\n className={[\n 'flex items-center gap-1.5 px-4 py-3.5 text-sm font-medium transition-colors relative',\n 'outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500',\n isActive || isOpen\n ? 'text-primary-600'\n : 'text-gray-700 hover:text-gray-900',\n isOpen\n ? 'after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary-600'\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onMouseEnter={() => hasMega ? open(item.id) : setOpenId(null)}\n onFocus={() => hasMega && open(item.id)}\n onClick={() => {\n if (!hasMega) {\n onNavigate?.(item)\n setOpenId(null)\n }\n }}\n >\n {item.icon && <span className=\"text-base leading-none\">{item.icon}</span>}\n {item.label}\n {hasMega && (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className={`w-3.5 h-3.5 transition-transform duration-150 ${isOpen ? 'rotate-180' : ''}`}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\"\n />\n </svg>\n )}\n </button>\n </li>\n )\n })}\n </ul>\n </div>\n\n {/* Mega panel */}\n {activeItem?.columns?.length && (\n <div\n onMouseEnter={cancelClose}\n onMouseLeave={scheduleClose}\n >\n <MegaPanel\n item={activeItem}\n onNavigate={(sub) => onNavigate?.(sub)}\n onClose={() => setOpenId(null)}\n />\n </div>\n )}\n </nav>\n )\n}\n","import { useState, useEffect, useCallback, useRef } from 'react'\n\nexport interface Banner {\n id: string\n /** Background image URL or gradient CSS value */\n backgroundImage?: string\n backgroundColor?: string\n /** Overlaid text content */\n eyebrow?: string\n title: string\n subtitle?: string\n ctaLabel?: string\n ctaHref?: string\n onCtaClick?: () => void\n /** Image on the right side of the banner */\n sideImage?: string\n /** Text colors — default to white for dark backgrounds */\n textColor?: 'light' | 'dark'\n}\n\nexport interface BannerCarouselProps {\n banners: Banner[]\n autoPlay?: boolean\n autoPlayInterval?: number\n /** Show arrow navigation */\n arrows?: boolean\n /** Show dot indicators */\n dots?: boolean\n className?: string\n /** Aspect ratio of the banner — default 3/1 */\n aspectRatio?: string\n}\n\nexport function BannerCarousel({\n banners,\n autoPlay = true,\n autoPlayInterval = 5000,\n arrows = true,\n dots = true,\n className = '',\n aspectRatio = '3 / 1',\n}: BannerCarouselProps) {\n const [current, setCurrent] = useState(0)\n const [paused, setPaused] = useState(false)\n const timerRef = useRef<ReturnType<typeof setInterval> | null>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n\n const count = banners.length\n\n const goTo = useCallback(\n (index: number) => {\n setCurrent(((index % count) + count) % count)\n },\n [count],\n )\n\n const prev = () => goTo(current - 1)\n const next = useCallback(() => goTo(current + 1), [current, goTo])\n\n // Auto-play\n useEffect(() => {\n if (!autoPlay || paused || count <= 1) return\n timerRef.current = setInterval(next, autoPlayInterval)\n return () => {\n if (timerRef.current) clearInterval(timerRef.current)\n }\n }, [autoPlay, paused, autoPlayInterval, next, count])\n\n // Swipe support\n const touchStartX = useRef<number | null>(null)\n const handleTouchStart = (e: React.TouchEvent) => {\n touchStartX.current = e.touches[0].clientX\n }\n const handleTouchEnd = (e: React.TouchEvent) => {\n if (touchStartX.current === null) return\n const delta = e.changedTouches[0].clientX - touchStartX.current\n if (Math.abs(delta) > 50) delta < 0 ? next() : prev()\n touchStartX.current = null\n }\n\n if (count === 0) return null\n\n const banner = banners[current]\n const isLight = banner.textColor === 'light' || !banner.textColor\n\n return (\n <div\n className={['relative overflow-hidden rounded-xl', className].filter(Boolean).join(' ')}\n style={{ aspectRatio }}\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n >\n {/* Slides */}\n <div ref={trackRef} className=\"relative w-full h-full\">\n {banners.map((b, i) => (\n <div\n key={b.id}\n aria-hidden={i !== current}\n className={[\n 'absolute inset-0 transition-opacity duration-700',\n i === current ? 'opacity-100 z-10' : 'opacity-0 z-0',\n ].join(' ')}\n style={{\n background: b.backgroundImage\n ? `url(${b.backgroundImage}) center/cover no-repeat`\n : b.backgroundColor ?? 'linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%)',\n }}\n >\n {/* Overlay for readability */}\n {b.backgroundImage && (\n <div className=\"absolute inset-0 bg-gradient-to-r from-black/50 via-black/20 to-transparent\" />\n )}\n\n {/* Content */}\n <div className=\"relative z-10 h-full flex items-center px-8 md:px-12 gap-8\">\n <div className=\"flex-1 max-w-lg\">\n {b.eyebrow && (\n <p\n className={`text-xs font-semibold uppercase tracking-widest mb-2 ${\n isLight ? 'text-white/70' : 'text-gray-500'\n }`}\n >\n {b.eyebrow}\n </p>\n )}\n <h2\n className={`text-2xl md:text-3xl lg:text-4xl font-bold leading-tight ${\n isLight ? 'text-white' : 'text-gray-900'\n }`}\n >\n {b.title}\n </h2>\n {b.subtitle && (\n <p\n className={`mt-2 text-sm md:text-base ${\n isLight ? 'text-white/80' : 'text-gray-600'\n }`}\n >\n {b.subtitle}\n </p>\n )}\n {b.ctaLabel && (\n <button\n onClick={b.onCtaClick}\n className={[\n 'mt-5 inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-sm font-semibold transition-all',\n isLight\n ? 'bg-white text-gray-900 hover:bg-gray-100'\n : 'bg-primary-600 text-white hover:bg-primary-700',\n ].join(' ')}\n >\n {b.ctaLabel}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={2}\n stroke=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\" />\n </svg>\n </button>\n )}\n </div>\n\n {/* Side image */}\n {b.sideImage && (\n <div className=\"hidden md:block flex-1 h-full flex items-end justify-end overflow-hidden\">\n <img\n src={b.sideImage}\n alt=\"\"\n className=\"h-full w-auto object-contain object-bottom drop-shadow-2xl\"\n />\n </div>\n )}\n </div>\n </div>\n ))}\n </div>\n\n {/* Arrow navigation */}\n {arrows && count > 1 && (\n <>\n <button\n onClick={prev}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 z-20 w-9 h-9 flex items-center justify-center rounded-full bg-black/30 text-white hover:bg-black/50 transition-colors backdrop-blur-sm\"\n aria-label=\"Previous banner\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={2} stroke=\"currentColor\" className=\"w-5 h-5\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M15.75 19.5L8.25 12l7.5-7.5\" />\n </svg>\n </button>\n <button\n onClick={next}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 z-20 w-9 h-9 flex items-center justify-center rounded-full bg-black/30 text-white hover:bg-black/50 transition-colors backdrop-blur-sm\"\n aria-label=\"Next banner\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={2} stroke=\"currentColor\" className=\"w-5 h-5\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\" />\n </svg>\n </button>\n </>\n )}\n\n {/* Dot indicators */}\n {dots && count > 1 && (\n <div className=\"absolute bottom-3 left-1/2 -translate-x-1/2 z-20 flex gap-1.5\">\n {banners.map((_, i) => (\n <button\n key={i}\n onClick={() => goTo(i)}\n aria-label={`Go to slide ${i + 1}`}\n className={[\n 'rounded-full transition-all duration-300',\n i === current\n ? 'w-5 h-2 bg-white'\n : 'w-2 h-2 bg-white/50 hover:bg-white/80',\n ].join(' ')}\n />\n ))}\n </div>\n )}\n\n {/* Auto-play progress bar */}\n {autoPlay && count > 1 && (\n <div className=\"absolute bottom-0 left-0 right-0 h-0.5 bg-white/20 z-20\">\n <div\n key={`${current}-${paused}`}\n className={`h-full bg-white/60 ${paused ? '' : 'animate-progress'}`}\n style={{\n animation: paused ? 'none' : `progress ${autoPlayInterval}ms linear`,\n }}\n />\n </div>\n )}\n </div>\n )\n}\n","import { useState } from 'react'\nimport { Badge } from '../common/Badge/Badge'\nimport { Button } from '../common/Button/Button'\n\nexport interface ProductCardProduct {\n id: string\n name: string\n slug?: string\n /** Primary image URL */\n image?: string\n /** Secondary image on hover */\n imageHover?: string\n price: number\n originalPrice?: number\n currency?: string\n /** 'new' | 'sale' | 'hot' | custom string */\n badge?: string\n /** 0–5 */\n rating?: number\n reviewCount?: number\n inStock?: boolean\n /** Variants available (e.g. colors) */\n variants?: { id: string; color?: string; label: string }[]\n}\n\nexport interface ProductCardProps {\n product: ProductCardProduct\n onAddToCart?: (product: ProductCardProduct) => void\n onWishlistToggle?: (product: ProductCardProduct) => void\n isWishlisted?: boolean\n onProductClick?: (product: ProductCardProduct) => void\n /** compact — narrower, used in grids with 4+ columns */\n size?: 'default' | 'compact'\n className?: string\n}\n\nfunction StarIcon({ filled }: { filled: boolean }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n className={`w-3.5 h-3.5 ${filled ? 'fill-amber-400 stroke-amber-400' : 'fill-gray-200 stroke-gray-300'}`}\n strokeWidth={1}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z\"\n />\n </svg>\n )\n}\n\nfunction StarRating({ value, count }: { value: number; count?: number }) {\n return (\n <div className=\"flex items-center gap-1\">\n <div className=\"flex gap-0.5\">\n {[1, 2, 3, 4, 5].map((s) => (\n <StarIcon key={s} filled={s <= Math.round(value)} />\n ))}\n </div>\n {count !== undefined && (\n <span className=\"text-xs text-gray-400\">({count})</span>\n )}\n </div>\n )\n}\n\nfunction badgeVariant(badge: string) {\n const b = badge.toLowerCase()\n if (b === 'sale' || b === 'akce') return 'danger' as const\n if (b === 'new' || b === 'nové') return 'primary' as const\n if (b === 'hot') return 'warning' as const\n return 'default' as const\n}\n\nfunction formatPrice(price: number, currency = 'Kč') {\n return `${price.toLocaleString('cs-CZ')} ${currency}`\n}\n\nfunction discountPercent(original: number, current: number) {\n return Math.round((1 - current / original) * 100)\n}\n\nexport function ProductCard({\n product,\n onAddToCart,\n onWishlistToggle,\n isWishlisted = false,\n onProductClick,\n size = 'default',\n className = '',\n}: ProductCardProps) {\n const [hovered, setHovered] = useState(false)\n const [addedToCart, setAddedToCart] = useState(false)\n\n const hasDiscount =\n product.originalPrice !== undefined && product.originalPrice > product.price\n\n const handleAddToCart = (e: React.MouseEvent) => {\n e.stopPropagation()\n onAddToCart?.(product)\n setAddedToCart(true)\n setTimeout(() => setAddedToCart(false), 1500)\n }\n\n const handleWishlist = (e: React.MouseEvent) => {\n e.stopPropagation()\n onWishlistToggle?.(product)\n }\n\n return (\n <article\n className={[\n 'group relative flex flex-col bg-white rounded-xl border border-gray-200',\n 'hover:shadow-md transition-shadow duration-200 overflow-hidden cursor-pointer',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onProductClick?.(product)}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n >\n {/* Image */}\n <div className={`relative overflow-hidden bg-gray-50 ${size === 'compact' ? 'aspect-square' : 'aspect-4/3'}`}>\n {product.image ? (\n <img\n src={hovered && product.imageHover ? product.imageHover : product.image}\n alt={product.name}\n className=\"w-full h-full object-contain p-4 transition-transform duration-300 group-hover:scale-105\"\n />\n ) : (\n <div className=\"w-full h-full flex items-center justify-center text-5xl bg-linear-to-br from-gray-100 to-gray-200\">\n 🛍️\n </div>\n )}\n\n {/* Badge */}\n {product.badge && (\n <div className=\"absolute top-2 left-2\">\n <Badge variant={badgeVariant(product.badge)} size=\"sm\">\n {product.badge === 'sale' && hasDiscount\n ? `-${discountPercent(product.originalPrice!, product.price)}%`\n : product.badge}\n </Badge>\n </div>\n )}\n\n {/* Out of stock overlay */}\n {product.inStock === false && (\n <div className=\"absolute inset-0 bg-white/70 flex items-center justify-center\">\n <span className=\"text-sm font-semibold text-gray-500 bg-white/90 px-3 py-1 rounded-full border border-gray-200\">\n Vyprodáno\n </span>\n </div>\n )}\n\n {/* Wishlist button */}\n <button\n onClick={handleWishlist}\n aria-label={isWishlisted ? 'Remove from wishlist' : 'Add to wishlist'}\n className={[\n 'absolute top-2 right-2 w-8 h-8 flex items-center justify-center rounded-full bg-white shadow-sm border border-gray-100',\n 'transition-all duration-200',\n 'opacity-0 group-hover:opacity-100 focus:opacity-100',\n isWishlisted ? 'text-danger-500' : 'text-gray-400 hover:text-danger-400',\n ].join(' ')}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className={`w-4 h-4 ${isWishlisted ? 'fill-current' : 'fill-none'}`}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z\"\n />\n </svg>\n </button>\n\n {/* Quick add — slides up on hover */}\n <div\n className={[\n 'absolute bottom-0 left-0 right-0 p-2 transition-transform duration-200',\n hovered ? 'translate-y-0' : 'translate-y-full',\n ].join(' ')}\n >\n <Button\n variant=\"primary\"\n size=\"sm\"\n fullWidth\n loading={false}\n disabled={product.inStock === false}\n onClick={handleAddToCart}\n className=\"shadow-lg\"\n >\n {addedToCart ? (\n <span className=\"flex items-center gap-1.5\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={2} stroke=\"currentColor\" className=\"w-4 h-4\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\" />\n </svg>\n Přidáno\n </span>\n ) : (\n 'Přidat do košíku'\n )}\n </Button>\n </div>\n </div>\n\n {/* Info */}\n <div className={`flex flex-col gap-1.5 ${size === 'compact' ? 'p-3' : 'p-4'}`}>\n {/* Color variants */}\n {product.variants && product.variants.length > 0 && (\n <div className=\"flex gap-1\">\n {product.variants.slice(0, 5).map((v) => (\n <span\n key={v.id}\n title={v.label}\n className=\"w-4 h-4 rounded-full border border-gray-300 shrink-0\"\n style={{ backgroundColor: v.color ?? '#ccc' }}\n />\n ))}\n {product.variants.length > 5 && (\n <span className=\"text-xs text-gray-400\">+{product.variants.length - 5}</span>\n )}\n </div>\n )}\n\n {/* Name */}\n <h3\n className={`font-medium text-gray-900 leading-snug line-clamp-2 group-hover:text-primary-600 transition-colors ${\n size === 'compact' ? 'text-xs' : 'text-sm'\n }`}\n >\n {product.name}\n </h3>\n\n {/* Rating */}\n {product.rating !== undefined && (\n <StarRating value={product.rating} count={product.reviewCount} />\n )}\n\n {/* Price */}\n <div className=\"flex items-baseline gap-2 mt-auto pt-1\">\n <span\n className={`font-bold text-gray-900 ${size === 'compact' ? 'text-base' : 'text-lg'}`}\n >\n {formatPrice(product.price, product.currency)}\n </span>\n {hasDiscount && (\n <span className=\"text-sm text-gray-400 line-through\">\n {formatPrice(product.originalPrice!, product.currency)}\n </span>\n )}\n </div>\n </div>\n </article>\n )\n}\n","import type { ReactNode } from 'react'\nimport { ProductCard } from '../ProductCard/ProductCard'\nimport type { ProductCardProduct, ProductCardProps } from '../ProductCard/ProductCard'\nimport { Pagination } from '../common/Pagination/Pagination'\nimport { Select } from '../common/Select/Select'\n\nexport type GridColumns = 2 | 3 | 4 | 5\n\nexport interface SortOption {\n value: string\n label: string\n}\n\nexport interface ProductGridProps {\n products: ProductCardProduct[]\n /** Total products (for pagination) */\n totalCount?: number\n /** Current page */\n page?: number\n onPageChange?: (page: number) => void\n /** Products per page */\n perPage?: number\n /** Column count */\n columns?: GridColumns\n /** Sort options */\n sortOptions?: SortOption[]\n selectedSort?: string\n onSortChange?: (value: string) => void\n /** Active filters summary */\n activeFilters?: string[]\n onRemoveFilter?: (filter: string) => void\n onClearFilters?: () => void\n /** Loading skeleton */\n loading?: boolean\n /** Empty state slot */\n emptyState?: ReactNode\n /** ProductCard passthrough props */\n onAddToCart?: ProductCardProps['onAddToCart']\n onWishlistToggle?: ProductCardProps['onWishlistToggle']\n onProductClick?: ProductCardProps['onProductClick']\n wishlisted?: string[]\n className?: string\n}\n\nconst colClasses: Record<GridColumns, string> = {\n 2: 'grid-cols-2',\n 3: 'grid-cols-2 md:grid-cols-3',\n 4: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-4',\n 5: 'grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5',\n}\n\nconst DEFAULT_SORT_OPTIONS: SortOption[] = [\n { value: 'newest', label: 'Nejnovější' },\n { value: 'price-asc', label: 'Cena: od nejnižší' },\n { value: 'price-desc', label: 'Cena: od nejvyšší' },\n { value: 'rating', label: 'Hodnocení' },\n { value: 'bestseller', label: 'Bestsellery' },\n]\n\nfunction SkeletonCard() {\n return (\n <div className=\"rounded-xl border border-gray-100 overflow-hidden animate-pulse\">\n <div className=\"aspect-4/3 bg-gray-200\" />\n <div className=\"p-4 space-y-2\">\n <div className=\"h-3 bg-gray-200 rounded w-3/4\" />\n <div className=\"h-3 bg-gray-200 rounded w-1/2\" />\n <div className=\"h-5 bg-gray-200 rounded w-1/3 mt-2\" />\n </div>\n </div>\n )\n}\n\nexport function ProductGrid({\n products,\n totalCount,\n page = 1,\n onPageChange,\n perPage = 20,\n columns = 4,\n sortOptions = DEFAULT_SORT_OPTIONS,\n selectedSort,\n onSortChange,\n activeFilters = [],\n onRemoveFilter,\n onClearFilters,\n loading = false,\n emptyState,\n onAddToCart,\n onWishlistToggle,\n onProductClick,\n wishlisted = [],\n className = '',\n}: ProductGridProps) {\n const totalPages = totalCount ? Math.ceil(totalCount / perPage) : undefined\n const cardSize = columns >= 5 ? 'compact' : 'default'\n\n return (\n <div className={['w-full', className].filter(Boolean).join(' ')}>\n {/* Toolbar */}\n <div className=\"flex flex-wrap items-center justify-between gap-3 mb-4\">\n {/* Left: count + active filters */}\n <div className=\"flex flex-wrap items-center gap-2\">\n {totalCount !== undefined && (\n <span className=\"text-sm text-gray-500\">\n <span className=\"font-semibold text-gray-900\">{totalCount}</span> produktů\n </span>\n )}\n {activeFilters.map((f) => (\n <span\n key={f}\n className=\"inline-flex items-center gap-1 text-xs bg-primary-50 text-primary-700 border border-primary-200 rounded-full px-2.5 py-1\"\n >\n {f}\n <button\n onClick={() => onRemoveFilter?.(f)}\n aria-label={`Remove filter ${f}`}\n className=\"hover:text-primary-900 transition-colors\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" strokeWidth={2} stroke=\"currentColor\" className=\"w-3 h-3\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n </span>\n ))}\n {activeFilters.length > 1 && (\n <button\n onClick={onClearFilters}\n className=\"text-xs text-gray-400 hover:text-gray-600 underline underline-offset-2 transition-colors\"\n >\n Zrušit vše\n </button>\n )}\n </div>\n\n {/* Right: sort */}\n <Select\n options={sortOptions}\n value={selectedSort ?? ''}\n onChange={(e) => onSortChange?.(e.target.value)}\n aria-label=\"Sort products\"\n className=\"text-sm\"\n />\n </div>\n\n {/* Grid */}\n {loading ? (\n <div className={`grid gap-4 ${colClasses[columns]}`}>\n {Array.from({ length: perPage > 12 ? 12 : perPage }).map((_, i) => (\n <SkeletonCard key={i} />\n ))}\n </div>\n ) : products.length === 0 ? (\n <div className=\"py-16 text-center\">\n {emptyState ?? (\n <div className=\"space-y-2\">\n <p className=\"text-4xl\">🔍</p>\n <p className=\"font-semibold text-gray-900\">Žádné produkty nenalezeny</p>\n <p className=\"text-sm text-gray-500\">Zkuste upravit filtry nebo hledat jinak.</p>\n {activeFilters.length > 0 && (\n <button\n onClick={onClearFilters}\n className=\"mt-3 text-sm text-primary-600 hover:underline\"\n >\n Zrušit všechny filtry\n </button>\n )}\n </div>\n )}\n </div>\n ) : (\n <div className={`grid gap-4 ${colClasses[columns]}`}>\n {products.map((product) => (\n <ProductCard\n key={product.id}\n product={product}\n size={cardSize}\n onAddToCart={onAddToCart}\n onWishlistToggle={onWishlistToggle}\n onProductClick={onProductClick}\n isWishlisted={wishlisted.includes(product.id)}\n />\n ))}\n </div>\n )}\n\n {/* Pagination */}\n {totalPages && totalPages > 1 && onPageChange && (\n <div className=\"flex justify-center mt-8\">\n <Pagination\n page={page}\n totalPages={totalPages}\n onPageChange={onPageChange}\n />\n </div>\n )}\n </div>\n )\n}\n","import type { ReactNode, CSSProperties } from 'react'\nimport { Button } from '../common/Button/Button'\nimport type { ButtonProps } from '../common/Button/Button'\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\ntype CtaAlign = 'left' | 'center' | 'right'\ntype CtaSize = 'sm' | 'md' | 'lg' | 'xl'\ntype CtaVariant = 'default' | 'primary' | 'dark' | 'gradient' | 'outline' | 'image'\ntype CtaLayout = 'stacked' | 'inline'\n\nexport interface CtaAction {\n label: string\n onClick?: () => void\n href?: string\n variant?: ButtonProps['variant']\n size?: ButtonProps['size']\n}\n\nexport interface CallToActionProps {\n // Content\n eyebrow?: string\n title: string\n description?: string\n actions?: CtaAction[]\n\n // Layout\n align?: CtaAlign\n layout?: CtaLayout\n size?: CtaSize\n\n // Visual\n variant?: CtaVariant\n /** Custom background colour or gradient CSS value (overrides variant background) */\n background?: string\n /** For variant=\"image\": URL of background image */\n backgroundImage?: string\n /** Extra decorative slot — e.g. an illustration, icon or badge */\n media?: ReactNode\n\n // Misc\n className?: string\n style?: CSSProperties\n}\n\n// ─── Config maps ─────────────────────────────────────────────────────────────\n\nconst variantClasses: Record<CtaVariant, string> = {\n default: 'bg-gray-50 border border-gray-200',\n primary: 'bg-primary-600',\n dark: 'bg-gray-900',\n gradient: 'bg-linear-to-br from-primary-600 via-primary-700 to-violet-700',\n outline: 'bg-white border-2 border-primary-600',\n image: 'relative overflow-hidden', // bg applied inline via style\n}\n\nconst variantTextClasses: Record<CtaVariant, { eyebrow: string; title: string; description: string }> = {\n default: { eyebrow: 'text-primary-600', title: 'text-gray-900', description: 'text-gray-600' },\n primary: { eyebrow: 'text-primary-100', title: 'text-white', description: 'text-primary-100' },\n dark: { eyebrow: 'text-primary-400', title: 'text-white', description: 'text-gray-400' },\n gradient: { eyebrow: 'text-primary-200', title: 'text-white', description: 'text-primary-100' },\n outline: { eyebrow: 'text-primary-600', title: 'text-gray-900', description: 'text-gray-600' },\n image: { eyebrow: 'text-white/70', title: 'text-white', description: 'text-white/80' },\n}\n\nconst sizeClasses: Record<CtaSize, { wrapper: string; title: string; description: string; eyebrow: string }> = {\n sm: { wrapper: 'px-6 py-6 rounded-xl', title: 'text-xl font-bold', description: 'text-sm', eyebrow: 'text-xs' },\n md: { wrapper: 'px-8 py-10 rounded-2xl', title: 'text-2xl font-bold', description: 'text-base', eyebrow: 'text-xs' },\n lg: { wrapper: 'px-10 py-14 rounded-2xl', title: 'text-3xl font-bold', description: 'text-lg', eyebrow: 'text-sm' },\n xl: { wrapper: 'px-12 py-20 rounded-3xl', title: 'text-4xl font-extrabold leading-tight', description: 'text-xl', eyebrow: 'text-sm' },\n}\n\nconst alignClasses: Record<CtaAlign, { wrapper: string; actions: string }> = {\n left: { wrapper: 'items-start text-left', actions: 'justify-start' },\n center: { wrapper: 'items-center text-center', actions: 'justify-center' },\n right: { wrapper: 'items-end text-right', actions: 'justify-end' },\n}\n\n// ─── Component ───────────────────────────────────────────────────────────────\n\nexport function CallToAction({\n eyebrow,\n title,\n description,\n actions = [],\n align = 'center',\n layout = 'stacked',\n size = 'md',\n variant = 'default',\n background,\n backgroundImage,\n media,\n className = '',\n style,\n}: CallToActionProps) {\n const textColors = variantTextClasses[variant]\n const sizes = sizeClasses[size]\n const alignment = alignClasses[align]\n const isInline = layout === 'inline'\n\n const inlineStyle: CSSProperties = {\n ...(background ? { background } : {}),\n ...(backgroundImage ? { backgroundImage: `url(${backgroundImage})`, backgroundSize: 'cover', backgroundPosition: 'center' } : {}),\n ...style,\n }\n\n return (\n <div\n className={[\n 'w-full',\n variantClasses[variant],\n sizes.wrapper,\n className,\n ].filter(Boolean).join(' ')}\n style={Object.keys(inlineStyle).length ? inlineStyle : undefined}\n >\n {/* Image overlay */}\n {(variant === 'image' || backgroundImage) && (\n <div className=\"absolute inset-0 bg-black/50\" />\n )}\n\n <div className={`relative ${isInline ? 'flex flex-wrap items-center justify-between gap-6' : `flex flex-col gap-4 ${alignment.wrapper}`}`}>\n\n {/* Text block */}\n <div className={`flex flex-col gap-2 ${isInline ? 'flex-1 min-w-0' : alignment.wrapper}`}>\n {eyebrow && (\n <p className={`font-semibold uppercase tracking-widest ${sizes.eyebrow} ${textColors.eyebrow}`}>\n {eyebrow}\n </p>\n )}\n <h2 className={`${sizes.title} ${textColors.title}`}>\n {title}\n </h2>\n {description && (\n <p className={`max-w-2xl ${sizes.description} ${textColors.description}`}>\n {description}\n </p>\n )}\n </div>\n\n {/* Media slot */}\n {media && !isInline && (\n <div className=\"mt-2\">{media}</div>\n )}\n\n {/* Actions */}\n {actions.length > 0 && (\n <div className={`flex flex-wrap gap-3 ${isInline ? 'shrink-0' : alignment.actions}`}>\n {actions.map((action, i) => {\n const btn = (\n <Button\n key={i}\n variant={action.variant ?? (i === 0 ? resolveDefaultPrimaryVariant(variant) : 'outline')}\n size={action.size ?? (size === 'sm' ? 'sm' : size === 'xl' ? 'lg' : 'md')}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n )\n return action.href ? (\n <a key={i} href={action.href} className=\"contents\">{btn}</a>\n ) : btn\n })}\n </div>\n )}\n </div>\n </div>\n )\n}\n\n/** Pick a sensible default button variant that contrasts with the CTA background */\nfunction resolveDefaultPrimaryVariant(ctaVariant: CtaVariant): ButtonProps['variant'] {\n if (ctaVariant === 'default' || ctaVariant === 'outline') return 'primary'\n return 'secondary' // white-ish on dark/coloured backgrounds\n}\n","import type { ReactNode } from 'react';\nimport { Container } from '../common/Container';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport interface FooterContact {\n icon?: 'phone' | 'email' | 'address' | 'hours' | ReactNode;\n label: string;\n value: string;\n href?: string;\n}\n\nexport interface FooterLink {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface FooterLinkGroup {\n heading: string;\n links: FooterLink[];\n}\n\nexport interface FooterSocialLink {\n label: string;\n href?: string;\n icon: 'facebook' | 'instagram' | 'twitter' | 'youtube' | 'tiktok' | ReactNode;\n}\n\nexport interface FooterProps {\n // Branding\n logo?: ReactNode;\n tagline?: string;\n\n // Contact section\n contactHeading?: string;\n contacts?: FooterContact[];\n\n // Links section\n linkGroups?: FooterLinkGroup[];\n\n // Social\n socialLinks?: FooterSocialLink[];\n\n // Bottom bar\n copyright?: string;\n bottomLinks?: FooterLink[];\n\n className?: string;\n}\n\n// ─── Icons ────────────────────────────────────────────────────────────────────\n\nfunction PhoneIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4 shrink-0\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z\"\n />\n </svg>\n );\n}\n\nfunction EmailIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4 shrink-0\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75\"\n />\n </svg>\n );\n}\n\nfunction AddressIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4 shrink-0\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15 10.5a3 3 0 11-6 0 3 3 0 016 0z\"\n />\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z\"\n />\n </svg>\n );\n}\n\nfunction HoursIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"w-4 h-4 shrink-0\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n );\n}\n\nfunction FacebookIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M24 12.073C24 5.405 18.627 0 12 0S0 5.405 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.886v2.267h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z\" />\n </svg>\n );\n}\n\nfunction InstagramIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z\" />\n </svg>\n );\n}\n\nfunction TwitterIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\" />\n </svg>\n );\n}\n\nfunction YoutubeIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z\" />\n </svg>\n );\n}\n\nfunction TiktokIcon() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className=\"w-4 h-4\"\n >\n <path d=\"M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-2.88 2.5 2.89 2.89 0 01-2.89-2.89 2.89 2.89 0 012.89-2.89c.28 0 .54.04.79.1V9.01a6.33 6.33 0 00-.79-.05 6.34 6.34 0 00-6.34 6.34 6.34 6.34 0 006.34 6.34 6.34 6.34 0 006.33-6.34V8.69a8.18 8.18 0 004.78 1.52V6.76a4.85 4.85 0 01-1.01-.07z\" />\n </svg>\n );\n}\n\nconst SOCIAL_ICONS = {\n facebook: FacebookIcon,\n instagram: InstagramIcon,\n twitter: TwitterIcon,\n youtube: YoutubeIcon,\n tiktok: TiktokIcon,\n};\nconst CONTACT_ICONS = {\n phone: PhoneIcon,\n email: EmailIcon,\n address: AddressIcon,\n hours: HoursIcon,\n};\n\nfunction resolveContactIcon(icon: FooterContact['icon']) {\n if (!icon) return null;\n if (typeof icon === 'string') {\n const Icon = CONTACT_ICONS[icon as keyof typeof CONTACT_ICONS];\n return Icon ? <Icon /> : null;\n }\n return icon;\n}\n\nfunction resolveSocialIcon(icon: FooterSocialLink['icon']) {\n if (typeof icon === 'string') {\n const Icon = SOCIAL_ICONS[icon as keyof typeof SOCIAL_ICONS];\n return Icon ? <Icon /> : null;\n }\n return icon;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport function Footer({\n logo,\n tagline,\n contactHeading = 'Kontakty',\n contacts = [],\n linkGroups = [],\n socialLinks = [],\n copyright,\n bottomLinks = [],\n className = '',\n}: FooterProps) {\n const year = new Date().getFullYear();\n\n return (\n <footer\n className={['bg-gray-900 text-gray-300', className]\n .filter(Boolean)\n .join(' ')}\n >\n <Container>\n {/* ── Main section ───────────────────────────────────────────────────── */}\n <div className=\"max-w-7xl mx-auto px-4 py-12 grid grid-cols-1 md:grid-cols-2 gap-10 lg:gap-16\">\n {/* ── Left: Contact section ──────────────────────────────────────── */}\n <div className=\"flex flex-col gap-6\">\n {/* Logo + tagline */}\n <div>\n {logo ? (\n <div className=\"mb-3\">{logo}</div>\n ) : (\n <span className=\"text-xl font-bold text-white tracking-tight mb-3 block\">\n shopito\n </span>\n )}\n {tagline && (\n <p className=\"text-sm text-gray-400 max-w-xs\">{tagline}</p>\n )}\n </div>\n\n {/* Contacts */}\n {contacts.length > 0 && (\n <div>\n <h3 className=\"text-xs font-semibold uppercase tracking-widest text-gray-500 mb-3\">\n {contactHeading}\n </h3>\n <ul className=\"space-y-3\">\n {contacts.map((c, i) => {\n const icon = resolveContactIcon(c.icon);\n const inner = (\n <div className=\"flex items-start gap-2.5\">\n {icon && (\n <span className=\"mt-0.5 text-primary-400\">\n {icon}\n </span>\n )}\n <div>\n <p className=\"text-xs text-gray-500 leading-none mb-0.5\">\n {c.label}\n </p>\n <p\n className={`text-sm text-gray-200 ${c.href ? 'hover:text-white transition-colors' : ''}`}\n >\n {c.value}\n </p>\n </div>\n </div>\n );\n\n return (\n <li key={i}>\n {c.href ? <a href={c.href}>{inner}</a> : inner}\n </li>\n );\n })}\n </ul>\n </div>\n )}\n\n {/* Social links */}\n {socialLinks.length > 0 && (\n <div className=\"flex gap-2 flex-wrap\">\n {socialLinks.map((s, i) => (\n <a\n key={i}\n href={s.href}\n aria-label={s.label}\n className=\"w-8 h-8 flex items-center justify-center rounded-lg bg-gray-800 text-gray-400 hover:bg-primary-600 hover:text-white transition-colors\"\n >\n {resolveSocialIcon(s.icon)}\n </a>\n ))}\n </div>\n )}\n </div>\n\n {/* ── Right: Link groups ─────────────────────────────────────────── */}\n {linkGroups.length > 0 && (\n <div\n className={`grid gap-8 ${linkGroups.length === 1 ? 'grid-cols-1' : linkGroups.length === 2 ? 'grid-cols-2' : 'grid-cols-2 sm:grid-cols-3'}`}\n >\n {linkGroups.map((group, gi) => (\n <div key={gi}>\n <h3 className=\"text-xs font-semibold uppercase tracking-widest text-gray-500 mb-3\">\n {group.heading}\n </h3>\n <ul className=\"space-y-2\">\n {group.links.map((link, li) => (\n <li key={li}>\n {link.href ? (\n <a\n href={link.href}\n className=\"text-sm text-gray-400 hover:text-white transition-colors\"\n >\n {link.label}\n </a>\n ) : (\n <button\n onClick={link.onClick}\n className=\"text-sm text-gray-400 hover:text-white transition-colors text-left\"\n >\n {link.label}\n </button>\n )}\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* ── Bottom bar ─────────────────────────────────────────────────────── */}\n <div className=\"border-t border-gray-800\">\n <div className=\"max-w-7xl mx-auto px-4 py-4 flex flex-wrap items-center justify-between gap-3\">\n <p className=\"text-xs text-gray-500\">\n {copyright ?? `© ${year} Shopito. Všechna práva vyhrazena.`}\n </p>\n {bottomLinks.length > 0 && (\n <nav className=\"flex flex-wrap gap-4\">\n {bottomLinks.map((link, i) =>\n link.href ? (\n <a\n key={i}\n href={link.href}\n className=\"text-xs text-gray-500 hover:text-gray-300 transition-colors\"\n >\n {link.label}\n </a>\n ) : (\n <button\n key={i}\n onClick={link.onClick}\n className=\"text-xs text-gray-500 hover:text-gray-300 transition-colors\"\n >\n {link.label}\n </button>\n ),\n )}\n </nav>\n )}\n </div>\n </div>\n </Container>\n </footer>\n );\n}\n"],"x_google_ignoreList":[2,22,23,24,25,26,27,28,29,30,31,32],"mappings":";;;;;;;;;;;;;aAMa,KAAa,EAAE,kBACnB,kBAAC,OAAD;CA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