1import{a as e,t}from"./chunk-BEqpzyXh.js";import{n,t as r}from"./jsx-runtime-BwJb0T-f.js";import{t as i}from"./useLocation-DRQrKJlK.js";import{n as a}from"./use-reduced-motion-CkURlhey.js";import{t as o}from"./utils-Irxw9pMU.js";import{t as s}from"./proxy-EYWziEiI.js";import{t as c}from"./Trans-DdndamdJ.js";import{t as l}from"./useTranslation-ClJA_DQb.js";import{t as u}from"./createLucideIcon-CuQR5cRs.js";import{t as d}from"./button-6fn7-fV1.js";import{r as f}from"./runtime-config-Dx3FayVN.js";var p=e(n(),1),m=r();function h({className:e}){return(0,m.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,className:o(`w-5 h-5`,e),viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,m.jsx)(`path`,{d:`M18 6 6 18`}),(0,m.jsx)(`path`,{d:`m6 6 12 12`})]})}function g(){let{t:e}=l(),{isPrivacyDialogOpen:t,setIsPrivacyDialogOpen:n,has:r,setSelectedConsent:i,saveConsents:o}=a(),[s,u]=(0,p.useState)([`necessary`]);(0,p.useEffect)(()=>{if(t){let e=[`necessary`];r(`measurement`)&&e.push(`measurement`),r(`marketing`)&&e.push(`marketing`),r(`functionality`)&&e.push(`functionality`),u(e)}},[t,r]);let d=(e,t)=>{u(t?t=>[...t,e]:t=>t.filter(t=>t!==e))};return t?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-black/80`,onClick:()=>n(!1),onKeyDown:e=>{e.key===`Escape`&&n(!1)}}),(0,m.jsxs)(`div`,{className:`fixed left-1/2 top-1/2 z-[70] w-full max-w-2xl -translate-x-1/2 -translate-y-1/2 bg-background border border-border p-8 shadow-lg`,children:[(0,m.jsx)(`button`,{type:`button`,className:`absolute right-6 top-6 p-1 text-muted-foreground hover:text-foreground transition-colors`,onClick:()=>n(!1),children:(0,m.jsx)(h,{})}),(0,m.jsxs)(`div`,{className:`space-y-2 mb-6`,children:[(0,m.jsx)(`h2`,{className:`text-lg font-semibold text-foreground`,children:e(`consent.dialog.title`)}),(0,m.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,m.jsx)(c,{i18nKey:`consent.dialog.description`,components:{1:(0,m.jsx)(`a`,{href:`/privacy`,className:`text-foreground underline hover:text-muted-foreground transition-colors`})}})})]}),(0,m.jsxs)(`div`,{className:`space-y-4 py-4`,children:[(0,m.jsx)(v,{title:e(`consent.categories.necessary.title`),description:e(`consent.categories.necessary.description`),locked:!0,badge:e(`consent.categories.necessary.locked`)}),(0,m.jsx)(v,{title:e(`consent.categories.measurement.title`),description:e(`consent.categories.measurement.description`),checked:s.includes(`measurement`),onCheckedChange:e=>d(`measurement`,e)}),(0,m.jsx)(v,{title:e(`consent.categories.marketing.title`),description:e(`consent.categories.marketing.description`),checked:s.includes(`marketing`),onCheckedChange:e=>d(`marketing`,e)}),(0,m.jsx)(v,{title:e(`consent.categories.functionality.title`),description:e(`consent.categories.functionality.description`),checked:s.includes(`functionality`),onCheckedChange:e=>d(`functionality`,e)})]}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:justify-end pt-4`,children:[(0,m.jsx)(`button`,{type:`button`,className:`bg-foreground text-background hover:bg-foreground
vendor: 5,162 bytes, line 1
1/90 px-6 py-3 text-sm font-semibold transition-colors`,onClick:()=>{i(`measurement`,s.includes(`measurement`)),i(`marketing`,s.includes(`marketing`)),i(`functionality`,s.includes(`functionality`)),o(`custom`),n(!1)},children:e(`consent.dialog.savePreferences`)}),(0,m.jsx)(`button`,{type:`button`,className:`border border-border bg-background text-foreground hover:bg-muted px-6 py-3 text-sm font-semibold transition-colors`,onClick:()=>{o(`all`),n(!1)},children:e(`consent.dialog.acceptAll`)}),(0,m.jsx)(`button`,{type:`button`,className:`border border-border bg-background text-foreground hover:bg-muted px-6 py-3 text-sm font-semibold transition-colors`,onClick:()=>{o(`necessary`),n(!1)},children:e(`consent.dialog.rejectAll`)})]})]})]}):null}function _({checked:e,onCheckedChange:t}){return(0,m.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,onClick:()=>t?.(!e),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-muted-foreground focus-visible:ring-offset-2 ${e?`bg-foreground border-foreground`:`bg-muted border-border`}`,children:(0,m.jsx)(`span`,{className:`pointer-events-none block h-4 w-4 bg-background shadow-sm transition-transform ${e?`translate-x-4`:`translate-x-0.5`}`})})}function v({title:e,description:t,locked:n,badge:r,checked:i,onCheckedChange:a}){return(0,m.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-border pb-4 last:border-0`,children:[(0,m.jsxs)(`div`,{className:`flex-1`,children:[(0,m.jsx)(`h4`,{className:`font-semibold mb-1 text-foreground`,children:e}),(0,m.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t})]}),(0,m.jsx)(`div`,{className:`shrink-0`,children:n?(0,m.jsx)(`span`,{className:`inline-flex items-center px-2.5 py-0.5 text-xs font-medium bg-muted text-muted-foreground`,children:r}):(0,m.jsx)(_,{checked:i,onCheckedChange:a})})]})}var y=u(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]);function b({description:e,category:t,className:n=``}){let{t:r}=l(),{setIsPrivacyDialogOpen:i,setSelectedConsent:o,saveConsents:s}=a();return(0,m.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 border border-border bg-card p-8 text-center rounded-md ${n}`,children:[(0,m.jsx)(y,{"aria-hidden":`true`,className:`w-8 h-8 text-secondary`}),(0,m.jsx)(`p`,{className:`text-foreground/80 max-w-md`,children:e}),(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-3`,children:[t&&(0,m.jsx)(d,{variant:`secondary`,onClick:()=>{t&&(o(t,!0),s(`custom`))},children:r(`consent.blocked.acceptCategory`)}),(0,m.jsx)(d,{variant:`outline`,onClick:()=>i(!0),children:r(`consent.blocked.openSettings`)})]})]})}var x=e(t(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define(n):typeof t==`object`&&t.exports?t.exports=n():e.log=n()})(e,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`],i={},a=null;function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?s:console[r]===void 0?console.log===void 0?e:o(console,`log`):o(console,r)}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return`No console available for logging`}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(e,t,n){return c(e)||u.apply(this,arguments)}function f(e,n){var o=this,s,c,u,f=`loglevel`;typeof e==`string`?f+=`:`+e:typeof e==`symbol`&&(f=void 0);function p(e){var n=(r[e]||`silent`).toUpperCase();if(!(typeof window===t||!f)){try{window.localStorage[f]=n;return}catch{}try{window.document.cookie=encodeURIComponent(f)+`=`+n+`;`}catch{}}}function m(){var e;if(!(typeof window===t||!f)){try{e=window.localStorage[f]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+`=`);i!==-1&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch{}return o.levels[e]===void 0&&(e=void 0),e}}function h(){if(!(typeof window===t||!f)){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}function g(e){var t=e;if(typeof t==`string`&&o.levels[t.toUpperCase()]!==void 0&&(t=o.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=o.levels.SILENT)return t;
1throw TypeError(`log.setLevel() called with invalid level: `+e)}o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||d,o.getLevel=function(){return u??c??s},o.setLevel=function(e,t){return u=g(e),t!==!1&&p(u),l.call(o)},o.setDefaultLevel=function(e){c=g(e),m()||o.setLevel(e,!1)},o.resetLevel=function(){u=null,h(),l.call(o)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)},o.rebuild=function(){if(a!==o&&(s=g(a.getLevel())),l.call(o),a===o)for(var e in i)i[e].rebuild()},s=g(a?a.getLevel():`WARN`);var _=m();_!=null&&(u=g(_)),l.call(o)}a=new f,a.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=i[e];return t||=i[e]=new f(e,a.methodFactory),t};var p=typeof window===t?void 0:window.log;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=p),a},a.getLoggers=function(){return i},a.default=a,a})}))(),1);f()?x.default.setLevel(`error`):x.default.setLevel(`debug`);var S=x.default,C=[`/privacy`,`/imprint`];function w(){let{t:e}=l(),{saveConsents:t,setIsPrivacyDialogOpen:n,hasConsented:r}=a(),{pathname:o}=i(),[u,d]=(0,p.useState)(!1),f=r();if(S.debug(`[CookieBanner] hasConsented:`,f),f||C.includes(o))return null;let h=()=>{d(!0),setTimeout(()=>d(!1),400)};return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`button`,{type:`button`,className:`fixed inset-0 z-[60] bg-black/60 cursor-not-allowed`,onClick:h,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),h())},"aria-label":`Click to highlight consent banner`}),(0,m.jsx)(s.div,{className:`fixed inset-0 z-[70] flex items-center justify-center p-4`,initial:{opacity:0,scale:.95},animate:u?{opacity:1,scale:1,x:[0,-5,5,-3,3,0]}:{opacity:1,scale:1},transition:{duration:.3},children:(0,m.jsx)(`div`,{className:`bg-background border border-border shadow-lg w-full max-w-lg ${u?`ring-2 ring-red-700/50`:``}`,children:(0,m.jsxs)(`div`,{className:`p-6 space-y-4`,children:[(0,m.jsx)(`h3`,{className:`font-semibold text-lg text-foreground`,children:e(`consent.banner.title`)}),(0,m.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,m.jsx)(c,{i18nKey:`consent.banner.description`,components:{1:(0,m.jsx)(`a`,{href:`/privacy`,className:`text-foreground underline hover:text-muted-foreground transition-colors`})}})}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-2 pt-2`,children:[(0,m.jsx)(`button`,{type:`button`,className:`w-full bg-secondary text-secondary-foreground hover:bg-secondary/85 px-6 py-3 text-sm font-semibold transition-colors`,onClick:()=>{t(`all`)},children:e(`consent.banner.acceptAll`)}),(0,m.jsxs)(`div`,{className:`flex gap-2`,children:[(0,m.jsx)(`button`,{type:`button`,className:`flex-1 border border-border bg-background text-foreground hover:bg-muted px-6 py-3 text-sm font-semibold transition-colors`,onClick:()=>{t(`necessary`)},children:e(`consent.banner.rejectAll`)}),(0,m.jsx)(`button`,{type:`button`,className:`flex-1 border border-border bg-background text-foreground hover:bg-muted px-6 py-3 text-sm font-semibold transition-colors`,onClick:()=>{n(!0)},children:e(`consent.banner.customize`)})]})]})]})})})]})}export{b as n,g as r,w as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.