@tenerife.music/ui 0.0.5 → 0.0.6

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.
Files changed (49) hide show
  1. package/dist/components/admin/Dashboard.d.ts +2 -0
  2. package/dist/components/admin/Dashboard.d.ts.map +1 -1
  3. package/dist/components/admin/UserManagement.d.ts +2 -0
  4. package/dist/components/admin/UserManagement.d.ts.map +1 -1
  5. package/dist/components/auth/LoginForm.d.ts +5 -0
  6. package/dist/components/auth/LoginForm.d.ts.map +1 -1
  7. package/dist/components/auth/ProfileCard.d.ts +2 -2
  8. package/dist/components/auth/ProfileCard.d.ts.map +1 -1
  9. package/dist/components/auth/RegisterForm.d.ts +7 -0
  10. package/dist/components/auth/RegisterForm.d.ts.map +1 -1
  11. package/dist/components/cards/EventCard.d.ts +4 -2
  12. package/dist/components/cards/EventCard.d.ts.map +1 -1
  13. package/dist/components/cards/VenueCard.d.ts +5 -2
  14. package/dist/components/cards/VenueCard.d.ts.map +1 -1
  15. package/dist/components/controls/LanguageSelector.d.ts +3 -1
  16. package/dist/components/controls/LanguageSelector.d.ts.map +1 -1
  17. package/dist/components/data/Timeline.d.ts.map +1 -1
  18. package/dist/components/feedback/Alert.d.ts.map +1 -1
  19. package/dist/components/feedback/ConsentBanner.d.ts +2 -0
  20. package/dist/components/feedback/ConsentBanner.d.ts.map +1 -1
  21. package/dist/components/filters/DateRangePicker.d.ts +5 -2
  22. package/dist/components/filters/DateRangePicker.d.ts.map +1 -1
  23. package/dist/components/filters/FilterBar.d.ts +24 -2
  24. package/dist/components/filters/FilterBar.d.ts.map +1 -1
  25. package/dist/components/filters/FilterSelect.d.ts +1 -1
  26. package/dist/components/filters/FilterSelect.d.ts.map +1 -1
  27. package/dist/components/filters/PriceRangeSlider.d.ts +12 -5
  28. package/dist/components/filters/PriceRangeSlider.d.ts.map +1 -1
  29. package/dist/components/filters/SearchFilters.d.ts +26 -4
  30. package/dist/components/filters/SearchFilters.d.ts.map +1 -1
  31. package/dist/components/filters/SearchInput.d.ts +1 -1
  32. package/dist/components/filters/SearchInput.d.ts.map +1 -1
  33. package/dist/components/forms/FormInput.d.ts.map +1 -1
  34. package/dist/components/forms/FormSelect.d.ts.map +1 -1
  35. package/dist/components/forms/FormTextarea.d.ts.map +1 -1
  36. package/dist/components/layout/ModeHero.d.ts +4 -4
  37. package/dist/components/layout/ModeHero.d.ts.map +1 -1
  38. package/dist/components/modals/ConfirmDialog.d.ts +11 -7
  39. package/dist/components/modals/ConfirmDialog.d.ts.map +1 -1
  40. package/dist/components/primitives/ThemeSwitch.d.ts.map +1 -1
  41. package/dist/components/search/SearchBar.d.ts +1 -1
  42. package/dist/components/search/SearchBar.d.ts.map +1 -1
  43. package/dist/components/sections/ArticlesSection.d.ts +1 -1
  44. package/dist/components/sections/ArticlesSection.d.ts.map +1 -1
  45. package/dist/components/sections/TrendingSection.d.ts +6 -3
  46. package/dist/components/sections/TrendingSection.d.ts.map +1 -1
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.mjs +2246 -1950
  49. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./tokens/index.cjs"),oa=require("./radius-CuOZD6Mk.cjs"),r=require("react/jsx-runtime"),x=require("react"),Fe=require("@radix-ui/react-slot"),L=require("class-variance-authority"),ia=require("clsx"),la=require("tailwind-merge"),da=require("@radix-ui/react-label"),M=require("lucide-react"),ca=require("@radix-ui/react-dialog"),ua=require("@radix-ui/react-dropdown-menu"),ma=require("@radix-ui/react-navigation-menu"),fa=require("@radix-ui/react-tabs"),ha=require("@radix-ui/react-select"),ga=require("@radix-ui/react-tooltip"),pa=require("@radix-ui/react-popover"),xa=require("react-dom");function I(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const u=I(x),Ve=I(da),k=I(ca),N=I(ua),R=I(ma),q=I(fa),S=I(ha),re=I(ga),X=I(pa);function l(...e){return la.twMerge(ia.clsx(e))}function We(e){return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric"}).format(new Date(e))}function Ie(e){return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).format(new Date(e))}function ba(e){return`${We(e)} at ${Ie(e)}`}function ya(){return Math.random().toString(36).substr(2,9)}function wa(e,t){let a;return(...n)=>{clearTimeout(a),a=setTimeout(()=>e(...n),t)}}function va(e,t){let a;return(...n)=>{a||(e(...n),a=!0,setTimeout(()=>a=!1,t))}}const ze=L.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),F=u.forwardRef(({className:e,variant:t,size:a,asChild:n=!1,...s},o)=>{const i=n?Fe.Slot:"button";return r.jsx(i,{className:l(ze({variant:t,size:a,className:e})),ref:o,...s})});F.displayName="Button";const _e=L.cva("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-primary hover:text-primary/80 underline-offset-4 hover:underline",destructive:"text-destructive hover:text-destructive/80 underline-offset-4 hover:underline",ghost:"text-foreground hover:text-accent-foreground hover:bg-accent rounded-md px-3 py-2",secondary:"text-secondary-foreground underline-offset-4 hover:underline",button:"bg-primary text-primary-foreground hover:bg-primary/90 rounded-md","button-outline":"border border-input bg-background hover:bg-accent hover:text-accent-foreground rounded-md","button-secondary":"bg-secondary text-secondary-foreground hover:bg-secondary/80 rounded-md"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10",none:"h-auto px-0 py-0"}},defaultVariants:{variant:"default",size:"none"}}),_=u.forwardRef(({className:e,variant:t,size:a,asChild:n=!1,...s},o)=>{const i=n?Fe.Slot:"a";return r.jsx(i,{className:l(_e({variant:t,size:a,className:e})),ref:o,...s})});_.displayName="Link";const U=u.forwardRef(({className:e,type:t,...a},n)=>r.jsx("input",{type:t,className:l("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...a}));U.displayName="Input";const Q=u.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Q.displayName="Card";const Ae=u.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:l("flex flex-col space-y-1.5 p-6",e),...t}));Ae.displayName="CardHeader";const Ye=u.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:l("font-semibold leading-none tracking-tight",e),...t}));Ye.displayName="CardTitle";const Be=u.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:l("text-sm text-muted-foreground",e),...t}));Be.displayName="CardDescription";const J=u.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:l("p-6 pt-0",e),...t}));J.displayName="CardContent";const $e=u.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:l("flex items-center p-6 pt-0",e),...t}));$e.displayName="CardFooter";const qe=L.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ja({className:e,variant:t,...a}){return r.jsx("div",{className:l(qe({variant:t}),e),...a})}const He=u.forwardRef(({className:e,orientation:t="horizontal",variant:a="solid",...n},s)=>{const o={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return r.jsx("div",{ref:s,className:l("border-border",t==="horizontal"?`w-full border-t ${o[a]}`:`h-full border-l ${o[a]}`,e),...n})});He.displayName="Divider";const Na=L.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ee=u.forwardRef(({className:e,...t},a)=>r.jsx(Ve.Root,{ref:a,className:l(Na(),e),...t}));ee.displayName=Ve.Root.displayName;const ka="data-mode",Ma="data-theme",Me="dark",Ca={day:{"--background":"#ffffff","--foreground":"#171717","--popover":"#ffffff","--tm-primary":"#00bfa6","--tm-secondary":"#f4f4f5","--tm-accent":"#e5e7eb"},night:{"--background":"#0b0b10","--foreground":"#e5e7eb","--popover":"#0e1016","--tm-primary":"#7b5eff","--tm-secondary":"#12121b","--tm-accent":"#1a1a26"}};function Ge(e){if(typeof document>"u")return;const t=document.documentElement;t.setAttribute(ka,e),t.setAttribute(Ma,e),e==="night"?t.classList.add(Me):t.classList.remove(Me);const a=Ca[e];Object.entries(a).forEach(([s,o])=>{o?t.style.setProperty(s,o):t.style.removeProperty(s)});const n=document.body;if(n){n.dataset.mode=e;const s=a["--background"],o=a["--foreground"];s?n.style.backgroundColor=s:n.style.removeProperty("background-color"),o?n.style.color=o:n.style.removeProperty("color")}}const Xe="tm_mode",Ue="tm_mode",Qe="theme",Je="data-mode",Ke="data-theme",Sa="dark";function Ze(e){var s,o;if(((o=(s=globalThis.process)==null?void 0:s.env)==null?void 0:o.NODE_ENV)==="production"||typeof document>"u")return;const a=document.documentElement,n={"data-mode":a.getAttribute(Je),"data-theme":a.getAttribute(Ke),darkClass:a.classList.contains(Sa),"--background":getComputedStyle(a).getPropertyValue("--background"),"--tm-primary":getComputedStyle(a).getPropertyValue("--tm-primary")};console.log("[theme-switch]",e,n)}function Ta(e){var n;if(typeof document>"u")return;const a=`; ${document.cookie}`.split(`; ${e}=`);if(a.length===2)return(n=a.pop())==null?void 0:n.split(";")[0]}function Ce(){var n,s;if(typeof document>"u")return"day";const e=document.documentElement.getAttribute(Je);if(e==="day"||e==="night")return e;const t=document.documentElement.getAttribute(Ke);if(t==="day"||t==="night")return t;try{const o=window.localStorage.getItem(Ue);if(o==="day"||o==="night")return o;const i=window.localStorage.getItem(Qe);if(i==="dark")return"night";if(i==="light")return"day"}catch{}const a=Ta(Xe);return a==="day"||a==="night"?a:typeof window<"u"&&((s=(n=window.matchMedia)==null?void 0:n.call(window,"(prefers-color-scheme: dark)"))==null?void 0:s.matches)?"night":"day"}function Se(e){Ge(e);try{window.localStorage.setItem(Ue,e),window.localStorage.setItem(Qe,e==="night"?"dark":"light")}catch{}const t=new Date;t.setFullYear(t.getFullYear()+1),document.cookie=`${Xe}=${e};expires=${t.toUTCString()};path=/;SameSite=Lax`,Ze(`persist:${e}`)}const Da=({className:e,size:t="md",variant:a="default"})=>{const[n,s]=x.useState(()=>Ce());x.useEffect(()=>{const c=Ce();s(c),Se(c),Ze(`initial:${c}`)},[]);const o=()=>{s(c=>{const m=c==="night"?"day":"night";return Se(m),m})},i={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},d={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"};return r.jsx("button",{onClick:o,className:l("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",i[t],d[a],e),"aria-label":`Switch to ${n==="night"?"day":"night"} theme`,type:"button",children:n==="night"?r.jsx(M.Sun,{className:"h-4 w-4"}):r.jsx(M.Moon,{className:"h-4 w-4"})})},Pa=({className:e,children:t,as:a,level:n=1})=>{const s=a||`h${n}`,o={1:"text-4xl font-bold tracking-tight",2:"text-3xl font-bold tracking-tight",3:"text-2xl font-bold tracking-tight",4:"text-xl font-semibold tracking-tight",5:"text-lg font-semibold tracking-tight",6:"text-base font-semibold tracking-tight"};return r.jsx(s,{className:l(o[n],e),children:t})},et=({className:e,children:t,size:a="base",weight:n="normal",color:s="default"})=>{const o={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},i={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},d={default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",destructive:"text-destructive"};return r.jsx("span",{className:l(o[a],i[n],d[s],e),children:t})},Oa=({className:e,children:t,...a})=>r.jsx("p",{className:l("leading-7 [&:not(:first-child)]:mt-6",e),children:r.jsx(et,{...a,children:t})}),Ra=({className:e,children:t})=>r.jsx("code",{className:l("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),children:t}),Ea=({className:e,children:t})=>r.jsx("blockquote",{className:l("mt-6 border-l-2 pl-6 italic",e),children:t}),tt=L.cva("flex",{variants:{direction:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},justify:{start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},align:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12",16:"gap-16",20:"gap-20",24:"gap-24"}},defaultVariants:{direction:"row",wrap:"nowrap",justify:"start",align:"start",gap:0}}),at=u.forwardRef(({className:e,direction:t,wrap:a,justify:n,align:s,gap:o,...i},d)=>r.jsx("div",{ref:d,className:l(tt({direction:t,wrap:a,justify:n,align:s,gap:o,className:e})),...i}));at.displayName="Flex";const rt=L.cva("grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",12:"grid-cols-12",none:"grid-cols-none"},rows:{1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",none:"grid-rows-none"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12",16:"gap-16",20:"gap-20",24:"gap-24"},flow:{row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"}},defaultVariants:{cols:1,rows:"none",gap:0,flow:"row"}}),nt=u.forwardRef(({className:e,cols:t,rows:a,gap:n,flow:s,...o},i)=>r.jsx("div",{ref:i,className:l(rt({cols:t,rows:a,gap:n,flow:s,className:e})),...o}));nt.displayName="Grid";const st=L.cva("flex flex-col",{variants:{spacing:{0:"space-y-0",1:"space-y-1",2:"space-y-2",3:"space-y-3",4:"space-y-4",5:"space-y-5",6:"space-y-6",8:"space-y-8",10:"space-y-10",12:"space-y-12",16:"space-y-16",20:"space-y-20",24:"space-y-24"},align:{start:"items-start",end:"items-end",center:"items-center",stretch:"items-stretch"},justify:{start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around"}},defaultVariants:{spacing:4,align:"stretch",justify:"start"}}),ot=u.forwardRef(({className:e,spacing:t,align:a,justify:n,...s},o)=>r.jsx("div",{ref:o,className:l(st({spacing:t,align:a,justify:n,className:e})),...s}));ot.displayName="Stack";const it=L.cva("mx-auto px-4",{variants:{size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl",full:"max-w-full"},padding:{none:"px-0",sm:"px-2",md:"px-4",lg:"px-6",xl:"px-8"}},defaultVariants:{size:"7xl",padding:"md"}}),lt=u.forwardRef(({className:e,size:t,padding:a,...n},s)=>r.jsx("div",{ref:s,className:l(it({size:t,padding:a,className:e})),...n}));lt.displayName="Container";const La=({className:e,children:t,padding:a="md",background:n="default",as:s="section"})=>{const o={none:"",sm:"py-4",md:"py-8",lg:"py-12",xl:"py-16"},i={default:"",muted:"bg-muted",card:"bg-card"};return r.jsx(s,{className:l("w-full",o[a],i[n],e),children:t})},Fa=({dayLabel:e="Day Mode",nightLabel:t="Night Mode",dayDescription:a="Bright theme for daytime browsing",nightDescription:n="Dark theme for nighttime browsing",className:s})=>r.jsx("div",{className:l("bg-gradient-to-r from-blue-500 to-purple-600 text-white p-8 rounded-lg",s),children:r.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[r.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Tenerife Music Platform"}),r.jsx("p",{className:"text-xl mb-8",children:"Discover amazing music events in Tenerife"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r.jsx(Q,{className:"bg-white/10 backdrop-blur-sm border-white/20",children:r.jsxs(J,{className:"p-6",children:[r.jsx("h3",{className:"text-2xl font-semibold mb-2",children:e}),r.jsx("p",{className:"text-white/80",children:a})]})}),r.jsx(Q,{className:"bg-white/10 backdrop-blur-sm border-white/20",children:r.jsxs(J,{className:"p-6",children:[r.jsx("h3",{className:"text-2xl font-semibold mb-2",children:t}),r.jsx("p",{className:"text-white/80",children:n})]})})]})]})}),Va=({className:e,left:t,right:a,children:n})=>r.jsxs("nav",{className:l("flex items-center justify-between w-full px-4 py-3",e),children:[t&&r.jsx("div",{className:"flex items-center",children:t}),n&&r.jsx("div",{className:"flex items-center",children:n}),a&&r.jsx("div",{className:"flex items-center",children:a})]}),Wa=({className:e,left:t,right:a,children:n})=>r.jsx("footer",{className:l("w-full border-t bg-background px-4 py-6",e),children:r.jsxs("div",{className:"flex items-center justify-between w-full",children:[t&&r.jsx("div",{className:"flex items-center",children:t}),n&&r.jsx("div",{className:"flex items-center",children:n}),a&&r.jsx("div",{className:"flex items-center",children:a})]})}),dt=k.Root,Ia=k.Trigger,ct=k.Portal,za=k.Close,de=u.forwardRef(({className:e,...t},a)=>r.jsx(k.Overlay,{ref:a,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));de.displayName=k.Overlay.displayName;const ce=u.forwardRef(({className:e,children:t,...a},n)=>r.jsxs(ct,{children:[r.jsx(de,{}),r.jsxs(k.Content,{ref:n,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,r.jsxs(k.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(M.X,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ce.displayName=k.Content.displayName;const ue=({className:e,...t})=>r.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ue.displayName="ModalHeader";const me=({className:e,...t})=>r.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});me.displayName="ModalFooter";const fe=u.forwardRef(({className:e,...t},a)=>r.jsx(k.Title,{ref:a,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));fe.displayName=k.Title.displayName;const he=u.forwardRef(({className:e,...t},a)=>r.jsx(k.Description,{ref:a,className:l("text-sm text-muted-foreground",e),...t}));he.displayName=k.Description.displayName;function ut({isOpen:e,onClose:t,onConfirm:a,title:n="Confirm Action",description:s="Are you sure you want to proceed? This action cannot be undone.",confirmText:o="Confirm",cancelText:i="Cancel",variant:d="default",isLoading:c=!1}){const m=()=>{a(),t()};return r.jsx(dt,{open:e,onOpenChange:t,children:r.jsxs(ce,{children:[r.jsxs(ue,{children:[r.jsx(fe,{children:n}),r.jsx(he,{children:s})]}),r.jsxs(me,{children:[r.jsx(F,{variant:"outline",onClick:t,disabled:c,children:i}),r.jsx(F,{variant:d,onClick:m,disabled:c,children:c?"Loading...":o})]})]})})}function _a(){const[e,t]=u.useState({isOpen:!1}),a=u.useCallback(o=>{t({isOpen:!0,...o})},[]),n=u.useCallback(()=>{t({isOpen:!1})},[]),s=u.useMemo(()=>r.jsx(ut,{isOpen:e.isOpen,onClose:n,onConfirm:e.onConfirm||(()=>{}),title:e.title,description:e.description,variant:e.variant}),[e,n]);return{showConfirm:a,hideConfirm:n,ConfirmDialog:s}}function Aa(e=!1){const[t,a]=x.useState({isOpen:e,data:void 0}),n=x.useCallback(i=>{a({isOpen:!0,data:i})},[]),s=x.useCallback(()=>{a(i=>({...i,isOpen:!1}))},[]),o=x.useCallback(()=>{a(i=>({...i,isOpen:!i.isOpen}))},[]);return{isOpen:t.isOpen,data:t.data,open:n,close:s,toggle:o}}function mt(){const[e,t]=x.useState({}),a=x.useCallback((d,c)=>{t(m=>({...m,[d]:{isOpen:!0,data:c}}))},[]),n=x.useCallback(d=>{t(c=>({...c,[d]:{isOpen:!1,data:void 0}}))},[]),s=x.useCallback(d=>{t(c=>{var m,f;return{...c,[d]:{isOpen:!((m=c[d])!=null&&m.isOpen),data:(f=c[d])==null?void 0:f.data}}})},[]),o=x.useCallback(d=>{var c;return((c=e[d])==null?void 0:c.isOpen)||!1},[e]),i=x.useCallback(d=>{var c;return(c=e[d])==null?void 0:c.data},[e]);return{openModal:a,closeModal:n,toggleModal:s,isModalOpen:o,getModalData:i}}const ft=x.createContext(void 0);function Ya({children:e}){const t=mt();return r.jsx(ft.Provider,{value:t,children:e})}function ht(){const e=x.useContext(ft);if(e===void 0)throw new Error("useModalContext must be used within a ModalProvider");return e}function Ba(e,t){return function(n){const{openModal:s,closeModal:o,toggleModal:i,isModalOpen:d,getModalData:c}=ht(),m={[`${t}Open`]:()=>s(t),[`${t}Close`]:()=>o(t),[`${t}Toggle`]:()=>i(t),[`is${t}Open`]:d(t),[`${t}Data`]:c(t)};return r.jsx(e,{...n,...m})}}function $a(e,t){if(e==null)return{};var a={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(a[s]=e[s]);return a}var qa=["color"],Ha=x.forwardRef(function(e,t){var a=e.color,n=a===void 0?"currentColor":a,s=$a(e,qa);return x.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:t}),x.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});const Ga=k.Root,Xa=k.Portal,gt=u.forwardRef(({className:e,...t},a)=>r.jsx(k.Overlay,{ref:a,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));gt.displayName=k.Overlay.displayName;const pt=u.forwardRef(({className:e,children:t,...a},n)=>r.jsxs(Xa,{children:[r.jsx(gt,{}),r.jsxs(k.Content,{ref:n,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,r.jsxs(k.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(Ha,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pt.displayName=k.Content.displayName;const xt=({className:e,...t})=>r.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});xt.displayName="DialogHeader";const bt=u.forwardRef(({className:e,...t},a)=>r.jsx(k.Title,{ref:a,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));bt.displayName=k.Title.displayName;const yt=u.forwardRef(({className:e,...t},a)=>r.jsx(k.Description,{ref:a,className:l("text-sm text-muted-foreground",e),...t}));yt.displayName=k.Description.displayName;const Ua=({isOpen:e,onClose:t,title:a,description:n,children:s,className:o})=>r.jsx(Ga,{open:e,onOpenChange:i=>!i&&t(),children:r.jsxs(pt,{className:l("max-w-md",o),children:[(a||n)&&r.jsxs(xt,{children:[a&&r.jsx(bt,{children:a}),n&&r.jsx(yt,{children:n})]}),s]})}),Qa=({isOpen:e,onClose:t,title:a,children:n,className:s})=>e?r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[r.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:t}),r.jsxs("div",{className:l("relative bg-card border rounded-lg shadow-lg max-w-md w-full mx-4",s),children:[a&&r.jsx("div",{className:"p-6 border-b",children:r.jsx("h2",{className:"text-lg font-semibold",children:a})}),r.jsx("div",{className:"p-6",children:n})]})]}):null,Ja=N.Root,Ka=N.Trigger,Za=N.Group,er=N.Portal,tr=N.Sub,ar=N.RadioGroup,wt=u.forwardRef(({className:e,inset:t,children:a,...n},s)=>r.jsxs(N.SubTrigger,{ref:s,className:l("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[a,r.jsx(M.ChevronRight,{className:"ml-auto h-4 w-4"})]}));wt.displayName=N.SubTrigger.displayName;const vt=u.forwardRef(({className:e,...t},a)=>r.jsx(N.SubContent,{ref:a,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));vt.displayName=N.SubContent.displayName;const jt=u.forwardRef(({className:e,sideOffset:t=4,...a},n)=>r.jsx(N.Portal,{children:r.jsx(N.Content,{ref:n,sideOffset:t,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));jt.displayName=N.Content.displayName;const Nt=u.forwardRef(({className:e,inset:t,...a},n)=>r.jsx(N.Item,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...a}));Nt.displayName=N.Item.displayName;const kt=u.forwardRef(({className:e,children:t,checked:a,...n},s)=>r.jsxs(N.CheckboxItem,{ref:s,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...n,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(N.ItemIndicator,{children:r.jsx(M.Check,{className:"h-4 w-4"})})}),t]}));kt.displayName=N.CheckboxItem.displayName;const Mt=u.forwardRef(({className:e,children:t,...a},n)=>r.jsxs(N.RadioItem,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(N.ItemIndicator,{children:r.jsx(M.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Mt.displayName=N.RadioItem.displayName;const Ct=u.forwardRef(({className:e,inset:t,...a},n)=>r.jsx(N.Label,{ref:n,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Ct.displayName=N.Label.displayName;const St=u.forwardRef(({className:e,...t},a)=>r.jsx(N.Separator,{ref:a,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));St.displayName=N.Separator.displayName;const Tt=({className:e,...t})=>r.jsx("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});Tt.displayName="DropdownMenuShortcut";const Dt=u.forwardRef(({className:e,children:t,...a},n)=>r.jsxs(R.Root,{ref:n,className:l("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...a,children:[t,r.jsx(ge,{})]}));Dt.displayName=R.Root.displayName;const Pt=u.forwardRef(({className:e,...t},a)=>r.jsx(R.List,{ref:a,className:l("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Pt.displayName=R.List.displayName;const rr=R.Item,Ot=L.cva("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Rt=u.forwardRef(({className:e,children:t,...a},n)=>r.jsxs(R.Trigger,{ref:n,className:l(Ot(),"group",e),...a,children:[t," ",r.jsx(M.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Rt.displayName=R.Trigger.displayName;const Et=u.forwardRef(({className:e,...t},a)=>r.jsx(R.Content,{ref:a,className:l("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));Et.displayName=R.Content.displayName;const nr=R.Link,ge=u.forwardRef(({className:e,...t},a)=>r.jsx("div",{className:l("absolute left-0 top-full flex justify-center"),children:r.jsx(R.Viewport,{className:l("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:a,...t})}));ge.displayName=R.Viewport.displayName;const Lt=u.forwardRef(({className:e,...t},a)=>r.jsx(R.Indicator,{ref:a,className:l("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52",e),...t,children:r.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Lt.displayName=R.Indicator.displayName;const sr=q.Root,Ft=u.forwardRef(({className:e,...t},a)=>r.jsx(q.List,{ref:a,className:l("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ft.displayName=q.List.displayName;const Vt=u.forwardRef(({className:e,...t},a)=>r.jsx(q.Trigger,{ref:a,className:l("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Vt.displayName=q.Trigger.displayName;const Wt=u.forwardRef(({className:e,...t},a)=>r.jsx(q.Content,{ref:a,className:l("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Wt.displayName=q.Content.displayName;function se({value:e,onChange:t,onClear:a,placeholder:n="Search...",showClearButton:s=!0,debounceMs:o=300,className:i,id:d,name:c,...m}){const f=d||u.useId(),h=c||`search-input-${f}`,[g,C]=u.useState(e),b=u.useRef(null);u.useEffect(()=>{C(e)},[e]);const j=E=>{const p=E.target.value;C(p),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{t(p)},o)},O=()=>{C(""),t(""),a==null||a()};return u.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]),r.jsxs("div",{className:l("relative",i),children:[r.jsx(M.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),r.jsx(U,{...m,id:f,name:h,value:g,onChange:j,placeholder:n,className:"pl-10 pr-10"}),s&&g&&r.jsx(F,{type:"button",variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2",onClick:O,children:r.jsx(M.X,{className:"h-3 w-3"})})]})}function or(e=""){const[t,a]=u.useState(e),[n,s]=u.useState(e);u.useEffect(()=>{const i=setTimeout(()=>{s(t)},300);return()=>clearTimeout(i)},[t]);const o=u.useCallback(()=>{a(""),s("")},[]);return{search:t,debouncedSearch:n,setSearch:a,clearSearch:o}}const It=S.Root,ir=S.Group,zt=S.Value,pe=u.forwardRef(({className:e,children:t,...a},n)=>r.jsxs(S.Trigger,{ref:n,className:l("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[t,r.jsx(S.Icon,{asChild:!0,children:r.jsx(M.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));pe.displayName=S.Trigger.displayName;const xe=u.forwardRef(({className:e,...t},a)=>r.jsx(S.ScrollUpButton,{ref:a,className:l("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(M.ChevronUp,{className:"h-4 w-4"})}));xe.displayName=S.ScrollUpButton.displayName;const be=u.forwardRef(({className:e,...t},a)=>r.jsx(S.ScrollDownButton,{ref:a,className:l("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(M.ChevronDown,{className:"h-4 w-4"})}));be.displayName=S.ScrollDownButton.displayName;const ye=u.forwardRef(({className:e,children:t,position:a="popper",...n},s)=>r.jsx(S.Portal,{children:r.jsxs(S.Content,{ref:s,className:l("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[r.jsx(xe,{}),r.jsx(S.Viewport,{className:l("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(be,{})]})}));ye.displayName=S.Content.displayName;const _t=u.forwardRef(({className:e,...t},a)=>r.jsx(S.Label,{ref:a,className:l("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));_t.displayName=S.Label.displayName;const we=u.forwardRef(({className:e,children:t,...a},n)=>r.jsxs(S.Item,{ref:n,className:l("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(S.ItemIndicator,{children:r.jsx(M.Check,{className:"h-4 w-4"})})}),r.jsx(S.ItemText,{children:t})]}));we.displayName=S.Item.displayName;const At=u.forwardRef(({className:e,...t},a)=>r.jsx(S.Separator,{ref:a,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));At.displayName=S.Separator.displayName;function te({value:e,onValueChange:t,options:a,placeholder:n="Select option...",label:s,className:o}){const i=a.filter(d=>d.value!==""&&d.value!=null);return r.jsxs("div",{className:l("space-y-2",o),children:[s&&r.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s}),r.jsxs(It,{value:e||void 0,onValueChange:t,children:[r.jsx(pe,{children:r.jsx(zt,{placeholder:n})}),r.jsx(ye,{children:i.map(d=>!d.value||d.value===""?null:r.jsx(we,{value:d.value,children:r.jsxs("div",{className:"flex items-center justify-between w-full",children:[r.jsx("span",{children:d.label}),d.count!==void 0&&r.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:["(",d.count,")"]})]})},d.value))})]})]})}function V(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function $(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Yt=6048e5,lr=864e5;let dr={};function oe(){return dr}function ae(e,t){var d,c,m,f;const a=oe(),n=(t==null?void 0:t.weekStartsOn)??((c=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:c.weekStartsOn)??a.weekStartsOn??((f=(m=a.locale)==null?void 0:m.options)==null?void 0:f.weekStartsOn)??0,s=V(e),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function ne(e){return ae(e,{weekStartsOn:1})}function Bt(e){const t=V(e),a=t.getFullYear(),n=$(e,0);n.setFullYear(a+1,0,4),n.setHours(0,0,0,0);const s=ne(n),o=$(e,0);o.setFullYear(a,0,4),o.setHours(0,0,0,0);const i=ne(o);return t.getTime()>=s.getTime()?a+1:t.getTime()>=i.getTime()?a:a-1}function Te(e){const t=V(e);return t.setHours(0,0,0,0),t}function De(e){const t=V(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function cr(e,t){const a=Te(e),n=Te(t),s=+a-De(a),o=+n-De(n);return Math.round((s-o)/lr)}function ur(e){const t=Bt(e),a=$(e,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),ne(a)}function mr(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function fr(e){if(!mr(e)&&typeof e!="number")return!1;const t=V(e);return!isNaN(Number(t))}function hr(e){const t=V(e),a=$(e,0);return a.setFullYear(t.getFullYear(),0,1),a.setHours(0,0,0,0),a}const gr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},pr=(e,t,a)=>{let n;const s=gr[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n};function ie(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const xr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},br={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},yr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wr={date:ie({formats:xr,defaultWidth:"full"}),time:ie({formats:br,defaultWidth:"full"}),dateTime:ie({formats:yr,defaultWidth:"full"})},vr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jr=(e,t,a,n)=>vr[e];function K(e){return(t,a)=>{const n=a!=null&&a.context?String(a.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,d=a!=null&&a.width?String(a.width):i;s=e.formattingValues[d]||e.formattingValues[i]}else{const i=e.defaultWidth,d=a!=null&&a.width?String(a.width):e.defaultWidth;s=e.values[d]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const Nr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Mr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Cr={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Sr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Tr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Dr=(e,t)=>{const a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},Pr={ordinalNumber:Dr,era:K({values:Nr,defaultWidth:"wide"}),quarter:K({values:kr,defaultWidth:"wide",argumentCallback:e=>e-1}),month:K({values:Mr,defaultWidth:"wide"}),day:K({values:Cr,defaultWidth:"wide"}),dayPeriod:K({values:Sr,defaultWidth:"wide",formattingValues:Tr,defaultFormattingWidth:"wide"})};function Z(e){return(t,a={})=>{const n=a.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const i=o[0],d=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(d)?Rr(d,h=>h.test(i)):Or(d,h=>h.test(i));let m;m=e.valueCallback?e.valueCallback(c):c,m=a.valueCallback?a.valueCallback(m):m;const f=t.slice(i.length);return{value:m,rest:f}}}function Or(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function Rr(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function Er(e){return(t,a={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=a.valueCallback?a.valueCallback(i):i;const d=t.slice(s.length);return{value:i,rest:d}}}const Lr=/^(\d+)(th|st|nd|rd)?/i,Fr=/\d+/i,Vr={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Wr={any:[/^b/i,/^(a|c)/i]},Ir={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zr={any:[/1/i,/2/i,/3/i,/4/i]},_r={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ar={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Yr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Br={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$r={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Hr={ordinalNumber:Er({matchPattern:Lr,parsePattern:Fr,valueCallback:e=>parseInt(e,10)}),era:Z({matchPatterns:Vr,defaultMatchWidth:"wide",parsePatterns:Wr,defaultParseWidth:"any"}),quarter:Z({matchPatterns:Ir,defaultMatchWidth:"wide",parsePatterns:zr,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Z({matchPatterns:_r,defaultMatchWidth:"wide",parsePatterns:Ar,defaultParseWidth:"any"}),day:Z({matchPatterns:Yr,defaultMatchWidth:"wide",parsePatterns:Br,defaultParseWidth:"any"}),dayPeriod:Z({matchPatterns:$r,defaultMatchWidth:"any",parsePatterns:qr,defaultParseWidth:"any"})},Gr={code:"en-US",formatDistance:pr,formatLong:wr,formatRelative:jr,localize:Pr,match:Hr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xr(e){const t=V(e);return cr(t,hr(t))+1}function Ur(e){const t=V(e),a=+ne(t)-+ur(t);return Math.round(a/Yt)+1}function $t(e,t){var f,h,g,C;const a=V(e),n=a.getFullYear(),s=oe(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((C=(g=s.locale)==null?void 0:g.options)==null?void 0:C.firstWeekContainsDate)??1,i=$(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const d=ae(i,t),c=$(e,0);c.setFullYear(n,0,o),c.setHours(0,0,0,0);const m=ae(c,t);return a.getTime()>=d.getTime()?n+1:a.getTime()>=m.getTime()?n:n-1}function Qr(e,t){var d,c,m,f;const a=oe(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:c.firstWeekContainsDate)??a.firstWeekContainsDate??((f=(m=a.locale)==null?void 0:m.options)==null?void 0:f.firstWeekContainsDate)??1,s=$t(e,t),o=$(e,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),ae(o,t)}function Jr(e,t){const a=V(e),n=+ae(a,t)-+Qr(a,t);return Math.round(n/Yt)+1}function w(e,t){const a=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return a+n}const z={y(e,t){const a=e.getFullYear(),n=a>0?a:1-a;return w(t==="yy"?n%100:n,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):w(a+1,2)},d(e,t){return w(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return w(e.getHours()%12||12,t.length)},H(e,t){return w(e.getHours(),t.length)},m(e,t){return w(e.getMinutes(),t.length)},s(e,t){return w(e.getSeconds(),t.length)},S(e,t){const a=t.length,n=e.getMilliseconds(),s=Math.trunc(n*Math.pow(10,a-3));return w(s,t.length)}},H={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pe={G:function(e,t,a){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const n=e.getFullYear(),s=n>0?n:1-n;return a.ordinalNumber(s,{unit:"year"})}return z.y(e,t)},Y:function(e,t,a,n){const s=$t(e,n),o=s>0?s:1-s;if(t==="YY"){const i=o%100;return w(i,2)}return t==="Yo"?a.ordinalNumber(o,{unit:"year"}):w(o,t.length)},R:function(e,t){const a=Bt(e);return w(a,t.length)},u:function(e,t){const a=e.getFullYear();return w(a,t.length)},Q:function(e,t,a){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return w(n,2);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,a){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return w(n,2);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,a){const n=e.getMonth();switch(t){case"M":case"MM":return z.M(e,t);case"Mo":return a.ordinalNumber(n+1,{unit:"month"});case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,a){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return w(n+1,2);case"Lo":return a.ordinalNumber(n+1,{unit:"month"});case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,a,n){const s=Jr(e,n);return t==="wo"?a.ordinalNumber(s,{unit:"week"}):w(s,t.length)},I:function(e,t,a){const n=Ur(e);return t==="Io"?a.ordinalNumber(n,{unit:"week"}):w(n,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):z.d(e,t)},D:function(e,t,a){const n=Xr(e);return t==="Do"?a.ordinalNumber(n,{unit:"dayOfYear"}):w(n,t.length)},E:function(e,t,a){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,a,n){const s=e.getDay(),o=(s-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return w(o,2);case"eo":return a.ordinalNumber(o,{unit:"day"});case"eee":return a.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(s,{width:"short",context:"formatting"});case"eeee":default:return a.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,a,n){const s=e.getDay(),o=(s-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return w(o,t.length);case"co":return a.ordinalNumber(o,{unit:"day"});case"ccc":return a.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(s,{width:"narrow",context:"standalone"});case"cccccc":return a.day(s,{width:"short",context:"standalone"});case"cccc":default:return a.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,a){const n=e.getDay(),s=n===0?7:n;switch(t){case"i":return String(s);case"ii":return w(s,t.length);case"io":return a.ordinalNumber(s,{unit:"day"});case"iii":return a.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(n,{width:"short",context:"formatting"});case"iiii":default:return a.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,a){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,a){const n=e.getHours();let s;switch(n===12?s=H.noon:n===0?s=H.midnight:s=n/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,a){const n=e.getHours();let s;switch(n>=17?s=H.evening:n>=12?s=H.afternoon:n>=4?s=H.morning:s=H.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),a.ordinalNumber(n,{unit:"hour"})}return z.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):z.H(e,t)},K:function(e,t,a){const n=e.getHours()%12;return t==="Ko"?a.ordinalNumber(n,{unit:"hour"}):w(n,t.length)},k:function(e,t,a){let n=e.getHours();return n===0&&(n=24),t==="ko"?a.ordinalNumber(n,{unit:"hour"}):w(n,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):z.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):z.s(e,t)},S:function(e,t){return z.S(e,t)},X:function(e,t,a){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Re(n);case"XXXX":case"XX":return B(n);case"XXXXX":case"XXX":default:return B(n,":")}},x:function(e,t,a){const n=e.getTimezoneOffset();switch(t){case"x":return Re(n);case"xxxx":case"xx":return B(n);case"xxxxx":case"xxx":default:return B(n,":")}},O:function(e,t,a){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Oe(n,":");case"OOOO":default:return"GMT"+B(n,":")}},z:function(e,t,a){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Oe(n,":");case"zzzz":default:return"GMT"+B(n,":")}},t:function(e,t,a){const n=Math.trunc(e.getTime()/1e3);return w(n,t.length)},T:function(e,t,a){const n=e.getTime();return w(n,t.length)}};function Oe(e,t=""){const a=e>0?"-":"+",n=Math.abs(e),s=Math.trunc(n/60),o=n%60;return o===0?a+String(s):a+String(s)+t+w(o,2)}function Re(e,t){return e%60===0?(e>0?"-":"+")+w(Math.abs(e)/60,2):B(e,t)}function B(e,t=""){const a=e>0?"-":"+",n=Math.abs(e),s=w(Math.trunc(n/60),2),o=w(n%60,2);return a+s+t+o}const Ee=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},qt=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Kr=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],n=a[1],s=a[2];if(!s)return Ee(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Ee(n,t)).replace("{{time}}",qt(s,t))},Zr={p:qt,P:Kr},en=/^D+$/,tn=/^Y+$/,an=["D","DD","YY","YYYY"];function rn(e){return en.test(e)}function nn(e){return tn.test(e)}function sn(e,t,a){const n=on(e,t,a);if(console.warn(n),an.includes(e))throw new RangeError(n)}function on(e,t,a){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ln=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cn=/^'([^]*?)'?$/,un=/''/g,mn=/[a-zA-Z]/;function le(e,t,a){var f,h,g,C;const n=oe(),s=n.locale??Gr,o=n.firstWeekContainsDate??((h=(f=n.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=n.weekStartsOn??((C=(g=n.locale)==null?void 0:g.options)==null?void 0:C.weekStartsOn)??0,d=V(e);if(!fr(d))throw new RangeError("Invalid time value");let c=t.match(dn).map(b=>{const j=b[0];if(j==="p"||j==="P"){const O=Zr[j];return O(b,s.formatLong)}return b}).join("").match(ln).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const j=b[0];if(j==="'")return{isToken:!1,value:fn(b)};if(Pe[j])return{isToken:!0,value:b};if(j.match(mn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return{isToken:!1,value:b}});s.localize.preprocessor&&(c=s.localize.preprocessor(d,c));const m={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return c.map(b=>{if(!b.isToken)return b.value;const j=b.value;(nn(j)||rn(j))&&sn(j,t,String(e));const O=Pe[j[0]];return O(d,j,s.localize,m)}).join("")}function fn(e){const t=e.match(cn);return t?t[1].replace(un,"'"):e}function ve({value:e,onChange:t,placeholder:a="Pick a date range",className:n,disabled:s=!1}){const[o,i]=u.useState(!1),d=f=>f.from?f.to?`${le(f.from,"LLL dd, y")} - ${le(f.to,"LLL dd, y")}`:le(f.from,"LLL dd, y"):a,c=f=>{if(!f){t({from:void 0,to:void 0});return}!e.from||e.from&&e.to?t({from:f,to:void 0}):e.from&&!e.to&&(f<e.from?t({from:f,to:e.from}):t({from:e.from,to:f}),i(!1))},m=()=>{t({from:void 0,to:void 0})};return r.jsxs("div",{className:l("relative",n),children:[r.jsxs(F,{variant:"outline",className:l("w-full justify-start text-left font-normal",!e.from&&"text-muted-foreground"),onClick:()=>i(!o),disabled:s,children:[r.jsx(M.Calendar,{className:"mr-2 h-4 w-4"}),d(e)]}),o&&r.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 w-full rounded-md border bg-popover p-3 shadow-lg",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-sm font-medium",children:"Select Date Range"}),r.jsxs("div",{className:"grid grid-cols-7 gap-1 text-xs",children:[["S","M","T","W","T","F","S"].map(f=>r.jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:f},f)),Array.from({length:35},(f,h)=>{const g=new Date;g.setDate(g.getDate()-g.getDay()+h);const C=e.from&&g.toDateString()===e.from.toDateString()||e.to&&g.toDateString()===e.to.toDateString(),b=e.from&&e.to&&g>e.from&&g<e.to;return r.jsx("button",{className:l("h-8 w-8 rounded text-sm hover:bg-accent",C&&"bg-primary text-primary-foreground",b&&"bg-accent/50"),onClick:()=>c(g),children:g.getDate()},h)})]}),r.jsxs("div",{className:"flex justify-between pt-2",children:[r.jsx(F,{variant:"outline",size:"sm",onClick:m,children:"Clear"}),r.jsx(F,{variant:"outline",size:"sm",onClick:()=>i(!1),children:"Close"})]})]})})]})}function hn(e={from:void 0,to:void 0}){const[t,a]=u.useState(e),n=u.useCallback(i=>{a(i)},[]),s=u.useCallback(()=>{a({from:void 0,to:void 0})},[]),o=t.from&&t.to;return{range:t,setDateRange:n,clearRange:s,isRangeComplete:o}}function Ht({value:e,onChange:t,min:a=0,max:n=1e3,step:s=10,currency:o="€",className:i}){var v,Y;const d=u.useId(),c=u.useId(),[m,f]=u.useState(((v=e.min)==null?void 0:v.toString())||""),[h,g]=u.useState(((Y=e.max)==null?void 0:Y.toString())||"");u.useEffect(()=>{var D,y;f(((D=e.min)==null?void 0:D.toString())||""),g(((y=e.max)==null?void 0:y.toString())||"")},[e.min,e.max]);const C=D=>{const y=D.target.value;f(y);const T=y===""?null:Math.max(a,parseInt(y)||a),P=e.max?Math.min(n,e.max):null;T!==null&&P!==null&&T>P?t({min:T,max:T}):t({min:T,max:P})},b=D=>{const y=D.target.value;g(y);const T=y===""?null:Math.min(n,parseInt(y)||n),P=e.min?Math.max(a,e.min):null;P!==null&&T!==null&&P>T?t({min:T,max:T}):t({min:P,max:T})},j=(D,y)=>{if(D==="min"){const T=Math.max(a,Math.min(n,y)),P=e.max?Math.max(T,e.max):null;t({min:T,max:P})}else{const T=Math.max(a,Math.min(n,y)),P=e.min?Math.min(T,e.min):null;t({min:P,max:T})}},O=()=>{f(""),g(""),t({min:null,max:null})},E=e.min||a,p=e.max||n;return r.jsxs("div",{className:l("space-y-4",i),children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(ee,{children:"Price Range"}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs("div",{className:"flex-1",children:[r.jsx(ee,{htmlFor:d,className:"text-xs text-muted-foreground",children:"Min"}),r.jsxs("div",{className:"relative",children:[r.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:o}),r.jsx(U,{id:d,name:`min-price-${d}`,type:"number",value:m,onChange:C,placeholder:a.toString(),min:a,max:n,step:s,className:"pl-8"})]})]}),r.jsxs("div",{className:"flex-1",children:[r.jsx(ee,{htmlFor:c,className:"text-xs text-muted-foreground",children:"Max"}),r.jsxs("div",{className:"relative",children:[r.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:o}),r.jsx(U,{id:c,name:`max-price-${c}`,type:"number",value:h,onChange:b,placeholder:n.toString(),min:a,max:n,step:s,className:"pl-8"})]})]})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:"range",id:`${d}-slider`,name:`min-price-slider-${d}`,min:a,max:n,step:s,value:E,onChange:D=>j("min",parseInt(D.target.value)),className:"absolute w-full h-2 bg-transparent appearance-none cursor-pointer slider-thumb","aria-label":"Minimum price"}),r.jsx("input",{type:"range",id:`${c}-slider`,name:`max-price-slider-${c}`,min:a,max:n,step:s,value:p,onChange:D=>j("max",parseInt(D.target.value)),className:"absolute w-full h-2 bg-transparent appearance-none cursor-pointer slider-thumb","aria-label":"Maximum price"}),r.jsx("div",{className:"h-2 bg-muted rounded-full",children:r.jsx("div",{className:"h-2 bg-primary rounded-full",style:{left:`${(E-a)/(n-a)*100}%`,width:`${(p-E)/(n-a)*100}%`}})})]}),r.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[r.jsxs("span",{children:[o,a]}),r.jsxs("span",{children:[o,n]})]})]}),r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-sm text-muted-foreground",children:e.min!==null||e.max!==null?`${o}${e.min||a} - ${o}${e.max||n}`:"Any price"}),r.jsx("button",{type:"button",onClick:O,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]})]})}function gn(e={min:null,max:null}){const[t,a]=u.useState(e),n=u.useCallback(i=>{a(i)},[]),s=u.useCallback(()=>{a({min:null,max:null})},[]),o=t.min!==null||t.max!==null;return{range:t,setPriceRange:n,clearRange:s,isRangeSet:o}}const pn=()=>(console.warn("useFilterManager: This is a mock implementation. Use the actual hook from apps/web/src/stores/useFiltersStore"),{search:"",category:"",tags:[],dateRange:{start:null,end:null},priceRange:{min:null,max:null},sortBy:"date",sortOrder:"desc",setSearch:e=>{},setCategory:e=>{},setTags:e=>{},addTag:e=>{},removeTag:e=>{},setDateRange:(e,t)=>{},setPriceRange:(e,t)=>{},setSorting:(e,t)=>{},resetFilters:()=>{},getActiveFiltersCount:()=>0,getFilterSummary:()=>[],hasActiveFilters:!1,clearAllFilters:()=>{}});function Gt({className:e,showSearch:t=!0,showCategory:a=!0,showDateRange:n=!0,showPriceRange:s=!0,showSorting:o=!0,categories:i=[],sortOptions:d=[{value:"date",label:"Date"},{value:"name",label:"Name"},{value:"price",label:"Price"}],onFiltersChange:c}){const{search:m,category:f,dateRange:h,priceRange:g,sortBy:C,sortOrder:b,setSearch:j,setCategory:O,setDateRange:E,setPriceRange:p,hasActiveFilters:v}=pn();u.useEffect(()=>{c&&c({search:m,category:f,dateRange:h,priceRange:g,sortBy:C,sortOrder:b})},[m,f,h,g,C,b,c]);const Y=y=>{E(y.from||null,y.to||null)},D=y=>{p(y.min,y.max)};return r.jsxs("div",{className:l("space-y-4",e),children:[r.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[t&&r.jsx("div",{className:"flex-1",children:r.jsx(se,{value:m,onChange:j,placeholder:"Search events, venues, artists..."})}),v]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[a&&i.length>0&&r.jsx(te,{value:f,onValueChange:O,options:i,label:"Category",placeholder:"All categories"}),n&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Date Range"}),r.jsx(ve,{value:{from:h.start||void 0,to:h.end||void 0},onChange:Y,placeholder:"Any date"})]}),s&&r.jsx(Ht,{value:g,onChange:D,min:0,max:500,step:10,currency:"€"}),o&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Sort by"}),r.jsx(te,{value:`${C}-${b}`,onValueChange:y=>{const[T,P]=y.split("-")},options:d.map(y=>({value:`${y.value}-asc`,label:`${y.label} (A-Z)`})).concat(d.map(y=>({value:`${y.value}-desc`,label:`${y.label} (Z-A)`}))),placeholder:"Sort by..."})]})]}),v]})}function xn({className:e,...t}){return r.jsx(Gt,{className:l("space-y-2",e),...t})}const bn=({onSearch:e,onDateChange:t,onGenreChange:a,onVenueChange:n,className:s})=>r.jsx("div",{className:l("bg-white dark:bg-gray-800 p-6 rounded-lg shadow-lg",s),children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium mb-2",children:"Search"}),r.jsx(se,{placeholder:"Search events...",value:"",onChange:()=>{}})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium mb-2",children:"Date"}),r.jsx(ve,{value:{from:void 0,to:void 0},onChange:()=>{}})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium mb-2",children:"Genre"}),r.jsx(te,{placeholder:"Select genre",value:"",options:[{value:"classical",label:"Classical"},{value:"rock",label:"Rock"},{value:"jazz",label:"Jazz"},{value:"electronic",label:"Electronic"},{value:"folk",label:"Folk"}],onValueChange:a||(()=>{})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium mb-2",children:"Venue"}),r.jsx(te,{placeholder:"Select venue",value:"",options:[{value:"auditorio",label:"Auditorio de Tenerife"},{value:"teatro",label:"Teatro Guimerá"},{value:"casino",label:"Casino de Tenerife"},{value:"outdoor",label:"Outdoor Venues"}],onValueChange:n||(()=>{})})]})]})});function yn(){const[e,t]=x.useState([]),a=x.useCallback(i=>{const d=Math.random().toString(36).substr(2,9),c={id:d,duration:5e3,...i};return t(m=>[...m,c]),c.duration&&c.duration>0&&setTimeout(()=>{n(d)},c.duration),d},[]),n=x.useCallback(i=>{t(d=>d.filter(c=>c.id!==i))},[]),s=x.useCallback(()=>{t([])},[]),o=x.useCallback((i,d)=>{t(c=>c.map(m=>m.id===i?{...m,...d}:m))},[]);return{toasts:e,toast:a,dismiss:n,dismissAll:s,updateToast:o}}const Xt=L.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{type:{default:"border bg-background text-foreground",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100",warning:"border-yellow-200 bg-yellow-50 text-yellow-900 dark:border-yellow-800 dark:bg-yellow-950 dark:text-yellow-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100"}},defaultVariants:{type:"default"}}),wn=L.cva("h-4 w-4 flex-shrink-0",{variants:{type:{default:"text-foreground",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"}},defaultVariants:{type:"default"}}),vn=e=>{switch(e){case"success":return M.CheckCircle;case"error":return M.AlertCircle;case"warning":return M.AlertTriangle;case"info":return M.Info;default:return M.Info}},je=u.forwardRef(({className:e,toast:t,onDismiss:a,type:n=t.type,...s},o)=>{const i=vn(t.type);return r.jsxs("div",{ref:o,className:l(Xt({type:n,className:e})),...s,children:[r.jsxs("div",{className:"flex items-start space-x-3 flex-1",children:[r.jsx(i,{className:l(wn({type:t.type}))}),r.jsxs("div",{className:"flex-1 space-y-1",children:[t.title&&r.jsx("div",{className:"text-sm font-semibold",children:t.title}),t.description&&r.jsx("div",{className:"text-sm opacity-90",children:t.description}),t.action&&r.jsx("div",{className:"mt-2",children:r.jsx(F,{variant:"outline",size:"sm",onClick:t.action.onClick,className:"h-8 px-2 text-xs",children:t.action.label})})]})]}),r.jsx(F,{variant:"ghost",size:"icon",className:"absolute right-1 top-1 h-6 w-6 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100",onClick:()=>a(t.id),children:r.jsx(M.X,{className:"h-4 w-4"})})]})});je.displayName="Toast";const Ut=x.createContext(void 0);function jn({children:e,position:t="top-right",maxToasts:a=5}){const n=yn(),{toasts:s,toast:o,dismiss:i,dismissAll:d,updateToast:c}=n,m=s.slice(-a),f={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"};return r.jsxs(Ut.Provider,{value:{toast:o,dismiss:i,dismissAll:d,updateToast:c},children:[e,r.jsx(kn,{position:t,positionClasses:f[t],children:m.map(h=>r.jsx(je,{toast:h,onDismiss:i},h.id))})]})}function Qt(){const e=x.useContext(Ut);if(e===void 0)throw new Error("useToastContext must be used within a ToastProvider");return e}function Nn(){const{toast:e,dismiss:t,dismissAll:a,updateToast:n}=Qt();return{toast:e,dismiss:t,dismissAll:a,updateToast:n,success:s=>e({...s,type:"success"}),error:s=>e({...s,type:"error"}),warning:s=>e({...s,type:"warning"}),info:s=>e({...s,type:"info"})}}function kn({children:e,positionClasses:t}){return r.jsx("div",{className:l("fixed z-[100] flex max-h-screen w-full flex-col-reverse p-0 sm:flex-col",t),style:{pointerEvents:"none"},children:r.jsx("div",{className:"pointer-events-auto flex flex-col gap-2",children:e})})}const Jt=re.Provider,Kt=re.Root,Zt=re.Trigger,ea=L.cva("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{variant:{default:"bg-popover text-popover-foreground border-border",destructive:"border-destructive/50 text-destructive bg-destructive/10",warning:"border-yellow-500/50 text-yellow-700 bg-yellow-50",success:"border-green-500/50 text-green-700 bg-green-50",info:"border-blue-500/50 text-blue-700 bg-blue-50"}},defaultVariants:{variant:"default"}}),Ne=u.forwardRef(({className:e,variant:t,sideOffset:a=4,...n},s)=>r.jsx(re.Content,{ref:s,sideOffset:a,className:l(ea({variant:t,className:e})),...n}));Ne.displayName=re.Content.displayName;function Mn({children:e,content:t,variant:a,side:n="top",align:s="center",sideOffset:o,alignOffset:i,delayDuration:d=400,skipDelayDuration:c=300,disableHoverableContent:m=!1,open:f,onOpenChange:h}){return r.jsx(Jt,{delayDuration:d,skipDelayDuration:c,children:r.jsxs(Kt,{open:f,onOpenChange:h,children:[r.jsx(Zt,{asChild:!0,children:e}),r.jsx(Ne,{variant:a,side:n,align:s,sideOffset:o,alignOffset:i,children:t})]})})}const ta=X.Root,aa=X.Trigger,Cn=X.Anchor,ra=L.cva("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{variant:{default:"bg-popover text-popover-foreground border-border",destructive:"border-destructive/50 text-destructive bg-destructive/10",warning:"border-yellow-500/50 text-yellow-700 bg-yellow-50",success:"border-green-500/50 text-green-700 bg-green-50",info:"border-blue-500/50 text-blue-700 bg-blue-50"},size:{sm:"w-48 p-3",md:"w-72 p-4",lg:"w-96 p-6",xl:"w-[32rem] p-8"}},defaultVariants:{variant:"default",size:"md"}}),ke=u.forwardRef(({className:e,variant:t,size:a,align:n="center",sideOffset:s=4,...o},i)=>r.jsx(X.Portal,{children:r.jsx(X.Content,{ref:i,align:n,sideOffset:s,className:l(ra({variant:t,size:a,className:e})),...o})}));ke.displayName=X.Content.displayName;function Sn({children:e,content:t,variant:a,size:n,side:s="bottom",align:o="center",sideOffset:i,alignOffset:d,open:c,onOpenChange:m,modal:f=!0,closeOnInteractOutside:h=!0}){return r.jsxs(ta,{open:c,onOpenChange:m,modal:f,children:[r.jsx(aa,{asChild:!0,children:e}),r.jsx(ke,{variant:a,size:n,side:s,align:o,sideOffset:i,alignOffset:d,onInteractOutside:h?void 0:g=>g.preventDefault(),children:t})]})}function Tn({children:e,container:t,className:a,style:n}){const[s,o]=u.useState(!1);if(u.useEffect(()=>{o(!0)},[]),!s)return null;const i=t||document.body;return xa.createPortal(r.jsx("div",{className:l("fixed inset-0 z-50",a),style:n,children:e}),i)}function Dn({onClick:e,className:t,style:a}){return r.jsx("div",{className:l("absolute inset-0 bg-black/50 backdrop-blur-sm",t),style:a,onClick:e})}function Pn({children:e,className:t,style:a,position:n="center"}){const s={center:"flex items-center justify-center",top:"flex justify-center pt-8",bottom:"flex justify-center pb-8",left:"flex items-center pl-8",right:"flex items-center pr-8","top-left":"flex justify-start items-start pt-8 pl-8","top-right":"flex justify-end items-start pt-8 pr-8","bottom-left":"flex justify-start items-end pb-8 pl-8","bottom-right":"flex justify-end items-end pb-8 pr-8"};return r.jsx("div",{className:l("relative w-full h-full min-h-screen",s[n],t),style:a,children:e})}const On=({variant:e="info",title:t,description:a,className:n})=>{const s={success:"bg-green-50 border-green-200 text-green-800",error:"bg-red-50 border-red-200 text-red-800",warning:"bg-yellow-50 border-yellow-200 text-yellow-800",info:"bg-blue-50 border-blue-200 text-blue-800"};return r.jsxs("div",{className:l("border rounded-lg p-4",s[e],n),children:[t&&r.jsx("h4",{className:"font-semibold mb-2",children:t}),a&&r.jsx("p",{className:"text-sm",children:a})]})},Rn=({value:e,max:t=100,className:a})=>{const n=Math.min(100,Math.max(0,e/t*100));return r.jsx("div",{className:l("w-full bg-secondary rounded-full h-2",a),children:r.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${n}%`}})})},W=({className:e})=>r.jsx("div",{className:l("animate-pulse bg-gray-200 dark:bg-gray-700 rounded",e)}),En=({items:e,className:t})=>r.jsx("nav",{className:l("flex items-center space-x-2 text-sm",t),children:e.map((a,n)=>r.jsxs(x.Fragment,{children:[n>0&&r.jsx(M.ChevronRight,{className:"h-4 w-4 text-muted-foreground"}),a.href?r.jsx(_,{href:a.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:a.label}):r.jsx("span",{className:"text-foreground font-medium",children:a.label})]},n))}),Ln=({currentPage:e,totalPages:t,onPageChange:a,className:n})=>{const s=()=>{const i=[],d=[];for(let c=Math.max(2,e-2);c<=Math.min(t-1,e+2);c++)i.push(c);return e-2>2?d.push(1,"..."):d.push(1),d.push(...i),e+2<t-1?d.push("...",t):d.push(t),d};return r.jsxs("nav",{className:l("flex items-center space-x-1",n),children:[r.jsx("button",{onClick:()=>a(e-1),disabled:e===1,className:"p-2 rounded-md border border-input bg-background hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:r.jsx(M.ChevronLeft,{className:"h-4 w-4"})}),s().map((o,i)=>r.jsx(x.Fragment,{children:o==="..."?r.jsx("span",{className:"px-3 py-2 text-muted-foreground",children:"..."}):r.jsx("button",{onClick:()=>a(o),className:l("px-3 py-2 rounded-md border transition-colors",o===e?"bg-primary text-primary-foreground border-primary":"border-input bg-background hover:bg-accent"),children:o})},i)),r.jsx("button",{onClick:()=>a(e+1),disabled:e===t,className:"p-2 rounded-md border border-input bg-background hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:r.jsx(M.ChevronRight,{className:"h-4 w-4"})})]})},Fn=({data:e,columns:t,rowKey:a,className:n})=>r.jsx("div",{className:l("overflow-x-auto",n),children:r.jsxs("table",{className:"w-full border-collapse",children:[r.jsx("thead",{children:r.jsx("tr",{className:"border-b",children:t.map(s=>r.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:s.title},String(s.key)))})}),r.jsx("tbody",{children:e.map(s=>r.jsx("tr",{className:"border-b hover:bg-muted/50",children:t.map(o=>r.jsx("td",{className:"p-3",children:o.render?o.render(s[o.key],s):String(s[o.key])},String(o.key)))},String(s[a])))})]})}),Vn=({items:e,className:t})=>r.jsx("div",{className:l("space-y-2",t),children:e.map(a=>r.jsxs("div",{className:"p-4 border rounded-lg hover:bg-muted/50 transition-colors",children:[r.jsx("h3",{className:"font-medium text-foreground",children:a.title}),a.description&&r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.description})]},a.id))}),Wn=({items:e,className:t})=>r.jsx("div",{className:l("space-y-6",t),children:e.map((a,n)=>r.jsxs("div",{className:"relative flex",children:[r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("div",{className:"w-3 h-3 bg-primary rounded-full border-2 border-background"}),n<e.length-1&&r.jsx("div",{className:"w-px h-12 bg-border mt-2"})]}),r.jsxs("div",{className:"ml-4 flex-1",children:[r.jsx("h3",{className:"font-medium text-foreground",children:a.title}),r.jsx("p",{className:"text-sm text-muted-foreground",children:a.date}),a.description&&r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.description})]})]},a.id))}),In=({event:e,className:t,featured:a=!1,showImage:n=!0})=>{var f,h,g,C,b,j,O,E,p,v,Y,D,y,T,P;const s=typeof(e==null?void 0:e.name)=="string"?e.name:((f=e==null?void 0:e.name)==null?void 0:f.en)||((h=e==null?void 0:e.name)==null?void 0:h.es)||((g=e==null?void 0:e.name)==null?void 0:g.ru)||"Sample Event",o=typeof(e==null?void 0:e.description)=="string"?e.description:((C=e==null?void 0:e.description)==null?void 0:C.en)||((b=e==null?void 0:e.description)==null?void 0:b.es)||((j=e==null?void 0:e.description)==null?void 0:j.ru)||"Sample event description",i=(e==null?void 0:e.start_date)||"2024-12-31",d=typeof((O=e==null?void 0:e.venue_id)==null?void 0:O.name)=="string"?e.venue_id.name:((p=(E=e==null?void 0:e.venue_id)==null?void 0:E.name)==null?void 0:p.en)||((Y=(v=e==null?void 0:e.venue_id)==null?void 0:v.name)==null?void 0:Y.es)||((y=(D=e==null?void 0:e.venue_id)==null?void 0:D.name)==null?void 0:y.ru)||"Sample Venue",c=typeof(e==null?void 0:e.price)=="string"?e.price:typeof(e==null?void 0:e.price)=="object"&&(e==null?void 0:e.price)!==null?`€${((T=e.price)==null?void 0:T.min)||0} - €${((P=e.price)==null?void 0:P.max)||"∞"}`:"€25",m=e==null?void 0:e.image;return r.jsxs(Q,{className:l("group relative overflow-hidden border-transparent hover:border-primary/20 shadow-md hover:shadow-xl transition-all duration-300 animate-fade-in-up",a&&"ring-2 ring-primary/50",t),children:[a&&r.jsx("div",{className:"absolute top-3 right-3 z-10",children:r.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-gradient-to-r from-orange-500 to-purple-600 text-white shadow-lg",children:"🔥 Trending"})}),n&&r.jsxs("div",{className:"relative w-full h-48 bg-gradient-to-br from-gray-200 to-gray-300 dark:from-gray-700 dark:to-gray-800 rounded-t-lg overflow-hidden",children:[m?r.jsx("img",{src:m,alt:s,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full flex items-center justify-center",children:r.jsx("svg",{className:"w-16 h-16 text-gray-400 dark:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),r.jsxs(J,{className:"p-4",children:[r.jsx("h3",{className:"text-lg font-bold mb-2 group-hover:text-primary transition-colors line-clamp-2",children:e!=null&&e.slug?r.jsx(_,{href:`/events/${e.slug}`,variant:"ghost",size:"none",children:s}):s}),r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-3 line-clamp-2",children:o}),r.jsxs("div",{className:"flex flex-col gap-2 mb-3",children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[r.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r.jsx("span",{children:i})]}),r.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[r.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),r.jsx("span",{className:"line-clamp-1",children:d})]})]}),r.jsx("div",{className:"pt-3 border-t border-gray-200 dark:border-gray-700",children:e!=null&&e.ticket_url?r.jsxs(_,{href:e.ticket_url,className:"inline-flex items-center justify-center w-full py-2 px-4 bg-gradient-to-r from-orange-500 to-purple-600 hover:from-orange-600 hover:to-purple-700 text-white font-semibold transition-all duration-300 transform hover:scale-105 shadow-md hover:shadow-lg",target:"_blank",rel:"noopener noreferrer",children:["Get Tickets",r.jsx("svg",{className:"ml-2 w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]}):r.jsx("div",{className:"text-right",children:r.jsx("span",{className:"text-lg font-bold bg-gradient-to-r from-orange-500 to-purple-600 bg-clip-text text-transparent",children:c})})})]})]})},zn=({venue:e,className:t,featured:a=!1,showImage:n=!0})=>{var f,h;const s=typeof(e==null?void 0:e.name)=="string"?e.name:((f=e==null?void 0:e.name)==null?void 0:f.en)||"Sample Venue",o=typeof(e==null?void 0:e.description)=="string"?e.description:((h=e==null?void 0:e.description)==null?void 0:h.en)||"Sample venue description",i=typeof(e==null?void 0:e.location)=="string"?e.location:(e==null?void 0:e.address)||"Tenerife, Spain",d=(e==null?void 0:e.capacity)||"500",c=e==null?void 0:e.image,m=(e==null?void 0:e.events_count)||0;return r.jsxs(Q,{className:l("group relative overflow-hidden border-transparent hover:border-primary/20 shadow-md hover:shadow-xl transition-all duration-300 animate-fade-in-up",a&&"ring-2 ring-primary/50",t),children:[a&&r.jsx("div",{className:"absolute top-3 right-3 z-10",children:r.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-gradient-to-r from-purple-500 to-orange-500 text-white shadow-lg",children:"⭐ Popular"})}),n&&r.jsxs("div",{className:"relative w-full h-48 bg-gradient-to-br from-gray-200 to-gray-300 dark:from-gray-700 dark:to-gray-800 rounded-t-lg overflow-hidden",children:[c?r.jsx("img",{src:c,alt:s,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full flex items-center justify-center",children:r.jsx("svg",{className:"w-16 h-16 text-gray-400 dark:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),r.jsxs(J,{className:"p-4",children:[r.jsx("h3",{className:"text-lg font-bold mb-2 group-hover:text-primary transition-colors line-clamp-2",children:e!=null&&e.slug?r.jsx(_,{href:`/venues/${e.slug}`,variant:"ghost",size:"none",children:s}):s}),r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-3 line-clamp-2",children:o}),r.jsx("div",{className:"flex flex-col gap-2 mb-3",children:r.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[r.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),r.jsx("span",{className:"line-clamp-1",children:i})]})}),r.jsx("div",{className:"pt-3 border-t border-gray-200 dark:border-gray-700",children:r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[m>0&&r.jsxs("div",{className:"flex items-center gap-1 text-primary font-medium",children:[r.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),r.jsxs("span",{children:[m," events"]})]}),d!=="500"&&r.jsxs("div",{className:"flex items-center gap-1 text-gray-500",children:[r.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"})}),r.jsxs("span",{children:["Cap: ",d]})]})]})})]})]})},G=({id:e,name:t,label:a,type:n="text",placeholder:s,value:o="",onChange:i,error:d,helperText:c,className:m})=>r.jsxs("div",{className:l("space-y-2",m),children:[a&&r.jsx("label",{className:"block text-sm font-medium",children:a}),r.jsx(U,{id:e,name:t,type:n,placeholder:s,value:o,onChange:f=>i==null?void 0:i(f.target.value)}),c&&!d&&r.jsx("p",{className:"text-sm text-gray-500",children:c}),d&&r.jsx("p",{className:"text-sm text-red-500",children:d})]}),_n=({id:e,name:t,label:a,placeholder:n,options:s=[],value:o="",onChange:i,error:d,className:c})=>r.jsxs("div",{className:l("space-y-2",c),children:[a&&r.jsx("label",{className:"block text-sm font-medium",children:a}),r.jsxs("select",{id:e,name:t,value:o,onChange:m=>i==null?void 0:i(m.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800",children:[n&&r.jsx("option",{value:"",disabled:!0,children:n}),s.map(m=>r.jsx("option",{value:m.value,children:m.label},m.value))]}),d&&r.jsx("p",{className:"text-sm text-red-500",children:d})]}),An=({id:e,name:t,label:a,placeholder:n,value:s="",onChange:o,error:i,rows:d=4,className:c})=>r.jsxs("div",{className:l("space-y-2",c),children:[a&&r.jsx("label",{className:"block text-sm font-medium",children:a}),r.jsx("textarea",{id:e,name:t,placeholder:n,value:s,onChange:m=>o==null?void 0:o(m.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800",rows:d}),i&&r.jsx("p",{className:"text-sm text-red-500",children:i})]}),Yn=({className:e})=>r.jsxs("div",{className:l("space-y-4",e),children:[r.jsx(G,{label:"Email",placeholder:"Enter your email"}),r.jsx(G,{label:"Password",placeholder:"Enter your password"}),r.jsx(F,{className:"w-full",children:"Login"})]}),Bn=({className:e})=>r.jsxs("div",{className:l("space-y-4",e),children:[r.jsx(G,{label:"Name",placeholder:"Enter your name"}),r.jsx(G,{label:"Email",placeholder:"Enter your email"}),r.jsx(G,{label:"Password",placeholder:"Enter your password"}),r.jsx(F,{className:"w-full",children:"Register"})]}),$n=({name:e="John Doe",email:t="john@example.com",avatar:a,className:n})=>r.jsxs("div",{className:l("bg-white dark:bg-gray-800 rounded-lg shadow-md p-4",n),children:[a&&r.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full mb-4"}),r.jsx("h3",{className:"text-lg font-semibold",children:e}),r.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:t})]}),qn=({className:e})=>r.jsxs("div",{className:l("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6",e),children:[r.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Dashboard"}),r.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Admin dashboard content"})]}),Hn=({className:e})=>r.jsxs("div",{className:l("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6",e),children:[r.jsx("h2",{className:"text-2xl font-bold mb-4",children:"User Management"}),r.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"User management content"})]}),Gn=({placeholder:e="Search artists, venues...",className:t,onSearch:a,suggestions:n=[],onSuggestionSelect:s})=>{const[o,i]=x.useState(""),[d,c]=x.useState(!1),[m,f]=x.useState(-1),h=x.useRef(null),g=p=>{i(p),f(-1),a&&a(p)},C=()=>{c(!0)},b=p=>{setTimeout(()=>{var v;(v=h.current)!=null&&v.contains(document.activeElement)||(c(!1),f(-1))},200)},j=p=>{if(n.length!==0)if(p.key==="ArrowDown")p.preventDefault(),f(v=>v<n.length-1?v+1:v);else if(p.key==="ArrowUp")p.preventDefault(),f(v=>v>0?v-1:-1);else if(p.key==="Enter"&&m>=0&&m<n.length){p.preventDefault();const v=n[m];v&&(i(v),g(v),s==null||s(v),c(!1))}else p.key==="Escape"&&(c(!1),f(-1))},O=p=>{i(p),g(p),s==null||s(p),c(!1)};x.useEffect(()=>{const p=v=>{h.current&&!h.current.contains(v.target)&&(c(!1),f(-1))};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const E=n.filter(p=>p.toLowerCase().includes(o.toLowerCase()));return r.jsxs("div",{ref:h,className:l("relative w-full max-w-sm",t),children:[r.jsx(se,{placeholder:e,value:o,onChange:g,onFocus:C,onBlur:b,onKeyDown:j,className:l("transition-all duration-200","focus:ring-2 focus:ring-primary focus:ring-offset-2","hover:border-primary/50",d&&"border-primary shadow-sm")}),d&&E.length>0&&r.jsx("div",{className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-lg max-h-60 overflow-auto",children:E.map((p,v)=>r.jsx("button",{type:"button",onClick:()=>O(p),className:l("w-full text-left px-4 py-2 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground focus:outline-none",v===m&&"bg-accent text-accent-foreground"),children:p},p))})]})},Xn=({events:e=[],limit:t=5,loading:a=!1,className:n})=>r.jsxs("div",{className:l("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6",n),children:[r.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Trending Events"}),a?r.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Loading trending events..."}):r.jsxs("p",{className:"text-gray-600 dark:text-gray-300",children:["Showing ",e.length," trending events (limit: ",t,")"]})]}),Un=({articles:e,readMoreLabel:t="Read more",className:a})=>r.jsx("div",{className:l("space-y-6",a),children:e.map(n=>r.jsxs("article",{className:"border rounded-lg p-6 hover:shadow-md transition-shadow",children:[n.image&&r.jsx("div",{className:"w-full h-48 bg-muted rounded-md mb-4"}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("h2",{className:"text-xl font-semibold",children:r.jsx(_,{href:`/news/${n.slug}`,variant:"ghost",size:"none",className:"hover:text-primary",children:n.title})}),n.description&&r.jsx("p",{className:"text-muted-foreground",children:n.description}),n.date&&r.jsx("p",{className:"text-sm text-muted-foreground",children:n.date}),r.jsxs(_,{href:`/news/${n.slug}`,variant:"default",size:"none",className:"inline-flex items-center",children:[t," →"]})]})]},n.slug))}),Qn=({className:e})=>r.jsx("div",{className:l("w-6 h-6 bg-primary rounded-full flex items-center justify-center",e),children:r.jsx("span",{className:"text-white text-sm",children:"↑"})}),Le=[{code:"en",label:"English"},{code:"es",label:"Español"},{code:"ru",label:"Русский"}],Jn=({className:e,languages:t=Le,value:a,defaultValue:n,disabled:s,onLanguageChange:o})=>{const i=x.useMemo(()=>t.length>0?t:Le,[t]),d=()=>{var h;return a!==void 0?a:n&&i.some(g=>g.code===n)?n:((h=i[0])==null?void 0:h.code)??"en"},[c,m]=x.useState(d);x.useEffect(()=>{a!==void 0&&a!==c&&m(a)},[a,c]);const f=h=>{const g=h.target.value;a===void 0&&m(g),o==null||o(g)};return r.jsx("select",{value:a??c,onChange:f,disabled:s,className:l("px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-sm",s&&"opacity-70 cursor-not-allowed",e),"aria-label":"Language selector","data-testid":"language-selector",children:i.map(({code:h,label:g})=>r.jsx("option",{value:h,children:g},h))})},na=({className:e})=>r.jsxs("div",{className:l("bg-white dark:bg-gray-800 rounded-lg shadow-md p-4",e),children:[r.jsx(W,{className:"w-full h-48 mb-4"}),r.jsx(W,{className:"h-6 w-3/4 mb-2"}),r.jsx(W,{className:"h-4 w-full mb-2"}),r.jsx(W,{className:"h-4 w-1/2"})]}),sa=({className:e})=>r.jsxs("div",{className:l("bg-white dark:bg-gray-800 rounded-lg shadow-md p-4",e),children:[r.jsx(W,{className:"w-full h-48 mb-4"}),r.jsx(W,{className:"h-6 w-3/4 mb-2"}),r.jsx(W,{className:"h-4 w-full mb-2"}),r.jsx(W,{className:"h-4 w-1/2"})]});exports.cssVariableColorTokens=A.cssVariableColorTokens;exports.fontFamily=A.fontFamily;exports.fontSize=A.fontSize;exports.fontWeight=A.fontWeight;exports.letterSpacing=A.letterSpacing;exports.lineHeight=A.lineHeight;exports.spacing=A.spacing;exports.tailwindThemeColors=A.tailwindThemeColors;exports.borderRadius=oa.borderRadius;exports.Alert=On;exports.ArticlesSection=Un;exports.Badge=ja;exports.Blockquote=Ea;exports.Breadcrumbs=En;exports.Button=F;exports.Card=Q;exports.CardContent=J;exports.CardDescription=Be;exports.CardFooter=$e;exports.CardHeader=Ae;exports.CardTitle=Ye;exports.Code=Ra;exports.ConfirmDialog=ut;exports.Container=lt;exports.CustomDialog=Ua;exports.Dashboard=qn;exports.DateRangePicker=ve;exports.Divider=He;exports.DropdownMenu=Ja;exports.DropdownMenuCheckboxItem=kt;exports.DropdownMenuContent=jt;exports.DropdownMenuGroup=Za;exports.DropdownMenuItem=Nt;exports.DropdownMenuLabel=Ct;exports.DropdownMenuPortal=er;exports.DropdownMenuRadioGroup=ar;exports.DropdownMenuRadioItem=Mt;exports.DropdownMenuSeparator=St;exports.DropdownMenuShortcut=Tt;exports.DropdownMenuSub=tr;exports.DropdownMenuSubContent=vt;exports.DropdownMenuSubTrigger=wt;exports.DropdownMenuTrigger=Ka;exports.EventCard=In;exports.EventCardSkeleton=na;exports.EventCardSkeletonUI=na;exports.FilterBar=Gt;exports.FilterBarCompact=xn;exports.FilterSelect=te;exports.Flex=at;exports.Footer=Wa;exports.FormInput=G;exports.FormSelect=_n;exports.FormTextarea=An;exports.Grid=nt;exports.Heading=Pa;exports.Input=U;exports.Label=ee;exports.LanguageSelector=Jn;exports.Link=_;exports.List=Vn;exports.LoginForm=Yn;exports.Modal=dt;exports.ModalClose=za;exports.ModalContent=ce;exports.ModalDescription=he;exports.ModalFooter=me;exports.ModalHeader=ue;exports.ModalOverlay=de;exports.ModalPortal=ct;exports.ModalProvider=Ya;exports.ModalTitle=fe;exports.ModalTrigger=Ia;exports.ModeHero=Fa;exports.Navbar=Va;exports.NavigationMenu=Dt;exports.NavigationMenuContent=Et;exports.NavigationMenuIndicator=Lt;exports.NavigationMenuItem=rr;exports.NavigationMenuLink=nr;exports.NavigationMenuList=Pt;exports.NavigationMenuTrigger=Rt;exports.NavigationMenuViewport=ge;exports.OverlayBackdrop=Dn;exports.OverlayContainer=Pn;exports.OverlayPortal=Tn;exports.Pagination=Ln;exports.Paragraph=Oa;exports.Popover=ta;exports.PopoverAnchor=Cn;exports.PopoverContent=ke;exports.PopoverTrigger=aa;exports.PopoverWrapper=Sn;exports.PriceRangeSlider=Ht;exports.ProfileCard=$n;exports.Progress=Rn;exports.RegisterForm=Bn;exports.SearchBar=Gn;exports.SearchFilters=bn;exports.SearchInput=se;exports.Section=La;exports.Select=It;exports.SelectContent=ye;exports.SelectGroup=ir;exports.SelectItem=we;exports.SelectLabel=_t;exports.SelectScrollDownButton=be;exports.SelectScrollUpButton=xe;exports.SelectSeparator=At;exports.SelectTrigger=pe;exports.SelectValue=zt;exports.SimpleModal=Qa;exports.Skeleton=W;exports.Stack=ot;exports.Table=Fn;exports.Tabs=sr;exports.TabsContent=Wt;exports.TabsList=Ft;exports.TabsTrigger=Vt;exports.Text=et;exports.ThemeSwitch=Da;exports.Timeline=Wn;exports.Toast=je;exports.ToastProvider=jn;exports.Tooltip=Kt;exports.TooltipContent=Ne;exports.TooltipProvider=Jt;exports.TooltipTrigger=Zt;exports.TooltipWrapper=Mn;exports.TrendingIcon=Qn;exports.TrendingSection=Xn;exports.UserManagement=Hn;exports.VenueCard=zn;exports.VenueCardSkeleton=sa;exports.VenueCardSkeletonUI=sa;exports.applyDocumentMode=Ge;exports.badgeVariants=qe;exports.buttonVariants=ze;exports.cn=l;exports.containerVariants=it;exports.debounce=wa;exports.flexVariants=tt;exports.formatDate=We;exports.formatDateTime=ba;exports.formatTime=Ie;exports.generateId=ya;exports.gridVariants=rt;exports.linkVariants=_e;exports.navigationMenuTriggerStyle=Ot;exports.popoverContentVariants=ra;exports.stackVariants=st;exports.throttle=va;exports.toastVariants=Xt;exports.tooltipContentVariants=ea;exports.useConfirmDialog=_a;exports.useDateRange=hn;exports.useModal=Aa;exports.useModalContext=ht;exports.useModalManager=mt;exports.usePriceRange=gn;exports.useSearch=or;exports.useToast=Nn;exports.useToastContext=Qt;exports.withModal=Ba;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("./tokens/index.cjs"),Cr=require("./radius-CuOZD6Mk.cjs"),a=require("react/jsx-runtime"),y=require("react"),Qe=require("@radix-ui/react-slot"),z=require("class-variance-authority"),Sr=require("clsx"),Er=require("tailwind-merge"),Dr=require("@radix-ui/react-label"),C=require("lucide-react"),Tr=require("@radix-ui/react-dialog"),Pr=require("@radix-ui/react-dropdown-menu"),qr=require("@radix-ui/react-navigation-menu"),Rr=require("@radix-ui/react-tabs"),Or=require("@radix-ui/react-select"),Fr=require("@radix-ui/react-tooltip"),Vr=require("@radix-ui/react-popover"),Wr=require("react-dom");function X(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const u=X(y),Je=X(Dr),M=X(Tr),k=X(Pr),F=X(qr),ae=X(Rr),E=X(Or),fe=X(Fr),ie=X(Vr);function l(...e){return Er.twMerge(Sr.clsx(e))}function Ke(e){return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric"}).format(new Date(e))}function Ze(e){return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).format(new Date(e))}function zr(e){return`${Ke(e)} at ${Ze(e)}`}function Ir(){return Math.random().toString(36).substr(2,9)}function Lr(e,t){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)}}function Br(e,t){let r;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>r=!1,t))}}const et=z.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),O=u.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?Qe.Slot:"button";return a.jsx(i,{className:l(et({variant:t,size:r,className:e})),ref:s,...o})});O.displayName="Button";const tt=z.cva("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-primary hover:text-primary/80 underline-offset-4 hover:underline",destructive:"text-destructive hover:text-destructive/80 underline-offset-4 hover:underline",ghost:"text-foreground hover:text-accent-foreground hover:bg-accent rounded-md px-3 py-2",secondary:"text-secondary-foreground underline-offset-4 hover:underline",button:"bg-primary text-primary-foreground hover:bg-primary/90 rounded-md","button-outline":"border border-input bg-background hover:bg-accent hover:text-accent-foreground rounded-md","button-secondary":"bg-secondary text-secondary-foreground hover:bg-secondary/80 rounded-md"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10",none:"h-auto px-0 py-0"}},defaultVariants:{variant:"default",size:"none"}}),Z=u.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?Qe.Slot:"a";return a.jsx(i,{className:l(tt({variant:t,size:r,className:e})),ref:s,...o})});Z.displayName="Link";const de=u.forwardRef(({className:e,type:t,...r},n)=>a.jsx("input",{type:t,className:l("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));de.displayName="Input";const Y=u.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Y.displayName="Card";const rt=u.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:l("flex flex-col space-y-1.5 p-6",e),...t}));rt.displayName="CardHeader";const at=u.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:l("font-semibold leading-none tracking-tight",e),...t}));at.displayName="CardTitle";const nt=u.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:l("text-sm text-muted-foreground",e),...t}));nt.displayName="CardDescription";const $=u.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:l("p-6 pt-0",e),...t}));$.displayName="CardContent";const ot=u.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:l("flex items-center p-6 pt-0",e),...t}));ot.displayName="CardFooter";const st=z.cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function _r({className:e,variant:t,...r}){return a.jsx("div",{className:l(st({variant:t}),e),...r})}const it=u.forwardRef(({className:e,orientation:t="horizontal",variant:r="solid",...n},o)=>{const s={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return a.jsx("div",{ref:o,className:l("border-border",t==="horizontal"?`w-full border-t ${s[r]}`:`h-full border-l ${s[r]}`,e),...n})});it.displayName="Divider";const Yr=z.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),K=u.forwardRef(({className:e,...t},r)=>a.jsx(Je.Root,{ref:r,className:l(Yr(),e),...t}));K.displayName=Je.Root.displayName;const $r="data-mode",Ar="data-theme",Be="dark",Hr={day:{"--background":"#ffffff","--foreground":"#171717","--popover":"#ffffff","--tm-primary":"#00bfa6","--tm-secondary":"#f4f4f5","--tm-accent":"#e5e7eb"},night:{"--background":"#0b0b10","--foreground":"#e5e7eb","--popover":"#0e1016","--tm-primary":"#7b5eff","--tm-secondary":"#12121b","--tm-accent":"#1a1a26"}};function dt(e){if(typeof document>"u")return;const t=document.documentElement;t.setAttribute($r,e),t.setAttribute(Ar,e),e==="night"?t.classList.add(Be):t.classList.remove(Be);const r=Hr[e];Object.entries(r).forEach(([o,s])=>{s?t.style.setProperty(o,s):t.style.removeProperty(o)});const n=document.body;if(n){n.dataset.mode=e;const o=r["--background"],s=r["--foreground"];o?n.style.backgroundColor=o:n.style.removeProperty("background-color"),s?n.style.color=s:n.style.removeProperty("color")}}const lt="tm_mode",ct="tm_mode",ut="theme",mt="data-mode",ft="data-theme",Gr="dark";function pt(e){var o,s;if(((s=(o=globalThis.process)==null?void 0:o.env)==null?void 0:s.NODE_ENV)==="production"||typeof document>"u")return;const r=document.documentElement,n={"data-mode":r.getAttribute(mt),"data-theme":r.getAttribute(ft),darkClass:r.classList.contains(Gr),"--background":getComputedStyle(r).getPropertyValue("--background"),"--tm-primary":getComputedStyle(r).getPropertyValue("--tm-primary")};console.log("[theme-switch]",e,n)}function Xr(e){var n;if(typeof document>"u")return;const r=`; ${document.cookie}`.split(`; ${e}=`);if(r.length===2)return(n=r.pop())==null?void 0:n.split(";")[0]}function _e(){var n,o;if(typeof document>"u")return"day";const e=document.documentElement.getAttribute(mt);if(e==="day"||e==="night")return e;const t=document.documentElement.getAttribute(ft);if(t==="day"||t==="night")return t;try{const s=window.localStorage.getItem(ct);if(s==="day"||s==="night")return s;const i=window.localStorage.getItem(ut);if(i==="dark")return"night";if(i==="light")return"day"}catch{}const r=Xr(lt);return r==="day"||r==="night"?r:typeof window<"u"&&((o=(n=window.matchMedia)==null?void 0:n.call(window,"(prefers-color-scheme: dark)"))==null?void 0:o.matches)?"night":"day"}function Ye(e){dt(e);try{window.localStorage.setItem(ct,e),window.localStorage.setItem(ut,e==="night"?"dark":"light")}catch{}const t=new Date;t.setFullYear(t.getFullYear()+1),document.cookie=`${lt}=${e};expires=${t.toUTCString()};path=/;SameSite=Lax`,pt(`persist:${e}`)}const Ur=({className:e,size:t="md",variant:r="default"})=>{const[n,o]=y.useState(()=>_e());y.useEffect(()=>{const i=_e();o(i),Ye(i),pt(`initial:${i}`)},[]);const s=()=>{o(i=>{const d=i==="night"?"day":"night";return Ye(d),d})};return a.jsx(O,{onClick:s,variant:r,size:t==="sm"?"sm":t==="lg"?"lg":"default",className:l(t==="sm"?"h-8 w-8":t==="lg"?"h-12 w-12":"h-10 w-10",e),"aria-label":`Switch to ${n==="night"?"day":"night"} theme`,type:"button",children:n==="night"?a.jsx(C.Sun,{className:"h-4 w-4"}):a.jsx(C.Moon,{className:"h-4 w-4"})})},W=({className:e,children:t,as:r,level:n=1})=>{const o=r||`h${n}`,s={1:"text-4xl font-bold tracking-tight",2:"text-3xl font-bold tracking-tight",3:"text-2xl font-bold tracking-tight",4:"text-xl font-semibold tracking-tight",5:"text-lg font-semibold tracking-tight",6:"text-base font-semibold tracking-tight"};return a.jsx(o,{className:l(s[n],e),children:t})},N=({className:e,children:t,size:r="base",weight:n="normal",color:o="default"})=>{const s={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},i={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},d={default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",destructive:"text-destructive"};return a.jsx("span",{className:l(s[r],i[n],d[o],e),children:t})},Qr=({className:e,children:t,...r})=>a.jsx("p",{className:l("leading-7 [&:not(:first-child)]:mt-6",e),children:a.jsx(N,{...r,children:t})}),Jr=({className:e,children:t})=>a.jsx("code",{className:l("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),children:t}),Kr=({className:e,children:t})=>a.jsx("blockquote",{className:l("mt-6 border-l-2 pl-6 italic",e),children:t}),ht=z.cva("flex",{variants:{direction:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},justify:{start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},align:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12",16:"gap-16",20:"gap-20",24:"gap-24"}},defaultVariants:{direction:"row",wrap:"nowrap",justify:"start",align:"start",gap:0}}),gt=u.forwardRef(({className:e,direction:t,wrap:r,justify:n,align:o,gap:s,...i},d)=>a.jsx("div",{ref:d,className:l(ht({direction:t,wrap:r,justify:n,align:o,gap:s,className:e})),...i}));gt.displayName="Flex";const xt=z.cva("grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",12:"grid-cols-12",none:"grid-cols-none"},rows:{1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",none:"grid-rows-none"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12",16:"gap-16",20:"gap-20",24:"gap-24"},flow:{row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"}},defaultVariants:{cols:1,rows:"none",gap:0,flow:"row"}}),bt=u.forwardRef(({className:e,cols:t,rows:r,gap:n,flow:o,...s},i)=>a.jsx("div",{ref:i,className:l(xt({cols:t,rows:r,gap:n,flow:o,className:e})),...s}));bt.displayName="Grid";const wt=z.cva("flex flex-col",{variants:{spacing:{0:"space-y-0",1:"space-y-1",2:"space-y-2",3:"space-y-3",4:"space-y-4",5:"space-y-5",6:"space-y-6",8:"space-y-8",10:"space-y-10",12:"space-y-12",16:"space-y-16",20:"space-y-20",24:"space-y-24"},align:{start:"items-start",end:"items-end",center:"items-center",stretch:"items-stretch"},justify:{start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around"}},defaultVariants:{spacing:4,align:"stretch",justify:"start"}}),yt=u.forwardRef(({className:e,spacing:t,align:r,justify:n,...o},s)=>a.jsx("div",{ref:s,className:l(wt({spacing:t,align:r,justify:n,className:e})),...o}));yt.displayName="Stack";const vt=z.cva("mx-auto px-4",{variants:{size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl",full:"max-w-full"},padding:{none:"px-0",sm:"px-2",md:"px-4",lg:"px-6",xl:"px-8"}},defaultVariants:{size:"7xl",padding:"md"}}),jt=u.forwardRef(({className:e,size:t,padding:r,...n},o)=>a.jsx("div",{ref:o,className:l(vt({size:t,padding:r,className:e})),...n}));jt.displayName="Container";const Zr=({className:e,children:t,padding:r="md",background:n="default",as:o="section"})=>{const s={none:"",sm:"py-4",md:"py-8",lg:"py-12",xl:"py-16"},i={default:"",muted:"bg-muted",card:"bg-card"};return a.jsx(o,{className:l("w-full",s[r],i[n],e),children:t})},ea=({dayLabel:e,nightLabel:t,dayDescription:r,nightDescription:n,className:o})=>{if(!e||e.trim()==="")throw new Error('ModeHero: "dayLabel" prop is required and cannot be empty');if(!t||t.trim()==="")throw new Error('ModeHero: "nightLabel" prop is required and cannot be empty');if(!r||r.trim()==="")throw new Error('ModeHero: "dayDescription" prop is required and cannot be empty');if(!n||n.trim()==="")throw new Error('ModeHero: "nightDescription" prop is required and cannot be empty');return a.jsx("div",{className:l("bg-gradient-to-r from-blue-500 to-purple-600 text-white p-8 rounded-lg",o),children:a.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[a.jsx(W,{level:1,className:"text-4xl font-bold mb-4",children:"Tenerife Music Platform"}),a.jsx(N,{size:"xl",className:"mb-8",children:"Discover amazing music events in Tenerife"}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[a.jsx(Y,{className:"bg-white/10 backdrop-blur-sm border-white/20",children:a.jsxs($,{className:"p-6",children:[a.jsx(W,{level:3,className:"text-2xl font-semibold mb-2",children:e}),a.jsx(N,{className:"text-white/80",children:r})]})}),a.jsx(Y,{className:"bg-white/10 backdrop-blur-sm border-white/20",children:a.jsxs($,{className:"p-6",children:[a.jsx(W,{level:3,className:"text-2xl font-semibold mb-2",children:t}),a.jsx(N,{className:"text-white/80",children:n})]})})]})]})})},ta=({className:e,left:t,right:r,children:n})=>a.jsxs("nav",{className:l("flex items-center justify-between w-full px-4 py-3",e),children:[t&&a.jsx("div",{className:"flex items-center",children:t}),n&&a.jsx("div",{className:"flex items-center",children:n}),r&&a.jsx("div",{className:"flex items-center",children:r})]}),ra=({className:e,left:t,right:r,children:n})=>a.jsx("footer",{className:l("w-full border-t bg-background px-4 py-6",e),children:a.jsxs("div",{className:"flex items-center justify-between w-full",children:[t&&a.jsx("div",{className:"flex items-center",children:t}),n&&a.jsx("div",{className:"flex items-center",children:n}),r&&a.jsx("div",{className:"flex items-center",children:r})]})}),Nt=M.Root,aa=M.Trigger,kt=M.Portal,na=M.Close,ke=u.forwardRef(({className:e,...t},r)=>a.jsx(M.Overlay,{ref:r,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ke.displayName=M.Overlay.displayName;const Me=u.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(kt,{children:[a.jsx(ke,{}),a.jsxs(M.Content,{ref:n,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,a.jsxs(M.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(C.X,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Me.displayName=M.Content.displayName;const Ce=({className:e,...t})=>a.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ce.displayName="ModalHeader";const Se=({className:e,...t})=>a.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Se.displayName="ModalFooter";const Ee=u.forwardRef(({className:e,...t},r)=>a.jsx(M.Title,{ref:r,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));Ee.displayName=M.Title.displayName;const De=u.forwardRef(({className:e,...t},r)=>a.jsx(M.Description,{ref:r,className:l("text-sm text-muted-foreground",e),...t}));De.displayName=M.Description.displayName;function Mt({isOpen:e,onClose:t,onConfirm:r,title:n,description:o,confirmText:s,cancelText:i,loadingText:d,variant:c="default",isLoading:m=!1}){if(!n||n.trim()==="")throw new Error('ConfirmDialog: "title" prop is required and cannot be empty');if(!o||o.trim()==="")throw new Error('ConfirmDialog: "description" prop is required and cannot be empty');if(!s||s.trim()==="")throw new Error('ConfirmDialog: "confirmText" prop is required and cannot be empty');if(!i||i.trim()==="")throw new Error('ConfirmDialog: "cancelText" prop is required and cannot be empty');const f=()=>{r(),t()};return a.jsx(Nt,{open:e,onOpenChange:t,children:a.jsxs(Me,{children:[a.jsxs(Ce,{children:[a.jsx(Ee,{children:n}),a.jsx(De,{children:o})]}),a.jsxs(Se,{children:[a.jsx(O,{variant:"outline",onClick:t,disabled:m,children:i}),a.jsx(O,{variant:c,onClick:f,disabled:m,children:m&&d||s})]})]})})}function oa(){const[e,t]=u.useState({isOpen:!1}),r=u.useCallback(s=>{t({isOpen:!0,...s})},[]),n=u.useCallback(()=>{t({isOpen:!1})},[]),o=u.useMemo(()=>a.jsx(Mt,{isOpen:e.isOpen,onClose:n,onConfirm:e.onConfirm||(()=>{}),title:e.title||"",description:e.description||"",confirmText:e.confirmText||"",cancelText:e.cancelText||"",loadingText:e.loadingText,variant:e.variant}),[e,n]);return{showConfirm:r,hideConfirm:n,ConfirmDialog:o}}function sa(e=!1){const[t,r]=y.useState({isOpen:e,data:void 0}),n=y.useCallback(i=>{r({isOpen:!0,data:i})},[]),o=y.useCallback(()=>{r(i=>({...i,isOpen:!1}))},[]),s=y.useCallback(()=>{r(i=>({...i,isOpen:!i.isOpen}))},[]);return{isOpen:t.isOpen,data:t.data,open:n,close:o,toggle:s}}function Ct(){const[e,t]=y.useState({}),r=y.useCallback((d,c)=>{t(m=>({...m,[d]:{isOpen:!0,data:c}}))},[]),n=y.useCallback(d=>{t(c=>({...c,[d]:{isOpen:!1,data:void 0}}))},[]),o=y.useCallback(d=>{t(c=>{var m,f;return{...c,[d]:{isOpen:!((m=c[d])!=null&&m.isOpen),data:(f=c[d])==null?void 0:f.data}}})},[]),s=y.useCallback(d=>{var c;return((c=e[d])==null?void 0:c.isOpen)||!1},[e]),i=y.useCallback(d=>{var c;return(c=e[d])==null?void 0:c.data},[e]);return{openModal:r,closeModal:n,toggleModal:o,isModalOpen:s,getModalData:i}}const St=y.createContext(void 0);function ia({children:e}){const t=Ct();return a.jsx(St.Provider,{value:t,children:e})}function Et(){const e=y.useContext(St);if(e===void 0)throw new Error("useModalContext must be used within a ModalProvider");return e}function da(e,t){return function(n){const{openModal:o,closeModal:s,toggleModal:i,isModalOpen:d,getModalData:c}=Et(),m={[`${t}Open`]:()=>o(t),[`${t}Close`]:()=>s(t),[`${t}Toggle`]:()=>i(t),[`is${t}Open`]:d(t),[`${t}Data`]:c(t)};return a.jsx(e,{...n,...m})}}function la(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,s;for(s=0;s<n.length;s++)o=n[s],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var ca=["color"],ua=y.forwardRef(function(e,t){var r=e.color,n=r===void 0?"currentColor":r,o=la(e,ca);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});const ma=M.Root,fa=M.Portal,Dt=u.forwardRef(({className:e,...t},r)=>a.jsx(M.Overlay,{ref:r,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Dt.displayName=M.Overlay.displayName;const Tt=u.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(fa,{children:[a.jsx(Dt,{}),a.jsxs(M.Content,{ref:n,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,a.jsxs(M.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(ua,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Tt.displayName=M.Content.displayName;const Pt=({className:e,...t})=>a.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pt.displayName="DialogHeader";const qt=u.forwardRef(({className:e,...t},r)=>a.jsx(M.Title,{ref:r,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));qt.displayName=M.Title.displayName;const Rt=u.forwardRef(({className:e,...t},r)=>a.jsx(M.Description,{ref:r,className:l("text-sm text-muted-foreground",e),...t}));Rt.displayName=M.Description.displayName;const pa=({isOpen:e,onClose:t,title:r,description:n,children:o,className:s})=>a.jsx(ma,{open:e,onOpenChange:i=>!i&&t(),children:a.jsxs(Tt,{className:l("max-w-md",s),children:[(r||n)&&a.jsxs(Pt,{children:[r&&a.jsx(qt,{children:r}),n&&a.jsx(Rt,{children:n})]}),o]})}),ha=({isOpen:e,onClose:t,title:r,children:n,className:o})=>e?a.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[a.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:t}),a.jsxs("div",{className:l("relative bg-card border rounded-lg shadow-lg max-w-md w-full mx-4",o),children:[r&&a.jsx("div",{className:"p-6 border-b",children:a.jsx("h2",{className:"text-lg font-semibold",children:r})}),a.jsx("div",{className:"p-6",children:n})]})]}):null,ga=k.Root,xa=k.Trigger,ba=k.Group,wa=k.Portal,ya=k.Sub,va=k.RadioGroup,Ot=u.forwardRef(({className:e,inset:t,children:r,...n},o)=>a.jsxs(k.SubTrigger,{ref:o,className:l("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[r,a.jsx(C.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Ot.displayName=k.SubTrigger.displayName;const Ft=u.forwardRef(({className:e,...t},r)=>a.jsx(k.SubContent,{ref:r,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ft.displayName=k.SubContent.displayName;const Vt=u.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(k.Portal,{children:a.jsx(k.Content,{ref:n,sideOffset:t,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Vt.displayName=k.Content.displayName;const Wt=u.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(k.Item,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));Wt.displayName=k.Item.displayName;const zt=u.forwardRef(({className:e,children:t,checked:r,...n},o)=>a.jsxs(k.CheckboxItem,{ref:o,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(k.ItemIndicator,{children:a.jsx(C.Check,{className:"h-4 w-4"})})}),t]}));zt.displayName=k.CheckboxItem.displayName;const It=u.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(k.RadioItem,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(k.ItemIndicator,{children:a.jsx(C.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));It.displayName=k.RadioItem.displayName;const Lt=u.forwardRef(({className:e,inset:t,...r},n)=>a.jsx(k.Label,{ref:n,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Lt.displayName=k.Label.displayName;const Bt=u.forwardRef(({className:e,...t},r)=>a.jsx(k.Separator,{ref:r,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));Bt.displayName=k.Separator.displayName;const _t=({className:e,...t})=>a.jsx("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});_t.displayName="DropdownMenuShortcut";const Yt=u.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(F.Root,{ref:n,className:l("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,a.jsx(Te,{})]}));Yt.displayName=F.Root.displayName;const $t=u.forwardRef(({className:e,...t},r)=>a.jsx(F.List,{ref:r,className:l("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));$t.displayName=F.List.displayName;const ja=F.Item,At=z.cva("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Ht=u.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(F.Trigger,{ref:n,className:l(At(),"group",e),...r,children:[t," ",a.jsx(C.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Ht.displayName=F.Trigger.displayName;const Gt=u.forwardRef(({className:e,...t},r)=>a.jsx(F.Content,{ref:r,className:l("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));Gt.displayName=F.Content.displayName;const Na=F.Link,Te=u.forwardRef(({className:e,...t},r)=>a.jsx("div",{className:l("absolute left-0 top-full flex justify-center"),children:a.jsx(F.Viewport,{className:l("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:r,...t})}));Te.displayName=F.Viewport.displayName;const Xt=u.forwardRef(({className:e,...t},r)=>a.jsx(F.Indicator,{ref:r,className:l("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52",e),...t,children:a.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Xt.displayName=F.Indicator.displayName;const ka=ae.Root,Ut=u.forwardRef(({className:e,...t},r)=>a.jsx(ae.List,{ref:r,className:l("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ut.displayName=ae.List.displayName;const Qt=u.forwardRef(({className:e,...t},r)=>a.jsx(ae.Trigger,{ref:r,className:l("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Qt.displayName=ae.Trigger.displayName;const Jt=u.forwardRef(({className:e,...t},r)=>a.jsx(ae.Content,{ref:r,className:l("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Jt.displayName=ae.Content.displayName;function ge({value:e,onChange:t,onClear:r,placeholder:n,showClearButton:o=!0,debounceMs:s=300,className:i,id:d,name:c,...m}){if(!n||n.trim()==="")throw new Error('SearchInput: "placeholder" prop is required and cannot be empty');const f=d||u.useId(),h=c||`search-input-${f}`,[w,p]=u.useState(e),g=u.useRef(null);u.useEffect(()=>{p(e)},[e]);const x=D=>{const b=D.target.value;p(b),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{t(b)},s)},S=()=>{p(""),t(""),r==null||r()};return u.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),a.jsxs("div",{className:l("relative",i),children:[a.jsx(C.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx(de,{...m,id:f,name:h,value:w,onChange:x,placeholder:n,className:"pl-10 pr-10"}),o&&w&&a.jsx(O,{type:"button",variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2",onClick:S,children:a.jsx(C.X,{className:"h-3 w-3"})})]})}function Ma(e=""){const[t,r]=u.useState(e),[n,o]=u.useState(e);u.useEffect(()=>{const i=setTimeout(()=>{o(t)},300);return()=>clearTimeout(i)},[t]);const s=u.useCallback(()=>{r(""),o("")},[]);return{search:t,debouncedSearch:n,setSearch:r,clearSearch:s}}const Kt=E.Root,Ca=E.Group,Zt=E.Value,Pe=u.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(E.Trigger,{ref:n,className:l("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,a.jsx(E.Icon,{asChild:!0,children:a.jsx(C.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Pe.displayName=E.Trigger.displayName;const qe=u.forwardRef(({className:e,...t},r)=>a.jsx(E.ScrollUpButton,{ref:r,className:l("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(C.ChevronUp,{className:"h-4 w-4"})}));qe.displayName=E.ScrollUpButton.displayName;const Re=u.forwardRef(({className:e,...t},r)=>a.jsx(E.ScrollDownButton,{ref:r,className:l("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(C.ChevronDown,{className:"h-4 w-4"})}));Re.displayName=E.ScrollDownButton.displayName;const Oe=u.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>a.jsx(E.Portal,{children:a.jsxs(E.Content,{ref:o,className:l("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[a.jsx(qe,{}),a.jsx(E.Viewport,{className:l("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(Re,{})]})}));Oe.displayName=E.Content.displayName;const er=u.forwardRef(({className:e,...t},r)=>a.jsx(E.Label,{ref:r,className:l("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));er.displayName=E.Label.displayName;const Fe=u.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(E.Item,{ref:n,className:l("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(E.ItemIndicator,{children:a.jsx(C.Check,{className:"h-4 w-4"})})}),a.jsx(E.ItemText,{children:t})]}));Fe.displayName=E.Item.displayName;const tr=u.forwardRef(({className:e,...t},r)=>a.jsx(E.Separator,{ref:r,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));tr.displayName=E.Separator.displayName;function ue({value:e,onValueChange:t,options:r,placeholder:n,label:o,className:s}){if(!n||n.trim()==="")throw new Error('FilterSelect: "placeholder" prop is required and cannot be empty');const i=r.filter(d=>d.value!==""&&d.value!=null);return a.jsxs("div",{className:l("space-y-2",s),children:[o&&a.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:o}),a.jsxs(Kt,{value:e||void 0,onValueChange:t,children:[a.jsx(Pe,{children:a.jsx(Zt,{placeholder:n})}),a.jsx(Oe,{children:i.map(d=>!d.value||d.value===""?null:a.jsx(Fe,{value:d.value,children:a.jsxs("div",{className:"flex items-center justify-between w-full",children:[a.jsx("span",{children:d.label}),d.count!==void 0&&a.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:["(",d.count,")"]})]})},d.value))})]})]})}function I(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function re(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const rr=6048e5,Sa=864e5;let Ea={};function xe(){return Ea}function me(e,t){var d,c,m,f;const r=xe(),n=(t==null?void 0:t.weekStartsOn)??((c=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((f=(m=r.locale)==null?void 0:m.options)==null?void 0:f.weekStartsOn)??0,o=I(e),s=o.getDay(),i=(s<n?7:0)+s-n;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function he(e){return me(e,{weekStartsOn:1})}function ar(e){const t=I(e),r=t.getFullYear(),n=re(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const o=he(n),s=re(e,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=he(s);return t.getTime()>=o.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function $e(e){const t=I(e);return t.setHours(0,0,0,0),t}function Ae(e){const t=I(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Da(e,t){const r=$e(e),n=$e(t),o=+r-Ae(r),s=+n-Ae(n);return Math.round((o-s)/Sa)}function Ta(e){const t=ar(e),r=re(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),he(r)}function Pa(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qa(e){if(!Pa(e)&&typeof e!="number")return!1;const t=I(e);return!isNaN(Number(t))}function Ra(e){const t=I(e),r=re(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const Oa={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Fa=(e,t,r)=>{let n;const o=Oa[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function je(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Va={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Wa={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},za={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ia={date:je({formats:Va,defaultWidth:"full"}),time:je({formats:Wa,defaultWidth:"full"}),dateTime:je({formats:za,defaultWidth:"full"})},La={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ba=(e,t,r,n)=>La[e];function le(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,d=r!=null&&r.width?String(r.width):i;o=e.formattingValues[d]||e.formattingValues[i]}else{const i=e.defaultWidth,d=r!=null&&r.width?String(r.width):e.defaultWidth;o=e.values[d]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const _a={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ya={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$a={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Aa={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ha={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ga={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xa=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ua={ordinalNumber:Xa,era:le({values:_a,defaultWidth:"wide"}),quarter:le({values:Ya,defaultWidth:"wide",argumentCallback:e=>e-1}),month:le({values:$a,defaultWidth:"wide"}),day:le({values:Aa,defaultWidth:"wide"}),dayPeriod:le({values:Ha,defaultWidth:"wide",formattingValues:Ga,defaultFormattingWidth:"wide"})};function ce(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],d=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(d)?Ja(d,h=>h.test(i)):Qa(d,h=>h.test(i));let m;m=e.valueCallback?e.valueCallback(c):c,m=r.valueCallback?r.valueCallback(m):m;const f=t.slice(i.length);return{value:m,rest:f}}}function Qa(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Ja(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Ka(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=r.valueCallback?r.valueCallback(i):i;const d=t.slice(o.length);return{value:i,rest:d}}}const Za=/^(\d+)(th|st|nd|rd)?/i,en=/\d+/i,tn={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rn={any:[/^b/i,/^(a|c)/i]},an={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nn={any:[/1/i,/2/i,/3/i,/4/i]},on={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},sn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ln={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},un={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mn={ordinalNumber:Ka({matchPattern:Za,parsePattern:en,valueCallback:e=>parseInt(e,10)}),era:ce({matchPatterns:tn,defaultMatchWidth:"wide",parsePatterns:rn,defaultParseWidth:"any"}),quarter:ce({matchPatterns:an,defaultMatchWidth:"wide",parsePatterns:nn,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ce({matchPatterns:on,defaultMatchWidth:"wide",parsePatterns:sn,defaultParseWidth:"any"}),day:ce({matchPatterns:dn,defaultMatchWidth:"wide",parsePatterns:ln,defaultParseWidth:"any"}),dayPeriod:ce({matchPatterns:cn,defaultMatchWidth:"any",parsePatterns:un,defaultParseWidth:"any"})},fn={code:"en-US",formatDistance:Fa,formatLong:Ia,formatRelative:Ba,localize:Ua,match:mn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pn(e){const t=I(e);return Da(t,Ra(t))+1}function hn(e){const t=I(e),r=+he(t)-+Ta(t);return Math.round(r/rr)+1}function nr(e,t){var f,h,w,p;const r=I(e),n=r.getFullYear(),o=xe(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(w=o.locale)==null?void 0:w.options)==null?void 0:p.firstWeekContainsDate)??1,i=re(e,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);const d=me(i,t),c=re(e,0);c.setFullYear(n,0,s),c.setHours(0,0,0,0);const m=me(c,t);return r.getTime()>=d.getTime()?n+1:r.getTime()>=m.getTime()?n:n-1}function gn(e,t){var d,c,m,f;const r=xe(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(m=r.locale)==null?void 0:m.options)==null?void 0:f.firstWeekContainsDate)??1,o=nr(e,t),s=re(e,0);return s.setFullYear(o,0,n),s.setHours(0,0,0,0),me(s,t)}function xn(e,t){const r=I(e),n=+me(r,t)-+gn(r,t);return Math.round(n/rr)+1}function j(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const J={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return j(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):j(r+1,2)},d(e,t){return j(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return j(e.getHours()%12||12,t.length)},H(e,t){return j(e.getHours(),t.length)},m(e,t){return j(e.getMinutes(),t.length)},s(e,t){return j(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return j(o,t.length)}},oe={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},He={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return J.y(e,t)},Y:function(e,t,r,n){const o=nr(e,n),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return j(i,2)}return t==="Yo"?r.ordinalNumber(s,{unit:"year"}):j(s,t.length)},R:function(e,t){const r=ar(e);return j(r,t.length)},u:function(e,t){const r=e.getFullYear();return j(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return j(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return j(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return J.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return j(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=xn(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):j(o,t.length)},I:function(e,t,r){const n=hn(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):j(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):J.d(e,t)},D:function(e,t,r){const n=pn(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):j(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return j(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),s=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return j(s,t.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return j(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(n===12?o=oe.noon:n===0?o=oe.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(n>=17?o=oe.evening:n>=12?o=oe.afternoon:n>=4?o=oe.morning:o=oe.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return J.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):J.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):j(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):j(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):J.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):J.s(e,t)},S:function(e,t){return J.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Xe(n);case"XXXX":case"XX":return te(n);case"XXXXX":case"XXX":default:return te(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Xe(n);case"xxxx":case"xx":return te(n);case"xxxxx":case"xxx":default:return te(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ge(n,":");case"OOOO":default:return"GMT"+te(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ge(n,":");case"zzzz":default:return"GMT"+te(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return j(n,t.length)},T:function(e,t,r){const n=e.getTime();return j(n,t.length)}};function Ge(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),s=n%60;return s===0?r+String(o):r+String(o)+t+j(s,2)}function Xe(e,t){return e%60===0?(e>0?"-":"+")+j(Math.abs(e)/60,2):te(e,t)}function te(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=j(Math.trunc(n/60),2),s=j(n%60,2);return r+o+t+s}const Ue=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},or=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},bn=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return Ue(e,t);let s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Ue(n,t)).replace("{{time}}",or(o,t))},wn={p:or,P:bn},yn=/^D+$/,vn=/^Y+$/,jn=["D","DD","YY","YYYY"];function Nn(e){return yn.test(e)}function kn(e){return vn.test(e)}function Mn(e,t,r){const n=Cn(e,t,r);if(console.warn(n),jn.includes(e))throw new RangeError(n)}function Cn(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Sn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,En=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dn=/^'([^]*?)'?$/,Tn=/''/g,Pn=/[a-zA-Z]/;function Ne(e,t,r){var f,h,w,p;const n=xe(),o=n.locale??fn,s=n.firstWeekContainsDate??((h=(f=n.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=n.weekStartsOn??((p=(w=n.locale)==null?void 0:w.options)==null?void 0:p.weekStartsOn)??0,d=I(e);if(!qa(d))throw new RangeError("Invalid time value");let c=t.match(En).map(g=>{const x=g[0];if(x==="p"||x==="P"){const S=wn[x];return S(g,o.formatLong)}return g}).join("").match(Sn).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const x=g[0];if(x==="'")return{isToken:!1,value:qn(g)};if(He[x])return{isToken:!0,value:g};if(x.match(Pn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:g}});o.localize.preprocessor&&(c=o.localize.preprocessor(d,c));const m={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return c.map(g=>{if(!g.isToken)return g.value;const x=g.value;(kn(x)||Nn(x))&&Mn(x,t,String(e));const S=He[x[0]];return S(d,x,o.localize,m)}).join("")}function qn(e){const t=e.match(Dn);return t?t[1].replace(Tn,"'"):e}function Ve({value:e,onChange:t,placeholder:r,selectDateRangeLabel:n,clearLabel:o,closeLabel:s,className:i,disabled:d=!1}){if(!r||r.trim()==="")throw new Error('DateRangePicker: "placeholder" prop is required and cannot be empty');if(!n||n.trim()==="")throw new Error('DateRangePicker: "selectDateRangeLabel" prop is required and cannot be empty');if(!o||o.trim()==="")throw new Error('DateRangePicker: "clearLabel" prop is required and cannot be empty');if(!s||s.trim()==="")throw new Error('DateRangePicker: "closeLabel" prop is required and cannot be empty');const[c,m]=u.useState(!1),f=p=>p.from?p.to?`${Ne(p.from,"LLL dd, y")} - ${Ne(p.to,"LLL dd, y")}`:Ne(p.from,"LLL dd, y"):r,h=p=>{if(!p){t({from:void 0,to:void 0});return}!e.from||e.from&&e.to?t({from:p,to:void 0}):e.from&&!e.to&&(p<e.from?t({from:p,to:e.from}):t({from:e.from,to:p}),m(!1))},w=()=>{t({from:void 0,to:void 0})};return a.jsxs("div",{className:l("relative",i),children:[a.jsxs(O,{variant:"outline",className:l("w-full justify-start text-left font-normal",!e.from&&"text-muted-foreground"),onClick:()=>m(!c),disabled:d,children:[a.jsx(C.Calendar,{className:"mr-2 h-4 w-4"}),f(e)]}),c&&a.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 w-full rounded-md border bg-popover p-3 shadow-lg",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:"text-sm font-medium",children:n}),a.jsxs("div",{className:"grid grid-cols-7 gap-1 text-xs",children:[["S","M","T","W","T","F","S"].map(p=>a.jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:p},p)),Array.from({length:35},(p,g)=>{const x=new Date;x.setDate(x.getDate()-x.getDay()+g);const S=e.from&&x.toDateString()===e.from.toDateString()||e.to&&x.toDateString()===e.to.toDateString(),D=e.from&&e.to&&x>e.from&&x<e.to;return a.jsx("button",{className:l("h-8 w-8 rounded text-sm hover:bg-accent",S&&"bg-primary text-primary-foreground",D&&"bg-accent/50"),onClick:()=>h(x),children:x.getDate()},g)})]}),a.jsxs("div",{className:"flex justify-between pt-2",children:[a.jsx(O,{variant:"outline",size:"sm",onClick:w,children:o}),a.jsx(O,{variant:"outline",size:"sm",onClick:()=>m(!1),children:s})]})]})})]})}function Rn(e={from:void 0,to:void 0}){const[t,r]=u.useState(e),n=u.useCallback(i=>{r(i)},[]),o=u.useCallback(()=>{r({from:void 0,to:void 0})},[]),s=t.from&&t.to;return{range:t,setDateRange:n,clearRange:o,isRangeComplete:s}}function sr({value:e,onChange:t,min:r,max:n,step:o,currency:s,priceRangeLabel:i,minLabel:d,maxLabel:c,anyPriceLabel:m,clearLabel:f,minAriaLabel:h,maxAriaLabel:w,className:p}){var H,ne;if(typeof r!="number"||isNaN(r))throw new Error('PriceRangeSlider: "min" prop is required and must be a number');if(typeof n!="number"||isNaN(n))throw new Error('PriceRangeSlider: "max" prop is required and must be a number');if(typeof o!="number"||isNaN(o)||o<=0)throw new Error('PriceRangeSlider: "step" prop is required and must be a positive number');if(!s||s.trim()==="")throw new Error('PriceRangeSlider: "currency" prop is required and cannot be empty');if(!i||i.trim()==="")throw new Error('PriceRangeSlider: "priceRangeLabel" prop is required and cannot be empty');if(!d||d.trim()==="")throw new Error('PriceRangeSlider: "minLabel" prop is required and cannot be empty');if(!c||c.trim()==="")throw new Error('PriceRangeSlider: "maxLabel" prop is required and cannot be empty');if(!m||m.trim()==="")throw new Error('PriceRangeSlider: "anyPriceLabel" prop is required and cannot be empty');if(!f||f.trim()==="")throw new Error('PriceRangeSlider: "clearLabel" prop is required and cannot be empty');if(!h||h.trim()==="")throw new Error('PriceRangeSlider: "minAriaLabel" prop is required and cannot be empty');if(!w||w.trim()==="")throw new Error('PriceRangeSlider: "maxAriaLabel" prop is required and cannot be empty');const g=u.useId(),x=u.useId(),[S,D]=u.useState(((H=e.min)==null?void 0:H.toString())||""),[b,v]=u.useState(((ne=e.max)==null?void 0:ne.toString())||"");u.useEffect(()=>{var q,P;D(((q=e.min)==null?void 0:q.toString())||""),v(((P=e.max)==null?void 0:P.toString())||"")},[e.min,e.max]);const L=q=>{const P=q.target.value;D(P);const T=P===""?null:Math.max(r,parseInt(P)||r),R=e.max?Math.min(n,e.max):null;T!==null&&R!==null&&T>R?t({min:T,max:T}):t({min:T,max:R})},B=q=>{const P=q.target.value;v(P);const T=P===""?null:Math.min(n,parseInt(P)||n),R=e.min?Math.max(r,e.min):null;R!==null&&T!==null&&R>T?t({min:T,max:T}):t({min:R,max:T})},U=(q,P)=>{if(q==="min"){const T=Math.max(r,Math.min(n,P)),R=e.max?Math.max(T,e.max):null;t({min:T,max:R})}else{const T=Math.max(r,Math.min(n,P)),R=e.min?Math.min(T,e.min):null;t({min:R,max:T})}},Q=()=>{D(""),v(""),t({min:null,max:null})},_=e.min||r,A=e.max||n;return a.jsxs("div",{className:l("space-y-4",p),children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(K,{children:i}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx(K,{htmlFor:g,className:"text-xs text-muted-foreground",children:d}),a.jsxs("div",{className:"relative",children:[a.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:s}),a.jsx(de,{id:g,name:`min-price-${g}`,type:"number",value:S,onChange:L,placeholder:r.toString(),min:r,max:n,step:o,className:"pl-8"})]})]}),a.jsxs("div",{className:"flex-1",children:[a.jsx(K,{htmlFor:x,className:"text-xs text-muted-foreground",children:c}),a.jsxs("div",{className:"relative",children:[a.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:s}),a.jsx(de,{id:x,name:`max-price-${x}`,type:"number",value:b,onChange:B,placeholder:n.toString(),min:r,max:n,step:o,className:"pl-8"})]})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"relative",children:[a.jsx("input",{type:"range",id:`${g}-slider`,name:`min-price-slider-${g}`,min:r,max:n,step:o,value:_,onChange:q=>U("min",parseInt(q.target.value)),className:"absolute w-full h-2 bg-transparent appearance-none cursor-pointer slider-thumb","aria-label":h}),a.jsx("input",{type:"range",id:`${x}-slider`,name:`max-price-slider-${x}`,min:r,max:n,step:o,value:A,onChange:q=>U("max",parseInt(q.target.value)),className:"absolute w-full h-2 bg-transparent appearance-none cursor-pointer slider-thumb","aria-label":w}),a.jsx("div",{className:"h-2 bg-muted rounded-full",children:a.jsx("div",{className:"h-2 bg-primary rounded-full",style:{left:`${(_-r)/(n-r)*100}%`,width:`${(A-_)/(n-r)*100}%`}})})]}),a.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[a.jsxs("span",{children:[s,r]}),a.jsxs("span",{children:[s,n]})]})]}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-sm text-muted-foreground",children:e.min!==null||e.max!==null?`${s}${e.min||r} - ${s}${e.max||n}`:m}),a.jsx("button",{type:"button",onClick:Q,className:"text-xs text-muted-foreground hover:text-foreground",children:f})]})]})}function On(e={min:null,max:null}){const[t,r]=u.useState(e),n=u.useCallback(i=>{r(i)},[]),o=u.useCallback(()=>{r({min:null,max:null})},[]),s=t.min!==null||t.max!==null;return{range:t,setPriceRange:n,clearRange:o,isRangeSet:s}}const Fn=()=>(console.warn("useFilterManager: This is a mock implementation. Use the actual hook from apps/web/src/stores/useFiltersStore"),{search:"",category:"",tags:[],dateRange:{start:null,end:null},priceRange:{min:null,max:null},sortBy:"date",sortOrder:"desc",setSearch:e=>{},setCategory:e=>{},setTags:e=>{},addTag:e=>{},removeTag:e=>{},setDateRange:(e,t)=>{},setPriceRange:(e,t)=>{},setSorting:(e,t)=>{},resetFilters:()=>{},getActiveFiltersCount:()=>0,getFilterSummary:()=>[],hasActiveFilters:!1,clearAllFilters:()=>{}});function ir({className:e,showSearch:t=!0,showCategory:r=!0,showDateRange:n=!0,showPriceRange:o=!0,showSorting:s=!0,categories:i=[],sortOptions:d,searchPlaceholder:c,filtersLabel:m,clearAllLabel:f,categoryLabel:h,allCategoriesLabel:w,dateRangeLabel:p,anyDateLabel:g,dateSelectDateRangeLabel:x,dateClearLabel:S,dateCloseLabel:D,sortByLabel:b,sortAscLabel:v,sortDescLabel:L,sortByPlaceholder:B,activeFiltersLabel:U,priceRangeLabel:Q,priceMinLabel:_,priceMaxLabel:A,priceAnyLabel:H,priceClearLabel:ne,priceMinAriaLabel:q,priceMaxAriaLabel:P,onFiltersChange:T}){if(!d||d.length===0)throw new Error('FilterBar: "sortOptions" prop is required and cannot be empty');if(!c||c.trim()==="")throw new Error('FilterBar: "searchPlaceholder" prop is required and cannot be empty');if(!m||m.trim()==="")throw new Error('FilterBar: "filtersLabel" prop is required and cannot be empty');if(!f||f.trim()==="")throw new Error('FilterBar: "clearAllLabel" prop is required and cannot be empty');if(!h||h.trim()==="")throw new Error('FilterBar: "categoryLabel" prop is required and cannot be empty');if(!w||w.trim()==="")throw new Error('FilterBar: "allCategoriesLabel" prop is required and cannot be empty');if(!p||p.trim()==="")throw new Error('FilterBar: "dateRangeLabel" prop is required and cannot be empty');if(!g||g.trim()==="")throw new Error('FilterBar: "anyDateLabel" prop is required and cannot be empty');if(!x||x.trim()==="")throw new Error('FilterBar: "dateSelectDateRangeLabel" prop is required and cannot be empty');if(!S||S.trim()==="")throw new Error('FilterBar: "dateClearLabel" prop is required and cannot be empty');if(!D||D.trim()==="")throw new Error('FilterBar: "dateCloseLabel" prop is required and cannot be empty');if(!b||b.trim()==="")throw new Error('FilterBar: "sortByLabel" prop is required and cannot be empty');if(!v||v.trim()==="")throw new Error('FilterBar: "sortAscLabel" prop is required and cannot be empty');if(!L||L.trim()==="")throw new Error('FilterBar: "sortDescLabel" prop is required and cannot be empty');if(!B||B.trim()==="")throw new Error('FilterBar: "sortByPlaceholder" prop is required and cannot be empty');if(!U||U.trim()==="")throw new Error('FilterBar: "activeFiltersLabel" prop is required and cannot be empty');if(!Q||Q.trim()==="")throw new Error('FilterBar: "priceRangeLabel" prop is required and cannot be empty');if(!_||_.trim()==="")throw new Error('FilterBar: "priceMinLabel" prop is required and cannot be empty');if(!A||A.trim()==="")throw new Error('FilterBar: "priceMaxLabel" prop is required and cannot be empty');if(!H||H.trim()==="")throw new Error('FilterBar: "priceAnyLabel" prop is required and cannot be empty');if(!ne||ne.trim()==="")throw new Error('FilterBar: "priceClearLabel" prop is required and cannot be empty');if(!q||q.trim()==="")throw new Error('FilterBar: "priceMinAriaLabel" prop is required and cannot be empty');if(!P||P.trim()==="")throw new Error('FilterBar: "priceMaxAriaLabel" prop is required and cannot be empty');const{search:R,category:be,dateRange:pe,priceRange:we,sortBy:ye,sortOrder:ve,setSearch:yr,setCategory:vr,setDateRange:jr,setPriceRange:Nr,hasActiveFilters:Le}=Fn();u.useEffect(()=>{T&&T({search:R,category:be,dateRange:pe,priceRange:we,sortBy:ye,sortOrder:ve})},[R,be,pe,we,ye,ve,T]);const kr=V=>{jr(V.from||null,V.to||null)},Mr=V=>{Nr(V.min,V.max)};return a.jsxs("div",{className:l("space-y-4",e),children:[a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[t&&a.jsx("div",{className:"flex-1",children:a.jsx(ge,{value:R,onChange:yr,placeholder:c})}),Le]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[r&&i.length>0&&a.jsx(ue,{value:be,onValueChange:vr,options:i,label:h,placeholder:w}),n&&a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:p}),a.jsx(Ve,{value:{from:pe.start||void 0,to:pe.end||void 0},onChange:kr,placeholder:g,selectDateRangeLabel:x,clearLabel:S,closeLabel:D})]}),o&&a.jsx(sr,{value:we,onChange:Mr,min:0,max:500,step:10,currency:"€",priceRangeLabel:Q,minLabel:_,maxLabel:A,anyPriceLabel:H,clearLabel:ne,minAriaLabel:q,maxAriaLabel:P}),s&&a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:b}),a.jsx(ue,{value:`${ye}-${ve}`,onValueChange:V=>{const[bo,wo]=V.split("-")},options:d.map(V=>({value:`${V.value}-asc`,label:`${V.label} ${v}`})).concat(d.map(V=>({value:`${V.value}-desc`,label:`${V.label} ${L}`}))),placeholder:B})]})]}),Le]})}function Vn({className:e,...t}){return a.jsx(ir,{className:l("space-y-2",e),...t})}const Wn=({searchLabel:e,searchPlaceholder:t,searchValue:r,onSearchChange:n,dateLabel:o,datePlaceholder:s,dateSelectDateRangeLabel:i,dateClearLabel:d,dateCloseLabel:c,dateValue:m,onDateChange:f,genreLabel:h,genrePlaceholder:w,genreOptions:p,genreValue:g,onGenreChange:x,venueLabel:S,venuePlaceholder:D,venueOptions:b,venueValue:v,onVenueChange:L,className:B})=>{if(!e||e.trim()==="")throw new Error('SearchFilters: "searchLabel" prop is required and cannot be empty');if(!t||t.trim()==="")throw new Error('SearchFilters: "searchPlaceholder" prop is required and cannot be empty');if(!o||o.trim()==="")throw new Error('SearchFilters: "dateLabel" prop is required and cannot be empty');if(!s||s.trim()==="")throw new Error('SearchFilters: "datePlaceholder" prop is required and cannot be empty');if(!i||i.trim()==="")throw new Error('SearchFilters: "dateSelectDateRangeLabel" prop is required and cannot be empty');if(!d||d.trim()==="")throw new Error('SearchFilters: "dateClearLabel" prop is required and cannot be empty');if(!c||c.trim()==="")throw new Error('SearchFilters: "dateCloseLabel" prop is required and cannot be empty');if(!h||h.trim()==="")throw new Error('SearchFilters: "genreLabel" prop is required and cannot be empty');if(!w||w.trim()==="")throw new Error('SearchFilters: "genrePlaceholder" prop is required and cannot be empty');if(!p||p.length===0)throw new Error('SearchFilters: "genreOptions" prop is required and cannot be empty');if(!S||S.trim()==="")throw new Error('SearchFilters: "venueLabel" prop is required and cannot be empty');if(!D||D.trim()==="")throw new Error('SearchFilters: "venuePlaceholder" prop is required and cannot be empty');if(!b||b.length===0)throw new Error('SearchFilters: "venueOptions" prop is required and cannot be empty');return a.jsx("div",{className:l("bg-white dark:bg-gray-800 p-6 rounded-lg shadow-lg",B),children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-2",children:e}),a.jsx(ge,{placeholder:t,value:r,onChange:n})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-2",children:o}),a.jsx(Ve,{value:m,onChange:f,placeholder:s,selectDateRangeLabel:i,clearLabel:d,closeLabel:c})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-2",children:h}),a.jsx(ue,{placeholder:w,value:g,options:p,onValueChange:x})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium mb-2",children:S}),a.jsx(ue,{placeholder:D,value:v,options:b,onValueChange:L})]})]})})};function zn(){const[e,t]=y.useState([]),r=y.useCallback(i=>{const d=Math.random().toString(36).substr(2,9),c={id:d,duration:5e3,...i};return t(m=>[...m,c]),c.duration&&c.duration>0&&setTimeout(()=>{n(d)},c.duration),d},[]),n=y.useCallback(i=>{t(d=>d.filter(c=>c.id!==i))},[]),o=y.useCallback(()=>{t([])},[]),s=y.useCallback((i,d)=>{t(c=>c.map(m=>m.id===i?{...m,...d}:m))},[]);return{toasts:e,toast:r,dismiss:n,dismissAll:o,updateToast:s}}const dr=z.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{type:{default:"border bg-background text-foreground",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100",warning:"border-yellow-200 bg-yellow-50 text-yellow-900 dark:border-yellow-800 dark:bg-yellow-950 dark:text-yellow-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100"}},defaultVariants:{type:"default"}}),In=z.cva("h-4 w-4 flex-shrink-0",{variants:{type:{default:"text-foreground",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"}},defaultVariants:{type:"default"}}),Ln=e=>{switch(e){case"success":return C.CheckCircle;case"error":return C.AlertCircle;case"warning":return C.AlertTriangle;case"info":return C.Info;default:return C.Info}},We=u.forwardRef(({className:e,toast:t,onDismiss:r,type:n=t.type,...o},s)=>{const i=Ln(t.type);return a.jsxs("div",{ref:s,className:l(dr({type:n,className:e})),...o,children:[a.jsxs("div",{className:"flex items-start space-x-3 flex-1",children:[a.jsx(i,{className:l(In({type:t.type}))}),a.jsxs("div",{className:"flex-1 space-y-1",children:[t.title&&a.jsx("div",{className:"text-sm font-semibold",children:t.title}),t.description&&a.jsx("div",{className:"text-sm opacity-90",children:t.description}),t.action&&a.jsx("div",{className:"mt-2",children:a.jsx(O,{variant:"outline",size:"sm",onClick:t.action.onClick,className:"h-8 px-2 text-xs",children:t.action.label})})]})]}),a.jsx(O,{variant:"ghost",size:"icon",className:"absolute right-1 top-1 h-6 w-6 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100",onClick:()=>r(t.id),children:a.jsx(C.X,{className:"h-4 w-4"})})]})});We.displayName="Toast";const lr=y.createContext(void 0);function Bn({children:e,position:t="top-right",maxToasts:r=5}){const n=zn(),{toasts:o,toast:s,dismiss:i,dismissAll:d,updateToast:c}=n,m=o.slice(-r),f={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"};return a.jsxs(lr.Provider,{value:{toast:s,dismiss:i,dismissAll:d,updateToast:c},children:[e,a.jsx(Yn,{position:t,positionClasses:f[t],children:m.map(h=>a.jsx(We,{toast:h,onDismiss:i},h.id))})]})}function cr(){const e=y.useContext(lr);if(e===void 0)throw new Error("useToastContext must be used within a ToastProvider");return e}function _n(){const{toast:e,dismiss:t,dismissAll:r,updateToast:n}=cr();return{toast:e,dismiss:t,dismissAll:r,updateToast:n,success:o=>e({...o,type:"success"}),error:o=>e({...o,type:"error"}),warning:o=>e({...o,type:"warning"}),info:o=>e({...o,type:"info"})}}function Yn({children:e,positionClasses:t}){return a.jsx("div",{className:l("fixed z-[100] flex max-h-screen w-full flex-col-reverse p-0 sm:flex-col",t),style:{pointerEvents:"none"},children:a.jsx("div",{className:"pointer-events-auto flex flex-col gap-2",children:e})})}const ur=fe.Provider,mr=fe.Root,fr=fe.Trigger,pr=z.cva("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{variant:{default:"bg-popover text-popover-foreground border-border",destructive:"border-destructive/50 text-destructive bg-destructive/10",warning:"border-yellow-500/50 text-yellow-700 bg-yellow-50",success:"border-green-500/50 text-green-700 bg-green-50",info:"border-blue-500/50 text-blue-700 bg-blue-50"}},defaultVariants:{variant:"default"}}),ze=u.forwardRef(({className:e,variant:t,sideOffset:r=4,...n},o)=>a.jsx(fe.Content,{ref:o,sideOffset:r,className:l(pr({variant:t,className:e})),...n}));ze.displayName=fe.Content.displayName;function $n({children:e,content:t,variant:r,side:n="top",align:o="center",sideOffset:s,alignOffset:i,delayDuration:d=400,skipDelayDuration:c=300,disableHoverableContent:m=!1,open:f,onOpenChange:h}){return a.jsx(ur,{delayDuration:d,skipDelayDuration:c,children:a.jsxs(mr,{open:f,onOpenChange:h,children:[a.jsx(fr,{asChild:!0,children:e}),a.jsx(ze,{variant:r,side:n,align:o,sideOffset:s,alignOffset:i,children:t})]})})}const hr=ie.Root,gr=ie.Trigger,An=ie.Anchor,xr=z.cva("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{variant:{default:"bg-popover text-popover-foreground border-border",destructive:"border-destructive/50 text-destructive bg-destructive/10",warning:"border-yellow-500/50 text-yellow-700 bg-yellow-50",success:"border-green-500/50 text-green-700 bg-green-50",info:"border-blue-500/50 text-blue-700 bg-blue-50"},size:{sm:"w-48 p-3",md:"w-72 p-4",lg:"w-96 p-6",xl:"w-[32rem] p-8"}},defaultVariants:{variant:"default",size:"md"}}),Ie=u.forwardRef(({className:e,variant:t,size:r,align:n="center",sideOffset:o=4,...s},i)=>a.jsx(ie.Portal,{children:a.jsx(ie.Content,{ref:i,align:n,sideOffset:o,className:l(xr({variant:t,size:r,className:e})),...s})}));Ie.displayName=ie.Content.displayName;function Hn({children:e,content:t,variant:r,size:n,side:o="bottom",align:s="center",sideOffset:i,alignOffset:d,open:c,onOpenChange:m,modal:f=!0,closeOnInteractOutside:h=!0}){return a.jsxs(hr,{open:c,onOpenChange:m,modal:f,children:[a.jsx(gr,{asChild:!0,children:e}),a.jsx(Ie,{variant:r,size:n,side:o,align:s,sideOffset:i,alignOffset:d,onInteractOutside:h?void 0:w=>w.preventDefault(),children:t})]})}function Gn({children:e,container:t,className:r,style:n}){const[o,s]=u.useState(!1);if(u.useEffect(()=>{s(!0)},[]),!o)return null;const i=t||document.body;return Wr.createPortal(a.jsx("div",{className:l("fixed inset-0 z-50",r),style:n,children:e}),i)}function Xn({onClick:e,className:t,style:r}){return a.jsx("div",{className:l("absolute inset-0 bg-black/50 backdrop-blur-sm",t),style:r,onClick:e})}function Un({children:e,className:t,style:r,position:n="center"}){const o={center:"flex items-center justify-center",top:"flex justify-center pt-8",bottom:"flex justify-center pb-8",left:"flex items-center pl-8",right:"flex items-center pr-8","top-left":"flex justify-start items-start pt-8 pl-8","top-right":"flex justify-end items-start pt-8 pr-8","bottom-left":"flex justify-start items-end pb-8 pl-8","bottom-right":"flex justify-end items-end pb-8 pr-8"};return a.jsx("div",{className:l("relative w-full h-full min-h-screen",o[n],t),style:r,children:e})}const Qn=({variant:e="info",title:t,description:r,className:n})=>{const o={success:"bg-green-50 border-green-200 text-green-800",error:"bg-red-50 border-red-200 text-red-800",warning:"bg-yellow-50 border-yellow-200 text-yellow-800",info:"bg-blue-50 border-blue-200 text-blue-800"};return a.jsxs("div",{className:l("border rounded-lg p-4",o[e],n),children:[t&&a.jsx(W,{level:4,className:"font-semibold mb-2",children:t}),r&&a.jsx(N,{size:"sm",children:r})]})},Jn=({value:e,max:t=100,className:r})=>{const n=Math.min(100,Math.max(0,e/t*100));return a.jsx("div",{className:l("w-full bg-secondary rounded-full h-2",r),children:a.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${n}%`}})})},G=({className:e})=>a.jsx("div",{className:l("animate-pulse bg-gray-200 dark:bg-gray-700 rounded",e)}),Kn=({items:e,className:t})=>a.jsx("nav",{className:l("flex items-center space-x-2 text-sm",t),children:e.map((r,n)=>a.jsxs(y.Fragment,{children:[n>0&&a.jsx(C.ChevronRight,{className:"h-4 w-4 text-muted-foreground"}),r.href?a.jsx(Z,{href:r.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:r.label}):a.jsx("span",{className:"text-foreground font-medium",children:r.label})]},n))}),Zn=({currentPage:e,totalPages:t,onPageChange:r,className:n})=>{const o=()=>{const i=[],d=[];for(let c=Math.max(2,e-2);c<=Math.min(t-1,e+2);c++)i.push(c);return e-2>2?d.push(1,"..."):d.push(1),d.push(...i),e+2<t-1?d.push("...",t):d.push(t),d};return a.jsxs("nav",{className:l("flex items-center space-x-1",n),children:[a.jsx("button",{onClick:()=>r(e-1),disabled:e===1,className:"p-2 rounded-md border border-input bg-background hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:a.jsx(C.ChevronLeft,{className:"h-4 w-4"})}),o().map((s,i)=>a.jsx(y.Fragment,{children:s==="..."?a.jsx("span",{className:"px-3 py-2 text-muted-foreground",children:"..."}):a.jsx("button",{onClick:()=>r(s),className:l("px-3 py-2 rounded-md border transition-colors",s===e?"bg-primary text-primary-foreground border-primary":"border-input bg-background hover:bg-accent"),children:s})},i)),a.jsx("button",{onClick:()=>r(e+1),disabled:e===t,className:"p-2 rounded-md border border-input bg-background hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:a.jsx(C.ChevronRight,{className:"h-4 w-4"})})]})},eo=({data:e,columns:t,rowKey:r,className:n})=>a.jsx("div",{className:l("overflow-x-auto",n),children:a.jsxs("table",{className:"w-full border-collapse",children:[a.jsx("thead",{children:a.jsx("tr",{className:"border-b",children:t.map(o=>a.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:o.title},String(o.key)))})}),a.jsx("tbody",{children:e.map(o=>a.jsx("tr",{className:"border-b hover:bg-muted/50",children:t.map(s=>a.jsx("td",{className:"p-3",children:s.render?s.render(o[s.key],o):String(o[s.key])},String(s.key)))},String(o[r])))})]})}),to=({items:e,className:t})=>a.jsx("div",{className:l("space-y-2",t),children:e.map(r=>a.jsxs("div",{className:"p-4 border rounded-lg hover:bg-muted/50 transition-colors",children:[a.jsx("h3",{className:"font-medium text-foreground",children:r.title}),r.description&&a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:r.description})]},r.id))}),ro=({items:e,className:t})=>a.jsx("div",{className:l("space-y-6",t),children:e.map((r,n)=>a.jsxs("div",{className:"relative flex",children:[a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsx("div",{className:"w-3 h-3 bg-primary rounded-full border-2 border-background"}),n<e.length-1&&a.jsx("div",{className:"w-px h-12 bg-border mt-2"})]}),a.jsxs("div",{className:"ml-4 flex-1",children:[a.jsx(W,{level:3,className:"font-medium",children:r.title}),a.jsx(N,{size:"sm",color:"muted",children:r.date}),r.description&&a.jsx(N,{size:"sm",color:"muted",className:"mt-1",children:r.description})]})]},r.id))}),ao=({event:e,className:t,featured:r,showImage:n,getTicketsLabel:o,trendingBadgeText:s})=>{var w,p,g,x,S,D,b,v,L,B,U,Q,_,A,H;if(typeof r!="boolean")throw new Error('EventCard: "featured" prop is required and must be a boolean');if(typeof n!="boolean")throw new Error('EventCard: "showImage" prop is required and must be a boolean');if(!o||o.trim()==="")throw new Error('EventCard: "getTicketsLabel" prop is required and cannot be empty');if(!s||s.trim()==="")throw new Error('EventCard: "trendingBadgeText" prop is required and cannot be empty');const i=typeof(e==null?void 0:e.name)=="string"?e.name:((w=e==null?void 0:e.name)==null?void 0:w.en)||((p=e==null?void 0:e.name)==null?void 0:p.es)||((g=e==null?void 0:e.name)==null?void 0:g.ru);if(!i||i.trim()==="")throw new Error("EventCard: event.name is required and cannot be empty");const d=typeof(e==null?void 0:e.description)=="string"?e.description:((x=e==null?void 0:e.description)==null?void 0:x.en)||((S=e==null?void 0:e.description)==null?void 0:S.es)||((D=e==null?void 0:e.description)==null?void 0:D.ru);if(!d||d.trim()==="")throw new Error("EventCard: event.description is required and cannot be empty");const c=e==null?void 0:e.start_date;if(!c||c.trim()==="")throw new Error("EventCard: event.start_date is required and cannot be empty");const m=typeof((b=e==null?void 0:e.venue_id)==null?void 0:b.name)=="string"?e.venue_id.name:((L=(v=e==null?void 0:e.venue_id)==null?void 0:v.name)==null?void 0:L.en)||((U=(B=e==null?void 0:e.venue_id)==null?void 0:B.name)==null?void 0:U.es)||((_=(Q=e==null?void 0:e.venue_id)==null?void 0:Q.name)==null?void 0:_.ru);if(!m||m.trim()==="")throw new Error("EventCard: event.venue_id.name is required and cannot be empty");const f=typeof(e==null?void 0:e.price)=="string"?e.price:typeof(e==null?void 0:e.price)=="object"&&(e==null?void 0:e.price)!==null?`€${((A=e.price)==null?void 0:A.min)||0} - €${((H=e.price)==null?void 0:H.max)||"∞"}`:null;if(!f||f.trim()==="")throw new Error("EventCard: event.price is required and cannot be empty");const h=e==null?void 0:e.image;return a.jsxs(Y,{className:l("group relative overflow-hidden border-transparent hover:border-primary/20 shadow-md hover:shadow-xl transition-all duration-300 animate-fade-in-up",r&&"ring-2 ring-primary/50",t),children:[r&&a.jsx("div",{className:"absolute top-3 right-3 z-10",children:a.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-gradient-to-r from-orange-500 to-purple-600 text-white shadow-lg",children:s})}),n&&a.jsxs("div",{className:"relative w-full h-48 bg-gradient-to-br from-gray-200 to-gray-300 dark:from-gray-700 dark:to-gray-800 rounded-t-lg overflow-hidden",children:[h?a.jsx("img",{src:h,alt:i,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}):a.jsx("div",{className:"w-full h-full flex items-center justify-center",children:a.jsx("svg",{className:"w-16 h-16 text-gray-400 dark:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),a.jsxs($,{className:"p-4",children:[a.jsx(W,{level:3,className:"text-lg font-bold mb-2 group-hover:text-primary transition-colors line-clamp-2",children:e!=null&&e.slug?a.jsx(Z,{href:`/events/${e.slug}`,variant:"ghost",size:"none",children:i}):i}),a.jsx(N,{size:"sm",color:"muted",className:"mb-3 line-clamp-2",children:d}),a.jsxs("div",{className:"flex flex-col gap-2 mb-3",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),a.jsx(N,{size:"xs",color:"muted",children:c})]}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[a.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),a.jsx(N,{size:"xs",color:"muted",className:"line-clamp-1",children:m})]})]}),a.jsx("div",{className:"pt-3 border-t border-gray-200 dark:border-gray-700",children:e!=null&&e.ticket_url?a.jsxs(Z,{href:e.ticket_url,className:"inline-flex items-center justify-center w-full py-2 px-4 bg-gradient-to-r from-orange-500 to-purple-600 hover:from-orange-600 hover:to-purple-700 text-white font-semibold transition-all duration-300 transform hover:scale-105 shadow-md hover:shadow-lg",target:"_blank",rel:"noopener noreferrer",children:[o,a.jsx("svg",{className:"ml-2 w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]}):a.jsx("div",{className:"text-right",children:a.jsx(N,{size:"lg",weight:"bold",className:"bg-gradient-to-r from-orange-500 to-purple-600 bg-clip-text text-transparent",children:f})})})]})]})},no=({venue:e,className:t,featured:r,showImage:n,eventsLabel:o,popularBadgeText:s,capacityLabel:i})=>{var p,g;if(typeof r!="boolean")throw new Error('VenueCard: "featured" prop is required and must be a boolean');if(typeof n!="boolean")throw new Error('VenueCard: "showImage" prop is required and must be a boolean');if(!o||o.trim()==="")throw new Error('VenueCard: "eventsLabel" prop is required and cannot be empty');if(!s||s.trim()==="")throw new Error('VenueCard: "popularBadgeText" prop is required and cannot be empty');if(!i||i.trim()==="")throw new Error('VenueCard: "capacityLabel" prop is required and cannot be empty');const d=typeof(e==null?void 0:e.name)=="string"?e.name:(p=e==null?void 0:e.name)==null?void 0:p.en;if(!d||d.trim()==="")throw new Error("VenueCard: venue.name is required and cannot be empty");const c=typeof(e==null?void 0:e.description)=="string"?e.description:(g=e==null?void 0:e.description)==null?void 0:g.en;if(!c||c.trim()==="")throw new Error("VenueCard: venue.description is required and cannot be empty");const m=typeof(e==null?void 0:e.location)=="string"?e.location:e==null?void 0:e.address;if(!m||m.trim()==="")throw new Error("VenueCard: venue.location or venue.address is required and cannot be empty");const f=e==null?void 0:e.capacity;if(!f||f.trim()==="")throw new Error("VenueCard: venue.capacity is required and cannot be empty");const h=e==null?void 0:e.image,w=(e==null?void 0:e.events_count)||0;return a.jsxs(Y,{className:l("group relative overflow-hidden border-transparent hover:border-primary/20 shadow-md hover:shadow-xl transition-all duration-300 animate-fade-in-up",r&&"ring-2 ring-primary/50",t),children:[r&&a.jsx("div",{className:"absolute top-3 right-3 z-10",children:a.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold bg-gradient-to-r from-purple-500 to-orange-500 text-white shadow-lg",children:s})}),n&&a.jsxs("div",{className:"relative w-full h-48 bg-gradient-to-br from-gray-200 to-gray-300 dark:from-gray-700 dark:to-gray-800 rounded-t-lg overflow-hidden",children:[h?a.jsx("img",{src:h,alt:d,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}):a.jsx("div",{className:"w-full h-full flex items-center justify-center",children:a.jsx("svg",{className:"w-16 h-16 text-gray-400 dark:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),a.jsxs($,{className:"p-4",children:[a.jsx(W,{level:3,className:"text-lg font-bold mb-2 group-hover:text-primary transition-colors line-clamp-2",children:e!=null&&e.slug?a.jsx(Z,{href:`/venues/${e.slug}`,variant:"ghost",size:"none",children:d}):d}),a.jsx(N,{size:"sm",color:"muted",className:"mb-3 line-clamp-2",children:c}),a.jsx("div",{className:"flex flex-col gap-2 mb-3",children:a.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[a.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),a.jsx(N,{size:"xs",color:"muted",className:"line-clamp-1",children:m})]})}),a.jsx("div",{className:"pt-3 border-t border-gray-200 dark:border-gray-700",children:a.jsxs("div",{className:"flex justify-between items-center text-xs",children:[w>0&&a.jsxs("div",{className:"flex items-center gap-1 text-primary font-medium",children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),a.jsxs(N,{size:"xs",color:"primary",weight:"medium",children:[w," ",o]})]}),f&&a.jsxs("div",{className:"flex items-center gap-1 text-gray-500",children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"})}),a.jsxs(N,{size:"xs",color:"muted",children:[i," ",f]})]})]})})]})]})},se=({id:e,name:t,label:r,type:n="text",placeholder:o,value:s,onChange:i,error:d,helperText:c,className:m})=>{const f=s??"";return a.jsxs("div",{className:l("space-y-2",m),children:[r&&a.jsx(K,{htmlFor:e,className:"block",children:r}),a.jsx(de,{id:e,name:t,type:n,placeholder:o,value:f,onChange:h=>i==null?void 0:i(h.target.value)}),c&&!d&&a.jsx(N,{size:"sm",color:"muted",children:c}),d&&a.jsx(N,{size:"sm",color:"destructive",children:d})]})},oo=({id:e,name:t,label:r,placeholder:n,options:o=[],value:s,onChange:i,error:d,className:c})=>{const m=s??"";return a.jsxs("div",{className:l("space-y-2",c),children:[r&&a.jsx(K,{htmlFor:e,className:"block",children:r}),a.jsxs("select",{id:e,name:t,value:m,onChange:f=>i==null?void 0:i(f.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800",children:[n&&a.jsx("option",{value:"",disabled:!0,children:n}),o.map(f=>a.jsx("option",{value:f.value,children:f.label},f.value))]}),d&&a.jsx(N,{size:"sm",color:"destructive",children:d})]})},so=({id:e,name:t,label:r,placeholder:n,value:o,onChange:s,error:i,rows:d=4,className:c})=>{const m=o??"";return a.jsxs("div",{className:l("space-y-2",c),children:[r&&a.jsx(K,{htmlFor:e,className:"block",children:r}),a.jsx("textarea",{id:e,name:t,placeholder:n,value:m,onChange:f=>s==null?void 0:s(f.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800",rows:d}),i&&a.jsx(N,{size:"sm",color:"destructive",children:i})]})},io=({emailLabel:e,emailPlaceholder:t,passwordLabel:r,passwordPlaceholder:n,loginButtonText:o,className:s})=>{if(!e||e.trim()==="")throw new Error('LoginForm: "emailLabel" prop is required and cannot be empty');if(!t||t.trim()==="")throw new Error('LoginForm: "emailPlaceholder" prop is required and cannot be empty');if(!r||r.trim()==="")throw new Error('LoginForm: "passwordLabel" prop is required and cannot be empty');if(!n||n.trim()==="")throw new Error('LoginForm: "passwordPlaceholder" prop is required and cannot be empty');if(!o||o.trim()==="")throw new Error('LoginForm: "loginButtonText" prop is required and cannot be empty');return a.jsxs("div",{className:l("space-y-4",s),children:[a.jsx(se,{label:e,placeholder:t}),a.jsx(se,{label:r,placeholder:n}),a.jsx(O,{className:"w-full",children:o})]})},lo=({nameLabel:e,namePlaceholder:t,emailLabel:r,emailPlaceholder:n,passwordLabel:o,passwordPlaceholder:s,registerButtonText:i,className:d})=>{if(!e||e.trim()==="")throw new Error('RegisterForm: "nameLabel" prop is required and cannot be empty');if(!t||t.trim()==="")throw new Error('RegisterForm: "namePlaceholder" prop is required and cannot be empty');if(!r||r.trim()==="")throw new Error('RegisterForm: "emailLabel" prop is required and cannot be empty');if(!n||n.trim()==="")throw new Error('RegisterForm: "emailPlaceholder" prop is required and cannot be empty');if(!o||o.trim()==="")throw new Error('RegisterForm: "passwordLabel" prop is required and cannot be empty');if(!s||s.trim()==="")throw new Error('RegisterForm: "passwordPlaceholder" prop is required and cannot be empty');if(!i||i.trim()==="")throw new Error('RegisterForm: "registerButtonText" prop is required and cannot be empty');return a.jsxs("div",{className:l("space-y-4",d),children:[a.jsx(se,{label:e,placeholder:t}),a.jsx(se,{label:r,placeholder:n}),a.jsx(se,{label:o,placeholder:s}),a.jsx(O,{className:"w-full",children:i})]})},co=({name:e,email:t,avatar:r,className:n})=>{if(!e||e.trim()==="")throw new Error('ProfileCard: "name" prop is required and cannot be empty');if(!t||t.trim()==="")throw new Error('ProfileCard: "email" prop is required and cannot be empty');return a.jsx(Y,{className:l("shadow-md",n),children:a.jsxs($,{className:"p-4",children:[r&&a.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full mb-4"}),a.jsx(W,{level:3,className:"text-lg font-semibold mb-2",children:e}),a.jsx(N,{color:"muted",children:t})]})})},uo=({title:e,content:t,className:r})=>{if(!e||e.trim()==="")throw new Error('Dashboard: "title" prop is required and cannot be empty');if(!t||t.trim()==="")throw new Error('Dashboard: "content" prop is required and cannot be empty');return a.jsx(Y,{className:l("shadow-md",r),children:a.jsxs($,{className:"p-6",children:[a.jsx(W,{level:2,className:"mb-4",children:e}),a.jsx(N,{color:"muted",children:t})]})})},mo=({title:e,content:t,className:r})=>{if(!e||e.trim()==="")throw new Error('UserManagement: "title" prop is required and cannot be empty');if(!t||t.trim()==="")throw new Error('UserManagement: "content" prop is required and cannot be empty');return a.jsx(Y,{className:l("shadow-md",r),children:a.jsxs($,{className:"p-6",children:[a.jsx(W,{level:2,className:"mb-4",children:e}),a.jsx(N,{color:"muted",children:t})]})})},fo=({placeholder:e,className:t,onSearch:r,suggestions:n=[],onSuggestionSelect:o})=>{if(!e||e.trim()==="")throw new Error('SearchBar: "placeholder" prop is required and cannot be empty');const[s,i]=y.useState(""),[d,c]=y.useState(!1),[m,f]=y.useState(-1),h=y.useRef(null),w=b=>{i(b),f(-1),r&&r(b)},p=()=>{c(!0)},g=b=>{setTimeout(()=>{var v;(v=h.current)!=null&&v.contains(document.activeElement)||(c(!1),f(-1))},200)},x=b=>{if(n.length!==0)if(b.key==="ArrowDown")b.preventDefault(),f(v=>v<n.length-1?v+1:v);else if(b.key==="ArrowUp")b.preventDefault(),f(v=>v>0?v-1:-1);else if(b.key==="Enter"&&m>=0&&m<n.length){b.preventDefault();const v=n[m];v&&(i(v),w(v),o==null||o(v),c(!1))}else b.key==="Escape"&&(c(!1),f(-1))},S=b=>{i(b),w(b),o==null||o(b),c(!1)};y.useEffect(()=>{const b=v=>{h.current&&!h.current.contains(v.target)&&(c(!1),f(-1))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]);const D=n.filter(b=>b.toLowerCase().includes(s.toLowerCase()));return a.jsxs("div",{ref:h,className:l("relative w-full max-w-sm",t),children:[a.jsx(ge,{placeholder:e,value:s,onChange:w,onFocus:p,onBlur:g,onKeyDown:x,className:l("transition-all duration-200","focus:ring-2 focus:ring-primary focus:ring-offset-2","hover:border-primary/50",d&&"border-primary shadow-sm")}),d&&D.length>0&&a.jsx("div",{className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-lg max-h-60 overflow-auto",children:D.map((b,v)=>a.jsx(O,{type:"button",variant:"ghost",onClick:()=>S(b),className:l("w-full justify-start px-4 py-2 text-sm",v===m&&"bg-accent text-accent-foreground"),children:b},b))})]})},po=({events:e,limit:t,loading:r,title:n,loadingText:o,contentText:s,className:i})=>{if(!Array.isArray(e))throw new Error('TrendingSection: "events" prop is required and must be an array');if(typeof t!="number"||isNaN(t)||t<0)throw new Error('TrendingSection: "limit" prop is required and must be a non-negative number');if(typeof r!="boolean")throw new Error('TrendingSection: "loading" prop is required and must be a boolean');if(!n||n.trim()==="")throw new Error('TrendingSection: "title" prop is required and cannot be empty');if(!o||o.trim()==="")throw new Error('TrendingSection: "loadingText" prop is required and cannot be empty');if(!s||s.trim()==="")throw new Error('TrendingSection: "contentText" prop is required and cannot be empty');return a.jsx(Y,{className:l("shadow-md",i),children:a.jsxs($,{className:"p-6",children:[a.jsx(W,{level:2,className:"mb-4",children:n}),r?a.jsx(N,{color:"muted",children:o}):a.jsx(N,{color:"muted",children:s})]})})},ho=({articles:e,readMoreLabel:t,className:r})=>{if(!t||t.trim()==="")throw new Error('ArticlesSection: "readMoreLabel" prop is required and cannot be empty');return a.jsx("div",{className:l("space-y-6",r),children:e.map(n=>a.jsxs("article",{className:"border rounded-lg p-6 hover:shadow-md transition-shadow",children:[n.image&&a.jsx("div",{className:"w-full h-48 bg-muted rounded-md mb-4"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(W,{level:2,className:"text-xl font-semibold",children:a.jsx(Z,{href:`/news/${n.slug}`,variant:"ghost",size:"none",className:"hover:text-primary",children:n.title})}),n.description&&a.jsx(N,{color:"muted",children:n.description}),n.date&&a.jsx(N,{size:"sm",color:"muted",children:n.date}),a.jsxs(Z,{href:`/news/${n.slug}`,variant:"default",size:"none",className:"inline-flex items-center",children:[t," →"]})]})]},n.slug))})},go=({className:e})=>a.jsx("div",{className:l("w-6 h-6 bg-primary rounded-full flex items-center justify-center",e),children:a.jsx("span",{className:"text-white text-sm",children:"↑"})}),xo=({ariaLabel:e,dataTestId:t,className:r,languages:n,value:o,defaultValue:s,disabled:i,onLanguageChange:d})=>{if(!e||e.trim()==="")throw new Error('LanguageSelector: "ariaLabel" prop is required and cannot be empty');if(!t||t.trim()==="")throw new Error('LanguageSelector: "dataTestId" prop is required and cannot be empty');if(!n||n.length===0)throw new Error('LanguageSelector: "languages" prop is required and cannot be empty');const c=y.useMemo(()=>n,[n]),m=()=>{if(o!==void 0)return o;if(s&&c.some(p=>p.code===s))return s;if(c.length===0)throw new Error("LanguageSelector: languages array must contain at least one option");return c[0].code},[f,h]=y.useState(m);y.useEffect(()=>{o!==void 0&&o!==f&&h(o)},[o,f]);const w=p=>{const g=p.target.value;o===void 0&&h(g),d==null||d(g)};return a.jsx("select",{value:o??f,onChange:w,disabled:i,className:l("px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-sm",i&&"opacity-70 cursor-not-allowed",r),"aria-label":e,"data-testid":t,children:c.map(({code:p,label:g})=>a.jsx("option",{value:p,children:g},p))})},br=({className:e})=>a.jsxs("div",{className:l("bg-white dark:bg-gray-800 rounded-lg shadow-md p-4",e),children:[a.jsx(G,{className:"w-full h-48 mb-4"}),a.jsx(G,{className:"h-6 w-3/4 mb-2"}),a.jsx(G,{className:"h-4 w-full mb-2"}),a.jsx(G,{className:"h-4 w-1/2"})]}),wr=({className:e})=>a.jsxs("div",{className:l("bg-white dark:bg-gray-800 rounded-lg shadow-md p-4",e),children:[a.jsx(G,{className:"w-full h-48 mb-4"}),a.jsx(G,{className:"h-6 w-3/4 mb-2"}),a.jsx(G,{className:"h-4 w-full mb-2"}),a.jsx(G,{className:"h-4 w-1/2"})]});exports.cssVariableColorTokens=ee.cssVariableColorTokens;exports.fontFamily=ee.fontFamily;exports.fontSize=ee.fontSize;exports.fontWeight=ee.fontWeight;exports.letterSpacing=ee.letterSpacing;exports.lineHeight=ee.lineHeight;exports.spacing=ee.spacing;exports.tailwindThemeColors=ee.tailwindThemeColors;exports.borderRadius=Cr.borderRadius;exports.Alert=Qn;exports.ArticlesSection=ho;exports.Badge=_r;exports.Blockquote=Kr;exports.Breadcrumbs=Kn;exports.Button=O;exports.Card=Y;exports.CardContent=$;exports.CardDescription=nt;exports.CardFooter=ot;exports.CardHeader=rt;exports.CardTitle=at;exports.Code=Jr;exports.ConfirmDialog=Mt;exports.Container=jt;exports.CustomDialog=pa;exports.Dashboard=uo;exports.DateRangePicker=Ve;exports.Divider=it;exports.DropdownMenu=ga;exports.DropdownMenuCheckboxItem=zt;exports.DropdownMenuContent=Vt;exports.DropdownMenuGroup=ba;exports.DropdownMenuItem=Wt;exports.DropdownMenuLabel=Lt;exports.DropdownMenuPortal=wa;exports.DropdownMenuRadioGroup=va;exports.DropdownMenuRadioItem=It;exports.DropdownMenuSeparator=Bt;exports.DropdownMenuShortcut=_t;exports.DropdownMenuSub=ya;exports.DropdownMenuSubContent=Ft;exports.DropdownMenuSubTrigger=Ot;exports.DropdownMenuTrigger=xa;exports.EventCard=ao;exports.EventCardSkeleton=br;exports.EventCardSkeletonUI=br;exports.FilterBar=ir;exports.FilterBarCompact=Vn;exports.FilterSelect=ue;exports.Flex=gt;exports.Footer=ra;exports.FormInput=se;exports.FormSelect=oo;exports.FormTextarea=so;exports.Grid=bt;exports.Heading=W;exports.Input=de;exports.Label=K;exports.LanguageSelector=xo;exports.Link=Z;exports.List=to;exports.LoginForm=io;exports.Modal=Nt;exports.ModalClose=na;exports.ModalContent=Me;exports.ModalDescription=De;exports.ModalFooter=Se;exports.ModalHeader=Ce;exports.ModalOverlay=ke;exports.ModalPortal=kt;exports.ModalProvider=ia;exports.ModalTitle=Ee;exports.ModalTrigger=aa;exports.ModeHero=ea;exports.Navbar=ta;exports.NavigationMenu=Yt;exports.NavigationMenuContent=Gt;exports.NavigationMenuIndicator=Xt;exports.NavigationMenuItem=ja;exports.NavigationMenuLink=Na;exports.NavigationMenuList=$t;exports.NavigationMenuTrigger=Ht;exports.NavigationMenuViewport=Te;exports.OverlayBackdrop=Xn;exports.OverlayContainer=Un;exports.OverlayPortal=Gn;exports.Pagination=Zn;exports.Paragraph=Qr;exports.Popover=hr;exports.PopoverAnchor=An;exports.PopoverContent=Ie;exports.PopoverTrigger=gr;exports.PopoverWrapper=Hn;exports.PriceRangeSlider=sr;exports.ProfileCard=co;exports.Progress=Jn;exports.RegisterForm=lo;exports.SearchBar=fo;exports.SearchFilters=Wn;exports.SearchInput=ge;exports.Section=Zr;exports.Select=Kt;exports.SelectContent=Oe;exports.SelectGroup=Ca;exports.SelectItem=Fe;exports.SelectLabel=er;exports.SelectScrollDownButton=Re;exports.SelectScrollUpButton=qe;exports.SelectSeparator=tr;exports.SelectTrigger=Pe;exports.SelectValue=Zt;exports.SimpleModal=ha;exports.Skeleton=G;exports.Stack=yt;exports.Table=eo;exports.Tabs=ka;exports.TabsContent=Jt;exports.TabsList=Ut;exports.TabsTrigger=Qt;exports.Text=N;exports.ThemeSwitch=Ur;exports.Timeline=ro;exports.Toast=We;exports.ToastProvider=Bn;exports.Tooltip=mr;exports.TooltipContent=ze;exports.TooltipProvider=ur;exports.TooltipTrigger=fr;exports.TooltipWrapper=$n;exports.TrendingIcon=go;exports.TrendingSection=po;exports.UserManagement=mo;exports.VenueCard=no;exports.VenueCardSkeleton=wr;exports.VenueCardSkeletonUI=wr;exports.applyDocumentMode=dt;exports.badgeVariants=st;exports.buttonVariants=et;exports.cn=l;exports.containerVariants=vt;exports.debounce=Lr;exports.flexVariants=ht;exports.formatDate=Ke;exports.formatDateTime=zr;exports.formatTime=Ze;exports.generateId=Ir;exports.gridVariants=xt;exports.linkVariants=tt;exports.navigationMenuTriggerStyle=At;exports.popoverContentVariants=xr;exports.stackVariants=wt;exports.throttle=Br;exports.toastVariants=dr;exports.tooltipContentVariants=pr;exports.useConfirmDialog=oa;exports.useDateRange=Rn;exports.useModal=sa;exports.useModalContext=Et;exports.useModalManager=Ct;exports.usePriceRange=On;exports.useSearch=Ma;exports.useToast=_n;exports.useToastContext=cr;exports.withModal=da;