@vasf/ragnar-core 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +541 -2
- package/dist/index.js +42200 -6443
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,541 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),Rn=require("react"),Cn=require("@radix-ui/react-accordion"),f=require("lucide-react"),En=require("clsx"),Tn=require("tailwind-merge"),H=require("class-variance-authority"),kn=require("@radix-ui/react-alert-dialog"),Te=require("@radix-ui/react-slot"),In=require("@radix-ui/react-aspect-ratio"),An=require("@radix-ui/react-avatar"),Dn=require("react-day-picker"),Pn=require("embla-carousel-react"),Mn=require("@radix-ui/react-checkbox"),dt=require("prismjs"),Ln=require("@radix-ui/react-collapsible"),K=require("cmdk"),_n=require("@radix-ui/react-dialog"),On=require("@radix-ui/react-context-menu"),xe=require("date-fns"),Fn=require("@radix-ui/react-popover"),zn=require("@radix-ui/react-select"),Bn=require("@radix-ui/react-dropdown-menu"),Hn=require("@radix-ui/react-hover-card"),Un=require("@radix-ui/react-menubar"),Gn=require("@radix-ui/react-navigation-menu"),$n=require("@radix-ui/react-progress"),Vn=require("@radix-ui/react-radio-group"),ct=require("@tiptap/react"),qn=require("@tiptap/starter-kit"),Kn=require("@tiptap/extension-placeholder"),Xn=require("@radix-ui/react-toggle"),Yn=require("@radix-ui/react-separator"),Zn=require("@radix-ui/react-scroll-area"),Wn=require("@radix-ui/react-slider"),Jn=require("sonner"),Qn=require("@radix-ui/react-switch"),eo=require("@radix-ui/react-tabs"),to=require("@radix-ui/react-toggle-group"),ao=require("@radix-ui/react-tooltip");function F(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const s=F(Rn),se=F(Cn),q=F(kn),ro=F(In),ce=F(An),Le=F(Mn),de=F(Ln),M=F(_n),_=F(On),Ne=F(Fn),B=F(zn),O=F(Bn),ke=F(Hn),D=F(Un),X=F(Gn),_e=F($n),ve=F(Vn),mt=F(Xn),pt=F(Yn),re=F(Zn),pe=F(Wn),Oe=F(Qn),oe=F(eo),Ie=F(to),we=F(ao);function o(...t){return Tn.twMerge(En.clsx(t))}const so=se.Root,ft=s.forwardRef(({className:t,...a},r)=>e.jsx(se.Item,{ref:r,className:o("border-b border-[var(--container-border-alt)]",t),...a}));ft.displayName="AccordionItem";const gt=s.forwardRef(({className:t,children:a,...r},n)=>e.jsx(se.Header,{className:"flex",children:e.jsxs(se.Trigger,{ref:n,className:o("font-[var(--font-heading)] font-weight-bold text-[var(--container-fg)] flex flex-1 items-center justify-between py-4 transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...r,children:[a,e.jsx(f.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));gt.displayName=se.Trigger.displayName;const xt=s.forwardRef(({className:t,children:a,...r},n)=>e.jsx(se.Content,{ref:n,className:"overflow-hidden text-[var(--container-fg-alt)] text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:e.jsx("div",{className:o("pb-4 pt-0",t),children:a})}));xt.displayName=se.Content.displayName;const no=H.cva("relative w-full rounded-[var(--curves-xl)] border p-[var(--spacing-xs)] [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",success:"border-green-500/50 text-green-700 dark:text-green-400 [&>svg]:text-green-600",warning:"border-yellow-500/50 text-yellow-700 dark:text-yellow-400 [&>svg]:text-yellow-600",info:"border-blue-500/50 text-blue-700 dark:text-blue-400 [&>svg]:text-blue-600"}},defaultVariants:{variant:"default"}}),bt=s.forwardRef(({className:t,variant:a,...r},n)=>e.jsx("div",{ref:n,role:"alert",className:o(no({variant:a}),t),...r}));bt.displayName="Alert";const ht=s.forwardRef(({className:t,...a},r)=>e.jsx("h5",{ref:r,className:o("font-heading mb-1 font-medium leading-none tracking-tight",t),...a}));ht.displayName="AlertTitle";const Nt=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("text-sm [&_p]:leading-relaxed",t),...a}));Nt.displayName="AlertDescription";const ee=H.cva("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",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Q=s.forwardRef(({className:t,variant:a,size:r,asChild:n=!1,...i},u)=>{const c=n?Te.Slot:"button";return e.jsx(c,{className:o(ee({variant:a,size:r,className:t})),ref:u,...i})});Q.displayName="Button";const oo=q.Root,io=q.Trigger,vt=q.Portal,ze=s.forwardRef(({className:t,...a},r)=>e.jsx(q.Overlay,{className:o("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",t),...a,ref:r}));ze.displayName=q.Overlay.displayName;const wt=s.forwardRef(({className:t,...a},r)=>e.jsxs(vt,{children:[e.jsx(ze,{}),e.jsx(q.Content,{ref:r,className:o("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",t),...a})]}));wt.displayName=q.Content.displayName;const yt=({className:t,...a})=>e.jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",t),...a});yt.displayName="AlertDialogHeader";const jt=({className:t,...a})=>e.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});jt.displayName="AlertDialogFooter";const St=s.forwardRef(({className:t,...a},r)=>e.jsx(q.Title,{ref:r,className:o("font-heading text-lg font-semibold",t),...a}));St.displayName=q.Title.displayName;const Rt=s.forwardRef(({className:t,...a},r)=>e.jsx(q.Description,{ref:r,className:o("text-sm text-muted-foreground",t),...a}));Rt.displayName=q.Description.displayName;const Ct=s.forwardRef(({className:t,...a},r)=>e.jsx(q.Action,{ref:r,className:o(ee(),t),...a}));Ct.displayName=q.Action.displayName;const Et=s.forwardRef(({className:t,...a},r)=>e.jsx(q.Cancel,{ref:r,className:o(ee({variant:"outline"}),"mt-2 sm:mt-0",t),...a}));Et.displayName=q.Cancel.displayName;const lo=ro.Root,Tt=s.forwardRef(({className:t,...a},r)=>e.jsx(ce.Root,{ref:r,className:o("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...a}));Tt.displayName=ce.Root.displayName;const kt=s.forwardRef(({className:t,...a},r)=>e.jsx(ce.Image,{ref:r,className:o("aspect-square h-full w-full",t),...a}));kt.displayName=ce.Image.displayName;const It=s.forwardRef(({className:t,...a},r)=>e.jsx(ce.Fallback,{ref:r,className:o("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...a}));It.displayName=ce.Fallback.displayName;const At=H.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 Fe({className:t,variant:a,...r}){return e.jsx("div",{className:o(At({variant:a}),t),...r})}const Dt=H.cva("relative flex items-center gap-4 w-full px-4 py-3 text-sm",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive text-destructive-foreground",warning:"bg-yellow-500 text-white",success:"bg-green-500 text-white",info:"bg-blue-500 text-white"},position:{top:"fixed top-0 left-0 right-0 z-50",bottom:"fixed bottom-0 left-0 right-0 z-50",inline:"relative"}},defaultVariants:{variant:"default",position:"inline"}}),Pt=s.forwardRef(({className:t,variant:a,position:r,icon:n,action:i,dismissible:u=!1,onDismiss:c,children:p,...m},d)=>e.jsxs("div",{ref:d,role:"banner",className:o(Dt({variant:a,position:r}),t),...m,children:[n&&e.jsx("span",{className:"shrink-0",children:n}),e.jsx("div",{className:"flex-1",children:p}),i&&e.jsx("div",{className:"shrink-0",children:i}),u&&e.jsx("button",{type:"button",onClick:c,className:"shrink-0 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","aria-label":"Dismiss banner",children:e.jsx(f.X,{className:"h-4 w-4"})})]}));Pt.displayName="Banner";const Mt=s.forwardRef(({...t},a)=>e.jsx("nav",{ref:a,"aria-label":"breadcrumb",...t}));Mt.displayName="Breadcrumb";const Lt=s.forwardRef(({className:t,...a},r)=>e.jsx("ol",{ref:r,className:o("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...a}));Lt.displayName="BreadcrumbList";const _t=s.forwardRef(({className:t,...a},r)=>e.jsx("li",{ref:r,className:o("inline-flex items-center gap-1.5",t),...a}));_t.displayName="BreadcrumbItem";const Ot=s.forwardRef(({asChild:t,className:a,...r},n)=>{const i=t?Te.Slot:"a";return e.jsx(i,{ref:n,className:o("transition-colors hover:text-foreground",a),...r})});Ot.displayName="BreadcrumbLink";const Ft=s.forwardRef(({className:t,...a},r)=>e.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:o("font-normal text-foreground",t),...a}));Ft.displayName="BreadcrumbPage";const zt=({children:t,className:a,...r})=>e.jsx("li",{role:"presentation","aria-hidden":"true",className:o("[&>svg]:h-3.5 [&>svg]:w-3.5",a),...r,children:t??e.jsx(f.ChevronRight,{})});zt.displayName="BreadcrumbSeparator";const Bt=({className:t,...a})=>e.jsxs("span",{role:"presentation","aria-hidden":"true",className:o("flex h-9 w-9 items-center justify-center",t),...a,children:[e.jsx(f.MoreHorizontal,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"More"})]});Bt.displayName="BreadcrumbEllipsis";function ye({className:t,classNames:a,showOutsideDays:r=!0,...n}){return e.jsx(Dn.DayPicker,{showOutsideDays:r,className:o("p-3",t),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-4",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",button_previous:o(ee({variant:"outline"}),"absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),button_next:o(ee({variant:"outline"}),"absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day_button:o(ee({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...a},components:{Chevron:({orientation:i})=>i==="left"?e.jsx(f.ChevronLeft,{className:"h-4 w-4"}):e.jsx(f.ChevronRight,{className:"h-4 w-4"})},...n})}ye.displayName="Calendar";const Ht=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("rounded-lg border bg-card text-card-foreground shadow-sm",t),...a}));Ht.displayName="Card";const Ut=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("flex flex-col space-y-1.5 p-6",t),...a}));Ut.displayName="CardHeader";const Gt=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("font-heading text-2xl font-semibold leading-none tracking-tight",t),...a}));Gt.displayName="CardTitle";const $t=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("text-sm text-muted-foreground",t),...a}));$t.displayName="CardDescription";const Vt=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("p-6 pt-0",t),...a}));Vt.displayName="CardContent";const qt=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("flex items-center p-6 pt-0",t),...a}));qt.displayName="CardFooter";const Kt=s.createContext(null);function Ae(){const t=s.useContext(Kt);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}const Xt=s.forwardRef(({orientation:t="horizontal",opts:a,setApi:r,plugins:n,className:i,children:u,...c},p)=>{const[m,d]=Pn({...a,axis:t==="horizontal"?"x":"y"},n),[l,g]=s.useState(!1),[b,N]=s.useState(!1),S=s.useCallback(h=>{h&&(g(h.canScrollPrev()),N(h.canScrollNext()))},[]),y=s.useCallback(()=>{d==null||d.scrollPrev()},[d]),R=s.useCallback(()=>{d==null||d.scrollNext()},[d]),x=s.useCallback(h=>{h.key==="ArrowLeft"?(h.preventDefault(),y()):h.key==="ArrowRight"&&(h.preventDefault(),R())},[y,R]);return s.useEffect(()=>{!d||!r||r(d)},[d,r]),s.useEffect(()=>{if(d)return S(d),d.on("reInit",S),d.on("select",S),()=>{d==null||d.off("select",S)}},[d,S]),e.jsx(Kt.Provider,{value:{carouselRef:m,api:d,opts:a,orientation:t||((a==null?void 0:a.axis)==="y"?"vertical":"horizontal"),scrollPrev:y,scrollNext:R,canScrollPrev:l,canScrollNext:b},children:e.jsx("div",{ref:p,onKeyDownCapture:x,className:o("relative",i),role:"region","aria-roledescription":"carousel",...c,children:u})})});Xt.displayName="Carousel";const Yt=s.forwardRef(({className:t,...a},r)=>{const{carouselRef:n,orientation:i}=Ae();return e.jsx("div",{ref:n,className:"overflow-hidden",children:e.jsx("div",{ref:r,className:o("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...a})})});Yt.displayName="CarouselContent";const Zt=s.forwardRef(({className:t,...a},r)=>{const{orientation:n}=Ae();return e.jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:o("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",t),...a})});Zt.displayName="CarouselItem";const Wt=s.forwardRef(({className:t,variant:a="outline",size:r="icon",...n},i)=>{const{orientation:u,scrollPrev:c,canScrollPrev:p}=Ae();return e.jsxs(Q,{ref:i,variant:a,size:r,className:o("absolute h-8 w-8 rounded-full",u==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!p,onClick:c,...n,children:[e.jsx(f.ArrowLeft,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Previous slide"})]})});Wt.displayName="CarouselPrevious";const Jt=s.forwardRef(({className:t,variant:a="outline",size:r="icon",...n},i)=>{const{orientation:u,scrollNext:c,canScrollNext:p}=Ae();return e.jsxs(Q,{ref:i,variant:a,size:r,className:o("absolute h-8 w-8 rounded-full",u==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!p,onClick:c,...n,children:[e.jsx(f.ArrowRight,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Next slide"})]})});Jt.displayName="CarouselNext";const Qt=s.forwardRef(({className:t,...a},r)=>e.jsx(Le.Root,{ref:r,className:o("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...a,children:e.jsx(Le.Indicator,{className:o("flex items-center justify-center text-current"),children:e.jsx(f.Check,{className:"h-4 w-4"})})}));Qt.displayName=Le.Root.displayName;Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var a=t.languages.extend("typescript",{});delete a["class-name"],t.languages.typescript["class-name"].inside=a,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:a}}}}),t.languages.ts=t.languages.typescript})(Prism);(function(t){var a=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,n=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(m,d){return m=m.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return n}).replace(/<SPREAD>/g,function(){return i}),RegExp(m,d)}i=u(i).source,t.languages.jsx=t.languages.extend("markup",a),t.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=a.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var c=function(m){return m?typeof m=="string"?m:typeof m.content=="string"?m.content:m.content.map(c).join(""):""},p=function(m){for(var d=[],l=0;l<m.length;l++){var g=m[l],b=!1;if(typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?d.length>0&&d[d.length-1].tagName===c(g.content[0].content[1])&&d.pop():g.content[g.content.length-1].content==="/>"||d.push({tagName:c(g.content[0].content[1]),openedBraces:0}):d.length>0&&g.type==="punctuation"&&g.content==="{"?d[d.length-1].openedBraces++:d.length>0&&d[d.length-1].openedBraces>0&&g.type==="punctuation"&&g.content==="}"?d[d.length-1].openedBraces--:b=!0),(b||typeof g=="string")&&d.length>0&&d[d.length-1].openedBraces===0){var N=c(g);l<m.length-1&&(typeof m[l+1]=="string"||m[l+1].type==="plain-text")&&(N+=c(m[l+1]),m.splice(l+1,1)),l>0&&(typeof m[l-1]=="string"||m[l-1].type==="plain-text")&&(N=c(m[l-1])+N,m.splice(l-1,1),l--),m[l]=new t.Token("plain-text",N,null,N)}g.content&&typeof g.content!="string"&&p(g.content)}};t.hooks.add("after-tokenize",function(m){m.language!=="jsx"&&m.language!=="tsx"||p(m.tokens)})})(Prism);(function(t){var a=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",a),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var r=t.languages.tsx.tag;r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(Prism);(function(t){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+a.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(t){var a="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:r,environment:{pattern:RegExp("\\$"+a),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+a),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+a),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+a),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=t.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],u=n.variable[1].inside,c=0;c<i.length;c++)u[i[c]]=t.languages.bash[i[c]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(t){var a=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,n={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[n,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:n.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:n.inside}],keyword:a,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":n,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:n.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:n.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return a.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];(function(t){for(var a=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,r=0;r<2;r++)a=a.replace(/<self>/g,function(){return a});a=a.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var a=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(/<inner>/g,function(){return a}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var n=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return n}),u=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+u+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+u+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(n),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+u+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(n),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(l){["url","bold","italic","strike","code-snippet"].forEach(function(g){l!==g&&(t.languages.markdown[l].inside.content.inside[g]=t.languages.markdown[g])})}),t.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function g(b){if(!(!b||typeof b=="string"))for(var N=0,S=b.length;N<S;N++){var y=b[N];if(y.type!=="code"){g(y.content);continue}var R=y.content[1],x=y.content[3];if(R&&x&&R.type==="code-language"&&x.type==="code-block"&&typeof R.content=="string"){var h=R.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");h=(/[a-z][\w-]*/i.exec(h)||[""])[0].toLowerCase();var j="language-"+h;x.alias?typeof x.alias=="string"?x.alias=[x.alias,j]:x.alias.push(j):x.alias=[j]}}}g(l.tokens)}),t.hooks.add("wrap",function(l){if(l.type==="code-block"){for(var g="",b=0,N=l.classes.length;b<N;b++){var S=l.classes[b],y=/language-(.+)/.exec(S);if(y){g=y[1];break}}var R=t.languages[g];if(R)l.content=t.highlight(d(l.content),R,g);else if(g&&g!=="none"&&t.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);l.attributes.id=x,t.plugins.autoloader.loadLanguages(g,function(){var h=document.getElementById(x);h&&(h.innerHTML=t.highlight(h.textContent,t.languages[g],g))})}}});var c=RegExp(t.languages.markup.tag.pattern.source,"gi"),p={amp:"&",lt:"<",gt:">",quot:'"'},m=String.fromCodePoint||String.fromCharCode;function d(l){var g=l.replace(c,"");return g=g.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(b,N){if(N=N.toLowerCase(),N[0]==="#"){var S;return N[1]==="x"?S=parseInt(N.slice(2),16):S=Number(N.slice(1)),m(S)}else{var y=p[N];return y||b}}),g}t.languages.md=t.languages.markdown})(Prism);(function(t){var a=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,n="(?:"+r.source+"(?:[ ]+"+a.source+")?|"+a.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(p,m){m=(m||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return n}).replace(/<<value>>/g,function(){return p});return RegExp(d,m)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return n})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return n}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+u+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(u),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:a,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(Prism);const ea=s.forwardRef(({className:t,code:a,language:r="text",showLineNumbers:n=!1,showCopyButton:i=!0,filename:u,highlightLines:c=[],...p},m)=>{const[d,l]=s.useState(!1),[g,b]=s.useState("");s.useEffect(()=>{if(r!=="text"){const y=dt.languages[r];b(y?dt.highlight(a,y,r):a)}else b(a)},[a,r]);const N=async()=>{await navigator.clipboard.writeText(a),l(!0),setTimeout(()=>l(!1),2e3)},S=g.split(`
|
|
2
|
-
`);return e.jsxs("div",{ref:m,className:o("relative rounded-lg border bg-muted/50 text-sm",t),...p,children:[(u||i)&&e.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[u&&e.jsx("span",{className:"text-xs text-muted-foreground",children:u}),i&&e.jsx("button",{type:"button",onClick:N,className:"ml-auto flex items-center gap-1 rounded px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:d?e.jsxs(e.Fragment,{children:[e.jsx(f.Check,{className:"h-3 w-3"}),"Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(f.Copy,{className:"h-3 w-3"}),"Copy"]})})]}),e.jsx("div",{className:"overflow-x-auto p-4",children:e.jsx("pre",{className:"font-mono text-sm",children:e.jsx("code",{children:S.map((y,R)=>e.jsxs("div",{className:o("leading-6",c.includes(R+1)&&"bg-yellow-500/20 -mx-4 px-4"),children:[n&&e.jsx("span",{className:"mr-4 inline-block w-8 select-none text-right text-muted-foreground",children:R+1}),e.jsx("span",{dangerouslySetInnerHTML:{__html:y||" "}})]},R))})})})]})});ea.displayName="CodeBlock";const co=de.Root,uo=de.CollapsibleTrigger,mo=de.CollapsibleContent,ta=M.Root,po=M.Trigger,aa=M.Portal,fo=M.Close,Be=s.forwardRef(({className:t,...a},r)=>e.jsx(M.Overlay,{ref:r,className:o("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",t),...a}));Be.displayName=M.Overlay.displayName;const He=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(aa,{children:[e.jsx(Be,{}),e.jsxs(M.Content,{ref:n,className:o("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",t),...r,children:[a,e.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:[e.jsx(f.X,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));He.displayName=M.Content.displayName;const ra=({className:t,...a})=>e.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",t),...a});ra.displayName="DialogHeader";const sa=({className:t,...a})=>e.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});sa.displayName="DialogFooter";const na=s.forwardRef(({className:t,...a},r)=>e.jsx(M.Title,{ref:r,className:o("font-heading text-lg font-semibold leading-none tracking-tight",t),...a}));na.displayName=M.Title.displayName;const oa=s.forwardRef(({className:t,...a},r)=>e.jsx(M.Description,{ref:r,className:o("text-sm text-muted-foreground",t),...a}));oa.displayName=M.Description.displayName;const De=s.forwardRef(({className:t,...a},r)=>e.jsx(K.Command,{ref:r,className:o("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...a}));De.displayName=K.Command.displayName;const go=({children:t,...a})=>e.jsx(ta,{...a,children:e.jsx(He,{className:"overflow-hidden p-0 shadow-lg",children:e.jsx(De,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t})})}),Ue=s.forwardRef(({className:t,...a},r)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(f.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(K.Command.Input,{ref:r,className:o("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...a})]}));Ue.displayName=K.Command.Input.displayName;const Ge=s.forwardRef(({className:t,...a},r)=>e.jsx(K.Command.List,{ref:r,className:o("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...a}));Ge.displayName=K.Command.List.displayName;const $e=s.forwardRef((t,a)=>e.jsx(K.Command.Empty,{ref:a,className:"py-6 text-center text-sm",...t}));$e.displayName=K.Command.Empty.displayName;const Ve=s.forwardRef(({className:t,...a},r)=>e.jsx(K.Command.Group,{ref:r,className:o("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...a}));Ve.displayName=K.Command.Group.displayName;const ia=s.forwardRef(({className:t,...a},r)=>e.jsx(K.Command.Separator,{ref:r,className:o("-mx-1 h-px bg-border",t),...a}));ia.displayName=K.Command.Separator.displayName;const qe=s.forwardRef(({className:t,...a},r)=>e.jsx(K.Command.Item,{ref:r,className:o("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...a}));qe.displayName=K.Command.Item.displayName;const la=({className:t,...a})=>e.jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",t),...a});la.displayName="CommandShortcut";const xo=_.Root,bo=_.Trigger,ho=_.Group,No=_.Portal,vo=_.Sub,wo=_.RadioGroup,da=s.forwardRef(({className:t,inset:a,children:r,...n},i)=>e.jsxs(_.SubTrigger,{ref:i,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",a&&"pl-8",t),...n,children:[r,e.jsx(f.ChevronRight,{className:"ml-auto h-4 w-4"})]}));da.displayName=_.SubTrigger.displayName;const ca=s.forwardRef(({className:t,...a},r)=>e.jsx(_.SubContent,{ref:r,className:o("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",t),...a}));ca.displayName=_.SubContent.displayName;const ua=s.forwardRef(({className:t,...a},r)=>e.jsx(_.Portal,{children:e.jsx(_.Content,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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",t),...a})}));ua.displayName=_.Content.displayName;const ma=s.forwardRef(({className:t,inset:a,...r},n)=>e.jsx(_.Item,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",t),...r}));ma.displayName=_.Item.displayName;const pa=s.forwardRef(({className:t,children:a,checked:r,...n},i)=>e.jsxs(_.CheckboxItem,{ref:i,className:o("relative flex 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",t),checked:r,...n,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(_.ItemIndicator,{children:e.jsx(f.Check,{className:"h-4 w-4"})})}),a]}));pa.displayName=_.CheckboxItem.displayName;const fa=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(_.RadioItem,{ref:n,className:o("relative flex 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",t),...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(_.ItemIndicator,{children:e.jsx(f.Circle,{className:"h-2 w-2 fill-current"})})}),a]}));fa.displayName=_.RadioItem.displayName;const ga=s.forwardRef(({className:t,inset:a,...r},n)=>e.jsx(_.Label,{ref:n,className:o("px-2 py-1.5 text-sm font-semibold text-foreground",a&&"pl-8",t),...r}));ga.displayName=_.Label.displayName;const xa=s.forwardRef(({className:t,...a},r)=>e.jsx(_.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-border",t),...a}));xa.displayName=_.Separator.displayName;const ba=({className:t,...a})=>e.jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",t),...a});ba.displayName="ContextMenuShortcut";const yo=[{type:"visa",name:"Visa",pattern:/^4/,cvvLength:3,gaps:[4,8,12],lengths:[16,18,19]},{type:"mastercard",name:"Mastercard",pattern:/^(5[1-5]|2[2-7])/,cvvLength:3,gaps:[4,8,12],lengths:[16]},{type:"amex",name:"American Express",pattern:/^3[47]/,cvvLength:4,gaps:[4,10],lengths:[15]},{type:"discover",name:"Discover",pattern:/^(6011|65|64[4-9])/,cvvLength:3,gaps:[4,8,12],lengths:[16,19]},{type:"diners",name:"Diners Club",pattern:/^(36|38|30[0-5])/,cvvLength:3,gaps:[4,10],lengths:[14,16,19]},{type:"jcb",name:"JCB",pattern:/^35/,cvvLength:3,gaps:[4,8,12],lengths:[16,17,18,19]},{type:"unionpay",name:"UnionPay",pattern:/^62/,cvvLength:3,gaps:[4,8,12],lengths:[16,17,18,19]}];function ha(t){const a=t.replace(/\s/g,"");return yo.find(r=>r.pattern.test(a))}function jo(t,a=[4,8,12]){const r=t.replace(/\D/g,"");let n="",i=0;for(let u=0;u<r.length;u++)i<a.length&&u===a[i]&&(n+=" ",i++),n+=r[u];return n}function So(t){const a=t.replace(/\D/g,"");return a.length>=2?`${a.slice(0,2)}/${a.slice(2,4)}`:a}const Ro=({type:t})=>{const a="h-6 w-6";switch(t){case"visa":return e.jsx("span",{className:o(a,"text-blue-600 font-bold text-xs"),children:"VISA"});case"mastercard":return e.jsxs("div",{className:"flex -space-x-1",children:[e.jsx("div",{className:"h-4 w-4 rounded-full bg-red-500"}),e.jsx("div",{className:"h-4 w-4 rounded-full bg-yellow-500 opacity-80"})]});case"amex":return e.jsx("span",{className:o(a,"text-blue-500 font-bold text-xs"),children:"AMEX"});case"discover":return e.jsx("span",{className:o(a,"text-orange-500 font-bold text-xs"),children:"DISC"});default:return e.jsx(f.CreditCard,{className:o(a,"text-muted-foreground")})}},Ke=s.forwardRef(({className:t,onChange:a,...r},n)=>{const[i,u]=s.useState(""),[c,p]=s.useState("unknown"),m=d=>{const l=d.target.value.replace(/\D/g,""),g=ha(l),b=(g==null?void 0:g.lengths[g.lengths.length-1])||19;if(l.length<=b){const N=jo(l,g==null?void 0:g.gaps);u(N);const S=(g==null?void 0:g.type)||"unknown";p(S),a==null||a(l,S)}};return e.jsxs("div",{className:"relative",children:[e.jsx(f.CreditCard,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-number",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-12 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:n,value:i,onChange:m,placeholder:"1234 5678 9012 3456",...r}),e.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:e.jsx(Ro,{type:c})})]})});Ke.displayName="CreditCardNumberInput";const Xe=s.forwardRef(({className:t,onChange:a,...r},n)=>{const[i,u]=s.useState(""),c=p=>{const m=p.target.value.replace(/\D/g,"");if(m.length<=4){const d=So(m);u(d),a==null||a(m)}};return e.jsxs("div",{className:"relative",children:[e.jsx(f.Calendar,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-exp",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:n,value:i,onChange:c,placeholder:"MM/YY",...r})]})});Xe.displayName="CreditCardExpiryInput";const Ye=s.forwardRef(({className:t,cardType:a="unknown",onChange:r,...n},i)=>{const[u,c]=s.useState(""),p=a==="amex"?4:3,m=d=>{const l=d.target.value.replace(/\D/g,"");l.length<=p&&(c(l),r==null||r(l))};return e.jsxs("div",{className:"relative",children:[e.jsx(f.Lock,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-csc",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:i,value:u,onChange:m,placeholder:a==="amex"?"1234":"123",maxLength:p,...n})]})});Ye.displayName="CreditCardCVVInput";const Na=s.forwardRef(({className:t,onCardChange:a,disabled:r},n)=>{const[i,u]=s.useState(""),[c,p]=s.useState(""),[m,d]=s.useState(""),[l,g]=s.useState("unknown");return s.useEffect(()=>{const b=ha(i),N=b?b.lengths.includes(i.length):i.length>=13&&i.length<=19,S=c.length===4,y=l==="amex"?m.length===4:m.length===3;a==null||a({number:i,expiry:c,cvv:m,cardType:l,isValid:N&&S&&y})},[i,c,m,l,a]),e.jsxs("div",{ref:n,className:o("space-y-3",t),children:[e.jsx(Ke,{onChange:(b,N)=>{u(b),g(N)},disabled:r}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(Xe,{onChange:p,disabled:r}),e.jsx(Ye,{cardType:l,onChange:d,disabled:r})]})]})});Na.displayName="CreditCardInput";const je=Ne.Root,Se=Ne.Trigger,ue=s.forwardRef(({className:t,align:a="center",sideOffset:r=4,...n},i)=>e.jsx(Ne.Portal,{children:e.jsx(Ne.Content,{ref:i,align:a,sideOffset:r,className:o("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",t),...n})}));ue.displayName=Ne.Content.displayName;const va=s.forwardRef(({value:t,onChange:a,placeholder:r="Pick a date",disabled:n=!1,className:i,dateFormat:u="PPP"},c)=>{const[p,m]=s.useState(!1);return e.jsxs(je,{open:p,onOpenChange:m,children:[e.jsx(Se,{asChild:!0,children:e.jsxs(Q,{ref:c,variant:"outline",disabled:n,className:o("w-full justify-start text-left font-normal",!t&&"text-muted-foreground",i),children:[e.jsx(f.Calendar,{className:"mr-2 h-4 w-4"}),t?xe.format(t,u):e.jsx("span",{children:r})]})}),e.jsx(ue,{className:"w-auto p-0",align:"start",children:e.jsx(ye,{mode:"single",selected:t,onSelect:d=>{a==null||a(d),m(!1)},initialFocus:!0})})]})});va.displayName="DatePicker";const wa=s.forwardRef(({value:t,onChange:a,placeholder:r="Pick a date range",disabled:n=!1,className:i,dateFormat:u="LLL dd, y"},c)=>{const[p,m]=s.useState(!1);return e.jsxs(je,{open:p,onOpenChange:m,children:[e.jsx(Se,{asChild:!0,children:e.jsxs(Q,{ref:c,variant:"outline",disabled:n,className:o("w-full justify-start text-left font-normal",!(t!=null&&t.from)&&"text-muted-foreground",i),children:[e.jsx(f.Calendar,{className:"mr-2 h-4 w-4"}),t!=null&&t.from?t.to?e.jsxs(e.Fragment,{children:[xe.format(t.from,u)," -"," ",xe.format(t.to,u)]}):xe.format(t.from,u):e.jsx("span",{children:r})]})}),e.jsx(ue,{className:"w-auto p-0",align:"start",children:e.jsx(ye,{mode:"range",defaultMonth:t==null?void 0:t.from,selected:t,onSelect:d=>{a==null||a(d)},numberOfMonths:2,initialFocus:!0})})]})});wa.displayName="DateRangePicker";const fe=B.Root,Co=B.Group,ge=B.Value,ie=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(B.Trigger,{ref:n,className:o("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",t),...r,children:[a,e.jsx(B.Icon,{asChild:!0,children:e.jsx(f.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ie.displayName=B.Trigger.displayName;const Ze=s.forwardRef(({className:t,...a},r)=>e.jsx(B.ScrollUpButton,{ref:r,className:o("flex cursor-default items-center justify-center py-1",t),...a,children:e.jsx(f.ChevronUp,{className:"h-4 w-4"})}));Ze.displayName=B.ScrollUpButton.displayName;const We=s.forwardRef(({className:t,...a},r)=>e.jsx(B.ScrollDownButton,{ref:r,className:o("flex cursor-default items-center justify-center py-1",t),...a,children:e.jsx(f.ChevronDown,{className:"h-4 w-4"})}));We.displayName=B.ScrollDownButton.displayName;const le=s.forwardRef(({className:t,children:a,position:r="popper",...n},i)=>e.jsx(B.Portal,{children:e.jsxs(B.Content,{ref:i,className:o("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",t),position:r,...n,children:[e.jsx(Ze,{}),e.jsx(B.Viewport,{className:o("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),e.jsx(We,{})]})}));le.displayName=B.Content.displayName;const ya=s.forwardRef(({className:t,...a},r)=>e.jsx(B.Label,{ref:r,className:o("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...a}));ya.displayName=B.Label.displayName;const ae=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(B.Item,{ref:n,className:o("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",t),...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(B.ItemIndicator,{children:e.jsx(f.Check,{className:"h-4 w-4"})})}),e.jsx(B.ItemText,{children:a})]}));ae.displayName=B.Item.displayName;const ja=s.forwardRef(({className:t,...a},r)=>e.jsx(B.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",t),...a}));ja.displayName=B.Separator.displayName;const Sa=s.forwardRef(({value:t,onChange:a,placeholder:r="Pick date and time",disabled:n=!1,className:i,showSeconds:u=!1,use24Hour:c=!1},p)=>{const[m,d]=s.useState(!1),[l,g]=s.useState(t);s.useEffect(()=>{g(t)},[t]);const b=c?Array.from({length:24},(w,v)=>v):Array.from({length:12},(w,v)=>v+1),N=Array.from({length:60},(w,v)=>v),S=Array.from({length:60},(w,v)=>v),y=w=>{if(w){const v=new Date(w);l&&(v.setHours(l.getHours()),v.setMinutes(l.getMinutes()),v.setSeconds(l.getSeconds())),g(v),a==null||a(v)}},R=(w,v)=>{const I=l?new Date(l):new Date;if(w==="hour"){let C=parseInt(v);if(!c){const E=I.getHours()>=12;E&&C!==12&&(C+=12),!E&&C===12&&(C=0)}I.setHours(C)}else if(w==="minute")I.setMinutes(parseInt(v));else if(w==="second")I.setSeconds(parseInt(v));else if(w==="ampm"){const C=I.getHours();v==="PM"&&C<12?I.setHours(C+12):v==="AM"&&C>=12&&I.setHours(C-12)}g(I),a==null||a(I)},x=()=>{if(!l)return"";const w=l.getHours();return c?w.toString():(w%12||12).toString()},h=()=>l&&l.getHours()>=12?"PM":"AM",j=u?c?"PPP HH:mm:ss":"PPP hh:mm:ss a":c?"PPP HH:mm":"PPP hh:mm a";return e.jsxs(je,{open:m,onOpenChange:d,children:[e.jsx(Se,{asChild:!0,children:e.jsxs(Q,{ref:p,variant:"outline",disabled:n,className:o("w-full justify-start text-left font-normal",!l&&"text-muted-foreground",i),children:[e.jsx(f.Calendar,{className:"mr-2 h-4 w-4"}),l?xe.format(l,j):e.jsx("span",{children:r})]})}),e.jsxs(ue,{className:"w-auto p-0",align:"start",children:[e.jsx(ye,{mode:"single",selected:l,onSelect:y,initialFocus:!0}),e.jsx("div",{className:"border-t p-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f.Clock,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs(fe,{value:x(),onValueChange:w=>R("hour",w),children:[e.jsx(ie,{className:"w-[70px]",children:e.jsx(ge,{placeholder:"HH"})}),e.jsx(le,{children:b.map(w=>e.jsx(ae,{value:w.toString(),children:w.toString().padStart(2,"0")},w))})]}),e.jsx("span",{className:"text-muted-foreground",children:":"}),e.jsxs(fe,{value:(l==null?void 0:l.getMinutes().toString())??"",onValueChange:w=>R("minute",w),children:[e.jsx(ie,{className:"w-[70px]",children:e.jsx(ge,{placeholder:"MM"})}),e.jsx(le,{children:N.map(w=>e.jsx(ae,{value:w.toString(),children:w.toString().padStart(2,"0")},w))})]}),u&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:":"}),e.jsxs(fe,{value:(l==null?void 0:l.getSeconds().toString())??"",onValueChange:w=>R("second",w),children:[e.jsx(ie,{className:"w-[70px]",children:e.jsx(ge,{placeholder:"SS"})}),e.jsx(le,{children:S.map(w=>e.jsx(ae,{value:w.toString(),children:w.toString().padStart(2,"0")},w))})]})]}),!c&&e.jsxs(fe,{value:h(),onValueChange:w=>R("ampm",w),children:[e.jsx(ie,{className:"w-[70px]",children:e.jsx(ge,{})}),e.jsxs(le,{children:[e.jsx(ae,{value:"AM",children:"AM"}),e.jsx(ae,{value:"PM",children:"PM"})]})]})]})})]})]})});Sa.displayName="DateTimePicker";const Ra={USD:{code:"USD",symbol:"$",name:"US Dollar",decimals:2},EUR:{code:"EUR",symbol:"€",name:"Euro",decimals:2},GBP:{code:"GBP",symbol:"£",name:"British Pound",decimals:2},JPY:{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},CNY:{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},KRW:{code:"KRW",symbol:"₩",name:"South Korean Won",decimals:0},INR:{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},BRL:{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2},CAD:{code:"CAD",symbol:"CA$",name:"Canadian Dollar",decimals:2},AUD:{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},CHF:{code:"CHF",symbol:"Fr.",name:"Swiss Franc",decimals:2}};function ut(t,a,r,n){const i=t.toFixed(a).split(".");return i[0]=i[0].replace(/\B(?=(\d{3})+(?!\d))/g,r),i.join(n)}function Eo(t,a,r){if(!t)return;const n=t.replace(new RegExp(`\\${a}`,"g"),"").replace(r,"."),i=parseFloat(n);return isNaN(i)?void 0:i}const Re=s.forwardRef(({className:t,value:a,onChange:r,decimals:n=2,min:i,max:u,prefix:c,suffix:p,currency:m,unit:d,unitPosition:l="suffix",thousandsSeparator:g=",",decimalSeparator:b=".",allowNegative:N=!1,disabled:S,...y},R)=>{const x=m?Ra[m]:void 0,h=(x==null?void 0:x.decimals)??n,j=c??((x==null?void 0:x.symbol)&&x.symbol),w=p??(d&&l==="suffix"?d:void 0),v=d&&l==="prefix"?d:void 0,[I,C]=s.useState(""),[E,A]=s.useState(!1);s.useEffect(()=>{a!==void 0&&!E&&C(ut(a,h,g,b))},[a,h,g,b,E]);const U=G=>{let z=G.target.value;const W=N?new RegExp(`[^0-9\\${b}-]`,"g"):new RegExp(`[^0-9\\${b}]`,"g");z=z.replace(W,"");const Z=z.split(b);if(Z.length>2&&(z=Z[0]+b+Z.slice(1).join("")),N){const $=z.startsWith("-");z=z.replace(/-/g,""),$&&(z="-"+z)}Z.length===2&&Z[1].length>h&&(z=Z[0]+b+Z[1].slice(0,h)),C(z);const J=Eo(z,g,b);if(J!==void 0){let $=J;i!==void 0&&$<i&&($=i),u!==void 0&&$>u&&($=u),r==null||r($)}else r==null||r(void 0)},k=()=>{A(!0),a!==void 0&&C(a.toString().replace(".",b))},L=()=>{A(!1),a!==void 0&&C(ut(a,h,g,b))};return e.jsxs("div",{className:"relative flex items-center",children:[(j||v)&&e.jsxs("span",{className:"absolute left-3 text-muted-foreground text-sm",children:[j,v]}),e.jsx("input",{type:"text",inputMode:"decimal",className:o("flex h-10 w-full rounded-md border border-input bg-background py-2 text-sm text-right ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",(j||v)&&"pl-10",w&&"pr-12",!j&&!v&&"px-3",!w&&"pr-3",t),ref:R,value:I,onChange:U,onFocus:k,onBlur:L,disabled:S,...y}),w&&e.jsx("span",{className:"absolute right-3 text-muted-foreground text-sm",children:w})]})});Re.displayName="DecimalInput";const Ca=s.forwardRef(({currency:t,...a},r)=>e.jsx(Re,{ref:r,currency:t,...a}));Ca.displayName="CurrencyInput";const Ea=s.forwardRef(({min:t=0,max:a=100,decimals:r=1,...n},i)=>e.jsx(Re,{ref:i,suffix:"%",min:t,max:a,decimals:r,...n}));Ea.displayName="PercentageInput";const Ta=s.forwardRef(({unit:t,unitPosition:a="suffix",...r},n)=>e.jsx(Re,{ref:n,unit:t,unitPosition:a,...r}));Ta.displayName="UnitInput";const To=H.cva("fixed z-50 bg-background shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{left:"inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0",right:"inset-y-0 right-0 h-full w-3/4 max-w-sm border-l data-[state=closed]:translate-x-full data-[state=open]:translate-x-0",top:"inset-x-0 top-0 h-auto max-h-[80vh] border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0",bottom:"inset-x-0 bottom-0 h-auto max-h-[80vh] border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0"}},defaultVariants:{side:"right"}}),ka=s.createContext(void 0);function Ce(){const t=s.useContext(ka);if(!t)throw new Error("Drawer components must be used within a Drawer");return t}function ko({children:t,open:a,defaultOpen:r=!1,onOpenChange:n}){const[i,u]=s.useState(r),c=a??i,p=n??u;return e.jsx(ka.Provider,{value:{open:c,onOpenChange:p},children:t})}const Ia=s.forwardRef(({onClick:t,...a},r)=>{const{onOpenChange:n}=Ce();return e.jsx("button",{ref:r,onClick:i=>{n(!0),t==null||t(i)},...a})});Ia.displayName="DrawerTrigger";const Aa=s.forwardRef(({onClick:t,...a},r)=>{const{onOpenChange:n}=Ce();return e.jsx("button",{ref:r,onClick:i=>{n(!1),t==null||t(i)},...a})});Aa.displayName="DrawerClose";const Da=({children:t})=>{const{open:a}=Ce();return a?e.jsx(e.Fragment,{children:t}):null},Je=s.forwardRef(({className:t,onClick:a,...r},n)=>{const{open:i,onOpenChange:u}=Ce();return e.jsx("div",{ref:n,className:o("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",i?"opacity-100":"pointer-events-none opacity-0",t),onClick:c=>{c.target===c.currentTarget&&u(!1),a==null||a(c)},...r})});Je.displayName="DrawerOverlay";const Pa=s.forwardRef(({className:t,side:a,children:r,...n},i)=>{const{open:u,onOpenChange:c}=Ce();return s.useEffect(()=>{const p=m=>{m.key==="Escape"&&c(!1)};return u&&(document.addEventListener("keydown",p),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",p),document.body.style.overflow=""}},[u,c]),e.jsxs(Da,{children:[e.jsx(Je,{}),e.jsx("div",{ref:i,"data-state":u?"open":"closed",className:o(To({side:a}),t),...n,children:r})]})});Pa.displayName="DrawerContent";const Ma=({className:t,...a})=>e.jsx("div",{className:o("flex flex-col space-y-2 p-4",t),...a});Ma.displayName="DrawerHeader";const La=({className:t,...a})=>e.jsx("div",{className:o("mt-auto flex flex-col gap-2 p-4",t),...a});La.displayName="DrawerFooter";const _a=s.forwardRef(({className:t,...a},r)=>e.jsx("h2",{ref:r,className:o("font-heading text-lg font-semibold text-foreground",t),...a}));_a.displayName="DrawerTitle";const Oa=s.forwardRef(({className:t,...a},r)=>e.jsx("p",{ref:r,className:o("text-sm text-muted-foreground",t),...a}));Oa.displayName="DrawerDescription";const Fa=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("mx-auto mt-4 h-1.5 w-12 rounded-full bg-muted",t),...a}));Fa.displayName="DrawerHandle";const Io=O.Root,Ao=O.Trigger,Do=O.Group,Po=O.Portal,Mo=O.Sub,Lo=O.RadioGroup,za=s.forwardRef(({className:t,inset:a,children:r,...n},i)=>e.jsxs(O.SubTrigger,{ref:i,className:o("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a&&"pl-8",t),...n,children:[r,e.jsx(f.ChevronRight,{className:"ml-auto"})]}));za.displayName=O.SubTrigger.displayName;const Ba=s.forwardRef(({className:t,...a},r)=>e.jsx(O.SubContent,{ref:r,className:o("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",t),...a}));Ba.displayName=O.SubContent.displayName;const Ha=s.forwardRef(({className:t,sideOffset:a=4,...r},n)=>e.jsx(O.Portal,{children:e.jsx(O.Content,{ref:n,sideOffset:a,className:o("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",t),...r})}));Ha.displayName=O.Content.displayName;const Ua=s.forwardRef(({className:t,inset:a,...r},n)=>e.jsx(O.Item,{ref:n,className:o("relative flex cursor-default select-none items-center gap-2 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a&&"pl-8",t),...r}));Ua.displayName=O.Item.displayName;const Ga=s.forwardRef(({className:t,children:a,checked:r,...n},i)=>e.jsxs(O.CheckboxItem,{ref:i,className:o("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",t),checked:r,...n,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(O.ItemIndicator,{children:e.jsx(f.Check,{className:"h-4 w-4"})})}),a]}));Ga.displayName=O.CheckboxItem.displayName;const $a=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(O.RadioItem,{ref:n,className:o("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",t),...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(O.ItemIndicator,{children:e.jsx(f.Circle,{className:"h-2 w-2 fill-current"})})}),a]}));$a.displayName=O.RadioItem.displayName;const Va=s.forwardRef(({className:t,inset:a,...r},n)=>e.jsx(O.Label,{ref:n,className:o("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",t),...r}));Va.displayName=O.Label.displayName;const qa=s.forwardRef(({className:t,...a},r)=>e.jsx(O.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",t),...a}));qa.displayName=O.Separator.displayName;const Ka=({className:t,...a})=>e.jsx("span",{className:o("ml-auto text-xs tracking-widest opacity-60",t),...a});Ka.displayName="DropdownMenuShortcut";const _o=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Xa=s.forwardRef(({className:t,showValidation:a=!1,onValidationChange:r,onChange:n,...i},u)=>{const[c,p]=s.useState(null),[m,d]=s.useState(!1),l=N=>{const S=N.target.value;if(S){const y=_o.test(S);p(y),r==null||r(y)}else p(null),r==null||r(!1);n==null||n(N)},g=N=>{var S;d(!0),(S=i.onBlur)==null||S.call(i,N)},b=a&&m&&c!==null;return e.jsxs("div",{className:"relative",children:[e.jsx(f.Mail,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"email",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",b&&c&&"border-green-500 focus-visible:ring-green-500",b&&!c&&"border-destructive focus-visible:ring-destructive",t),ref:u,onChange:l,onBlur:g,...i}),b&&e.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:c?e.jsx(f.CheckCircle2,{className:"h-4 w-4 text-green-500"}):e.jsx(f.AlertCircle,{className:"h-4 w-4 text-destructive"})})]})});Xa.displayName="EmailInput";const Ya=s.forwardRef(({className:t,...a},r)=>e.jsx("fieldset",{ref:r,className:o("space-y-4 rounded-lg border p-4",t),...a}));Ya.displayName="Fieldset";const Za=s.forwardRef(({className:t,...a},r)=>e.jsx("legend",{ref:r,className:o("px-2 text-sm font-medium leading-none",t),...a}));Za.displayName="FieldsetLegend";const Wa=s.forwardRef(({className:t,...a},r)=>e.jsx("p",{ref:r,className:o("text-sm text-muted-foreground",t),...a}));Wa.displayName="FieldsetDescription";function Oo(t,a){typeof t=="function"?t(a):t&&(t.current=a)}function Ja(t){const a=t.type.toLowerCase();return a.startsWith("image/")?"image":a.startsWith("video/")?"video":a.startsWith("audio/")?"audio":a.includes("pdf")||a.includes("document")||a.includes("text")||a.includes("spreadsheet")||a.includes("presentation")?"document":a.includes("zip")||a.includes("rar")||a.includes("tar")||a.includes("gzip")||a.includes("7z")?"archive":"other"}function Ee(t){if(t===0)return"0 B";const a=1024,r=["B","KB","MB","GB"],n=Math.floor(Math.log(t)/Math.log(a));return`${parseFloat((t/Math.pow(a,n)).toFixed(1))} ${r[n]}`}const Fo=({type:t})=>{const a="h-8 w-8";switch(t){case"image":return e.jsx(f.Image,{className:o(a,"text-green-500")});case"document":return e.jsx(f.FileText,{className:o(a,"text-blue-500")});case"video":return e.jsx(f.Film,{className:o(a,"text-purple-500")});case"audio":return e.jsx(f.Music,{className:o(a,"text-pink-500")});case"archive":return e.jsx(f.Archive,{className:o(a,"text-yellow-500")});default:return e.jsx(f.File,{className:o(a,"text-gray-500")})}},Pe=s.forwardRef(({className:t,value:a=[],onChange:r,maxFiles:n=1,maxSize:i,accept:u,showPreview:c=!0,variant:p="default",dragActiveText:m="Drop files here",dragInactiveText:d="Drag & drop files here, or click to select",disabled:l,...g},b)=>{const[N,S]=s.useState([]),[y,R]=s.useState(!1),[x,h]=s.useState(null),j=s.useRef(null);s.useEffect(()=>{const k=a.map(L=>({file:L,type:Ja(L),preview:L.type.startsWith("image/")?URL.createObjectURL(L):void 0}));return S(k),()=>{k.forEach(L=>{L.preview&&URL.revokeObjectURL(L.preview)})}},[a]);const w=k=>{if(!k)return;h(null);const L=Array.from(k),G=[];for(const W of L){if(i&&W.size>i){h(`File "${W.name}" exceeds maximum size of ${Ee(i)}`);continue}G.push(W)}const z=n===1?G.slice(0,1):[...a,...G].slice(0,n);r==null||r(z)},v=k=>{w(k.target.files),j.current&&(j.current.value="")},I=k=>{k.preventDefault(),R(!0)},C=k=>{k.preventDefault(),R(!1)},E=k=>{k.preventDefault(),R(!1),l||w(k.dataTransfer.files)},A=k=>{const L=[...a];L.splice(k,1),r==null||r(L)},U=k=>{j.current=k,Oo(b,k)};return p==="dropzone"?e.jsxs("div",{className:o("space-y-3",t),children:[e.jsxs("div",{className:o("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 transition-colors",y&&"border-primary bg-primary/5",!y&&"border-muted-foreground/25 hover:border-primary/50",l&&"cursor-not-allowed opacity-50"),onDragOver:I,onDragLeave:C,onDrop:E,onClick:()=>{var k;return!l&&((k=j.current)==null?void 0:k.click())},children:[e.jsx("input",{type:"file",ref:U,className:"sr-only",accept:u,multiple:n>1,onChange:v,disabled:l,...g}),e.jsx(f.Upload,{className:o("h-10 w-10 mb-3",y?"text-primary":"text-muted-foreground")}),e.jsx("p",{className:"text-sm text-center",children:y?m:d}),i&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Max file size: ",Ee(i)]}),n>1&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Max ",n," files"]})]}),x&&e.jsx("p",{className:"text-sm text-destructive",children:x}),c&&N.length>0&&e.jsx("div",{className:"space-y-2",children:N.map((k,L)=>e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[k.preview?e.jsx("img",{src:k.preview,alt:k.file.name,className:"h-12 w-12 rounded object-cover"}):e.jsx(Fo,{type:k.type}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:k.file.name}),e.jsx("p",{className:"text-xs text-muted-foreground",children:Ee(k.file.size)})]}),e.jsx("button",{type:"button",className:"p-1 hover:bg-background rounded",onClick:G=>{G.stopPropagation(),A(L)},children:e.jsx(f.X,{className:"h-4 w-4"})})]},L))})]}):e.jsxs("div",{className:o("space-y-2",t),children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"file",ref:U,className:"sr-only",accept:u,multiple:n>1,onChange:v,disabled:l,...g}),e.jsxs("button",{type:"button",className:o("flex h-10 items-center gap-2 rounded-md border border-input bg-background px-4 py-2 text-sm ring-offset-background hover:bg-accent",l&&"cursor-not-allowed opacity-50"),onClick:()=>{var k;return!l&&((k=j.current)==null?void 0:k.click())},disabled:l,children:[e.jsx(f.Upload,{className:"h-4 w-4"}),"Choose ",n>1?"files":"file"]}),N.length>0&&!c&&e.jsxs("span",{className:"flex items-center text-sm text-muted-foreground",children:[N.length," file",N.length>1?"s":""," selected"]})]}),x&&e.jsx("p",{className:"text-sm text-destructive",children:x}),c&&N.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:N.map((k,L)=>e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-full border bg-muted/50 text-sm",children:[k.preview?e.jsx("img",{src:k.preview,alt:k.file.name,className:"h-5 w-5 rounded object-cover"}):e.jsx(f.File,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[150px] truncate",children:k.file.name}),e.jsx("button",{type:"button",className:"p-0.5 hover:bg-background rounded-full",onClick:()=>A(L),children:e.jsx(f.X,{className:"h-3 w-3"})})]},L))})]})});Pe.displayName="FileInput";const Qa=s.forwardRef(({acceptedFormats:t=["image/jpeg","image/png","image/gif","image/webp"],...a},r)=>e.jsx(Pe,{ref:r,accept:t.join(","),...a}));Qa.displayName="ImageInput";const er=s.forwardRef(({acceptedFormats:t=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/plain"],...a},r)=>e.jsx(Pe,{ref:r,accept:t.join(","),...a}));er.displayName="DocumentInput";const tr=H.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{required:{true:"after:ml-0.5 after:text-destructive after:content-['*']",false:""}},defaultVariants:{required:!1}}),ar=s.forwardRef(({className:t,required:a,optional:r,hint:n,children:i,...u},c)=>e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("label",{ref:c,className:o(tr({required:a}),t),...u,children:i}),r&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"}),n&&e.jsx("span",{className:"text-xs text-muted-foreground",children:n})]}));ar.displayName="FormLabel";const rr=s.forwardRef(({className:t,...a},r)=>e.jsx("p",{ref:r,className:o("text-sm text-muted-foreground",t),...a}));rr.displayName="FormDescription";const sr=s.forwardRef(({className:t,error:a=!0,...r},n)=>e.jsx("p",{ref:n,className:o("text-sm",a?"text-destructive":"text-muted-foreground",t),...r}));sr.displayName="FormMessage";const zo=ke.Root,Bo=ke.Trigger,nr=s.forwardRef(({className:t,align:a="center",sideOffset:r=4,...n},i)=>e.jsx(ke.Content,{ref:i,align:a,sideOffset:r,className:o("z-50 w-64 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",t),...n}));nr.displayName=ke.Content.displayName;const or=s.forwardRef(({className:t,type:a,...r},n)=>e.jsx("input",{type:a,className:o("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...r}));or.displayName="Input";const ir=s.forwardRef(({className:t,length:a=6,onChange:r,onComplete:n,mask:i=!1,autoFocus:u=!0,disabled:c,...p},m)=>{const[d,l]=s.useState(Array(a).fill("")),g=s.useRef([]),b=R=>{var x;R>=0&&R<a&&((x=g.current[R])==null||x.focus())},N=(R,x)=>{const h=x.slice(-1);if(h&&!/^\d$/.test(h))return;const j=[...d];j[R]=h,l(j);const w=j.join("");r==null||r(w),h&&R<a-1&&b(R+1),j.every(v=>v!=="")&&w.length===a&&(n==null||n(w))},S=(R,x)=>{if(x.key==="Backspace"){x.preventDefault();const h=[...d];d[R]?(h[R]="",l(h),r==null||r(h.join(""))):R>0&&(h[R-1]="",l(h),r==null||r(h.join("")),b(R-1))}else x.key==="ArrowLeft"?(x.preventDefault(),b(R-1)):x.key==="ArrowRight"&&(x.preventDefault(),b(R+1))},y=R=>{R.preventDefault();const h=R.clipboardData.getData("text/plain").slice(0,a).replace(/\D/g,"").split("");if(h.length===0)return;const j=[...d];h.forEach((v,I)=>{I<a&&(j[I]=v)}),l(j),r==null||r(j.join(""));const w=Math.min(h.length,a-1);b(w),j.every(v=>v!=="")&&j.join("").length===a&&(n==null||n(j.join("")))};return s.useEffect(()=>{u&&b(0)},[u]),e.jsx("div",{ref:m,className:o("flex items-center gap-2",t),...p,children:d.map((R,x)=>e.jsxs(s.Fragment,{children:[e.jsx("input",{ref:h=>{g.current[x]=h},type:i?"password":"text",inputMode:"numeric",autoComplete:"one-time-code",pattern:"\\d{1}",maxLength:1,value:R,onChange:h=>N(x,h.target.value),onKeyDown:h=>S(x,h),onPaste:y,onFocus:h=>h.target.select(),disabled:c,className:o("h-10 w-10 rounded-md border border-input bg-background text-center text-sm font-medium shadow-sm transition-all","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",R&&"border-primary")}),x===Math.floor(a/2)-1&&a>3&&e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(f.Dot,{className:"h-4 w-4 text-muted-foreground"})})]},x))})});ir.displayName="InputOTP";const lr=s.forwardRef(({className:t,index:a,char:r,hasFakeCaret:n,isActive:i,...u},c)=>e.jsxs("div",{className:o("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",i&&"z-10 ring-2 ring-ring ring-offset-background",t),children:[e.jsx("input",{ref:c,className:"absolute inset-0 h-full w-full bg-transparent text-center outline-none",...u}),r,n&&e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]}));lr.displayName="InputOTPSlot";const dr=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("flex items-center",t),...a}));dr.displayName="InputOTPGroup";const cr=s.forwardRef(({...t},a)=>e.jsx("div",{ref:a,role:"separator",...t,children:e.jsx(f.Dot,{className:"h-4 w-4 text-muted-foreground"})}));cr.displayName="InputOTPSeparator";const ur=H.cva("inline-flex items-center justify-center rounded border font-mono text-sm font-medium",{variants:{variant:{default:"border-border bg-muted text-muted-foreground shadow-[0_2px_0_0] shadow-border",outline:"border-border bg-background text-foreground",ghost:"border-transparent bg-transparent text-muted-foreground"},size:{sm:"h-5 min-w-5 px-1 text-xs",default:"h-6 min-w-6 px-1.5",lg:"h-7 min-w-7 px-2 text-base"}},defaultVariants:{variant:"default",size:"default"}}),mr={cmd:"⌘",command:"⌘",ctrl:"⌃",control:"⌃",alt:"⌥",option:"⌥",opt:"⌥",shift:"⇧",meta:"⌘",super:"⌘",win:"⊞",windows:"⊞",enter:"↵",return:"↵",tab:"⇥",escape:"⎋",esc:"⎋",backspace:"⌫",delete:"⌦",del:"⌦",space:"␣",spacebar:"␣",up:"↑",down:"↓",left:"←",right:"→",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→",capslock:"⇪",caps:"⇪",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘",insert:"⎀"};function pr(t){const a=t.toLowerCase().trim();return mr[a]||t.toUpperCase()}const Qe=s.forwardRef(({className:t,variant:a,size:r,keys:n,children:i,...u},c)=>{let p=i;return n&&(p=(Array.isArray(n)?n:n.split("+")).map((d,l)=>e.jsxs(s.Fragment,{children:[l>0&&e.jsx("span",{className:"mx-0.5 text-muted-foreground/50",children:"+"}),e.jsx("span",{children:pr(d)})]},l))),e.jsx("kbd",{ref:c,className:o(ur({variant:a,size:r}),t),...u,children:p})});Qe.displayName="Kbd";const fr=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("inline-flex items-center gap-1",t),...a}));fr.displayName="KbdGroup";const Ho={copy:["cmd","c"],paste:["cmd","v"],cut:["cmd","x"],undo:["cmd","z"],redo:["cmd","shift","z"],save:["cmd","s"],selectAll:["cmd","a"],find:["cmd","f"],new:["cmd","n"],open:["cmd","o"],close:["cmd","w"],refresh:["cmd","r"],print:["cmd","p"],bold:["cmd","b"],italic:["cmd","i"],underline:["cmd","u"]},gr=s.forwardRef(({shortcut:t,forceCtrl:a,variant:r,size:n,className:i,...u},c)=>{const p=Ho[t],m=typeof navigator<"u"?navigator.platform.toLowerCase().includes("mac"):!0,d=p.map(l=>(l==="cmd"||l==="command"||l==="meta")&&!m||a&&(l==="cmd"||l==="command"||l==="meta")?"ctrl":l);return e.jsx(Qe,{ref:c,keys:d,variant:r,size:n,className:i,...u})});gr.displayName="Shortcut";const xr=H.cva("inline-flex items-center gap-1 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 underline-offset-4 hover:underline",muted:"text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",nav:"text-foreground/60 hover:text-foreground",destructive:"text-destructive underline-offset-4 hover:underline",unstyled:""},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),br=s.forwardRef(({className:t,variant:a,size:r,asChild:n=!1,external:i=!1,showExternalIcon:u=!0,children:c,...p},m)=>{const d=n?Te.Slot:"a",l=i?{target:"_blank",rel:"noopener noreferrer"}:{};return e.jsxs(d,{ref:m,className:o(xr({variant:a,size:r}),t),...l,...p,children:[c,i&&u&&e.jsx(f.ExternalLink,{className:"h-3 w-3 shrink-0"})]})});br.displayName="Link";const be=H.cva("relative overflow-hidden",{variants:{ratio:{auto:"",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]",wide:"aspect-[21/9]"},rounded:{none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{ratio:"auto",rounded:"md"}}),hr=s.forwardRef(({className:t,ratio:a,rounded:r,fallback:n,alt:i,...u},c)=>{const[p,m]=s.useState(!1),[d,l]=s.useState(!0);return p&&n?e.jsx("div",{className:o(be({ratio:a,rounded:r}),"flex items-center justify-center bg-muted",t),children:n}):e.jsxs("div",{className:o(be({ratio:a,rounded:r}),t),children:[d&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted",children:e.jsx(f.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),e.jsx("img",{ref:c,alt:i,className:o("h-full w-full object-cover",r&&be({rounded:r})),onError:()=>m(!0),onLoad:()=>l(!1),...u})]})});hr.displayName="Image";const Nr=s.forwardRef(({className:t,ratio:a="video",rounded:r,showControls:n=!0,...i},u)=>{const c=s.useRef(null),[p,m]=s.useState(!1),[d,l]=s.useState(!1),[g,b]=s.useState(0);s.useImperativeHandle(u,()=>c.current);const N=()=>{c.current&&(p?c.current.pause():c.current.play(),m(!p))},S=()=>{c.current&&(c.current.muted=!d,l(!d))},y=()=>{if(c.current){const x=c.current.currentTime/c.current.duration*100;b(x)}},R=()=>{c.current&&(document.fullscreenElement?document.exitFullscreen():c.current.requestFullscreen())};return e.jsxs("div",{className:o(be({ratio:a,rounded:r}),"group",t),children:[e.jsx("video",{ref:c,className:"h-full w-full object-cover",onTimeUpdate:y,onPlay:()=>m(!0),onPause:()=>m(!1),...i}),n&&e.jsxs("div",{className:"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/60 to-transparent p-4 opacity-0 transition-opacity group-hover:opacity-100",children:[e.jsx("div",{className:"mb-2 h-1 w-full overflow-hidden rounded-full bg-white/30",children:e.jsx("div",{className:"h-full bg-white transition-all",style:{width:`${g}%`}})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:N,className:"rounded-full p-1 text-white hover:bg-white/20",children:p?e.jsx(f.Pause,{className:"h-5 w-5"}):e.jsx(f.Play,{className:"h-5 w-5"})}),e.jsx("button",{type:"button",onClick:S,className:"rounded-full p-1 text-white hover:bg-white/20",children:d?e.jsx(f.VolumeX,{className:"h-5 w-5"}):e.jsx(f.Volume2,{className:"h-5 w-5"})}),e.jsx("div",{className:"flex-1"}),e.jsx("button",{type:"button",onClick:R,className:"rounded-full p-1 text-white hover:bg-white/20",children:e.jsx(f.Maximize,{className:"h-5 w-5"})})]})]})]})});Nr.displayName="Video";const Uo=D.Menu,Go=D.Group,$o=D.Portal,Vo=D.Sub,qo=D.RadioGroup,vr=s.forwardRef(({className:t,...a},r)=>e.jsx(D.Root,{ref:r,className:o("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",t),...a}));vr.displayName=D.Root.displayName;const wr=s.forwardRef(({className:t,...a},r)=>e.jsx(D.Trigger,{ref:r,className:o("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...a}));wr.displayName=D.Trigger.displayName;const yr=s.forwardRef(({className:t,inset:a,children:r,...n},i)=>e.jsxs(D.SubTrigger,{ref:i,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",a&&"pl-8",t),...n,children:[r,e.jsx(f.ChevronRight,{className:"ml-auto h-4 w-4"})]}));yr.displayName=D.SubTrigger.displayName;const jr=s.forwardRef(({className:t,...a},r)=>e.jsx(D.SubContent,{ref:r,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",t),...a}));jr.displayName=D.SubContent.displayName;const Sr=s.forwardRef(({className:t,align:a="start",alignOffset:r=-4,sideOffset:n=8,...i},u)=>e.jsx(D.Portal,{children:e.jsx(D.Content,{ref:u,align:a,alignOffset:r,sideOffset:n,className:o("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",t),...i})}));Sr.displayName=D.Content.displayName;const Rr=s.forwardRef(({className:t,inset:a,...r},n)=>e.jsx(D.Item,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",t),...r}));Rr.displayName=D.Item.displayName;const Cr=s.forwardRef(({className:t,children:a,checked:r,...n},i)=>e.jsxs(D.CheckboxItem,{ref:i,className:o("relative flex 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",t),checked:r,...n,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(D.ItemIndicator,{children:e.jsx(f.Check,{className:"h-4 w-4"})})}),a]}));Cr.displayName=D.CheckboxItem.displayName;const Er=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(D.RadioItem,{ref:n,className:o("relative flex 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",t),...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(D.ItemIndicator,{children:e.jsx(f.Circle,{className:"h-2 w-2 fill-current"})})}),a]}));Er.displayName=D.RadioItem.displayName;const Tr=s.forwardRef(({className:t,inset:a,...r},n)=>e.jsx(D.Label,{ref:n,className:o("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",t),...r}));Tr.displayName=D.Label.displayName;const kr=s.forwardRef(({className:t,...a},r)=>e.jsx(D.Separator,{ref:r,className:o("-mx-1 my-1 h-px bg-muted",t),...a}));kr.displayName=D.Separator.displayName;const Ir=({className:t,...a})=>e.jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",t),...a});Ir.displayName="MenubarShortcut";const Ar=s.forwardRef(({options:t,value:a=[],onChange:r,placeholder:n="Select items...",searchPlaceholder:i="Search...",emptyMessage:u="No items found.",disabled:c=!1,className:p,maxDisplayedItems:m=3},d)=>{const[l,g]=s.useState(!1),b=x=>{const h=a.includes(x)?a.filter(j=>j!==x):[...a,x];r==null||r(h)},N=(x,h)=>{h.stopPropagation(),r==null||r(a.filter(j=>j!==x))},S=t.filter(x=>a.includes(x.value)),y=S.slice(0,m),R=S.length-m;return e.jsxs(je,{open:l,onOpenChange:g,children:[e.jsx(Se,{asChild:!0,children:e.jsxs("button",{ref:d,type:"button",role:"combobox","aria-expanded":l,disabled:c,className:o("flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",p),children:[e.jsx("div",{className:"flex flex-1 flex-wrap gap-1",children:S.length===0?e.jsx("span",{className:"text-muted-foreground",children:n}):e.jsxs(e.Fragment,{children:[y.map(x=>e.jsxs(Fe,{variant:"secondary",className:"gap-1 pr-1",children:[x.label,e.jsx("button",{type:"button",className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",onMouseDown:h=>h.preventDefault(),onClick:h=>N(x.value,h),children:e.jsx(f.X,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},x.value)),R>0&&e.jsxs(Fe,{variant:"secondary",children:["+",R," more"]})]})}),e.jsx(f.ChevronDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(ue,{className:"w-full min-w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:e.jsxs(De,{children:[e.jsx(Ue,{placeholder:i}),e.jsxs(Ge,{children:[e.jsx($e,{children:u}),e.jsx(Ve,{children:t.map(x=>e.jsxs(qe,{value:x.value,disabled:x.disabled,onSelect:()=>b(x.value),children:[e.jsx("div",{className:o("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",a.includes(x.value)?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(f.Check,{className:"h-4 w-4"})}),x.label]},x.value))})]})]})})]})});Ar.displayName="MultiSelect";const Dr=M.Root,Pr=M.Trigger,Ko=M.Close,Mr=M.Portal,et=s.forwardRef(({className:t,...a},r)=>e.jsx(M.Overlay,{className:o("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",t),...a,ref:r}));et.displayName=M.Overlay.displayName;const Xo=H.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),tt=s.forwardRef(({side:t="right",className:a,children:r,...n},i)=>e.jsxs(Mr,{children:[e.jsx(et,{}),e.jsxs(M.Content,{ref:i,className:o(Xo({side:t}),a),...n,children:[e.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-secondary",children:[e.jsx(f.X,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));tt.displayName=M.Content.displayName;const Lr=({className:t,...a})=>e.jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",t),...a});Lr.displayName="SheetHeader";const _r=({className:t,...a})=>e.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});_r.displayName="SheetFooter";const Or=s.forwardRef(({className:t,...a},r)=>e.jsx(M.Title,{ref:r,className:o("font-heading text-lg font-semibold text-foreground",t),...a}));Or.displayName=M.Title.displayName;const Fr=s.forwardRef(({className:t,...a},r)=>e.jsx(M.Description,{ref:r,className:o("text-sm text-muted-foreground",t),...a}));Fr.displayName=M.Description.displayName;const zr=s.createContext({collapsed:!1,setCollapsed:()=>{},isMobile:!1}),me=()=>{const t=s.useContext(zr);if(!t)throw new Error("useNavigationDrawer must be used within a NavigationDrawerProvider");return t},Yo=({children:t,defaultCollapsed:a=!1})=>{const[r,n]=s.useState(a),[i,u]=s.useState(!1);return s.useEffect(()=>{const c=()=>u(window.innerWidth<768);return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),e.jsx(zr.Provider,{value:{collapsed:r,setCollapsed:n,isMobile:i},children:t})},Br=s.forwardRef(({className:t,children:a,...r},n)=>{const{collapsed:i,isMobile:u}=me();return u?e.jsxs(Dr,{children:[e.jsx(Pr,{asChild:!0,children:e.jsx(Q,{variant:"ghost",size:"icon",className:"md:hidden",children:e.jsx(f.Menu,{className:"h-5 w-5"})})}),e.jsx(tt,{side:"left",className:"w-64 p-0",children:e.jsx("div",{className:"flex h-full flex-col",children:a})})]}):e.jsx("aside",{ref:n,"data-collapsed":i,className:o("flex h-screen flex-col border-r bg-background transition-all duration-300",i?"w-16":"w-64",t),...r,children:a})});Br.displayName="NavigationDrawer";const Hr=s.forwardRef(({className:t,children:a,...r},n)=>{const{collapsed:i}=me();return e.jsx("div",{ref:n,className:o("flex h-14 items-center border-b px-4",i&&"justify-center px-2",t),...r,children:a})});Hr.displayName="NavigationDrawerHeader";const Ur=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("flex-1 overflow-y-auto p-2",t),...a}));Ur.displayName="NavigationDrawerContent";const Gr=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("border-t p-2",t),...a}));Gr.displayName="NavigationDrawerFooter";const $r=s.forwardRef(({className:t,...a},r)=>{const{collapsed:n,setCollapsed:i,isMobile:u}=me();return u?null:e.jsx(Q,{ref:r,variant:"ghost",size:"icon",className:o("h-8 w-8",t),onClick:()=>i(!n),...a,children:n?e.jsx(f.ChevronRight,{className:"h-4 w-4"}):e.jsx(f.ChevronLeft,{className:"h-4 w-4"})})});$r.displayName="NavigationDrawerToggle";const Zo=H.cva("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{active:{true:"bg-accent text-accent-foreground",false:"text-muted-foreground"}},defaultVariants:{active:!1}}),Vr=s.forwardRef(({className:t,icon:a,active:r,asChild:n,children:i,...u},c)=>{const{collapsed:p}=me(),m=n?Te.Slot:"a";return e.jsxs(m,{ref:c,className:o(Zo({active:r}),p&&"justify-center px-2",t),...u,children:[a&&e.jsx("span",{className:"shrink-0",children:a}),!p&&e.jsx("span",{className:"truncate",children:i})]})});Vr.displayName="NavigationDrawerItem";const qr=s.forwardRef(({className:t,label:a,children:r,...n},i)=>{const{collapsed:u}=me();return e.jsxs("div",{ref:i,className:o("py-2",t),...n,children:[a&&!u&&e.jsx("h4",{className:"mb-1 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:a}),e.jsx("div",{className:"space-y-1",children:r})]})});qr.displayName="NavigationDrawerGroup";const Kr=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(X.Root,{ref:n,className:o("relative z-10 flex max-w-max flex-1 items-center justify-center",t),...r,children:[a,e.jsx(at,{})]}));Kr.displayName=X.Root.displayName;const Xr=s.forwardRef(({className:t,...a},r)=>e.jsx(X.List,{ref:r,className:o("group flex flex-1 list-none items-center justify-center space-x-1",t),...a}));Xr.displayName=X.List.displayName;const Wo=X.Item,Yr=H.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"),Zr=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(X.Trigger,{ref:n,className:o(Yr(),"group",t),...r,children:[a," ",e.jsx(f.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Zr.displayName=X.Trigger.displayName;const Wr=s.forwardRef(({className:t,...a},r)=>e.jsx(X.Content,{ref:r,className:o("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 ",t),...a}));Wr.displayName=X.Content.displayName;const Jo=X.Link,at=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{className:o("absolute left-0 top-full flex justify-center"),children:e.jsx(X.Viewport,{className:o("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 md:w-[var(--radix-navigation-menu-viewport-width)]",t),ref:r,...a})}));at.displayName=X.Viewport.displayName;const Jr=s.forwardRef(({className:t,...a},r)=>e.jsx(X.Indicator,{ref:r,className:o("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",t),...a,children:e.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Jr.displayName=X.Indicator.displayName;const Qr=s.forwardRef(({className:t,value:a,onChange:r,min:n,max:i,step:u=1,showControls:c=!0,allowNegative:p=!0,clampOnBlur:m=!0,disabled:d,...l},g)=>{const[b,N]=s.useState(a!==void 0?a.toString():"");s.useEffect(()=>{a!==void 0&&N(a.toString())},[a]);const S=C=>{let E=C;return n!==void 0&&E<n&&(E=n),i!==void 0&&E>i&&(E=i),E},y=C=>{if(C===""||C==="-")return;const E=parseFloat(C);return isNaN(E)?void 0:E},R=C=>{let E=C.target.value;if(p||(E=E.replace(/-/g,"")),!/^-?\d*\.?\d*$/.test(E))return;N(E);const A=y(E);r==null||r(A)},x=()=>{const C=y(b);if(C!==void 0&&m){const E=S(C);N(E.toString()),r==null||r(E)}},h=()=>{const C=y(b)??0,E=S(C+u);N(E.toString()),r==null||r(E)},j=()=>{const C=y(b)??0,E=S(C-u);N(E.toString()),r==null||r(E)},w=C=>{C.key==="ArrowUp"?(C.preventDefault(),h()):C.key==="ArrowDown"&&(C.preventDefault(),j())},v=()=>{const C=y(b)??0;return n===void 0||C>n},I=()=>{const C=y(b)??0;return i===void 0||C<i};return c?e.jsxs("div",{className:"flex",children:[e.jsx("button",{type:"button",className:o("flex h-10 w-10 items-center justify-center rounded-l-md border border-r-0 border-input bg-background hover:bg-accent",(!v()||d)&&"opacity-50 cursor-not-allowed hover:bg-background"),onClick:j,disabled:!v()||d,tabIndex:-1,children:e.jsx(f.Minus,{className:"h-4 w-4"})}),e.jsx("input",{type:"text",inputMode:"decimal",className:o("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:g,value:b,onChange:R,onBlur:x,onKeyDown:w,disabled:d,...l}),e.jsx("button",{type:"button",className:o("flex h-10 w-10 items-center justify-center rounded-r-md border border-l-0 border-input bg-background hover:bg-accent",(!I()||d)&&"opacity-50 cursor-not-allowed hover:bg-background"),onClick:h,disabled:!I()||d,tabIndex:-1,children:e.jsx(f.Plus,{className:"h-4 w-4"})})]}):e.jsx("input",{type:"text",inputMode:"decimal",className:o("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:g,value:b,onChange:R,onBlur:x,onKeyDown:w,disabled:d,...l})});Qr.displayName="NumberInput";const es=({className:t,...a})=>e.jsx("nav",{role:"navigation","aria-label":"pagination",className:o("mx-auto flex w-full justify-center",t),...a});es.displayName="Pagination";const ts=s.forwardRef(({className:t,...a},r)=>e.jsx("ul",{ref:r,className:o("flex flex-row items-center gap-1",t),...a}));ts.displayName="PaginationContent";const as=s.forwardRef(({className:t,...a},r)=>e.jsx("li",{ref:r,className:o("",t),...a}));as.displayName="PaginationItem";const Me=({className:t,isActive:a,size:r="icon",...n})=>e.jsx("a",{"aria-current":a?"page":void 0,className:o(ee({variant:a?"outline":"ghost",size:r}),t),...n});Me.displayName="PaginationLink";const rs=({className:t,...a})=>e.jsxs(Me,{"aria-label":"Go to previous page",size:"default",className:o("gap-1 pl-2.5",t),...a,children:[e.jsx(f.ChevronLeft,{className:"h-4 w-4"}),e.jsx("span",{children:"Previous"})]});rs.displayName="PaginationPrevious";const ss=({className:t,...a})=>e.jsxs(Me,{"aria-label":"Go to next page",size:"default",className:o("gap-1 pr-2.5",t),...a,children:[e.jsx("span",{children:"Next"}),e.jsx(f.ChevronRight,{className:"h-4 w-4"})]});ss.displayName="PaginationNext";const ns=({className:t,...a})=>e.jsxs("span",{"aria-hidden":!0,className:o("flex h-9 w-9 items-center justify-center",t),...a,children:[e.jsx(f.MoreHorizontal,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"More pages"})]});ns.displayName="PaginationEllipsis";function Qo(t,a={}){const{minLength:r=8,requireUppercase:n=!0,requireLowercase:i=!0,requireNumbers:u=!0,requireSpecialChars:c=!0}=a,p={length:t.length>=r,uppercase:!n||/[A-Z]/.test(t),lowercase:!i||/[a-z]/.test(t),numbers:!u||/[0-9]/.test(t),specialChars:!c||/[!@#$%^&*(),.?":{}|<>]/.test(t)},m=Object.values(p).filter(Boolean).length,d=Object.keys(p).length;return{score:m/d,checks:p}}const os=s.forwardRef(({className:t,showStrengthIndicator:a=!1,strengthRequirements:r={},onStrengthChange:n,onChange:i,...u},c)=>{const[p,m]=s.useState(!1),[d,l]=s.useState(null),{minLength:g=8,requireUppercase:b=!0,requireLowercase:N=!0,requireNumbers:S=!0,requireSpecialChars:y=!0}=r,R=j=>{const w=j.target.value;if(a&&w){const v=Qo(w,r);l(v),v.score<.4?n==null||n("weak"):v.score<.8?n==null||n("medium"):n==null||n("strong")}else l(null);i==null||i(j)},x=()=>d?d.score<.4?"bg-red-500":d.score<.8?"bg-yellow-500":"bg-green-500":"bg-muted",h=()=>d?d.score<.4?"Weak":d.score<.8?"Medium":"Strong":"";return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx(f.Lock,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:p?"text":"password",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:c,onChange:R,...u}),e.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>m(!p),tabIndex:-1,children:p?e.jsx(f.EyeOff,{className:"h-4 w-4"}):e.jsx(f.Eye,{className:"h-4 w-4"})})]}),a&&d&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:o("h-full transition-all duration-300",x()),style:{width:`${d.score*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground min-w-[50px]",children:h()})]}),e.jsxs("ul",{className:"grid grid-cols-2 gap-1 text-xs",children:[e.jsxs("li",{className:"flex items-center gap-1",children:[d.checks.length?e.jsx(f.Check,{className:"h-3 w-3 text-green-500"}):e.jsx(f.X,{className:"h-3 w-3 text-muted-foreground"}),e.jsxs("span",{className:d.checks.length?"text-green-600":"text-muted-foreground",children:[g,"+ characters"]})]}),b&&e.jsxs("li",{className:"flex items-center gap-1",children:[d.checks.uppercase?e.jsx(f.Check,{className:"h-3 w-3 text-green-500"}):e.jsx(f.X,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:d.checks.uppercase?"text-green-600":"text-muted-foreground",children:"Uppercase letter"})]}),N&&e.jsxs("li",{className:"flex items-center gap-1",children:[d.checks.lowercase?e.jsx(f.Check,{className:"h-3 w-3 text-green-500"}):e.jsx(f.X,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:d.checks.lowercase?"text-green-600":"text-muted-foreground",children:"Lowercase letter"})]}),S&&e.jsxs("li",{className:"flex items-center gap-1",children:[d.checks.numbers?e.jsx(f.Check,{className:"h-3 w-3 text-green-500"}):e.jsx(f.X,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:d.checks.numbers?"text-green-600":"text-muted-foreground",children:"Number"})]}),y&&e.jsxs("li",{className:"flex items-center gap-1",children:[d.checks.specialChars?e.jsx(f.Check,{className:"h-3 w-3 text-green-500"}):e.jsx(f.X,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:d.checks.specialChars?"text-green-600":"text-muted-foreground",children:"Special character"})]})]})]})]})});os.displayName="PasswordInput";function ei(t,a){typeof t=="function"?t(a):t&&(t.current=a)}const is=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"🇵🇹"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"🇳🇱"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"🇧🇪"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"🇨🇭"},{code:"AT",name:"Austria",dialCode:"+43",flag:"🇦🇹"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"🇸🇪"},{code:"NO",name:"Norway",dialCode:"+47",flag:"🇳🇴"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"🇩🇰"},{code:"FI",name:"Finland",dialCode:"+358",flag:"🇫🇮"},{code:"IE",name:"Ireland",dialCode:"+353",flag:"🇮🇪"},{code:"PL",name:"Poland",dialCode:"+48",flag:"🇵🇱"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"🇨🇿"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"🇭🇰"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"🇹🇼"},{code:"MY",name:"Malaysia",dialCode:"+60",flag:"🇲🇾"},{code:"TH",name:"Thailand",dialCode:"+66",flag:"🇹🇭"},{code:"ID",name:"Indonesia",dialCode:"+62",flag:"🇮🇩"},{code:"PH",name:"Philippines",dialCode:"+63",flag:"🇵🇭"},{code:"VN",name:"Vietnam",dialCode:"+84",flag:"🇻🇳"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"AR",name:"Argentina",dialCode:"+54",flag:"🇦🇷"},{code:"CL",name:"Chile",dialCode:"+56",flag:"🇨🇱"},{code:"CO",name:"Colombia",dialCode:"+57",flag:"🇨🇴"},{code:"PE",name:"Peru",dialCode:"+51",flag:"🇵🇪"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"🇿🇦"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"🇪🇬"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"🇳🇬"},{code:"KE",name:"Kenya",dialCode:"+254",flag:"🇰🇪"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"🇦🇪"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"🇸🇦"},{code:"IL",name:"Israel",dialCode:"+972",flag:"🇮🇱"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"🇹🇷"},{code:"RU",name:"Russia",dialCode:"+7",flag:"🇷🇺"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"🇺🇦"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"🇳🇿"}],ls=s.forwardRef(({className:t,countries:a=is,defaultCountry:r="US",value:n,onChange:i,onCountryChange:u,...c},p)=>{const[m,d]=s.useState(!1),[l,g]=s.useState(a.find(v=>v.code===r)||a[0]),[b,N]=s.useState(n||""),[S,y]=s.useState(""),R=s.useRef(null),x=s.useRef(null);s.useEffect(()=>{n!==void 0&&N(n)},[n]),s.useEffect(()=>{const v=I=>{R.current&&!R.current.contains(I.target)&&(d(!1),y(""))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const h=a.filter(v=>v.name.toLowerCase().includes(S.toLowerCase())||v.dialCode.includes(S)||v.code.toLowerCase().includes(S.toLowerCase())),j=v=>{var I;g(v),d(!1),y(""),u==null||u(v),i==null||i(b,v),(I=x.current)==null||I.focus()},w=v=>{const I=v.target.value.replace(/[^\d\s\-()]/g,"");N(I),i==null||i(I,l)};return e.jsxs("div",{className:"relative",ref:R,children:[e.jsxs("div",{className:"flex",children:[e.jsxs("button",{type:"button",className:o("flex items-center gap-1 h-10 px-3 rounded-l-md border border-r-0 border-input bg-background text-sm hover:bg-accent",m&&"ring-2 ring-ring ring-offset-2"),onClick:()=>d(!m),children:[e.jsx("span",{className:"text-base",children:l.flag}),e.jsx("span",{className:"text-muted-foreground",children:l.dialCode}),e.jsx(f.ChevronDown,{className:"h-3 w-3 text-muted-foreground"})]}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx(f.Phone,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"tel",ref:v=>{x.current=v,ei(p,v)},className:o("flex h-10 w-full rounded-r-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),value:b,onChange:w,...c})]})]}),m&&e.jsxs("div",{className:"absolute z-50 mt-1 w-full min-w-[280px] rounded-md border bg-popover p-1 shadow-md",children:[e.jsx("input",{type:"text",className:"w-full px-3 py-2 text-sm border-b bg-transparent outline-none placeholder:text-muted-foreground",placeholder:"Search countries...",value:S,onChange:v=>y(v.target.value),autoFocus:!0}),e.jsx("div",{className:"max-h-[200px] overflow-y-auto mt-1",children:h.length===0?e.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No countries found"}):h.map(v=>e.jsxs("button",{type:"button",className:o("flex w-full items-center gap-2 rounded-sm px-3 py-2 text-sm hover:bg-accent",l.code===v.code&&"bg-accent"),onClick:()=>j(v),children:[e.jsx("span",{className:"text-base",children:v.flag}),e.jsx("span",{className:"flex-1 text-left",children:v.name}),e.jsx("span",{className:"text-muted-foreground",children:v.dialCode}),l.code===v.code&&e.jsx(f.Check,{className:"h-4 w-4"})]},v.code))})]})]})});ls.displayName="PhoneInput";const ds=H.cva("inline-flex items-center gap-1 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",success:"border-transparent bg-green-500 text-white hover:bg-green-500/80",warning:"border-transparent bg-yellow-500 text-white hover:bg-yellow-500/80",info:"border-transparent bg-blue-500 text-white hover:bg-blue-500/80"},size:{default:"h-6 text-xs",sm:"h-5 text-[10px]",lg:"h-7 text-sm"}},defaultVariants:{variant:"default",size:"default"}}),cs=s.forwardRef(({className:t,variant:a,size:r,onDismiss:n,dismissLabel:i="Remove",children:u,...c},p)=>e.jsxs("div",{ref:p,className:o(ds({variant:a,size:r}),t),...c,children:[e.jsx("span",{className:"truncate",children:u}),n&&e.jsx("button",{type:"button",onClick:n,className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-ring","aria-label":i,children:e.jsx(f.X,{className:o("shrink-0",r==="sm"?"h-2.5 w-2.5":"h-3 w-3")})})]}));cs.displayName="Pill";const us=s.forwardRef(({className:t,value:a,...r},n)=>e.jsx(_e.Root,{ref:n,className:o("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...r,children:e.jsx(_e.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(a||0)}%)`}})}));us.displayName=_e.Root.displayName;const ms=s.forwardRef(({className:t,...a},r)=>e.jsx(ve.Root,{className:o("grid gap-2",t),...a,ref:r}));ms.displayName=ve.Root.displayName;const ps=s.forwardRef(({className:t,...a},r)=>e.jsx(ve.Item,{ref:r,className:o("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:e.jsx(ve.Indicator,{className:"flex items-center justify-center",children:e.jsx(f.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ps.displayName=ve.Item.displayName;const fs=s.forwardRef(({className:t,value:a=0,max:r=5,onChange:n,readonly:i=!1,size:u="default",showValue:c=!1,precision:p=1,...m},d)=>{const[l,g]=s.useState(null),b={sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"},N=(x,h)=>{if(i)return;const j=x.currentTarget.getBoundingClientRect(),v=(x.clientX-j.left)/j.width;g(p===.5?h+(v<.5?.5:1):h+1)},S=x=>{i||!n||n(l??x+1)},y=l??a,R=x=>{const h=y>=x+1,j=y>=x+.5&&y<x+1;return e.jsxs("button",{type:"button",disabled:i,className:o("relative p-0.5 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:cursor-default",!i&&"cursor-pointer hover:scale-110"),onMouseMove:w=>N(w,x),onMouseLeave:()=>g(null),onClick:()=>S(x),"aria-label":`Rate ${x+1} out of ${r}`,children:[e.jsx(f.Star,{className:o(b[u],"text-muted-foreground/30")}),e.jsx(f.Star,{className:o(b[u],"absolute inset-0.5 text-yellow-400 fill-yellow-400 transition-all",h||j?"opacity-100":"opacity-0"),style:j?{clipPath:"polygon(0 0, 50% 0, 50% 100%, 0 100%)"}:void 0})]},x)};return e.jsxs("div",{ref:d,className:o("flex items-center gap-0.5",t),role:"radiogroup","aria-label":"Rating",...m,children:[Array.from({length:r},(x,h)=>R(h)),c&&e.jsxs("span",{className:"ml-2 text-sm text-muted-foreground",children:[y.toFixed(p===.5?1:0)," / ",r]})]})});fs.displayName="Rating";const rt=s.createContext({direction:"horizontal",registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>50,startResize:()=>{},isResizing:!1}),gs=s.forwardRef(({className:t,direction:a="horizontal",autoSaveId:r,onLayout:n,children:i,...u},c)=>{const[p,m]=s.useState(new Map),[d,l]=s.useState(!1),g=s.useRef(null),b=s.useRef(-1),N=s.useRef([]),S=s.useMemo(()=>{const j=[];return s.Children.forEach(i,w=>{s.isValidElement(w)&&w.type===st&&j.push(w.props.id||`panel-${j.length}`)}),j},[i]),y=s.useCallback((j,w=10,v=100,I=50)=>{m(C=>{const E=new Map(C);return E.has(j)||E.set(j,{minSize:w,maxSize:v,size:I}),E})},[]),R=s.useCallback(j=>{m(w=>{const v=new Map(w);return v.delete(j),v})},[]),x=s.useCallback(j=>{var w;return((w=p.get(j))==null?void 0:w.size)??50},[p]),h=s.useCallback(j=>{l(!0),b.current=j,N.current=S.map(w=>x(w))},[S,x]);return s.useEffect(()=>{if(!d)return;const j=v=>{if(!g.current||b.current<0)return;const I=g.current.getBoundingClientRect(),C=a==="horizontal"?I.width:I.height,A=(a==="horizontal"?v.clientX-I.left:v.clientY-I.top)/C*100,U=b.current,k=S[U],L=S[U+1],G=p.get(k),z=p.get(L);if(!G||!z)return;let W=0;for(let te=0;te<U;te++)W+=x(S[te]);const Z=G.size+z.size;let J=A-W;J=Math.max(G.minSize,Math.min(G.maxSize,J));let $=Z-J;$=Math.max(z.minSize,Math.min(z.maxSize,$)),J=Z-$,m(te=>{const T=new Map(te);return T.set(k,{...G,size:J}),T.set(L,{...z,size:$}),T})},w=()=>{l(!1),b.current=-1,n==null||n(S.map(v=>x(v)))};return document.addEventListener("mousemove",j),document.addEventListener("mouseup",w),()=>{document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",w)}},[d,a,p,S,x,n]),s.useEffect(()=>{if(!r)return;const j=localStorage.getItem(`resizable-${r}`);if(j)try{const w=JSON.parse(j);m(v=>{const I=new Map(v);for(const[C,E]of Object.entries(w)){const A=I.get(C);A&&I.set(C,{...A,size:E})}return I})}catch{}},[r]),s.useEffect(()=>{if(!r||d)return;const j={};p.forEach((w,v)=>{j[v]=w.size}),localStorage.setItem(`resizable-${r}`,JSON.stringify(j))},[r,p,d]),e.jsx(rt.Provider,{value:{direction:a,registerPanel:y,unregisterPanel:R,getPanelSize:x,startResize:h,isResizing:d},children:e.jsx("div",{ref:j=>{g.current=j,typeof c=="function"?c(j):c&&(c.current=j)},className:o("flex h-full w-full",a==="vertical"&&"flex-col",t),...u,children:i})})});gs.displayName="ResizablePanelGroup";const st=s.forwardRef(({className:t,id:a,defaultSize:r=50,minSize:n=10,maxSize:i=100,children:u,...c},p)=>{const m=s.useId(),d=a||m,{direction:l,registerPanel:g,unregisterPanel:b,getPanelSize:N}=s.useContext(rt);s.useEffect(()=>(g(d,n,i,r),()=>b(d)),[d,n,i,r,g,b]);const S=N(d);return e.jsx("div",{ref:p,className:o("overflow-hidden",t),style:{[l==="horizontal"?"width":"height"]:`${S}%`,flexShrink:0},...c,children:u})});st.displayName="ResizablePanel";const xs=s.forwardRef(({className:t,withHandle:a=!1,...r},n)=>{const{direction:i,startResize:u,isResizing:c}=s.useContext(rt),p=s.useRef(-1);s.useEffect(()=>{const d=n==null?void 0:n.current;if(!d)return;const l=d.parentElement;if(!l)return;const g=Array.from(l.querySelectorAll("[data-resizable-handle]"));p.current=g.indexOf(d)},[n]);const m=d=>{d.preventDefault(),p.current>=0&&u(p.current)};return e.jsx("div",{ref:n,"data-resizable-handle":!0,className:o("relative flex items-center justify-center bg-border",i==="horizontal"?"w-px cursor-col-resize":"h-px cursor-row-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",c&&"bg-primary",t),onMouseDown:m,...r,children:a&&e.jsx("div",{className:o("z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",i==="vertical"&&"h-3 w-4 rotate-90"),children:e.jsx(f.GripVertical,{className:"h-2.5 w-2.5"})})})});xs.displayName="ResizableHandle";const nt=H.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground 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=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3 min-w-10",sm:"h-9 px-2.5 min-w-9",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"default",size:"default"}}),ot=s.forwardRef(({className:t,variant:a,size:r,...n},i)=>e.jsx(mt.Root,{ref:i,className:o(nt({variant:a,size:r,className:t})),...n}));ot.displayName=mt.Root.displayName;const he=s.forwardRef(({className:t,orientation:a="horizontal",decorative:r=!0,...n},i)=>e.jsx(pt.Root,{ref:i,decorative:r,orientation:a,className:o("shrink-0 bg-border",a==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));he.displayName=pt.Root.displayName;const Y=({pressed:t,onPressedChange:a,disabled:r,children:n,tooltip:i})=>e.jsx(ot,{size:"sm",pressed:t,onPressedChange:a,disabled:r,"aria-label":i,className:"h-8 w-8 p-0",children:n}),bs=({editor:t})=>t?e.jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b p-1",children:[e.jsx(Y,{pressed:t.isActive("bold"),onPressedChange:()=>t.chain().focus().toggleBold().run(),disabled:!t.can().chain().focus().toggleBold().run(),tooltip:"Bold",children:e.jsx(f.Bold,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:t.isActive("italic"),onPressedChange:()=>t.chain().focus().toggleItalic().run(),disabled:!t.can().chain().focus().toggleItalic().run(),tooltip:"Italic",children:e.jsx(f.Italic,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:t.isActive("strike"),onPressedChange:()=>t.chain().focus().toggleStrike().run(),disabled:!t.can().chain().focus().toggleStrike().run(),tooltip:"Strikethrough",children:e.jsx(f.Strikethrough,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:t.isActive("code"),onPressedChange:()=>t.chain().focus().toggleCode().run(),disabled:!t.can().chain().focus().toggleCode().run(),tooltip:"Code",children:e.jsx(f.Code,{className:"h-4 w-4"})}),e.jsx(he,{orientation:"vertical",className:"mx-1 h-6"}),e.jsx(Y,{pressed:t.isActive("heading",{level:1}),onPressedChange:()=>t.chain().focus().toggleHeading({level:1}).run(),tooltip:"Heading 1",children:e.jsx(f.Heading1,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:t.isActive("heading",{level:2}),onPressedChange:()=>t.chain().focus().toggleHeading({level:2}).run(),tooltip:"Heading 2",children:e.jsx(f.Heading2,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:t.isActive("heading",{level:3}),onPressedChange:()=>t.chain().focus().toggleHeading({level:3}).run(),tooltip:"Heading 3",children:e.jsx(f.Heading3,{className:"h-4 w-4"})}),e.jsx(he,{orientation:"vertical",className:"mx-1 h-6"}),e.jsx(Y,{pressed:t.isActive("bulletList"),onPressedChange:()=>t.chain().focus().toggleBulletList().run(),tooltip:"Bullet List",children:e.jsx(f.List,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:t.isActive("orderedList"),onPressedChange:()=>t.chain().focus().toggleOrderedList().run(),tooltip:"Ordered List",children:e.jsx(f.ListOrdered,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:t.isActive("blockquote"),onPressedChange:()=>t.chain().focus().toggleBlockquote().run(),tooltip:"Quote",children:e.jsx(f.Quote,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:!1,onPressedChange:()=>t.chain().focus().setHorizontalRule().run(),tooltip:"Horizontal Rule",children:e.jsx(f.Minus,{className:"h-4 w-4"})}),e.jsx(he,{orientation:"vertical",className:"mx-1 h-6"}),e.jsx(Y,{pressed:!1,onPressedChange:()=>t.chain().focus().undo().run(),disabled:!t.can().chain().focus().undo().run(),tooltip:"Undo",children:e.jsx(f.Undo,{className:"h-4 w-4"})}),e.jsx(Y,{pressed:!1,onPressedChange:()=>t.chain().focus().redo().run(),disabled:!t.can().chain().focus().redo().run(),tooltip:"Redo",children:e.jsx(f.Redo,{className:"h-4 w-4"})})]}):null,hs=s.forwardRef(({value:t,onChange:a,placeholder:r="Start typing...",disabled:n=!1,className:i,minHeight:u="150px"},c)=>{const p=ct.useEditor({extensions:[qn,Kn.configure({placeholder:r})],content:t,editable:!n,onUpdate:({editor:m})=>{a==null||a(m.getHTML())}});return s.useEffect(()=>{p&&t!==p.getHTML()&&p.commands.setContent(t??"")},[t,p]),s.useEffect(()=>{p&&p.setEditable(!n)},[n,p]),e.jsxs("div",{ref:c,className:o("rounded-md border bg-background",n&&"opacity-50",i),children:[e.jsx(bs,{editor:p}),e.jsx(ct.EditorContent,{editor:p,className:o("prose prose-sm dark:prose-invert max-w-none p-3 focus-within:outline-none [&_.ProseMirror]:min-h-[var(--min-height)] [&_.ProseMirror]:outline-none [&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left [&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0 [&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none"),style:{"--min-height":u}})]})});hs.displayName="RichText";const Ns=s.forwardRef(({className:t,children:a,...r},n)=>e.jsxs(re.Root,{ref:n,className:o("relative overflow-hidden",t),...r,children:[e.jsx(re.Viewport,{className:"h-full w-full rounded-[inherit]",children:a}),e.jsx(it,{}),e.jsx(re.Corner,{})]}));Ns.displayName=re.Root.displayName;const it=s.forwardRef(({className:t,orientation:a="vertical",...r},n)=>e.jsx(re.ScrollAreaScrollbar,{ref:n,orientation:a,className:o("flex touch-none select-none transition-colors",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:e.jsx(re.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));it.displayName=re.ScrollAreaScrollbar.displayName;function lt(t,a){typeof t=="function"?t(a):t&&(t.current=a)}const vs=s.forwardRef(({className:t,value:a,onChange:r,onSearch:n,onClear:i,loading:u=!1,showClearButton:c=!0,searchOnEnter:p=!0,debounceMs:m,disabled:d,...l},g)=>{const[b,N]=s.useState(a||""),S=s.useRef(null);s.useEffect(()=>{a!==void 0&&N(a)},[a]);const y=j=>{const w=j.target.value;N(w),r==null||r(w),m&&n&&(S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{n(w)},m))},R=j=>{j.key==="Enter"&&p&&n&&(j.preventDefault(),S.current&&clearTimeout(S.current),n(b)),j.key==="Escape"&&b&&x()},x=()=>{N(""),r==null||r(""),i==null||i(),S.current&&clearTimeout(S.current)};s.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const h=c&&b&&!u;return e.jsxs("div",{className:"relative",children:[e.jsx(f.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"search",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",t),ref:g,value:b,onChange:y,onKeyDown:R,disabled:d||u,...l}),e.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:u?e.jsx(f.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}):h?e.jsx("button",{type:"button",className:"p-0.5 hover:bg-accent rounded",onClick:x,tabIndex:-1,children:e.jsx(f.X,{className:"h-4 w-4 text-muted-foreground"})}):null})]})});vs.displayName="SearchInput";const ws=s.forwardRef(({shortcutKey:t="K",showShortcut:a=!0,className:r,onChange:n,...i},u)=>{const c=s.useRef(null);s.useEffect(()=>{const m=d=>{var l;(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()===t.toLowerCase()&&(d.preventDefault(),(l=c.current)==null||l.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t]);const p=m=>{c.current=m,lt(u,m)};return e.jsxs("div",{className:"relative",children:[e.jsx(f.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"search",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",a?"pr-16":"pr-10",r),ref:p,...i}),a&&e.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-0.5",children:e.jsxs("kbd",{className:"pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground inline-flex",children:[e.jsx("span",{className:"text-xs",children:"⌘"}),t]})})]})});ws.displayName="CommandSearch";const ys=s.forwardRef(({collapsedWidth:t="40px",expandedWidth:a="250px",className:r,placeholder:n="Search...",...i},u)=>{const[c,p]=s.useState(!1),[m,d]=s.useState(i.value||""),l=s.useRef(null),{onChange:g,...b}=i,N=()=>p(!0),S=()=>{m||p(!1)},y=h=>{d(h.target.value),g==null||g(h.target.value)},R=()=>{p(!0),setTimeout(()=>{var h;return(h=l.current)==null?void 0:h.focus()},100)},x=h=>{l.current=h,lt(u,h)};return e.jsxs("div",{className:o("relative flex items-center transition-all duration-200 ease-in-out",r),style:{width:c?a:t},children:[e.jsx("button",{type:"button",className:o("absolute left-0 flex h-10 w-10 items-center justify-center rounded-md border border-input bg-background hover:bg-accent transition-colors",c&&"border-transparent hover:bg-transparent"),onClick:R,tabIndex:c?-1:0,children:e.jsx(f.Search,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx("input",{type:"search",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",!c&&"opacity-0 pointer-events-none"),ref:x,value:m,onChange:y,onFocus:N,onBlur:S,placeholder:n,...b})]})});ys.displayName="ExpandableSearch";const ti=(t,a)=>{var n;const r=a.toLowerCase();return t.label.toLowerCase().includes(r)||t.value.toLowerCase().includes(r)||(((n=t.description)==null?void 0:n.toLowerCase().includes(r))??!1)},js=s.forwardRef(({className:t,value:a,onChange:r,options:n,onSelect:i,loading:u=!1,emptyMessage:c="No results found",filterFn:p=ti,minChars:m=0,maxResults:d=10,showAllOnFocus:l=!0,groupBy:g,disabled:b,placeholder:N="Search...",...S},y)=>{const[R,x]=s.useState(!1),[h,j]=s.useState(a||""),[w,v]=s.useState(-1),I=s.useRef(null),C=s.useRef(null),E=s.useRef(null);s.useEffect(()=>{a!==void 0&&j(a)},[a]),s.useEffect(()=>{const T=P=>{I.current&&!I.current.contains(P.target)&&(x(!1),v(-1))};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const A=s.useMemo(()=>h.length<m&&!l?[]:(h.length>=m?n.filter(P=>p(P,h)):n).slice(0,d),[n,h,p,m,d,l]),U=s.useMemo(()=>{if(!g)return null;const T={};return A.forEach(P=>{const V=g(P);T[V]||(T[V]=[]),T[V].push(P)}),T},[A,g]),k=T=>{const P=T.target.value;j(P),r==null||r(P),x(!0),v(-1)},L=()=>{(l||h.length>=m)&&x(!0)},G=T=>{var P;T.disabled||(j(T.label),r==null||r(T.label),i==null||i(T),x(!1),v(-1),(P=C.current)==null||P.focus())},z=T=>{if(!R&&(T.key==="ArrowDown"||T.key==="ArrowUp")){x(!0);return}switch(T.key){case"ArrowDown":T.preventDefault(),v(P=>{const V=P<A.length-1?P+1:0;return W(V),V});break;case"ArrowUp":T.preventDefault(),v(P=>{const V=P>0?P-1:A.length-1;return W(V),V});break;case"Enter":T.preventDefault(),w>=0&&A[w]&&G(A[w]);break;case"Escape":x(!1),v(-1);break;case"Tab":x(!1),v(-1);break}},W=T=>{if(E.current){const V=E.current.querySelectorAll("[data-option]")[T];V&&V.scrollIntoView({block:"nearest"})}},Z=()=>{var T;j(""),r==null||r(""),x(!1),(T=C.current)==null||T.focus()},J=T=>{C.current=T,lt(y,T)},$=(T,P)=>e.jsxs("button",{type:"button","data-option":!0,className:o("flex w-full items-center gap-2 rounded-sm px-3 py-2 text-sm text-left",w===P&&"bg-accent",T.disabled&&"opacity-50 cursor-not-allowed",!T.disabled&&"hover:bg-accent cursor-pointer"),onClick:()=>G(T),onMouseEnter:()=>!T.disabled&&v(P),disabled:T.disabled,children:[T.icon&&e.jsx("span",{className:"flex-shrink-0",children:T.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]})]},T.value),te=R&&(A.length>0||u||h.length>=m);return e.jsxs("div",{ref:I,className:o("relative",t),children:[e.jsx(f.Search,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground z-10"}),e.jsx("input",{type:"text",role:"combobox","aria-expanded":R,"aria-autocomplete":"list","aria-controls":"autocomplete-list",autoComplete:"off",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"),ref:J,value:h,onChange:k,onFocus:L,onKeyDown:z,disabled:b,placeholder:N,...S}),e.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:u?e.jsx(f.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}):h?e.jsx("button",{type:"button",className:"p-0.5 hover:bg-accent rounded",onClick:Z,tabIndex:-1,children:e.jsx(f.X,{className:"h-4 w-4 text-muted-foreground"})}):null}),te&&e.jsx("div",{id:"autocomplete-list",ref:E,className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md max-h-[300px] overflow-y-auto",children:u?e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(f.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):A.length===0?e.jsx("div",{className:"px-3 py-4 text-sm text-center text-muted-foreground",children:c}):U?e.jsx("div",{className:"p-1",children:Object.entries(U).map(([T,P])=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1.5 text-xs font-semibold text-muted-foreground",children:T}),P.map(V=>{const Sn=A.indexOf(V);return $(V,Sn)})]},T))}):e.jsx("div",{className:"p-1",children:A.map((T,P)=>$(T,P))})})]})});js.displayName="AutocompleteSearch";const Ss=s.createContext(void 0);function ne(){const t=s.useContext(Ss);if(!t)throw new Error("useSidebar must be used within a SidebarProvider");return t}function ai({children:t,defaultOpen:a=!0,defaultCollapsed:r=!1,onOpenChange:n,onCollapsedChange:i}){const[u,c]=s.useState(a),[p,m]=s.useState(r),[d,l]=s.useState(!1);s.useEffect(()=>{const N=()=>{l(window.innerWidth<768)};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const g=s.useCallback(N=>{c(N),n==null||n(N)},[n]),b=s.useCallback(N=>{m(N),i==null||i(N)},[i]);return e.jsx(Ss.Provider,{value:{open:u,setOpen:g,collapsed:p,setCollapsed:b,isMobile:d},children:t})}const ri=H.cva("flex h-full flex-col border-r bg-background transition-all duration-300",{variants:{variant:{default:"",inset:"rounded-lg border shadow-sm",floating:"m-2 rounded-lg border shadow-lg"}},defaultVariants:{variant:"default"}}),Rs=s.forwardRef(({className:t,variant:a,width:r=256,collapsedWidth:n=64,children:i,...u},c)=>{const{open:p,collapsed:m,isMobile:d}=ne(),l=d?p?r:0:m?n:r;return e.jsxs(e.Fragment,{children:[d&&p&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>ne().setOpen(!1)}),e.jsx("aside",{ref:c,"data-collapsed":m,"data-mobile":d,className:o(ri({variant:a}),d&&"fixed inset-y-0 left-0 z-50",t),style:{width:l,minWidth:l,overflow:"hidden"},...u,children:e.jsx("div",{className:"flex h-full flex-col",style:{width:r,minWidth:r},children:i})})]})});Rs.displayName="Sidebar";const Cs=s.forwardRef(({className:t,...a},r)=>{const{open:n,setOpen:i,collapsed:u,setCollapsed:c,isMobile:p}=ne(),m=()=>{p?i(!n):c(!u)};return e.jsxs(Q,{ref:r,variant:"ghost",size:"icon",className:o("h-9 w-9",t),onClick:m,...a,children:[e.jsx(f.PanelLeft,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Toggle sidebar"})]})});Cs.displayName="SidebarTrigger";const Es=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("flex h-14 items-center border-b px-4",t),...a}));Es.displayName="SidebarHeader";const Ts=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("flex-1 overflow-auto py-2",t),...a}));Ts.displayName="SidebarContent";const ks=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("mt-auto border-t p-4",t),...a}));ks.displayName="SidebarFooter";const Is=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("px-2 py-2",t),...a}));Is.displayName="SidebarGroup";const As=s.forwardRef(({className:t,...a},r)=>{const{collapsed:n}=ne();return n?null:e.jsx("div",{ref:r,className:o("px-2 py-1.5 text-xs font-medium text-muted-foreground",t),...a})});As.displayName="SidebarGroupLabel";const Ds=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("space-y-1",t),...a}));Ds.displayName="SidebarGroupContent";const Ps=s.forwardRef(({className:t,...a},r)=>e.jsx("ul",{ref:r,className:o("space-y-1",t),...a}));Ps.displayName="SidebarMenu";const Ms=s.forwardRef(({className:t,...a},r)=>e.jsx("li",{ref:r,className:o("",t),...a}));Ms.displayName="SidebarMenuItem";const Ls=s.forwardRef(({className:t,isActive:a,tooltip:r,children:n,...i},u)=>{const{collapsed:c}=ne(),p=e.jsx("button",{ref:u,className:o("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",a&&"bg-accent text-accent-foreground",c&&"justify-center px-2",t),...i,children:n});return c&&r?e.jsxs("div",{className:"relative group",children:[p,e.jsx("div",{className:"absolute left-full top-1/2 z-50 ml-2 -translate-y-1/2 rounded-md bg-popover px-2 py-1 text-xs text-popover-foreground opacity-0 shadow-md transition-opacity group-hover:opacity-100",children:r})]}):p});Ls.displayName="SidebarMenuButton";const _s=s.forwardRef(({className:t,...a},r)=>{const{collapsed:n}=ne();return n?null:e.jsx("ul",{ref:r,className:o("ml-4 space-y-1 border-l pl-4",t),...a})});_s.displayName="SidebarMenuSub";const Os=s.forwardRef(({className:t,...a},r)=>e.jsx("li",{ref:r,className:o("",t),...a}));Os.displayName="SidebarMenuSubItem";const Fs=s.forwardRef(({className:t,isActive:a,...r},n)=>e.jsx("button",{ref:n,className:o("flex w-full items-center rounded-md px-3 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",a&&"bg-accent text-accent-foreground",t),...r}));Fs.displayName="SidebarMenuSubButton";const zs=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("mx-2 my-2 h-px bg-border",t),...a}));zs.displayName="SidebarSeparator";function si({className:t,...a}){return e.jsx("div",{className:o("animate-pulse rounded-md bg-muted",t),...a})}const Bs=s.forwardRef(({className:t,...a},r)=>e.jsxs(pe.Root,{ref:r,className:o("relative flex w-full touch-none select-none items-center",t),...a,children:[e.jsx(pe.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:e.jsx(pe.Range,{className:"absolute h-full bg-primary"})}),e.jsx(pe.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));Bs.displayName=pe.Root.displayName;const ni=({...t})=>e.jsx(Jn.Toaster,{theme:"system",className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t}),Hs=H.cva("animate-spin rounded-full border-2 border-current border-t-transparent",{variants:{size:{default:"h-5 w-5",sm:"h-4 w-4",lg:"h-6 w-6",xl:"h-8 w-8"}},defaultVariants:{size:"default"}}),Us=s.forwardRef(({className:t,size:a,...r},n)=>e.jsx("div",{ref:n,className:o(Hs({size:a}),t),role:"status","aria-label":"Loading",...r,children:e.jsx("span",{className:"sr-only",children:"Loading..."})}));Us.displayName="Spinner";const Gs=s.forwardRef(({className:t,steps:a,currentStep:r,orientation:n="horizontal",onStepClick:i,allowClickOnCompleted:u=!0,...c},p)=>{const m=n==="vertical";return e.jsx("div",{ref:p,className:o("flex",m?"flex-col":"flex-row items-center",t),...c,children:a.map((d,l)=>{const g=l<r,b=l===r,N=i&&(u?g:!1);return e.jsxs(s.Fragment,{children:[e.jsxs("div",{className:o("flex",m?"flex-row items-start gap-3":"flex-col items-center gap-2"),children:[e.jsx("button",{type:"button",disabled:!N,onClick:()=>N&&(i==null?void 0:i(l)),className:o("relative flex h-10 w-10 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition-all",g?"border-primary bg-primary text-primary-foreground":b?"border-primary bg-background text-primary":"border-muted-foreground/30 bg-background text-muted-foreground",N&&"cursor-pointer hover:border-primary hover:text-primary"),children:g?e.jsx(f.Check,{className:"h-5 w-5"}):d.icon??l+1}),e.jsxs("div",{className:o(m?"pb-8":"text-center",m&&l===a.length-1&&"pb-0"),children:[e.jsx("p",{className:o("text-sm font-medium",b||g?"text-foreground":"text-muted-foreground"),children:d.title}),d.description&&e.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:d.description})]})]}),l<a.length-1&&e.jsx("div",{className:o("transition-colors",m?"ml-5 h-full min-h-[24px] w-0.5 -translate-x-1/2":"mx-2 h-0.5 flex-1 min-w-[24px]",l<r?"bg-primary":"bg-muted-foreground/30")})]},d.id)})})});Gs.displayName="Stepper";const $s=s.forwardRef(({className:t,step:a,currentStep:r,children:n,...i},u)=>a!==r?null:e.jsx("div",{ref:u,className:o("mt-4",t),...i,children:n}));$s.displayName="StepperContent";const Vs=s.forwardRef(({className:t,...a},r)=>e.jsx(Oe.Root,{className:o("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...a,ref:r,children:e.jsx(Oe.Thumb,{className:o("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Vs.displayName=Oe.Root.displayName;const qs=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:r,className:o("w-full caption-bottom text-sm",t),...a})}));qs.displayName="Table";const Ks=s.forwardRef(({className:t,...a},r)=>e.jsx("thead",{ref:r,className:o("[&_tr]:border-b",t),...a}));Ks.displayName="TableHeader";const Xs=s.forwardRef(({className:t,...a},r)=>e.jsx("tbody",{ref:r,className:o("[&_tr:last-child]:border-0",t),...a}));Xs.displayName="TableBody";const Ys=s.forwardRef(({className:t,...a},r)=>e.jsx("tfoot",{ref:r,className:o("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...a}));Ys.displayName="TableFooter";const Zs=s.forwardRef(({className:t,...a},r)=>e.jsx("tr",{ref:r,className:o("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...a}));Zs.displayName="TableRow";const Ws=s.forwardRef(({className:t,...a},r)=>e.jsx("th",{ref:r,className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...a}));Ws.displayName="TableHead";const Js=s.forwardRef(({className:t,...a},r)=>e.jsx("td",{ref:r,className:o("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...a}));Js.displayName="TableCell";const Qs=s.forwardRef(({className:t,...a},r)=>e.jsx("caption",{ref:r,className:o("mt-4 text-sm text-muted-foreground",t),...a}));Qs.displayName="TableCaption";const oi=oe.Root,en=s.forwardRef(({className:t,...a},r)=>e.jsx(oe.List,{ref:r,className:o("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...a}));en.displayName=oe.List.displayName;const tn=s.forwardRef(({className:t,...a},r)=>e.jsx(oe.Trigger,{ref:r,className:o("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",t),...a}));tn.displayName=oe.Trigger.displayName;const an=s.forwardRef(({className:t,...a},r)=>e.jsx(oe.Content,{ref:r,className:o("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...a}));an.displayName=oe.Content.displayName;const rn=s.forwardRef(({className:t,...a},r)=>e.jsx("textarea",{className:o("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...a}));rn.displayName="Textarea";function ii(t,a){const r=t.match(/^(\d{1,2}):(\d{2})$/),n=t.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i);if(r&&a==="24"){const i=parseInt(r[1],10),u=parseInt(r[2],10);if(i>=0&&i<=23&&u>=0&&u<=59)return{hours:i,minutes:u,period:i>=12?"PM":"AM"}}if(n&&a==="12"){const i=parseInt(n[1],10),u=parseInt(n[2],10),c=n[3].toUpperCase();if(i>=1&&i<=12&&u>=0&&u<=59)return{hours:i,minutes:u,period:c}}return null}function li(t,a,r,n){const i=a.toString().padStart(2,"0");if(r==="24")return`${t.toString().padStart(2,"0")}:${i}`;const u=t===0?12:t>12?t-12:t,c=n||(t>=12?"PM":"AM");return`${u}:${i} ${c}`}const sn=s.forwardRef(({className:t,value:a="",onChange:r,format:n="24",...i},u)=>{const c=p=>{r==null||r(p.target.value)};return e.jsxs("div",{className:"relative",children:[e.jsx(f.Clock,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"text",className:o("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:u,value:a,onChange:c,placeholder:n==="24"?"HH:MM":"HH:MM AM",...i})]})});sn.displayName="TimePickerInput";const nn=s.forwardRef(({value:t,onChange:a,format:r="24",minuteStep:n=1,disabled:i=!1,className:u,placeholder:c},p)=>{const[m,d]=s.useState(!1),[l,g]=s.useState(r==="24"?0:12),[b,N]=s.useState(0),[S,y]=s.useState("AM"),R=s.useRef(null);s.useEffect(()=>{if(t){const C=ii(t,r);C&&(g(r==="12"?C.hours===0?12:C.hours>12?C.hours-12:C.hours:C.hours),N(C.minutes),y(C.period))}},[t,r]),s.useEffect(()=>{const C=E=>{R.current&&!R.current.contains(E.target)&&d(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]);const x=(C,E,A)=>{let U=C;r==="12"&&(A==="PM"&&U!==12&&(U+=12),A==="AM"&&U===12&&(U=0));const k=li(U,E,r,r==="12"?A:void 0);a==null||a(k)},h=()=>{const C=r==="24"?23:12,E=r==="24"?0:1,A=l>=C?E:l+1;g(A),x(A,b,S)},j=()=>{const C=r==="24"?23:12,A=l<=(r==="24"?0:1)?C:l-1;g(A),x(A,b,S)},w=()=>{const C=(b+n)%60;N(C),x(l,C,S)},v=()=>{const C=b-n<0?60-n:b-n;N(C),x(l,C,S)},I=()=>{const C=S==="AM"?"PM":"AM";y(C),x(l,b,C)};return e.jsxs("div",{ref:R,className:o("relative",u),children:[e.jsxs("div",{className:o("flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",i&&"cursor-not-allowed opacity-50",!i&&"cursor-pointer hover:bg-accent/50"),onClick:()=>!i&&d(!m),children:[e.jsx(f.Clock,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:o("font-mono",!t&&"text-muted-foreground"),children:t||c||(r==="24"?"00:00":"12:00 AM")})]}),m&&!i&&e.jsxs("div",{ref:p,className:"absolute z-50 mt-1 rounded-md border bg-popover p-3 shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:h,children:e.jsx(f.ChevronUp,{className:"h-4 w-4"})}),e.jsx("span",{className:"w-10 text-center text-2xl font-mono",children:l.toString().padStart(2,"0")}),e.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:j,children:e.jsx(f.ChevronDown,{className:"h-4 w-4"})})]}),e.jsx("span",{className:"text-2xl font-mono",children:":"}),e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:w,children:e.jsx(f.ChevronUp,{className:"h-4 w-4"})}),e.jsx("span",{className:"w-10 text-center text-2xl font-mono",children:b.toString().padStart(2,"0")}),e.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:v,children:e.jsx(f.ChevronDown,{className:"h-4 w-4"})})]}),r==="12"&&e.jsxs("div",{className:"flex flex-col items-center ml-2",children:[e.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:I,children:e.jsx(f.ChevronUp,{className:"h-4 w-4"})}),e.jsx("span",{className:"w-10 text-center text-lg font-mono",children:S}),e.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:I,children:e.jsx(f.ChevronDown,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[e.jsx("button",{type:"button",className:"px-3 py-1 text-sm rounded-md hover:bg-accent",onClick:()=>{const C=new Date,E=C.getHours(),A=C.getMinutes();r==="12"?(g(E===0?12:E>12?E-12:E),y(E>=12?"PM":"AM")):g(E),N(A),x(r==="12"?E===0?12:E>12?E-12:E:E,A,E>=12?"PM":"AM")},children:"Now"}),e.jsx("button",{type:"button",className:"px-3 py-1 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90",onClick:()=>d(!1),children:"Done"})]})]})]})});nn.displayName="TimePicker";const di=H.cva("relative",{variants:{variant:{default:"",alternating:""}},defaultVariants:{variant:"default"}}),on=s.forwardRef(({className:t,variant:a,...r},n)=>e.jsx("div",{ref:n,className:o(di({variant:a}),t),...r}));on.displayName="Timeline";const ci=H.cva("relative pb-8 pl-8 last:pb-0",{variants:{variant:{default:"",success:"[--timeline-dot-color:theme(colors.green.500)]",warning:"[--timeline-dot-color:theme(colors.yellow.500)]",error:"[--timeline-dot-color:theme(colors.red.500)]",info:"[--timeline-dot-color:theme(colors.blue.500)]"}},defaultVariants:{variant:"default"}}),ln=s.forwardRef(({className:t,variant:a,...r},n)=>e.jsx("div",{ref:n,className:o(ci({variant:a}),t),...r}));ln.displayName="TimelineItem";const ui=H.cva("absolute left-[11px] top-[26px] h-[calc(100%-26px)] w-px",{variants:{variant:{default:"bg-border",dashed:"border-l border-dashed border-border bg-transparent",dotted:"border-l border-dotted border-border bg-transparent"}},defaultVariants:{variant:"default"}}),dn=s.forwardRef(({className:t,variant:a,...r},n)=>e.jsx("div",{ref:n,className:o(ui({variant:a}),t),...r}));dn.displayName="TimelineLine";const mi=H.cva("absolute left-0 flex h-6 w-6 items-center justify-center rounded-full border-2 border-background",{variants:{variant:{default:"bg-muted",filled:"bg-primary text-primary-foreground",outline:"border-2 border-primary bg-background",icon:"bg-primary text-primary-foreground"},size:{sm:"h-4 w-4",default:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),cn=s.forwardRef(({className:t,variant:a,size:r,icon:n,children:i,...u},c)=>e.jsx("div",{ref:c,className:o(mi({variant:a,size:r}),"bg-[var(--timeline-dot-color,theme(colors.muted.DEFAULT))]",t),...u,children:n||i}));cn.displayName="TimelineDot";const un=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("pt-0.5",t),...a}));un.displayName="TimelineContent";const mn=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("flex items-center gap-2",t),...a}));mn.displayName="TimelineHeader";const pn=s.forwardRef(({className:t,...a},r)=>e.jsx("h3",{ref:r,className:o("font-heading font-semibold leading-none tracking-tight",t),...a}));pn.displayName="TimelineTitle";const fn=s.forwardRef(({className:t,...a},r)=>e.jsx("time",{ref:r,className:o("text-sm text-muted-foreground",t),...a}));fn.displayName="TimelineTime";const gn=s.forwardRef(({className:t,...a},r)=>e.jsx("p",{ref:r,className:o("mt-2 text-sm text-muted-foreground",t),...a}));gn.displayName="TimelineDescription";const xn=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("relative flex items-start gap-4",t),...a}));xn.displayName="TimelineHorizontal";const bn=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("relative flex flex-col items-center",t),...a}));bn.displayName="TimelineHorizontalItem";const hn=s.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:o("absolute left-[calc(50%+12px)] top-3 h-px w-[calc(100%-24px)] bg-border",t),...a}));hn.displayName="TimelineHorizontalLine";const Nn=s.createContext({size:"default",variant:"default"}),vn=s.forwardRef(({className:t,variant:a,size:r,children:n,...i},u)=>e.jsx(Ie.Root,{ref:u,className:o("flex items-center justify-center gap-1",t),...i,children:e.jsx(Nn.Provider,{value:{variant:a,size:r},children:n})}));vn.displayName=Ie.Root.displayName;const wn=s.forwardRef(({className:t,children:a,variant:r,size:n,...i},u)=>{const c=s.useContext(Nn);return e.jsx(Ie.Item,{ref:u,className:o(nt({variant:c.variant||r,size:c.size||n}),t),...i,children:a})});wn.displayName=Ie.Item.displayName;const pi=we.Provider,fi=we.Root,gi=we.Trigger,yn=s.forwardRef(({className:t,sideOffset:a=4,...r},n)=>e.jsx(we.Content,{ref:n,sideOffset:a,className:o("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",t),...r}));yn.displayName=we.Content.displayName;const jn=s.forwardRef(({className:t,data:a,selectedId:r,onSelect:n,expandedIds:i,onExpandChange:u,showIcons:c=!0,indentSize:p=20,...m},d)=>{const[l,g]=s.useState([]),b=i??l,N=y=>{const R=b.includes(y)?b.filter(x=>x!==y):[...b,y];u?u(R):g(R)},S=(y,R=0)=>{var w;const x=y.children&&y.children.length>0,h=b.includes(y.id),j=r===y.id;return x?e.jsxs(de.Root,{open:h,onOpenChange:()=>N(y.id),children:[e.jsx(de.Trigger,{asChild:!0,children:e.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(y),className:o("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",j&&"bg-accent"),style:{paddingLeft:`${R*p+8}px`},children:[e.jsx(f.ChevronRight,{className:o("h-4 w-4 shrink-0 text-muted-foreground transition-transform",h&&"rotate-90")}),c&&e.jsx("span",{className:"shrink-0 text-muted-foreground",children:y.icon??(h?e.jsx(f.FolderOpen,{className:"h-4 w-4"}):e.jsx(f.Folder,{className:"h-4 w-4"}))}),e.jsx("span",{className:"truncate",children:y.name})]})}),e.jsx(de.Content,{className:"overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",children:(w=y.children)==null?void 0:w.map(v=>S(v,R+1))})]},y.id):e.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(y),className:o("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",j&&"bg-accent"),style:{paddingLeft:`${R*p+8}px`},children:[c&&e.jsx("span",{className:"shrink-0 text-muted-foreground",children:y.icon??e.jsx(f.File,{className:"h-4 w-4"})}),e.jsx("span",{className:"truncate",children:y.name})]},y.id)};return e.jsx("div",{ref:d,className:o("space-y-1",t),...m,children:a.map(y=>S(y))})});jn.displayName="TreeView";exports.Accordion=so;exports.AccordionContent=xt;exports.AccordionItem=ft;exports.AccordionTrigger=gt;exports.Alert=bt;exports.AlertDescription=Nt;exports.AlertDialog=oo;exports.AlertDialogAction=Ct;exports.AlertDialogCancel=Et;exports.AlertDialogContent=wt;exports.AlertDialogDescription=Rt;exports.AlertDialogFooter=jt;exports.AlertDialogHeader=yt;exports.AlertDialogOverlay=ze;exports.AlertDialogPortal=vt;exports.AlertDialogTitle=St;exports.AlertDialogTrigger=io;exports.AlertTitle=ht;exports.AspectRatio=lo;exports.AutocompleteSearch=js;exports.Avatar=Tt;exports.AvatarFallback=It;exports.AvatarImage=kt;exports.Badge=Fe;exports.Banner=Pt;exports.Breadcrumb=Mt;exports.BreadcrumbEllipsis=Bt;exports.BreadcrumbItem=_t;exports.BreadcrumbLink=Ot;exports.BreadcrumbList=Lt;exports.BreadcrumbPage=Ft;exports.BreadcrumbSeparator=zt;exports.Button=Q;exports.Calendar=ye;exports.Card=Ht;exports.CardContent=Vt;exports.CardDescription=$t;exports.CardFooter=qt;exports.CardHeader=Ut;exports.CardTitle=Gt;exports.Carousel=Xt;exports.CarouselContent=Yt;exports.CarouselItem=Zt;exports.CarouselNext=Jt;exports.CarouselPrevious=Wt;exports.Checkbox=Qt;exports.CodeBlock=ea;exports.Collapsible=co;exports.CollapsibleContent=mo;exports.CollapsibleTrigger=uo;exports.Command=De;exports.CommandDialog=go;exports.CommandEmpty=$e;exports.CommandGroup=Ve;exports.CommandInput=Ue;exports.CommandItem=qe;exports.CommandList=Ge;exports.CommandSearch=ws;exports.CommandSeparator=ia;exports.CommandShortcut=la;exports.ContextMenu=xo;exports.ContextMenuCheckboxItem=pa;exports.ContextMenuContent=ua;exports.ContextMenuGroup=ho;exports.ContextMenuItem=ma;exports.ContextMenuLabel=ga;exports.ContextMenuPortal=No;exports.ContextMenuRadioGroup=wo;exports.ContextMenuRadioItem=fa;exports.ContextMenuSeparator=xa;exports.ContextMenuShortcut=ba;exports.ContextMenuSub=vo;exports.ContextMenuSubContent=ca;exports.ContextMenuSubTrigger=da;exports.ContextMenuTrigger=bo;exports.CreditCardCVVInput=Ye;exports.CreditCardExpiryInput=Xe;exports.CreditCardInput=Na;exports.CreditCardNumberInput=Ke;exports.CurrencyInput=Ca;exports.DatePicker=va;exports.DateRangePicker=wa;exports.DateTimePicker=Sa;exports.DecimalInput=Re;exports.Dialog=ta;exports.DialogClose=fo;exports.DialogContent=He;exports.DialogDescription=oa;exports.DialogFooter=sa;exports.DialogHeader=ra;exports.DialogOverlay=Be;exports.DialogPortal=aa;exports.DialogTitle=na;exports.DialogTrigger=po;exports.DocumentInput=er;exports.Drawer=ko;exports.DrawerClose=Aa;exports.DrawerContent=Pa;exports.DrawerDescription=Oa;exports.DrawerFooter=La;exports.DrawerHandle=Fa;exports.DrawerHeader=Ma;exports.DrawerOverlay=Je;exports.DrawerPortal=Da;exports.DrawerTitle=_a;exports.DrawerTrigger=Ia;exports.DropdownMenu=Io;exports.DropdownMenuCheckboxItem=Ga;exports.DropdownMenuContent=Ha;exports.DropdownMenuGroup=Do;exports.DropdownMenuItem=Ua;exports.DropdownMenuLabel=Va;exports.DropdownMenuPortal=Po;exports.DropdownMenuRadioGroup=Lo;exports.DropdownMenuRadioItem=$a;exports.DropdownMenuSeparator=qa;exports.DropdownMenuShortcut=Ka;exports.DropdownMenuSub=Mo;exports.DropdownMenuSubContent=Ba;exports.DropdownMenuSubTrigger=za;exports.DropdownMenuTrigger=Ao;exports.EmailInput=Xa;exports.ExpandableSearch=ys;exports.Fieldset=Ya;exports.FieldsetDescription=Wa;exports.FieldsetLegend=Za;exports.FileInput=Pe;exports.FormDescription=rr;exports.FormLabel=ar;exports.FormMessage=sr;exports.HoverCard=zo;exports.HoverCardContent=nr;exports.HoverCardTrigger=Bo;exports.Image=hr;exports.ImageInput=Qa;exports.Input=or;exports.InputOTP=ir;exports.InputOTPGroup=dr;exports.InputOTPSeparator=cr;exports.InputOTPSlot=lr;exports.KEY_SYMBOLS=mr;exports.Kbd=Qe;exports.KbdGroup=fr;exports.Link=br;exports.Menubar=vr;exports.MenubarCheckboxItem=Cr;exports.MenubarContent=Sr;exports.MenubarGroup=Go;exports.MenubarItem=Rr;exports.MenubarLabel=Tr;exports.MenubarMenu=Uo;exports.MenubarPortal=$o;exports.MenubarRadioGroup=qo;exports.MenubarRadioItem=Er;exports.MenubarSeparator=kr;exports.MenubarShortcut=Ir;exports.MenubarSub=Vo;exports.MenubarSubContent=jr;exports.MenubarSubTrigger=yr;exports.MenubarTrigger=wr;exports.MultiSelect=Ar;exports.NavigationDrawer=Br;exports.NavigationDrawerContent=Ur;exports.NavigationDrawerFooter=Gr;exports.NavigationDrawerGroup=qr;exports.NavigationDrawerHeader=Hr;exports.NavigationDrawerItem=Vr;exports.NavigationDrawerProvider=Yo;exports.NavigationDrawerToggle=$r;exports.NavigationMenu=Kr;exports.NavigationMenuContent=Wr;exports.NavigationMenuIndicator=Jr;exports.NavigationMenuItem=Wo;exports.NavigationMenuLink=Jo;exports.NavigationMenuList=Xr;exports.NavigationMenuTrigger=Zr;exports.NavigationMenuViewport=at;exports.NumberInput=Qr;exports.Pagination=es;exports.PaginationContent=ts;exports.PaginationEllipsis=ns;exports.PaginationItem=as;exports.PaginationLink=Me;exports.PaginationNext=ss;exports.PaginationPrevious=rs;exports.PasswordInput=os;exports.PercentageInput=Ea;exports.PhoneInput=ls;exports.Pill=cs;exports.Popover=je;exports.PopoverContent=ue;exports.PopoverTrigger=Se;exports.Progress=us;exports.RadioGroup=ms;exports.RadioGroupItem=ps;exports.Rating=fs;exports.ResizableHandle=xs;exports.ResizablePanel=st;exports.ResizablePanelGroup=gs;exports.RichText=hs;exports.RichTextToolbar=bs;exports.ScrollArea=Ns;exports.ScrollBar=it;exports.SearchInput=vs;exports.Select=fe;exports.SelectContent=le;exports.SelectGroup=Co;exports.SelectItem=ae;exports.SelectLabel=ya;exports.SelectScrollDownButton=We;exports.SelectScrollUpButton=Ze;exports.SelectSeparator=ja;exports.SelectTrigger=ie;exports.SelectValue=ge;exports.Separator=he;exports.Sheet=Dr;exports.SheetClose=Ko;exports.SheetContent=tt;exports.SheetDescription=Fr;exports.SheetFooter=_r;exports.SheetHeader=Lr;exports.SheetOverlay=et;exports.SheetPortal=Mr;exports.SheetTitle=Or;exports.SheetTrigger=Pr;exports.Shortcut=gr;exports.Sidebar=Rs;exports.SidebarContent=Ts;exports.SidebarFooter=ks;exports.SidebarGroup=Is;exports.SidebarGroupContent=Ds;exports.SidebarGroupLabel=As;exports.SidebarHeader=Es;exports.SidebarMenu=Ps;exports.SidebarMenuButton=Ls;exports.SidebarMenuItem=Ms;exports.SidebarMenuSub=_s;exports.SidebarMenuSubButton=Fs;exports.SidebarMenuSubItem=Os;exports.SidebarProvider=ai;exports.SidebarSeparator=zs;exports.SidebarTrigger=Cs;exports.Skeleton=si;exports.Slider=Bs;exports.Spinner=Us;exports.Stepper=Gs;exports.StepperContent=$s;exports.Switch=Vs;exports.Table=qs;exports.TableBody=Xs;exports.TableCaption=Qs;exports.TableCell=Js;exports.TableFooter=Ys;exports.TableHead=Ws;exports.TableHeader=Ks;exports.TableRow=Zs;exports.Tabs=oi;exports.TabsContent=an;exports.TabsList=en;exports.TabsTrigger=tn;exports.Textarea=rn;exports.TimePicker=nn;exports.TimePickerInput=sn;exports.Timeline=on;exports.TimelineContent=un;exports.TimelineDescription=gn;exports.TimelineDot=cn;exports.TimelineHeader=mn;exports.TimelineHorizontal=xn;exports.TimelineHorizontalItem=bn;exports.TimelineHorizontalLine=hn;exports.TimelineItem=ln;exports.TimelineLine=dn;exports.TimelineTime=fn;exports.TimelineTitle=pn;exports.Toaster=ni;exports.Toggle=ot;exports.ToggleGroup=vn;exports.ToggleGroupItem=wn;exports.Tooltip=fi;exports.TooltipContent=yn;exports.TooltipProvider=pi;exports.TooltipTrigger=gi;exports.TreeView=jn;exports.UnitInput=Ta;exports.Video=Nr;exports.badgeVariants=At;exports.bannerVariants=Dt;exports.buttonVariants=ee;exports.cn=o;exports.currencies=Ra;exports.defaultCountries=is;exports.formLabelVariants=tr;exports.formatFileSize=Ee;exports.formatKey=pr;exports.getFileType=Ja;exports.kbdVariants=ur;exports.linkVariants=xr;exports.mediaVariants=be;exports.navigationMenuTriggerStyle=Yr;exports.pillVariants=ds;exports.spinnerVariants=Hs;exports.toggleVariants=nt;exports.useNavigationDrawer=me;exports.useSidebar=ne;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),R=require("react"),vi=require("react-dom");function Vb(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const m=Vb(R),Vl=Vb(vi);function XA(t,e){const n=m.createContext(e),r=s=>{const{children:i,...a}=s,l=m.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:i})};r.displayName=t+"Provider";function o(s){const i=m.useContext(n);if(i)return i;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[r,o]}function Ie(t,e=[]){let n=[];function r(s,i){const a=m.createContext(i),l=n.length;n=[...n,i];const c=d=>{var v;const{scope:f,children:h,...g}=d,b=((v=f==null?void 0:f[t])==null?void 0:v[l])||a,y=m.useMemo(()=>g,Object.values(g));return p.jsx(b.Provider,{value:y,children:h})};c.displayName=s+"Provider";function u(d,f){var b;const h=((b=f==null?void 0:f[t])==null?void 0:b[l])||a,g=m.useContext(h);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>m.createContext(i));return function(a){const l=(a==null?void 0:a[t])||s;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return o.scopeName=t,[r,JA(o,...e)]}function JA(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}function Zh(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function rn(...t){return e=>{let n=!1;const r=t.map(o=>{const s=Zh(o,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Zh(t[o],null)}}}}function oe(...t){return m.useCallback(rn(...t),t)}function Jr(t){const e=ZA(t),n=m.forwardRef((r,o)=>{const{children:s,...i}=r,a=m.Children.toArray(s),l=a.find(QA);if(l){const c=l.props.children,u=a.map(d=>d===l?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:d);return p.jsx(e,{...i,ref:o,children:m.isValidElement(c)?m.cloneElement(c,void 0,u):null})}return p.jsx(e,{...i,ref:o,children:s})});return n.displayName=`${t}.Slot`,n}function ZA(t){const e=m.forwardRef((n,r)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const i=tO(o),a=eO(s,o.props);return o.type!==m.Fragment&&(a.ref=r?rn(r,i):i),m.cloneElement(o,a)}return m.Children.count(o)>1?m.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Wb=Symbol("radix.slottable");function Ub(t){const e=({children:n})=>p.jsx(p.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=Wb,e}function QA(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Wb}function eO(t,e){const n={...e};for(const r in e){const o=t[r],s=e[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...t,...n}}function tO(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function kr(t){const e=t+"CollectionProvider",[n,r]=Ie(e),[o,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),i=b=>{const{scope:y,children:v}=b,x=R.useRef(null),w=R.useRef(new Map).current;return p.jsx(o,{scope:y,itemMap:w,collectionRef:x,children:v})};i.displayName=e;const a=t+"CollectionSlot",l=Jr(a),c=R.forwardRef((b,y)=>{const{scope:v,children:x}=b,w=s(a,v),S=oe(y,w.collectionRef);return p.jsx(l,{ref:S,children:x})});c.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",f=Jr(u),h=R.forwardRef((b,y)=>{const{scope:v,children:x,...w}=b,S=R.useRef(null),C=oe(y,S),k=s(u,v);return R.useEffect(()=>(k.itemMap.set(S,{ref:S,...w}),()=>void k.itemMap.delete(S))),p.jsx(f,{[d]:"",ref:C,children:x})});h.displayName=u;function g(b){const y=s(t+"CollectionConsumer",b);return R.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((k,N)=>w.indexOf(k.ref.current)-w.indexOf(N.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},g,r]}function P(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}var De=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},nO=m[" useInsertionEffect ".trim().toString()]||De;function Oe({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[o,s,i]=rO({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:o;{const u=m.useRef(t!==void 0);m.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=m.useCallback(u=>{var d;if(a){const f=oO(u)?u(t):u;f!==t&&((d=i.current)==null||d.call(i,f))}else s(u)},[a,t,s,i]);return[l,c]}function rO({defaultProp:t,onChange:e}){const[n,r]=m.useState(t),o=m.useRef(n),s=m.useRef(e);return nO(()=>{s.current=e},[e]),m.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function oO(t){return typeof t=="function"}var sO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Z=sO.reduce((t,e)=>{const n=Jr(`Primitive.${e}`),r=m.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Ia(t,e){t&&Vl.flushSync(()=>t.dispatchEvent(e))}function iO(t,e){return m.useReducer((n,r)=>e[n][r]??n,t)}var Pe=t=>{const{present:e,children:n}=t,r=aO(e),o=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),s=oe(r.ref,lO(o));return typeof n=="function"||r.isPresent?m.cloneElement(o,{ref:s}):null};Pe.displayName="Presence";function aO(t){const[e,n]=m.useState(),r=m.useRef(null),o=m.useRef(t),s=m.useRef("none"),i=t?"mounted":"unmounted",[a,l]=iO(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=ta(r.current);s.current=a==="mounted"?c:"none"},[a]),De(()=>{const c=r.current,u=o.current;if(u!==t){const f=s.current,h=ta(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,l]),De(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=h=>{const b=ta(r.current).includes(CSS.escape(h.animationName));if(h.target===e&&b&&(l("ANIMATION_END"),!o.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},f=h=>{h.target===e&&(s.current=ta(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function ta(t){return(t==null?void 0:t.animationName)||"none"}function lO(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var cO=m[" useId ".trim().toString()]||(()=>{}),uO=0;function Ee(t){const[e,n]=m.useState(cO());return De(()=>{n(r=>r??String(uO++))},[t]),t||(e?`radix-${e}`:"")}var Wl="Collapsible",[dO,Gb]=Ie(Wl),[fO,of]=dO(Wl),Kb=m.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=t,[l,c]=Oe({prop:r,defaultProp:o??!1,onChange:i,caller:Wl});return p.jsx(fO,{scope:n,disabled:s,contentId:Ee(),open:l,onOpenToggle:m.useCallback(()=>c(u=>!u),[c]),children:p.jsx(Z.div,{"data-state":cf(l),"data-disabled":s?"":void 0,...a,ref:e})})});Kb.displayName=Wl;var Yb="CollapsibleTrigger",sf=m.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,o=of(Yb,n);return p.jsx(Z.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":cf(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:e,onClick:P(t.onClick,o.onOpenToggle)})});sf.displayName=Yb;var af="CollapsibleContent",lf=m.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=of(af,t.__scopeCollapsible);return p.jsx(Pe,{present:n||o.open,children:({present:s})=>p.jsx(pO,{...r,ref:e,present:s})})});lf.displayName=af;var pO=m.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=t,i=of(af,n),[a,l]=m.useState(r),c=m.useRef(null),u=oe(e,c),d=m.useRef(0),f=d.current,h=m.useRef(0),g=h.current,b=i.open||a,y=m.useRef(b),v=m.useRef(void 0);return m.useEffect(()=>{const x=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(x)},[]),De(()=>{const x=c.current;if(x){v.current=v.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();d.current=w.height,h.current=w.width,y.current||(x.style.transitionDuration=v.current.transitionDuration,x.style.animationName=v.current.animationName),l(r)}},[i.open,r]),p.jsx(Z.div,{"data-state":cf(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!b,...s,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:b&&o})});function cf(t){return t?"open":"closed"}var uf=Kb,qb=sf,Xb=lf,hO=m.createContext(void 0);function an(t){const e=m.useContext(hO);return t||e||"ltr"}var ln="Accordion",mO=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[df,gO,bO]=kr(ln),[Ul]=Ie(ln,[bO,Gb]),ff=Gb(),Jb=R.forwardRef((t,e)=>{const{type:n,...r}=t,o=r,s=r;return p.jsx(df.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?p.jsx(wO,{...s,ref:e}):p.jsx(xO,{...o,ref:e})})});Jb.displayName=ln;var[Zb,yO]=Ul(ln),[Qb,vO]=Ul(ln,{collapsible:!1}),xO=R.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...i}=t,[a,l]=Oe({prop:n,defaultProp:r??"",onChange:o,caller:ln});return p.jsx(Zb,{scope:t.__scopeAccordion,value:R.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:R.useCallback(()=>s&&l(""),[s,l]),children:p.jsx(Qb,{scope:t.__scopeAccordion,collapsible:s,children:p.jsx(ey,{...i,ref:e})})})}),wO=R.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=t,[i,a]=Oe({prop:n,defaultProp:r??[],onChange:o,caller:ln}),l=R.useCallback(u=>a((d=[])=>[...d,u]),[a]),c=R.useCallback(u=>a((d=[])=>d.filter(f=>f!==u)),[a]);return p.jsx(Zb,{scope:t.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:p.jsx(Qb,{scope:t.__scopeAccordion,collapsible:!0,children:p.jsx(ey,{...s,ref:e})})})}),[SO,Gl]=Ul(ln),ey=R.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...i}=t,a=R.useRef(null),l=oe(a,e),c=gO(n),d=an(o)==="ltr",f=P(t.onKeyDown,h=>{var E;if(!mO.includes(h.key))return;const g=h.target,b=c().filter(T=>{var O;return!((O=T.ref.current)!=null&&O.disabled)}),y=b.findIndex(T=>T.ref.current===g),v=b.length;if(y===-1)return;h.preventDefault();let x=y;const w=0,S=v-1,C=()=>{x=y+1,x>S&&(x=w)},k=()=>{x=y-1,x<w&&(x=S)};switch(h.key){case"Home":x=w;break;case"End":x=S;break;case"ArrowRight":s==="horizontal"&&(d?C():k());break;case"ArrowDown":s==="vertical"&&C();break;case"ArrowLeft":s==="horizontal"&&(d?k():C());break;case"ArrowUp":s==="vertical"&&k();break}const N=x%v;(E=b[N].ref.current)==null||E.focus()});return p.jsx(SO,{scope:n,disabled:r,direction:o,orientation:s,children:p.jsx(df.Slot,{scope:n,children:p.jsx(Z.div,{...i,"data-orientation":s,ref:l,onKeyDown:r?void 0:f})})})}),Pa="AccordionItem",[CO,pf]=Ul(Pa),ty=R.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...o}=t,s=Gl(Pa,n),i=yO(Pa,n),a=ff(n),l=Ee(),c=r&&i.value.includes(r)||!1,u=s.disabled||t.disabled;return p.jsx(CO,{scope:n,open:c,disabled:u,triggerId:l,children:p.jsx(uf,{"data-orientation":s.orientation,"data-state":ay(c),...a,...o,ref:e,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(r):i.onItemClose(r)}})})});ty.displayName=Pa;var ny="AccordionHeader",ry=R.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,o=Gl(ln,n),s=pf(ny,n);return p.jsx(Z.h3,{"data-orientation":o.orientation,"data-state":ay(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:e})});ry.displayName=ny;var Uu="AccordionTrigger",oy=R.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,o=Gl(ln,n),s=pf(Uu,n),i=vO(Uu,n),a=ff(n);return p.jsx(df.ItemSlot,{scope:n,children:p.jsx(qb,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...a,...r,ref:e})})});oy.displayName=Uu;var sy="AccordionContent",iy=R.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,o=Gl(ln,n),s=pf(sy,n),i=ff(n);return p.jsx(Xb,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});iy.displayName=sy;function ay(t){return t?"open":"closed"}var kO=Jb,NO=ty,EO=ry,ly=oy,cy=iy;/**
|
|
2
|
+
* @license lucide-react v0.395.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const MO=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uy=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
|
|
7
|
+
* @license lucide-react v0.395.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var TO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
|
+
* @license lucide-react v0.395.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const RO=R.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>R.createElement("svg",{ref:l,...TO,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:uy("lucide",o),...a},[...i.map(([c,u])=>R.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
17
|
+
* @license lucide-react v0.395.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ie=(t,e)=>{const n=R.forwardRef(({className:r,...o},s)=>R.createElement(RO,{ref:s,iconNode:e,className:uy(`lucide-${MO(t)}`,r),...o}));return n.displayName=`${t}`,n};/**
|
|
22
|
+
* @license lucide-react v0.395.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const AO=ie("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
27
|
+
* @license lucide-react v0.395.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const OO=ie("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
32
|
+
* @license lucide-react v0.395.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const DO=ie("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
37
|
+
* @license lucide-react v0.395.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const IO=ie("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
|
|
42
|
+
* @license lucide-react v0.395.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const Kl=ie("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
47
|
+
* @license lucide-react v0.395.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const kt=ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
52
|
+
* @license lucide-react v0.395.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const Bn=ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
57
|
+
* @license lucide-react v0.395.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const hf=ie("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
62
|
+
* @license lucide-react v0.395.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const Nr=ie("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
67
|
+
* @license lucide-react v0.395.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Sa=ie("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
72
|
+
* @license lucide-react v0.395.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const PO=ie("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
77
|
+
* @license lucide-react v0.395.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const jO=ie("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
82
|
+
* @license lucide-react v0.395.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Yl=ie("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
87
|
+
* @license lucide-react v0.395.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const mf=ie("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
92
|
+
* @license lucide-react v0.395.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const _O=ie("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
97
|
+
* @license lucide-react v0.395.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const LO=ie("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
102
|
+
* @license lucide-react v0.395.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const dy=ie("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
|
|
107
|
+
* @license lucide-react v0.395.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const fy=ie("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
|
|
112
|
+
* @license lucide-react v0.395.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const py=ie("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
117
|
+
* @license lucide-react v0.395.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const FO=ie("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
122
|
+
* @license lucide-react v0.395.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const $O=ie("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
|
127
|
+
* @license lucide-react v0.395.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const BO=ie("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
132
|
+
* @license lucide-react v0.395.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const zO=ie("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
137
|
+
* @license lucide-react v0.395.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const gf=ie("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
142
|
+
* @license lucide-react v0.395.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const HO=ie("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
|
|
147
|
+
* @license lucide-react v0.395.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const VO=ie("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
152
|
+
* @license lucide-react v0.395.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const WO=ie("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
157
|
+
* @license lucide-react v0.395.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const UO=ie("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
162
|
+
* @license lucide-react v0.395.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const GO=ie("Heading1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);/**
|
|
167
|
+
* @license lucide-react v0.395.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const KO=ie("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);/**
|
|
172
|
+
* @license lucide-react v0.395.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const YO=ie("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/**
|
|
177
|
+
* @license lucide-react v0.395.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const qO=ie("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
182
|
+
* @license lucide-react v0.395.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const XO=ie("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
|
|
187
|
+
* @license lucide-react v0.395.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const JO=ie("ListOrdered",[["line",{x1:"10",x2:"21",y1:"6",y2:"6",key:"76qw6h"}],["line",{x1:"10",x2:"21",y1:"12",y2:"12",key:"16nom4"}],["line",{x1:"10",x2:"21",y1:"18",y2:"18",key:"u3jurt"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
192
|
+
* @license lucide-react v0.395.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const ZO=ie("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
|
|
197
|
+
* @license lucide-react v0.395.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const ja=ie("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
202
|
+
* @license lucide-react v0.395.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const hy=ie("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
207
|
+
* @license lucide-react v0.395.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const QO=ie("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
212
|
+
* @license lucide-react v0.395.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const eD=ie("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/**
|
|
217
|
+
* @license lucide-react v0.395.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const tD=ie("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
222
|
+
* @license lucide-react v0.395.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const my=ie("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
227
|
+
* @license lucide-react v0.395.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const nD=ie("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
|
|
232
|
+
* @license lucide-react v0.395.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const rD=ie("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
237
|
+
* @license lucide-react v0.395.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const oD=ie("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
242
|
+
* @license lucide-react v0.395.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const sD=ie("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
|
|
247
|
+
* @license lucide-react v0.395.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const iD=ie("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
252
|
+
* @license lucide-react v0.395.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const aD=ie("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
257
|
+
* @license lucide-react v0.395.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const lD=ie("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
|
|
262
|
+
* @license lucide-react v0.395.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const cD=ie("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/**
|
|
267
|
+
* @license lucide-react v0.395.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const xi=ie("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
272
|
+
* @license lucide-react v0.395.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const Qh=ie("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
|
|
277
|
+
* @license lucide-react v0.395.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const uD=ie("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
|
|
282
|
+
* @license lucide-react v0.395.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const dD=ie("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/**
|
|
287
|
+
* @license lucide-react v0.395.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const em=ie("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
292
|
+
* @license lucide-react v0.395.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const fD=ie("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/**
|
|
297
|
+
* @license lucide-react v0.395.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const pD=ie("VolumeX",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
|
|
302
|
+
* @license lucide-react v0.395.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const Nt=ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function gy(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=gy(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function by(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=gy(t))&&(r&&(r+=" "),r+=e);return r}const bf="-",hD=t=>{const e=gD(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{const a=i.split(bf);return a[0]===""&&a.length!==1&&a.shift(),yy(a,e)||mD(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},yy=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),o=r?yy(t.slice(1),r):void 0;if(o)return o;if(e.validators.length===0)return;const s=t.join(bf);return(i=e.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},tm=/^\[(.+)\]$/,mD=t=>{if(tm.test(t)){const e=tm.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},gD=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return yD(Object.entries(t.classGroups),n).forEach(([s,i])=>{Gu(i,r,s,e)}),r},Gu=(t,e,n,r)=>{t.forEach(o=>{if(typeof o=="string"){const s=o===""?e:nm(e,o);s.classGroupId=n;return}if(typeof o=="function"){if(bD(o)){Gu(o(r),e,n,r);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Gu(i,nm(e,s),n,r)})})},nm=(t,e)=>{let n=t;return e.split(bf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bD=t=>t.isThemeGetter,yD=(t,e)=>e?t.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[e+i,a])):s);return[n,o]}):t,vD=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),e++,e>t&&(e=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},vy="!",xD=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,o=e[0],s=e.length,i=a=>{const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+s)===e)){l.push(a.slice(u,y)),u=y+s;continue}if(v==="/"){d=y;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(vy),g=h?f.substring(1):f,b=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:b}};return n?a=>n({className:a,parseClassName:i}):i},wD=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},SD=t=>({cache:vD(t.cacheSize),parseClassName:xD(t),...hD(t)}),CD=/\s+/,kD=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,s=[],i=t.trim().split(CD);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(c);let g=!!h,b=r(g?f.substring(0,h):f);if(!b){if(!g){a=c+(a.length>0?" "+a:a);continue}if(b=r(f),!b){a=c+(a.length>0?" "+a:a);continue}g=!1}const y=wD(u).join(":"),v=d?y+vy:y,x=v+b;if(s.includes(x))continue;s.push(x);const w=o(b,g);for(let S=0;S<w.length;++S){const C=w[S];s.push(v+C)}a=c+(a.length>0?" "+a:a)}return a};function ND(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=xy(e))&&(r&&(r+=" "),r+=n);return r}const xy=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=xy(t[r]))&&(n&&(n+=" "),n+=e);return n};function ED(t,...e){let n,r,o,s=i;function i(l){const c=e.reduce((u,d)=>d(u),t());return n=SD(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=kD(l,n);return o(l,u),u}return function(){return s(ND.apply(null,arguments))}}const Re=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},wy=/^\[(?:([a-z-]+):)?(.+)\]$/i,MD=/^\d+\/\d+$/,TD=new Set(["px","full","screen"]),RD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,OD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,DD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ID=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,On=t=>Fo(t)||TD.has(t)||MD.test(t),Zn=t=>rs(t,"length",zD),Fo=t=>!!t&&!Number.isNaN(Number(t)),Kc=t=>rs(t,"number",Fo),xs=t=>!!t&&Number.isInteger(Number(t)),PD=t=>t.endsWith("%")&&Fo(t.slice(0,-1)),me=t=>wy.test(t),Qn=t=>RD.test(t),jD=new Set(["length","size","percentage"]),_D=t=>rs(t,jD,Sy),LD=t=>rs(t,"position",Sy),FD=new Set(["image","url"]),$D=t=>rs(t,FD,VD),BD=t=>rs(t,"",HD),ws=()=>!0,rs=(t,e,n)=>{const r=wy.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},zD=t=>AD.test(t)&&!OD.test(t),Sy=()=>!1,HD=t=>DD.test(t),VD=t=>ID.test(t),WD=()=>{const t=Re("colors"),e=Re("spacing"),n=Re("blur"),r=Re("brightness"),o=Re("borderColor"),s=Re("borderRadius"),i=Re("borderSpacing"),a=Re("borderWidth"),l=Re("contrast"),c=Re("grayscale"),u=Re("hueRotate"),d=Re("invert"),f=Re("gap"),h=Re("gradientColorStops"),g=Re("gradientColorStopPositions"),b=Re("inset"),y=Re("margin"),v=Re("opacity"),x=Re("padding"),w=Re("saturate"),S=Re("scale"),C=Re("sepia"),k=Re("skew"),N=Re("space"),E=Re("translate"),T=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",me,e],D=()=>[me,e],z=()=>["",On,Zn],$=()=>["auto",Fo,me],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",me],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[Fo,me];return{cacheSize:500,separator:":",theme:{colors:[ws],spacing:[On,Zn],blur:["none","",Qn,me],brightness:K(),borderColor:[t],borderRadius:["none","","full",Qn,me],borderSpacing:D(),borderWidth:z(),contrast:K(),grayscale:j(),hueRotate:K(),invert:j(),gap:D(),gradientColorStops:[t],gradientColorStopPositions:[PD,Zn],inset:A(),margin:A(),opacity:K(),padding:D(),saturate:K(),scale:K(),sepia:j(),skew:K(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),me]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",xs,me]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",me]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",xs,me]}],"grid-cols":[{"grid-cols":[ws]}],"col-start-end":[{col:["auto",{span:["full",xs,me]},me]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[ws]}],"row-start-end":[{row:["auto",{span:[xs,me]},me]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,e]}],"min-w":[{"min-w":[me,e,"min","max","fit"]}],"max-w":[{"max-w":[me,e,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[me,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Zn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kc]}],"font-family":[{font:[ws]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",me]}],"line-clamp":[{"line-clamp":["none",Fo,Kc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",On,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",On,Zn]}],"underline-offset":[{"underline-offset":["auto",On,me]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),LD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_D]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$D]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[On,me]}],"outline-w":[{outline:[On,Zn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[On,Zn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Qn,BD]}],"shadow-color":[{shadow:[ws]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qn,me]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",me]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[xs,me]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[On,Zn,Kc]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},UD=ED(WD);function M(...t){return UD(by(t))}const GD=kO,Cy=m.forwardRef(({className:t,...e},n)=>p.jsx(NO,{ref:n,className:M("border-b border-[var(--container-border-alt)]",t),...e}));Cy.displayName="AccordionItem";const ky=m.forwardRef(({className:t,children:e,...n},r)=>p.jsx(EO,{className:"flex",children:p.jsxs(ly,{ref:r,className:M("font-[var(--font-heading)] font-weight-bold text-[var(--container-fg)] flex flex-1 items-center justify-between py-4 transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,p.jsx(Bn,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ky.displayName=ly.displayName;const Ny=m.forwardRef(({className:t,children:e,...n},r)=>p.jsx(cy,{ref:r,className:"overflow-hidden text-[var(--container-fg-alt)] text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:p.jsx("div",{className:M("pb-4 pt-0",t),children:e})}));Ny.displayName=cy.displayName;const rm=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,om=by,Xe=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return om(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=e,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=rm(u)||rm(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(g=>{let[b,y]=g;return Array.isArray(y)?y.includes({...s,...a}[b]):{...s,...a}[b]===y})?[...c,d,f]:c},[]);return om(t,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},KD=Xe("relative w-full rounded-[var(--curves-xl)] border p-[var(--spacing-xs)] [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",success:"border-green-500/50 text-green-700 dark:text-green-400 [&>svg]:text-green-600",warning:"border-yellow-500/50 text-yellow-700 dark:text-yellow-400 [&>svg]:text-yellow-600",info:"border-blue-500/50 text-blue-700 dark:text-blue-400 [&>svg]:text-blue-600"}},defaultVariants:{variant:"default"}}),Ey=m.forwardRef(({className:t,variant:e,...n},r)=>p.jsx("div",{ref:r,role:"alert",className:M(KD({variant:e}),t),...n}));Ey.displayName="Alert";const My=m.forwardRef(({className:t,...e},n)=>p.jsx("h5",{ref:n,className:M("font-heading mb-1 font-medium leading-none tracking-tight",t),...e}));My.displayName="AlertTitle";const Ty=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("text-sm [&_p]:leading-relaxed",t),...e}));Ty.displayName="AlertDescription";function ke(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function YD(t,e=globalThis==null?void 0:globalThis.document){const n=ke(t);m.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var qD="DismissableLayer",Ku="dismissableLayer.update",XD="dismissableLayer.pointerDownOutside",JD="dismissableLayer.focusOutside",sm,Ry=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Er=m.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=t,c=m.useContext(Ry),[u,d]=m.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=m.useState({}),g=oe(e,N=>d(N)),b=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=b.indexOf(y),x=u?b.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,C=eI(N=>{const E=N.target,T=[...c.branches].some(O=>O.contains(E));!S||T||(o==null||o(N),i==null||i(N),N.defaultPrevented||a==null||a())},f),k=tI(N=>{const E=N.target;[...c.branches].some(O=>O.contains(E))||(s==null||s(N),i==null||i(N),N.defaultPrevented||a==null||a())},f);return YD(N=>{x===c.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},f),m.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(sm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),im(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=sm)}},[u,f,n,c]),m.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),im())},[u,c]),m.useEffect(()=>{const N=()=>h({});return document.addEventListener(Ku,N),()=>document.removeEventListener(Ku,N)},[]),p.jsx(Z.div,{...l,ref:g,style:{pointerEvents:w?S?"auto":"none":void 0,...t.style},onFocusCapture:P(t.onFocusCapture,k.onFocusCapture),onBlurCapture:P(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:P(t.onPointerDownCapture,C.onPointerDownCapture)})});Er.displayName=qD;var ZD="DismissableLayerBranch",QD=m.forwardRef((t,e)=>{const n=m.useContext(Ry),r=m.useRef(null),o=oe(e,r);return m.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(Z.div,{...t,ref:o})});QD.displayName=ZD;function eI(t,e=globalThis==null?void 0:globalThis.document){const n=ke(t),r=m.useRef(!1),o=m.useRef(()=>{});return m.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Ay(XD,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=l,e.addEventListener("click",o.current,{once:!0})):l()}else e.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",s),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function tI(t,e=globalThis==null?void 0:globalThis.document){const n=ke(t),r=m.useRef(!1);return m.useEffect(()=>{const o=s=>{s.target&&!r.current&&Ay(JD,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function im(){const t=new CustomEvent(Ku);document.dispatchEvent(t)}function Ay(t,e,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?Ia(o,s):o.dispatchEvent(s)}var Yc="focusScope.autoFocusOnMount",qc="focusScope.autoFocusOnUnmount",am={bubbles:!1,cancelable:!0},nI="FocusScope",wi=m.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=t,[a,l]=m.useState(null),c=ke(o),u=ke(s),d=m.useRef(null),f=oe(e,b=>l(b)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let b=function(w){if(h.paused||!a)return;const S=w.target;a.contains(S)?d.current=S:nr(d.current,{select:!0})},y=function(w){if(h.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||nr(d.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&nr(a)};document.addEventListener("focusin",b),document.addEventListener("focusout",y);const x=new MutationObserver(v);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",y),x.disconnect()}}},[r,a,h.paused]),m.useEffect(()=>{if(a){cm.add(h);const b=document.activeElement;if(!a.contains(b)){const v=new CustomEvent(Yc,am);a.addEventListener(Yc,c),a.dispatchEvent(v),v.defaultPrevented||(rI(lI(Oy(a)),{select:!0}),document.activeElement===b&&nr(a))}return()=>{a.removeEventListener(Yc,c),setTimeout(()=>{const v=new CustomEvent(qc,am);a.addEventListener(qc,u),a.dispatchEvent(v),v.defaultPrevented||nr(b??document.body,{select:!0}),a.removeEventListener(qc,u),cm.remove(h)},0)}}},[a,c,u,h]);const g=m.useCallback(b=>{if(!n&&!r||h.paused)return;const y=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,v=document.activeElement;if(y&&v){const x=b.currentTarget,[w,S]=oI(x);w&&S?!b.shiftKey&&v===S?(b.preventDefault(),n&&nr(w,{select:!0})):b.shiftKey&&v===w&&(b.preventDefault(),n&&nr(S,{select:!0})):v===x&&b.preventDefault()}},[n,r,h.paused]);return p.jsx(Z.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})});wi.displayName=nI;function rI(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(nr(r,{select:e}),document.activeElement!==n)return}function oI(t){const e=Oy(t),n=lm(e,t),r=lm(e.reverse(),t);return[n,r]}function Oy(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function lm(t,e){for(const n of t)if(!sI(n,{upTo:e}))return n}function sI(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function iI(t){return t instanceof HTMLInputElement&&"select"in t}function nr(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&iI(t)&&e&&t.select()}}var cm=aI();function aI(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=um(t,e),t.unshift(e)},remove(e){var n;t=um(t,e),(n=t[0])==null||n.resume()}}}function um(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function lI(t){return t.filter(e=>e.tagName!=="A")}var cI="Portal",Si=m.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[o,s]=m.useState(!1);De(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?vi.createPortal(p.jsx(Z.div,{...r,ref:e}),i):null});Si.displayName=cI;var Xc=0;function ql(){m.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??dm()),document.body.insertAdjacentElement("beforeend",t[1]??dm()),Xc++,()=>{Xc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Xc--}},[])}function dm(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var mn=function(){return mn=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},mn.apply(this,arguments)};function Dy(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function uI(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,s;r<o;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var Ca="right-scroll-bar-position",ka="width-before-scroll-bar",dI="with-scroll-bars-hidden",fI="--removed-body-scroll-bar-size";function Jc(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function pI(t,e){var n=R.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=e,n.facade}var hI=typeof window<"u"?m.useLayoutEffect:m.useEffect,fm=new WeakMap;function mI(t,e){var n=pI(null,function(r){return t.forEach(function(o){return Jc(o,r)})});return hI(function(){var r=fm.get(n);if(r){var o=new Set(r),s=new Set(t),i=n.current;o.forEach(function(a){s.has(a)||Jc(a,null)}),s.forEach(function(a){o.has(a)||Jc(a,i)})}fm.set(n,t)},[t]),n}function gI(t){return t}function bI(t,e){e===void 0&&(e=gI);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var i=e(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function yI(t){t===void 0&&(t={});var e=bI(null);return e.options=mn({async:!0,ssr:!1},t),e}var Iy=function(t){var e=t.sideCar,n=Dy(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,mn({},n))};Iy.isSideCarExport=!0;function vI(t,e){return t.useMedium(e),Iy}var Py=yI(),Zc=function(){},Xl=m.forwardRef(function(t,e){var n=m.useRef(null),r=m.useState({onScrollCapture:Zc,onWheelCapture:Zc,onTouchMoveCapture:Zc}),o=r[0],s=r[1],i=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,f=t.sideCar,h=t.noRelative,g=t.noIsolation,b=t.inert,y=t.allowPinchZoom,v=t.as,x=v===void 0?"div":v,w=t.gapMode,S=Dy(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,k=mI([n,e]),N=mn(mn({},S),o);return m.createElement(m.Fragment,null,u&&m.createElement(C,{sideCar:Py,removeScrollBar:c,shards:d,noRelative:h,noIsolation:g,inert:b,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:w}),i?m.cloneElement(m.Children.only(a),mn(mn({},N),{ref:k})):m.createElement(x,mn({},N,{className:l,ref:k}),a))});Xl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xl.classNames={fullWidth:ka,zeroRight:Ca};var xI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wI(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=xI();return e&&t.setAttribute("nonce",e),t}function SI(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function CI(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var kI=function(){var t=0,e=null;return{add:function(n){t==0&&(e=wI())&&(SI(e,n),CI(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},NI=function(){var t=kI();return function(e,n){m.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},jy=function(){var t=NI(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e},EI={left:0,top:0,right:0,gap:0},Qc=function(t){return parseInt(t||"",10)||0},MI=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[Qc(n),Qc(r),Qc(o)]},TI=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return EI;var e=MI(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},RI=jy(),$o="data-scroll-locked",AI=function(t,e,n,r){var o=t.left,s=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
307
|
+
.`.concat(dI,` {
|
|
308
|
+
overflow: hidden `).concat(r,`;
|
|
309
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
310
|
+
}
|
|
311
|
+
body[`).concat($o,`] {
|
|
312
|
+
overflow: hidden `).concat(r,`;
|
|
313
|
+
overscroll-behavior: contain;
|
|
314
|
+
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
315
|
+
padding-left: `.concat(o,`px;
|
|
316
|
+
padding-top: `).concat(s,`px;
|
|
317
|
+
padding-right: `).concat(i,`px;
|
|
318
|
+
margin-left:0;
|
|
319
|
+
margin-top:0;
|
|
320
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
321
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.`).concat(Ca,` {
|
|
325
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.`).concat(ka,` {
|
|
329
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.`).concat(Ca," .").concat(Ca,` {
|
|
333
|
+
right: 0 `).concat(r,`;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.`).concat(ka," .").concat(ka,` {
|
|
337
|
+
margin-right: 0 `).concat(r,`;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
body[`).concat($o,`] {
|
|
341
|
+
`).concat(fI,": ").concat(a,`px;
|
|
342
|
+
}
|
|
343
|
+
`)},pm=function(){var t=parseInt(document.body.getAttribute($o)||"0",10);return isFinite(t)?t:0},OI=function(){m.useEffect(function(){return document.body.setAttribute($o,(pm()+1).toString()),function(){var t=pm()-1;t<=0?document.body.removeAttribute($o):document.body.setAttribute($o,t.toString())}},[])},DI=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,o=r===void 0?"margin":r;OI();var s=m.useMemo(function(){return TI(o)},[o]);return m.createElement(RI,{styles:AI(s,!e,o,n?"":"!important")})},Yu=!1;if(typeof window<"u")try{var na=Object.defineProperty({},"passive",{get:function(){return Yu=!0,!0}});window.addEventListener("test",na,na),window.removeEventListener("test",na,na)}catch{Yu=!1}var So=Yu?{passive:!1}:!1,II=function(t){return t.tagName==="TEXTAREA"},_y=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!II(t)&&n[e]==="visible")},PI=function(t){return _y(t,"overflowY")},jI=function(t){return _y(t,"overflowX")},hm=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ly(t,r);if(o){var s=Fy(t,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},_I=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},LI=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Ly=function(t,e){return t==="v"?PI(e):jI(e)},Fy=function(t,e){return t==="v"?_I(e):LI(e)},FI=function(t,e){return t==="h"&&e==="rtl"?-1:1},$I=function(t,e,n,r,o){var s=FI(t,window.getComputedStyle(e).direction),i=s*r,a=n.target,l=e.contains(a),c=!1,u=i>0,d=0,f=0;do{if(!a)break;var h=Fy(t,a),g=h[0],b=h[1],y=h[2],v=b-y-s*g;(g||v)&&Ly(t,a)&&(d+=v,f+=g);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&Math.abs(d)<1||!u&&Math.abs(f)<1)&&(c=!0),c},ra=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},mm=function(t){return[t.deltaX,t.deltaY]},gm=function(t){return t&&"current"in t?t.current:t},BI=function(t,e){return t[0]===e[0]&&t[1]===e[1]},zI=function(t){return`
|
|
344
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
345
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
346
|
+
`)},HI=0,Co=[];function VI(t){var e=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),o=m.useState(HI++)[0],s=m.useState(jy)[0],i=m.useRef(t);m.useEffect(function(){i.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var b=uI([t.lockRef.current],(t.shards||[]).map(gm),!0).filter(Boolean);return b.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(b,y){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!i.current.allowPinchZoom;var v=ra(b),x=n.current,w="deltaX"in b?b.deltaX:x[0]-v[0],S="deltaY"in b?b.deltaY:x[1]-v[1],C,k=b.target,N=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in b&&N==="h"&&k.type==="range")return!1;var E=window.getSelection(),T=E&&E.anchorNode,O=T?T===k||T.contains(k):!1;if(O)return!1;var A=hm(N,k);if(!A)return!0;if(A?C=N:(C=N==="v"?"h":"v",A=hm(N,k)),!A)return!1;if(!r.current&&"changedTouches"in b&&(w||S)&&(r.current=C),!C)return!0;var D=r.current||C;return $I(D,y,b,D==="h"?w:S)},[]),l=m.useCallback(function(b){var y=b;if(!(!Co.length||Co[Co.length-1]!==s)){var v="deltaY"in y?mm(y):ra(y),x=e.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&BI(C.delta,v)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var w=(i.current.shards||[]).map(gm).filter(Boolean).filter(function(C){return C.contains(y.target)}),S=w.length>0?a(y,w[0]):!i.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),c=m.useCallback(function(b,y,v,x){var w={name:b,delta:y,target:v,should:x,shadowParent:WI(v)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(S){return S!==w})},1)},[]),u=m.useCallback(function(b){n.current=ra(b),r.current=void 0},[]),d=m.useCallback(function(b){c(b.type,mm(b),b.target,a(b,t.lockRef.current))},[]),f=m.useCallback(function(b){c(b.type,ra(b),b.target,a(b,t.lockRef.current))},[]);m.useEffect(function(){return Co.push(s),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,So),document.addEventListener("touchmove",l,So),document.addEventListener("touchstart",u,So),function(){Co=Co.filter(function(b){return b!==s}),document.removeEventListener("wheel",l,So),document.removeEventListener("touchmove",l,So),document.removeEventListener("touchstart",u,So)}},[]);var h=t.removeScrollBar,g=t.inert;return m.createElement(m.Fragment,null,g?m.createElement(s,{styles:zI(o)}):null,h?m.createElement(DI,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function WI(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const UI=vI(Py,VI);var Ci=m.forwardRef(function(t,e){return m.createElement(Xl,mn({},t,{ref:e,sideCar:UI}))});Ci.classNames=Xl.classNames;var GI=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ko=new WeakMap,oa=new WeakMap,sa={},eu=0,$y=function(t){return t&&(t.host||$y(t.parentNode))},KI=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=$y(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},YI=function(t,e,n,r){var o=KI(e,Array.isArray(t)?t:[t]);sa[n]||(sa[n]=new WeakMap);var s=sa[n],i=[],a=new Set,l=new Set(o),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var h=f.getAttribute(r),g=h!==null&&h!=="false",b=(ko.get(f)||0)+1,y=(s.get(f)||0)+1;ko.set(f,b),s.set(f,y),i.push(f),b===1&&g&&oa.set(f,!0),y===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return u(e),a.clear(),eu++,function(){i.forEach(function(d){var f=ko.get(d)-1,h=s.get(d)-1;ko.set(d,f),s.set(d,h),f||(oa.has(d)||d.removeAttribute(r),oa.delete(d)),h||d.removeAttribute(n)}),eu--,eu||(ko=new WeakMap,ko=new WeakMap,oa=new WeakMap,sa={})}},Jl=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),o=GI(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),YI(r,o,n,"aria-hidden")):function(){return null}},Zl="Dialog",[By,zy]=Ie(Zl),[qI,cn]=By(Zl),Hy=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=t,a=m.useRef(null),l=m.useRef(null),[c,u]=Oe({prop:r,defaultProp:o??!1,onChange:s,caller:Zl});return p.jsx(qI,{scope:e,triggerRef:a,contentRef:l,contentId:Ee(),titleId:Ee(),descriptionId:Ee(),open:c,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(d=>!d),[u]),modal:i,children:n})};Hy.displayName=Zl;var Vy="DialogTrigger",Wy=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,o=cn(Vy,n),s=oe(e,o.triggerRef);return p.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":xf(o.open),...r,ref:s,onClick:P(t.onClick,o.onOpenToggle)})});Wy.displayName=Vy;var yf="DialogPortal",[XI,Uy]=By(yf,{forceMount:void 0}),Gy=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:o}=t,s=cn(yf,e);return p.jsx(XI,{scope:e,forceMount:n,children:m.Children.map(r,i=>p.jsx(Pe,{present:n||s.open,children:p.jsx(Si,{asChild:!0,container:o,children:i})}))})};Gy.displayName=yf;var _a="DialogOverlay",Ky=m.forwardRef((t,e)=>{const n=Uy(_a,t.__scopeDialog),{forceMount:r=n.forceMount,...o}=t,s=cn(_a,t.__scopeDialog);return s.modal?p.jsx(Pe,{present:r||s.open,children:p.jsx(ZI,{...o,ref:e})}):null});Ky.displayName=_a;var JI=Jr("DialogOverlay.RemoveScroll"),ZI=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,o=cn(_a,n);return p.jsx(Ci,{as:JI,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(Z.div,{"data-state":xf(o.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Zr="DialogContent",Yy=m.forwardRef((t,e)=>{const n=Uy(Zr,t.__scopeDialog),{forceMount:r=n.forceMount,...o}=t,s=cn(Zr,t.__scopeDialog);return p.jsx(Pe,{present:r||s.open,children:s.modal?p.jsx(QI,{...o,ref:e}):p.jsx(eP,{...o,ref:e})})});Yy.displayName=Zr;var QI=m.forwardRef((t,e)=>{const n=cn(Zr,t.__scopeDialog),r=m.useRef(null),o=oe(e,n.contentRef,r);return m.useEffect(()=>{const s=r.current;if(s)return Jl(s)},[]),p.jsx(qy,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:P(t.onFocusOutside,s=>s.preventDefault())})}),eP=m.forwardRef((t,e)=>{const n=cn(Zr,t.__scopeDialog),r=m.useRef(!1),o=m.useRef(!1);return p.jsx(qy,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=t.onCloseAutoFocus)==null||i.call(t,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),qy=m.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=t,a=cn(Zr,n),l=m.useRef(null),c=oe(e,l);return ql(),p.jsxs(p.Fragment,{children:[p.jsx(wi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(Er,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":xf(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(nP,{titleId:a.titleId}),p.jsx(oP,{contentRef:l,descriptionId:a.descriptionId})]})]})}),vf="DialogTitle",Xy=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,o=cn(vf,n);return p.jsx(Z.h2,{id:o.titleId,...r,ref:e})});Xy.displayName=vf;var Jy="DialogDescription",Zy=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,o=cn(Jy,n);return p.jsx(Z.p,{id:o.descriptionId,...r,ref:e})});Zy.displayName=Jy;var Qy="DialogClose",ev=m.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,o=cn(Qy,n);return p.jsx(Z.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>o.onOpenChange(!1))})});ev.displayName=Qy;function xf(t){return t?"open":"closed"}var tv="DialogTitleWarning",[tP,nv]=XA(tv,{contentName:Zr,titleName:vf,docsSlug:"dialog"}),nP=({titleId:t})=>{const e=nv(tv),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
347
|
+
|
|
348
|
+
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
349
|
+
|
|
350
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return m.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},rP="DialogDescriptionWarning",oP=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nv(rP).contentName}}.`;return m.useEffect(()=>{var s;const o=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&o&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},Ql=Hy,wf=Wy,ec=Gy,ss=Ky,is=Yy,ki=Xy,Ni=Zy,as=ev,rv="AlertDialog",[sP]=Ie(rv,[zy]),Un=zy(),ov=t=>{const{__scopeAlertDialog:e,...n}=t,r=Un(e);return p.jsx(Ql,{...r,...n,modal:!0})};ov.displayName=rv;var iP="AlertDialogTrigger",sv=m.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,o=Un(n);return p.jsx(wf,{...o,...r,ref:e})});sv.displayName=iP;var aP="AlertDialogPortal",iv=t=>{const{__scopeAlertDialog:e,...n}=t,r=Un(e);return p.jsx(ec,{...r,...n})};iv.displayName=aP;var lP="AlertDialogOverlay",av=m.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,o=Un(n);return p.jsx(ss,{...o,...r,ref:e})});av.displayName=lP;var Bo="AlertDialogContent",[cP,uP]=sP(Bo),dP=Ub("AlertDialogContent"),lv=m.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...o}=t,s=Un(n),i=m.useRef(null),a=oe(e,i),l=m.useRef(null);return p.jsx(tP,{contentName:Bo,titleName:cv,docsSlug:"alert-dialog",children:p.jsx(cP,{scope:n,cancelRef:l,children:p.jsxs(is,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:P(o.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[p.jsx(dP,{children:r}),p.jsx(pP,{contentRef:i})]})})})});lv.displayName=Bo;var cv="AlertDialogTitle",uv=m.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,o=Un(n);return p.jsx(ki,{...o,...r,ref:e})});uv.displayName=cv;var dv="AlertDialogDescription",fv=m.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,o=Un(n);return p.jsx(Ni,{...o,...r,ref:e})});fv.displayName=dv;var fP="AlertDialogAction",pv=m.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,o=Un(n);return p.jsx(as,{...o,...r,ref:e})});pv.displayName=fP;var hv="AlertDialogCancel",mv=m.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:o}=uP(hv,n),s=Un(n),i=oe(e,o);return p.jsx(as,{...s,...r,ref:i})});mv.displayName=hv;var pP=({contentRef:t})=>{const e=`\`${Bo}\` requires a description for the component to be accessible for screen reader users.
|
|
351
|
+
|
|
352
|
+
You can add a description to the \`${Bo}\` by passing a \`${dv}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
353
|
+
|
|
354
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Bo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
355
|
+
|
|
356
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{var r;document.getElementById((r=t.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},hP=ov,mP=sv,gP=iv,gv=av,bv=lv,yv=pv,vv=mv,xv=uv,wv=fv,bP=Symbol.for("react.lazy"),La=m[" use ".trim().toString()];function yP(t){return typeof t=="object"&&t!==null&&"then"in t}function Sv(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===bP&&"_payload"in t&&yP(t._payload)}function Cv(t){const e=vP(t),n=m.forwardRef((r,o)=>{let{children:s,...i}=r;Sv(s)&&typeof La=="function"&&(s=La(s._payload));const a=m.Children.toArray(s),l=a.find(wP);if(l){const c=l.props.children,u=a.map(d=>d===l?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:d);return p.jsx(e,{...i,ref:o,children:m.isValidElement(c)?m.cloneElement(c,void 0,u):null})}return p.jsx(e,{...i,ref:o,children:s})});return n.displayName=`${t}.Slot`,n}var tc=Cv("Slot");function vP(t){const e=m.forwardRef((n,r)=>{let{children:o,...s}=n;if(Sv(o)&&typeof La=="function"&&(o=La(o._payload)),m.isValidElement(o)){const i=CP(o),a=SP(s,o.props);return o.type!==m.Fragment&&(a.ref=r?rn(r,i):i),m.cloneElement(o,a)}return m.Children.count(o)>1?m.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var xP=Symbol("radix.slottable");function wP(t){return m.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===xP}function SP(t,e){const n={...e};for(const r in e){const o=t[r],s=e[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...t,...n}}function CP(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const fr=Xe("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",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Cn=m.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...o},s)=>{const i=r?tc:"button";return p.jsx(i,{className:M(fr({variant:e,size:n,className:t})),ref:s,...o})});Cn.displayName="Button";const kP=hP,NP=mP,kv=gP,Sf=m.forwardRef(({className:t,...e},n)=>p.jsx(gv,{className:M("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",t),...e,ref:n}));Sf.displayName=gv.displayName;const Nv=m.forwardRef(({className:t,...e},n)=>p.jsxs(kv,{children:[p.jsx(Sf,{}),p.jsx(bv,{ref:n,className:M("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",t),...e})]}));Nv.displayName=bv.displayName;const Ev=({className:t,...e})=>p.jsx("div",{className:M("flex flex-col space-y-2 text-center sm:text-left",t),...e});Ev.displayName="AlertDialogHeader";const Mv=({className:t,...e})=>p.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Mv.displayName="AlertDialogFooter";const Tv=m.forwardRef(({className:t,...e},n)=>p.jsx(xv,{ref:n,className:M("font-heading text-lg font-semibold",t),...e}));Tv.displayName=xv.displayName;const Rv=m.forwardRef(({className:t,...e},n)=>p.jsx(wv,{ref:n,className:M("text-sm text-muted-foreground",t),...e}));Rv.displayName=wv.displayName;const Av=m.forwardRef(({className:t,...e},n)=>p.jsx(yv,{ref:n,className:M(fr(),t),...e}));Av.displayName=yv.displayName;const Ov=m.forwardRef(({className:t,...e},n)=>p.jsx(vv,{ref:n,className:M(fr({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));Ov.displayName=vv.displayName;var EP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vt=EP.reduce((t,e)=>{const n=Cv(`Primitive.${e}`),r=m.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),MP="AspectRatio",Dv=m.forwardRef((t,e)=>{const{ratio:n=1/1,style:r,...o}=t;return p.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:p.jsx(vt.div,{...o,ref:e,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});Dv.displayName=MP;var TP=Dv;const RP=TP;function Iv(t,e=[]){let n=[];function r(s,i){const a=m.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const c=d=>{var v;const{scope:f,children:h,...g}=d,b=((v=f==null?void 0:f[t])==null?void 0:v[l])||a,y=m.useMemo(()=>g,Object.values(g));return p.jsx(b.Provider,{value:y,children:h})};c.displayName=s+"Provider";function u(d,f){var b;const h=((b=f==null?void 0:f[t])==null?void 0:b[l])||a,g=m.useContext(h);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>m.createContext(i));return function(a){const l=(a==null?void 0:a[t])||s;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return o.scopeName=t,[r,AP(o,...e)]}function AP(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}var bm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function OP(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qu={exports:{}},tu={};/**
|
|
357
|
+
* @license React
|
|
358
|
+
* use-sync-external-store-shim.production.js
|
|
359
|
+
*
|
|
360
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
361
|
+
*
|
|
362
|
+
* This source code is licensed under the MIT license found in the
|
|
363
|
+
* LICENSE file in the root directory of this source tree.
|
|
364
|
+
*/var ym;function DP(){if(ym)return tu;ym=1;var t=R;function e(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,s=t.useLayoutEffect,i=t.useDebugValue;function a(d,f){var h=f(),g=r({inst:{value:h,getSnapshot:f}}),b=g[0].inst,y=g[1];return s(function(){b.value=h,b.getSnapshot=f,l(b)&&y({inst:b})},[d,h,f]),o(function(){return l(b)&&y({inst:b}),d(function(){l(b)&&y({inst:b})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return tu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,tu}var nu={};/**
|
|
365
|
+
* @license React
|
|
366
|
+
* use-sync-external-store-shim.development.js
|
|
367
|
+
*
|
|
368
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
369
|
+
*
|
|
370
|
+
* This source code is licensed under the MIT license found in the
|
|
371
|
+
* LICENSE file in the root directory of this source tree.
|
|
372
|
+
*/var vm;function IP(){return vm||(vm=1,process.env.NODE_ENV!=="production"&&function(){function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function e(h,g){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var b=g();if(!d){var y=g();s(b,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}y=i({inst:{value:b,getSnapshot:g}});var v=y[0].inst,x=y[1];return l(function(){v.value=b,v.getSnapshot=g,n(v)&&x({inst:v})},[h,b,g]),a(function(){return n(v)&&x({inst:v}),h(function(){n(v)&&x({inst:v})})},[h]),c(b),b}function n(h){var g=h.getSnapshot;h=h.value;try{var b=g();return!s(h,b)}catch{return!0}}function r(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=R,s=typeof Object.is=="function"?Object.is:t,i=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;nu.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),nu}process.env.NODE_ENV==="production"?qu.exports=DP():qu.exports=IP();var Ei=qu.exports;function PP(){return Ei.useSyncExternalStore(jP,()=>!0,()=>!1)}function jP(){return()=>{}}var Cf="Avatar",[_P]=Iv(Cf),[LP,Pv]=_P(Cf),jv=m.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[o,s]=m.useState("idle");return p.jsx(LP,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:p.jsx(vt.span,{...r,ref:e})})});jv.displayName=Cf;var _v="AvatarImage",Lv=m.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=t,i=Pv(_v,n),a=FP(r,s),l=ke(c=>{o(c),i.onImageLoadingStatusChange(c)});return De(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?p.jsx(vt.img,{...s,ref:e,src:r}):null});Lv.displayName=_v;var Fv="AvatarFallback",$v=m.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...o}=t,s=Pv(Fv,n),[i,a]=m.useState(r===void 0);return m.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&s.imageLoadingStatus!=="loaded"?p.jsx(vt.span,{...o,ref:e}):null});$v.displayName=Fv;function xm(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function FP(t,{referrerPolicy:e,crossOrigin:n}){const r=PP(),o=m.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[i,a]=m.useState(()=>xm(s,t));return De(()=>{a(xm(s,t))},[s,t]),De(()=>{const l=d=>()=>{a(d)};if(!s)return;const c=l("loaded"),u=l("error");return s.addEventListener("load",c),s.addEventListener("error",u),e&&(s.referrerPolicy=e),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",u)}},[s,n,e]),i}var Bv=jv,zv=Lv,Hv=$v;const Vv=m.forwardRef(({className:t,...e},n)=>p.jsx(Bv,{ref:n,className:M("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));Vv.displayName=Bv.displayName;const Wv=m.forwardRef(({className:t,...e},n)=>p.jsx(zv,{ref:n,className:M("aspect-square h-full w-full",t),...e}));Wv.displayName=zv.displayName;const Uv=m.forwardRef(({className:t,...e},n)=>p.jsx(Hv,{ref:n,className:M("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Uv.displayName=Hv.displayName;const Gv=Xe("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 Xu({className:t,variant:e,...n}){return p.jsx("div",{className:M(Gv({variant:e}),t),...n})}const Kv=Xe("relative flex items-center gap-4 w-full px-4 py-3 text-sm",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive text-destructive-foreground",warning:"bg-yellow-500 text-white",success:"bg-green-500 text-white",info:"bg-blue-500 text-white"},position:{top:"fixed top-0 left-0 right-0 z-50",bottom:"fixed bottom-0 left-0 right-0 z-50",inline:"relative"}},defaultVariants:{variant:"default",position:"inline"}}),Yv=m.forwardRef(({className:t,variant:e,position:n,icon:r,action:o,dismissible:s=!1,onDismiss:i,children:a,...l},c)=>p.jsxs("div",{ref:c,role:"banner",className:M(Kv({variant:e,position:n}),t),...l,children:[r&&p.jsx("span",{className:"shrink-0",children:r}),p.jsx("div",{className:"flex-1",children:a}),o&&p.jsx("div",{className:"shrink-0",children:o}),s&&p.jsx("button",{type:"button",onClick:i,className:"shrink-0 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","aria-label":"Dismiss banner",children:p.jsx(Nt,{className:"h-4 w-4"})})]}));Yv.displayName="Banner";const qv=m.forwardRef(({...t},e)=>p.jsx("nav",{ref:e,"aria-label":"breadcrumb",...t}));qv.displayName="Breadcrumb";const Xv=m.forwardRef(({className:t,...e},n)=>p.jsx("ol",{ref:n,className:M("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...e}));Xv.displayName="BreadcrumbList";const Jv=m.forwardRef(({className:t,...e},n)=>p.jsx("li",{ref:n,className:M("inline-flex items-center gap-1.5",t),...e}));Jv.displayName="BreadcrumbItem";const Zv=m.forwardRef(({asChild:t,className:e,...n},r)=>{const o=t?tc:"a";return p.jsx(o,{ref:r,className:M("transition-colors hover:text-foreground",e),...n})});Zv.displayName="BreadcrumbLink";const Qv=m.forwardRef(({className:t,...e},n)=>p.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:M("font-normal text-foreground",t),...e}));Qv.displayName="BreadcrumbPage";const ex=({children:t,className:e,...n})=>p.jsx("li",{role:"presentation","aria-hidden":"true",className:M("[&>svg]:h-3.5 [&>svg]:w-3.5",e),...n,children:t??p.jsx(Nr,{})});ex.displayName="BreadcrumbSeparator";const tx=({className:t,...e})=>p.jsxs("span",{role:"presentation","aria-hidden":"true",className:M("flex h-9 w-9 items-center justify-center",t),...e,children:[p.jsx(py,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"More"})]});tx.displayName="BreadcrumbEllipsis";function $P(t,e,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:t,timeZoneName:n}).format(e).split(/\s/g).slice(2).join(" ")}const ru={},Ts={};function zr(t,e){try{const r=(ru[t]||(ru[t]=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format))(e).split("GMT")[1];return r in Ts?Ts[r]:wm(r,r.split(":"))}catch{if(t in Ts)return Ts[t];const n=t==null?void 0:t.match(BP);return n?wm(t,n.slice(1)):NaN}}const BP=/([+-]\d\d):?(\d\d)?/;function wm(t,e){const n=+(e[0]||0),r=+(e[1]||0),o=+(e[2]||0)/60;return Ts[t]=n*60+r>0?n*60+r+o:n*60-r-o}class gn extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(zr(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),nx(this),Ju(this)):this.setTime(Date.now())}static tz(e,...n){return n.length?new gn(...n,e):new gn(Date.now(),e)}withTimeZone(e){return new gn(+this,e)}getTimezoneOffset(){const e=-zr(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Ju(this),+this}[Symbol.for("constructDateFrom")](e){return new gn(+new Date(e),this.timeZone)}}const Sm=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!Sm.test(t))return;const e=t.replace(Sm,"$1UTC");gn.prototype[e]&&(t.startsWith("get")?gn.prototype[t]=function(){return this.internal[e]()}:(gn.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),zP(this),+this},gn.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),Ju(this),+this}))});function Ju(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(-zr(t.timeZone,t)*60))}function zP(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),nx(t)}function nx(t){const e=zr(t.timeZone,t),n=e>0?Math.floor(e):Math.ceil(e),r=new Date(+t);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+t).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),i=o-s,a=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();i&&a&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+i);const l=o-n;l&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+l);const c=new Date(+t);c.setUTCSeconds(0);const u=o>0?c.getSeconds():(c.getSeconds()-60)%60,d=Math.round(-(zr(t.timeZone,t)*60))%60;(d||u)&&(t.internal.setUTCSeconds(t.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+d+u));const f=zr(t.timeZone,t),h=f>0?Math.floor(f):Math.ceil(f),b=-new Date(+t).getTimezoneOffset()-h,y=h!==n,v=b-l;if(y&&v){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+v);const x=zr(t.timeZone,t),w=x>0?Math.floor(x):Math.ceil(x),S=h-w;S&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+S))}}class ct extends gn{static tz(e,...n){return n.length?new ct(...n,e):new ct(Date.now(),e)}toISOString(){const[e,n,r]=this.tzComponents(),o=`${e}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,n,r,o]=this.internal.toUTCString().split(" ");return`${e==null?void 0:e.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${e} GMT${n}${r}${o} (${$P(this.timeZone,this)})`}toLocaleString(e,n){return Date.prototype.toLocaleString.call(this,e,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(e,n){return Date.prototype.toLocaleDateString.call(this,e,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(e,n){return Date.prototype.toLocaleTimeString.call(this,e,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset(),n=e>0?"-":"+",r=String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),o=String(Math.abs(e)%60).padStart(2,"0");return[n,r,o]}withTimeZone(e){return new ct(+this,e)}[Symbol.for("constructDateFrom")](e){return new ct(+new Date(e),this.timeZone)}}const rx=6048e5,HP=864e5,Cm=Symbol.for("constructDateFrom");function Ke(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Cm in t?t[Cm](e):t instanceof Date?new t.constructor(e):new Date(e)}function Ce(t,e){return Ke(e||t,t)}function ox(t,e,n){const r=Ce(t,n==null?void 0:n.in);return isNaN(e)?Ke(t,NaN):(e&&r.setDate(r.getDate()+e),r)}function sx(t,e,n){const r=Ce(t,n==null?void 0:n.in);if(isNaN(e))return Ke(t,NaN);if(!e)return r;const o=r.getDate(),s=Ke(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);const i=s.getDate();return o>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let VP={};function Mi(){return VP}function Wo(t,e){var a,l,c,u;const n=Mi(),r=(e==null?void 0:e.weekStartsOn)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Ce(t,e==null?void 0:e.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Zs(t,e){return Wo(t,{...e,weekStartsOn:1})}function ix(t,e){const n=Ce(t,e==null?void 0:e.in),r=n.getFullYear(),o=Ke(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Zs(o),i=Ke(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=Zs(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function km(t){const e=Ce(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function ls(t,...e){const n=Ke.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function Qs(t,e){const n=Ce(t,e==null?void 0:e.in);return n.setHours(0,0,0,0),n}function kf(t,e,n){const[r,o]=ls(n==null?void 0:n.in,t,e),s=Qs(r),i=Qs(o),a=+s-km(s),l=+i-km(i);return Math.round((a-l)/HP)}function WP(t,e){const n=ix(t,e),r=Ke(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Zs(r)}function UP(t,e,n){return ox(t,e*7,n)}function GP(t,e,n){return sx(t,e*12,n)}function KP(t,e){let n,r=e==null?void 0:e.in;return t.forEach(o=>{!r&&typeof o=="object"&&(r=Ke.bind(null,o));const s=Ce(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),Ke(r,n||NaN)}function YP(t,e){let n,r=e==null?void 0:e.in;return t.forEach(o=>{!r&&typeof o=="object"&&(r=Ke.bind(null,o));const s=Ce(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),Ke(r,n||NaN)}function qP(t,e,n){const[r,o]=ls(n==null?void 0:n.in,t,e);return+Qs(r)==+Qs(o)}function ax(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function XP(t){return!(!ax(t)&&typeof t!="number"||isNaN(+Ce(t)))}function lx(t,e,n){const[r,o]=ls(n==null?void 0:n.in,t,e),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function JP(t,e){const n=Ce(t,e==null?void 0:e.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function cx(t,e){const[n,r]=ls(t,e.start,e.end);return{start:n,end:r}}function ZP(t,e){const{start:n,end:r}=cx(e==null?void 0:e.in,t);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let a=1;const l=[];for(;+i<=s;)l.push(Ke(n,i)),i.setMonth(i.getMonth()+a);return o?l.reverse():l}function QP(t,e){const n=Ce(t,e==null?void 0:e.in);return n.setDate(1),n.setHours(0,0,0,0),n}function e2(t,e){const n=Ce(t,e==null?void 0:e.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function ux(t,e){const n=Ce(t,e==null?void 0:e.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function t2(t,e){const{start:n,end:r}=cx(e==null?void 0:e.in,t);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setMonth(0,1);let a=1;const l=[];for(;+i<=s;)l.push(Ke(n,i)),i.setFullYear(i.getFullYear()+a);return o?l.reverse():l}function dx(t,e){var a,l,c,u;const n=Mi(),r=(e==null?void 0:e.weekStartsOn)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Ce(t,e==null?void 0:e.in),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function n2(t,e){return dx(t,{...e,weekStartsOn:1})}const r2={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"}},o2=(t,e,n)=>{let r;const o=r2[t];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ou(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const s2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},i2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},a2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},l2={date:ou({formats:s2,defaultWidth:"full"}),time:ou({formats:i2,defaultWidth:"full"}),dateTime:ou({formats:a2,defaultWidth:"full"})},c2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},u2=(t,e,n,r)=>c2[t];function Ss(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=n!=null&&n.width?String(n.width):t.defaultWidth;o=t.values[a]||t.values[i]}const s=t.argumentCallback?t.argumentCallback(e):e;return o[s]}}const d2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},f2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},p2={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"]},h2={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"]},m2={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"}},g2={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"}},b2=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},y2={ordinalNumber:b2,era:Ss({values:d2,defaultWidth:"wide"}),quarter:Ss({values:f2,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ss({values:p2,defaultWidth:"wide"}),day:Ss({values:h2,defaultWidth:"wide"}),dayPeriod:Ss({values:m2,defaultWidth:"wide",formattingValues:g2,defaultFormattingWidth:"wide"})};function Cs(t){return(e,n={})=>{const r=n.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(o);if(!s)return null;const i=s[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?x2(a,d=>d.test(i)):v2(a,d=>d.test(i));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(i.length);return{value:c,rest:u}}}function v2(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function x2(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function w2(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const o=r[0],s=e.match(t.parsePattern);if(!s)return null;let i=t.valueCallback?t.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=e.slice(o.length);return{value:i,rest:a}}}const S2=/^(\d+)(th|st|nd|rd)?/i,C2=/\d+/i,k2={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},N2={any:[/^b/i,/^(a|c)/i]},E2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},M2={any:[/1/i,/2/i,/3/i,/4/i]},T2={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},R2={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]},A2={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},O2={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]},D2={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},I2={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}},P2={ordinalNumber:w2({matchPattern:S2,parsePattern:C2,valueCallback:t=>parseInt(t,10)}),era:Cs({matchPatterns:k2,defaultMatchWidth:"wide",parsePatterns:N2,defaultParseWidth:"any"}),quarter:Cs({matchPatterns:E2,defaultMatchWidth:"wide",parsePatterns:M2,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Cs({matchPatterns:T2,defaultMatchWidth:"wide",parsePatterns:R2,defaultParseWidth:"any"}),day:Cs({matchPatterns:A2,defaultMatchWidth:"wide",parsePatterns:O2,defaultParseWidth:"any"}),dayPeriod:Cs({matchPatterns:D2,defaultMatchWidth:"any",parsePatterns:I2,defaultParseWidth:"any"})},Ro={code:"en-US",formatDistance:o2,formatLong:l2,formatRelative:u2,localize:y2,match:P2,options:{weekStartsOn:0,firstWeekContainsDate:1}};function j2(t,e){const n=Ce(t,e==null?void 0:e.in);return kf(n,ux(n))+1}function Nf(t,e){const n=Ce(t,e==null?void 0:e.in),r=+Zs(n)-+WP(n);return Math.round(r/rx)+1}function fx(t,e){var u,d,f,h;const n=Ce(t,e==null?void 0:e.in),r=n.getFullYear(),o=Mi(),s=(e==null?void 0:e.firstWeekContainsDate)??((d=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ke((e==null?void 0:e.in)||t,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=Wo(i,e),l=Ke((e==null?void 0:e.in)||t,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=Wo(l,e);return+n>=+a?r+1:+n>=+c?r:r-1}function _2(t,e){var a,l,c,u;const n=Mi(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=fx(t,e),s=Ke((e==null?void 0:e.in)||t,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Wo(s,e)}function Ef(t,e){const n=Ce(t,e==null?void 0:e.in),r=+Wo(n,e)-+_2(n,e);return Math.round(r/rx)+1}function Se(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const er={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return Se(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Se(n+1,2)},d(t,e){return Se(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return Se(t.getHours()%12||12,e.length)},H(t,e){return Se(t.getHours(),e.length)},m(t,e){return Se(t.getMinutes(),e.length)},s(t,e){return Se(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Se(o,e.length)}},No={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Nm={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return er.y(t,e)},Y:function(t,e,n,r){const o=fx(t,r),s=o>0?o:1-o;if(e==="YY"){const i=s%100;return Se(i,2)}return e==="Yo"?n.ordinalNumber(s,{unit:"year"}):Se(s,e.length)},R:function(t,e){const n=ix(t);return Se(n,e.length)},u:function(t,e){const n=t.getFullYear();return Se(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Se(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Se(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return er.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return Se(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const o=Ef(t,r);return e==="wo"?n.ordinalNumber(o,{unit:"week"}):Se(o,e.length)},I:function(t,e,n){const r=Nf(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):Se(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):er.d(t,e)},D:function(t,e,n){const r=j2(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Se(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const o=t.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Se(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const o=t.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Se(s,e.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),o=r===0?7:r;switch(e){case"i":return String(o);case"ii":return Se(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let o;switch(r===12?o=No.noon:r===0?o=No.midnight:o=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let o;switch(r>=17?o=No.evening:r>=12?o=No.afternoon:r>=4?o=No.morning:o=No.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return er.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):er.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Se(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):Se(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):er.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):er.s(t,e)},S:function(t,e){return er.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Mm(r);case"XXXX":case"XX":return Fr(r);case"XXXXX":case"XXX":default:return Fr(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Mm(r);case"xxxx":case"xx":return Fr(r);case"xxxxx":case"xxx":default:return Fr(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Em(r,":");case"OOOO":default:return"GMT"+Fr(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Em(r,":");case"zzzz":default:return"GMT"+Fr(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return Se(r,e.length)},T:function(t,e,n){return Se(+t,e.length)}};function Em(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+e+Se(s,2)}function Mm(t,e){return t%60===0?(t>0?"-":"+")+Se(Math.abs(t)/60,2):Fr(t,e)}function Fr(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),o=Se(Math.trunc(r/60),2),s=Se(r%60,2);return n+o+e+s}const Tm=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},px=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},L2=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Tm(t,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Tm(r,e)).replace("{{time}}",px(o,e))},F2={p:px,P:L2},$2=/^D+$/,B2=/^Y+$/,z2=["D","DD","YY","YYYY"];function H2(t){return $2.test(t)}function V2(t){return B2.test(t)}function W2(t,e,n){const r=U2(t,e,n);if(console.warn(r),z2.includes(t))throw new RangeError(r)}function U2(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const G2=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,K2=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Y2=/^'([^]*?)'?$/,q2=/''/g,X2=/[a-zA-Z]/;function bn(t,e,n){var u,d,f,h,g,b,y,v;const r=Mi(),o=(n==null?void 0:n.locale)??r.locale??Ro,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((b=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??r.weekStartsOn??((v=(y=r.locale)==null?void 0:y.options)==null?void 0:v.weekStartsOn)??0,a=Ce(t,n==null?void 0:n.in);if(!XP(a))throw new RangeError("Invalid time value");let l=e.match(K2).map(x=>{const w=x[0];if(w==="p"||w==="P"){const S=F2[w];return S(x,o.formatLong)}return x}).join("").match(G2).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:J2(x)};if(Nm[w])return{isToken:!0,value:x};if(w.match(X2))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&V2(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&H2(w))&&W2(w,e,String(t));const S=Nm[w[0]];return S(a,w,o.localize,c)}).join("")}function J2(t){const e=t.match(Y2);return e?e[1].replace(q2,"'"):t}function Z2(t,e){const n=Ce(t,e==null?void 0:e.in),r=n.getFullYear(),o=n.getMonth(),s=Ke(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function Q2(t,e){return Ce(t,e==null?void 0:e.in).getMonth()}function ej(t,e){return Ce(t,e==null?void 0:e.in).getFullYear()}function tj(t,e){return+Ce(t)>+Ce(e)}function nj(t,e){return+Ce(t)<+Ce(e)}function rj(t,e,n){const[r,o]=ls(n==null?void 0:n.in,t,e);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function oj(t,e,n){const[r,o]=ls(n==null?void 0:n.in,t,e);return r.getFullYear()===o.getFullYear()}function sj(t,e,n){const r=Ce(t,n==null?void 0:n.in),o=r.getFullYear(),s=r.getDate(),i=Ke(t,0);i.setFullYear(o,e,15),i.setHours(0,0,0,0);const a=Z2(i);return r.setMonth(e,Math.min(s,a)),r}function ij(t,e,n){const r=Ce(t,n==null?void 0:n.in);return isNaN(+r)?Ke(t,NaN):(r.setFullYear(e),r)}const Rm=5,aj=4;function lj(t,e){const n=e.startOfMonth(t),r=n.getDay()>0?n.getDay():7,o=e.addDays(t,-r+1),s=e.addDays(o,Rm*7-1);return e.getMonth(t)===e.getMonth(s)?Rm:aj}function hx(t,e){const n=e.startOfMonth(t),r=n.getDay();return r===1?n:r===0?e.addDays(n,-1*6):e.addDays(n,-1*(r-1))}function cj(t,e){const n=hx(t,e),r=lj(t,e);return e.addDays(n,r*7-1)}const mx={...Ro,labels:{labelDayButton:(t,e,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,a)=>bn(i,a,{locale:Ro,...n});let s=o(t,"PPPP");return e.today&&(s=`Today, ${s}`),e.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:t=>`Week ${t}`,labelYearDropdown:"Choose the Year",labelGrid:(t,e,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>bn(o,s,{locale:Ro,...e}),r(t,"LLLL yyyy")},labelGridcell:(t,e,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(i,a)=>bn(i,a,{locale:Ro,...n});let s=o(t,"PPPP");return e!=null&&e.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(t,e,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,s)=>bn(o,s,{locale:Ro,...e}),r(t,"cccc")}}};class jt{constructor(e,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?ct.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,s)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new ct(r,o,s,this.options.timeZone):new Date(r,o,s)},this.addDays=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(r,o):ox(r,o)},this.addMonths=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(r,o):sx(r,o)},this.addWeeks=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(r,o):UP(r,o)},this.addYears=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(r,o):GP(r,o)},this.differenceInCalendarDays=(r,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):kf(r,o)},this.differenceInCalendarMonths=(r,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):lx(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):ZP(r)},this.eachYearOfInterval=r=>{var a;const o=(a=this.overrides)!=null&&a.eachYearOfInterval?this.overrides.eachYearOfInterval(r):t2(r),s=new Set(o.map(l=>this.getYear(l)));if(s.size===o.length)return o;const i=[];return s.forEach(l=>{i.push(new Date(l,0,1))}),i},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):cj(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):n2(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):JP(r)},this.endOfWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(r,o):dx(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):e2(r)},this.format=(r,o,s)=>{var a;const i=(a=this.overrides)!=null&&a.format?this.overrides.format(r,o,this.options):bn(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Nf(r)},this.getMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(r,this.options):Q2(r,this.options)},this.getYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(r,this.options):ej(r,this.options)},this.getWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(r,this.options):Ef(r,this.options)},this.isAfter=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(r,o):tj(r,o)},this.isBefore=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(r,o):nj(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):ax(r)},this.isSameDay=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(r,o):qP(r,o)},this.isSameMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(r,o):rj(r,o)},this.isSameYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(r,o):oj(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):KP(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):YP(r)},this.setMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(r,o):sj(r,o)},this.setYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(r,o):ij(r,o)},this.startOfBroadcastWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):hx(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Qs(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Zs(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):QP(r)},this.startOfWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(r,this.options):Wo(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):ux(r)},this.options={locale:mx,...e},this.overrides=n}getDigitMap(){const{numerals:e="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:e}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(e){const n=this.getDigitMap();return e.replace(/\d/g,r=>n[r]||r)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){var n;const e=(n=this.options.locale)==null?void 0:n.code;return e&&jt.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:n,timeZone:r,numerals:o}=this.options,s=n==null?void 0:n.code;if(s&&jt.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(e)}catch{}const i=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(e,i)}}jt.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const kn=new jt;class gx{constructor(e,n,r=kn){this.date=e,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(e,n)),this.dateLib=r,this.isoDate=r.format(e,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(e,"yyyy-MM")}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class uj{constructor(e,n){this.date=e,this.weeks=n}}class dj{constructor(e,n){this.days=n,this.weekNumber=e}}function fj(t){return R.createElement("button",{...t})}function pj(t){return R.createElement("span",{...t})}function hj(t){const{size:e=24,orientation:n="left",className:r}=t;return R.createElement("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24"},n==="up"&&R.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&R.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&R.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&R.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function mj(t){const{day:e,modifiers:n,...r}=t;return R.createElement("td",{...r})}function gj(t){const{day:e,modifiers:n,...r}=t,o=R.useRef(null);return R.useEffect(()=>{var s;n.focused&&((s=o.current)==null||s.focus())},[n.focused]),R.createElement("button",{ref:o,...r})}var le;(function(t){t.Root="root",t.Chevron="chevron",t.Day="day",t.DayButton="day_button",t.CaptionLabel="caption_label",t.Dropdowns="dropdowns",t.Dropdown="dropdown",t.DropdownRoot="dropdown_root",t.Footer="footer",t.MonthGrid="month_grid",t.MonthCaption="month_caption",t.MonthsDropdown="months_dropdown",t.Month="month",t.Months="months",t.Nav="nav",t.NextMonthButton="button_next",t.PreviousMonthButton="button_previous",t.Week="week",t.Weeks="weeks",t.Weekday="weekday",t.Weekdays="weekdays",t.WeekNumber="week_number",t.WeekNumberHeader="week_number_header",t.YearsDropdown="years_dropdown"})(le||(le={}));var _e;(function(t){t.disabled="disabled",t.hidden="hidden",t.outside="outside",t.focused="focused",t.today="today"})(_e||(_e={}));var en;(function(t){t.range_end="range_end",t.range_middle="range_middle",t.range_start="range_start",t.selected="selected"})(en||(en={}));var At;(function(t){t.weeks_before_enter="weeks_before_enter",t.weeks_before_exit="weeks_before_exit",t.weeks_after_enter="weeks_after_enter",t.weeks_after_exit="weeks_after_exit",t.caption_after_enter="caption_after_enter",t.caption_after_exit="caption_after_exit",t.caption_before_enter="caption_before_enter",t.caption_before_exit="caption_before_exit"})(At||(At={}));function bj(t){const{options:e,className:n,components:r,classNames:o,...s}=t,i=[o[le.Dropdown],n].join(" "),a=e==null?void 0:e.find(({value:l})=>l===s.value);return R.createElement("span",{"data-disabled":s.disabled,className:o[le.DropdownRoot]},R.createElement(r.Select,{className:i,...s},e==null?void 0:e.map(({value:l,label:c,disabled:u})=>R.createElement(r.Option,{key:l,value:l,disabled:u},c))),R.createElement("span",{className:o[le.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,R.createElement(r.Chevron,{orientation:"down",size:18,className:o[le.Chevron]})))}function yj(t){return R.createElement("div",{...t})}function vj(t){return R.createElement("div",{...t})}function xj(t){const{calendarMonth:e,displayIndex:n,...r}=t;return R.createElement("div",{...r},t.children)}function wj(t){const{calendarMonth:e,displayIndex:n,...r}=t;return R.createElement("div",{...r})}function Sj(t){return R.createElement("table",{...t})}function Cj(t){return R.createElement("div",{...t})}const bx=R.createContext(void 0);function Ti(){const t=R.useContext(bx);if(t===void 0)throw new Error("useDayPicker() must be used within a custom component.");return t}function kj(t){const{components:e}=Ti();return R.createElement(e.Dropdown,{...t})}function Nj(t){const{onPreviousClick:e,onNextClick:n,previousMonth:r,nextMonth:o,...s}=t,{components:i,classNames:a,labels:{labelPrevious:l,labelNext:c}}=Ti(),u=R.useCallback(f=>{o&&(n==null||n(f))},[o,n]),d=R.useCallback(f=>{r&&(e==null||e(f))},[r,e]);return R.createElement("nav",{...s},R.createElement(i.PreviousMonthButton,{type:"button",className:a[le.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:d},R.createElement(i.Chevron,{disabled:r?void 0:!0,className:a[le.Chevron],orientation:"left"})),R.createElement(i.NextMonthButton,{type:"button",className:a[le.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":c(o),onClick:u},R.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[le.Chevron]})))}function Ej(t){const{components:e}=Ti();return R.createElement(e.Button,{...t})}function Mj(t){return R.createElement("option",{...t})}function Tj(t){const{components:e}=Ti();return R.createElement(e.Button,{...t})}function Rj(t){const{rootRef:e,...n}=t;return R.createElement("div",{...n,ref:e})}function Aj(t){return R.createElement("select",{...t})}function Oj(t){const{week:e,...n}=t;return R.createElement("tr",{...n})}function Dj(t){return R.createElement("th",{...t})}function Ij(t){return R.createElement("thead",{"aria-hidden":!0},R.createElement("tr",{...t}))}function Pj(t){const{week:e,...n}=t;return R.createElement("th",{...n})}function jj(t){return R.createElement("th",{...t})}function _j(t){return R.createElement("tbody",{...t})}function Lj(t){const{components:e}=Ti();return R.createElement(e.Dropdown,{...t})}const Fj=Object.freeze(Object.defineProperty({__proto__:null,Button:fj,CaptionLabel:pj,Chevron:hj,Day:mj,DayButton:gj,Dropdown:bj,DropdownNav:yj,Footer:vj,Month:xj,MonthCaption:wj,MonthGrid:Sj,Months:Cj,MonthsDropdown:kj,Nav:Nj,NextMonthButton:Ej,Option:Mj,PreviousMonthButton:Tj,Root:Rj,Select:Aj,Week:Oj,WeekNumber:Pj,WeekNumberHeader:jj,Weekday:Dj,Weekdays:Ij,Weeks:_j,YearsDropdown:Lj},Symbol.toStringTag,{value:"Module"}));function Ln(t,e,n=!1,r=kn){let{from:o,to:s}=t;const{differenceInCalendarDays:i,isSameDay:a}=r;return o&&s?(i(s,o)<0&&([o,s]=[s,o]),i(e,o)>=(n?1:0)&&i(s,e)>=(n?1:0)):!n&&s?a(s,e):!n&&o?a(o,e):!1}function Mf(t){return!!(t&&typeof t=="object"&&"before"in t&&"after"in t)}function nc(t){return!!(t&&typeof t=="object"&&"from"in t)}function Tf(t){return!!(t&&typeof t=="object"&&"after"in t)}function Rf(t){return!!(t&&typeof t=="object"&&"before"in t)}function yx(t){return!!(t&&typeof t=="object"&&"dayOfWeek"in t)}function vx(t,e){return Array.isArray(t)&&t.every(e.isDate)}function Fn(t,e,n=kn){const r=Array.isArray(e)?e:[e],{isSameDay:o,differenceInCalendarDays:s,isAfter:i}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return o(t,a);if(vx(a,n))return a.some(l=>o(t,l));if(nc(a))return Ln(a,t,!1,n);if(yx(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(t.getDay()):a.dayOfWeek===t.getDay();if(Mf(a)){const l=s(a.before,t),c=s(a.after,t),u=l>0,d=c<0;return i(a.before,a.after)?d&&u:u||d}return Tf(a)?s(t,a.after)>0:Rf(a)?s(a.before,t)>0:typeof a=="function"?a(t):!1})}function $j(t,e,n,r,o){const{disabled:s,hidden:i,modifiers:a,showOutsideDays:l,broadcastCalendar:c,today:u=o.today()}=e,{isSameDay:d,isSameMonth:f,startOfMonth:h,isBefore:g,endOfMonth:b,isAfter:y}=o,v=n&&h(n),x=r&&b(r),w={[_e.focused]:[],[_e.outside]:[],[_e.disabled]:[],[_e.hidden]:[],[_e.today]:[]},S={};for(const C of t){const{date:k,displayMonth:N}=C,E=!!(N&&!f(k,N)),T=!!(v&&g(k,v)),O=!!(x&&y(k,x)),A=!!(s&&Fn(k,s,o)),D=!!(i&&Fn(k,i,o))||T||O||!c&&!l&&E||c&&l===!1&&E,z=d(k,u);E&&w.outside.push(C),A&&w.disabled.push(C),D&&w.hidden.push(C),z&&w.today.push(C),a&&Object.keys(a).forEach($=>{const Y=a==null?void 0:a[$];Y&&Fn(k,Y,o)&&(S[$]?S[$].push(C):S[$]=[C])})}return C=>{const k={[_e.focused]:!1,[_e.disabled]:!1,[_e.hidden]:!1,[_e.outside]:!1,[_e.today]:!1},N={};for(const E in w){const T=w[E];k[E]=T.some(O=>O===C)}for(const E in S)N[E]=S[E].some(T=>T===C);return{...k,...N}}}function Bj(t,e,n={}){return Object.entries(t).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):e[_e[s]]?o.push(e[_e[s]]):e[en[s]]&&o.push(e[en[s]]),o),[e[le.Day]])}function zj(t){return{...Fj,...t}}function Hj(t){const e={"data-mode":t.mode??void 0,"data-required":"required"in t?t.required:void 0,"data-multiple-months":t.numberOfMonths&&t.numberOfMonths>1||void 0,"data-week-numbers":t.showWeekNumber||void 0,"data-broadcast-calendar":t.broadcastCalendar||void 0,"data-nav-layout":t.navLayout||void 0};return Object.entries(t).forEach(([n,r])=>{n.startsWith("data-")&&(e[n]=r)}),e}function Vj(){const t={};for(const e in le)t[le[e]]=`rdp-${le[e]}`;for(const e in _e)t[_e[e]]=`rdp-${_e[e]}`;for(const e in en)t[en[e]]=`rdp-${en[e]}`;for(const e in At)t[At[e]]=`rdp-${At[e]}`;return t}function xx(t,e,n){return(n??new jt(e)).formatMonthYear(t)}const Wj=xx;function Uj(t,e,n){return(n??new jt(e)).format(t,"d")}function Gj(t,e=kn){return e.format(t,"LLLL")}function Kj(t,e,n){return(n??new jt(e)).format(t,"cccccc")}function Yj(t,e=kn){return t<10?e.formatNumber(`0${t.toLocaleString()}`):e.formatNumber(`${t.toLocaleString()}`)}function qj(){return""}function wx(t,e=kn){return e.format(t,"yyyy")}const Xj=wx,Jj=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:xx,formatDay:Uj,formatMonthCaption:Wj,formatMonthDropdown:Gj,formatWeekNumber:Yj,formatWeekNumberHeader:qj,formatWeekdayName:Kj,formatYearCaption:Xj,formatYearDropdown:wx},Symbol.toStringTag,{value:"Module"}));function Zj(t){return t!=null&&t.formatMonthCaption&&!t.formatCaption&&(t.formatCaption=t.formatMonthCaption),t!=null&&t.formatYearCaption&&!t.formatYearDropdown&&(t.formatYearDropdown=t.formatYearCaption),{...Jj,...t}}function Af(t,e,n,r){let o=(r??new jt(n)).format(t,"PPPP");return e.today&&(o=`Today, ${o}`),e.selected&&(o=`${o}, selected`),o}const Qj=Af;function Of(t,e,n){return(n??new jt(e)).formatMonthYear(t)}const e_=Of;function Sx(t,e,n,r){let o=(r??new jt(n)).format(t,"PPPP");return e!=null&&e.today&&(o=`Today, ${o}`),o}function Cx(t){return"Choose the Month"}function kx(){return""}const t_="Go to the Next Month";function Nx(t,e){return t_}function Ex(t){return"Go to the Previous Month"}function Mx(t,e,n){return(n??new jt(e)).format(t,"cccc")}function Tx(t,e){return`Week ${t}`}function Rx(t){return"Week Number"}function Ax(t){return"Choose the Year"}const n_=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:e_,labelDay:Qj,labelDayButton:Af,labelGrid:Of,labelGridcell:Sx,labelMonthDropdown:Cx,labelNav:kx,labelNext:Nx,labelPrevious:Ex,labelWeekNumber:Tx,labelWeekNumberHeader:Rx,labelWeekday:Mx,labelYearDropdown:Ax},Symbol.toStringTag,{value:"Module"})),Jt=(t,e,n)=>e||(n?typeof n=="function"?n:(...r)=>n:t);function r_(t,e){var r;const n=((r=e.locale)==null?void 0:r.labels)??{};return{...n_,...t??{},labelDayButton:Jt(Af,t==null?void 0:t.labelDayButton,n.labelDayButton),labelMonthDropdown:Jt(Cx,t==null?void 0:t.labelMonthDropdown,n.labelMonthDropdown),labelNext:Jt(Nx,t==null?void 0:t.labelNext,n.labelNext),labelPrevious:Jt(Ex,t==null?void 0:t.labelPrevious,n.labelPrevious),labelWeekNumber:Jt(Tx,t==null?void 0:t.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Jt(Ax,t==null?void 0:t.labelYearDropdown,n.labelYearDropdown),labelGrid:Jt(Of,t==null?void 0:t.labelGrid,n.labelGrid),labelGridcell:Jt(Sx,t==null?void 0:t.labelGridcell,n.labelGridcell),labelNav:Jt(kx,t==null?void 0:t.labelNav,n.labelNav),labelWeekNumberHeader:Jt(Rx,t==null?void 0:t.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Jt(Mx,t==null?void 0:t.labelWeekday,n.labelWeekday)}}function o_(t,e,n,r,o){const{startOfMonth:s,startOfYear:i,endOfYear:a,eachMonthOfInterval:l,getMonth:c}=o;return l({start:i(t),end:a(t)}).map(f=>{const h=r.formatMonthDropdown(f,o),g=c(f),b=e&&f<s(e)||n&&f>s(n)||!1;return{value:g,label:h,disabled:b}})}function s_(t,e={},n={}){let r={...e==null?void 0:e[le.Day]};return Object.entries(t).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function i_(t,e,n,r){const o=r??t.today(),s=n?t.startOfBroadcastWeek(o,t):e?t.startOfISOWeek(o):t.startOfWeek(o),i=[];for(let a=0;a<7;a++){const l=t.addDays(s,a);i.push(l)}return i}function a_(t,e,n,r,o=!1){if(!t||!e)return;const{startOfYear:s,endOfYear:i,eachYearOfInterval:a,getYear:l}=r,c=s(t),u=i(e),d=a({start:c,end:u});return o&&d.reverse(),d.map(f=>{const h=n.formatYearDropdown(f,r);return{value:l(f),label:h,disabled:!1}})}function l_(t,e={}){var a;const{weekStartsOn:n,locale:r}=e,o=n??((a=r==null?void 0:r.options)==null?void 0:a.weekStartsOn)??0,s=l=>{const c=typeof l=="number"||typeof l=="string"?new Date(l):l;return new ct(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,t)},i=l=>{const c=s(l);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>s(ct.tz(t)),newDate:(l,c,u)=>new ct(l,c,u,12,0,0,t),startOfDay:l=>s(l),startOfWeek:(l,c)=>{const u=s(l),d=(c==null?void 0:c.weekStartsOn)??o,f=(u.getDay()-d+7)%7;return u.setDate(u.getDate()-f),u},startOfISOWeek:l=>{const c=s(l),u=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-u),c},startOfMonth:l=>{const c=s(l);return c.setDate(1),c},startOfYear:l=>{const c=s(l);return c.setMonth(0,1),c},endOfWeek:(l,c)=>{const u=s(l),h=((((c==null?void 0:c.weekStartsOn)??o)+6)%7-u.getDay()+7)%7;return u.setDate(u.getDate()+h),u},endOfISOWeek:l=>{const c=s(l),u=(7-c.getDay())%7;return c.setDate(c.getDate()+u),c},endOfMonth:l=>{const c=s(l);return c.setMonth(c.getMonth()+1,0),c},endOfYear:l=>{const c=s(l);return c.setMonth(11,31),c},eachMonthOfInterval:l=>{const c=s(l.start),u=s(l.end),d=[],f=new ct(c.getFullYear(),c.getMonth(),1,12,0,0,t),h=u.getFullYear()*12+u.getMonth();for(;f.getFullYear()*12+f.getMonth()<=h;)d.push(new ct(f,t)),f.setMonth(f.getMonth()+1,1);return d},addDays:(l,c)=>{const u=s(l);return u.setDate(u.getDate()+c),u},addWeeks:(l,c)=>{const u=s(l);return u.setDate(u.getDate()+c*7),u},addMonths:(l,c)=>{const u=s(l);return u.setMonth(u.getMonth()+c),u},addYears:(l,c)=>{const u=s(l);return u.setFullYear(u.getFullYear()+c),u},eachYearOfInterval:l=>{const c=s(l.start),u=s(l.end),d=[],f=new ct(c.getFullYear(),0,1,12,0,0,t);for(;f.getFullYear()<=u.getFullYear();)d.push(new ct(f,t)),f.setFullYear(f.getFullYear()+1,0,1);return d},getWeek:(l,c)=>{var d;const u=i(l);return Ef(u,{weekStartsOn:(c==null?void 0:c.weekStartsOn)??o,firstWeekContainsDate:(c==null?void 0:c.firstWeekContainsDate)??((d=r==null?void 0:r.options)==null?void 0:d.firstWeekContainsDate)??1})},getISOWeek:l=>{const c=i(l);return Nf(c)},differenceInCalendarDays:(l,c)=>{const u=i(l),d=i(c);return kf(u,d)},differenceInCalendarMonths:(l,c)=>{const u=i(l),d=i(c);return lx(u,d)}}}const Ri=t=>t instanceof HTMLElement?t:null,su=t=>[...t.querySelectorAll("[data-animated-month]")??[]],c_=t=>Ri(t.querySelector("[data-animated-month]")),iu=t=>Ri(t.querySelector("[data-animated-caption]")),au=t=>Ri(t.querySelector("[data-animated-weeks]")),u_=t=>Ri(t.querySelector("[data-animated-nav]")),d_=t=>Ri(t.querySelector("[data-animated-weekdays]"));function f_(t,e,{classNames:n,months:r,focused:o,dateLib:s}){const i=R.useRef(null),a=R.useRef(r),l=R.useRef(!1);R.useLayoutEffect(()=>{const c=a.current;if(a.current=r,!e||!t.current||!(t.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const u=s.isSameMonth(r[0].date,c[0].date),d=s.isAfter(r[0].date,c[0].date),f=d?n[At.caption_after_enter]:n[At.caption_before_enter],h=d?n[At.weeks_after_enter]:n[At.weeks_before_enter],g=i.current,b=t.current.cloneNode(!0);if(b instanceof HTMLElement?(su(b).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=c_(w);S&&w.contains(S)&&w.removeChild(S);const C=iu(w);C&&C.classList.remove(f);const k=au(w);k&&k.classList.remove(h)}),i.current=b):i.current=null,l.current||u||o)return;const y=g instanceof HTMLElement?su(g):[],v=su(t.current);if(v!=null&&v.every(x=>x instanceof HTMLElement)&&y&&y.every(x=>x instanceof HTMLElement)){l.current=!0,t.current.style.isolation="isolate";const x=u_(t.current);x&&(x.style.zIndex="1"),v.forEach((w,S)=>{const C=y[S];if(!C)return;w.style.position="relative",w.style.overflow="hidden";const k=iu(w);k&&k.classList.add(f);const N=au(w);N&&N.classList.add(h);const E=()=>{l.current=!1,t.current&&(t.current.style.isolation=""),x&&(x.style.zIndex=""),k&&k.classList.remove(f),N&&N.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(C)&&w.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const T=d_(C);T&&(T.style.opacity="0");const O=iu(C);O&&(O.classList.add(d?n[At.caption_before_exit]:n[At.caption_after_exit]),O.addEventListener("animationend",E));const A=au(C);A&&A.classList.add(d?n[At.weeks_before_exit]:n[At.weeks_after_exit]),w.insertBefore(C,w.firstChild)})}})}function p_(t,e,n,r){const o=t[0],s=t[t.length-1],{ISOWeek:i,fixedWeeks:a,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:h,endOfMonth:g,endOfWeek:b,isAfter:y,startOfBroadcastWeek:v,startOfISOWeek:x,startOfWeek:w}=r,S=l?v(o,r):i?x(o):w(o),C=l?f(s):i?h(g(s)):b(g(s)),k=e&&(l?f(e):i?h(e):b(e)),N=k&&y(C,k)?k:C,E=u(N,S),T=d(s,o)+1,O=[];for(let z=0;z<=E;z++){const $=c(S,z);O.push($)}const D=(l?35:42)*T;if(a&&O.length<D){const z=D-O.length;for(let $=0;$<z;$++){const Y=c(O[O.length-1],1);O.push(Y)}}return O}function h_(t){const e=[];return t.reduce((n,r)=>{const o=r.weeks.reduce((s,i)=>s.concat(i.days.slice()),e.slice());return n.concat(o.slice())},e.slice())}function m_(t,e,n,r){const{numberOfMonths:o=1}=n,s=[];for(let i=0;i<o;i++){const a=r.addMonths(t,i);if(e&&a>e)break;s.push(a)}return s}function Am(t,e,n,r){const{month:o,defaultMonth:s,today:i=r.today(),numberOfMonths:a=1}=t;let l=o||s||i;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=r;if(n&&c(n,l)<a-1){const f=-1*(a-1);l=u(n,f)}return e&&c(l,e)<0&&(l=e),d(l)}function g_(t,e,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:i,endOfMonth:a,endOfWeek:l,getISOWeek:c,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:h}=r,g=t.reduce((b,y)=>{const v=n.broadcastCalendar?d(y,r):n.ISOWeek?f(y):h(y),x=n.broadcastCalendar?s(y):n.ISOWeek?i(a(y)):l(a(y)),w=e.filter(N=>N>=v&&N<=x),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<S){const N=e.filter(E=>{const T=S-w.length;return E>x&&E<=o(x,T)});w.push(...N)}const C=w.reduce((N,E)=>{const T=n.ISOWeek?c(E):u(E),O=N.find(D=>D.weekNumber===T),A=new gx(E,y,r);return O?O.days.push(A):N.push(new dj(T,[A])),N},[]),k=new uj(y,C);return b.push(k),b},[]);return n.reverseMonths?g.reverse():g}function b_(t,e){let{startMonth:n,endMonth:r}=t;const{startOfYear:o,startOfDay:s,startOfMonth:i,endOfMonth:a,addYears:l,endOfYear:c,newDate:u,today:d}=e,{fromYear:f,toYear:h,fromMonth:g,toMonth:b}=t;!n&&g&&(n=g),!n&&f&&(n=e.newDate(f,0,1)),!r&&b&&(r=b),!r&&h&&(r=u(h,11,31));const y=t.captionLayout==="dropdown"||t.captionLayout==="dropdown-years";return n?n=i(n):f?n=u(f,0,1):!n&&y&&(n=o(l(t.today??d(),-100))),r?r=a(r):h?r=u(h,11,31):!r&&y&&(r=c(t.today??d())),[n&&s(n),r&&s(r)]}function y_(t,e,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:l}=r,c=o?s:1,u=i(t);if(!e)return a(u,c);if(!(l(e,t)<s))return a(u,c)}function v_(t,e,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:l}=r,c=o?s??1:1,u=i(t);if(!e)return a(u,-c);if(!(l(u,e)<=0))return a(u,-c)}function x_(t){const e=[];return t.reduce((n,r)=>n.concat(r.weeks.slice()),e.slice())}function rc(t,e){const[n,r]=R.useState(t);return[e===void 0?n:e,r]}function w_(t,e){var S;const[n,r]=b_(t,e),{startOfMonth:o,endOfMonth:s}=e,i=Am(t,n,r,e),[a,l]=rc(i,t.month?i:void 0);R.useEffect(()=>{const C=Am(t,n,r,e);l(C)},[t.timeZone]);const{months:c,weeks:u,days:d,previousMonth:f,nextMonth:h}=R.useMemo(()=>{const C=m_(a,r,{numberOfMonths:t.numberOfMonths},e),k=p_(C,t.endMonth?s(t.endMonth):void 0,{ISOWeek:t.ISOWeek,fixedWeeks:t.fixedWeeks,broadcastCalendar:t.broadcastCalendar},e),N=g_(C,k,{broadcastCalendar:t.broadcastCalendar,fixedWeeks:t.fixedWeeks,ISOWeek:t.ISOWeek,reverseMonths:t.reverseMonths},e),E=x_(N),T=h_(N),O=v_(a,n,t,e),A=y_(a,r,t,e);return{months:N,weeks:E,days:T,previousMonth:O,nextMonth:A}},[e,a.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),t.disableNavigation,t.broadcastCalendar,(S=t.endMonth)==null?void 0:S.getTime(),t.fixedWeeks,t.ISOWeek,t.numberOfMonths,t.pagedNavigation,t.reverseMonths]),{disableNavigation:g,onMonthChange:b}=t,y=C=>u.some(k=>k.days.some(N=>N.isEqualTo(C))),v=C=>{if(g)return;let k=o(C);n&&k<o(n)&&(k=o(n)),r&&k>o(r)&&(k=o(r)),l(k),b==null||b(k)};return{months:c,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:h,goToMonth:v,goToDay:C=>{y(C)||v(C.date)}}}var dn;(function(t){t[t.Today=0]="Today",t[t.Selected=1]="Selected",t[t.LastFocused=2]="LastFocused",t[t.FocusedModifier=3]="FocusedModifier"})(dn||(dn={}));function Om(t){return!t[_e.disabled]&&!t[_e.hidden]&&!t[_e.outside]}function S_(t,e,n,r){let o,s=-1;for(const i of t){const a=e(i);Om(a)&&(a[_e.focused]&&s<dn.FocusedModifier?(o=i,s=dn.FocusedModifier):r!=null&&r.isEqualTo(i)&&s<dn.LastFocused?(o=i,s=dn.LastFocused):n(i.date)&&s<dn.Selected?(o=i,s=dn.Selected):a[_e.today]&&s<dn.Today&&(o=i,s=dn.Today))}return o||(o=t.find(i=>Om(e(i)))),o}function C_(t,e,n,r,o,s,i){const{ISOWeek:a,broadcastCalendar:l}=s,{addDays:c,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:h,endOfISOWeek:g,endOfWeek:b,max:y,min:v,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:S}=i;let k={day:c,week:d,month:u,year:f,startOfWeek:N=>l?x(N,i):a?w(N):S(N),endOfWeek:N=>l?h(N):a?g(N):b(N)}[t](n,e==="after"?1:-1);return e==="before"&&r?k=y([r,k]):e==="after"&&o&&(k=v([o,k])),k}function Ox(t,e,n,r,o,s,i,a=0){if(a>365)return;const l=C_(t,e,n.date,r,o,s,i),c=!!(s.disabled&&Fn(l,s.disabled,i)),u=!!(s.hidden&&Fn(l,s.hidden,i)),d=l,f=new gx(l,d,i);return!c&&!u?f:Ox(t,e,f,r,o,s,i,a+1)}function k_(t,e,n,r,o){const{autoFocus:s}=t,[i,a]=R.useState(),l=S_(e.days,n,r||(()=>!1),i),[c,u]=R.useState(s?l:void 0);return{isFocusTarget:b=>!!(l!=null&&l.isEqualTo(b)),setFocused:u,focused:c,blur:()=>{a(c),u(void 0)},moveFocus:(b,y)=>{if(!c)return;const v=Ox(b,y,c,e.navStart,e.navEnd,t,o);v&&(t.disableNavigation&&!e.days.some(w=>w.isEqualTo(v))||(e.goToDay(v),u(v)))}}}function N_(t,e){const{selected:n,required:r,onSelect:o}=t,[s,i]=rc(n,o?n:void 0),a=o?n:s,{isSameDay:l}=e,c=h=>(a==null?void 0:a.some(g=>l(g,h)))??!1,{min:u,max:d}=t;return{selected:a,select:(h,g,b)=>{let y=[...a??[]];if(c(h)){if((a==null?void 0:a.length)===u||r&&(a==null?void 0:a.length)===1)return;y=a==null?void 0:a.filter(v=>!l(v,h))}else(a==null?void 0:a.length)===d?y=[h]:y=[...y,h];return o||i(y),o==null||o(y,h,g,b),y},isSelected:c}}function E_(t,e,n=0,r=0,o=!1,s=kn){const{from:i,to:a}=e||{},{isSameDay:l,isAfter:c,isBefore:u}=s;let d;if(!i&&!a)d={from:t,to:n>0?void 0:t};else if(i&&!a)l(i,t)?n===0?d={from:i,to:t}:o?d={from:i,to:void 0}:d=void 0:u(t,i)?d={from:t,to:i}:d={from:i,to:t};else if(i&&a)if(l(i,t)&&l(a,t))o?d={from:i,to:a}:d=void 0;else if(l(i,t))d={from:i,to:n>0?void 0:t};else if(l(a,t))d={from:t,to:n>0?void 0:t};else if(u(t,i))d={from:t,to:a};else if(c(t,i))d={from:i,to:t};else if(c(t,a))d={from:i,to:t};else throw new Error("Invalid range");if(d!=null&&d.from&&(d!=null&&d.to)){const f=s.differenceInCalendarDays(d.to,d.from);r>0&&f>r?d={from:t,to:void 0}:n>1&&f<n&&(d={from:t,to:void 0})}return d}function M_(t,e,n=kn){const r=Array.isArray(e)?e:[e];let o=t.from;const s=n.differenceInCalendarDays(t.to,t.from),i=Math.min(s,6);for(let a=0;a<=i;a++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Dm(t,e,n=kn){return Ln(t,e.from,!1,n)||Ln(t,e.to,!1,n)||Ln(e,t.from,!1,n)||Ln(e,t.to,!1,n)}function T_(t,e,n=kn){const r=Array.isArray(e)?e:[e];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?Ln(t,a,!1,n):vx(a,n)?a.some(l=>Ln(t,l,!1,n)):nc(a)?a.from&&a.to?Dm(t,{from:a.from,to:a.to},n):!1:yx(a)?M_(t,a.dayOfWeek,n):Mf(a)?n.isAfter(a.before,a.after)?Dm(t,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):Fn(t.from,a,n)||Fn(t.to,a,n):Tf(a)||Rf(a)?Fn(t.from,a,n)||Fn(t.to,a,n):!1))return!0;const i=r.filter(a=>typeof a=="function");if(i.length){let a=t.from;const l=n.differenceInCalendarDays(t.to,t.from);for(let c=0;c<=l;c++){if(i.some(u=>u(a)))return!0;a=n.addDays(a,1)}}return!1}function R_(t,e){const{disabled:n,excludeDisabled:r,selected:o,required:s,onSelect:i}=t,[a,l]=rc(o,i?o:void 0),c=i?o:a;return{selected:c,select:(f,h,g)=>{const{min:b,max:y}=t,v=f?E_(f,c,b,y,s,e):void 0;return r&&n&&(v!=null&&v.from)&&v.to&&T_({from:v.from,to:v.to},n,e)&&(v.from=f,v.to=void 0),i||l(v),i==null||i(v,f,h,g),v},isSelected:f=>c&&Ln(c,f,!1,e)}}function A_(t,e){const{selected:n,required:r,onSelect:o}=t,[s,i]=rc(n,o?n:void 0),a=o?n:s,{isSameDay:l}=e;return{selected:a,select:(d,f,h)=>{let g=d;return!r&&a&&a&&l(d,a)&&(g=void 0),o||i(g),o==null||o(g,d,f,h),g},isSelected:d=>a?l(a,d):!1}}function O_(t,e){const n=A_(t,e),r=N_(t,e),o=R_(t,e);switch(t.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Bt(t,e){return t instanceof ct&&t.timeZone===e?t:new ct(t,e)}function Eo(t,e,n){return Bt(t,e)}function Im(t,e,n){return typeof t=="boolean"||typeof t=="function"?t:t instanceof Date?Eo(t,e):Array.isArray(t)?t.map(r=>r instanceof Date?Eo(r,e):r):nc(t)?{...t,from:t.from?Bt(t.from,e):t.from,to:t.to?Bt(t.to,e):t.to}:Mf(t)?{before:Eo(t.before,e),after:Eo(t.after,e)}:Tf(t)?{after:Eo(t.after,e)}:Rf(t)?{before:Eo(t.before,e)}:t}function lu(t,e,n){return t&&(Array.isArray(t)?t.map(r=>Im(r,e)):Im(t,e))}function D_(t){var wt;let e=t;const n=e.timeZone;if(n&&(e={...t,timeZone:n},e.today&&(e.today=Bt(e.today,n)),e.month&&(e.month=Bt(e.month,n)),e.defaultMonth&&(e.defaultMonth=Bt(e.defaultMonth,n)),e.startMonth&&(e.startMonth=Bt(e.startMonth,n)),e.endMonth&&(e.endMonth=Bt(e.endMonth,n)),e.mode==="single"&&e.selected?e.selected=Bt(e.selected,n):e.mode==="multiple"&&e.selected?e.selected=(wt=e.selected)==null?void 0:wt.map(he=>Bt(he,n)):e.mode==="range"&&e.selected&&(e.selected={from:e.selected.from?Bt(e.selected.from,n):e.selected.from,to:e.selected.to?Bt(e.selected.to,n):e.selected.to}),e.disabled!==void 0&&(e.disabled=lu(e.disabled,n)),e.hidden!==void 0&&(e.hidden=lu(e.hidden,n)),e.modifiers)){const he={};Object.keys(e.modifiers).forEach(xe=>{var ue;he[xe]=lu((ue=e.modifiers)==null?void 0:ue[xe],n)}),e.modifiers=he}const{components:r,formatters:o,labels:s,dateLib:i,locale:a,classNames:l}=R.useMemo(()=>{const he={...mx,...e.locale},xe=e.broadcastCalendar?1:e.weekStartsOn,ue=e.noonSafe&&e.timeZone?l_(e.timeZone,{weekStartsOn:xe,locale:he}):void 0,ve=e.dateLib&&ue?{...ue,...e.dateLib}:e.dateLib??ue,se=new jt({locale:he,weekStartsOn:xe,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens,timeZone:e.timeZone,numerals:e.numerals},ve);return{dateLib:se,components:zj(e.components),formatters:Zj(e.formatters),labels:r_(e.labels,se.options),locale:he,classNames:{...Vj(),...e.classNames}}},[e.locale,e.broadcastCalendar,e.weekStartsOn,e.firstWeekContainsDate,e.useAdditionalWeekYearTokens,e.useAdditionalDayOfYearTokens,e.timeZone,e.numerals,e.dateLib,e.noonSafe,e.components,e.formatters,e.labels,e.classNames]);e.today||(e={...e,today:i.today()});const{captionLayout:c,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:h,onDayClick:g,onDayFocus:b,onDayKeyDown:y,onDayMouseEnter:v,onDayMouseLeave:x,onNextClick:w,onPrevClick:S,showWeekNumber:C,styles:k}=e,{formatCaption:N,formatDay:E,formatMonthDropdown:T,formatWeekNumber:O,formatWeekNumberHeader:A,formatWeekdayName:D,formatYearDropdown:z}=o,$=w_(e,i),{days:Y,months:F,navStart:U,navEnd:_,previousMonth:j,nextMonth:L,goToMonth:K}=$,I=$j(Y,e,U,_,i),{isSelected:H,select:X,selected:V}=O_(e,i)??{},{blur:ee,focused:B,isFocusTarget:J,moveFocus:te,setFocused:re}=k_(e,$,I,H??(()=>!1),i),{labelDayButton:ne,labelGridcell:G,labelGrid:fe,labelMonthDropdown:ye,labelNav:Me,labelPrevious:He,labelNext:je,labelWeekday:xt,labelWeekNumber:Te,labelWeekNumberHeader:Yt,labelYearDropdown:Rn}=s,Je=R.useMemo(()=>i_(i,e.ISOWeek,e.broadcastCalendar,e.today),[i,e.ISOWeek,e.broadcastCalendar,e.today]),Tt=u!==void 0||g!==void 0,Kn=R.useCallback(()=>{j&&(K(j),S==null||S(j))},[j,K,S]),Yn=R.useCallback(()=>{L&&(K(L),w==null||w(L))},[K,L,w]),qn=R.useCallback((he,xe)=>ue=>{ue.preventDefault(),ue.stopPropagation(),re(he),!xe.disabled&&(X==null||X(he.date,xe,ue),g==null||g(he.date,xe,ue))},[X,g,re]),go=R.useCallback((he,xe)=>ue=>{re(he),b==null||b(he.date,xe,ue)},[b,re]),bo=R.useCallback((he,xe)=>ue=>{ee(),h==null||h(he.date,xe,ue)},[ee,h]),An=R.useCallback((he,xe)=>ue=>{const ve={ArrowLeft:[ue.shiftKey?"month":"day",e.dir==="rtl"?"after":"before"],ArrowRight:[ue.shiftKey?"month":"day",e.dir==="rtl"?"before":"after"],ArrowDown:[ue.shiftKey?"year":"week","after"],ArrowUp:[ue.shiftKey?"year":"week","before"],PageUp:[ue.shiftKey?"year":"month","before"],PageDown:[ue.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ve[ue.key]){ue.preventDefault(),ue.stopPropagation();const[se,ae]=ve[ue.key];te(se,ae)}y==null||y(he.date,xe,ue)},[te,y,e.dir]),mt=R.useCallback((he,xe)=>ue=>{v==null||v(he.date,xe,ue)},[v]),Xn=R.useCallback((he,xe)=>ue=>{x==null||x(he.date,xe,ue)},[x]),Lt=R.useCallback(he=>xe=>{const ue=Number(xe.target.value),ve=i.setMonth(i.startOfMonth(he),ue);K(ve)},[i,K]),Jn=R.useCallback(he=>xe=>{const ue=Number(xe.target.value),ve=i.setYear(i.startOfMonth(he),ue);K(ve)},[i,K]),{className:vs,style:yo}=R.useMemo(()=>({className:[l[le.Root],e.className].filter(Boolean).join(" "),style:{...k==null?void 0:k[le.Root],...e.style}}),[l,e.className,e.style,k]),vo=Hj(e),xo=R.useRef(null);f_(xo,!!e.animate,{classNames:l,months:F,focused:B,dateLib:i});const jr={dayPickerProps:e,selected:V,select:X,isSelected:H,months:F,nextMonth:L,previousMonth:j,goToMonth:K,getModifiers:I,components:r,classNames:l,styles:k,labels:s,formatters:o};return R.createElement(bx.Provider,{value:jr},R.createElement(r.Root,{rootRef:e.animate?xo:void 0,className:vs,style:yo,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,role:e.role,"aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],...vo},R.createElement(r.Months,{className:l[le.Months],style:k==null?void 0:k[le.Months]},!e.hideNavigation&&!d&&R.createElement(r.Nav,{"data-animated-nav":e.animate?"true":void 0,className:l[le.Nav],style:k==null?void 0:k[le.Nav],"aria-label":Me(),onPreviousClick:Kn,onNextClick:Yn,previousMonth:j,nextMonth:L}),F.map((he,xe)=>R.createElement(r.Month,{"data-animated-month":e.animate?"true":void 0,className:l[le.Month],style:k==null?void 0:k[le.Month],key:xe,displayIndex:xe,calendarMonth:he},d==="around"&&!e.hideNavigation&&xe===0&&R.createElement(r.PreviousMonthButton,{type:"button",className:l[le.PreviousMonthButton],tabIndex:j?void 0:-1,"aria-disabled":j?void 0:!0,"aria-label":He(j),onClick:Kn,"data-animated-button":e.animate?"true":void 0},R.createElement(r.Chevron,{disabled:j?void 0:!0,className:l[le.Chevron],orientation:e.dir==="rtl"?"right":"left"})),R.createElement(r.MonthCaption,{"data-animated-caption":e.animate?"true":void 0,className:l[le.MonthCaption],style:k==null?void 0:k[le.MonthCaption],calendarMonth:he,displayIndex:xe},c!=null&&c.startsWith("dropdown")?R.createElement(r.DropdownNav,{className:l[le.Dropdowns],style:k==null?void 0:k[le.Dropdowns]},(()=>{const ue=c==="dropdown"||c==="dropdown-months"?R.createElement(r.MonthsDropdown,{key:"month",className:l[le.MonthsDropdown],"aria-label":ye(),classNames:l,components:r,disabled:!!e.disableNavigation,onChange:Lt(he.date),options:o_(he.date,U,_,o,i),style:k==null?void 0:k[le.Dropdown],value:i.getMonth(he.date)}):R.createElement("span",{key:"month"},T(he.date,i)),ve=c==="dropdown"||c==="dropdown-years"?R.createElement(r.YearsDropdown,{key:"year",className:l[le.YearsDropdown],"aria-label":Rn(i.options),classNames:l,components:r,disabled:!!e.disableNavigation,onChange:Jn(he.date),options:a_(U,_,o,i,!!e.reverseYears),style:k==null?void 0:k[le.Dropdown],value:i.getYear(he.date)}):R.createElement("span",{key:"year"},z(he.date,i));return i.getMonthYearOrder()==="year-first"?[ve,ue]:[ue,ve]})(),R.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},N(he.date,i.options,i))):R.createElement(r.CaptionLabel,{className:l[le.CaptionLabel],role:"status","aria-live":"polite"},N(he.date,i.options,i))),d==="around"&&!e.hideNavigation&&xe===f-1&&R.createElement(r.NextMonthButton,{type:"button",className:l[le.NextMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":je(L),onClick:Yn,"data-animated-button":e.animate?"true":void 0},R.createElement(r.Chevron,{disabled:L?void 0:!0,className:l[le.Chevron],orientation:e.dir==="rtl"?"left":"right"})),xe===f-1&&d==="after"&&!e.hideNavigation&&R.createElement(r.Nav,{"data-animated-nav":e.animate?"true":void 0,className:l[le.Nav],style:k==null?void 0:k[le.Nav],"aria-label":Me(),onPreviousClick:Kn,onNextClick:Yn,previousMonth:j,nextMonth:L}),R.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":fe(he.date,i.options,i)||void 0,className:l[le.MonthGrid],style:k==null?void 0:k[le.MonthGrid]},!e.hideWeekdays&&R.createElement(r.Weekdays,{"data-animated-weekdays":e.animate?"true":void 0,className:l[le.Weekdays],style:k==null?void 0:k[le.Weekdays]},C&&R.createElement(r.WeekNumberHeader,{"aria-label":Yt(i.options),className:l[le.WeekNumberHeader],style:k==null?void 0:k[le.WeekNumberHeader],scope:"col"},A()),Je.map(ue=>R.createElement(r.Weekday,{"aria-label":xt(ue,i.options,i),className:l[le.Weekday],key:String(ue),style:k==null?void 0:k[le.Weekday],scope:"col"},D(ue,i.options,i)))),R.createElement(r.Weeks,{"data-animated-weeks":e.animate?"true":void 0,className:l[le.Weeks],style:k==null?void 0:k[le.Weeks]},he.weeks.map(ue=>R.createElement(r.Week,{className:l[le.Week],key:ue.weekNumber,style:k==null?void 0:k[le.Week],week:ue},C&&R.createElement(r.WeekNumber,{week:ue,style:k==null?void 0:k[le.WeekNumber],"aria-label":Te(ue.weekNumber,{locale:a}),className:l[le.WeekNumber],scope:"row",role:"rowheader"},O(ue.weekNumber,i)),ue.days.map(ve=>{const{date:se}=ve,ae=I(ve);if(ae[_e.focused]=!ae.hidden&&!!(B!=null&&B.isEqualTo(ve)),ae[en.selected]=(H==null?void 0:H(se))||ae.selected,nc(V)){const{from:We,to:at}=V;ae[en.range_start]=!!(We&&at&&i.isSameDay(se,We)),ae[en.range_end]=!!(We&&at&&i.isSameDay(se,at)),ae[en.range_middle]=Ln(V,se,!0,i)}const Ve=s_(ae,k,e.modifiersStyles),nt=Bj(ae,l,e.modifiersClassNames),wo=!Tt&&!ae.hidden?G(se,ae,i.options,i):void 0;return R.createElement(r.Day,{key:`${ve.isoDate}_${ve.displayMonthId}`,day:ve,modifiers:ae,className:nt.join(" "),style:Ve,role:"gridcell","aria-selected":ae.selected||void 0,"aria-label":wo,"data-day":ve.isoDate,"data-month":ve.outside?ve.dateMonthId:void 0,"data-selected":ae.selected||void 0,"data-disabled":ae.disabled||void 0,"data-hidden":ae.hidden||void 0,"data-outside":ve.outside||void 0,"data-focused":ae.focused||void 0,"data-today":ae.today||void 0},!ae.hidden&&Tt?R.createElement(r.DayButton,{className:l[le.DayButton],style:k==null?void 0:k[le.DayButton],type:"button",day:ve,modifiers:ae,disabled:!ae.focused&&ae.disabled||void 0,"aria-disabled":ae.focused&&ae.disabled||void 0,tabIndex:J(ve)?0:-1,"aria-label":ne(se,ae,i.options,i),onClick:qn(ve,ae),onBlur:bo(ve,ae),onFocus:go(ve,ae),onKeyDown:An(ve,ae),onMouseEnter:mt(ve,ae),onMouseLeave:Xn(ve,ae)},E(se,i.options,i)):!ae.hidden&&E(ve.date,i.options,i))})))))))),e.footer&&R.createElement(r.Footer,{className:l[le.Footer],style:k==null?void 0:k[le.Footer],role:"status","aria-live":"polite"},e.footer)))}function Ai({className:t,classNames:e,showOutsideDays:n=!0,...r}){return p.jsx(D_,{showOutsideDays:n,className:M("p-3",t),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-4",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",button_previous:M(fr({variant:"outline"}),"absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),button_next:M(fr({variant:"outline"}),"absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day_button:M(fr({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...e},components:{Chevron:({orientation:o})=>o==="left"?p.jsx(hf,{className:"h-4 w-4"}):p.jsx(Nr,{className:"h-4 w-4"})},...r})}Ai.displayName="Calendar";const Dx=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Dx.displayName="Card";const Ix=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("flex flex-col space-y-1.5 p-6",t),...e}));Ix.displayName="CardHeader";const Px=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("font-heading text-2xl font-semibold leading-none tracking-tight",t),...e}));Px.displayName="CardTitle";const jx=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("text-sm text-muted-foreground",t),...e}));jx.displayName="CardDescription";const _x=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("p-6 pt-0",t),...e}));_x.displayName="CardContent";const Lx=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("flex items-center p-6 pt-0",t),...e}));Lx.displayName="CardFooter";function I_(t){return Object.prototype.toString.call(t)==="[object Object]"}function Pm(t){return I_(t)||Array.isArray(t)}function P_(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Df(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(t.breakpoints||{})),s=JSON.stringify(Object.keys(e.breakpoints||{}));return o!==s?!1:n.every(i=>{const a=t[i],l=e[i];return typeof a=="function"?`${a}`==`${l}`:!Pm(a)||!Pm(l)?a===l:Df(a,l)})}function jm(t){return t.concat().sort((e,n)=>e.name>n.name?1:-1).map(e=>e.options)}function j_(t,e){if(t.length!==e.length)return!1;const n=jm(t),r=jm(e);return n.every((o,s)=>{const i=r[s];return Df(o,i)})}function If(t){return typeof t=="number"}function Zu(t){return typeof t=="string"}function oc(t){return typeof t=="boolean"}function _m(t){return Object.prototype.toString.call(t)==="[object Object]"}function Fe(t){return Math.abs(t)}function Pf(t){return Math.sign(t)}function $s(t,e){return Fe(t-e)}function __(t,e){if(t===0||e===0||Fe(t)<=Fe(e))return 0;const n=$s(Fe(t),Fe(e));return Fe(n/t)}function L_(t){return Math.round(t*100)/100}function ei(t){return ti(t).map(Number)}function nn(t){return t[Oi(t)]}function Oi(t){return Math.max(0,t.length-1)}function jf(t,e){return e===Oi(t)}function Lm(t,e=0){return Array.from(Array(t),(n,r)=>e+r)}function ti(t){return Object.keys(t)}function Fx(t,e){return[t,e].reduce((n,r)=>(ti(r).forEach(o=>{const s=n[o],i=r[o],a=_m(s)&&_m(i);n[o]=a?Fx(s,i):i}),n),{})}function Qu(t,e){return typeof e.MouseEvent<"u"&&t instanceof e.MouseEvent}function F_(t,e){const n={start:r,center:o,end:s};function r(){return 0}function o(l){return s(l)/2}function s(l){return e-l}function i(l,c){return Zu(t)?n[t](l):t(e,l,c)}return{measure:i}}function ni(){let t=[];function e(o,s,i,a={passive:!0}){let l;if("addEventListener"in o)o.addEventListener(s,i,a),l=()=>o.removeEventListener(s,i,a);else{const c=o;c.addListener(i),l=()=>c.removeListener(i)}return t.push(l),r}function n(){t=t.filter(o=>o())}const r={add:e,clear:n};return r}function $_(t,e,n,r){const o=ni(),s=1e3/60;let i=null,a=0,l=0;function c(){o.add(t,"visibilitychange",()=>{t.hidden&&g()})}function u(){h(),o.clear()}function d(y){if(!l)return;i||(i=y,n(),n());const v=y-i;for(i=y,a+=v;a>=s;)n(),a-=s;const x=a/s;r(x),l&&(l=e.requestAnimationFrame(d))}function f(){l||(l=e.requestAnimationFrame(d))}function h(){e.cancelAnimationFrame(l),i=null,a=0,l=0}function g(){i=null,a=0}return{init:c,destroy:u,start:f,stop:h,update:n,render:r}}function B_(t,e){const n=e==="rtl",r=t==="y",o=r?"y":"x",s=r?"x":"y",i=!r&&n?-1:1,a=u(),l=d();function c(g){const{height:b,width:y}=g;return r?b:y}function u(){return r?"top":n?"right":"left"}function d(){return r?"bottom":n?"left":"right"}function f(g){return g*i}return{scroll:o,cross:s,startEdge:a,endEdge:l,measureSize:c,direction:f}}function Qr(t=0,e=0){const n=Fe(t-e);function r(c){return c<t}function o(c){return c>e}function s(c){return r(c)||o(c)}function i(c){return s(c)?r(c)?t:e:c}function a(c){return n?c-n*Math.ceil((c-e)/n):c}return{length:n,max:e,min:t,constrain:i,reachedAny:s,reachedMax:o,reachedMin:r,removeOffset:a}}function $x(t,e,n){const{constrain:r}=Qr(0,t),o=t+1;let s=i(e);function i(f){return n?Fe((o+f)%o):r(f)}function a(){return s}function l(f){return s=i(f),d}function c(f){return u().set(a()+f)}function u(){return $x(t,a(),n)}const d={get:a,set:l,add:c,clone:u};return d}function z_(t,e,n,r,o,s,i,a,l,c,u,d,f,h,g,b,y,v,x){const{cross:w,direction:S}=t,C=["INPUT","SELECT","TEXTAREA"],k={passive:!1},N=ni(),E=ni(),T=Qr(50,225).constrain(h.measure(20)),O={mouse:300,touch:400},A={mouse:500,touch:600},D=g?43:25;let z=!1,$=0,Y=0,F=!1,U=!1,_=!1,j=!1;function L(G){if(!x)return;function fe(Me){(oc(x)||x(G,Me))&&ee(Me)}const ye=e;N.add(ye,"dragstart",Me=>Me.preventDefault(),k).add(ye,"touchmove",()=>{},k).add(ye,"touchend",()=>{}).add(ye,"touchstart",fe).add(ye,"mousedown",fe).add(ye,"touchcancel",J).add(ye,"contextmenu",J).add(ye,"click",te,!0)}function K(){N.clear(),E.clear()}function I(){const G=j?n:e;E.add(G,"touchmove",B,k).add(G,"touchend",J).add(G,"mousemove",B,k).add(G,"mouseup",J)}function H(G){const fe=G.nodeName||"";return C.includes(fe)}function X(){return(g?A:O)[j?"mouse":"touch"]}function V(G,fe){const ye=d.add(Pf(G)*-1),Me=u.byDistance(G,!g).distance;return g||Fe(G)<T?Me:y&&fe?Me*.5:u.byIndex(ye.get(),0).distance}function ee(G){const fe=Qu(G,r);j=fe,_=g&&fe&&!G.buttons&&z,z=$s(o.get(),i.get())>=2,!(fe&&G.button!==0)&&(H(G.target)||(F=!0,s.pointerDown(G),c.useFriction(0).useDuration(0),o.set(i),I(),$=s.readPoint(G),Y=s.readPoint(G,w),f.emit("pointerDown")))}function B(G){if(!Qu(G,r)&&G.touches.length>=2)return J(G);const ye=s.readPoint(G),Me=s.readPoint(G,w),He=$s(ye,$),je=$s(Me,Y);if(!U&&!j&&(!G.cancelable||(U=He>je,!U)))return J(G);const xt=s.pointerMove(G);He>b&&(_=!0),c.useFriction(.3).useDuration(.75),a.start(),o.add(S(xt)),G.preventDefault()}function J(G){const ye=u.byDistance(0,!1).index!==d.get(),Me=s.pointerUp(G)*X(),He=V(S(Me),ye),je=__(Me,He),xt=D-10*je,Te=v+je/50;U=!1,F=!1,E.clear(),c.useDuration(xt).useFriction(Te),l.distance(He,!g),j=!1,f.emit("pointerUp")}function te(G){_&&(G.stopPropagation(),G.preventDefault(),_=!1)}function re(){return F}return{init:L,destroy:K,pointerDown:re}}function H_(t,e){let r,o;function s(d){return d.timeStamp}function i(d,f){const g=`client${(f||t.scroll)==="x"?"X":"Y"}`;return(Qu(d,e)?d:d.touches[0])[g]}function a(d){return r=d,o=d,i(d)}function l(d){const f=i(d)-i(o),h=s(d)-s(r)>170;return o=d,h&&(r=d),f}function c(d){if(!r||!o)return 0;const f=i(o)-i(r),h=s(d)-s(r),g=s(d)-s(o)>170,b=f/h;return h&&!g&&Fe(b)>.1?b:0}return{pointerDown:a,pointerMove:l,pointerUp:c,readPoint:i}}function V_(){function t(n){const{offsetTop:r,offsetLeft:o,offsetWidth:s,offsetHeight:i}=n;return{top:r,right:o+s,bottom:r+i,left:o,width:s,height:i}}return{measure:t}}function W_(t){function e(r){return t*(r/100)}return{measure:e}}function U_(t,e,n,r,o,s,i){const a=[t].concat(r);let l,c,u=[],d=!1;function f(y){return o.measureSize(i.measure(y))}function h(y){if(!s)return;c=f(t),u=r.map(f);function v(x){for(const w of x){if(d)return;const S=w.target===t,C=r.indexOf(w.target),k=S?c:u[C],N=f(S?t:r[C]);if(Fe(N-k)>=.5){y.reInit(),e.emit("resize");break}}}l=new ResizeObserver(x=>{(oc(s)||s(y,x))&&v(x)}),n.requestAnimationFrame(()=>{a.forEach(x=>l.observe(x))})}function g(){d=!0,l&&l.disconnect()}return{init:h,destroy:g}}function G_(t,e,n,r,o,s){let i=0,a=0,l=o,c=s,u=t.get(),d=0;function f(){const k=r.get()-t.get(),N=!l;let E=0;return N?(i=0,n.set(r),t.set(r),E=k):(n.set(t),i+=k/l,i*=c,u+=i,t.add(i),E=u-d),a=Pf(E),d=u,C}function h(){const k=r.get()-e.get();return Fe(k)<.001}function g(){return l}function b(){return a}function y(){return i}function v(){return w(o)}function x(){return S(s)}function w(k){return l=k,C}function S(k){return c=k,C}const C={direction:b,duration:g,velocity:y,seek:f,settled:h,useBaseFriction:x,useBaseDuration:v,useFriction:S,useDuration:w};return C}function K_(t,e,n,r,o){const s=o.measure(10),i=o.measure(50),a=Qr(.1,.99);let l=!1;function c(){return!(l||!t.reachedAny(n.get())||!t.reachedAny(e.get()))}function u(h){if(!c())return;const g=t.reachedMin(e.get())?"min":"max",b=Fe(t[g]-e.get()),y=n.get()-e.get(),v=a.constrain(b/i);n.subtract(y*v),!h&&Fe(y)<s&&(n.set(t.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:c,constrain:u,toggleActive:d}}function Y_(t,e,n,r,o){const s=Qr(-e+t,0),i=d(),a=u(),l=f();function c(g,b){return $s(g,b)<=1}function u(){const g=i[0],b=nn(i),y=i.lastIndexOf(g),v=i.indexOf(b)+1;return Qr(y,v)}function d(){return n.map((g,b)=>{const{min:y,max:v}=s,x=s.constrain(g),w=!b,S=jf(n,b);return w?v:S||c(y,x)?y:c(v,x)?v:x}).map(g=>parseFloat(g.toFixed(3)))}function f(){if(e<=t+o)return[s.max];if(r==="keepSnaps")return i;const{min:g,max:b}=a;return i.slice(g,b)}return{snapsContained:l,scrollContainLimit:a}}function q_(t,e,n){const r=e[0],o=n?r-t:nn(e);return{limit:Qr(o,r)}}function X_(t,e,n,r){const s=e.min+.1,i=e.max+.1,{reachedMin:a,reachedMax:l}=Qr(s,i);function c(f){return f===1?l(n.get()):f===-1?a(n.get()):!1}function u(f){if(!c(f))return;const h=t*(f*-1);r.forEach(g=>g.add(h))}return{loop:u}}function J_(t){const{max:e,length:n}=t;function r(s){const i=s-e;return n?i/-n:0}return{get:r}}function Z_(t,e,n,r,o){const{startEdge:s,endEdge:i}=t,{groupSlides:a}=o,l=d().map(e.measure),c=f(),u=h();function d(){return a(r).map(b=>nn(b)[i]-b[0][s]).map(Fe)}function f(){return r.map(b=>n[s]-b[s]).map(b=>-Fe(b))}function h(){return a(c).map(b=>b[0]).map((b,y)=>b+l[y])}return{snaps:c,snapsAligned:u}}function Q_(t,e,n,r,o,s){const{groupSlides:i}=o,{min:a,max:l}=r,c=u();function u(){const f=i(s),h=!t||e==="keepSnaps";return n.length===1?[s]:h?f:f.slice(a,l).map((g,b,y)=>{const v=!b,x=jf(y,b);if(v){const w=nn(y[0])+1;return Lm(w)}if(x){const w=Oi(s)-nn(y)[0]+1;return Lm(w,nn(y)[0])}return g})}return{slideRegistry:c}}function eL(t,e,n,r,o){const{reachedAny:s,removeOffset:i,constrain:a}=r;function l(g){return g.concat().sort((b,y)=>Fe(b)-Fe(y))[0]}function c(g){const b=t?i(g):a(g),y=e.map((x,w)=>({diff:u(x-b,0),index:w})).sort((x,w)=>Fe(x.diff)-Fe(w.diff)),{index:v}=y[0];return{index:v,distance:b}}function u(g,b){const y=[g,g+n,g-n];if(!t)return g;if(!b)return l(y);const v=y.filter(x=>Pf(x)===b);return v.length?l(v):nn(y)-n}function d(g,b){const y=e[g]-o.get(),v=u(y,b);return{index:g,distance:v}}function f(g,b){const y=o.get()+g,{index:v,distance:x}=c(y),w=!t&&s(y);if(!b||w)return{index:v,distance:g};const S=e[v]-x,C=g+u(S,0);return{index:v,distance:C}}return{byDistance:f,byIndex:d,shortcut:u}}function tL(t,e,n,r,o,s,i){function a(d){const f=d.distance,h=d.index!==e.get();s.add(f),f&&(r.duration()?t.start():(t.update(),t.render(1),t.update())),h&&(n.set(e.get()),e.set(d.index),i.emit("select"))}function l(d,f){const h=o.byDistance(d,f);a(h)}function c(d,f){const h=e.clone().set(d),g=o.byIndex(h.get(),f);a(g)}return{distance:l,index:c}}function nL(t,e,n,r,o,s,i,a){const l={passive:!0,capture:!0};let c=0;function u(h){if(!a)return;function g(b){if(new Date().getTime()-c>10)return;i.emit("slideFocusStart"),t.scrollLeft=0;const x=n.findIndex(w=>w.includes(b));If(x)&&(o.useDuration(0),r.index(x,0),i.emit("slideFocus"))}s.add(document,"keydown",d,!1),e.forEach((b,y)=>{s.add(b,"focus",v=>{(oc(a)||a(h,v))&&g(y)},l)})}function d(h){h.code==="Tab"&&(c=new Date().getTime())}return{init:u}}function Rs(t){let e=t;function n(){return e}function r(l){e=i(l)}function o(l){e+=i(l)}function s(l){e-=i(l)}function i(l){return If(l)?l:l.get()}return{get:n,set:r,add:o,subtract:s}}function Bx(t,e){const n=t.scroll==="x"?i:a,r=e.style;let o=null,s=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function a(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(s)return;const h=L_(t.direction(f));h!==o&&(r.transform=n(h),o=h)}function c(f){s=!f}function u(){s||(r.transform="",e.getAttribute("style")||e.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function rL(t,e,n,r,o,s,i,a,l){const u=ei(o),d=ei(o).reverse(),f=v().concat(x());function h(N,E){return N.reduce((T,O)=>T-o[O],E)}function g(N,E){return N.reduce((T,O)=>h(T,E)>0?T.concat([O]):T,[])}function b(N){return s.map((E,T)=>({start:E-r[T]+.5+N,end:E+e-.5+N}))}function y(N,E,T){const O=b(E);return N.map(A=>{const D=T?0:-n,z=T?n:0,$=T?"end":"start",Y=O[A][$];return{index:A,loopPoint:Y,slideLocation:Rs(-1),translate:Bx(t,l[A]),target:()=>a.get()>Y?D:z}})}function v(){const N=i[0],E=g(d,N);return y(E,n,!1)}function x(){const N=e-i[0]-1,E=g(u,N);return y(E,-n,!0)}function w(){return f.every(({index:N})=>{const E=u.filter(T=>T!==N);return h(E,e)<=.1})}function S(){f.forEach(N=>{const{target:E,translate:T,slideLocation:O}=N,A=E();A!==O.get()&&(T.to(A),O.set(A))})}function C(){f.forEach(N=>N.translate.clear())}return{canLoop:w,clear:C,loop:S,loopPoints:f}}function oL(t,e,n){let r,o=!1;function s(l){if(!n)return;function c(u){for(const d of u)if(d.type==="childList"){l.reInit(),e.emit("slidesChanged");break}}r=new MutationObserver(u=>{o||(oc(n)||n(l,u))&&c(u)}),r.observe(t,{childList:!0})}function i(){r&&r.disconnect(),o=!0}return{init:s,destroy:i}}function sL(t,e,n,r){const o={};let s=null,i=null,a,l=!1;function c(){a=new IntersectionObserver(g=>{l||(g.forEach(b=>{const y=e.indexOf(b.target);o[y]=b}),s=null,i=null,n.emit("slidesInView"))},{root:t.parentElement,threshold:r}),e.forEach(g=>a.observe(g))}function u(){a&&a.disconnect(),l=!0}function d(g){return ti(o).reduce((b,y)=>{const v=parseInt(y),{isIntersecting:x}=o[v];return(g&&x||!g&&!x)&&b.push(v),b},[])}function f(g=!0){if(g&&s)return s;if(!g&&i)return i;const b=d(g);return g&&(s=b),g||(i=b),b}return{init:c,destroy:u,get:f}}function iL(t,e,n,r,o,s){const{measureSize:i,startEdge:a,endEdge:l}=t,c=n[0]&&o,u=g(),d=b(),f=n.map(i),h=y();function g(){if(!c)return 0;const x=n[0];return Fe(e[a]-x[a])}function b(){if(!c)return 0;const x=s.getComputedStyle(nn(r));return parseFloat(x.getPropertyValue(`margin-${l}`))}function y(){return n.map((x,w,S)=>{const C=!w,k=jf(S,w);return C?f[w]+u:k?f[w]+d:S[w+1][a]-x[a]}).map(Fe)}return{slideSizes:f,slideSizesWithGaps:h,startGap:u,endGap:d}}function aL(t,e,n,r,o,s,i,a,l){const{startEdge:c,endEdge:u,direction:d}=t,f=If(n);function h(v,x){return ei(v).filter(w=>w%x===0).map(w=>v.slice(w,w+x))}function g(v){return v.length?ei(v).reduce((x,w,S)=>{const C=nn(x)||0,k=C===0,N=w===Oi(v),E=o[c]-s[C][c],T=o[c]-s[w][u],O=!r&&k?d(i):0,A=!r&&N?d(a):0,D=Fe(T-A-(E+O));return S&&D>e+l&&x.push(w),N&&x.push(v.length),x},[]).map((x,w,S)=>{const C=Math.max(S[w-1]||0);return v.slice(C,x)}):[]}function b(v){return f?h(v,n):g(v)}return{groupSlides:b}}function lL(t,e,n,r,o,s,i){const{align:a,axis:l,direction:c,startIndex:u,loop:d,duration:f,dragFree:h,dragThreshold:g,inViewThreshold:b,slidesToScroll:y,skipSnaps:v,containScroll:x,watchResize:w,watchSlides:S,watchDrag:C,watchFocus:k}=s,N=2,E=V_(),T=E.measure(e),O=n.map(E.measure),A=B_(l,c),D=A.measureSize(T),z=W_(D),$=F_(a,D),Y=!d&&!!x,F=d||!!x,{slideSizes:U,slideSizesWithGaps:_,startGap:j,endGap:L}=iL(A,T,O,n,F,o),K=aL(A,D,y,d,T,O,j,L,N),{snaps:I,snapsAligned:H}=Z_(A,$,T,O,K),X=-nn(I)+nn(_),{snapsContained:V,scrollContainLimit:ee}=Y_(D,X,H,x,N),B=Y?V:H,{limit:J}=q_(X,B,d),te=$x(Oi(B),u,d),re=te.clone(),ne=ei(n),G=({dragHandler:mt,scrollBody:Xn,scrollBounds:Lt,options:{loop:Jn}})=>{Jn||Lt.constrain(mt.pointerDown()),Xn.seek()},fe=({scrollBody:mt,translate:Xn,location:Lt,offsetLocation:Jn,previousLocation:vs,scrollLooper:yo,slideLooper:vo,dragHandler:xo,animation:jr,eventHandler:wt,scrollBounds:he,options:{loop:xe}},ue)=>{const ve=mt.settled(),se=!he.shouldConstrain(),ae=xe?ve:ve&&se,Ve=ae&&!xo.pointerDown();Ve&&jr.stop();const nt=Lt.get()*ue+vs.get()*(1-ue);Jn.set(nt),xe&&(yo.loop(mt.direction()),vo.loop()),Xn.to(Jn.get()),Ve&&wt.emit("settle"),ae||wt.emit("scroll")},ye=$_(r,o,()=>G(An),mt=>fe(An,mt)),Me=.68,He=B[te.get()],je=Rs(He),xt=Rs(He),Te=Rs(He),Yt=Rs(He),Rn=G_(je,Te,xt,Yt,f,Me),Je=eL(d,B,X,J,Yt),Tt=tL(ye,te,re,Rn,Je,Yt,i),Kn=J_(J),Yn=ni(),qn=sL(e,n,i,b),{slideRegistry:go}=Q_(Y,x,B,ee,K,ne),bo=nL(t,n,go,Tt,Rn,Yn,i,k),An={ownerDocument:r,ownerWindow:o,eventHandler:i,containerRect:T,slideRects:O,animation:ye,axis:A,dragHandler:z_(A,t,r,o,Yt,H_(A,o),je,ye,Tt,Rn,Je,te,i,z,h,g,v,Me,C),eventStore:Yn,percentOfView:z,index:te,indexPrevious:re,limit:J,location:je,offsetLocation:Te,previousLocation:xt,options:s,resizeHandler:U_(e,i,o,n,A,w,E),scrollBody:Rn,scrollBounds:K_(J,Te,Yt,Rn,z),scrollLooper:X_(X,J,Te,[je,Te,xt,Yt]),scrollProgress:Kn,scrollSnapList:B.map(Kn.get),scrollSnaps:B,scrollTarget:Je,scrollTo:Tt,slideLooper:rL(A,D,X,U,_,I,B,Te,n),slideFocus:bo,slidesHandler:oL(e,i,S),slidesInView:qn,slideIndexes:ne,slideRegistry:go,slidesToScroll:K,target:Yt,translate:Bx(A,e)};return An}function cL(){let t={},e;function n(c){e=c}function r(c){return t[c]||[]}function o(c){return r(c).forEach(u=>u(e,c)),l}function s(c,u){return t[c]=r(c).concat([u]),l}function i(c,u){return t[c]=r(c).filter(d=>d!==u),l}function a(){t={}}const l={init:n,emit:o,off:i,on:s,clear:a};return l}const uL={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function dL(t){function e(s,i){return Fx(s,i||{})}function n(s){const i=s.breakpoints||{},a=ti(i).filter(l=>t.matchMedia(l).matches).map(l=>i[l]).reduce((l,c)=>e(l,c),{});return e(s,a)}function r(s){return s.map(i=>ti(i.breakpoints||{})).reduce((i,a)=>i.concat(a),[]).map(t.matchMedia)}return{mergeOptions:e,optionsAtMedia:n,optionsMediaQueries:r}}function fL(t){let e=[];function n(s,i){return e=i.filter(({options:a})=>t.optionsAtMedia(a).active!==!1),e.forEach(a=>a.init(s,t)),i.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function r(){e=e.filter(s=>s.destroy())}return{init:n,destroy:r}}function Fa(t,e,n){const r=t.ownerDocument,o=r.defaultView,s=dL(o),i=fL(s),a=ni(),l=cL(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:d}=s,{on:f,off:h,emit:g}=l,b=A;let y=!1,v,x=c(uL,Fa.globalOptions),w=c(x),S=[],C,k,N;function E(){const{container:ne,slides:G}=w;k=(Zu(ne)?t.querySelector(ne):ne)||t.children[0];const ye=Zu(G)?k.querySelectorAll(G):G;N=[].slice.call(ye||k.children)}function T(ne){const G=lL(t,k,N,r,o,ne,l);if(ne.loop&&!G.slideLooper.canLoop()){const fe=Object.assign({},ne,{loop:!1});return T(fe)}return G}function O(ne,G){y||(x=c(x,ne),w=u(x),S=G||S,E(),v=T(w),d([x,...S.map(({options:fe})=>fe)]).forEach(fe=>a.add(fe,"change",A)),w.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(re),v.eventHandler.init(re),v.resizeHandler.init(re),v.slidesHandler.init(re),v.options.loop&&v.slideLooper.loop(),k.offsetParent&&N.length&&v.dragHandler.init(re),C=i.init(re,S)))}function A(ne,G){const fe=K();D(),O(c({startIndex:fe},ne),G),l.emit("reInit")}function D(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),i.destroy(),a.clear()}function z(){y||(y=!0,a.clear(),D(),l.emit("destroy"),l.clear())}function $(ne,G,fe){!w.active||y||(v.scrollBody.useBaseFriction().useDuration(G===!0?0:w.duration),v.scrollTo.index(ne,fe||0))}function Y(ne){const G=v.index.add(1).get();$(G,ne,-1)}function F(ne){const G=v.index.add(-1).get();$(G,ne,1)}function U(){return v.index.add(1).get()!==K()}function _(){return v.index.add(-1).get()!==K()}function j(){return v.scrollSnapList}function L(){return v.scrollProgress.get(v.offsetLocation.get())}function K(){return v.index.get()}function I(){return v.indexPrevious.get()}function H(){return v.slidesInView.get()}function X(){return v.slidesInView.get(!1)}function V(){return C}function ee(){return v}function B(){return t}function J(){return k}function te(){return N}const re={canScrollNext:U,canScrollPrev:_,containerNode:J,internalEngine:ee,destroy:z,off:h,on:f,emit:g,plugins:V,previousScrollSnap:I,reInit:b,rootNode:B,scrollNext:Y,scrollPrev:F,scrollProgress:L,scrollSnapList:j,scrollTo:$,selectedScrollSnap:K,slideNodes:te,slidesInView:H,slidesNotInView:X};return O(e,n),setTimeout(()=>l.emit("init"),0),re}Fa.globalOptions=void 0;function _f(t={},e=[]){const n=R.useRef(t),r=R.useRef(e),[o,s]=R.useState(),[i,a]=R.useState(),l=R.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return R.useEffect(()=>{Df(n.current,t)||(n.current=t,l())},[t,l]),R.useEffect(()=>{j_(r.current,e)||(r.current=e,l())},[e,l]),R.useEffect(()=>{if(P_()&&i){Fa.globalOptions=_f.globalOptions;const c=Fa(i,n.current,r.current);return s(c),()=>c.destroy()}else s(void 0)},[i,s]),[a,o]}_f.globalOptions=void 0;const zx=m.createContext(null);function sc(){const t=m.useContext(zx);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}const Hx=m.forwardRef(({orientation:t="horizontal",opts:e,setApi:n,plugins:r,className:o,children:s,...i},a)=>{const[l,c]=_f({...e,axis:t==="horizontal"?"x":"y"},r),[u,d]=m.useState(!1),[f,h]=m.useState(!1),g=m.useCallback(x=>{x&&(d(x.canScrollPrev()),h(x.canScrollNext()))},[]),b=m.useCallback(()=>{c==null||c.scrollPrev()},[c]),y=m.useCallback(()=>{c==null||c.scrollNext()},[c]),v=m.useCallback(x=>{x.key==="ArrowLeft"?(x.preventDefault(),b()):x.key==="ArrowRight"&&(x.preventDefault(),y())},[b,y]);return m.useEffect(()=>{!c||!n||n(c)},[c,n]),m.useEffect(()=>{if(c)return g(c),c.on("reInit",g),c.on("select",g),()=>{c==null||c.off("select",g)}},[c,g]),p.jsx(zx.Provider,{value:{carouselRef:l,api:c,opts:e,orientation:t||((e==null?void 0:e.axis)==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:y,canScrollPrev:u,canScrollNext:f},children:p.jsx("div",{ref:a,onKeyDownCapture:v,className:M("relative",o),role:"region","aria-roledescription":"carousel",...i,children:s})})});Hx.displayName="Carousel";const Vx=m.forwardRef(({className:t,...e},n)=>{const{carouselRef:r,orientation:o}=sc();return p.jsx("div",{ref:r,className:"overflow-hidden",children:p.jsx("div",{ref:n,className:M("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...e})})});Vx.displayName="CarouselContent";const Wx=m.forwardRef(({className:t,...e},n)=>{const{orientation:r}=sc();return p.jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:M("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",t),...e})});Wx.displayName="CarouselItem";const Ux=m.forwardRef(({className:t,variant:e="outline",size:n="icon",...r},o)=>{const{orientation:s,scrollPrev:i,canScrollPrev:a}=sc();return p.jsxs(Cn,{ref:o,variant:e,size:n,className:M("absolute h-8 w-8 rounded-full",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!a,onClick:i,...r,children:[p.jsx(OO,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Previous slide"})]})});Ux.displayName="CarouselPrevious";const Gx=m.forwardRef(({className:t,variant:e="outline",size:n="icon",...r},o)=>{const{orientation:s,scrollNext:i,canScrollNext:a}=sc();return p.jsxs(Cn,{ref:o,variant:e,size:n,className:M("absolute h-8 w-8 rounded-full",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!a,onClick:i,...r,children:[p.jsx(DO,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Next slide"})]})});Gx.displayName="CarouselNext";function cs(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function Di(t){const[e,n]=m.useState(void 0);return De(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=t.offsetWidth,a=t.offsetHeight;n({width:i,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var ic="Checkbox",[pL]=Ie(ic),[hL,Lf]=pL(ic);function mL(t){const{__scopeCheckbox:e,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=t,[f,h]=Oe({prop:n,defaultProp:o??!1,onChange:l,caller:ic}),[g,b]=m.useState(null),[y,v]=m.useState(null),x=m.useRef(!1),w=g?!!i||!!g.closest("form"):!0,S={checked:f,disabled:s,setChecked:h,control:g,setControl:b,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:pr(o)?!1:o,isFormControl:w,bubbleInput:y,setBubbleInput:v};return p.jsx(hL,{scope:e,...S,children:gL(d)?d(S):r})}var Kx="CheckboxTrigger",Yx=m.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:g}=Lf(Kx,t),b=oe(o,u),y=m.useRef(l);return m.useEffect(()=>{const v=s==null?void 0:s.form;if(v){const x=()=>d(y.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[s,d]),p.jsx(Z.button,{type:"button",role:"checkbox","aria-checked":pr(l)?"mixed":l,"aria-required":c,"data-state":Qx(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:b,onKeyDown:P(e,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:P(n,v=>{d(x=>pr(x)?!0:!x),g&&h&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});Yx.displayName=Kx;var Ff=m.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:c,form:u,...d}=t;return p.jsx(mL,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>p.jsxs(p.Fragment,{children:[p.jsx(Yx,{...d,ref:e,__scopeCheckbox:n}),f&&p.jsx(Zx,{__scopeCheckbox:n})]})})});Ff.displayName=ic;var qx="CheckboxIndicator",Xx=m.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...o}=t,s=Lf(qx,n);return p.jsx(Pe,{present:r||pr(s.checked)||s.checked===!0,children:p.jsx(Z.span,{"data-state":Qx(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:e,style:{pointerEvents:"none",...t.style}})})});Xx.displayName=qx;var Jx="CheckboxBubbleInput",Zx=m.forwardRef(({__scopeCheckbox:t,...e},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:h}=Lf(Jx,t),g=oe(n,h),b=cs(s),y=Di(r);m.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,k=!o.current;if(b!==s&&C){const N=new Event("click",{bubbles:k});x.indeterminate=pr(s),C.call(x,pr(s)?!1:s),x.dispatchEvent(N)}},[f,b,s,o]);const v=m.useRef(pr(s)?!1:s);return p.jsx(Z.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:a,disabled:l,name:c,value:u,form:d,...e,tabIndex:-1,ref:g,style:{...e.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Zx.displayName=Jx;function gL(t){return typeof t=="function"}function pr(t){return t==="indeterminate"}function Qx(t){return pr(t)?"indeterminate":t?"checked":"unchecked"}const ew=m.forwardRef(({className:t,...e},n)=>p.jsx(Ff,{ref:n,className:M("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:p.jsx(Xx,{className:M("flex items-center justify-center text-current"),children:p.jsx(kt,{className:"h-4 w-4"})})}));ew.displayName=Ff.displayName;var tw={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
373
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
374
|
+
*
|
|
375
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
376
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
377
|
+
* @namespace
|
|
378
|
+
* @public
|
|
379
|
+
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,i={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function x(w){return w instanceof l?new l(w.type,x(w.content),w.alias):Array.isArray(w)?w.map(x):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(x){return Object.prototype.toString.call(x).slice(8,-1)},objId:function(x){return x.__id||Object.defineProperty(x,"__id",{value:++s}),x.__id},clone:function x(w,S){S=S||{};var C,k;switch(a.util.type(w)){case"Object":if(k=a.util.objId(w),S[k])return S[k];C={},S[k]=C;for(var N in w)w.hasOwnProperty(N)&&(C[N]=x(w[N],S));return C;case"Array":return k=a.util.objId(w),S[k]?S[k]:(C=[],S[k]=C,w.forEach(function(E,T){C[T]=x(E,S)}),C);default:return w}},getLanguage:function(x){for(;x;){var w=o.exec(x.className);if(w)return w[1].toLowerCase();x=x.parentElement}return"none"},setLanguage:function(x,w){x.className=x.className.replace(RegExp(o,"gi"),""),x.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(C){var x=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(C.stack)||[])[1];if(x){var w=document.getElementsByTagName("script");for(var S in w)if(w[S].src==x)return w[S]}return null}},isActive:function(x,w,S){for(var C="no-"+w;x;){var k=x.classList;if(k.contains(w))return!0;if(k.contains(C))return!1;x=x.parentElement}return!!S}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(x,w){var S=a.util.clone(a.languages[x]);for(var C in w)S[C]=w[C];return S},insertBefore:function(x,w,S,C){C=C||a.languages;var k=C[x],N={};for(var E in k)if(k.hasOwnProperty(E)){if(E==w)for(var T in S)S.hasOwnProperty(T)&&(N[T]=S[T]);S.hasOwnProperty(E)||(N[E]=k[E])}var O=C[x];return C[x]=N,a.languages.DFS(a.languages,function(A,D){D===O&&A!=x&&(this[A]=N)}),N},DFS:function x(w,S,C,k){k=k||{};var N=a.util.objId;for(var E in w)if(w.hasOwnProperty(E)){S.call(w,E,w[E],C||E);var T=w[E],O=a.util.type(T);O==="Object"&&!k[N(T)]?(k[N(T)]=!0,x(T,S,null,k)):O==="Array"&&!k[N(T)]&&(k[N(T)]=!0,x(T,S,E,k))}}},plugins:{},highlightAll:function(x,w){a.highlightAllUnder(document,x,w)},highlightAllUnder:function(x,w,S){var C={callback:S,container:x,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",C),C.elements=Array.prototype.slice.apply(C.container.querySelectorAll(C.selector)),a.hooks.run("before-all-elements-highlight",C);for(var k=0,N;N=C.elements[k++];)a.highlightElement(N,w===!0,C.callback)},highlightElement:function(x,w,S){var C=a.util.getLanguage(x),k=a.languages[C];a.util.setLanguage(x,C);var N=x.parentElement;N&&N.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(N,C);var E=x.textContent,T={element:x,language:C,grammar:k,code:E};function O(D){T.highlightedCode=D,a.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,a.hooks.run("after-highlight",T),a.hooks.run("complete",T),S&&S.call(T.element)}if(a.hooks.run("before-sanity-check",T),N=T.element.parentElement,N&&N.nodeName.toLowerCase()==="pre"&&!N.hasAttribute("tabindex")&&N.setAttribute("tabindex","0"),!T.code){a.hooks.run("complete",T),S&&S.call(T.element);return}if(a.hooks.run("before-highlight",T),!T.grammar){O(a.util.encode(T.code));return}if(w&&r.Worker){var A=new Worker(a.filename);A.onmessage=function(D){O(D.data)},A.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else O(a.highlight(T.code,T.grammar,T.language))},highlight:function(x,w,S){var C={code:x,grammar:w,language:S};if(a.hooks.run("before-tokenize",C),!C.grammar)throw new Error('The language "'+C.language+'" has no grammar.');return C.tokens=a.tokenize(C.code,C.grammar),a.hooks.run("after-tokenize",C),l.stringify(a.util.encode(C.tokens),C.language)},tokenize:function(x,w){var S=w.rest;if(S){for(var C in S)w[C]=S[C];delete w.rest}var k=new d;return f(k,k.head,x),u(x,k,w,k.head,0),g(k)},hooks:{all:{},add:function(x,w){var S=a.hooks.all;S[x]=S[x]||[],S[x].push(w)},run:function(x,w){var S=a.hooks.all[x];if(!(!S||!S.length))for(var C=0,k;k=S[C++];)k(w)}},Token:l};r.Prism=a;function l(x,w,S,C){this.type=x,this.content=w,this.alias=S,this.length=(C||"").length|0}l.stringify=function x(w,S){if(typeof w=="string")return w;if(Array.isArray(w)){var C="";return w.forEach(function(O){C+=x(O,S)}),C}var k={type:w.type,content:x(w.content,S),tag:"span",classes:["token",w.type],attributes:{},language:S},N=w.alias;N&&(Array.isArray(N)?Array.prototype.push.apply(k.classes,N):k.classes.push(N)),a.hooks.run("wrap",k);var E="";for(var T in k.attributes)E+=" "+T+'="'+(k.attributes[T]||"").replace(/"/g,""")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+E+">"+k.content+"</"+k.tag+">"};function c(x,w,S,C){x.lastIndex=w;var k=x.exec(S);if(k&&C&&k[1]){var N=k[1].length;k.index+=N,k[0]=k[0].slice(N)}return k}function u(x,w,S,C,k,N){for(var E in S)if(!(!S.hasOwnProperty(E)||!S[E])){var T=S[E];T=Array.isArray(T)?T:[T];for(var O=0;O<T.length;++O){if(N&&N.cause==E+","+O)return;var A=T[O],D=A.inside,z=!!A.lookbehind,$=!!A.greedy,Y=A.alias;if($&&!A.pattern.global){var F=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,F+"g")}for(var U=A.pattern||A,_=C.next,j=k;_!==w.tail&&!(N&&j>=N.reach);j+=_.value.length,_=_.next){var L=_.value;if(w.length>x.length)return;if(!(L instanceof l)){var K=1,I;if($){if(I=c(U,j,x,z),!I||I.index>=x.length)break;var ee=I.index,H=I.index+I[0].length,X=j;for(X+=_.value.length;ee>=X;)_=_.next,X+=_.value.length;if(X-=_.value.length,j=X,_.value instanceof l)continue;for(var V=_;V!==w.tail&&(X<H||typeof V.value=="string");V=V.next)K++,X+=V.value.length;K--,L=x.slice(j,X),I.index-=j}else if(I=c(U,0,L,z),!I)continue;var ee=I.index,B=I[0],J=L.slice(0,ee),te=L.slice(ee+B.length),re=j+L.length;N&&re>N.reach&&(N.reach=re);var ne=_.prev;J&&(ne=f(w,ne,J),j+=J.length),h(w,ne,K);var G=new l(E,D?a.tokenize(B,D):B,Y,B);if(_=f(w,ne,G),te&&f(w,_,te),K>1){var fe={cause:E+","+O,reach:re};u(x,w,S,_.prev,j,fe),N&&fe.reach>N.reach&&(N.reach=fe.reach)}}}}}}function d(){var x={value:null,prev:null,next:null},w={value:null,prev:x,next:null};x.next=w,this.head=x,this.tail=w,this.length=0}function f(x,w,S){var C=w.next,k={value:S,prev:w,next:C};return w.next=k,C.prev=k,x.length++,k}function h(x,w,S){for(var C=w.next,k=0;k<S&&C!==x.tail;k++)C=C.next;w.next=C,C.prev=w,x.length-=k}function g(x){for(var w=[],S=x.head.next;S!==x.tail;)w.push(S.value),S=S.next;return w}if(!r.document)return r.addEventListener&&(a.disableWorkerMessageHandler||r.addEventListener("message",function(x){var w=JSON.parse(x.data),S=w.language,C=w.code,k=w.immediateClose;r.postMessage(a.highlight(C,a.languages[S],S)),k&&r.close()},!1)),a;var b=a.util.currentScript();b&&(a.filename=b.src,b.hasAttribute("data-manual")&&(a.manual=!0));function y(){a.manual||a.highlightAll()}if(!a.manual){var v=document.readyState;v==="loading"||v==="interactive"&&b&&b.defer?document.addEventListener("DOMContentLoaded",y):window.requestAnimationFrame?window.requestAnimationFrame(y):window.setTimeout(y,16)}return a}(e);t.exports&&(t.exports=n),typeof bm<"u"&&(bm.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(o,s){var i={};i["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[s]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};a["language-"+s]={pattern:/[\s\S]+/,inside:n.languages[s]};var l={};l[o]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return o}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var s=r.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(b,y){return"✖ Error "+b+" while fetching file: "+y},s="✖ Error: File does not exist or is empty",i={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",c="loaded",u="failed",d="pre[data-src]:not(["+a+'="'+c+'"]):not(['+a+'="'+l+'"])';function f(b,y,v){var x=new XMLHttpRequest;x.open("GET",b,!0),x.onreadystatechange=function(){x.readyState==4&&(x.status<400&&x.responseText?y(x.responseText):x.status>=400?v(o(x.status,x.statusText)):v(s))},x.send(null)}function h(b){var y=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(b||"");if(y){var v=Number(y[1]),x=y[2],w=y[3];return x?w?[v,Number(w)]:[v,void 0]:[v,v]}}n.hooks.add("before-highlightall",function(b){b.selector+=", "+d}),n.hooks.add("before-sanity-check",function(b){var y=b.element;if(y.matches(d)){b.code="",y.setAttribute(a,l);var v=y.appendChild(document.createElement("CODE"));v.textContent=r;var x=y.getAttribute("data-src"),w=b.language;if(w==="none"){var S=(/\.(\w+)$/.exec(x)||[,"none"])[1];w=i[S]||S}n.util.setLanguage(v,w),n.util.setLanguage(y,w);var C=n.plugins.autoloader;C&&C.loadLanguages(w),f(x,function(k){y.setAttribute(a,c);var N=h(y.getAttribute("data-range"));if(N){var E=k.split(/\r\n?|\n/g),T=N[0],O=N[1]==null?E.length:N[1];T<0&&(T+=E.length),T=Math.max(0,Math.min(T-1,E.length)),O<0&&(O+=E.length),O=Math.max(0,Math.min(O,E.length)),k=E.slice(T,O).join(`
|
|
380
|
+
`),y.hasAttribute("data-start")||y.setAttribute("data-start",String(T+1))}v.textContent=k,n.highlightElement(v)},function(k){y.setAttribute(a,u),v.textContent=k})}}),n.plugins.fileHighlight={highlight:function(y){for(var v=(y||document).querySelectorAll(d),x=0,w;w=v[x++];)n.highlightElement(w)}};var g=!1;n.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(tw);var bL=tw.exports;const Fm=OP(bL);Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism);(function(t){var e=t.util.clone(t.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function s(l,c){return l=l.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return o}),RegExp(l,c)}o=s(o).source,t.languages.jsx=t.languages.extend("markup",e),t.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=e.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:s(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var i=function(l){return l?typeof l=="string"?l:typeof l.content=="string"?l.content:l.content.map(i).join(""):""},a=function(l){for(var c=[],u=0;u<l.length;u++){var d=l[u],f=!1;if(typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?c.length>0&&c[c.length-1].tagName===i(d.content[0].content[1])&&c.pop():d.content[d.content.length-1].content==="/>"||c.push({tagName:i(d.content[0].content[1]),openedBraces:0}):c.length>0&&d.type==="punctuation"&&d.content==="{"?c[c.length-1].openedBraces++:c.length>0&&c[c.length-1].openedBraces>0&&d.type==="punctuation"&&d.content==="}"?c[c.length-1].openedBraces--:f=!0),(f||typeof d=="string")&&c.length>0&&c[c.length-1].openedBraces===0){var h=i(d);u<l.length-1&&(typeof l[u+1]=="string"||l[u+1].type==="plain-text")&&(h+=i(l[u+1]),l.splice(u+1,1)),u>0&&(typeof l[u-1]=="string"||l[u-1].type==="plain-text")&&(h=i(l[u-1])+h,l.splice(u-1,1),u--),l[u]=new t.Token("plain-text",h,null,h)}d.content&&typeof d.content!="string"&&a(d.content)}};t.hooks.add("after-tokenize",function(l){l.language!=="jsx"&&l.language!=="tsx"||a(l.tokens)})})(Prism);(function(t){var e=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",e),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var n=t.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(Prism);(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(t){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=t.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=r.variable[1].inside,i=0;i<o.length;i++)s[o[i]]=t.languages.bash[o[i]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+s+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+s+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(d){u!==d&&(t.languages.markdown[u].inside.content.inside[d]=t.languages.markdown[d])})}),t.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var h=0,g=f.length;h<g;h++){var b=f[h];if(b.type!=="code"){d(b.content);continue}var y=b.content[1],v=b.content[3];if(y&&v&&y.type==="code-language"&&v.type==="code-block"&&typeof y.content=="string"){var x=y.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");x=(/[a-z][\w-]*/i.exec(x)||[""])[0].toLowerCase();var w="language-"+x;v.alias?typeof v.alias=="string"?v.alias=[v.alias,w]:v.alias.push(w):v.alias=[w]}}}d(u.tokens)}),t.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var d="",f=0,h=u.classes.length;f<h;f++){var g=u.classes[f],b=/language-(.+)/.exec(g);if(b){d=b[1];break}}var y=t.languages[d];if(y)u.content=t.highlight(c(u.content),y,d);else if(d&&d!=="none"&&t.plugins.autoloader){var v="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);u.attributes.id=v,t.plugins.autoloader.loadLanguages(d,function(){var x=document.getElementById(v);x&&(x.innerHTML=t.highlight(x.textContent,t.languages[d],d))})}}});var i=RegExp(t.languages.markup.tag.pattern.source,"gi"),a={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function c(u){var d=u.replace(i,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,h){if(h=h.toLowerCase(),h[0]==="#"){var g;return h[1]==="x"?g=parseInt(h.slice(2),16):g=Number(h.slice(1)),l(g)}else{var b=a[h];return b||f}}),d}t.languages.md=t.languages.markdown})(Prism);(function(t){var e=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+e.source+")?|"+e.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(a,l){l=(l||"").replace(/m/g,"")+"m";var c=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return a});return RegExp(c,l)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(s),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(Prism);const nw=m.forwardRef(({className:t,code:e,language:n="text",showLineNumbers:r=!1,showCopyButton:o=!0,filename:s,highlightLines:i=[],...a},l)=>{const[c,u]=m.useState(!1),[d,f]=m.useState("");m.useEffect(()=>{if(n!=="text"){const b=Fm.languages[n];f(b?Fm.highlight(e,b,n):e)}else f(e)},[e,n]);const h=async()=>{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)},g=d.split(`
|
|
381
|
+
`);return p.jsxs("div",{ref:l,className:M("relative rounded-lg border bg-muted/50 text-sm",t),...a,children:[(s||o)&&p.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[s&&p.jsx("span",{className:"text-xs text-muted-foreground",children:s}),o&&p.jsx("button",{type:"button",onClick:h,className:"ml-auto flex items-center gap-1 rounded px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:c?p.jsxs(p.Fragment,{children:[p.jsx(kt,{className:"h-3 w-3"}),"Copied"]}):p.jsxs(p.Fragment,{children:[p.jsx(LO,{className:"h-3 w-3"}),"Copy"]})})]}),p.jsx("div",{className:"overflow-x-auto p-4",children:p.jsx("pre",{className:"font-mono text-sm",children:p.jsx("code",{children:g.map((b,y)=>p.jsxs("div",{className:M("leading-6",i.includes(y+1)&&"bg-yellow-500/20 -mx-4 px-4"),children:[r&&p.jsx("span",{className:"mr-4 inline-block w-8 select-none text-right text-muted-foreground",children:y+1}),p.jsx("span",{dangerouslySetInnerHTML:{__html:b||" "}})]},y))})})})]})});nw.displayName="CodeBlock";const yL=uf,vL=sf,xL=lf;var $m=1,wL=.9,SL=.8,CL=.17,cu=.1,uu=.999,kL=.9999,NL=.99,EL=/[\\\/_+.#"@\[\(\{&]/,ML=/[\\\/_+.#"@\[\(\{&]/g,TL=/[\s-]/,rw=/[\s-]/g;function ed(t,e,n,r,o,s,i){if(s===e.length)return o===t.length?$m:NL;var a=`${o},${s}`;if(i[a]!==void 0)return i[a];for(var l=r.charAt(s),c=n.indexOf(l,o),u=0,d,f,h,g;c>=0;)d=ed(t,e,n,r,c+1,s+1,i),d>u&&(c===o?d*=$m:EL.test(t.charAt(c-1))?(d*=SL,h=t.slice(o,c-1).match(ML),h&&o>0&&(d*=Math.pow(uu,h.length))):TL.test(t.charAt(c-1))?(d*=wL,g=t.slice(o,c-1).match(rw),g&&o>0&&(d*=Math.pow(uu,g.length))):(d*=CL,o>0&&(d*=Math.pow(uu,c-o))),t.charAt(c)!==e.charAt(s)&&(d*=kL)),(d<cu&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(f=ed(t,e,n,r,c+1,s+2,i),f*cu>d&&(d=f*cu)),d>u&&(u=d),c=n.indexOf(l,c+1);return i[a]=u,u}function Bm(t){return t.toLowerCase().replace(rw," ")}function RL(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,ed(t,e,Bm(t),Bm(e),0,0,{})}var ks='[cmdk-group=""]',du='[cmdk-group-items=""]',AL='[cmdk-group-heading=""]',ow='[cmdk-item=""]',zm=`${ow}:not([aria-disabled="true"])`,td="cmdk-item-select",Ao="data-value",OL=(t,e,n)=>RL(t,e,n),sw=m.createContext(void 0),Ii=()=>m.useContext(sw),iw=m.createContext(void 0),$f=()=>m.useContext(iw),aw=m.createContext(void 0),lw=m.forwardRef((t,e)=>{let n=Oo(()=>{var I,H;return{search:"",value:(H=(I=t.value)!=null?I:t.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Oo(()=>new Set),o=Oo(()=>new Map),s=Oo(()=>new Map),i=Oo(()=>new Set),a=cw(t),{label:l,children:c,value:u,onValueChange:d,filter:f,shouldFilter:h,loop:g,disablePointerSelection:b=!1,vimBindings:y=!0,...v}=t,x=Ee(),w=Ee(),S=Ee(),C=m.useRef(null),k=HL();eo(()=>{if(u!==void 0){let I=u.trim();n.current.value=I,N.emit()}},[u]),eo(()=>{k(6,z)},[]);let N=m.useMemo(()=>({subscribe:I=>(i.current.add(I),()=>i.current.delete(I)),snapshot:()=>n.current,setState:(I,H,X)=>{var V,ee,B,J;if(!Object.is(n.current[I],H)){if(n.current[I]=H,I==="search")D(),O(),k(1,A);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(S);te?te.focus():(V=document.getElementById(x))==null||V.focus()}if(k(7,()=>{var te;n.current.selectedItemId=(te=$())==null?void 0:te.id,N.emit()}),X||k(5,z),((ee=a.current)==null?void 0:ee.value)!==void 0){let te=H??"";(J=(B=a.current).onValueChange)==null||J.call(B,te);return}}N.emit()}},emit:()=>{i.current.forEach(I=>I())}}),[]),E=m.useMemo(()=>({value:(I,H,X)=>{var V;H!==((V=s.current.get(I))==null?void 0:V.value)&&(s.current.set(I,{value:H,keywords:X}),n.current.filtered.items.set(I,T(H,X)),k(2,()=>{O(),N.emit()}))},item:(I,H)=>(r.current.add(I),H&&(o.current.has(H)?o.current.get(H).add(I):o.current.set(H,new Set([I]))),k(3,()=>{D(),O(),n.current.value||A(),N.emit()}),()=>{s.current.delete(I),r.current.delete(I),n.current.filtered.items.delete(I);let X=$();k(4,()=>{D(),(X==null?void 0:X.getAttribute("id"))===I&&A(),N.emit()})}),group:I=>(o.current.has(I)||o.current.set(I,new Set),()=>{s.current.delete(I),o.current.delete(I)}),filter:()=>a.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:x,inputId:S,labelId:w,listInnerRef:C}),[]);function T(I,H){var X,V;let ee=(V=(X=a.current)==null?void 0:X.filter)!=null?V:OL;return I?ee(I,n.current.search,H):0}function O(){if(!n.current.search||a.current.shouldFilter===!1)return;let I=n.current.filtered.items,H=[];n.current.filtered.groups.forEach(V=>{let ee=o.current.get(V),B=0;ee.forEach(J=>{let te=I.get(J);B=Math.max(te,B)}),H.push([V,B])});let X=C.current;Y().sort((V,ee)=>{var B,J;let te=V.getAttribute("id"),re=ee.getAttribute("id");return((B=I.get(re))!=null?B:0)-((J=I.get(te))!=null?J:0)}).forEach(V=>{let ee=V.closest(du);ee?ee.appendChild(V.parentElement===ee?V:V.closest(`${du} > *`)):X.appendChild(V.parentElement===X?V:V.closest(`${du} > *`))}),H.sort((V,ee)=>ee[1]-V[1]).forEach(V=>{var ee;let B=(ee=C.current)==null?void 0:ee.querySelector(`${ks}[${Ao}="${encodeURIComponent(V[0])}"]`);B==null||B.parentElement.appendChild(B)})}function A(){let I=Y().find(X=>X.getAttribute("aria-disabled")!=="true"),H=I==null?void 0:I.getAttribute(Ao);N.setState("value",H||void 0)}function D(){var I,H,X,V;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ee=0;for(let B of r.current){let J=(H=(I=s.current.get(B))==null?void 0:I.value)!=null?H:"",te=(V=(X=s.current.get(B))==null?void 0:X.keywords)!=null?V:[],re=T(J,te);n.current.filtered.items.set(B,re),re>0&&ee++}for(let[B,J]of o.current)for(let te of J)if(n.current.filtered.items.get(te)>0){n.current.filtered.groups.add(B);break}n.current.filtered.count=ee}function z(){var I,H,X;let V=$();V&&(((I=V.parentElement)==null?void 0:I.firstChild)===V&&((X=(H=V.closest(ks))==null?void 0:H.querySelector(AL))==null||X.scrollIntoView({block:"nearest"})),V.scrollIntoView({block:"nearest"}))}function $(){var I;return(I=C.current)==null?void 0:I.querySelector(`${ow}[aria-selected="true"]`)}function Y(){var I;return Array.from(((I=C.current)==null?void 0:I.querySelectorAll(zm))||[])}function F(I){let H=Y()[I];H&&N.setState("value",H.getAttribute(Ao))}function U(I){var H;let X=$(),V=Y(),ee=V.findIndex(J=>J===X),B=V[ee+I];(H=a.current)!=null&&H.loop&&(B=ee+I<0?V[V.length-1]:ee+I===V.length?V[0]:V[ee+I]),B&&N.setState("value",B.getAttribute(Ao))}function _(I){let H=$(),X=H==null?void 0:H.closest(ks),V;for(;X&&!V;)X=I>0?BL(X,ks):zL(X,ks),V=X==null?void 0:X.querySelector(zm);V?N.setState("value",V.getAttribute(Ao)):U(I)}let j=()=>F(Y().length-1),L=I=>{I.preventDefault(),I.metaKey?j():I.altKey?_(1):U(1)},K=I=>{I.preventDefault(),I.metaKey?F(0):I.altKey?_(-1):U(-1)};return m.createElement(vt.div,{ref:e,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:I=>{var H;(H=v.onKeyDown)==null||H.call(v,I);let X=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||X))switch(I.key){case"n":case"j":{y&&I.ctrlKey&&L(I);break}case"ArrowDown":{L(I);break}case"p":case"k":{y&&I.ctrlKey&&K(I);break}case"ArrowUp":{K(I);break}case"Home":{I.preventDefault(),F(0);break}case"End":{I.preventDefault(),j();break}case"Enter":{I.preventDefault();let V=$();if(V){let ee=new Event(td);V.dispatchEvent(ee)}}}}},m.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:WL},l),ac(t,I=>m.createElement(iw.Provider,{value:N},m.createElement(sw.Provider,{value:E},I))))}),DL=m.forwardRef((t,e)=>{var n,r;let o=Ee(),s=m.useRef(null),i=m.useContext(aw),a=Ii(),l=cw(t),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;eo(()=>{if(!c)return a.item(o,i==null?void 0:i.id)},[c]);let u=uw(o,s,[t.value,t.children,s],t.keywords),d=$f(),f=vr(k=>k.value&&k.value===u.current),h=vr(k=>c||a.filter()===!1?!0:k.search?k.filtered.items.get(o)>0:!0);m.useEffect(()=>{let k=s.current;if(!(!k||t.disabled))return k.addEventListener(td,g),()=>k.removeEventListener(td,g)},[h,t.onSelect,t.disabled]);function g(){var k,N;b(),(N=(k=l.current).onSelect)==null||N.call(k,u.current)}function b(){d.setState("value",u.current,!0)}if(!h)return null;let{disabled:y,value:v,onSelect:x,forceMount:w,keywords:S,...C}=t;return m.createElement(vt.div,{ref:rn(s,e),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!f,"data-disabled":!!y,"data-selected":!!f,onPointerMove:y||a.getDisablePointerSelection()?void 0:b,onClick:y?void 0:g},t.children)}),IL=m.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:o,...s}=t,i=Ee(),a=m.useRef(null),l=m.useRef(null),c=Ee(),u=Ii(),d=vr(h=>o||u.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);eo(()=>u.group(i),[]),uw(i,a,[t.value,t.heading,l]);let f=m.useMemo(()=>({id:i,forceMount:o}),[o]);return m.createElement(vt.div,{ref:rn(a,e),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&m.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),ac(t,h=>m.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},m.createElement(aw.Provider,{value:f},h))))}),PL=m.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,o=m.useRef(null),s=vr(i=>!i.search);return!n&&!s?null:m.createElement(vt.div,{ref:rn(o,e),...r,"cmdk-separator":"",role:"separator"})}),jL=m.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,o=t.value!=null,s=$f(),i=vr(c=>c.search),a=vr(c=>c.selectedItemId),l=Ii();return m.useEffect(()=>{t.value!=null&&s.setState("search",t.value)},[t.value]),m.createElement(vt.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:o?t.value:i,onChange:c=>{o||s.setState("search",c.target.value),n==null||n(c.target.value)}})}),_L=m.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...o}=t,s=m.useRef(null),i=m.useRef(null),a=vr(c=>c.selectedItemId),l=Ii();return m.useEffect(()=>{if(i.current&&s.current){let c=i.current,u=s.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=c.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return f.observe(c),()=>{cancelAnimationFrame(d),f.unobserve(c)}}},[]),m.createElement(vt.div,{ref:rn(s,e),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},ac(t,c=>m.createElement("div",{ref:rn(i,l.listInnerRef),"cmdk-list-sizer":""},c)))}),LL=m.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:i,...a}=t;return m.createElement(Ql,{open:n,onOpenChange:r},m.createElement(ec,{container:i},m.createElement(ss,{"cmdk-overlay":"",className:o}),m.createElement(is,{"aria-label":t.label,"cmdk-dialog":"",className:s},m.createElement(lw,{ref:e,...a}))))}),FL=m.forwardRef((t,e)=>vr(n=>n.filtered.count===0)?m.createElement(vt.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),$L=m.forwardRef((t,e)=>{let{progress:n,children:r,label:o="Loading...",...s}=t;return m.createElement(vt.div,{ref:e,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},ac(t,i=>m.createElement("div",{"aria-hidden":!0},i)))}),Mt=Object.assign(lw,{List:_L,Item:DL,Input:jL,Group:IL,Separator:PL,Dialog:LL,Empty:FL,Loading:$L});function BL(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function zL(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function cw(t){let e=m.useRef(t);return eo(()=>{e.current=t}),e}var eo=typeof window>"u"?m.useEffect:m.useLayoutEffect;function Oo(t){let e=m.useRef();return e.current===void 0&&(e.current=t()),e}function vr(t){let e=$f(),n=()=>t(e.snapshot());return m.useSyncExternalStore(e.subscribe,n,n)}function uw(t,e,n,r=[]){let o=m.useRef(),s=Ii();return eo(()=>{var i;let a=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():o.current}})(),l=r.map(c=>c.trim());s.value(t,a,l),(i=e.current)==null||i.setAttribute(Ao,a),o.current=a}),o}var HL=()=>{let[t,e]=m.useState(),n=Oo(()=>new Map);return eo(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,o)=>{n.current.set(r,o),e({})}};function VL(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function ac({asChild:t,children:e},n){return t&&m.isValidElement(e)?m.cloneElement(VL(e),{ref:e.ref},n(e.props.children)):n(e)}var WL={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const dw=Ql,UL=wf,fw=ec,GL=as,Bf=m.forwardRef(({className:t,...e},n)=>p.jsx(ss,{ref:n,className:M("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",t),...e}));Bf.displayName=ss.displayName;const zf=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(fw,{children:[p.jsx(Bf,{}),p.jsxs(is,{ref:r,className:M("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",t),...n,children:[e,p.jsxs(as,{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:[p.jsx(Nt,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));zf.displayName=is.displayName;const pw=({className:t,...e})=>p.jsx("div",{className:M("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});pw.displayName="DialogHeader";const hw=({className:t,...e})=>p.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});hw.displayName="DialogFooter";const mw=m.forwardRef(({className:t,...e},n)=>p.jsx(ki,{ref:n,className:M("font-heading text-lg font-semibold leading-none tracking-tight",t),...e}));mw.displayName=ki.displayName;const gw=m.forwardRef(({className:t,...e},n)=>p.jsx(Ni,{ref:n,className:M("text-sm text-muted-foreground",t),...e}));gw.displayName=Ni.displayName;const lc=m.forwardRef(({className:t,...e},n)=>p.jsx(Mt,{ref:n,className:M("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));lc.displayName=Mt.displayName;const KL=({children:t,...e})=>p.jsx(dw,{...e,children:p.jsx(zf,{className:"overflow-hidden p-0 shadow-lg",children:p.jsx(lc,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t})})}),Hf=m.forwardRef(({className:t,...e},n)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(xi,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.jsx(Mt.Input,{ref:n,className:M("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Hf.displayName=Mt.Input.displayName;const Vf=m.forwardRef(({className:t,...e},n)=>p.jsx(Mt.List,{ref:n,className:M("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));Vf.displayName=Mt.List.displayName;const Wf=m.forwardRef((t,e)=>p.jsx(Mt.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));Wf.displayName=Mt.Empty.displayName;const Uf=m.forwardRef(({className:t,...e},n)=>p.jsx(Mt.Group,{ref:n,className:M("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));Uf.displayName=Mt.Group.displayName;const bw=m.forwardRef(({className:t,...e},n)=>p.jsx(Mt.Separator,{ref:n,className:M("-mx-1 h-px bg-border",t),...e}));bw.displayName=Mt.Separator.displayName;const Gf=m.forwardRef(({className:t,...e},n)=>p.jsx(Mt.Item,{ref:n,className:M("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));Gf.displayName=Mt.Item.displayName;const yw=({className:t,...e})=>p.jsx("span",{className:M("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});yw.displayName="CommandShortcut";const YL=["top","right","bottom","left"],xr=Math.min,Ot=Math.max,$a=Math.round,ia=Math.floor,vn=t=>({x:t,y:t}),qL={left:"right",right:"left",bottom:"top",top:"bottom"},XL={start:"end",end:"start"};function nd(t,e,n){return Ot(t,xr(e,n))}function Vn(t,e){return typeof t=="function"?t(e):t}function Wn(t){return t.split("-")[0]}function us(t){return t.split("-")[1]}function Kf(t){return t==="x"?"y":"x"}function Yf(t){return t==="y"?"height":"width"}const JL=new Set(["top","bottom"]);function yn(t){return JL.has(Wn(t))?"y":"x"}function qf(t){return Kf(yn(t))}function ZL(t,e,n){n===void 0&&(n=!1);const r=us(t),o=qf(t),s=Yf(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=Ba(i)),[i,Ba(i)]}function QL(t){const e=Ba(t);return[rd(t),e,rd(e)]}function rd(t){return t.replace(/start|end/g,e=>XL[e])}const Hm=["left","right"],Vm=["right","left"],eF=["top","bottom"],tF=["bottom","top"];function nF(t,e,n){switch(t){case"top":case"bottom":return n?e?Vm:Hm:e?Hm:Vm;case"left":case"right":return e?eF:tF;default:return[]}}function rF(t,e,n,r){const o=us(t);let s=nF(Wn(t),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),e&&(s=s.concat(s.map(rd)))),s}function Ba(t){return t.replace(/left|right|bottom|top/g,e=>qL[e])}function oF(t){return{top:0,right:0,bottom:0,left:0,...t}}function vw(t){return typeof t!="number"?oF(t):{top:t,right:t,bottom:t,left:t}}function za(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function Wm(t,e,n){let{reference:r,floating:o}=t;const s=yn(e),i=qf(e),a=Yf(i),l=Wn(e),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(us(e)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}async function sF(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Vn(e,t),g=vw(h),y=a[f?d==="floating"?"reference":"floating":d],v=za(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=za(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:l}):x);return{top:(v.top-C.top+g.top)/S.y,bottom:(C.bottom-v.bottom+g.bottom)/S.y,left:(v.left-C.left+g.left)/S.x,right:(C.right-v.right+g.right)/S.x}}const iF=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(e));let c=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:d}=Wm(c,r,l),f=r,h={},g=0;for(let y=0;y<a.length;y++){var b;const{name:v,fn:x}=a[y],{x:w,y:S,data:C,reset:k}=await x({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:{...i,detectOverflow:(b=i.detectOverflow)!=null?b:sF},elements:{reference:t,floating:e}});u=w??u,d=S??d,h={...h,[v]:{...h[v],...C}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(c=k.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):k.rects),{x:u,y:d}=Wm(c,f,l)),y=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}},aF=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Vn(t,e)||{};if(c==null)return{};const d=vw(u),f={x:n,y:r},h=qf(o),g=Yf(h),b=await i.getDimensions(c),y=h==="y",v=y?"top":"left",x=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[h]-f[h]-s.floating[g],C=f[h]-s.reference[h],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let N=k?k[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(k)))&&(N=a.floating[w]||s.floating[g]);const E=S/2-C/2,T=N/2-b[g]/2-1,O=xr(d[v],T),A=xr(d[x],T),D=O,z=N-b[g]-A,$=N/2-b[g]/2+E,Y=nd(D,$,z),F=!l.arrow&&us(o)!=null&&$!==Y&&s.reference[g]/2-($<D?O:A)-b[g]/2<0,U=F?$<D?$-D:$-z:0;return{[h]:f[h]+U,data:{[h]:Y,centerOffset:$-Y-U,...F&&{alignmentOffset:U}},reset:F}}}),lF=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...y}=Vn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Wn(o),x=yn(a),w=Wn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=f||(w||!b?[Ba(a)]:QL(a)),k=g!=="none";!f&&k&&C.push(...rF(a,b,g,S));const N=[a,...C],E=await l.detectOverflow(e,y),T=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&T.push(E[v]),d){const $=ZL(o,i,S);T.push(E[$[0]],E[$[1]])}if(O=[...O,{placement:o,overflows:T}],!T.every($=>$<=0)){var A,D;const $=(((A=s.flip)==null?void 0:A.index)||0)+1,Y=N[$];if(Y&&(!(d==="alignment"?x!==yn(Y):!1)||O.every(_=>yn(_.placement)===x?_.overflows[0]>0:!0)))return{data:{index:$,overflows:O},reset:{placement:Y}};let F=(D=O.filter(U=>U.overflows[0]<=0).sort((U,_)=>U.overflows[1]-_.overflows[1])[0])==null?void 0:D.placement;if(!F)switch(h){case"bestFit":{var z;const U=(z=O.filter(_=>{if(k){const j=yn(_.placement);return j===x||j==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(j=>j>0).reduce((j,L)=>j+L,0)]).sort((_,j)=>_[1]-j[1])[0])==null?void 0:z[0];U&&(F=U);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Um(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Gm(t){return YL.some(e=>t[e]>=0)}const cF=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:o="referenceHidden",...s}=Vn(t,e);switch(o){case"referenceHidden":{const i=await r.detectOverflow(e,{...s,elementContext:"reference"}),a=Um(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Gm(a)}}}case"escaped":{const i=await r.detectOverflow(e,{...s,altBoundary:!0}),a=Um(i,n.floating);return{data:{escapedOffsets:a,escaped:Gm(a)}}}default:return{}}}}},xw=new Set(["left","top"]);async function uF(t,e){const{placement:n,platform:r,elements:o}=t,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Wn(n),a=us(n),l=yn(n)==="y",c=xw.has(i)?-1:1,u=s&&l?-1:1,d=Vn(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const dF=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=e,l=await uF(e,t);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},fF=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o,platform:s}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x,y:w}=v;return{x,y:w}}},...c}=Vn(t,e),u={x:n,y:r},d=await s.detectOverflow(e,c),f=yn(Wn(o)),h=Kf(f);let g=u[h],b=u[f];if(i){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=g+d[v],S=g-d[x];g=nd(w,g,S)}if(a){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=b+d[v],S=b-d[x];b=nd(w,b,S)}const y=l.fn({...e,[h]:g,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:i,[f]:a}}}}}},pF=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Vn(t,e),u={x:n,y:r},d=yn(o),f=Kf(d);let h=u[f],g=u[d];const b=Vn(a,e),y=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const w=f==="y"?"height":"width",S=s.reference[f]-s.floating[w]+y.mainAxis,C=s.reference[f]+s.reference[w]-y.mainAxis;h<S?h=S:h>C&&(h=C)}if(c){var v,x;const w=f==="y"?"width":"height",S=xw.has(Wn(o)),C=s.reference[d]-s.floating[w]+(S&&((v=i.offset)==null?void 0:v[d])||0)+(S?0:y.crossAxis),k=s.reference[d]+s.reference[w]+(S?0:((x=i.offset)==null?void 0:x[d])||0)-(S?y.crossAxis:0);g<C?g=C:g>k&&(g=k)}return{[f]:h,[d]:g}}}},hF=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:s,platform:i,elements:a}=e,{apply:l=()=>{},...c}=Vn(t,e),u=await i.detectOverflow(e,c),d=Wn(o),f=us(o),h=yn(o)==="y",{width:g,height:b}=s.floating;let y,v;d==="top"||d==="bottom"?(y=d,v=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,y=f==="end"?"top":"bottom");const x=b-u.top-u.bottom,w=g-u.left-u.right,S=xr(b-u[y],x),C=xr(g-u[v],w),k=!e.middlewareData.shift;let N=S,E=C;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(N=x),k&&!f){const O=Ot(u.left,0),A=Ot(u.right,0),D=Ot(u.top,0),z=Ot(u.bottom,0);h?E=g-2*(O!==0||A!==0?O+A:Ot(u.left,u.right)):N=b-2*(D!==0||z!==0?D+z:Ot(u.top,u.bottom))}await l({...e,availableWidth:E,availableHeight:N});const T=await i.getDimensions(a.floating);return g!==T.width||b!==T.height?{reset:{rects:!0}}:{}}}};function cc(){return typeof window<"u"}function ds(t){return ww(t)?(t.nodeName||"").toLowerCase():"#document"}function It(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Nn(t){var e;return(e=(ww(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ww(t){return cc()?t instanceof Node||t instanceof It(t).Node:!1}function on(t){return cc()?t instanceof Element||t instanceof It(t).Element:!1}function xn(t){return cc()?t instanceof HTMLElement||t instanceof It(t).HTMLElement:!1}function Km(t){return!cc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof It(t).ShadowRoot}const mF=new Set(["inline","contents"]);function Pi(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=sn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!mF.has(o)}const gF=new Set(["table","td","th"]);function bF(t){return gF.has(ds(t))}const yF=[":popover-open",":modal"];function uc(t){return yF.some(e=>{try{return t.matches(e)}catch{return!1}})}const vF=["transform","translate","scale","rotate","perspective"],xF=["transform","translate","scale","rotate","perspective","filter"],wF=["paint","layout","strict","content"];function Xf(t){const e=Jf(),n=on(t)?sn(t):t;return vF.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||xF.some(r=>(n.willChange||"").includes(r))||wF.some(r=>(n.contain||"").includes(r))}function SF(t){let e=wr(t);for(;xn(e)&&!Uo(e);){if(Xf(e))return e;if(uc(e))return null;e=wr(e)}return null}function Jf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const CF=new Set(["html","body","#document"]);function Uo(t){return CF.has(ds(t))}function sn(t){return It(t).getComputedStyle(t)}function dc(t){return on(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function wr(t){if(ds(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Km(t)&&t.host||Nn(t);return Km(e)?e.host:e}function Sw(t){const e=wr(t);return Uo(e)?t.ownerDocument?t.ownerDocument.body:t.body:xn(e)&&Pi(e)?e:Sw(e)}function ri(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Sw(t),s=o===((r=t.ownerDocument)==null?void 0:r.body),i=It(o);if(s){const a=od(i);return e.concat(i,i.visualViewport||[],Pi(o)?o:[],a&&n?ri(a):[])}return e.concat(o,ri(o,[],n))}function od(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Cw(t){const e=sn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=xn(t),s=o?t.offsetWidth:n,i=o?t.offsetHeight:r,a=$a(n)!==s||$a(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Zf(t){return on(t)?t:t.contextElement}function zo(t){const e=Zf(t);if(!xn(e))return vn(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:s}=Cw(e);let i=(s?$a(n.width):n.width)/r,a=(s?$a(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const kF=vn(0);function kw(t){const e=It(t);return!Jf()||!e.visualViewport?kF:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function NF(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==It(t)?!1:e}function to(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),s=Zf(t);let i=vn(1);e&&(r?on(r)&&(i=zo(r)):i=zo(t));const a=NF(s,n,r)?kw(s):vn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=It(s),h=r&&on(r)?It(r):r;let g=f,b=od(g);for(;b&&r&&h!==g;){const y=zo(b),v=b.getBoundingClientRect(),x=sn(b),w=v.left+(b.clientLeft+parseFloat(x.paddingLeft))*y.x,S=v.top+(b.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=w,c+=S,g=It(b),b=od(g)}}return za({width:u,height:d,x:l,y:c})}function fc(t,e){const n=dc(t).scrollLeft;return e?e.left+n:to(Nn(t)).left+n}function Nw(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-fc(t,n),o=n.top+e.scrollTop;return{x:r,y:o}}function EF(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const s=o==="fixed",i=Nn(r),a=e?uc(e.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=vn(1);const u=vn(0),d=xn(r);if((d||!d&&!s)&&((ds(r)!=="body"||Pi(i))&&(l=dc(r)),xn(r))){const h=to(r);c=zo(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=i&&!d&&!s?Nw(i,l):vn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function MF(t){return Array.from(t.getClientRects())}function TF(t){const e=Nn(t),n=dc(t),r=t.ownerDocument.body,o=Ot(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Ot(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+fc(t);const a=-n.scrollTop;return sn(r).direction==="rtl"&&(i+=Ot(e.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Ym=25;function RF(t,e){const n=It(t),r=Nn(t),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=Jf();(!u||u&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=fc(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-h);g<=Ym&&(s-=g)}else c<=Ym&&(s+=c);return{width:s,height:i,x:a,y:l}}const AF=new Set(["absolute","fixed"]);function OF(t,e){const n=to(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,s=xn(t)?zo(t):vn(1),i=t.clientWidth*s.x,a=t.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function qm(t,e,n){let r;if(e==="viewport")r=RF(t,n);else if(e==="document")r=TF(Nn(t));else if(on(e))r=OF(e,n);else{const o=kw(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return za(r)}function Ew(t,e){const n=wr(t);return n===e||!on(n)||Uo(n)?!1:sn(n).position==="fixed"||Ew(n,e)}function DF(t,e){const n=e.get(t);if(n)return n;let r=ri(t,[],!1).filter(a=>on(a)&&ds(a)!=="body"),o=null;const s=sn(t).position==="fixed";let i=s?wr(t):t;for(;on(i)&&!Uo(i);){const a=sn(i),l=Xf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&AF.has(o.position)||Pi(i)&&!l&&Ew(t,i))?r=r.filter(u=>u!==i):o=a,i=wr(i)}return e.set(t,r),r}function IF(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[...n==="clippingAncestors"?uc(e)?[]:DF(e,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=qm(e,u,o);return c.top=Ot(d.top,c.top),c.right=xr(d.right,c.right),c.bottom=xr(d.bottom,c.bottom),c.left=Ot(d.left,c.left),c},qm(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function PF(t){const{width:e,height:n}=Cw(t);return{width:e,height:n}}function jF(t,e,n){const r=xn(e),o=Nn(e),s=n==="fixed",i=to(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=vn(0);function c(){l.x=fc(o)}if(r||!r&&!s)if((ds(e)!=="body"||Pi(o))&&(a=dc(e)),r){const h=to(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else o&&c();s&&!r&&o&&c();const u=o&&!r&&!s?Nw(o,a):vn(0),d=i.left+a.scrollLeft-l.x-u.x,f=i.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:i.width,height:i.height}}function fu(t){return sn(t).position==="static"}function Xm(t,e){if(!xn(t)||sn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Nn(t)===n&&(n=n.ownerDocument.body),n}function Mw(t,e){const n=It(t);if(uc(t))return n;if(!xn(t)){let o=wr(t);for(;o&&!Uo(o);){if(on(o)&&!fu(o))return o;o=wr(o)}return n}let r=Xm(t,e);for(;r&&bF(r)&&fu(r);)r=Xm(r,e);return r&&Uo(r)&&fu(r)&&!Xf(r)?n:r||SF(t)||n}const _F=async function(t){const e=this.getOffsetParent||Mw,n=this.getDimensions,r=await n(t.floating);return{reference:jF(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function LF(t){return sn(t).direction==="rtl"}const FF={convertOffsetParentRelativeRectToViewportRelativeRect:EF,getDocumentElement:Nn,getClippingRect:IF,getOffsetParent:Mw,getElementRects:_F,getClientRects:MF,getDimensions:PF,getScale:zo,isElement:on,isRTL:LF};function Tw(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function $F(t,e){let n=null,r;const o=Nn(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||e(),!f||!h)return;const g=ia(d),b=ia(o.clientWidth-(u+f)),y=ia(o.clientHeight-(d+h)),v=ia(u),w={rootMargin:-g+"px "+-b+"px "+-y+"px "+-v+"px",threshold:Ot(0,xr(1,l))||1};let S=!0;function C(k){const N=k[0].intersectionRatio;if(N!==l){if(!S)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Tw(c,t.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(t)}return i(!0),s}function BF(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Zf(t),u=o||s?[...c?ri(c):[],...ri(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?$F(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let g,b=l?to(t):null;l&&y();function y(){const v=to(t);b&&!Tw(b,v)&&n(),b=v,g=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const zF=dF,HF=fF,VF=lF,WF=hF,UF=cF,Jm=aF,GF=pF,KF=(t,e,n)=>{const r=new Map,o={platform:FF,...n},s={...o.platform,_c:r};return iF(t,e,{...o,platform:s})};var YF=typeof document<"u",qF=function(){},Na=YF?R.useLayoutEffect:qF;function Ha(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ha(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&t.$$typeof)&&!Ha(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Rw(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Zm(t,e){const n=Rw(t);return Math.round(e*n)/n}function pu(t){const e=m.useRef(t);return Na(()=>{e.current=t}),e}function XF(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=m.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=m.useState(r);Ha(f,r)||h(r);const[g,b]=m.useState(null),[y,v]=m.useState(null),x=m.useCallback(_=>{_!==k.current&&(k.current=_,b(_))},[]),w=m.useCallback(_=>{_!==N.current&&(N.current=_,v(_))},[]),S=s||g,C=i||y,k=m.useRef(null),N=m.useRef(null),E=m.useRef(u),T=l!=null,O=pu(l),A=pu(o),D=pu(c),z=m.useCallback(()=>{if(!k.current||!N.current)return;const _={placement:e,strategy:n,middleware:f};A.current&&(_.platform=A.current),KF(k.current,N.current,_).then(j=>{const L={...j,isPositioned:D.current!==!1};$.current&&!Ha(E.current,L)&&(E.current=L,Vl.flushSync(()=>{d(L)}))})},[f,e,n,A,D]);Na(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(_=>({..._,isPositioned:!1})))},[c]);const $=m.useRef(!1);Na(()=>($.current=!0,()=>{$.current=!1}),[]),Na(()=>{if(S&&(k.current=S),C&&(N.current=C),S&&C){if(O.current)return O.current(S,C,z);z()}},[S,C,z,O,T]);const Y=m.useMemo(()=>({reference:k,floating:N,setReference:x,setFloating:w}),[x,w]),F=m.useMemo(()=>({reference:S,floating:C}),[S,C]),U=m.useMemo(()=>{const _={position:n,left:0,top:0};if(!F.floating)return _;const j=Zm(F.floating,u.x),L=Zm(F.floating,u.y);return a?{..._,transform:"translate("+j+"px, "+L+"px)",...Rw(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:L}},[n,a,F.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:z,refs:Y,elements:F,floatingStyles:U}),[u,z,Y,F,U])}const JF=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Jm({element:r.current,padding:o}).fn(n):{}:r?Jm({element:r,padding:o}).fn(n):{}}}},ZF=(t,e)=>({...zF(t),options:[t,e]}),QF=(t,e)=>({...HF(t),options:[t,e]}),e$=(t,e)=>({...GF(t),options:[t,e]}),t$=(t,e)=>({...VF(t),options:[t,e]}),n$=(t,e)=>({...WF(t),options:[t,e]}),r$=(t,e)=>({...UF(t),options:[t,e]}),o$=(t,e)=>({...JF(t),options:[t,e]});var s$="Arrow",Aw=m.forwardRef((t,e)=>{const{children:n,width:r=10,height:o=5,...s}=t;return p.jsx(Z.svg,{...s,ref:e,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Aw.displayName=s$;var i$=Aw,Qf="Popper",[Ow,En]=Ie(Qf),[a$,Dw]=Ow(Qf),Iw=t=>{const{__scopePopper:e,children:n}=t,[r,o]=m.useState(null);return p.jsx(a$,{scope:e,anchor:r,onAnchorChange:o,children:n})};Iw.displayName=Qf;var Pw="PopperAnchor",jw=m.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...o}=t,s=Dw(Pw,n),i=m.useRef(null),a=oe(e,i),l=m.useRef(null);return m.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||i.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:p.jsx(Z.div,{...o,ref:a})});jw.displayName=Pw;var ep="PopperContent",[l$,c$]=Ow(ep),_w=m.forwardRef((t,e)=>{var B,J,te,re,ne,G;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:g,...b}=t,y=Dw(ep,n),[v,x]=m.useState(null),w=oe(e,fe=>x(fe)),[S,C]=m.useState(null),k=Di(S),N=(k==null?void 0:k.width)??0,E=(k==null?void 0:k.height)??0,T=r+(s!=="center"?"-"+s:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},A=Array.isArray(c)?c:[c],D=A.length>0,z={padding:O,boundary:A.filter(d$),altBoundary:D},{refs:$,floatingStyles:Y,placement:F,isPositioned:U,middlewareData:_}=XF({strategy:"fixed",placement:T,whileElementsMounted:(...fe)=>BF(...fe,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[ZF({mainAxis:o+E,alignmentAxis:i}),l&&QF({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?e$():void 0,...z}),l&&t$({...z}),n$({...z,apply:({elements:fe,rects:ye,availableWidth:Me,availableHeight:He})=>{const{width:je,height:xt}=ye.reference,Te=fe.floating.style;Te.setProperty("--radix-popper-available-width",`${Me}px`),Te.setProperty("--radix-popper-available-height",`${He}px`),Te.setProperty("--radix-popper-anchor-width",`${je}px`),Te.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),S&&o$({element:S,padding:a}),f$({arrowWidth:N,arrowHeight:E}),f&&r$({strategy:"referenceHidden",...z})]}),[j,L]=$w(F),K=ke(g);De(()=>{U&&(K==null||K())},[U,K]);const I=(B=_.arrow)==null?void 0:B.x,H=(J=_.arrow)==null?void 0:J.y,X=((te=_.arrow)==null?void 0:te.centerOffset)!==0,[V,ee]=m.useState();return De(()=>{v&&ee(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:U?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[(re=_.transformOrigin)==null?void 0:re.x,(ne=_.transformOrigin)==null?void 0:ne.y].join(" "),...((G=_.hide)==null?void 0:G.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:p.jsx(l$,{scope:n,placedSide:j,onArrowChange:C,arrowX:I,arrowY:H,shouldHideArrow:X,children:p.jsx(Z.div,{"data-side":j,"data-align":L,...b,ref:w,style:{...b.style,animation:U?void 0:"none"}})})})});_w.displayName=ep;var Lw="PopperArrow",u$={top:"bottom",right:"left",bottom:"top",left:"right"},Fw=m.forwardRef(function(e,n){const{__scopePopper:r,...o}=e,s=c$(Lw,r),i=u$[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(i$,{...o,ref:n,style:{...o.style,display:"block"}})})});Fw.displayName=Lw;function d$(t){return t!==null}var f$=t=>({name:"transformOrigin",options:t,fn(e){var y,v,x;const{placement:n,rects:r,middlewareData:o}=e,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:t.arrowWidth,l=i?0:t.arrowHeight,[c,u]=$w(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let g="",b="";return c==="bottom"?(g=i?d:`${f}px`,b=`${-l}px`):c==="top"?(g=i?d:`${f}px`,b=`${r.floating.height+l}px`):c==="right"?(g=`${-l}px`,b=i?d:`${h}px`):c==="left"&&(g=`${r.floating.width+l}px`,b=i?d:`${h}px`),{data:{x:g,y:b}}}});function $w(t){const[e,n="center"]=t.split("-");return[e,n]}var fs=Iw,ps=jw,ji=_w,_i=Fw,hu="rovingFocusGroup.onEntryFocus",p$={bubbles:!1,cancelable:!0},Li="RovingFocusGroup",[sd,Bw,h$]=kr(Li),[m$,Mn]=Ie(Li,[h$]),[g$,b$]=m$(Li),zw=m.forwardRef((t,e)=>p.jsx(sd.Provider,{scope:t.__scopeRovingFocusGroup,children:p.jsx(sd.Slot,{scope:t.__scopeRovingFocusGroup,children:p.jsx(y$,{...t,ref:e})})}));zw.displayName=Li;var y$=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=t,f=m.useRef(null),h=oe(e,f),g=an(s),[b,y]=Oe({prop:i,defaultProp:a??null,onChange:l,caller:Li}),[v,x]=m.useState(!1),w=ke(c),S=Bw(n),C=m.useRef(!1),[k,N]=m.useState(0);return m.useEffect(()=>{const E=f.current;if(E)return E.addEventListener(hu,w),()=>E.removeEventListener(hu,w)},[w]),p.jsx(g$,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:b,onItemFocus:m.useCallback(E=>y(E),[y]),onItemShiftTab:m.useCallback(()=>x(!0),[]),onFocusableItemAdd:m.useCallback(()=>N(E=>E+1),[]),onFocusableItemRemove:m.useCallback(()=>N(E=>E-1),[]),children:p.jsx(Z.div,{tabIndex:v||k===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...t.style},onMouseDown:P(t.onMouseDown,()=>{C.current=!0}),onFocus:P(t.onFocus,E=>{const T=!C.current;if(E.target===E.currentTarget&&T&&!v){const O=new CustomEvent(hu,p$);if(E.currentTarget.dispatchEvent(O),!O.defaultPrevented){const A=S().filter(F=>F.focusable),D=A.find(F=>F.active),z=A.find(F=>F.id===b),Y=[D,z,...A].filter(Boolean).map(F=>F.ref.current);Ww(Y,u)}}C.current=!1}),onBlur:P(t.onBlur,()=>x(!1))})})}),Hw="RovingFocusGroupItem",Vw=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=t,l=Ee(),c=s||l,u=b$(Hw,n),d=u.currentTabStopId===c,f=Bw(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:b}=u;return m.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),p.jsx(sd.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:p.jsx(Z.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:P(t.onMouseDown,y=>{r?u.onItemFocus(c):y.preventDefault()}),onFocus:P(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:P(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=w$(y,u.orientation,u.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=f().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const S=w.indexOf(y.currentTarget);w=u.loop?S$(w,S+1):w.slice(S+1)}setTimeout(()=>Ww(w))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:b!=null}):i})})});Vw.displayName=Hw;var v$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function x$(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function w$(t,e,n){const r=x$(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return v$[r]}function Ww(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function S$(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Fi=zw,$i=Vw,id=["Enter"," "],C$=["ArrowDown","PageUp","Home"],Uw=["ArrowUp","PageDown","End"],k$=[...C$,...Uw],N$={ltr:[...id,"ArrowRight"],rtl:[...id,"ArrowLeft"]},E$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Bi="Menu",[oi,M$,T$]=kr(Bi),[uo,zi]=Ie(Bi,[T$,En,Mn]),Hi=En(),Gw=Mn(),[Kw,Mr]=uo(Bi),[R$,Vi]=uo(Bi),Yw=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=t,a=Hi(e),[l,c]=m.useState(null),u=m.useRef(!1),d=ke(s),f=an(o);return m.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),p.jsx(fs,{...a,children:p.jsx(Kw,{scope:e,open:n,onOpenChange:d,content:l,onContentChange:c,children:p.jsx(R$,{scope:e,onClose:m.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:i,children:r})})})};Yw.displayName=Bi;var A$="MenuAnchor",tp=m.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Hi(n);return p.jsx(ps,{...o,...r,ref:e})});tp.displayName=A$;var np="MenuPortal",[O$,qw]=uo(np,{forceMount:void 0}),Xw=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:o}=t,s=Mr(np,e);return p.jsx(O$,{scope:e,forceMount:n,children:p.jsx(Pe,{present:n||s.open,children:p.jsx(Si,{asChild:!0,container:o,children:r})})})};Xw.displayName=np;var Vt="MenuContent",[D$,rp]=uo(Vt),Jw=m.forwardRef((t,e)=>{const n=qw(Vt,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=Mr(Vt,t.__scopeMenu),i=Vi(Vt,t.__scopeMenu);return p.jsx(oi.Provider,{scope:t.__scopeMenu,children:p.jsx(Pe,{present:r||s.open,children:p.jsx(oi.Slot,{scope:t.__scopeMenu,children:i.modal?p.jsx(I$,{...o,ref:e}):p.jsx(P$,{...o,ref:e})})})})}),I$=m.forwardRef((t,e)=>{const n=Mr(Vt,t.__scopeMenu),r=m.useRef(null),o=oe(e,r);return m.useEffect(()=>{const s=r.current;if(s)return Jl(s)},[]),p.jsx(op,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:P(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),P$=m.forwardRef((t,e)=>{const n=Mr(Vt,t.__scopeMenu);return p.jsx(op,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),j$=Jr("MenuContent.ScrollLock"),op=m.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:g,...b}=t,y=Mr(Vt,n),v=Vi(Vt,n),x=Hi(n),w=Gw(n),S=M$(n),[C,k]=m.useState(null),N=m.useRef(null),E=oe(e,N,y.onContentChange),T=m.useRef(0),O=m.useRef(""),A=m.useRef(0),D=m.useRef(null),z=m.useRef("right"),$=m.useRef(0),Y=g?Ci:m.Fragment,F=g?{as:j$,allowPinchZoom:!0}:void 0,U=j=>{var B,J;const L=O.current+j,K=S().filter(te=>!te.disabled),I=document.activeElement,H=(B=K.find(te=>te.ref.current===I))==null?void 0:B.textValue,X=K.map(te=>te.textValue),V=K$(X,L,H),ee=(J=K.find(te=>te.textValue===V))==null?void 0:J.ref.current;(function te(re){O.current=re,window.clearTimeout(T.current),re!==""&&(T.current=window.setTimeout(()=>te(""),1e3))})(L),ee&&setTimeout(()=>ee.focus())};m.useEffect(()=>()=>window.clearTimeout(T.current),[]),ql();const _=m.useCallback(j=>{var K,I;return z.current===((K=D.current)==null?void 0:K.side)&&q$(j,(I=D.current)==null?void 0:I.area)},[]);return p.jsx(D$,{scope:n,searchRef:O,onItemEnter:m.useCallback(j=>{_(j)&&j.preventDefault()},[_]),onItemLeave:m.useCallback(j=>{var L;_(j)||((L=N.current)==null||L.focus(),k(null))},[_]),onTriggerLeave:m.useCallback(j=>{_(j)&&j.preventDefault()},[_]),pointerGraceTimerRef:A,onPointerGraceIntentChange:m.useCallback(j=>{D.current=j},[]),children:p.jsx(Y,{...F,children:p.jsx(wi,{asChild:!0,trapped:o,onMountAutoFocus:P(s,j=>{var L;j.preventDefault(),(L=N.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(Er,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:p.jsx(Fi,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:k,onEntryFocus:P(l,j=>{v.isUsingKeyboardRef.current||j.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(ji,{role:"menu","aria-orientation":"vertical","data-state":h0(y.open),"data-radix-menu-content":"",dir:v.dir,...x,...b,ref:E,style:{outline:"none",...b.style},onKeyDown:P(b.onKeyDown,j=>{const K=j.target.closest("[data-radix-menu-content]")===j.currentTarget,I=j.ctrlKey||j.altKey||j.metaKey,H=j.key.length===1;K&&(j.key==="Tab"&&j.preventDefault(),!I&&H&&U(j.key));const X=N.current;if(j.target!==X||!k$.includes(j.key))return;j.preventDefault();const ee=S().filter(B=>!B.disabled).map(B=>B.ref.current);Uw.includes(j.key)&&ee.reverse(),U$(ee)}),onBlur:P(t.onBlur,j=>{j.currentTarget.contains(j.target)||(window.clearTimeout(T.current),O.current="")}),onPointerMove:P(t.onPointerMove,si(j=>{const L=j.target,K=$.current!==j.clientX;if(j.currentTarget.contains(L)&&K){const I=j.clientX>$.current?"right":"left";z.current=I,$.current=j.clientX}}))})})})})})})});Jw.displayName=Vt;var _$="MenuGroup",sp=m.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(Z.div,{role:"group",...r,ref:e})});sp.displayName=_$;var L$="MenuLabel",Zw=m.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(Z.div,{...r,ref:e})});Zw.displayName=L$;var Va="MenuItem",Qm="menu.itemSelect",pc=m.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...o}=t,s=m.useRef(null),i=Vi(Va,t.__scopeMenu),a=rp(Va,t.__scopeMenu),l=oe(e,s),c=m.useRef(!1),u=()=>{const d=s.current;if(!n&&d){const f=new CustomEvent(Qm,{bubbles:!0,cancelable:!0});d.addEventListener(Qm,h=>r==null?void 0:r(h),{once:!0}),Ia(d,f),f.defaultPrevented?c.current=!1:i.onClose()}};return p.jsx(Qw,{...o,ref:l,disabled:n,onClick:P(t.onClick,u),onPointerDown:d=>{var f;(f=t.onPointerDown)==null||f.call(t,d),c.current=!0},onPointerUp:P(t.onPointerUp,d=>{var f;c.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:P(t.onKeyDown,d=>{const f=a.searchRef.current!=="";n||f&&d.key===" "||id.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});pc.displayName=Va;var Qw=m.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=t,i=rp(Va,n),a=Gw(n),l=m.useRef(null),c=oe(e,l),[u,d]=m.useState(!1),[f,h]=m.useState("");return m.useEffect(()=>{const g=l.current;g&&h((g.textContent??"").trim())},[s.children]),p.jsx(oi.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:p.jsx($i,{asChild:!0,...a,focusable:!r,children:p.jsx(Z.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:P(t.onPointerMove,si(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:P(t.onPointerLeave,si(g=>i.onItemLeave(g))),onFocus:P(t.onFocus,()=>d(!0)),onBlur:P(t.onBlur,()=>d(!1))})})})}),F$="MenuCheckboxItem",e0=m.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...o}=t;return p.jsx(s0,{scope:t.__scopeMenu,checked:n,children:p.jsx(pc,{role:"menuitemcheckbox","aria-checked":Wa(n)?"mixed":n,...o,ref:e,"data-state":lp(n),onSelect:P(o.onSelect,()=>r==null?void 0:r(Wa(n)?!0:!n),{checkForDefaultPrevented:!1})})})});e0.displayName=F$;var t0="MenuRadioGroup",[$$,B$]=uo(t0,{value:void 0,onValueChange:()=>{}}),n0=m.forwardRef((t,e)=>{const{value:n,onValueChange:r,...o}=t,s=ke(r);return p.jsx($$,{scope:t.__scopeMenu,value:n,onValueChange:s,children:p.jsx(sp,{...o,ref:e})})});n0.displayName=t0;var r0="MenuRadioItem",o0=m.forwardRef((t,e)=>{const{value:n,...r}=t,o=B$(r0,t.__scopeMenu),s=n===o.value;return p.jsx(s0,{scope:t.__scopeMenu,checked:s,children:p.jsx(pc,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":lp(s),onSelect:P(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});o0.displayName=r0;var ip="MenuItemIndicator",[s0,z$]=uo(ip,{checked:!1}),i0=m.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...o}=t,s=z$(ip,n);return p.jsx(Pe,{present:r||Wa(s.checked)||s.checked===!0,children:p.jsx(Z.span,{...o,ref:e,"data-state":lp(s.checked)})})});i0.displayName=ip;var H$="MenuSeparator",a0=m.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});a0.displayName=H$;var V$="MenuArrow",l0=m.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Hi(n);return p.jsx(_i,{...o,...r,ref:e})});l0.displayName=V$;var ap="MenuSub",[W$,c0]=uo(ap),u0=t=>{const{__scopeMenu:e,children:n,open:r=!1,onOpenChange:o}=t,s=Mr(ap,e),i=Hi(e),[a,l]=m.useState(null),[c,u]=m.useState(null),d=ke(o);return m.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),p.jsx(fs,{...i,children:p.jsx(Kw,{scope:e,open:r,onOpenChange:d,content:c,onContentChange:u,children:p.jsx(W$,{scope:e,contentId:Ee(),triggerId:Ee(),trigger:a,onTriggerChange:l,children:n})})})};u0.displayName=ap;var As="MenuSubTrigger",d0=m.forwardRef((t,e)=>{const n=Mr(As,t.__scopeMenu),r=Vi(As,t.__scopeMenu),o=c0(As,t.__scopeMenu),s=rp(As,t.__scopeMenu),i=m.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:t.__scopeMenu},u=m.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return m.useEffect(()=>u,[u]),m.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),p.jsx(tp,{asChild:!0,...c,children:p.jsx(Qw,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":h0(n.open),...t,ref:rn(e,o.onTriggerChange),onClick:d=>{var f;(f=t.onClick)==null||f.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:P(t.onPointerMove,si(d=>{s.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:P(t.onPointerLeave,si(d=>{var h,g;u();const f=(h=n.content)==null?void 0:h.getBoundingClientRect();if(f){const b=(g=n.content)==null?void 0:g.dataset.side,y=b==="right",v=y?-5:5,x=f[y?"left":"right"],w=f[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+v,y:d.clientY},{x,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x,y:f.bottom}],side:b}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:P(t.onKeyDown,d=>{var h;const f=s.searchRef.current!=="";t.disabled||f&&d.key===" "||N$[r.dir].includes(d.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),d.preventDefault())})})})});d0.displayName=As;var f0="MenuSubContent",p0=m.forwardRef((t,e)=>{const n=qw(Vt,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=Mr(Vt,t.__scopeMenu),i=Vi(Vt,t.__scopeMenu),a=c0(f0,t.__scopeMenu),l=m.useRef(null),c=oe(e,l);return p.jsx(oi.Provider,{scope:t.__scopeMenu,children:p.jsx(Pe,{present:r||s.open,children:p.jsx(oi.Slot,{scope:t.__scopeMenu,children:p.jsx(op,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var d;i.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:P(t.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:P(t.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:P(t.onKeyDown,u=>{var h;const d=u.currentTarget.contains(u.target),f=E$[i.dir].includes(u.key);d&&f&&(s.onOpenChange(!1),(h=a.trigger)==null||h.focus(),u.preventDefault())})})})})})});p0.displayName=f0;function h0(t){return t?"open":"closed"}function Wa(t){return t==="indeterminate"}function lp(t){return Wa(t)?"indeterminate":t?"checked":"unchecked"}function U$(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function G$(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function K$(t,e,n){const o=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let i=G$(t,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Y$(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const a=e[s],l=e[i],c=a.x,u=a.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(o=!o)}return o}function q$(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return Y$(n,e)}function si(t){return e=>e.pointerType==="mouse"?t(e):void 0}var cp=Yw,up=tp,dp=Xw,fp=Jw,pp=sp,hp=Zw,mp=pc,gp=e0,bp=n0,yp=o0,vp=i0,xp=a0,wp=l0,Sp=u0,Cp=d0,kp=p0,Np="ContextMenu",[X$]=Ie(Np,[zi]),dt=zi(),[J$,m0]=X$(Np),g0=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,dir:o,modal:s=!0}=t,[i,a]=m.useState(!1),l=dt(e),c=ke(r),u=m.useCallback(d=>{a(d),c(d)},[c]);return p.jsx(J$,{scope:e,open:i,onOpenChange:u,modal:s,children:p.jsx(cp,{...l,dir:o,open:i,onOpenChange:u,modal:s,children:n})})};g0.displayName=Np;var b0="ContextMenuTrigger",y0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=t,s=m0(b0,n),i=dt(n),a=m.useRef({x:0,y:0}),l=m.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),c=m.useRef(0),u=m.useCallback(()=>window.clearTimeout(c.current),[]),d=f=>{a.current={x:f.clientX,y:f.clientY},s.onOpenChange(!0)};return m.useEffect(()=>u,[u]),m.useEffect(()=>void(r&&u()),[r,u]),p.jsxs(p.Fragment,{children:[p.jsx(up,{...i,virtualRef:l}),p.jsx(Z.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:P(t.onContextMenu,f=>{u(),d(f),f.preventDefault()}),onPointerDown:r?t.onPointerDown:P(t.onPointerDown,aa(f=>{u(),c.current=window.setTimeout(()=>d(f),700)})),onPointerMove:r?t.onPointerMove:P(t.onPointerMove,aa(u)),onPointerCancel:r?t.onPointerCancel:P(t.onPointerCancel,aa(u)),onPointerUp:r?t.onPointerUp:P(t.onPointerUp,aa(u))})]})});y0.displayName=b0;var Z$="ContextMenuPortal",v0=t=>{const{__scopeContextMenu:e,...n}=t,r=dt(e);return p.jsx(dp,{...r,...n})};v0.displayName=Z$;var x0="ContextMenuContent",w0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=m0(x0,n),s=dt(n),i=m.useRef(!1);return p.jsx(fp,{...s,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:a=>{var l;(l=t.onCloseAutoFocus)==null||l.call(t,a),!a.defaultPrevented&&i.current&&a.preventDefault(),i.current=!1},onInteractOutside:a=>{var l;(l=t.onInteractOutside)==null||l.call(t,a),!a.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});w0.displayName=x0;var Q$="ContextMenuGroup",S0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(pp,{...o,...r,ref:e})});S0.displayName=Q$;var eB="ContextMenuLabel",C0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(hp,{...o,...r,ref:e})});C0.displayName=eB;var tB="ContextMenuItem",k0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(mp,{...o,...r,ref:e})});k0.displayName=tB;var nB="ContextMenuCheckboxItem",N0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(gp,{...o,...r,ref:e})});N0.displayName=nB;var rB="ContextMenuRadioGroup",E0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(bp,{...o,...r,ref:e})});E0.displayName=rB;var oB="ContextMenuRadioItem",M0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(yp,{...o,...r,ref:e})});M0.displayName=oB;var sB="ContextMenuItemIndicator",T0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(vp,{...o,...r,ref:e})});T0.displayName=sB;var iB="ContextMenuSeparator",R0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(xp,{...o,...r,ref:e})});R0.displayName=iB;var aB="ContextMenuArrow",lB=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(wp,{...o,...r,ref:e})});lB.displayName=aB;var A0="ContextMenuSub",O0=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,open:o,defaultOpen:s}=t,i=dt(e),[a,l]=Oe({prop:o,defaultProp:s??!1,onChange:r,caller:A0});return p.jsx(Sp,{...i,open:a,onOpenChange:l,children:n})};O0.displayName=A0;var cB="ContextMenuSubTrigger",D0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(Cp,{...o,...r,ref:e})});D0.displayName=cB;var uB="ContextMenuSubContent",I0=m.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=dt(n);return p.jsx(kp,{...o,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});I0.displayName=uB;function aa(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var dB=g0,fB=y0,P0=v0,j0=w0,pB=S0,_0=C0,L0=k0,F0=N0,hB=E0,$0=M0,B0=T0,z0=R0,mB=O0,H0=D0,V0=I0;const gB=dB,bB=fB,yB=pB,vB=P0,xB=mB,wB=hB,W0=m.forwardRef(({className:t,inset:e,children:n,...r},o)=>p.jsxs(H0,{ref:o,className:M("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,p.jsx(Nr,{className:"ml-auto h-4 w-4"})]}));W0.displayName=H0.displayName;const U0=m.forwardRef(({className:t,...e},n)=>p.jsx(V0,{ref:n,className:M("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",t),...e}));U0.displayName=V0.displayName;const G0=m.forwardRef(({className:t,...e},n)=>p.jsx(P0,{children:p.jsx(j0,{ref:n,className:M("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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",t),...e})}));G0.displayName=j0.displayName;const K0=m.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(L0,{ref:r,className:M("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));K0.displayName=L0.displayName;const Y0=m.forwardRef(({className:t,children:e,checked:n,...r},o)=>p.jsxs(F0,{ref:o,className:M("relative flex 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",t),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(B0,{children:p.jsx(kt,{className:"h-4 w-4"})})}),e]}));Y0.displayName=F0.displayName;const q0=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs($0,{ref:r,className:M("relative flex 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",t),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(B0,{children:p.jsx(Yl,{className:"h-2 w-2 fill-current"})})}),e]}));q0.displayName=$0.displayName;const X0=m.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(_0,{ref:r,className:M("px-2 py-1.5 text-sm font-semibold text-foreground",e&&"pl-8",t),...n}));X0.displayName=_0.displayName;const J0=m.forwardRef(({className:t,...e},n)=>p.jsx(z0,{ref:n,className:M("-mx-1 my-1 h-px bg-border",t),...e}));J0.displayName=z0.displayName;const Z0=({className:t,...e})=>p.jsx("span",{className:M("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});Z0.displayName="ContextMenuShortcut";const SB=[{type:"visa",name:"Visa",pattern:/^4/,cvvLength:3,gaps:[4,8,12],lengths:[16,18,19]},{type:"mastercard",name:"Mastercard",pattern:/^(5[1-5]|2[2-7])/,cvvLength:3,gaps:[4,8,12],lengths:[16]},{type:"amex",name:"American Express",pattern:/^3[47]/,cvvLength:4,gaps:[4,10],lengths:[15]},{type:"discover",name:"Discover",pattern:/^(6011|65|64[4-9])/,cvvLength:3,gaps:[4,8,12],lengths:[16,19]},{type:"diners",name:"Diners Club",pattern:/^(36|38|30[0-5])/,cvvLength:3,gaps:[4,10],lengths:[14,16,19]},{type:"jcb",name:"JCB",pattern:/^35/,cvvLength:3,gaps:[4,8,12],lengths:[16,17,18,19]},{type:"unionpay",name:"UnionPay",pattern:/^62/,cvvLength:3,gaps:[4,8,12],lengths:[16,17,18,19]}];function Q0(t){const e=t.replace(/\s/g,"");return SB.find(n=>n.pattern.test(e))}function CB(t,e=[4,8,12]){const n=t.replace(/\D/g,"");let r="",o=0;for(let s=0;s<n.length;s++)o<e.length&&s===e[o]&&(r+=" ",o++),r+=n[s];return r}function kB(t){const e=t.replace(/\D/g,"");return e.length>=2?`${e.slice(0,2)}/${e.slice(2,4)}`:e}const NB=({type:t})=>{const e="h-6 w-6";switch(t){case"visa":return p.jsx("span",{className:M(e,"text-blue-600 font-bold text-xs"),children:"VISA"});case"mastercard":return p.jsxs("div",{className:"flex -space-x-1",children:[p.jsx("div",{className:"h-4 w-4 rounded-full bg-red-500"}),p.jsx("div",{className:"h-4 w-4 rounded-full bg-yellow-500 opacity-80"})]});case"amex":return p.jsx("span",{className:M(e,"text-blue-500 font-bold text-xs"),children:"AMEX"});case"discover":return p.jsx("span",{className:M(e,"text-orange-500 font-bold text-xs"),children:"DISC"});default:return p.jsx(dy,{className:M(e,"text-muted-foreground")})}},Ep=m.forwardRef(({className:t,onChange:e,...n},r)=>{const[o,s]=m.useState(""),[i,a]=m.useState("unknown"),l=c=>{const u=c.target.value.replace(/\D/g,""),d=Q0(u),f=(d==null?void 0:d.lengths[d.lengths.length-1])||19;if(u.length<=f){const h=CB(u,d==null?void 0:d.gaps);s(h);const g=(d==null?void 0:d.type)||"unknown";a(g),e==null||e(u,g)}};return p.jsxs("div",{className:"relative",children:[p.jsx(dy,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-number",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-12 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:r,value:o,onChange:l,placeholder:"1234 5678 9012 3456",...n}),p.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:p.jsx(NB,{type:i})})]})});Ep.displayName="CreditCardNumberInput";const Mp=m.forwardRef(({className:t,onChange:e,...n},r)=>{const[o,s]=m.useState(""),i=a=>{const l=a.target.value.replace(/\D/g,"");if(l.length<=4){const c=kB(l);s(c),e==null||e(l)}};return p.jsxs("div",{className:"relative",children:[p.jsx(Kl,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-exp",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:r,value:o,onChange:i,placeholder:"MM/YY",...n})]})});Mp.displayName="CreditCardExpiryInput";const Tp=m.forwardRef(({className:t,cardType:e="unknown",onChange:n,...r},o)=>{const[s,i]=m.useState(""),a=e==="amex"?4:3,l=c=>{const u=c.target.value.replace(/\D/g,"");u.length<=a&&(i(u),n==null||n(u))};return p.jsxs("div",{className:"relative",children:[p.jsx(hy,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"cc-csc",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:o,value:s,onChange:l,placeholder:e==="amex"?"1234":"123",maxLength:a,...r})]})});Tp.displayName="CreditCardCVVInput";const eS=m.forwardRef(({className:t,onCardChange:e,disabled:n},r)=>{const[o,s]=m.useState(""),[i,a]=m.useState(""),[l,c]=m.useState(""),[u,d]=m.useState("unknown");return m.useEffect(()=>{const f=Q0(o),h=f?f.lengths.includes(o.length):o.length>=13&&o.length<=19,g=i.length===4,b=u==="amex"?l.length===4:l.length===3;e==null||e({number:o,expiry:i,cvv:l,cardType:u,isValid:h&&g&&b})},[o,i,l,u,e]),p.jsxs("div",{ref:r,className:M("space-y-3",t),children:[p.jsx(Ep,{onChange:(f,h)=>{s(f),d(h)},disabled:n}),p.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[p.jsx(Mp,{onChange:a,disabled:n}),p.jsx(Tp,{cardType:u,onChange:c,disabled:n})]})]})});eS.displayName="CreditCardInput";var hc="Popover",[tS]=Ie(hc,[En]),Wi=En(),[EB,Tr]=tS(hc),nS=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=t,a=Wi(e),l=m.useRef(null),[c,u]=m.useState(!1),[d,f]=Oe({prop:r,defaultProp:o??!1,onChange:s,caller:hc});return p.jsx(fs,{...a,children:p.jsx(EB,{scope:e,contentId:Ee(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:c,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:i,children:n})})};nS.displayName=hc;var rS="PopoverAnchor",MB=m.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,o=Tr(rS,n),s=Wi(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return m.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(ps,{...s,...r,ref:e})});MB.displayName=rS;var oS="PopoverTrigger",sS=m.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,o=Tr(oS,n),s=Wi(n),i=oe(e,o.triggerRef),a=p.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uS(o.open),...r,ref:i,onClick:P(t.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(ps,{asChild:!0,...s,children:a})});sS.displayName=oS;var Rp="PopoverPortal",[TB,RB]=tS(Rp,{forceMount:void 0}),iS=t=>{const{__scopePopover:e,forceMount:n,children:r,container:o}=t,s=Tr(Rp,e);return p.jsx(TB,{scope:e,forceMount:n,children:p.jsx(Pe,{present:n||s.open,children:p.jsx(Si,{asChild:!0,container:o,children:r})})})};iS.displayName=Rp;var Go="PopoverContent",aS=m.forwardRef((t,e)=>{const n=RB(Go,t.__scopePopover),{forceMount:r=n.forceMount,...o}=t,s=Tr(Go,t.__scopePopover);return p.jsx(Pe,{present:r||s.open,children:s.modal?p.jsx(OB,{...o,ref:e}):p.jsx(DB,{...o,ref:e})})});aS.displayName=Go;var AB=Jr("PopoverContent.RemoveScroll"),OB=m.forwardRef((t,e)=>{const n=Tr(Go,t.__scopePopover),r=m.useRef(null),o=oe(e,r),s=m.useRef(!1);return m.useEffect(()=>{const i=r.current;if(i)return Jl(i)},[]),p.jsx(Ci,{as:AB,allowPinchZoom:!0,children:p.jsx(lS,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),DB=m.forwardRef((t,e)=>{const n=Tr(Go,t.__scopePopover),r=m.useRef(!1),o=m.useRef(!1);return p.jsx(lS,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=t.onCloseAutoFocus)==null||i.call(t,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),lS=m.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=t,f=Tr(Go,n),h=Wi(n);return ql(),p.jsx(wi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(Er,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:p.jsx(ji,{"data-state":uS(f.open),role:"dialog",id:f.contentId,...h,...d,ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),cS="PopoverClose",IB=m.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,o=Tr(cS,n);return p.jsx(Z.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>o.onOpenChange(!1))})});IB.displayName=cS;var PB="PopoverArrow",jB=m.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,o=Wi(n);return p.jsx(_i,{...o,...r,ref:e})});jB.displayName=PB;function uS(t){return t?"open":"closed"}var _B=nS,LB=sS,FB=iS,dS=aS;const Ui=_B,Gi=LB,hs=m.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},o)=>p.jsx(FB,{children:p.jsx(dS,{ref:o,align:e,sideOffset:n,className:M("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",t),...r})}));hs.displayName=dS.displayName;const fS=m.forwardRef(({value:t,onChange:e,placeholder:n="Pick a date",disabled:r=!1,className:o,dateFormat:s="PPP"},i)=>{const[a,l]=m.useState(!1);return p.jsxs(Ui,{open:a,onOpenChange:l,children:[p.jsx(Gi,{asChild:!0,children:p.jsxs(Cn,{ref:i,variant:"outline",disabled:r,className:M("w-full justify-start text-left font-normal",!t&&"text-muted-foreground",o),children:[p.jsx(Kl,{className:"mr-2 h-4 w-4"}),t?bn(t,s):p.jsx("span",{children:n})]})}),p.jsx(hs,{className:"w-auto p-0",align:"start",children:p.jsx(Ai,{mode:"single",selected:t,onSelect:c=>{e==null||e(c),l(!1)},initialFocus:!0})})]})});fS.displayName="DatePicker";const pS=m.forwardRef(({value:t,onChange:e,placeholder:n="Pick a date range",disabled:r=!1,className:o,dateFormat:s="LLL dd, y"},i)=>{const[a,l]=m.useState(!1);return p.jsxs(Ui,{open:a,onOpenChange:l,children:[p.jsx(Gi,{asChild:!0,children:p.jsxs(Cn,{ref:i,variant:"outline",disabled:r,className:M("w-full justify-start text-left font-normal",!(t!=null&&t.from)&&"text-muted-foreground",o),children:[p.jsx(Kl,{className:"mr-2 h-4 w-4"}),t!=null&&t.from?t.to?p.jsxs(p.Fragment,{children:[bn(t.from,s)," -"," ",bn(t.to,s)]}):bn(t.from,s):p.jsx("span",{children:n})]})}),p.jsx(hs,{className:"w-auto p-0",align:"start",children:p.jsx(Ai,{mode:"range",defaultMonth:t==null?void 0:t.from,selected:t,onSelect:c=>{e==null||e(c)},numberOfMonths:2,initialFocus:!0})})]})});pS.displayName="DateRangePicker";function ii(t,[e,n]){return Math.min(n,Math.max(e,t))}var hS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$B="VisuallyHidden",mS=m.forwardRef((t,e)=>p.jsx(Z.span,{...t,ref:e,style:{...hS,...t.style}}));mS.displayName=$B;var gS=mS,BB=[" ","Enter","ArrowUp","ArrowDown"],zB=[" ","Enter"],no="Select",[mc,gc,HB]=kr(no),[ms]=Ie(no,[HB,En]),bc=En(),[VB,Rr]=ms(no),[WB,UB]=ms(no),bS=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:g}=t,b=bc(e),[y,v]=m.useState(null),[x,w]=m.useState(null),[S,C]=m.useState(!1),k=an(c),[N,E]=Oe({prop:r,defaultProp:o??!1,onChange:s,caller:no}),[T,O]=Oe({prop:i,defaultProp:a,onChange:l,caller:no}),A=m.useRef(null),D=y?g||!!y.closest("form"):!0,[z,$]=m.useState(new Set),Y=Array.from(z).map(F=>F.props.value).join(";");return p.jsx(fs,{...b,children:p.jsxs(VB,{required:h,scope:e,trigger:y,onTriggerChange:v,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Ee(),value:T,onValueChange:O,open:N,onOpenChange:E,dir:k,triggerPointerDownPosRef:A,disabled:f,children:[p.jsx(mc.Provider,{scope:e,children:p.jsx(WB,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(F=>{$(U=>new Set(U).add(F))},[]),onNativeOptionRemove:m.useCallback(F=>{$(U=>{const _=new Set(U);return _.delete(F),_})},[]),children:n})}),D?p.jsxs(HS,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:F=>O(F.target.value),disabled:f,form:g,children:[T===void 0?p.jsx("option",{value:""}):null,Array.from(z)]},Y):null]})})};bS.displayName=no;var yS="SelectTrigger",vS=m.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...o}=t,s=bc(n),i=Rr(yS,n),a=i.disabled||r,l=oe(e,i.onTriggerChange),c=gc(n),u=m.useRef("touch"),[d,f,h]=WS(b=>{const y=c().filter(w=>!w.disabled),v=y.find(w=>w.value===i.value),x=US(y,b,v);x!==void 0&&i.onValueChange(x.value)}),g=b=>{a||(i.onOpenChange(!0),h()),b&&(i.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return p.jsx(ps,{asChild:!0,...s,children:p.jsx(Z.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":VS(i.value)?"":void 0,...o,ref:l,onClick:P(o.onClick,b=>{b.currentTarget.focus(),u.current!=="mouse"&&g(b)}),onPointerDown:P(o.onPointerDown,b=>{u.current=b.pointerType;const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(g(b),b.preventDefault())}),onKeyDown:P(o.onKeyDown,b=>{const y=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(y&&b.key===" ")&&BB.includes(b.key)&&(g(),b.preventDefault())})})})});vS.displayName=yS;var xS="SelectValue",wS=m.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=t,l=Rr(xS,n),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,d=oe(e,l.onValueNodeChange);return De(()=>{c(u)},[c,u]),p.jsx(Z.span,{...a,ref:d,style:{pointerEvents:"none"},children:VS(l.value)?p.jsx(p.Fragment,{children:i}):s})});wS.displayName=xS;var GB="SelectIcon",SS=m.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...o}=t;return p.jsx(Z.span,{"aria-hidden":!0,...o,ref:e,children:r||"▼"})});SS.displayName=GB;var KB="SelectPortal",CS=t=>p.jsx(Si,{asChild:!0,...t});CS.displayName=KB;var ro="SelectContent",kS=m.forwardRef((t,e)=>{const n=Rr(ro,t.__scopeSelect),[r,o]=m.useState();if(De(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Vl.createPortal(p.jsx(NS,{scope:t.__scopeSelect,children:p.jsx(mc.Slot,{scope:t.__scopeSelect,children:p.jsx("div",{children:t.children})})}),s):null}return p.jsx(ES,{...t,ref:e})});kS.displayName=ro;var Zt=10,[NS,Ar]=ms(ro),YB="SelectContentImpl",qB=Jr("SelectContent.RemoveScroll"),ES=m.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:b,avoidCollisions:y,...v}=t,x=Rr(ro,n),[w,S]=m.useState(null),[C,k]=m.useState(null),N=oe(e,B=>S(B)),[E,T]=m.useState(null),[O,A]=m.useState(null),D=gc(n),[z,$]=m.useState(!1),Y=m.useRef(!1);m.useEffect(()=>{if(w)return Jl(w)},[w]),ql();const F=m.useCallback(B=>{const[J,...te]=D().map(G=>G.ref.current),[re]=te.slice(-1),ne=document.activeElement;for(const G of B)if(G===ne||(G==null||G.scrollIntoView({block:"nearest"}),G===J&&C&&(C.scrollTop=0),G===re&&C&&(C.scrollTop=C.scrollHeight),G==null||G.focus(),document.activeElement!==ne))return},[D,C]),U=m.useCallback(()=>F([E,w]),[F,E,w]);m.useEffect(()=>{z&&U()},[z,U]);const{onOpenChange:_,triggerPointerDownPosRef:j}=x;m.useEffect(()=>{if(w){let B={x:0,y:0};const J=re=>{var ne,G;B={x:Math.abs(Math.round(re.pageX)-(((ne=j.current)==null?void 0:ne.x)??0)),y:Math.abs(Math.round(re.pageY)-(((G=j.current)==null?void 0:G.y)??0))}},te=re=>{B.x<=10&&B.y<=10?re.preventDefault():w.contains(re.target)||_(!1),document.removeEventListener("pointermove",J),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",te,{capture:!0})}}},[w,_,j]),m.useEffect(()=>{const B=()=>_(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[_]);const[L,K]=WS(B=>{const J=D().filter(ne=>!ne.disabled),te=J.find(ne=>ne.ref.current===document.activeElement),re=US(J,B,te);re&&setTimeout(()=>re.ref.current.focus())}),I=m.useCallback((B,J,te)=>{const re=!Y.current&&!te;(x.value!==void 0&&x.value===J||re)&&(T(B),re&&(Y.current=!0))},[x.value]),H=m.useCallback(()=>w==null?void 0:w.focus(),[w]),X=m.useCallback((B,J,te)=>{const re=!Y.current&&!te;(x.value!==void 0&&x.value===J||re)&&A(B)},[x.value]),V=r==="popper"?ad:MS,ee=V===ad?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:b,avoidCollisions:y}:{};return p.jsx(NS,{scope:n,content:w,viewport:C,onViewportChange:k,itemRefCallback:I,selectedItem:E,onItemLeave:H,itemTextRefCallback:X,focusSelectedItem:U,selectedItemText:O,position:r,isPositioned:z,searchRef:L,children:p.jsx(Ci,{as:qB,allowPinchZoom:!0,children:p.jsx(wi,{asChild:!0,trapped:x.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:P(o,B=>{var J;(J=x.trigger)==null||J.focus({preventScroll:!0}),B.preventDefault()}),children:p.jsx(Er,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(V,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:B=>B.preventDefault(),...v,...ee,onPlaced:()=>$(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:P(v.onKeyDown,B=>{const J=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!J&&B.key.length===1&&K(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let re=D().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(B.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const ne=B.target,G=re.indexOf(ne);re=re.slice(G+1)}setTimeout(()=>F(re)),B.preventDefault()}})})})})})})});ES.displayName=YB;var XB="SelectItemAlignedPosition",MS=m.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...o}=t,s=Rr(ro,n),i=Ar(ro,n),[a,l]=m.useState(null),[c,u]=m.useState(null),d=oe(e,N=>u(N)),f=gc(n),h=m.useRef(!1),g=m.useRef(!0),{viewport:b,selectedItem:y,selectedItemText:v,focusSelectedItem:x}=i,w=m.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&b&&y&&v){const N=s.trigger.getBoundingClientRect(),E=c.getBoundingClientRect(),T=s.valueNode.getBoundingClientRect(),O=v.getBoundingClientRect();if(s.dir!=="rtl"){const ne=O.left-E.left,G=T.left-ne,fe=N.left-G,ye=N.width+fe,Me=Math.max(ye,E.width),He=window.innerWidth-Zt,je=ii(G,[Zt,Math.max(Zt,He-Me)]);a.style.minWidth=ye+"px",a.style.left=je+"px"}else{const ne=E.right-O.right,G=window.innerWidth-T.right-ne,fe=window.innerWidth-N.right-G,ye=N.width+fe,Me=Math.max(ye,E.width),He=window.innerWidth-Zt,je=ii(G,[Zt,Math.max(Zt,He-Me)]);a.style.minWidth=ye+"px",a.style.right=je+"px"}const A=f(),D=window.innerHeight-Zt*2,z=b.scrollHeight,$=window.getComputedStyle(c),Y=parseInt($.borderTopWidth,10),F=parseInt($.paddingTop,10),U=parseInt($.borderBottomWidth,10),_=parseInt($.paddingBottom,10),j=Y+F+z+_+U,L=Math.min(y.offsetHeight*5,j),K=window.getComputedStyle(b),I=parseInt(K.paddingTop,10),H=parseInt(K.paddingBottom,10),X=N.top+N.height/2-Zt,V=D-X,ee=y.offsetHeight/2,B=y.offsetTop+ee,J=Y+F+B,te=j-J;if(J<=X){const ne=A.length>0&&y===A[A.length-1].ref.current;a.style.bottom="0px";const G=c.clientHeight-b.offsetTop-b.offsetHeight,fe=Math.max(V,ee+(ne?H:0)+G+U),ye=J+fe;a.style.height=ye+"px"}else{const ne=A.length>0&&y===A[0].ref.current;a.style.top="0px";const fe=Math.max(X,Y+b.offsetTop+(ne?I:0)+ee)+te;a.style.height=fe+"px",b.scrollTop=J-X+b.offsetTop}a.style.margin=`${Zt}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,s.trigger,s.valueNode,a,c,b,y,v,s.dir,r]);De(()=>w(),[w]);const[S,C]=m.useState();De(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const k=m.useCallback(N=>{N&&g.current===!0&&(w(),x==null||x(),g.current=!1)},[w,x]);return p.jsx(ZB,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(Z.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});MS.displayName=XB;var JB="SelectPopperPosition",ad=m.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Zt,...s}=t,i=bc(n);return p.jsx(ji,{...i,...s,ref:e,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ad.displayName=JB;var[ZB,Ap]=ms(ro,{}),ld="SelectViewport",TS=m.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...o}=t,s=Ar(ld,n),i=Ap(ld,n),a=oe(e,s.onViewportChange),l=m.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(mc.Slot,{scope:n,children:p.jsx(Z.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:P(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const g=window.innerHeight-Zt*2,b=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),v=Math.max(b,y);if(v<g){const x=v+h,w=Math.min(g,x),S=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});TS.displayName=ld;var RS="SelectGroup",[QB,ez]=ms(RS),AS=m.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,o=Ee();return p.jsx(QB,{scope:n,id:o,children:p.jsx(Z.div,{role:"group","aria-labelledby":o,...r,ref:e})})});AS.displayName=RS;var OS="SelectLabel",DS=m.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,o=ez(OS,n);return p.jsx(Z.div,{id:o.id,...r,ref:e})});DS.displayName=OS;var Ua="SelectItem",[tz,IS]=ms(Ua),PS=m.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=t,a=Rr(Ua,n),l=Ar(Ua,n),c=a.value===r,[u,d]=m.useState(s??""),[f,h]=m.useState(!1),g=oe(e,x=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,x,r,o)}),b=Ee(),y=m.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(tz,{scope:n,value:r,disabled:o,textId:b,isSelected:c,onItemTextChange:m.useCallback(x=>{d(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:p.jsx(mc.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:p.jsx(Z.div,{role:"option","aria-labelledby":b,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:g,onFocus:P(i.onFocus,()=>h(!0)),onBlur:P(i.onBlur,()=>h(!1)),onClick:P(i.onClick,()=>{y.current!=="mouse"&&v()}),onPointerUp:P(i.onPointerUp,()=>{y.current==="mouse"&&v()}),onPointerDown:P(i.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:P(i.onPointerMove,x=>{var w;y.current=x.pointerType,o?(w=l.onItemLeave)==null||w.call(l):y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(i.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:P(i.onKeyDown,x=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(zB.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});PS.displayName=Ua;var Os="SelectItemText",jS=m.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:o,...s}=t,i=Rr(Os,n),a=Ar(Os,n),l=IS(Os,n),c=UB(Os,n),[u,d]=m.useState(null),f=oe(e,v=>d(v),l.onItemTextChange,v=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,v,l.value,l.disabled)}),h=u==null?void 0:u.textContent,g=m.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:b,onNativeOptionRemove:y}=c;return De(()=>(b(g),()=>y(g)),[b,y,g]),p.jsxs(p.Fragment,{children:[p.jsx(Z.span,{id:l.textId,...s,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Vl.createPortal(s.children,i.valueNode):null]})});jS.displayName=Os;var _S="SelectItemIndicator",LS=m.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return IS(_S,n).isSelected?p.jsx(Z.span,{"aria-hidden":!0,...r,ref:e}):null});LS.displayName=_S;var cd="SelectScrollUpButton",FS=m.forwardRef((t,e)=>{const n=Ar(cd,t.__scopeSelect),r=Ap(cd,t.__scopeSelect),[o,s]=m.useState(!1),i=oe(e,r.onScrollButtonChange);return De(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(BS,{...t,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});FS.displayName=cd;var ud="SelectScrollDownButton",$S=m.forwardRef((t,e)=>{const n=Ar(ud,t.__scopeSelect),r=Ap(ud,t.__scopeSelect),[o,s]=m.useState(!1),i=oe(e,r.onScrollButtonChange);return De(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(BS,{...t,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});$S.displayName=ud;var BS=m.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=t,s=Ar("SelectScrollButton",n),i=m.useRef(null),a=gc(n),l=m.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return m.useEffect(()=>()=>l(),[l]),De(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(Z.div,{"aria-hidden":!0,...o,ref:e,style:{flexShrink:0,...o.style},onPointerDown:P(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:P(o.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:P(o.onPointerLeave,()=>{l()})})}),nz="SelectSeparator",zS=m.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return p.jsx(Z.div,{"aria-hidden":!0,...r,ref:e})});zS.displayName=nz;var dd="SelectArrow",rz=m.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,o=bc(n),s=Rr(dd,n),i=Ar(dd,n);return s.open&&i.position==="popper"?p.jsx(_i,{...o,...r,ref:e}):null});rz.displayName=dd;var oz="SelectBubbleInput",HS=m.forwardRef(({__scopeSelect:t,value:e,...n},r)=>{const o=m.useRef(null),s=oe(r,o),i=cs(e);return m.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==e&&u){const d=new Event("change",{bubbles:!0});u.call(a,e),a.dispatchEvent(d)}},[i,e]),p.jsx(Z.select,{...n,style:{...hS,...n.style},ref:s,defaultValue:e})});HS.displayName=oz;function VS(t){return t===""||t===void 0}function WS(t){const e=ke(t),n=m.useRef(""),r=m.useRef(0),o=m.useCallback(i=>{const a=n.current+i;e(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function US(t,e,n){const o=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let i=sz(t,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function sz(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var iz=bS,GS=vS,az=wS,lz=SS,cz=CS,KS=kS,uz=TS,dz=AS,YS=DS,qS=PS,fz=jS,pz=LS,XS=FS,JS=$S,ZS=zS;const Ds=iz,hz=dz,Is=az,jo=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(GS,{ref:r,className:M("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",t),...n,children:[e,p.jsx(lz,{asChild:!0,children:p.jsx(Bn,{className:"h-4 w-4 opacity-50"})})]}));jo.displayName=GS.displayName;const Op=m.forwardRef(({className:t,...e},n)=>p.jsx(XS,{ref:n,className:M("flex cursor-default items-center justify-center py-1",t),...e,children:p.jsx(Sa,{className:"h-4 w-4"})}));Op.displayName=XS.displayName;const Dp=m.forwardRef(({className:t,...e},n)=>p.jsx(JS,{ref:n,className:M("flex cursor-default items-center justify-center py-1",t),...e,children:p.jsx(Bn,{className:"h-4 w-4"})}));Dp.displayName=JS.displayName;const _o=m.forwardRef(({className:t,children:e,position:n="popper",...r},o)=>p.jsx(cz,{children:p.jsxs(KS,{ref:o,className:M("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",n==="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",t),position:n,...r,children:[p.jsx(Op,{}),p.jsx(uz,{className:M("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),p.jsx(Dp,{})]})}));_o.displayName=KS.displayName;const QS=m.forwardRef(({className:t,...e},n)=>p.jsx(YS,{ref:n,className:M("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));QS.displayName=YS.displayName;const $r=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(qS,{ref:r,className:M("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",t),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(pz,{children:p.jsx(kt,{className:"h-4 w-4"})})}),p.jsx(fz,{children:e})]}));$r.displayName=qS.displayName;const e1=m.forwardRef(({className:t,...e},n)=>p.jsx(ZS,{ref:n,className:M("-mx-1 my-1 h-px bg-muted",t),...e}));e1.displayName=ZS.displayName;const t1=m.forwardRef(({value:t,onChange:e,placeholder:n="Pick date and time",disabled:r=!1,className:o,showSeconds:s=!1,use24Hour:i=!1},a)=>{const[l,c]=m.useState(!1),[u,d]=m.useState(t);m.useEffect(()=>{d(t)},[t]);const f=i?Array.from({length:24},(S,C)=>C):Array.from({length:12},(S,C)=>C+1),h=Array.from({length:60},(S,C)=>C),g=Array.from({length:60},(S,C)=>C),b=S=>{if(S){const C=new Date(S);u&&(C.setHours(u.getHours()),C.setMinutes(u.getMinutes()),C.setSeconds(u.getSeconds())),d(C),e==null||e(C)}},y=(S,C)=>{const k=u?new Date(u):new Date;if(S==="hour"){let N=parseInt(C);if(!i){const E=k.getHours()>=12;E&&N!==12&&(N+=12),!E&&N===12&&(N=0)}k.setHours(N)}else if(S==="minute")k.setMinutes(parseInt(C));else if(S==="second")k.setSeconds(parseInt(C));else if(S==="ampm"){const N=k.getHours();C==="PM"&&N<12?k.setHours(N+12):C==="AM"&&N>=12&&k.setHours(N-12)}d(k),e==null||e(k)},v=()=>{if(!u)return"";const S=u.getHours();return i?S.toString():(S%12||12).toString()},x=()=>u&&u.getHours()>=12?"PM":"AM",w=s?i?"PPP HH:mm:ss":"PPP hh:mm:ss a":i?"PPP HH:mm":"PPP hh:mm a";return p.jsxs(Ui,{open:l,onOpenChange:c,children:[p.jsx(Gi,{asChild:!0,children:p.jsxs(Cn,{ref:a,variant:"outline",disabled:r,className:M("w-full justify-start text-left font-normal",!u&&"text-muted-foreground",o),children:[p.jsx(Kl,{className:"mr-2 h-4 w-4"}),u?bn(u,w):p.jsx("span",{children:n})]})}),p.jsxs(hs,{className:"w-auto p-0",align:"start",children:[p.jsx(Ai,{mode:"single",selected:u,onSelect:b,initialFocus:!0}),p.jsx("div",{className:"border-t p-3",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(mf,{className:"h-4 w-4 text-muted-foreground"}),p.jsxs(Ds,{value:v(),onValueChange:S=>y("hour",S),children:[p.jsx(jo,{className:"w-[70px]",children:p.jsx(Is,{placeholder:"HH"})}),p.jsx(_o,{children:f.map(S=>p.jsx($r,{value:S.toString(),children:S.toString().padStart(2,"0")},S))})]}),p.jsx("span",{className:"text-muted-foreground",children:":"}),p.jsxs(Ds,{value:(u==null?void 0:u.getMinutes().toString())??"",onValueChange:S=>y("minute",S),children:[p.jsx(jo,{className:"w-[70px]",children:p.jsx(Is,{placeholder:"MM"})}),p.jsx(_o,{children:h.map(S=>p.jsx($r,{value:S.toString(),children:S.toString().padStart(2,"0")},S))})]}),s&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-muted-foreground",children:":"}),p.jsxs(Ds,{value:(u==null?void 0:u.getSeconds().toString())??"",onValueChange:S=>y("second",S),children:[p.jsx(jo,{className:"w-[70px]",children:p.jsx(Is,{placeholder:"SS"})}),p.jsx(_o,{children:g.map(S=>p.jsx($r,{value:S.toString(),children:S.toString().padStart(2,"0")},S))})]})]}),!i&&p.jsxs(Ds,{value:x(),onValueChange:S=>y("ampm",S),children:[p.jsx(jo,{className:"w-[70px]",children:p.jsx(Is,{})}),p.jsxs(_o,{children:[p.jsx($r,{value:"AM",children:"AM"}),p.jsx($r,{value:"PM",children:"PM"})]})]})]})})]})]})});t1.displayName="DateTimePicker";const n1={USD:{code:"USD",symbol:"$",name:"US Dollar",decimals:2},EUR:{code:"EUR",symbol:"€",name:"Euro",decimals:2},GBP:{code:"GBP",symbol:"£",name:"British Pound",decimals:2},JPY:{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},CNY:{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},KRW:{code:"KRW",symbol:"₩",name:"South Korean Won",decimals:0},INR:{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},BRL:{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2},CAD:{code:"CAD",symbol:"CA$",name:"Canadian Dollar",decimals:2},AUD:{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},CHF:{code:"CHF",symbol:"Fr.",name:"Swiss Franc",decimals:2}};function eg(t,e,n,r){const o=t.toFixed(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,n),o.join(r)}function mz(t,e,n){if(!t)return;const r=t.replace(new RegExp(`\\${e}`,"g"),"").replace(n,"."),o=parseFloat(r);return isNaN(o)?void 0:o}const Ki=m.forwardRef(({className:t,value:e,onChange:n,decimals:r=2,min:o,max:s,prefix:i,suffix:a,currency:l,unit:c,unitPosition:u="suffix",thousandsSeparator:d=",",decimalSeparator:f=".",allowNegative:h=!1,disabled:g,...b},y)=>{const v=l?n1[l]:void 0,x=(v==null?void 0:v.decimals)??r,w=i??((v==null?void 0:v.symbol)&&v.symbol),S=a??(c&&u==="suffix"?c:void 0),C=c&&u==="prefix"?c:void 0,[k,N]=m.useState(""),[E,T]=m.useState(!1);m.useEffect(()=>{e!==void 0&&!E&&N(eg(e,x,d,f))},[e,x,d,f,E]);const O=z=>{let $=z.target.value;const Y=h?new RegExp(`[^0-9\\${f}-]`,"g"):new RegExp(`[^0-9\\${f}]`,"g");$=$.replace(Y,"");const F=$.split(f);if(F.length>2&&($=F[0]+f+F.slice(1).join("")),h){const _=$.startsWith("-");$=$.replace(/-/g,""),_&&($="-"+$)}F.length===2&&F[1].length>x&&($=F[0]+f+F[1].slice(0,x)),N($);const U=mz($,d,f);if(U!==void 0){let _=U;o!==void 0&&_<o&&(_=o),s!==void 0&&_>s&&(_=s),n==null||n(_)}else n==null||n(void 0)},A=()=>{T(!0),e!==void 0&&N(e.toString().replace(".",f))},D=()=>{T(!1),e!==void 0&&N(eg(e,x,d,f))};return p.jsxs("div",{className:"relative flex items-center",children:[(w||C)&&p.jsxs("span",{className:"absolute left-3 text-muted-foreground text-sm",children:[w,C]}),p.jsx("input",{type:"text",inputMode:"decimal",className:M("flex h-10 w-full rounded-md border border-input bg-background py-2 text-sm text-right ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",(w||C)&&"pl-10",S&&"pr-12",!w&&!C&&"px-3",!S&&"pr-3",t),ref:y,value:k,onChange:O,onFocus:A,onBlur:D,disabled:g,...b}),S&&p.jsx("span",{className:"absolute right-3 text-muted-foreground text-sm",children:S})]})});Ki.displayName="DecimalInput";const r1=m.forwardRef(({currency:t,...e},n)=>p.jsx(Ki,{ref:n,currency:t,...e}));r1.displayName="CurrencyInput";const o1=m.forwardRef(({min:t=0,max:e=100,decimals:n=1,...r},o)=>p.jsx(Ki,{ref:o,suffix:"%",min:t,max:e,decimals:n,...r}));o1.displayName="PercentageInput";const s1=m.forwardRef(({unit:t,unitPosition:e="suffix",...n},r)=>p.jsx(Ki,{ref:r,unit:t,unitPosition:e,...n}));s1.displayName="UnitInput";const gz=Xe("fixed z-50 bg-background shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{left:"inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0",right:"inset-y-0 right-0 h-full w-3/4 max-w-sm border-l data-[state=closed]:translate-x-full data-[state=open]:translate-x-0",top:"inset-x-0 top-0 h-auto max-h-[80vh] border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0",bottom:"inset-x-0 bottom-0 h-auto max-h-[80vh] border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0"}},defaultVariants:{side:"right"}}),i1=m.createContext(void 0);function Yi(){const t=m.useContext(i1);if(!t)throw new Error("Drawer components must be used within a Drawer");return t}function bz({children:t,open:e,defaultOpen:n=!1,onOpenChange:r}){const[o,s]=m.useState(n),i=e??o,a=r??s;return p.jsx(i1.Provider,{value:{open:i,onOpenChange:a},children:t})}const a1=m.forwardRef(({onClick:t,...e},n)=>{const{onOpenChange:r}=Yi();return p.jsx("button",{ref:n,onClick:o=>{r(!0),t==null||t(o)},...e})});a1.displayName="DrawerTrigger";const l1=m.forwardRef(({onClick:t,...e},n)=>{const{onOpenChange:r}=Yi();return p.jsx("button",{ref:n,onClick:o=>{r(!1),t==null||t(o)},...e})});l1.displayName="DrawerClose";const c1=({children:t})=>{const{open:e}=Yi();return e?p.jsx(p.Fragment,{children:t}):null},Ip=m.forwardRef(({className:t,onClick:e,...n},r)=>{const{open:o,onOpenChange:s}=Yi();return p.jsx("div",{ref:r,className:M("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",o?"opacity-100":"pointer-events-none opacity-0",t),onClick:i=>{i.target===i.currentTarget&&s(!1),e==null||e(i)},...n})});Ip.displayName="DrawerOverlay";const u1=m.forwardRef(({className:t,side:e,children:n,...r},o)=>{const{open:s,onOpenChange:i}=Yi();return m.useEffect(()=>{const a=l=>{l.key==="Escape"&&i(!1)};return s&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[s,i]),p.jsxs(c1,{children:[p.jsx(Ip,{}),p.jsx("div",{ref:o,"data-state":s?"open":"closed",className:M(gz({side:e}),t),...r,children:n})]})});u1.displayName="DrawerContent";const d1=({className:t,...e})=>p.jsx("div",{className:M("flex flex-col space-y-2 p-4",t),...e});d1.displayName="DrawerHeader";const f1=({className:t,...e})=>p.jsx("div",{className:M("mt-auto flex flex-col gap-2 p-4",t),...e});f1.displayName="DrawerFooter";const p1=m.forwardRef(({className:t,...e},n)=>p.jsx("h2",{ref:n,className:M("font-heading text-lg font-semibold text-foreground",t),...e}));p1.displayName="DrawerTitle";const h1=m.forwardRef(({className:t,...e},n)=>p.jsx("p",{ref:n,className:M("text-sm text-muted-foreground",t),...e}));h1.displayName="DrawerDescription";const m1=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("mx-auto mt-4 h-1.5 w-12 rounded-full bg-muted",t),...e}));m1.displayName="DrawerHandle";var yc="DropdownMenu",[yz]=Ie(yc,[zi]),ft=zi(),[vz,g1]=yz(yc),b1=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,l=ft(e),c=m.useRef(null),[u,d]=Oe({prop:o,defaultProp:s??!1,onChange:i,caller:yc});return p.jsx(vz,{scope:e,triggerId:Ee(),triggerRef:c,contentId:Ee(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(f=>!f),[d]),modal:a,children:p.jsx(cp,{...l,open:u,onOpenChange:d,dir:r,modal:a,children:n})})};b1.displayName=yc;var y1="DropdownMenuTrigger",v1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=t,s=g1(y1,n),i=ft(n);return p.jsx(up,{asChild:!0,...i,children:p.jsx(Z.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:rn(e,s.triggerRef),onPointerDown:P(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:P(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});v1.displayName=y1;var xz="DropdownMenuPortal",x1=t=>{const{__scopeDropdownMenu:e,...n}=t,r=ft(e);return p.jsx(dp,{...r,...n})};x1.displayName=xz;var w1="DropdownMenuContent",S1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=g1(w1,n),s=ft(n),i=m.useRef(!1);return p.jsx(fp,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:e,onCloseAutoFocus:P(t.onCloseAutoFocus,a=>{var l;i.current||(l=o.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:P(t.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(i.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});S1.displayName=w1;var wz="DropdownMenuGroup",C1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(pp,{...o,...r,ref:e})});C1.displayName=wz;var Sz="DropdownMenuLabel",k1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(hp,{...o,...r,ref:e})});k1.displayName=Sz;var Cz="DropdownMenuItem",N1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(mp,{...o,...r,ref:e})});N1.displayName=Cz;var kz="DropdownMenuCheckboxItem",E1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(gp,{...o,...r,ref:e})});E1.displayName=kz;var Nz="DropdownMenuRadioGroup",M1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(bp,{...o,...r,ref:e})});M1.displayName=Nz;var Ez="DropdownMenuRadioItem",T1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(yp,{...o,...r,ref:e})});T1.displayName=Ez;var Mz="DropdownMenuItemIndicator",R1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(vp,{...o,...r,ref:e})});R1.displayName=Mz;var Tz="DropdownMenuSeparator",A1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(xp,{...o,...r,ref:e})});A1.displayName=Tz;var Rz="DropdownMenuArrow",Az=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(wp,{...o,...r,ref:e})});Az.displayName=Rz;var Oz=t=>{const{__scopeDropdownMenu:e,children:n,open:r,onOpenChange:o,defaultOpen:s}=t,i=ft(e),[a,l]=Oe({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return p.jsx(Sp,{...i,open:a,onOpenChange:l,children:n})},Dz="DropdownMenuSubTrigger",O1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(Cp,{...o,...r,ref:e})});O1.displayName=Dz;var Iz="DropdownMenuSubContent",D1=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,o=ft(n);return p.jsx(kp,{...o,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});D1.displayName=Iz;var Pz=b1,jz=v1,I1=x1,P1=S1,_z=C1,j1=k1,_1=N1,L1=E1,Lz=M1,F1=T1,$1=R1,B1=A1,Fz=Oz,z1=O1,H1=D1;const $z=Pz,Bz=jz,zz=_z,Hz=I1,Vz=Fz,Wz=Lz,V1=m.forwardRef(({className:t,inset:e,children:n,...r},o)=>p.jsxs(z1,{ref:o,className:M("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e&&"pl-8",t),...r,children:[n,p.jsx(Nr,{className:"ml-auto"})]}));V1.displayName=z1.displayName;const W1=m.forwardRef(({className:t,...e},n)=>p.jsx(H1,{ref:n,className:M("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",t),...e}));W1.displayName=H1.displayName;const U1=m.forwardRef(({className:t,sideOffset:e=4,...n},r)=>p.jsx(I1,{children:p.jsx(P1,{ref:r,sideOffset:e,className:M("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",t),...n})}));U1.displayName=P1.displayName;const G1=m.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(_1,{ref:r,className:M("relative flex cursor-default select-none items-center gap-2 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e&&"pl-8",t),...n}));G1.displayName=_1.displayName;const K1=m.forwardRef(({className:t,children:e,checked:n,...r},o)=>p.jsxs(L1,{ref:o,className:M("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",t),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx($1,{children:p.jsx(kt,{className:"h-4 w-4"})})}),e]}));K1.displayName=L1.displayName;const Y1=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(F1,{ref:r,className:M("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",t),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx($1,{children:p.jsx(Yl,{className:"h-2 w-2 fill-current"})})}),e]}));Y1.displayName=F1.displayName;const q1=m.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(j1,{ref:r,className:M("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));q1.displayName=j1.displayName;const X1=m.forwardRef(({className:t,...e},n)=>p.jsx(B1,{ref:n,className:M("-mx-1 my-1 h-px bg-muted",t),...e}));X1.displayName=B1.displayName;const J1=({className:t,...e})=>p.jsx("span",{className:M("ml-auto text-xs tracking-widest opacity-60",t),...e});J1.displayName="DropdownMenuShortcut";const Uz=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Z1=m.forwardRef(({className:t,showValidation:e=!1,onValidationChange:n,onChange:r,...o},s)=>{const[i,a]=m.useState(null),[l,c]=m.useState(!1),u=h=>{const g=h.target.value;if(g){const b=Uz.test(g);a(b),n==null||n(b)}else a(null),n==null||n(!1);r==null||r(h)},d=h=>{var g;c(!0),(g=o.onBlur)==null||g.call(o,h)},f=e&&l&&i!==null;return p.jsxs("div",{className:"relative",children:[p.jsx(QO,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"email",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",f&&i&&"border-green-500 focus-visible:ring-green-500",f&&!i&&"border-destructive focus-visible:ring-destructive",t),ref:s,onChange:u,onBlur:d,...o}),f&&p.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:i?p.jsx(jO,{className:"h-4 w-4 text-green-500"}):p.jsx(PO,{className:"h-4 w-4 text-destructive"})})]})});Z1.displayName="EmailInput";const Q1=m.forwardRef(({className:t,...e},n)=>p.jsx("fieldset",{ref:n,className:M("space-y-4 rounded-lg border p-4",t),...e}));Q1.displayName="Fieldset";const eC=m.forwardRef(({className:t,...e},n)=>p.jsx("legend",{ref:n,className:M("px-2 text-sm font-medium leading-none",t),...e}));eC.displayName="FieldsetLegend";const tC=m.forwardRef(({className:t,...e},n)=>p.jsx("p",{ref:n,className:M("text-sm text-muted-foreground",t),...e}));tC.displayName="FieldsetDescription";function Gz(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function nC(t){const e=t.type.toLowerCase();return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":e.includes("pdf")||e.includes("document")||e.includes("text")||e.includes("spreadsheet")||e.includes("presentation")?"document":e.includes("zip")||e.includes("rar")||e.includes("tar")||e.includes("gzip")||e.includes("7z")?"archive":"other"}function Ea(t){if(t===0)return"0 B";const e=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(t)/Math.log(e));return`${parseFloat((t/Math.pow(e,r)).toFixed(1))} ${n[r]}`}const Kz=({type:t})=>{const e="h-8 w-8";switch(t){case"image":return p.jsx(qO,{className:M(e,"text-green-500")});case"document":return p.jsx(zO,{className:M(e,"text-blue-500")});case"video":return p.jsx(HO,{className:M(e,"text-purple-500")});case"audio":return p.jsx(nD,{className:M(e,"text-pink-500")});case"archive":return p.jsx(AO,{className:M(e,"text-yellow-500")});default:return p.jsx(gf,{className:M(e,"text-gray-500")})}},vc=m.forwardRef(({className:t,value:e=[],onChange:n,maxFiles:r=1,maxSize:o,accept:s,showPreview:i=!0,variant:a="default",dragActiveText:l="Drop files here",dragInactiveText:c="Drag & drop files here, or click to select",disabled:u,...d},f)=>{const[h,g]=m.useState([]),[b,y]=m.useState(!1),[v,x]=m.useState(null),w=m.useRef(null);m.useEffect(()=>{const A=e.map(D=>({file:D,type:nC(D),preview:D.type.startsWith("image/")?URL.createObjectURL(D):void 0}));return g(A),()=>{A.forEach(D=>{D.preview&&URL.revokeObjectURL(D.preview)})}},[e]);const S=A=>{if(!A)return;x(null);const D=Array.from(A),z=[];for(const Y of D){if(o&&Y.size>o){x(`File "${Y.name}" exceeds maximum size of ${Ea(o)}`);continue}z.push(Y)}const $=r===1?z.slice(0,1):[...e,...z].slice(0,r);n==null||n($)},C=A=>{S(A.target.files),w.current&&(w.current.value="")},k=A=>{A.preventDefault(),y(!0)},N=A=>{A.preventDefault(),y(!1)},E=A=>{A.preventDefault(),y(!1),u||S(A.dataTransfer.files)},T=A=>{const D=[...e];D.splice(A,1),n==null||n(D)},O=A=>{w.current=A,Gz(f,A)};return a==="dropzone"?p.jsxs("div",{className:M("space-y-3",t),children:[p.jsxs("div",{className:M("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 transition-colors",b&&"border-primary bg-primary/5",!b&&"border-muted-foreground/25 hover:border-primary/50",u&&"cursor-not-allowed opacity-50"),onDragOver:k,onDragLeave:N,onDrop:E,onClick:()=>{var A;return!u&&((A=w.current)==null?void 0:A.click())},children:[p.jsx("input",{type:"file",ref:O,className:"sr-only",accept:s,multiple:r>1,onChange:C,disabled:u,...d}),p.jsx(em,{className:M("h-10 w-10 mb-3",b?"text-primary":"text-muted-foreground")}),p.jsx("p",{className:"text-sm text-center",children:b?l:c}),o&&p.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Max file size: ",Ea(o)]}),r>1&&p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Max ",r," files"]})]}),v&&p.jsx("p",{className:"text-sm text-destructive",children:v}),i&&h.length>0&&p.jsx("div",{className:"space-y-2",children:h.map((A,D)=>p.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[A.preview?p.jsx("img",{src:A.preview,alt:A.file.name,className:"h-12 w-12 rounded object-cover"}):p.jsx(Kz,{type:A.type}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-sm font-medium truncate",children:A.file.name}),p.jsx("p",{className:"text-xs text-muted-foreground",children:Ea(A.file.size)})]}),p.jsx("button",{type:"button",className:"p-1 hover:bg-background rounded",onClick:z=>{z.stopPropagation(),T(D)},children:p.jsx(Nt,{className:"h-4 w-4"})})]},D))})]}):p.jsxs("div",{className:M("space-y-2",t),children:[p.jsxs("div",{className:"flex gap-2",children:[p.jsx("input",{type:"file",ref:O,className:"sr-only",accept:s,multiple:r>1,onChange:C,disabled:u,...d}),p.jsxs("button",{type:"button",className:M("flex h-10 items-center gap-2 rounded-md border border-input bg-background px-4 py-2 text-sm ring-offset-background hover:bg-accent",u&&"cursor-not-allowed opacity-50"),onClick:()=>{var A;return!u&&((A=w.current)==null?void 0:A.click())},disabled:u,children:[p.jsx(em,{className:"h-4 w-4"}),"Choose ",r>1?"files":"file"]}),h.length>0&&!i&&p.jsxs("span",{className:"flex items-center text-sm text-muted-foreground",children:[h.length," file",h.length>1?"s":""," selected"]})]}),v&&p.jsx("p",{className:"text-sm text-destructive",children:v}),i&&h.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2",children:h.map((A,D)=>p.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-full border bg-muted/50 text-sm",children:[A.preview?p.jsx("img",{src:A.preview,alt:A.file.name,className:"h-5 w-5 rounded object-cover"}):p.jsx(gf,{className:"h-4 w-4 text-muted-foreground"}),p.jsx("span",{className:"max-w-[150px] truncate",children:A.file.name}),p.jsx("button",{type:"button",className:"p-0.5 hover:bg-background rounded-full",onClick:()=>T(D),children:p.jsx(Nt,{className:"h-3 w-3"})})]},D))})]})});vc.displayName="FileInput";const rC=m.forwardRef(({acceptedFormats:t=["image/jpeg","image/png","image/gif","image/webp"],...e},n)=>p.jsx(vc,{ref:n,accept:t.join(","),...e}));rC.displayName="ImageInput";const oC=m.forwardRef(({acceptedFormats:t=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/plain"],...e},n)=>p.jsx(vc,{ref:n,accept:t.join(","),...e}));oC.displayName="DocumentInput";const sC=Xe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{required:{true:"after:ml-0.5 after:text-destructive after:content-['*']",false:""}},defaultVariants:{required:!1}}),iC=m.forwardRef(({className:t,required:e,optional:n,hint:r,children:o,...s},i)=>p.jsxs("div",{className:"flex items-baseline gap-2",children:[p.jsx("label",{ref:i,className:M(sC({required:e}),t),...s,children:o}),n&&p.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"}),r&&p.jsx("span",{className:"text-xs text-muted-foreground",children:r})]}));iC.displayName="FormLabel";const aC=m.forwardRef(({className:t,...e},n)=>p.jsx("p",{ref:n,className:M("text-sm text-muted-foreground",t),...e}));aC.displayName="FormDescription";const lC=m.forwardRef(({className:t,error:e=!0,...n},r)=>p.jsx("p",{ref:r,className:M("text-sm",e?"text-destructive":"text-muted-foreground",t),...n}));lC.displayName="FormMessage";var mu,xc="HoverCard",[cC]=Ie(xc,[En]),wc=En(),[Yz,Pp]=cC(xc),uC=t=>{const{__scopeHoverCard:e,children:n,open:r,defaultOpen:o,onOpenChange:s,openDelay:i=700,closeDelay:a=300}=t,l=wc(e),c=m.useRef(0),u=m.useRef(0),d=m.useRef(!1),f=m.useRef(!1),[h,g]=Oe({prop:r,defaultProp:o??!1,onChange:s,caller:xc}),b=m.useCallback(()=>{clearTimeout(u.current),c.current=window.setTimeout(()=>g(!0),i)},[i,g]),y=m.useCallback(()=>{clearTimeout(c.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>g(!1),a))},[a,g]),v=m.useCallback(()=>g(!1),[g]);return m.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(u.current)},[]),p.jsx(Yz,{scope:e,open:h,onOpenChange:g,onOpen:b,onClose:y,onDismiss:v,hasSelectionRef:d,isPointerDownOnContentRef:f,children:p.jsx(fs,{...l,children:n})})};uC.displayName=xc;var dC="HoverCardTrigger",fC=m.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,o=Pp(dC,n),s=wc(n);return p.jsx(ps,{asChild:!0,...s,children:p.jsx(Z.a,{"data-state":o.open?"open":"closed",...r,ref:e,onPointerEnter:P(t.onPointerEnter,Ka(o.onOpen)),onPointerLeave:P(t.onPointerLeave,Ka(o.onClose)),onFocus:P(t.onFocus,o.onOpen),onBlur:P(t.onBlur,o.onClose),onTouchStart:P(t.onTouchStart,i=>i.preventDefault())})})});fC.displayName=dC;var qz="HoverCardPortal",[pY,Xz]=cC(qz,{forceMount:void 0}),Ga="HoverCardContent",pC=m.forwardRef((t,e)=>{const n=Xz(Ga,t.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=t,s=Pp(Ga,t.__scopeHoverCard);return p.jsx(Pe,{present:r||s.open,children:p.jsx(Jz,{"data-state":s.open?"open":"closed",...o,onPointerEnter:P(t.onPointerEnter,Ka(s.onOpen)),onPointerLeave:P(t.onPointerLeave,Ka(s.onClose)),ref:e})})});pC.displayName=Ga;var Jz=m.forwardRef((t,e)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,...a}=t,l=Pp(Ga,n),c=wc(n),u=m.useRef(null),d=oe(e,u),[f,h]=m.useState(!1);return m.useEffect(()=>{if(f){const g=document.body;return mu=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=mu,g.style.webkitUserSelect=mu}}},[f]),m.useEffect(()=>{if(u.current){const g=()=>{h(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),m.useEffect(()=>{u.current&&e5(u.current).forEach(b=>b.setAttribute("tabindex","-1"))}),p.jsx(Er,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:P(s,g=>{g.preventDefault()}),onDismiss:l.onDismiss,children:p.jsx(ji,{...c,...a,onPointerDown:P(a.onPointerDown,g=>{g.currentTarget.contains(g.target)&&h(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:d,style:{...a.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Zz="HoverCardArrow",Qz=m.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,o=wc(n);return p.jsx(_i,{...o,...r,ref:e})});Qz.displayName=Zz;function Ka(t){return e=>e.pointerType==="touch"?void 0:t()}function e5(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)e.push(n.currentNode);return e}var t5=uC,n5=fC,hC=pC;const r5=t5,o5=n5,mC=m.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},o)=>p.jsx(hC,{ref:o,align:e,sideOffset:n,className:M("z-50 w-64 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",t),...r}));mC.displayName=hC.displayName;const gC=m.forwardRef(({className:t,type:e,...n},r)=>p.jsx("input",{type:e,className:M("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));gC.displayName="Input";const bC=m.forwardRef(({className:t,length:e=6,onChange:n,onComplete:r,mask:o=!1,autoFocus:s=!0,disabled:i,...a},l)=>{const[c,u]=m.useState(Array(e).fill("")),d=m.useRef([]),f=y=>{var v;y>=0&&y<e&&((v=d.current[y])==null||v.focus())},h=(y,v)=>{const x=v.slice(-1);if(x&&!/^\d$/.test(x))return;const w=[...c];w[y]=x,u(w);const S=w.join("");n==null||n(S),x&&y<e-1&&f(y+1),w.every(C=>C!=="")&&S.length===e&&(r==null||r(S))},g=(y,v)=>{if(v.key==="Backspace"){v.preventDefault();const x=[...c];c[y]?(x[y]="",u(x),n==null||n(x.join(""))):y>0&&(x[y-1]="",u(x),n==null||n(x.join("")),f(y-1))}else v.key==="ArrowLeft"?(v.preventDefault(),f(y-1)):v.key==="ArrowRight"&&(v.preventDefault(),f(y+1))},b=y=>{y.preventDefault();const x=y.clipboardData.getData("text/plain").slice(0,e).replace(/\D/g,"").split("");if(x.length===0)return;const w=[...c];x.forEach((C,k)=>{k<e&&(w[k]=C)}),u(w),n==null||n(w.join(""));const S=Math.min(x.length,e-1);f(S),w.every(C=>C!=="")&&w.join("").length===e&&(r==null||r(w.join("")))};return m.useEffect(()=>{s&&f(0)},[s]),p.jsx("div",{ref:l,className:M("flex items-center gap-2",t),...a,children:c.map((y,v)=>p.jsxs(m.Fragment,{children:[p.jsx("input",{ref:x=>{d.current[v]=x},type:o?"password":"text",inputMode:"numeric",autoComplete:"one-time-code",pattern:"\\d{1}",maxLength:1,value:y,onChange:x=>h(v,x.target.value),onKeyDown:x=>g(v,x),onPaste:b,onFocus:x=>x.target.select(),disabled:i,className:M("h-10 w-10 rounded-md border border-input bg-background text-center text-sm font-medium shadow-sm transition-all","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",y&&"border-primary")}),v===Math.floor(e/2)-1&&e>3&&p.jsx("div",{className:"flex items-center justify-center",children:p.jsx(fy,{className:"h-4 w-4 text-muted-foreground"})})]},v))})});bC.displayName="InputOTP";const yC=m.forwardRef(({className:t,index:e,char:n,hasFakeCaret:r,isActive:o,...s},i)=>p.jsxs("div",{className:M("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",o&&"z-10 ring-2 ring-ring ring-offset-background",t),children:[p.jsx("input",{ref:i,className:"absolute inset-0 h-full w-full bg-transparent text-center outline-none",...s}),n,r&&p.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:p.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]}));yC.displayName="InputOTPSlot";const vC=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("flex items-center",t),...e}));vC.displayName="InputOTPGroup";const xC=m.forwardRef(({...t},e)=>p.jsx("div",{ref:e,role:"separator",...t,children:p.jsx(fy,{className:"h-4 w-4 text-muted-foreground"})}));xC.displayName="InputOTPSeparator";const wC=Xe("inline-flex items-center justify-center rounded border font-mono text-sm font-medium",{variants:{variant:{default:"border-border bg-muted text-muted-foreground shadow-[0_2px_0_0] shadow-border",outline:"border-border bg-background text-foreground",ghost:"border-transparent bg-transparent text-muted-foreground"},size:{sm:"h-5 min-w-5 px-1 text-xs",default:"h-6 min-w-6 px-1.5",lg:"h-7 min-w-7 px-2 text-base"}},defaultVariants:{variant:"default",size:"default"}}),SC={cmd:"⌘",command:"⌘",ctrl:"⌃",control:"⌃",alt:"⌥",option:"⌥",opt:"⌥",shift:"⇧",meta:"⌘",super:"⌘",win:"⊞",windows:"⊞",enter:"↵",return:"↵",tab:"⇥",escape:"⎋",esc:"⎋",backspace:"⌫",delete:"⌦",del:"⌦",space:"␣",spacebar:"␣",up:"↑",down:"↓",left:"←",right:"→",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→",capslock:"⇪",caps:"⇪",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘",insert:"⎀"};function CC(t){const e=t.toLowerCase().trim();return SC[e]||t.toUpperCase()}const jp=m.forwardRef(({className:t,variant:e,size:n,keys:r,children:o,...s},i)=>{let a=o;return r&&(a=(Array.isArray(r)?r:r.split("+")).map((c,u)=>p.jsxs(m.Fragment,{children:[u>0&&p.jsx("span",{className:"mx-0.5 text-muted-foreground/50",children:"+"}),p.jsx("span",{children:CC(c)})]},u))),p.jsx("kbd",{ref:i,className:M(wC({variant:e,size:n}),t),...s,children:a})});jp.displayName="Kbd";const kC=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("inline-flex items-center gap-1",t),...e}));kC.displayName="KbdGroup";const s5={copy:["cmd","c"],paste:["cmd","v"],cut:["cmd","x"],undo:["cmd","z"],redo:["cmd","shift","z"],save:["cmd","s"],selectAll:["cmd","a"],find:["cmd","f"],new:["cmd","n"],open:["cmd","o"],close:["cmd","w"],refresh:["cmd","r"],print:["cmd","p"],bold:["cmd","b"],italic:["cmd","i"],underline:["cmd","u"]},NC=m.forwardRef(({shortcut:t,forceCtrl:e,variant:n,size:r,className:o,...s},i)=>{const a=s5[t],l=typeof navigator<"u"?navigator.platform.toLowerCase().includes("mac"):!0,c=a.map(u=>(u==="cmd"||u==="command"||u==="meta")&&!l||e&&(u==="cmd"||u==="command"||u==="meta")?"ctrl":u);return p.jsx(jp,{ref:i,keys:c,variant:n,size:r,className:o,...s})});NC.displayName="Shortcut";const EC=Xe("inline-flex items-center gap-1 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 underline-offset-4 hover:underline",muted:"text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",nav:"text-foreground/60 hover:text-foreground",destructive:"text-destructive underline-offset-4 hover:underline",unstyled:""},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),MC=m.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,external:o=!1,showExternalIcon:s=!0,children:i,...a},l)=>{const c=r?tc:"a",u=o?{target:"_blank",rel:"noopener noreferrer"}:{};return p.jsxs(c,{ref:l,className:M(EC({variant:e,size:n}),t),...u,...a,children:[i,o&&s&&p.jsx(FO,{className:"h-3 w-3 shrink-0"})]})});MC.displayName="Link";const Bs=Xe("relative overflow-hidden",{variants:{ratio:{auto:"",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]",wide:"aspect-[21/9]"},rounded:{none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{ratio:"auto",rounded:"md"}}),TC=m.forwardRef(({className:t,ratio:e,rounded:n,fallback:r,alt:o,...s},i)=>{const[a,l]=m.useState(!1),[c,u]=m.useState(!0);return a&&r?p.jsx("div",{className:M(Bs({ratio:e,rounded:n}),"flex items-center justify-center bg-muted",t),children:r}):p.jsxs("div",{className:M(Bs({ratio:e,rounded:n}),t),children:[c&&p.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted",children:p.jsx(ja,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),p.jsx("img",{ref:i,alt:o,className:M("h-full w-full object-cover",n&&Bs({rounded:n})),onError:()=>l(!0),onLoad:()=>u(!1),...s})]})});TC.displayName="Image";const RC=m.forwardRef(({className:t,ratio:e="video",rounded:n,showControls:r=!0,...o},s)=>{const i=m.useRef(null),[a,l]=m.useState(!1),[c,u]=m.useState(!1),[d,f]=m.useState(0);m.useImperativeHandle(s,()=>i.current);const h=()=>{i.current&&(a?i.current.pause():i.current.play(),l(!a))},g=()=>{i.current&&(i.current.muted=!c,u(!c))},b=()=>{if(i.current){const v=i.current.currentTime/i.current.duration*100;f(v)}},y=()=>{i.current&&(document.fullscreenElement?document.exitFullscreen():i.current.requestFullscreen())};return p.jsxs("div",{className:M(Bs({ratio:e,rounded:n}),"group",t),children:[p.jsx("video",{ref:i,className:"h-full w-full object-cover",onTimeUpdate:b,onPlay:()=>l(!0),onPause:()=>l(!1),...o}),r&&p.jsxs("div",{className:"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/60 to-transparent p-4 opacity-0 transition-opacity group-hover:opacity-100",children:[p.jsx("div",{className:"mb-2 h-1 w-full overflow-hidden rounded-full bg-white/30",children:p.jsx("div",{className:"h-full bg-white transition-all",style:{width:`${d}%`}})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{type:"button",onClick:h,className:"rounded-full p-1 text-white hover:bg-white/20",children:a?p.jsx(oD,{className:"h-5 w-5"}):p.jsx(iD,{className:"h-5 w-5"})}),p.jsx("button",{type:"button",onClick:g,className:"rounded-full p-1 text-white hover:bg-white/20",children:c?p.jsx(pD,{className:"h-5 w-5"}):p.jsx(fD,{className:"h-5 w-5"})}),p.jsx("div",{className:"flex-1"}),p.jsx("button",{type:"button",onClick:y,className:"rounded-full p-1 text-white hover:bg-white/20",children:p.jsx(eD,{className:"h-5 w-5"})})]})]})]})});RC.displayName="Video";var qi="Menubar",[fd,i5,a5]=kr(qi),[AC]=Ie(qi,[a5,Mn]),pt=zi(),OC=Mn(),[l5,_p]=AC(qi),DC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:s,loop:i=!0,dir:a,...l}=t,c=an(a),u=OC(n),[d,f]=Oe({prop:r,onChange:o,defaultProp:s??"",caller:qi}),[h,g]=m.useState(null);return p.jsx(l5,{scope:n,value:d,onMenuOpen:m.useCallback(b=>{f(b),g(b)},[f]),onMenuClose:m.useCallback(()=>f(""),[f]),onMenuToggle:m.useCallback(b=>{f(y=>y?"":b),g(b)},[f]),dir:c,loop:i,children:p.jsx(fd.Provider,{scope:n,children:p.jsx(fd.Slot,{scope:n,children:p.jsx(Fi,{asChild:!0,...u,orientation:"horizontal",loop:i,dir:c,currentTabStopId:h,onCurrentTabStopIdChange:g,children:p.jsx(Z.div,{role:"menubar",...l,ref:e})})})})})});DC.displayName=qi;var Lp="MenubarMenu",[c5,IC]=AC(Lp),PC=t=>{const{__scopeMenubar:e,value:n,...r}=t,o=Ee(),s=n||o||"LEGACY_REACT_AUTO_VALUE",i=_p(Lp,e),a=pt(e),l=m.useRef(null),c=m.useRef(!1),u=i.value===s;return m.useEffect(()=>{u||(c.current=!1)},[u]),p.jsx(c5,{scope:e,value:s,triggerId:Ee(),triggerRef:l,contentId:Ee(),wasKeyboardTriggerOpenRef:c,children:p.jsx(cp,{...a,open:u,onOpenChange:d=>{d||i.onMenuClose()},modal:!1,dir:i.dir,...r})})};PC.displayName=Lp;var pd="MenubarTrigger",jC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,disabled:r=!1,...o}=t,s=OC(n),i=pt(n),a=_p(pd,n),l=IC(pd,n),c=m.useRef(null),u=oe(e,c,l.triggerRef),[d,f]=m.useState(!1),h=a.value===l.value;return p.jsx(fd.ItemSlot,{scope:n,value:l.value,disabled:r,children:p.jsx($i,{asChild:!0,...s,focusable:!r,tabStopId:l.value,children:p.jsx(up,{asChild:!0,...i,children:p.jsx(Z.button,{type:"button",role:"menuitem",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":h,"aria-controls":h?l.contentId:void 0,"data-highlighted":d?"":void 0,"data-state":h?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:u,onPointerDown:P(t.onPointerDown,g=>{!r&&g.button===0&&g.ctrlKey===!1&&(a.onMenuOpen(l.value),h||g.preventDefault())}),onPointerEnter:P(t.onPointerEnter,()=>{var b;!!a.value&&!h&&(a.onMenuOpen(l.value),(b=c.current)==null||b.focus())}),onKeyDown:P(t.onKeyDown,g=>{r||(["Enter"," "].includes(g.key)&&a.onMenuToggle(l.value),g.key==="ArrowDown"&&a.onMenuOpen(l.value),["Enter"," ","ArrowDown"].includes(g.key)&&(l.wasKeyboardTriggerOpenRef.current=!0,g.preventDefault()))}),onFocus:P(t.onFocus,()=>f(!0)),onBlur:P(t.onBlur,()=>f(!1))})})})})});jC.displayName=pd;var u5="MenubarPortal",_C=t=>{const{__scopeMenubar:e,...n}=t,r=pt(e);return p.jsx(dp,{...r,...n})};_C.displayName=u5;var hd="MenubarContent",LC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,align:r="start",...o}=t,s=pt(n),i=_p(hd,n),a=IC(hd,n),l=i5(n),c=m.useRef(!1);return p.jsx(fp,{id:a.contentId,"aria-labelledby":a.triggerId,"data-radix-menubar-content":"",...s,...o,ref:e,align:r,onCloseAutoFocus:P(t.onCloseAutoFocus,u=>{var f;!!!i.value&&!c.current&&((f=a.triggerRef.current)==null||f.focus()),c.current=!1,u.preventDefault()}),onFocusOutside:P(t.onFocusOutside,u=>{const d=u.target;l().some(h=>{var g;return(g=h.ref.current)==null?void 0:g.contains(d)})&&u.preventDefault()}),onInteractOutside:P(t.onInteractOutside,()=>{c.current=!0}),onEntryFocus:u=>{a.wasKeyboardTriggerOpenRef.current||u.preventDefault()},onKeyDown:P(t.onKeyDown,u=>{if(["ArrowRight","ArrowLeft"].includes(u.key)){const d=u.target,f=d.hasAttribute("data-radix-menubar-subtrigger"),h=d.closest("[data-radix-menubar-content]")!==u.currentTarget,b=(i.dir==="rtl"?"ArrowRight":"ArrowLeft")===u.key;if(!b&&f||h&&b)return;let x=l().filter(C=>!C.disabled).map(C=>C.value);b&&x.reverse();const w=x.indexOf(a.value);x=i.loop?C5(x,w+1):x.slice(w+1);const[S]=x;S&&i.onMenuOpen(S)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});LC.displayName=hd;var d5="MenubarGroup",FC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(pp,{...o,...r,ref:e})});FC.displayName=d5;var f5="MenubarLabel",$C=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(hp,{...o,...r,ref:e})});$C.displayName=f5;var p5="MenubarItem",BC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(mp,{...o,...r,ref:e})});BC.displayName=p5;var h5="MenubarCheckboxItem",zC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(gp,{...o,...r,ref:e})});zC.displayName=h5;var m5="MenubarRadioGroup",HC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(bp,{...o,...r,ref:e})});HC.displayName=m5;var g5="MenubarRadioItem",VC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(yp,{...o,...r,ref:e})});VC.displayName=g5;var b5="MenubarItemIndicator",WC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(vp,{...o,...r,ref:e})});WC.displayName=b5;var y5="MenubarSeparator",UC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(xp,{...o,...r,ref:e})});UC.displayName=y5;var v5="MenubarArrow",x5=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(wp,{...o,...r,ref:e})});x5.displayName=v5;var GC="MenubarSub",KC=t=>{const{__scopeMenubar:e,children:n,open:r,onOpenChange:o,defaultOpen:s}=t,i=pt(e),[a,l]=Oe({prop:r,defaultProp:s??!1,onChange:o,caller:GC});return p.jsx(Sp,{...i,open:a,onOpenChange:l,children:n})};KC.displayName=GC;var w5="MenubarSubTrigger",YC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(Cp,{"data-radix-menubar-subtrigger":"",...o,...r,ref:e})});YC.displayName=w5;var S5="MenubarSubContent",qC=m.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,o=pt(n);return p.jsx(kp,{...o,"data-radix-menubar-content":"",...r,ref:e,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});qC.displayName=S5;function C5(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var XC=DC,k5=PC,JC=jC,ZC=_C,QC=LC,N5=FC,ek=$C,tk=BC,nk=zC,E5=HC,rk=VC,ok=WC,sk=UC,M5=KC,ik=YC,ak=qC;const T5=k5,R5=N5,A5=ZC,O5=M5,D5=E5,lk=m.forwardRef(({className:t,...e},n)=>p.jsx(XC,{ref:n,className:M("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",t),...e}));lk.displayName=XC.displayName;const ck=m.forwardRef(({className:t,...e},n)=>p.jsx(JC,{ref:n,className:M("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...e}));ck.displayName=JC.displayName;const uk=m.forwardRef(({className:t,inset:e,children:n,...r},o)=>p.jsxs(ik,{ref:o,className:M("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,p.jsx(Nr,{className:"ml-auto h-4 w-4"})]}));uk.displayName=ik.displayName;const dk=m.forwardRef(({className:t,...e},n)=>p.jsx(ak,{ref:n,className:M("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",t),...e}));dk.displayName=ak.displayName;const fk=m.forwardRef(({className:t,align:e="start",alignOffset:n=-4,sideOffset:r=8,...o},s)=>p.jsx(ZC,{children:p.jsx(QC,{ref:s,align:e,alignOffset:n,sideOffset:r,className:M("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",t),...o})}));fk.displayName=QC.displayName;const pk=m.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(tk,{ref:r,className:M("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));pk.displayName=tk.displayName;const hk=m.forwardRef(({className:t,children:e,checked:n,...r},o)=>p.jsxs(nk,{ref:o,className:M("relative flex 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",t),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(ok,{children:p.jsx(kt,{className:"h-4 w-4"})})}),e]}));hk.displayName=nk.displayName;const mk=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(rk,{ref:r,className:M("relative flex 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",t),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(ok,{children:p.jsx(Yl,{className:"h-2 w-2 fill-current"})})}),e]}));mk.displayName=rk.displayName;const gk=m.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(ek,{ref:r,className:M("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));gk.displayName=ek.displayName;const bk=m.forwardRef(({className:t,...e},n)=>p.jsx(sk,{ref:n,className:M("-mx-1 my-1 h-px bg-muted",t),...e}));bk.displayName=sk.displayName;const yk=({className:t,...e})=>p.jsx("span",{className:M("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});yk.displayName="MenubarShortcut";const vk=m.forwardRef(({options:t,value:e=[],onChange:n,placeholder:r="Select items...",searchPlaceholder:o="Search...",emptyMessage:s="No items found.",disabled:i=!1,className:a,maxDisplayedItems:l=3},c)=>{const[u,d]=m.useState(!1),f=v=>{const x=e.includes(v)?e.filter(w=>w!==v):[...e,v];n==null||n(x)},h=(v,x)=>{x.stopPropagation(),n==null||n(e.filter(w=>w!==v))},g=t.filter(v=>e.includes(v.value)),b=g.slice(0,l),y=g.length-l;return p.jsxs(Ui,{open:u,onOpenChange:d,children:[p.jsx(Gi,{asChild:!0,children:p.jsxs("button",{ref:c,type:"button",role:"combobox","aria-expanded":u,disabled:i,className:M("flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),children:[p.jsx("div",{className:"flex flex-1 flex-wrap gap-1",children:g.length===0?p.jsx("span",{className:"text-muted-foreground",children:r}):p.jsxs(p.Fragment,{children:[b.map(v=>p.jsxs(Xu,{variant:"secondary",className:"gap-1 pr-1",children:[v.label,p.jsx("button",{type:"button",className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",onMouseDown:x=>x.preventDefault(),onClick:x=>h(v.value,x),children:p.jsx(Nt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},v.value)),y>0&&p.jsxs(Xu,{variant:"secondary",children:["+",y," more"]})]})}),p.jsx(Bn,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),p.jsx(hs,{className:"w-full min-w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:p.jsxs(lc,{children:[p.jsx(Hf,{placeholder:o}),p.jsxs(Vf,{children:[p.jsx(Wf,{children:s}),p.jsx(Uf,{children:t.map(v=>p.jsxs(Gf,{value:v.value,disabled:v.disabled,onSelect:()=>f(v.value),children:[p.jsx("div",{className:M("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",e.includes(v.value)?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:p.jsx(kt,{className:"h-4 w-4"})}),v.label]},v.value))})]})]})})]})});vk.displayName="MultiSelect";const xk=Ql,wk=wf,I5=as,Sk=ec,Fp=m.forwardRef(({className:t,...e},n)=>p.jsx(ss,{className:M("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",t),...e,ref:n}));Fp.displayName=ss.displayName;const P5=Xe("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),$p=m.forwardRef(({side:t="right",className:e,children:n,...r},o)=>p.jsxs(Sk,{children:[p.jsx(Fp,{}),p.jsxs(is,{ref:o,className:M(P5({side:t}),e),...r,children:[p.jsxs(as,{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-secondary",children:[p.jsx(Nt,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));$p.displayName=is.displayName;const Ck=({className:t,...e})=>p.jsx("div",{className:M("flex flex-col space-y-2 text-center sm:text-left",t),...e});Ck.displayName="SheetHeader";const kk=({className:t,...e})=>p.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});kk.displayName="SheetFooter";const Nk=m.forwardRef(({className:t,...e},n)=>p.jsx(ki,{ref:n,className:M("font-heading text-lg font-semibold text-foreground",t),...e}));Nk.displayName=ki.displayName;const Ek=m.forwardRef(({className:t,...e},n)=>p.jsx(Ni,{ref:n,className:M("text-sm text-muted-foreground",t),...e}));Ek.displayName=Ni.displayName;const Mk=m.createContext({collapsed:!1,setCollapsed:()=>{},isMobile:!1}),gs=()=>{const t=m.useContext(Mk);if(!t)throw new Error("useNavigationDrawer must be used within a NavigationDrawerProvider");return t},j5=({children:t,defaultCollapsed:e=!1})=>{const[n,r]=m.useState(e),[o,s]=m.useState(!1);return m.useEffect(()=>{const i=()=>s(window.innerWidth<768);return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),p.jsx(Mk.Provider,{value:{collapsed:n,setCollapsed:r,isMobile:o},children:t})},Tk=m.forwardRef(({className:t,children:e,...n},r)=>{const{collapsed:o,isMobile:s}=gs();return s?p.jsxs(xk,{children:[p.jsx(wk,{asChild:!0,children:p.jsx(Cn,{variant:"ghost",size:"icon",className:"md:hidden",children:p.jsx(tD,{className:"h-5 w-5"})})}),p.jsx($p,{side:"left",className:"w-64 p-0",children:p.jsx("div",{className:"flex h-full flex-col",children:e})})]}):p.jsx("aside",{ref:r,"data-collapsed":o,className:M("flex h-screen flex-col border-r bg-background transition-all duration-300",o?"w-16":"w-64",t),...n,children:e})});Tk.displayName="NavigationDrawer";const Rk=m.forwardRef(({className:t,children:e,...n},r)=>{const{collapsed:o}=gs();return p.jsx("div",{ref:r,className:M("flex h-14 items-center border-b px-4",o&&"justify-center px-2",t),...n,children:e})});Rk.displayName="NavigationDrawerHeader";const Ak=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("flex-1 overflow-y-auto p-2",t),...e}));Ak.displayName="NavigationDrawerContent";const Ok=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("border-t p-2",t),...e}));Ok.displayName="NavigationDrawerFooter";const Dk=m.forwardRef(({className:t,...e},n)=>{const{collapsed:r,setCollapsed:o,isMobile:s}=gs();return s?null:p.jsx(Cn,{ref:n,variant:"ghost",size:"icon",className:M("h-8 w-8",t),onClick:()=>o(!r),...e,children:r?p.jsx(Nr,{className:"h-4 w-4"}):p.jsx(hf,{className:"h-4 w-4"})})});Dk.displayName="NavigationDrawerToggle";const _5=Xe("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{active:{true:"bg-accent text-accent-foreground",false:"text-muted-foreground"}},defaultVariants:{active:!1}}),Ik=m.forwardRef(({className:t,icon:e,active:n,asChild:r,children:o,...s},i)=>{const{collapsed:a}=gs(),l=r?tc:"a";return p.jsxs(l,{ref:i,className:M(_5({active:n}),a&&"justify-center px-2",t),...s,children:[e&&p.jsx("span",{className:"shrink-0",children:e}),!a&&p.jsx("span",{className:"truncate",children:o})]})});Ik.displayName="NavigationDrawerItem";const Pk=m.forwardRef(({className:t,label:e,children:n,...r},o)=>{const{collapsed:s}=gs();return p.jsxs("div",{ref:o,className:M("py-2",t),...r,children:[e&&!s&&p.jsx("h4",{className:"mb-1 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:e}),p.jsx("div",{className:"space-y-1",children:n})]})});Pk.displayName="NavigationDrawerGroup";var fo="NavigationMenu",[Bp,jk,L5]=kr(fo),[md,F5,$5]=kr(fo),[zp]=Ie(fo,[L5,$5]),[B5,Gt]=zp(fo),[z5,H5]=zp(fo),_k=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:s,delayDuration:i=200,skipDelayDuration:a=300,orientation:l="horizontal",dir:c,...u}=t,[d,f]=m.useState(null),h=oe(e,T=>f(T)),g=an(c),b=m.useRef(0),y=m.useRef(0),v=m.useRef(0),[x,w]=m.useState(!0),[S,C]=Oe({prop:r,onChange:T=>{const O=T!=="",A=a>0;O?(window.clearTimeout(v.current),A&&w(!1)):(window.clearTimeout(v.current),v.current=window.setTimeout(()=>w(!0),a)),o==null||o(T)},defaultProp:s??"",caller:fo}),k=m.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>C(""),150)},[C]),N=m.useCallback(T=>{window.clearTimeout(y.current),C(T)},[C]),E=m.useCallback(T=>{S===T?window.clearTimeout(y.current):b.current=window.setTimeout(()=>{window.clearTimeout(y.current),C(T)},i)},[S,C,i]);return m.useEffect(()=>()=>{window.clearTimeout(b.current),window.clearTimeout(y.current),window.clearTimeout(v.current)},[]),p.jsx(Lk,{scope:n,isRootMenu:!0,value:S,dir:g,orientation:l,rootNavigationMenu:d,onTriggerEnter:T=>{window.clearTimeout(b.current),x?E(T):N(T)},onTriggerLeave:()=>{window.clearTimeout(b.current),k()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:k,onItemSelect:T=>{C(O=>O===T?"":T)},onItemDismiss:()=>C(""),children:p.jsx(Z.nav,{"aria-label":"Main","data-orientation":l,dir:g,...u,ref:h})})});_k.displayName=fo;var gd="NavigationMenuSub",V5=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",...a}=t,l=Gt(gd,n),[c,u]=Oe({prop:r,onChange:o,defaultProp:s??"",caller:gd});return p.jsx(Lk,{scope:n,isRootMenu:!1,value:c,dir:l.dir,orientation:i,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:d=>u(d),onItemSelect:d=>u(d),onItemDismiss:()=>u(""),children:p.jsx(Z.div,{"data-orientation":i,...a,ref:e})})});V5.displayName=gd;var Lk=t=>{const{scope:e,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:s,children:i,value:a,onItemSelect:l,onItemDismiss:c,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:h}=t,[g,b]=m.useState(null),[y,v]=m.useState(new Map),[x,w]=m.useState(null);return p.jsx(B5,{scope:e,isRootMenu:n,rootNavigationMenu:r,value:a,previousValue:cs(a),baseId:Ee(),dir:o,orientation:s,viewport:g,onViewportChange:b,indicatorTrack:x,onIndicatorTrackChange:w,onTriggerEnter:ke(u),onTriggerLeave:ke(d),onContentEnter:ke(f),onContentLeave:ke(h),onItemSelect:ke(l),onItemDismiss:ke(c),onViewportContentChange:m.useCallback((S,C)=>{v(k=>(k.set(S,C),new Map(k)))},[]),onViewportContentRemove:m.useCallback(S=>{v(C=>C.has(S)?(C.delete(S),new Map(C)):C)},[]),children:p.jsx(Bp.Provider,{scope:e,children:p.jsx(z5,{scope:e,items:y,children:i})})})},Fk="NavigationMenuList",$k=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,o=Gt(Fk,n),s=p.jsx(Z.ul,{"data-orientation":o.orientation,...r,ref:e});return p.jsx(Z.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:p.jsx(Bp.Slot,{scope:n,children:o.isRootMenu?p.jsx(qk,{asChild:!0,children:s}):s})})});$k.displayName=Fk;var Bk="NavigationMenuItem",[W5,zk]=zp(Bk),Hk=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,...o}=t,s=Ee(),i=r||s||"LEGACY_REACT_AUTO_VALUE",a=m.useRef(null),l=m.useRef(null),c=m.useRef(null),u=m.useRef(()=>{}),d=m.useRef(!1),f=m.useCallback((g="start")=>{if(a.current){u.current();const b=yd(a.current);b.length&&Wp(g==="start"?b:b.reverse())}},[]),h=m.useCallback(()=>{if(a.current){const g=yd(a.current);g.length&&(u.current=J5(g))}},[]);return p.jsx(W5,{scope:n,value:i,triggerRef:l,contentRef:a,focusProxyRef:c,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:h,onContentFocusOutside:h,children:p.jsx(Z.li,{...o,ref:e})})});Hk.displayName=Bk;var bd="NavigationMenuTrigger",Vk=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=t,s=Gt(bd,t.__scopeNavigationMenu),i=zk(bd,t.__scopeNavigationMenu),a=m.useRef(null),l=oe(a,i.triggerRef,e),c=Jk(s.baseId,i.value),u=Zk(s.baseId,i.value),d=m.useRef(!1),f=m.useRef(!1),h=i.value===s.value;return p.jsxs(p.Fragment,{children:[p.jsx(Bp.ItemSlot,{scope:n,value:i.value,children:p.jsx(Xk,{asChild:!0,children:p.jsx(Z.button,{id:c,disabled:r,"data-disabled":r?"":void 0,"data-state":Up(h),"aria-expanded":h,"aria-controls":u,...o,ref:l,onPointerEnter:P(t.onPointerEnter,()=>{f.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:P(t.onPointerMove,Ya(()=>{r||f.current||i.wasEscapeCloseRef.current||d.current||(s.onTriggerEnter(i.value),d.current=!0)})),onPointerLeave:P(t.onPointerLeave,Ya(()=>{r||(s.onTriggerLeave(),d.current=!1)})),onClick:P(t.onClick,()=>{s.onItemSelect(i.value),f.current=h}),onKeyDown:P(t.onKeyDown,g=>{const y={horizontal:"ArrowDown",vertical:s.dir==="rtl"?"ArrowLeft":"ArrowRight"}[s.orientation];h&&g.key===y&&(i.onEntryKeyDown(),g.preventDefault())})})})}),h&&p.jsxs(p.Fragment,{children:[p.jsx(gS,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:g=>{const b=i.contentRef.current,y=g.relatedTarget,v=y===a.current,x=b==null?void 0:b.contains(y);(v||!x)&&i.onFocusProxyEnter(v?"start":"end")}}),s.viewport&&p.jsx("span",{"aria-owns":u})]})]})});Vk.displayName=bd;var U5="NavigationMenuLink",tg="navigationMenu.linkSelect",Wk=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...s}=t;return p.jsx(Xk,{asChild:!0,children:p.jsx(Z.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...s,ref:e,onClick:P(t.onClick,i=>{const a=i.target,l=new CustomEvent(tg,{bubbles:!0,cancelable:!0});if(a.addEventListener(tg,c=>o==null?void 0:o(c),{once:!0}),Ia(a,l),!l.defaultPrevented&&!i.metaKey){const c=new CustomEvent(Ma,{bubbles:!0,cancelable:!0});Ia(a,c)}},{checkForDefaultPrevented:!1})})})});Wk.displayName=U5;var Hp="NavigationMenuIndicator",Uk=m.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Gt(Hp,t.__scopeNavigationMenu),s=!!o.value;return o.indicatorTrack?vi.createPortal(p.jsx(Pe,{present:n||s,children:p.jsx(G5,{...r,ref:e})}),o.indicatorTrack):null});Uk.displayName=Hp;var G5=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,o=Gt(Hp,n),s=jk(n),[i,a]=m.useState(null),[l,c]=m.useState(null),u=o.orientation==="horizontal",d=!!o.value;m.useEffect(()=>{var b;const g=(b=s().find(y=>y.value===o.value))==null?void 0:b.ref.current;g&&a(g)},[s,o.value]);const f=()=>{i&&c({size:u?i.offsetWidth:i.offsetHeight,offset:u?i.offsetLeft:i.offsetTop})};return vd(i,f),vd(o.indicatorTrack,f),l?p.jsx(Z.div,{"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":o.orientation,...r,ref:e,style:{position:"absolute",...u?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...r.style}}):null}),Ko="NavigationMenuContent",Gk=m.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Gt(Ko,t.__scopeNavigationMenu),s=zk(Ko,t.__scopeNavigationMenu),i=oe(s.contentRef,e),a=s.value===o.value,l={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...r};return o.viewport?p.jsx(K5,{forceMount:n,...l,ref:i}):p.jsx(Pe,{present:n||a,children:p.jsx(Kk,{"data-state":Up(a),...l,ref:i,onPointerEnter:P(t.onPointerEnter,o.onContentEnter),onPointerLeave:P(t.onPointerLeave,Ya(o.onContentLeave)),style:{pointerEvents:!a&&o.isRootMenu?"none":void 0,...l.style}})})});Gk.displayName=Ko;var K5=m.forwardRef((t,e)=>{const n=Gt(Ko,t.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return De(()=>{r(t.value,{ref:e,...t})},[t,e,r]),De(()=>()=>o(t.value),[t.value,o]),null}),Ma="navigationMenu.rootContentDismiss",Kk=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:s,wasEscapeCloseRef:i,onRootContentClose:a,onContentFocusOutside:l,...c}=t,u=Gt(Ko,n),d=m.useRef(null),f=oe(d,e),h=Jk(u.baseId,r),g=Zk(u.baseId,r),b=jk(n),y=m.useRef(null),{onItemDismiss:v}=u;m.useEffect(()=>{const w=d.current;if(u.isRootMenu&&w){const S=()=>{var C;v(),a(),w.contains(document.activeElement)&&((C=o.current)==null||C.focus())};return w.addEventListener(Ma,S),()=>w.removeEventListener(Ma,S)}},[u.isRootMenu,t.value,o,v,a]);const x=m.useMemo(()=>{const S=b().map(O=>O.value);u.dir==="rtl"&&S.reverse();const C=S.indexOf(u.value),k=S.indexOf(u.previousValue),N=r===u.value,E=k===S.indexOf(r);if(!N&&!E)return y.current;const T=(()=>{if(C!==k){if(N&&k!==-1)return C>k?"from-end":"from-start";if(E&&C!==-1)return C>k?"to-start":"to-end"}return null})();return y.current=T,T},[u.previousValue,u.value,u.dir,b,r]);return p.jsx(qk,{asChild:!0,children:p.jsx(Er,{id:g,"aria-labelledby":h,"data-motion":x,"data-orientation":u.orientation,...c,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{var S;const w=new Event(Ma,{bubbles:!0,cancelable:!0});(S=d.current)==null||S.dispatchEvent(w)},onFocusOutside:P(t.onFocusOutside,w=>{var C;l();const S=w.target;(C=u.rootNavigationMenu)!=null&&C.contains(S)&&w.preventDefault()}),onPointerDownOutside:P(t.onPointerDownOutside,w=>{var N;const S=w.target,C=b().some(E=>{var T;return(T=E.ref.current)==null?void 0:T.contains(S)}),k=u.isRootMenu&&((N=u.viewport)==null?void 0:N.contains(S));(C||k||!u.isRootMenu)&&w.preventDefault()}),onKeyDown:P(t.onKeyDown,w=>{var k;const S=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!S){const N=yd(w.currentTarget),E=document.activeElement,T=N.findIndex(D=>D===E),A=w.shiftKey?N.slice(0,T).reverse():N.slice(T+1,N.length);Wp(A)?w.preventDefault():(k=s.current)==null||k.focus()}}),onEscapeKeyDown:P(t.onEscapeKeyDown,w=>{i.current=!0})})})}),Vp="NavigationMenuViewport",Yk=m.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=!!Gt(Vp,t.__scopeNavigationMenu).value;return p.jsx(Pe,{present:n||s,children:p.jsx(Y5,{...r,ref:e})})});Yk.displayName=Vp;var Y5=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,children:r,...o}=t,s=Gt(Vp,n),i=oe(e,s.onViewportChange),a=H5(Ko,t.__scopeNavigationMenu),[l,c]=m.useState(null),[u,d]=m.useState(null),f=l?(l==null?void 0:l.width)+"px":void 0,h=l?(l==null?void 0:l.height)+"px":void 0,g=!!s.value,b=g?s.value:s.previousValue;return vd(u,()=>{u&&c({width:u.offsetWidth,height:u.offsetHeight})}),p.jsx(Z.div,{"data-state":Up(g),"data-orientation":s.orientation,...o,ref:i,style:{pointerEvents:!g&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":h,...o.style},onPointerEnter:P(t.onPointerEnter,s.onContentEnter),onPointerLeave:P(t.onPointerLeave,Ya(s.onContentLeave)),children:Array.from(a.items).map(([v,{ref:x,forceMount:w,...S}])=>{const C=b===v;return p.jsx(Pe,{present:w||C,children:p.jsx(Kk,{...S,ref:rn(x,k=>{C&&k&&d(k)})})},v)})})}),q5="FocusGroup",qk=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,o=Gt(q5,n);return p.jsx(md.Provider,{scope:n,children:p.jsx(md.Slot,{scope:n,children:p.jsx(Z.div,{dir:o.dir,...r,ref:e})})})}),ng=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],X5="FocusGroupItem",Xk=m.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,o=F5(n),s=Gt(X5,n);return p.jsx(md.ItemSlot,{scope:n,children:p.jsx(Z.button,{...r,ref:e,onKeyDown:P(t.onKeyDown,i=>{if(["Home","End",...ng].includes(i.key)){let l=o().map(d=>d.ref.current);if([s.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),ng.includes(i.key)){const d=l.indexOf(i.currentTarget);l=l.slice(d+1)}setTimeout(()=>Wp(l)),i.preventDefault()}})})})});function yd(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Wp(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}function J5(t){return t.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{t.forEach(e=>{const n=e.dataset.tabindex;e.setAttribute("tabindex",n)})}}function vd(t,e){const n=ke(e);De(()=>{let r=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(t),()=>{window.cancelAnimationFrame(r),o.unobserve(t)}}},[t,n])}function Up(t){return t?"open":"closed"}function Jk(t,e){return`${t}-trigger-${e}`}function Zk(t,e){return`${t}-content-${e}`}function Ya(t){return e=>e.pointerType==="mouse"?t(e):void 0}var Qk=_k,eN=$k,Z5=Hk,tN=Vk,Q5=Wk,nN=Uk,rN=Gk,oN=Yk;const sN=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(Qk,{ref:r,className:M("relative z-10 flex max-w-max flex-1 items-center justify-center",t),...n,children:[e,p.jsx(Gp,{})]}));sN.displayName=Qk.displayName;const iN=m.forwardRef(({className:t,...e},n)=>p.jsx(eN,{ref:n,className:M("group flex flex-1 list-none items-center justify-center space-x-1",t),...e}));iN.displayName=eN.displayName;const e3=Z5,aN=Xe("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"),lN=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(tN,{ref:r,className:M(aN(),"group",t),...n,children:[e," ",p.jsx(Bn,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));lN.displayName=tN.displayName;const cN=m.forwardRef(({className:t,...e},n)=>p.jsx(rN,{ref:n,className:M("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 ",t),...e}));cN.displayName=rN.displayName;const t3=Q5,Gp=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{className:M("absolute left-0 top-full flex justify-center"),children:p.jsx(oN,{className:M("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 md:w-[var(--radix-navigation-menu-viewport-width)]",t),ref:n,...e})}));Gp.displayName=oN.displayName;const uN=m.forwardRef(({className:t,...e},n)=>p.jsx(nN,{ref:n,className:M("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",t),...e,children:p.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));uN.displayName=nN.displayName;const dN=m.forwardRef(({className:t,value:e,onChange:n,min:r,max:o,step:s=1,showControls:i=!0,allowNegative:a=!0,clampOnBlur:l=!0,disabled:c,...u},d)=>{const[f,h]=m.useState(e!==void 0?e.toString():"");m.useEffect(()=>{e!==void 0&&h(e.toString())},[e]);const g=N=>{let E=N;return r!==void 0&&E<r&&(E=r),o!==void 0&&E>o&&(E=o),E},b=N=>{if(N===""||N==="-")return;const E=parseFloat(N);return isNaN(E)?void 0:E},y=N=>{let E=N.target.value;if(a||(E=E.replace(/-/g,"")),!/^-?\d*\.?\d*$/.test(E))return;h(E);const T=b(E);n==null||n(T)},v=()=>{const N=b(f);if(N!==void 0&&l){const E=g(N);h(E.toString()),n==null||n(E)}},x=()=>{const N=b(f)??0,E=g(N+s);h(E.toString()),n==null||n(E)},w=()=>{const N=b(f)??0,E=g(N-s);h(E.toString()),n==null||n(E)},S=N=>{N.key==="ArrowUp"?(N.preventDefault(),x()):N.key==="ArrowDown"&&(N.preventDefault(),w())},C=()=>{const N=b(f)??0;return r===void 0||N>r},k=()=>{const N=b(f)??0;return o===void 0||N<o};return i?p.jsxs("div",{className:"flex",children:[p.jsx("button",{type:"button",className:M("flex h-10 w-10 items-center justify-center rounded-l-md border border-r-0 border-input bg-background hover:bg-accent",(!C()||c)&&"opacity-50 cursor-not-allowed hover:bg-background"),onClick:w,disabled:!C()||c,tabIndex:-1,children:p.jsx(my,{className:"h-4 w-4"})}),p.jsx("input",{type:"text",inputMode:"decimal",className:M("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:d,value:f,onChange:y,onBlur:v,onKeyDown:S,disabled:c,...u}),p.jsx("button",{type:"button",className:M("flex h-10 w-10 items-center justify-center rounded-r-md border border-l-0 border-input bg-background hover:bg-accent",(!k()||c)&&"opacity-50 cursor-not-allowed hover:bg-background"),onClick:x,disabled:!k()||c,tabIndex:-1,children:p.jsx(aD,{className:"h-4 w-4"})})]}):p.jsx("input",{type:"text",inputMode:"decimal",className:M("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:d,value:f,onChange:y,onBlur:v,onKeyDown:S,disabled:c,...u})});dN.displayName="NumberInput";const fN=({className:t,...e})=>p.jsx("nav",{role:"navigation","aria-label":"pagination",className:M("mx-auto flex w-full justify-center",t),...e});fN.displayName="Pagination";const pN=m.forwardRef(({className:t,...e},n)=>p.jsx("ul",{ref:n,className:M("flex flex-row items-center gap-1",t),...e}));pN.displayName="PaginationContent";const hN=m.forwardRef(({className:t,...e},n)=>p.jsx("li",{ref:n,className:M("",t),...e}));hN.displayName="PaginationItem";const Sc=({className:t,isActive:e,size:n="icon",...r})=>p.jsx("a",{"aria-current":e?"page":void 0,className:M(fr({variant:e?"outline":"ghost",size:n}),t),...r});Sc.displayName="PaginationLink";const mN=({className:t,...e})=>p.jsxs(Sc,{"aria-label":"Go to previous page",size:"default",className:M("gap-1 pl-2.5",t),...e,children:[p.jsx(hf,{className:"h-4 w-4"}),p.jsx("span",{children:"Previous"})]});mN.displayName="PaginationPrevious";const gN=({className:t,...e})=>p.jsxs(Sc,{"aria-label":"Go to next page",size:"default",className:M("gap-1 pr-2.5",t),...e,children:[p.jsx("span",{children:"Next"}),p.jsx(Nr,{className:"h-4 w-4"})]});gN.displayName="PaginationNext";const bN=({className:t,...e})=>p.jsxs("span",{"aria-hidden":!0,className:M("flex h-9 w-9 items-center justify-center",t),...e,children:[p.jsx(py,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"More pages"})]});bN.displayName="PaginationEllipsis";function n3(t,e={}){const{minLength:n=8,requireUppercase:r=!0,requireLowercase:o=!0,requireNumbers:s=!0,requireSpecialChars:i=!0}=e,a={length:t.length>=n,uppercase:!r||/[A-Z]/.test(t),lowercase:!o||/[a-z]/.test(t),numbers:!s||/[0-9]/.test(t),specialChars:!i||/[!@#$%^&*(),.?":{}|<>]/.test(t)},l=Object.values(a).filter(Boolean).length,c=Object.keys(a).length;return{score:l/c,checks:a}}const yN=m.forwardRef(({className:t,showStrengthIndicator:e=!1,strengthRequirements:n={},onStrengthChange:r,onChange:o,...s},i)=>{const[a,l]=m.useState(!1),[c,u]=m.useState(null),{minLength:d=8,requireUppercase:f=!0,requireLowercase:h=!0,requireNumbers:g=!0,requireSpecialChars:b=!0}=n,y=w=>{const S=w.target.value;if(e&&S){const C=n3(S,n);u(C),C.score<.4?r==null||r("weak"):C.score<.8?r==null||r("medium"):r==null||r("strong")}else u(null);o==null||o(w)},v=()=>c?c.score<.4?"bg-red-500":c.score<.8?"bg-yellow-500":"bg-green-500":"bg-muted",x=()=>c?c.score<.4?"Weak":c.score<.8?"Medium":"Strong":"";return p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"relative",children:[p.jsx(hy,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:a?"text":"password",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:i,onChange:y,...s}),p.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>l(!a),tabIndex:-1,children:a?p.jsx($O,{className:"h-4 w-4"}):p.jsx(BO,{className:"h-4 w-4"})})]}),e&&c&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:p.jsx("div",{className:M("h-full transition-all duration-300",v()),style:{width:`${c.score*100}%`}})}),p.jsx("span",{className:"text-xs text-muted-foreground min-w-[50px]",children:x()})]}),p.jsxs("ul",{className:"grid grid-cols-2 gap-1 text-xs",children:[p.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.length?p.jsx(kt,{className:"h-3 w-3 text-green-500"}):p.jsx(Nt,{className:"h-3 w-3 text-muted-foreground"}),p.jsxs("span",{className:c.checks.length?"text-green-600":"text-muted-foreground",children:[d,"+ characters"]})]}),f&&p.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.uppercase?p.jsx(kt,{className:"h-3 w-3 text-green-500"}):p.jsx(Nt,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:c.checks.uppercase?"text-green-600":"text-muted-foreground",children:"Uppercase letter"})]}),h&&p.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.lowercase?p.jsx(kt,{className:"h-3 w-3 text-green-500"}):p.jsx(Nt,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:c.checks.lowercase?"text-green-600":"text-muted-foreground",children:"Lowercase letter"})]}),g&&p.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.numbers?p.jsx(kt,{className:"h-3 w-3 text-green-500"}):p.jsx(Nt,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:c.checks.numbers?"text-green-600":"text-muted-foreground",children:"Number"})]}),b&&p.jsxs("li",{className:"flex items-center gap-1",children:[c.checks.specialChars?p.jsx(kt,{className:"h-3 w-3 text-green-500"}):p.jsx(Nt,{className:"h-3 w-3 text-muted-foreground"}),p.jsx("span",{className:c.checks.specialChars?"text-green-600":"text-muted-foreground",children:"Special character"})]})]})]})]})});yN.displayName="PasswordInput";function r3(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const vN=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"🇵🇹"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"🇳🇱"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"🇧🇪"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"🇨🇭"},{code:"AT",name:"Austria",dialCode:"+43",flag:"🇦🇹"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"🇸🇪"},{code:"NO",name:"Norway",dialCode:"+47",flag:"🇳🇴"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"🇩🇰"},{code:"FI",name:"Finland",dialCode:"+358",flag:"🇫🇮"},{code:"IE",name:"Ireland",dialCode:"+353",flag:"🇮🇪"},{code:"PL",name:"Poland",dialCode:"+48",flag:"🇵🇱"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"🇨🇿"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"🇭🇰"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"🇹🇼"},{code:"MY",name:"Malaysia",dialCode:"+60",flag:"🇲🇾"},{code:"TH",name:"Thailand",dialCode:"+66",flag:"🇹🇭"},{code:"ID",name:"Indonesia",dialCode:"+62",flag:"🇮🇩"},{code:"PH",name:"Philippines",dialCode:"+63",flag:"🇵🇭"},{code:"VN",name:"Vietnam",dialCode:"+84",flag:"🇻🇳"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"AR",name:"Argentina",dialCode:"+54",flag:"🇦🇷"},{code:"CL",name:"Chile",dialCode:"+56",flag:"🇨🇱"},{code:"CO",name:"Colombia",dialCode:"+57",flag:"🇨🇴"},{code:"PE",name:"Peru",dialCode:"+51",flag:"🇵🇪"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"🇿🇦"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"🇪🇬"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"🇳🇬"},{code:"KE",name:"Kenya",dialCode:"+254",flag:"🇰🇪"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"🇦🇪"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"🇸🇦"},{code:"IL",name:"Israel",dialCode:"+972",flag:"🇮🇱"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"🇹🇷"},{code:"RU",name:"Russia",dialCode:"+7",flag:"🇷🇺"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"🇺🇦"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"🇳🇿"}],xN=m.forwardRef(({className:t,countries:e=vN,defaultCountry:n="US",value:r,onChange:o,onCountryChange:s,...i},a)=>{const[l,c]=m.useState(!1),[u,d]=m.useState(e.find(C=>C.code===n)||e[0]),[f,h]=m.useState(r||""),[g,b]=m.useState(""),y=m.useRef(null),v=m.useRef(null);m.useEffect(()=>{r!==void 0&&h(r)},[r]),m.useEffect(()=>{const C=k=>{y.current&&!y.current.contains(k.target)&&(c(!1),b(""))};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]);const x=e.filter(C=>C.name.toLowerCase().includes(g.toLowerCase())||C.dialCode.includes(g)||C.code.toLowerCase().includes(g.toLowerCase())),w=C=>{var k;d(C),c(!1),b(""),s==null||s(C),o==null||o(f,C),(k=v.current)==null||k.focus()},S=C=>{const k=C.target.value.replace(/[^\d\s\-()]/g,"");h(k),o==null||o(k,u)};return p.jsxs("div",{className:"relative",ref:y,children:[p.jsxs("div",{className:"flex",children:[p.jsxs("button",{type:"button",className:M("flex items-center gap-1 h-10 px-3 rounded-l-md border border-r-0 border-input bg-background text-sm hover:bg-accent",l&&"ring-2 ring-ring ring-offset-2"),onClick:()=>c(!l),children:[p.jsx("span",{className:"text-base",children:u.flag}),p.jsx("span",{className:"text-muted-foreground",children:u.dialCode}),p.jsx(Bn,{className:"h-3 w-3 text-muted-foreground"})]}),p.jsxs("div",{className:"relative flex-1",children:[p.jsx(sD,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"tel",ref:C=>{v.current=C,r3(a,C)},className:M("flex h-10 w-full rounded-r-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),value:f,onChange:S,...i})]})]}),l&&p.jsxs("div",{className:"absolute z-50 mt-1 w-full min-w-[280px] rounded-md border bg-popover p-1 shadow-md",children:[p.jsx("input",{type:"text",className:"w-full px-3 py-2 text-sm border-b bg-transparent outline-none placeholder:text-muted-foreground",placeholder:"Search countries...",value:g,onChange:C=>b(C.target.value),autoFocus:!0}),p.jsx("div",{className:"max-h-[200px] overflow-y-auto mt-1",children:x.length===0?p.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground",children:"No countries found"}):x.map(C=>p.jsxs("button",{type:"button",className:M("flex w-full items-center gap-2 rounded-sm px-3 py-2 text-sm hover:bg-accent",u.code===C.code&&"bg-accent"),onClick:()=>w(C),children:[p.jsx("span",{className:"text-base",children:C.flag}),p.jsx("span",{className:"flex-1 text-left",children:C.name}),p.jsx("span",{className:"text-muted-foreground",children:C.dialCode}),u.code===C.code&&p.jsx(kt,{className:"h-4 w-4"})]},C.code))})]})]})});xN.displayName="PhoneInput";const wN=Xe("inline-flex items-center gap-1 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",success:"border-transparent bg-green-500 text-white hover:bg-green-500/80",warning:"border-transparent bg-yellow-500 text-white hover:bg-yellow-500/80",info:"border-transparent bg-blue-500 text-white hover:bg-blue-500/80"},size:{default:"h-6 text-xs",sm:"h-5 text-[10px]",lg:"h-7 text-sm"}},defaultVariants:{variant:"default",size:"default"}}),SN=m.forwardRef(({className:t,variant:e,size:n,onDismiss:r,dismissLabel:o="Remove",children:s,...i},a)=>p.jsxs("div",{ref:a,className:M(wN({variant:e,size:n}),t),...i,children:[p.jsx("span",{className:"truncate",children:s}),r&&p.jsx("button",{type:"button",onClick:r,className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-ring","aria-label":o,children:p.jsx(Nt,{className:M("shrink-0",n==="sm"?"h-2.5 w-2.5":"h-3 w-3")})})]}));SN.displayName="Pill";var Kp="Progress",Yp=100,[o3]=Iv(Kp),[s3,i3]=o3(Kp),CN=m.forwardRef((t,e)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=a3,...i}=t;(o||o===0)&&!rg(o)&&console.error(l3(`${o}`,"Progress"));const a=rg(o)?o:Yp;r!==null&&!og(r,a)&&console.error(c3(`${r}`,"Progress"));const l=og(r,a)?r:null,c=qa(l)?s(l,a):void 0;return p.jsx(s3,{scope:n,value:l,max:a,children:p.jsx(vt.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":qa(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":EN(l,a),"data-value":l??void 0,"data-max":a,...i,ref:e})})});CN.displayName=Kp;var kN="ProgressIndicator",NN=m.forwardRef((t,e)=>{const{__scopeProgress:n,...r}=t,o=i3(kN,n);return p.jsx(vt.div,{"data-state":EN(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:e})});NN.displayName=kN;function a3(t,e){return`${Math.round(t/e*100)}%`}function EN(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function qa(t){return typeof t=="number"}function rg(t){return qa(t)&&!isNaN(t)&&t>0}function og(t,e){return qa(t)&&!isNaN(t)&&t<=e&&t>=0}function l3(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Yp}\`.`}function c3(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
382
|
+
- a positive number
|
|
383
|
+
- less than the value passed to \`max\` (or ${Yp} if no \`max\` prop is set)
|
|
384
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
385
|
+
|
|
386
|
+
Defaulting to \`null\`.`}var MN=CN,u3=NN;const TN=m.forwardRef(({className:t,value:e,...n},r)=>p.jsx(MN,{ref:r,className:M("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:p.jsx(u3,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));TN.displayName=MN.displayName;var qp="Radio",[d3,RN]=Ie(qp),[f3,p3]=d3(qp),AN=m.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:l,form:c,...u}=t,[d,f]=m.useState(null),h=oe(e,y=>f(y)),g=m.useRef(!1),b=d?c||!!d.closest("form"):!0;return p.jsxs(f3,{scope:n,checked:o,disabled:i,children:[p.jsx(Z.button,{type:"button",role:"radio","aria-checked":o,"data-state":PN(o),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:h,onClick:P(t.onClick,y=>{o||l==null||l(),b&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),b&&p.jsx(IN,{control:d,bubbles:!g.current,name:r,value:a,checked:o,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});AN.displayName=qp;var ON="RadioIndicator",DN=m.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...o}=t,s=p3(ON,n);return p.jsx(Pe,{present:r||s.checked,children:p.jsx(Z.span,{"data-state":PN(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:e})})});DN.displayName=ON;var h3="RadioBubbleInput",IN=m.forwardRef(({__scopeRadio:t,control:e,checked:n,bubbles:r=!0,...o},s)=>{const i=m.useRef(null),a=oe(i,s),l=cs(n),c=Di(e);return m.useEffect(()=>{const u=i.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&h){const g=new Event("click",{bubbles:r});h.call(u,n),u.dispatchEvent(g)}},[l,n,r]),p.jsx(Z.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});IN.displayName=h3;function PN(t){return t?"checked":"unchecked"}var m3=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Cc="RadioGroup",[g3]=Ie(Cc,[Mn,RN]),jN=Mn(),_N=RN(),[b3,y3]=g3(Cc),LN=m.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...f}=t,h=jN(n),g=an(c),[b,y]=Oe({prop:s,defaultProp:o??null,onChange:d,caller:Cc});return p.jsx(b3,{scope:n,name:r,required:i,disabled:a,value:b,onValueChange:y,children:p.jsx(Fi,{asChild:!0,...h,orientation:l,dir:g,loop:u,children:p.jsx(Z.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g,...f,ref:e})})})});LN.displayName=Cc;var FN="RadioGroupItem",$N=m.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...o}=t,s=y3(FN,n),i=s.disabled||r,a=jN(n),l=_N(n),c=m.useRef(null),u=oe(e,c),d=s.value===o.value,f=m.useRef(!1);return m.useEffect(()=>{const h=b=>{m3.includes(b.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",g)}},[]),p.jsx($i,{asChild:!0,...a,focusable:!i,active:d,children:p.jsx(AN,{disabled:i,required:s.required,checked:d,...l,...o,name:s.name,ref:u,onCheck:()=>s.onValueChange(o.value),onKeyDown:P(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:P(o.onFocus,()=>{var h;f.current&&((h=c.current)==null||h.click())})})})});$N.displayName=FN;var v3="RadioGroupIndicator",BN=m.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,o=_N(n);return p.jsx(DN,{...o,...r,ref:e})});BN.displayName=v3;var zN=LN,HN=$N,x3=BN;const VN=m.forwardRef(({className:t,...e},n)=>p.jsx(zN,{className:M("grid gap-2",t),...e,ref:n}));VN.displayName=zN.displayName;const WN=m.forwardRef(({className:t,...e},n)=>p.jsx(HN,{ref:n,className:M("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:p.jsx(x3,{className:"flex items-center justify-center",children:p.jsx(Yl,{className:"h-2.5 w-2.5 fill-current text-current"})})}));WN.displayName=HN.displayName;const UN=m.forwardRef(({className:t,value:e=0,max:n=5,onChange:r,readonly:o=!1,size:s="default",showValue:i=!1,precision:a=1,...l},c)=>{const[u,d]=m.useState(null),f={sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"},h=(v,x)=>{if(o)return;const w=v.currentTarget.getBoundingClientRect(),C=(v.clientX-w.left)/w.width;d(a===.5?x+(C<.5?.5:1):x+1)},g=v=>{o||!r||r(u??v+1)},b=u??e,y=v=>{const x=b>=v+1,w=b>=v+.5&&b<v+1;return p.jsxs("button",{type:"button",disabled:o,className:M("relative p-0.5 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:cursor-default",!o&&"cursor-pointer hover:scale-110"),onMouseMove:S=>h(S,v),onMouseLeave:()=>d(null),onClick:()=>g(v),"aria-label":`Rate ${v+1} out of ${n}`,children:[p.jsx(Qh,{className:M(f[s],"text-muted-foreground/30")}),p.jsx(Qh,{className:M(f[s],"absolute inset-0.5 text-yellow-400 fill-yellow-400 transition-all",x||w?"opacity-100":"opacity-0"),style:w?{clipPath:"polygon(0 0, 50% 0, 50% 100%, 0 100%)"}:void 0})]},v)};return p.jsxs("div",{ref:c,className:M("flex items-center gap-0.5",t),role:"radiogroup","aria-label":"Rating",...l,children:[Array.from({length:n},(v,x)=>y(x)),i&&p.jsxs("span",{className:"ml-2 text-sm text-muted-foreground",children:[b.toFixed(a===.5?1:0)," / ",n]})]})});UN.displayName="Rating";const Xp=m.createContext({direction:"horizontal",registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>50,startResize:()=>{},isResizing:!1}),GN=m.forwardRef(({className:t,direction:e="horizontal",autoSaveId:n,onLayout:r,children:o,...s},i)=>{const[a,l]=m.useState(new Map),[c,u]=m.useState(!1),d=m.useRef(null),f=m.useRef(-1),h=m.useRef([]),g=m.useMemo(()=>{const w=[];return m.Children.forEach(o,S=>{m.isValidElement(S)&&S.type===Jp&&w.push(S.props.id||`panel-${w.length}`)}),w},[o]),b=m.useCallback((w,S=10,C=100,k=50)=>{l(N=>{const E=new Map(N);return E.has(w)||E.set(w,{minSize:S,maxSize:C,size:k}),E})},[]),y=m.useCallback(w=>{l(S=>{const C=new Map(S);return C.delete(w),C})},[]),v=m.useCallback(w=>{var S;return((S=a.get(w))==null?void 0:S.size)??50},[a]),x=m.useCallback(w=>{u(!0),f.current=w,h.current=g.map(S=>v(S))},[g,v]);return m.useEffect(()=>{if(!c)return;const w=C=>{if(!d.current||f.current<0)return;const k=d.current.getBoundingClientRect(),N=e==="horizontal"?k.width:k.height,T=(e==="horizontal"?C.clientX-k.left:C.clientY-k.top)/N*100,O=f.current,A=g[O],D=g[O+1],z=a.get(A),$=a.get(D);if(!z||!$)return;let Y=0;for(let j=0;j<O;j++)Y+=v(g[j]);const F=z.size+$.size;let U=T-Y;U=Math.max(z.minSize,Math.min(z.maxSize,U));let _=F-U;_=Math.max($.minSize,Math.min($.maxSize,_)),U=F-_,l(j=>{const L=new Map(j);return L.set(A,{...z,size:U}),L.set(D,{...$,size:_}),L})},S=()=>{u(!1),f.current=-1,r==null||r(g.map(C=>v(C)))};return document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S)}},[c,e,a,g,v,r]),m.useEffect(()=>{if(!n)return;const w=localStorage.getItem(`resizable-${n}`);if(w)try{const S=JSON.parse(w);l(C=>{const k=new Map(C);for(const[N,E]of Object.entries(S)){const T=k.get(N);T&&k.set(N,{...T,size:E})}return k})}catch{}},[n]),m.useEffect(()=>{if(!n||c)return;const w={};a.forEach((S,C)=>{w[C]=S.size}),localStorage.setItem(`resizable-${n}`,JSON.stringify(w))},[n,a,c]),p.jsx(Xp.Provider,{value:{direction:e,registerPanel:b,unregisterPanel:y,getPanelSize:v,startResize:x,isResizing:c},children:p.jsx("div",{ref:w=>{d.current=w,typeof i=="function"?i(w):i&&(i.current=w)},className:M("flex h-full w-full",e==="vertical"&&"flex-col",t),...s,children:o})})});GN.displayName="ResizablePanelGroup";const Jp=m.forwardRef(({className:t,id:e,defaultSize:n=50,minSize:r=10,maxSize:o=100,children:s,...i},a)=>{const l=m.useId(),c=e||l,{direction:u,registerPanel:d,unregisterPanel:f,getPanelSize:h}=m.useContext(Xp);m.useEffect(()=>(d(c,r,o,n),()=>f(c)),[c,r,o,n,d,f]);const g=h(c);return p.jsx("div",{ref:a,className:M("overflow-hidden",t),style:{[u==="horizontal"?"width":"height"]:`${g}%`,flexShrink:0},...i,children:s})});Jp.displayName="ResizablePanel";const KN=m.forwardRef(({className:t,withHandle:e=!1,...n},r)=>{const{direction:o,startResize:s,isResizing:i}=m.useContext(Xp),a=m.useRef(-1);m.useEffect(()=>{const c=r==null?void 0:r.current;if(!c)return;const u=c.parentElement;if(!u)return;const d=Array.from(u.querySelectorAll("[data-resizable-handle]"));a.current=d.indexOf(c)},[r]);const l=c=>{c.preventDefault(),a.current>=0&&s(a.current)};return p.jsx("div",{ref:r,"data-resizable-handle":!0,className:M("relative flex items-center justify-center bg-border",o==="horizontal"?"w-px cursor-col-resize":"h-px cursor-row-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",i&&"bg-primary",t),onMouseDown:l,...n,children:e&&p.jsx("div",{className:M("z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",o==="vertical"&&"h-3 w-4 rotate-90"),children:p.jsx(UO,{className:"h-2.5 w-2.5"})})})});KN.displayName="ResizableHandle";function rt(t){this.content=t}rt.prototype={constructor:rt,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),s=r.content.slice();return o==-1?s.push(n||t,e):(s[o+1]=e,n&&(s[o]=n)),new rt(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new rt(n)},addToStart:function(t,e){return new rt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new rt(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),s=r.find(t);return o.splice(s==-1?o.length:s,0,e,n),new rt(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=rt.from(t),t.size?new rt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=rt.from(t),t.size?new rt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=rt.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};rt.from=function(t){if(t instanceof rt)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new rt(e)};function YN(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),s=e.child(r);if(o==s){n+=o.nodeSize;continue}if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let i=0;o.text[i]==s.text[i];i++)n++;return n}if(o.content.size||s.content.size){let i=YN(o.content,s.content,n+1);if(i!=null)return i}n+=o.nodeSize}}function qN(t,e,n,r){for(let o=t.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:n,b:r};let i=t.child(--o),a=e.child(--s),l=i.nodeSize;if(i==a){n-=l,r-=l;continue}if(!i.sameMarkup(a))return{a:n,b:r};if(i.isText&&i.text!=a.text){let c=0,u=Math.min(i.text.length,a.text.length);for(;c<u&&i.text[i.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(i.content.size||a.content.size){let c=qN(i.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class W{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,s){for(let i=0,a=0;a<n;i++){let l=this.content[i],c=a+l.nodeSize;if(c>e&&r(l,o+a,s||null,i)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,o+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let s="",i=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(i?i=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new W(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let s=0,i=0;i<n;s++){let a=this.content[s],l=i+a.nodeSize;l>e&&((i<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-i),Math.min(a.text.length,n-i)):a=a.cut(Math.max(0,e-i-1),Math.min(a.content.size,n-i-1))),r.push(a),o+=a.nodeSize),i=l}return new W(r,o)}cutByIndex(e,n){return e==n?W.empty:e==0&&n==this.content.length?this:new W(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new W(o,s)}addToStart(e){return new W([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new W(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return YN(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return qN(this,e,n,r)}findIndex(e){if(e==0)return la(0,e);if(e==this.size)return la(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),s=r+o.nodeSize;if(s>=e)return s==e?la(n+1,s):la(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return W.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new W(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return W.empty;let n,r=0;for(let o=0;o<e.length;o++){let s=e[o];r+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(n||(n=e.slice(0,o)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new W(n||e,r)}static from(e){if(!e)return W.empty;if(e instanceof W)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new W([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}W.empty=new W([],0);const gu={index:0,offset:0};function la(t,e){return gu.index=t,gu.offset=e,gu}function Xa(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Xa(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Xa(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Ne=class xd{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Xa(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return xd.none;if(e instanceof xd)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};Ne.none=[];class Ja extends Error{}class Q{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=JN(this.content,e+this.openStart,n);return r&&new Q(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Q(XN(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Q.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Q(W.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)o++;return new Q(e,r,o)}}Q.empty=new Q(W.empty,0,0);function XN(t,e,n){let{index:r,offset:o}=t.findIndex(e),s=t.maybeChild(r),{index:i,offset:a}=t.findIndex(n);if(o==e||s.isText){if(a!=n&&!t.child(i).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(XN(s.content,e-o-1,n-o-1)))}function JN(t,e,n,r){let{index:o,offset:s}=t.findIndex(e),i=t.maybeChild(o);if(s==e||i.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=JN(i.content,e-s-1,n,i);return a&&t.replaceChild(o,i.copy(a))}function w3(t,e,n){if(n.openStart>t.depth)throw new Ja("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ja("Inconsistent open depths");return ZN(t,e,n,0)}function ZN(t,e,n,r){let o=t.index(r),s=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let i=ZN(t,e,n,r+1);return s.copy(s.content.replaceChild(o,i))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let i=t.parent,a=i.content;return Kr(i,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:i,end:a}=S3(n,t);return Kr(s,eE(t,i,a,e,r))}else return Kr(s,Za(t,e,r))}function QN(t,e){if(!e.type.compatibleContent(t.type))throw new Ja("Cannot join "+e.type.name+" onto "+t.type.name)}function wd(t,e,n){let r=t.node(n);return QN(r,e.node(n)),r}function Gr(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zs(t,e,n,r){let o=(e||t).node(n),s=0,i=e?e.index(n):o.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(Gr(t.nodeAfter,r),s++));for(let a=s;a<i;a++)Gr(o.child(a),r);e&&e.depth==n&&e.textOffset&&Gr(e.nodeBefore,r)}function Kr(t,e){return t.type.checkContent(e),t.copy(e)}function eE(t,e,n,r,o){let s=t.depth>o&&wd(t,e,o+1),i=r.depth>o&&wd(n,r,o+1),a=[];return zs(null,t,o,a),s&&i&&e.index(o)==n.index(o)?(QN(s,i),Gr(Kr(s,eE(t,e,n,r,o+1)),a)):(s&&Gr(Kr(s,Za(t,e,o+1)),a),zs(e,n,o,a),i&&Gr(Kr(i,Za(n,r,o+1)),a)),zs(r,null,o,a),new W(a)}function Za(t,e,n){let r=[];if(zs(null,t,n,r),t.depth>n){let o=wd(t,e,n+1);Gr(Kr(o,Za(t,e,n+1)),r)}return zs(e,null,n,r),new W(r)}function S3(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)o=e.node(s).copy(W.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class ai{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)o+=r.child(s).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Ne.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let a=r;r=o,o=a}let s=r.marks;for(var i=0;i<s.length;i++)s[i].type.spec.inclusive===!1&&(!o||!s[i].isInSet(o.marks))&&(s=s[i--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!o||!r[s].isInSet(o.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Qa(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,s=n;for(let i=e;;){let{index:a,offset:l}=i.content.findIndex(s),c=s-l;if(r.push(i,a,o+l),!c||(i=i.child(a),i.isText))break;s=c-1,o+=l+1}return new ai(n,r,s)}static resolveCached(e,n){let r=sg.get(e);if(r)for(let s=0;s<r.elts.length;s++){let i=r.elts[s];if(i.pos==n)return i}else sg.set(e,r=new C3);let o=r.elts[r.i]=ai.resolve(e,n);return r.i=(r.i+1)%k3,o}}class C3{constructor(){this.elts=[],this.i=0}}const k3=12,sg=new WeakMap;class Qa{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const N3=Object.create(null);let hr=class Sd{constructor(e,n,r,o=Ne.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||W.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Xa(this.attrs,n||e.defaultAttrs||N3)&&Ne.sameSet(this.marks,r||Ne.none)}copy(e=null){return e==this.content?this:new Sd(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Sd(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Q.empty;let o=this.resolve(e),s=this.resolve(n),i=r?0:o.sharedDepth(n),a=o.start(i),c=o.node(i).content.cut(o.pos-a,s.pos-a);return new Q(c,o.depth-i,s.depth-i)}replace(e,n,r){return w3(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return ai.resolveCached(this,e)}resolveNoCache(e){return ai.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),tE(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=W.empty,o=0,s=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,o,s),a=i&&i.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let s=this.contentMatchAt(e).matchType(r),i=s&&s.matchFragment(this.content,n);return i?i.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Ne.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Ne.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=W.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,o,r);return s.type.checkAttrs(s.attrs),s}};hr.prototype.text=void 0;class el extends hr{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):tE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new el(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new el(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function tE(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class oo{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new E3(e,n);if(r.next==null)return oo.empty;let o=nE(r);r.next&&r.err("Unexpected trailing text");let s=I3(D3(o));return P3(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let s=n;o&&s<r;s++)o=o.matchType(e.child(s).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function s(i,a){let l=i.matchFragment(e,r);if(l&&(!n||l.validEnd))return W.from(a.map(c=>c.createAndFill()));for(let c=0;c<i.next.length;c++){let{type:u,next:d}=i.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=s(d,a.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),s=o.match;if(s.matchType(e)){let i=[];for(let a=o;a.type;a=a.via)i.push(a.type);return i.reverse()}for(let i=0;i<s.next.length;i++){let{type:a,next:l}=s.next[i];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!o.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:o}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let s=o+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)s+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return s}).join(`
|
|
387
|
+
`)}}oo.empty=new oo(!0);class E3{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function nE(t){let e=[];do e.push(M3(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function M3(t){let e=[];do e.push(T3(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function T3(t){let e=O3(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=R3(t,e);else break;return e}function ig(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function R3(t,e){let n=ig(t),r=n;return t.eat(",")&&(t.next!="}"?r=ig(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function A3(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let s in n){let i=n[s];i.isInGroup(e)&&o.push(i)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function O3(t){if(t.eat("(")){let e=nE(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=A3(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function D3(t){let e=[[]];return o(s(t,0),n()),e;function n(){return e.push([])-1}function r(i,a,l){let c={term:l,to:a};return e[i].push(c),c}function o(i,a){i.forEach(l=>l.to=a)}function s(i,a){if(i.type=="choice")return i.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(i.type=="seq")for(let l=0;;l++){let c=s(i.exprs[l],a);if(l==i.exprs.length-1)return c;o(c,a=n())}else if(i.type=="star"){let l=n();return r(a,l),o(s(i.expr,l),l),[r(l)]}else if(i.type=="plus"){let l=n();return o(s(i.expr,a),l),o(s(i.expr,l),l),[r(l)]}else{if(i.type=="opt")return[r(a)].concat(s(i.expr,a));if(i.type=="range"){let l=a;for(let c=0;c<i.min;c++){let u=n();o(s(i.expr,l),u),l=u}if(i.max==-1)o(s(i.expr,l),l);else for(let c=i.min;c<i.max;c++){let u=n();r(l,u),o(s(i.expr,l),u),l=u}return[r(l)]}else{if(i.type=="name")return[r(a,void 0,i.value)];throw new Error("Unknown expr type")}}}}function rE(t,e){return e-t}function ag(t,e){let n=[];return r(e),n.sort(rE);function r(o){let s=t[o];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(o);for(let i=0;i<s.length;i++){let{term:a,to:l}=s[i];!a&&n.indexOf(l)==-1&&r(l)}}}function I3(t){let e=Object.create(null);return n(ag(t,0));function n(r){let o=[];r.forEach(i=>{t[i].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<o.length;u++)o[u][0]==a&&(c=o[u][1]);ag(t,l).forEach(u=>{c||o.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new oo(r.indexOf(t.length-1)>-1);for(let i=0;i<o.length;i++){let a=o[i][1].sort(rE);s.next.push({type:o[i][0],next:e[a.join(",")]||n(a)})}return s}}function P3(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],s=!o.validEnd,i=[];for(let a=0;a<o.next.length;a++){let{type:l,next:c}=o.next[a];i.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function oE(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function sE(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let s=t[r];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function iE(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let s=t[o];s.validate&&s.validate(e[o])}}function aE(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new _3(t,r,e[r]);return n}let lg=class lE{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=aE(e,r.attrs),this.defaultAttrs=oE(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==oo.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:sE(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new hr(this,this.computeAttrs(e),W.from(n),Ne.setFrom(r))}createChecked(e=null,n,r){return n=W.from(n),this.checkContent(n),new hr(this,this.computeAttrs(e),n,Ne.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=W.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let o=this.contentMatch.matchFragment(n),s=o&&o.fillBefore(W.empty,!0);return s?new hr(this,e,n.append(s),Ne.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){iE(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:Ne.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,i)=>r[s]=new lE(s,n,i));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function j3(t,e,n){let r=n.split("|");return o=>{let s=o===null?"null":typeof o;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class _3{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?j3(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class kc{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=aE(e,o.attrs),this.excluded=null;let s=oE(this.attrs);this.instance=s?new Ne(this,s):null}create(e=null){return!e&&this.instance?this.instance:new Ne(this,sE(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((s,i)=>r[s]=new kc(s,o++,n,i)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){iE(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class cE{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=rt.from(e.nodes),n.marks=rt.from(e.marks||{}),this.nodes=lg.compile(this.spec.nodes,this),this.marks=kc.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let s=this.nodes[o],i=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=r[i]||(r[i]=oo.parse(i,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?cg(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],i=s.spec.excludes;s.excluded=i==null?[s]:i==""?[]:cg(this,i.split(" "))}this.nodeFromJSON=o=>hr.fromJSON(this,o),this.markFromJSON=o=>Ne.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof lg){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new el(r,r.defaultAttrs,e,Ne.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function cg(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],s=t.marks[o],i=s;if(s)n.push(s);else for(let a in t.marks){let l=t.marks[a];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(i=l)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function L3(t){return t.tag!=null}function F3(t){return t.style!=null}class mr{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(L3(o))this.tags.push(o);else if(F3(o)){let s=/[^=]*/.exec(o.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let s=e.nodes[o.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new dg(this,n,!1);return r.addAll(e,Ne.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new dg(this,n,!0);return r.addAll(e,Ne.none,n.from,n.to),Q.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(z3(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let i=s.getAttrs(e);if(i===!1)continue;s.attrs=i||void 0}return s}}}matchStyle(e,n,r,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let i=this.styles[s],a=i.style;if(!(a.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(i.getAttrs){let l=i.getAttrs(n);if(l===!1)continue;i.attrs=l||void 0}return i}}}static schemaRules(e){let n=[];function r(o){let s=o.priority==null?50:o.priority,i=0;for(;i<n.length;i++){let a=n[i];if((a.priority==null?50:a.priority)<s)break}n.splice(i,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(i=>{r(i=fg(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(i=>{r(i=fg(i)),i.node||i.ignore||i.mark||(i.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new mr(e,mr.schemaRules(e)))}}const uE={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},$3={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},dE={ol:!0,ul:!0},li=1,Cd=2,Hs=4;function ug(t,e,n){return e!=null?(e?li:0)|(e==="full"?Cd:0):t&&t.whitespace=="pre"?li|Cd:n&~Hs}class ca{constructor(e,n,r,o,s,i){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=i,this.content=[],this.activeMarks=Ne.none,this.match=s||(i&Hs?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(W.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&li)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let n=W.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(W.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!uE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class dg{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,s,i=ug(null,n.preserveWhitespace,0)|(r?Hs:0);o?s=new ca(o.type,o.attrs,Ne.none,!0,n.topMatch||o.type.contentMatch,i):r?s=new ca(null,null,Ne.none,!0,null,i):s=new ca(e.schema.topNodeType,null,Ne.none,!0,null,i),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,s=o.options&Cd?"full":this.localPreserveWS||(o.options&li)>0,{schema:i}=this.parser;if(s==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
|
|
388
|
+
`);else if(i.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(i.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(i.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(i.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=o.content[o.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(i.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let i=e.nodeName.toLowerCase(),a;dE.hasOwnProperty(i)&&this.parser.normalizeLists&&B3(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:$3.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(uE.hasOwnProperty(i))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(s),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
389
|
+
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let s=this.parser.matchedStyles[o],i=r.getPropertyValue(s);if(i)for(let a=void 0;;){let l=this.parser.matchStyle(s,i,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,o){let s,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(i,n.attrs||null,r,n.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(i&&i.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}s&&this.sync(a)&&this.open--}addAll(e,n,r,o){let s=r||0;for(let i=r?e.childNodes[r]:e.firstChild,a=o==null?null:e.childNodes[o];i!=a;i=i.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(i,n);this.findAtPoint(e,s)}findPlace(e,n,r){let o,s;for(let i=this.open,a=0;i>=0;i--){let l=this.nodes[i],c=l.findWrapping(e);if(c&&(!o||o.length>c.length+a)&&(o=c,s=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!o)return null;this.sync(s);for(let i=0;i<o.length;i++)n=this.enterInner(o[i],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let i=Ne.none;for(let a of o.concat(e.marks))(s.type?s.type.allowsMarkType(a.type):pg(a.type,e.type))&&(i=a.addToSet(i));return s.content.push(e.mark(i)),!0}return!1}enter(e,n,r,o){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,o)),s}enterInner(e,n,r,o=!1,s){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(e);let a=ug(e,s,i.options);i.options&Hs&&i.content.length==0&&(a|=Hs);let l=Ne.none;return r=r.filter(c=>(i.type?i.type.allowsMarkType(c.type):pg(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new ca(e,n,l,o,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=li)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(o?0:1),i=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=s;l--)if(i(a-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function B3(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&dE.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function z3(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function fg(t){let e={};for(let n in t)e[n]=t[n];return e}function pg(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let s=[],i=a=>{s.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||s.indexOf(u)<0&&i(u))return!0}};if(i(o.contentMatch))return!0}}class po{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=bu(n).createDocumentFragment());let o=r,s=[];return e.forEach(i=>{if(s.length||i.marks.length){let a=0,l=0;for(;a<s.length&&l<i.marks.length;){let c=i.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(s[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<s.length;)o=s.pop()[1];for(;l<i.marks.length;){let c=i.marks[l++],u=this.serializeMark(c,i.isInline,n);u&&(s.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(i,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=Ta(bu(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let s=this.serializeMark(e.marks[o],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Ta(bu(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return Ta(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new po(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=hg(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return hg(e.marks)}}function hg(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function bu(t){return t.document||window.document}const mg=new WeakMap;function H3(t){let e=mg.get(t);return e===void 0&&mg.set(t,e=V3(t)),e}function V3(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function Ta(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],s;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=H3(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let a,l=n?t.createElementNS(n,o):t.createElement(o),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:g}=Ta(t,f,n,r);if(l.appendChild(h),g){if(a)throw new RangeError("Multiple content holes");a=g}}}return{dom:l,contentDOM:a}}const fE=65535,pE=Math.pow(2,16);function W3(t,e){return t+e*pE}function gg(t){return t&fE}function U3(t){return(t-(t&fE))/pE}const hE=1,mE=2,Ra=4,gE=8;class kd{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&gE)>0}get deletedBefore(){return(this.delInfo&(hE|Ra))>0}get deletedAfter(){return(this.delInfo&(mE|Ra))>0}get deletedAcross(){return(this.delInfo&Ra)>0}}class Dt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Dt.empty)return Dt.empty}recover(e){let n=0,r=gg(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+U3(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,s=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?o:0);if(l>e)break;let c=this.ranges[a+s],u=this.ranges[a+i],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:n:n,h=l+o+(f<0?0:u);if(r)return h;let g=e==(n<0?l:d)?null:W3(a/3,e-l),b=e==l?mE:e==d?hE:Ra;return(n<0?e!=l:e!=d)&&(b|=gE),new kd(h,b,g)}o+=u-c}return r?e+o:new kd(e+o,0,null)}touches(e,n){let r=0,o=gg(n),s=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+s],u=l+c;if(e<=u&&a==o*3)return!0;r+=this.ranges[a+i]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let i=this.ranges[o],a=i-(this.inverted?s:0),l=i+(this.inverted?0:s),c=this.ranges[o+n],u=this.ranges[o+r];e(a,a+c,l,l+u),s+=u-c}}invert(){return new Dt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Dt.empty:new Dt(e<0?[0,-e,0]:[0,0,e])}}Dt.empty=new Dt([]);class ci{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ci(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new ci;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let s=this.from;s<this.to;s++){let i=this._maps[s],a=i.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this._maps[l].recover(a.recover);continue}}o|=a.delInfo,e=a.pos}return r?e:new kd(e,o,null)}}const yu=Object.create(null);class ht{getMap(){return Dt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=yu[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in yu)throw new RangeError("Duplicate use of step JSON ID "+e);return yu[e]=n,n.prototype.jsonID=e,n}}class Ge{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ge(e,null)}static fail(e){return new Ge(null,e)}static fromReplace(e,n,r,o){try{return Ge.ok(e.replace(n,r,o))}catch(s){if(s instanceof Ja)return Ge.fail(s.message);throw s}}}function Zp(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let s=t.child(o);s.content.size&&(s=s.copy(Zp(s.content,e,s))),s.isInline&&(s=e(s,n,o)),r.push(s)}return W.fromArray(r)}class cr extends ht{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),s=new Q(Zp(n.content,(i,a)=>!i.isAtom||!a.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),n.openStart,n.openEnd);return Ge.fromReplace(e,this.from,this.to,s)}invert(){return new tn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new cr(n.pos,r.pos,this.mark)}merge(e){return e instanceof cr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new cr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new cr(n.from,n.to,e.markFromJSON(n.mark))}}ht.jsonID("addMark",cr);class tn extends ht{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Q(Zp(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Ge.fromReplace(e,this.from,this.to,r)}invert(){return new cr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new tn(n.pos,r.pos,this.mark)}merge(e){return e instanceof tn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new tn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new tn(n.from,n.to,e.markFromJSON(n.mark))}}ht.jsonID("removeMark",tn);class ur extends ht{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ge.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ge.fromReplace(e,this.pos,this.pos+1,new Q(W.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new ur(this.pos,n.marks[o]);return new ur(this.pos,this.mark)}}return new so(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ur(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ur(n.pos,e.markFromJSON(n.mark))}}ht.jsonID("addNodeMark",ur);class so extends ht{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ge.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ge.fromReplace(e,this.pos,this.pos+1,new Q(W.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ur(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new so(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new so(n.pos,e.markFromJSON(n.mark))}}ht.jsonID("removeNodeMark",so);class Qe extends ht{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Nd(e,this.from,this.to)?Ge.fail("Structure replace would overwrite content"):Ge.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Dt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Qe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Qe(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Qe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Q.empty:new Q(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Qe(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Q.empty:new Q(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Qe(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Qe(n.from,n.to,Q.fromJSON(e,n.slice),!!n.structure)}}ht.jsonID("replace",Qe);class et extends ht{constructor(e,n,r,o,s,i,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=s,this.insert=i,this.structure=a}apply(e){if(this.structure&&(Nd(e,this.from,this.gapFrom)||Nd(e,this.gapTo,this.to)))return Ge.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ge.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ge.fromReplace(e,this.from,this.to,r):Ge.fail("Content does not fit in gap")}getMap(){return new Dt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new et(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||s>r.pos?null:new et(n.pos,r.pos,o,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new et(n.from,n.to,n.gapFrom,n.gapTo,Q.fromJSON(e,n.slice),n.insert,!!n.structure)}}ht.jsonID("replaceAround",et);function Nd(t,e,n){let r=t.resolve(e),o=n-e,s=r.depth;for(;o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,o--;if(o>0){let i=r.node(s).maybeChild(r.indexAfter(s));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function G3(t,e,n,r){let o=[],s=[],i,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+l.nodeSize,n),g=r.addToSet(d);for(let b=0;b<d.length;b++)d[b].isInSet(g)||(i&&i.to==f&&i.mark.eq(d[b])?i.to=h:o.push(i=new tn(f,h,d[b])));a&&a.to==f?a.to=h:s.push(a=new cr(f,h,r))}}),o.forEach(l=>t.step(l)),s.forEach(l=>t.step(l))}function K3(t,e,n,r){let o=[],s=0;t.doc.nodesBetween(e,n,(i,a)=>{if(!i.isInline)return;s++;let l=null;if(r instanceof kc){let c=i.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let c=Math.min(a+i.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],f;for(let h=0;h<o.length;h++){let g=o[h];g.step==s-1&&d.eq(o[h].style)&&(f=g)}f?(f.to=c,f.step=s):o.push({style:d,from:Math.max(a,e),to:c,step:s})}}}),o.forEach(i=>t.step(new tn(i.from,i.to,i.style)))}function Qp(t,e,n,r=n.contentMatch,o=!0){let s=t.doc.nodeAt(e),i=[],a=e+1;for(let l=0;l<s.childCount;l++){let c=s.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)i.push(new Qe(a,u,Q.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new tn(a,u,c.marks[f]));if(o&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,g;for(;f=h.exec(c.text);)g||(g=new Q(W.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),i.push(new Qe(a+f.index,a+f.index+f[0].length,g))}}a=u}if(!r.validEnd){let l=r.fillBefore(W.empty,!0);t.replace(a,a,new Q(l,0,0))}for(let l=i.length-1;l>=0;l--)t.step(i[l])}function Y3(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function bs(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,s=0;;--r){let i=t.$from.node(r),a=t.$from.index(r)+o,l=t.$to.indexAfter(r)-s;if(r<t.depth&&i.canReplace(a,l,n))return r;if(r==0||i.type.spec.isolating||!Y3(i,a,l))break;a&&(o=1),l<i.childCount&&(s=1)}return null}function q3(t,e,n){let{$from:r,$to:o,depth:s}=e,i=r.before(s+1),a=o.after(s+1),l=i,c=a,u=W.empty,d=0;for(let g=s,b=!1;g>n;g--)b||r.index(g)>0?(b=!0,u=W.from(r.node(g).copy(u)),d++):l--;let f=W.empty,h=0;for(let g=s,b=!1;g>n;g--)b||o.after(g+1)<o.end(g)?(b=!0,f=W.from(o.node(g).copy(f)),h++):c++;t.step(new et(l,c,i,a,new Q(u.append(f),d,h),u.size-d,!0))}function eh(t,e,n=null,r=t){let o=X3(t,e),s=o&&J3(r,e);return s?o.map(bg).concat({type:e,attrs:n}).concat(s.map(bg)):null}function bg(t){return{type:t,attrs:null}}function X3(t,e){let{parent:n,startIndex:r,endIndex:o}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let i=s.length?s[0]:e;return n.canReplaceWith(r,o,i)?s:null}function J3(t,e){let{parent:n,startIndex:r,endIndex:o}=t,s=n.child(r),i=e.contentMatch.findWrapping(s.type);if(!i)return null;let l=(i.length?i[i.length-1]:e).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:i}function Z3(t,e,n){let r=W.empty;for(let i=n.length-1;i>=0;i--){if(r.size){let a=n[i].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=W.from(n[i].type.create(n[i].attrs,r))}let o=e.start,s=e.end;t.step(new et(o,s,o,s,new Q(r,0,0),n.length,!0))}function Q3(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(i,a)=>{let l=typeof o=="function"?o(i):o;if(i.isTextblock&&!i.hasMarkup(r,l)&&e4(t.doc,t.mapping.slice(s).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!g?c=!1:!h&&g&&(c=!0)}c===!1&&yE(t,i,a,s),Qp(t,t.mapping.slice(s).map(a,1),r,void 0,c===null);let u=t.mapping.slice(s),d=u.map(a,1),f=u.map(a+i.nodeSize,1);return t.step(new et(d,f,d+1,f-1,new Q(W.from(r.create(l,null,i.marks)),0,0),1,!0)),c===!0&&bE(t,i,a,s),!1}})}function bE(t,e,n,r){e.forEach((o,s)=>{if(o.isText){let i,a=/\r?\n|\r/g;for(;i=a.exec(o.text);){let l=t.mapping.slice(r).map(n+1+s+i.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function yE(t,e,n,r){e.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+s);t.replaceWith(i,i+1,e.type.schema.text(`
|
|
390
|
+
`))}})}function e4(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function t4(t,e,n,r,o){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let i=n.create(r,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,i);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new et(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new Q(W.from(i),0,0),1,!0))}function zn(t,e,n=1,r){let o=t.resolve(e),s=o.depth-n,i=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>s;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),g=r&&r[u+1];g&&(h=h.replaceChild(0,g.type.create(g.attrs)));let b=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!b.type.validContent(h))return!1}let a=o.indexAfter(s),l=r&&r[0];return o.node(s).canReplaceWith(a,a,l?l.type:o.node(s+1).type)}function n4(t,e,n=1,r){let o=t.doc.resolve(e),s=W.empty,i=W.empty;for(let a=o.depth,l=o.depth-n,c=n-1;a>l;a--,c--){s=W.from(o.node(a).copy(s));let u=r&&r[c];i=W.from(u?u.type.create(u.attrs,i):o.node(a).copy(i))}t.step(new Qe(e,e,new Q(s.append(i),n,n),!0))}function Or(t,e){let n=t.resolve(e),r=n.index();return vE(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function r4(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let s=e.child(o),i=s.type==r?t.type.schema.nodes.text:s.type;if(n=n.matchType(i),!n||!t.type.allowsMarks(s.marks))return!1}return n.validEnd}function vE(t,e){return!!(t&&e&&!t.isLeaf&&r4(t,e))}function Nc(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let s,i,a=r.index(o);if(o==r.depth?(s=r.nodeBefore,i=r.nodeAfter):n>0?(s=r.node(o+1),a++,i=r.node(o).maybeChild(a)):(s=r.node(o).maybeChild(a-1),i=r.node(o+1)),s&&!s.isTextblock&&vE(s,i)&&r.node(o).canReplace(a,a+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function o4(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,s=t.doc.resolve(e-n),i=s.node().type;if(o&&i.inlineContent){let u=i.whitespace=="pre",d=!!i.contentMatch.matchType(o);u&&!d?r=!1:!u&&d&&(r=!0)}let a=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);yE(t,u.node(),u.before(),a)}i.inlineContent&&Qp(t,e+n-1,i,s.node().contentMatchAt(s.index()),r==null);let l=t.mapping.slice(a),c=l.map(e-n);if(t.step(new Qe(c,l.map(e+n,-1),Q.empty,!0)),r===!0){let u=t.doc.resolve(c);bE(t,u.node(),u.before(),t.steps.length)}return t}function s4(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let s=r.index(o);if(r.node(o).canReplaceWith(s,s,n))return r.before(o+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let s=r.indexAfter(o);if(r.node(o).canReplaceWith(s,s,n))return r.after(o+1);if(s<r.node(o).childCount)return null}return null}function xE(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let s=0;s<n.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let i=r.depth;i>=0;i--){let a=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,l=r.index(i)+(a>0?1:0),c=r.node(i),u=!1;if(s==1)u=c.canReplace(l,l,o);else{let d=c.contentMatchAt(l).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?r.pos:a<0?r.before(i+1):r.after(i+1)}return null}function Ec(t,e,n=e,r=Q.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),s=t.resolve(n);return wE(o,s,r)?new Qe(e,n,r):new i4(o,s,r).fit()}function wE(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class i4{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=W.empty;for(let o=0;o<=e.depth;o++){let s=e.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=W.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let s=this.placed,i=r.depth,a=o.depth;for(;i&&a&&s.childCount==1;)s=s.firstChild.content,i--,a--;let l=new Q(s,i,a);return e>-1?new et(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Qe(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let s=n.firstChild;if(n.childCount>1&&(o=0),s.type.spec.isolating&&o<=r){e=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,s=null;r?(s=vu(this.unplaced.content,r-1).firstChild,o=s.content):o=this.unplaced.content;let i=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(n==1&&(i?c.matchType(i.type)||(d=c.fillBefore(W.from(i),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:a,parent:s,inject:d};if(n==2&&i&&(u=c.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:a,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=vu(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Q(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=vu(e,n);if(o.childCount<=1&&n>0){let s=e.size-n<=n+o.size;this.unplaced=new Q(Ps(e,n-1,1),n-1,s?n-1:r)}else this.unplaced=new Q(Ps(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let b=0;b<s.length;b++)this.openFrontierNode(s[b]);let i=this.unplaced,a=r?r.content:i.content,l=i.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[n];if(o){for(let b=0;b<o.childCount;b++)u.push(o.child(b));d=d.matchFragment(o)}let h=a.size+e-(i.content.size-i.openEnd);for(;c<a.childCount;){let b=a.child(c),y=d.matchType(b.type);if(!y)break;c++,(c>1||l==0||b.content.size)&&(d=y,u.push(SE(b.mark(f.allowedMarks(b.marks)),c==1?l:0,c==a.childCount?h:-1)))}let g=c==a.childCount;g||(h=-1),this.placed=js(this.placed,n,W.from(u)),this.frontier[n].match=d,g&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,y=a;b<h;b++){let v=y.lastChild;this.frontier.push({type:v.type,match:v.contentMatchAt(v.childCount)}),y=v.content}this.unplaced=g?e==0?Q.empty:new Q(Ps(i.content,e-1,1),e-1,h<0?i.openEnd:e-1):new Q(Ps(i.content,e,c),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!xu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],s=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),i=xu(e,n,o,r,s);if(i){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=xu(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:i,move:s?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=js(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),s=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,s)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=js(this.placed,this.depth,W.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(W.empty,!0);n.childCount&&(this.placed=js(this.placed,this.frontier.length,n))}}function Ps(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Ps(t.firstChild.content,e-1,n)))}function js(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(js(t.lastChild.content,e-1,n)))}function vu(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function SE(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,SE(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(W.empty,!0)))),t.copy(r)}function xu(t,e,n,r,o){let s=t.node(e),i=o?t.indexAfter(e):t.index(e);if(i==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,i);return a&&!a4(n,s.content,i)?a:null}function a4(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function l4(t){return t.spec.defining||t.spec.definingForContent}function c4(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),s=t.doc.resolve(n);if(wE(o,s,r))return t.step(new Qe(e,n,r));let i=kE(o,s);i[i.length-1]==0&&i.pop();let a=-(o.depth+1);i.unshift(a);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let g=o.node(f).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;i.indexOf(f)>-1?a=f:o.before(f)==h&&i.splice(1,0,-f)}let l=i.indexOf(a),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let g=f.firstChild;if(c.push(g),h==r.openStart)break;f=g.content}for(let f=u-1;f>=0;f--){let h=c[f],g=l4(h.type);if(g&&!h.sameMarkup(o.node(Math.abs(a)-1)))u=f;else if(g||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),g=c[h];if(g)for(let b=0;b<i.length;b++){let y=i[(b+l)%i.length],v=!0;y<0&&(v=!1,y=-y);let x=o.node(y-1),w=o.index(y-1);if(x.canReplaceWith(w,w,g.type,g.marks))return t.replace(o.before(y),v?s.after(y):n,new Q(CE(r.content,0,r.openStart,h),h,r.openEnd))}}let d=t.steps.length;for(let f=i.length-1;f>=0&&(t.replace(e,n,r),!(t.steps.length>d));f--){let h=i[f];h<0||(e=o.before(h),n=s.after(h))}}function CE(t,e,n,r,o){if(e<n){let s=t.firstChild;t=t.replaceChild(0,s.copy(CE(s.content,e+1,n,r,s)))}if(e>r){let s=o.contentMatchAt(0),i=s.fillBefore(t).append(t);t=i.append(s.matchFragment(i).fillBefore(W.empty,!0))}return t}function u4(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=s4(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Q(W.from(r),0,0))}function d4(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),s=kE(r,o);for(let i=0;i<s.length;i++){let a=s[i],l=i==s.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),o.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return t.delete(r.before(a),o.after(a))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i&&r.start(i-1)==o.start(i-1)&&r.node(i-1).canReplace(r.index(i-1),o.index(i-1)))return t.delete(r.before(i),n);t.delete(e,n)}function kE(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let s=t.start(o);if(s<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(s==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==s-1)&&n.push(o)}return n}class Ho extends ht{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ge.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Ge.fromReplace(e,this.pos,this.pos+1,new Q(W.from(o),0,n.isLeaf?0:1))}getMap(){return Dt.empty}invert(e){return new Ho(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ho(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ho(n.pos,n.attr,n.value)}}ht.jsonID("attr",Ho);class ui extends ht{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Ge.ok(r)}getMap(){return Dt.empty}invert(e){return new ui(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new ui(n.attr,n.value)}}ht.jsonID("docAttr",ui);let Yo=class extends Error{};Yo=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Yo.prototype=Object.create(Error.prototype);Yo.prototype.constructor=Yo;Yo.prototype.name="TransformError";class NE{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ci}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Yo(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let o=this.mapping.maps[r];r&&(e=o.map(e,1),n=o.map(n,-1)),o.forEach((s,i,a,l)=>{e=Math.min(e,a),n=Math.max(n,l)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Q.empty){let o=Ec(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Q(W.from(r),0,0))}delete(e,n){return this.replace(e,n,Q.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return c4(this,e,n,r),this}replaceRangeWith(e,n,r){return u4(this,e,n,r),this}deleteRange(e,n){return d4(this,e,n),this}lift(e,n){return q3(this,e,n),this}join(e,n=1){return o4(this,e,n),this}wrap(e,n){return Z3(this,e,n),this}setBlockType(e,n=e,r,o=null){return Q3(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return t4(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Ho(e,n,r)),this}setDocAttribute(e,n){return this.step(new ui(e,n)),this}addNodeMark(e,n){return this.step(new ur(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof Ne)n.isInSet(r.marks)&&this.step(new so(e,n));else{let o=r.marks,s,i=[];for(;s=n.isInSet(o);)i.push(new so(e,s)),o=s.removeFromSet(o);for(let a=i.length-1;a>=0;a--)this.step(i[a])}return this}split(e,n=1,r){return n4(this,e,n,r),this}addMark(e,n,r){return G3(this,e,n,r),this}removeMark(e,n,r){return K3(this,e,n,r),this}clearIncompatible(e,n,r){return Qp(this,e,n,r),this}}const wu=Object.create(null);class be{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new f4(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Q.empty){let r=n.content.lastChild,o=null;for(let a=0;a<n.openEnd;a++)o=r,r=r.lastChild;let s=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:l,$to:c}=i[a],u=e.mapping.slice(s);e.replaceRange(u.map(l.pos),u.map(c.pos),a?Q.empty:n),a==0&&xg(e,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:i,$to:a}=o[s],l=e.mapping.slice(r),c=l.map(i.pos),u=l.map(a.pos);s?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),xg(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new pe(e):Do(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let s=e.depth-1;s>=0;s--){let i=n<0?Do(e.node(0),e.node(s),e.before(s+1),e.index(s),n,r):Do(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,n,r);if(i)return i}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Pt(e.node(0))}static atStart(e){return Do(e,e,0,0,1)||new Pt(e)}static atEnd(e){return Do(e,e,e.content.size,e.childCount,-1)||new Pt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=wu[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in wu)throw new RangeError("Duplicate use of selection JSON ID "+e);return wu[e]=n,n.prototype.jsonID=e,n}getBookmark(){return pe.between(this.$anchor,this.$head).getBookmark()}}be.prototype.visible=!0;class f4{constructor(e,n){this.$from=e,this.$to=n}}let yg=!1;function vg(t){!yg&&!t.parent.inlineContent&&(yg=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class pe extends be{constructor(e,n=e){vg(e),vg(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return be.near(r);let o=e.resolve(n.map(this.anchor));return new pe(o.parent.inlineContent?o:r,r)}replace(e,n=Q.empty){if(super.replace(e,n),n==Q.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof pe&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Mc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new pe(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let s=be.findFrom(n,r,!0)||be.findFrom(n,-r,!0);if(s)n=s.$head;else return be.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(be.findFrom(e,-r,!0)||be.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new pe(e,n)}}be.jsonID("text",pe);class Mc{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Mc(e.map(this.anchor),e.map(this.head))}resolve(e){return pe.between(e.resolve(this.anchor),e.resolve(this.head))}}class de extends be{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),s=e.resolve(o);return r?be.near(s):new de(s)}content(){return new Q(W.from(this.node),0,0)}eq(e){return e instanceof de&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new th(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new de(e.resolve(n.anchor))}static create(e,n){return new de(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}de.prototype.visible=!1;be.jsonID("node",de);class th{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Mc(r,r):new th(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&de.isSelectable(r)?new de(n):be.near(n)}}class Pt extends be{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Q.empty){if(n==Q.empty){e.delete(0,e.doc.content.size);let r=be.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Pt(e)}map(e){return new Pt(e)}eq(e){return e instanceof Pt}getBookmark(){return p4}}be.jsonID("all",Pt);const p4={map(){return this},resolve(t){return new Pt(t)}};function Do(t,e,n,r,o,s=!1){if(e.inlineContent)return pe.create(t,n);for(let i=r-(o>0?0:1);o>0?i<e.childCount:i>=0;i+=o){let a=e.child(i);if(a.isAtom){if(!s&&de.isSelectable(a))return de.create(t,n-(o<0?a.nodeSize:0))}else{let l=Do(t,a,n+o,o<0?a.childCount:0,o,s);if(l)return l}n+=a.nodeSize*o}return null}function xg(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof Qe||o instanceof et))return;let s=t.mapping.maps[r],i;s.forEach((a,l,c,u)=>{i==null&&(i=u)}),t.setSelection(be.near(t.doc.resolve(i),n))}const wg=1,ua=2,Sg=4;class h4 extends NE{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|wg)&~ua,this.storedMarks=null,this}get selectionSet(){return(this.updated&wg)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=ua,this}ensureMarks(e){return Ne.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&ua)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~ua,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ne.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let s=this.storedMarks;if(!s){let i=this.doc.resolve(n);s=r==n?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,s)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(be.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Sg,this}get scrolledIntoView(){return(this.updated&Sg)>0}}function Cg(t,e){return!e||!t?t:t.bind(e)}class _s{constructor(e,n,r){this.name=e,this.init=Cg(n.init,r),this.apply=Cg(n.apply,r)}}const m4=[new _s("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new _s("selection",{init(t,e){return t.selection||be.atStart(e.doc)},apply(t){return t.selection}}),new _s("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new _s("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Su{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=m4.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new _s(r.key,r.spec.state,r))})}}class Lo{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let s=!1;for(let i=0;i<this.config.plugins.length;i++){let a=this.config.plugins[i];if(a.spec.appendTransaction){let l=o?o[i].n:0,c=o?o[i].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<i?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),s=!0}o&&(o[i]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Lo(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let s=r[o];n[s.name]=s.apply(e,this[s.name],this,n)}return n}get tr(){return new h4(this)}static create(e){let n=new Su(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Lo(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new Su(this.schema,e.plugins),r=n.fields,o=new Lo(n);for(let s=0;s<r.length;s++){let i=r[s].name;o[i]=this.hasOwnProperty(i)?this[i]:r[s].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],s=o.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Su(e.schema,e.plugins),s=new Lo(o);return o.fields.forEach(i=>{if(i.name=="doc")s.doc=hr.fromJSON(e.schema,n.doc);else if(i.name=="selection")s.selection=be.fromJSON(s.doc,n.selection);else if(i.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==i.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){s[i.name]=c.fromJSON.call(l,e,n[a],s);return}}s[i.name]=i.init(e,s)}}),s}}function EE(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=EE(o,e,{})),n[r]=o}return n}class $e{constructor(e){this.spec=e,this.props={},e.props&&EE(e.props,this,this.props),this.key=e.key?e.key.key:ME("plugin")}getState(e){return e[this.key]}}const Cu=Object.create(null);function ME(t){return t in Cu?t+"$"+ ++Cu[t]:(Cu[t]=0,t+"$")}class Ze{constructor(e="key"){this.key=ME(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const nh=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function TE(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const RE=(t,e,n)=>{let r=TE(t,n);if(!r)return!1;let o=rh(r);if(!o){let i=r.blockRange(),a=i&&bs(i);return a==null?!1:(e&&e(t.tr.lift(i,a).scrollIntoView()),!0)}let s=o.nodeBefore;if(FE(t,o,e,-1))return!0;if(r.parent.content.size==0&&(qo(s,"end")||de.isSelectable(s)))for(let i=r.depth;;i--){let a=Ec(t.doc,r.before(i),r.after(i),Q.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(qo(s,"end")?be.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):de.create(l.doc,o.pos-s.nodeSize)),e(l.scrollIntoView())}return!0}if(i==1||r.node(i-1).childCount>1)break}return s.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1},g4=(t,e,n)=>{let r=TE(t,n);if(!r)return!1;let o=rh(r);return o?AE(t,o,e):!1},b4=(t,e,n)=>{let r=DE(t,n);if(!r)return!1;let o=oh(r);return o?AE(t,o,e):!1};function AE(t,e,n){let r=e.nodeBefore,o=r,s=e.pos-1;for(;!o.isTextblock;s--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let i=e.nodeAfter,a=i,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=Ec(t.doc,s,l,Q.empty);if(!c||c.from!=s||c instanceof Qe&&c.slice.size>=l-s)return!1;if(n){let u=t.tr.step(c);u.setSelection(pe.create(u.doc,s)),n(u.scrollIntoView())}return!0}function qo(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const OE=(t,e,n)=>{let{$head:r,empty:o}=t.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=rh(r)}let i=s&&s.nodeBefore;return!i||!de.isSelectable(i)?!1:(e&&e(t.tr.setSelection(de.create(t.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function rh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function DE(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const IE=(t,e,n)=>{let r=DE(t,n);if(!r)return!1;let o=oh(r);if(!o)return!1;let s=o.nodeAfter;if(FE(t,o,e,1))return!0;if(r.parent.content.size==0&&(qo(s,"start")||de.isSelectable(s))){let i=Ec(t.doc,r.before(),r.after(),Q.empty);if(i&&i.slice.size<i.to-i.from){if(e){let a=t.tr.step(i);a.setSelection(qo(s,"start")?be.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):de.create(a.doc,a.mapping.map(o.pos))),e(a.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0):!1},PE=(t,e,n)=>{let{$head:r,empty:o}=t.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=oh(r)}let i=s&&s.nodeAfter;return!i||!de.isSelectable(i)?!1:(e&&e(t.tr.setSelection(de.create(t.doc,s.pos)).scrollIntoView()),!0)};function oh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const y4=(t,e)=>{let n=t.selection,r=n instanceof de,o;if(r){if(n.node.isTextblock||!Or(t.doc,n.from))return!1;o=n.from}else if(o=Nc(t.doc,n.from,-1),o==null)return!1;if(e){let s=t.tr.join(o);r&&s.setSelection(de.create(s.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},v4=(t,e)=>{let n=t.selection,r;if(n instanceof de){if(n.node.isTextblock||!Or(t.doc,n.to))return!1;r=n.to}else if(r=Nc(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},x4=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),s=o&&bs(o);return s==null?!1:(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)},jE=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
391
|
+
`).scrollIntoView()),!0)};function sh(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const w4=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),s=n.indexAfter(-1),i=sh(o.contentMatchAt(s));if(!i||!o.canReplaceWith(s,s,i))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,i.createAndFill());l.setSelection(be.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},_E=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Pt||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=sh(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let i=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=t.tr.insert(i,s.createAndFill());a.setSelection(pe.create(a.doc,i+1)),e(a.scrollIntoView())}return!0},LE=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(zn(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),o=r&&bs(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function S4(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof de&&e.selection.node.isBlock)return!r.parentOffset||!zn(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],i,a,l=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){l=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),a=sh(r.node(h-1).contentMatchAt(r.indexAfter(h-1))),s.unshift(l&&a?{type:a}:null),i=h;break}else{if(h==1)return!1;s.unshift(null)}let u=e.tr;(e.selection instanceof pe||e.selection instanceof Pt)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=zn(u.doc,d,s.length,s);if(f||(s[0]=a?{type:a}:null,f=zn(u.doc,d,s.length,s)),!f)return!1;if(u.split(d,s.length,s),!l&&c&&r.node(i).type!=a){let h=u.mapping.map(r.before(i)),g=u.doc.resolve(h);a&&r.node(i-1).canReplaceWith(g.index(),g.index()+1,a)&&u.setNodeMarkup(u.mapping.map(r.before(i)),a)}return n&&n(u.scrollIntoView()),!0}}const C4=S4(),k4=(t,e)=>{let{$from:n,to:r}=t.selection,o,s=n.sharedDepth(r);return s==0?!1:(o=n.before(s),e&&e(t.tr.setSelection(de.create(t.doc,o))),!0)};function N4(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(o.isTextblock||Or(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function FE(t,e,n,r){let o=e.nodeBefore,s=e.nodeAfter,i,a,l=o.type.spec.isolating||s.type.spec.isolating;if(!l&&N4(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(i=(a=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&a.matchType(i[0]||s.type).validEnd){if(n){let h=e.pos+s.nodeSize,g=W.empty;for(let v=i.length-1;v>=0;v--)g=W.from(i[v].create(null,g));g=W.from(o.copy(g));let b=t.tr.step(new et(e.pos-1,h,e.pos,h,new Q(g,1,0),i.length,!0)),y=b.doc.resolve(h+2*i.length);y.nodeAfter&&y.nodeAfter.type==o.type&&Or(b.doc,y.pos)&&b.join(y.pos),n(b.scrollIntoView())}return!0}let u=s.type.spec.isolating||r>0&&l?null:be.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),f=d&&bs(d);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(d,f).scrollIntoView()),!0;if(c&&qo(s,"start",!0)&&qo(o,"end")){let h=o,g=[];for(;g.push(h),!h.isTextblock;)h=h.lastChild;let b=s,y=1;for(;!b.isTextblock;b=b.firstChild)y++;if(h.canReplace(h.childCount,h.childCount,b.content)){if(n){let v=W.empty;for(let w=g.length-1;w>=0;w--)v=W.from(g[w].copy(v));let x=t.tr.step(new et(e.pos-g.length,e.pos+s.nodeSize,e.pos+y,e.pos+s.nodeSize-y,new Q(v,g.length,0),0,!0));n(x.scrollIntoView())}return!0}}return!1}function $E(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return o.node(s).isTextblock?(n&&n(e.tr.setSelection(pe.create(e.doc,t<0?o.start(s):o.end(s)))),!0):!1}}const E4=$E(-1),M4=$E(1);function T4(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,i=o.blockRange(s),a=i&&eh(i,t,e);return a?(r&&r(n.tr.wrap(i,a).scrollIntoView()),!0):!1}}function kg(t,e=null){return function(n,r){let o=!1;for(let s=0;s<n.selection.ranges.length&&!o;s++){let{$from:{pos:i},$to:{pos:a}}=n.selection.ranges[s];n.doc.nodesBetween(i,a,(l,c)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)o=!0;else{let u=n.doc.resolve(c),d=u.index();o=u.parent.canReplaceWith(d,d+1,t)}})}if(!o)return!1;if(r){let s=n.tr;for(let i=0;i<n.selection.ranges.length;i++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[i];s.setBlockType(a,l,t,e)}r(s.scrollIntoView())}return!0}}function ih(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}ih(nh,RE,OE);ih(nh,IE,PE);ih(jE,_E,LE,C4);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function R4(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,i=o.blockRange(s);if(!i)return!1;let a=r?n.tr:null;return A4(a,i,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function A4(t,e,n,r=null){let o=!1,s=e,i=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=i.resolve(e.start-2);s=new Qa(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Qa(e.$from,i.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let a=eh(s,n,r,e);return a?(t&&O4(t,e,a,o,n),!0):!1}function O4(t,e,n,r,o){let s=W.empty;for(let u=n.length-1;u>=0;u--)s=W.from(n[u].type.create(n[u].attrs,s));t.step(new et(e.start-(r?2:0),e.end,e.start,e.end,new Q(s,0,0),n.length,!0));let i=0;for(let u=0;u<n.length;u++)n[u].type==o&&(i=u+1);let a=n.length-i,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,f=!0;u<d;u++,f=!1)!f&&zn(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}function D4(t){return function(e,n){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,i=>i.childCount>0&&i.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?I4(e,n,t,s):P4(e,n,s):!0:!1}}function I4(t,e,n,r){let o=t.tr,s=r.end,i=r.$to.end(r.depth);s<i&&(o.step(new et(s-1,i,s,i,new Q(W.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Qa(o.doc.resolve(r.$from.pos),o.doc.resolve(i),r.depth));const a=bs(r);if(a==null)return!1;o.lift(r,a);let l=o.doc.resolve(o.mapping.map(s,-1)-1);return Or(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function P4(t,e,n){let r=t.tr,o=n.parent;for(let h=n.end,g=n.endIndex-1,b=n.startIndex;g>b;g--)h-=o.child(g).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(n.start),i=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==o.childCount,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(a?0:1),u+1,i.content.append(l?W.empty:W.from(o))))return!1;let d=s.pos,f=d+i.nodeSize;return r.step(new et(d-(a?1:0),f+(l?1:0),d+1,f-1,new Q((a?W.empty:W.from(o.copy(W.empty))).append(l?W.empty:W.from(o.copy(W.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function j4(t){return function(e,n){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==t);if(!s)return!1;let i=s.startIndex;if(i==0)return!1;let a=s.parent,l=a.child(i-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=W.from(c?t.create():null),d=new Q(W.from(t.create(null,W.from(a.type.create(null,u)))),c?3:1,0),f=s.start,h=s.end;n(e.tr.step(new et(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}const ot=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Xo=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Ed=null;const _n=function(t,e,n){let r=Ed||(Ed=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},_4=function(){Ed=null},io=function(t,e,n,r){return n&&(Ng(t,e,n,r,-1)||Ng(t,e,n,r,1))},L4=/^(img|br|input|textarea|hr)$/i;function Ng(t,e,n,r,o){for(var s;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Ht(t))){let i=t.parentNode;if(!i||i.nodeType!=1||Xi(t)||L4.test(t.nodeName)||t.contentEditable=="false")return!1;e=ot(t)+(o<0?0:1),t=i}else if(t.nodeType==1){let i=t.childNodes[e+(o<0?-1:0)];if(i.nodeType==1&&i.contentEditable=="false")if(!((s=i.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=o;else return!1;else t=i,e=o<0?Ht(t):0}else return!1}}function Ht(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function F4(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Ht(t)}else if(t.parentNode&&!Xi(t))e=ot(t),t=t.parentNode;else return null}}function $4(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Xi(t))e=ot(t)+1,t=t.parentNode;else return null}}function B4(t,e,n){for(let r=e==0,o=e==Ht(t);r||o;){if(t==n)return!0;let s=ot(t);if(t=t.parentNode,!t)return!1;r=r&&s==0,o=o&&s==Ht(t)}}function Xi(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Tc=function(t){return t.focusNode&&io(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Br(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function z4(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function H4(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Ht(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Ht(r.startContainer),r.startOffset)}}}const wn=typeof navigator<"u"?navigator:null,Eg=typeof document<"u"?document:null,Dr=wn&&wn.userAgent||"",Md=/Edge\/(\d+)/.exec(Dr),BE=/MSIE \d/.exec(Dr),Td=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Dr),Et=!!(BE||Td||Md),gr=BE?document.documentMode:Td?+Td[1]:Md?+Md[1]:0,Wt=!Et&&/gecko\/(\d+)/i.test(Dr);Wt&&+(/Firefox\/(\d+)/.exec(Dr)||[0,0])[1];const Rd=!Et&&/Chrome\/(\d+)/.exec(Dr),it=!!Rd,zE=Rd?+Rd[1]:0,ut=!Et&&!!wn&&/Apple Computer/.test(wn.vendor),Jo=ut&&(/Mobile\/\w+/.test(Dr)||!!wn&&wn.maxTouchPoints>2),zt=Jo||(wn?/Mac/.test(wn.platform):!1),HE=wn?/Win/.test(wn.platform):!1,$n=/Android \d/.test(Dr),Ji=!!Eg&&"webkitFontSmoothing"in Eg.documentElement.style,V4=Ji?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function W4(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Dn(t,e){return typeof t=="number"?t:t[e]}function U4(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Mg(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let i=n||t.dom;i;){if(i.nodeType!=1){i=Xo(i);continue}let a=i,l=a==s.body,c=l?W4(s):U4(a),u=0,d=0;if(e.top<c.top+Dn(r,"top")?d=-(c.top-e.top+Dn(o,"top")):e.bottom>c.bottom-Dn(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+Dn(o,"top")-c.top:e.bottom-c.bottom+Dn(o,"bottom")),e.left<c.left+Dn(r,"left")?u=-(c.left-e.left+Dn(o,"left")):e.right>c.right-Dn(r,"right")&&(u=e.right-c.right+Dn(o,"right")),u||d)if(l)s.defaultView.scrollBy(u,d);else{let h=a.scrollLeft,g=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let b=a.scrollLeft-h,y=a.scrollTop-g;e={left:e.left-b,top:e.top-y,right:e.right-b,bottom:e.bottom-y}}let f=l?"fixed":getComputedStyle(i).position;if(/^(fixed|sticky)$/.test(f))break;i=f=="absolute"?i.offsetParent:Xo(i)}}function G4(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let s=(e.left+e.right)/2,i=n+1;i<Math.min(innerHeight,e.bottom);i+=5){let a=t.root.elementFromPoint(s,i);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,o=l.top;break}}return{refDOM:r,refTop:o,stack:VE(t.dom)}}function VE(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Xo(r));return e}function K4({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;WE(n,r==0?0:r-e)}function WE(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:s}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let Mo=null;function Y4(t){if(t.setActive)return t.setActive();if(Mo)return t.focus(Mo);let e=VE(t);t.focus(Mo==null?{get preventScroll(){return Mo={preventScroll:!0},!0}}:void 0),Mo||(Mo=!1,WE(e,0))}function UE(t,e){let n,r=2e8,o,s=0,i=e.top,a=e.top,l,c;for(let u=t.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=_n(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let g=f[h];if(g.top<=i&&g.bottom>=a){i=Math.max(g.bottom,i),a=Math.min(g.top,a);let b=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(b<r){n=u,r=b,o=b&&n.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,u.nodeType==1&&b&&(s=d+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!l&&g.left<=e.left&&g.right>=e.left&&(l=u,c={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!n&&(e.left>=g.right&&e.top>=g.top||e.left>=g.left&&e.top>=g.bottom)&&(s=d+1)}}return!n&&l&&(n=l,o=c,r=0),n&&n.nodeType==3?q4(n,o):!n||r&&n.nodeType==1?{node:t,offset:s}:UE(n,o)}function q4(t,e){let n=t.nodeValue.length,r=document.createRange(),o;for(let s=0;s<n;s++){r.setEnd(t,s+1),r.setStart(t,s);let i=rr(r,1);if(i.top!=i.bottom&&ah(e,i)){o={node:t,offset:s+(e.left>=(i.left+i.right)/2?1:0)};break}}return r.detach(),o||{node:t,offset:0}}function ah(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function X4(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function J4(t,e,n){let{node:r,offset:o}=UE(e,n),s=-1;if(r.nodeType==1&&!r.firstChild){let i=r.getBoundingClientRect();s=i.left!=i.right&&n.left>(i.left+i.right)/2?1:-1}return t.docView.posFromDOM(r,o,s)}function Z4(t,e,n,r){let o=-1;for(let s=e,i=!1;s!=t.dom;){let a=t.docView.nearestDesc(s,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!i&&l.left>r.left||l.top>r.top?o=a.posBefore:(!i&&l.right<r.left||l.bottom<r.top)&&(o=a.posAfter),i=!0),!a.contentDOM&&o<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;s=a.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function GE(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),s=o;;){let i=t.childNodes[s];if(i.nodeType==1){let a=i.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(ah(e,c))return GE(i,e,c)}}if((s=(s+1)%r)==o)break}return t}function Q4(t,e){let n=t.dom.ownerDocument,r,o=0,s=H4(n,e.left,e.top);s&&({node:r,offset:o}=s);let i=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!i||!t.dom.contains(i.nodeType!=1?i.parentNode:i)){let c=t.dom.getBoundingClientRect();if(!ah(e,c)||(i=GE(t.dom,e,c),!i))return null}if(ut)for(let c=i;r&&c;c=Xo(c))c.draggable&&(r=void 0);if(i=X4(i,e),r){if(Wt&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&o++}let c;Ji&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=Z4(t,r,o,e))}a==null&&(a=J4(t,i,e));let l=t.docView.nearestDesc(i,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Tg(t){return t.top<t.bottom||t.left<t.right}function rr(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(Tg(r))return r}return Array.prototype.find.call(n,Tg)||t.getBoundingClientRect()}const eH=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function KE(t,e,n){let{node:r,offset:o,atom:s}=t.docView.domFromPos(e,n<0?-1:1),i=Ji||Wt;if(r.nodeType==3)if(i&&(eH.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=rr(_n(r,o,o),n);if(Wt&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=rr(_n(r,o-1,o-1),-1);if(c.top==l.top){let u=rr(_n(r,o,o+1),-1);if(u.top!=l.top)return Ns(u,u.left<c.left)}}return l}else{let l=o,c=o,u=n<0?1:-1;return n<0&&!o?(c++,u=-1):n>=0&&o==r.nodeValue.length?(l--,u=1):n<0?l--:c++,Ns(rr(_n(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&o&&(n<0||o==Ht(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return ku(l.getBoundingClientRect(),!1)}if(s==null&&o<Ht(r)){let l=r.childNodes[o];if(l.nodeType==1)return ku(l.getBoundingClientRect(),!0)}return ku(r.getBoundingClientRect(),n>=0)}if(s==null&&o&&(n<0||o==Ht(r))){let l=r.childNodes[o-1],c=l.nodeType==3?_n(l,Ht(l)-(i?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Ns(rr(c,1),!1)}if(s==null&&o<Ht(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?_n(l,0,i?0:1):l.nodeType==1?l:null:null;if(c)return Ns(rr(c,-1),!0)}return Ns(rr(r.nodeType==3?_n(r):r,-n),n>=0)}function Ns(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function ku(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function YE(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function tH(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return YE(t,e,()=>{let{node:s}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let i=KE(t,o.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=_n(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?i.top-u.top>(u.bottom-i.top)*2:u.bottom-i.bottom>(i.bottom-u.top)*2))return!1}}return!0})}const nH=/[\u0590-\u08ac]/;function rH(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,s=!o,i=o==r.parent.content.size,a=t.domSelection();return a?!nH.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?s:i:YE(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let h=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:g,focusOffset:b}=t.domSelectionRange(),y=g&&!h.contains(g.nodeType==1?g:g.parentNode)||l==g&&c==b;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return f!=null&&(a.caretBidiLevel=f),y}):r.pos==r.start()||r.pos==r.end()}let Rg=null,Ag=null,Og=!1;function oH(t,e,n){return Rg==e&&Ag==n?Og:(Rg=e,Ag=n,Og=n=="up"||n=="down"?tH(t,e,n):rH(t,e,n))}const Ut=0,Dg=1,Hr=2,Sn=3;class Zi{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Ut,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,i;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(i)+i.size:this.posAtStart}else{let s,i;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(i):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>ot(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!1;break}if(s.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!0;break}if(s.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let s=this.getDesc(o),i;if(s&&(!n||s.node))if(r&&(i=s.nodeDOM)&&!(i.nodeType==1?i.contains(e.nodeType==1?e:e.parentNode):i==e))r=!1;else return s}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let s=this.getDesc(o);if(s)return s.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],s=r+o.size;if(r==e&&s!=r){for(;!o.border&&o.children.length;)for(let i=0;i<o.children.length;i++){let a=o.children[i];if(a.size){o=a;break}}return o}if(e<s)return o.descAt(e-r-o.border);r=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let s=0;r<this.children.length;r++){let i=this.children[r],a=s+i.size;if(a>e||i instanceof XE){o=e-s;break}s=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof qE&&s.side>=0;r--);if(n<=0){let s,i=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,i=!1);return s&&n&&i&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?ot(s.dom)+1:0}}else{let s,i=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,i=!1);return s&&i&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?ot(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,s=-1;for(let i=r,a=0;;a++){let l=this.children[a],c=i+l.size;if(o==-1&&e<=c){let u=i+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=i;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=ot(f.dom)+1;break}e-=f.size}o==-1&&(o=0)}if(o>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=ot(d.dom);break}n+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let s=Math.min(e,n),i=Math.max(e,n);for(let h=0,g=0;h<this.children.length;h++){let b=this.children[h],y=g+b.size;if(s>g&&i<y)return b.setSelection(e-g-b.border,n-g-b.border,r,o);g=y}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),d=!1;if((Wt||ut)&&e==n){let{node:h,offset:g}=a;if(h.nodeType==3){if(d=!!(g&&h.nodeValue[g-1]==`
|
|
392
|
+
`),d&&g==h.nodeValue.length)for(let b=h,y;b;b=b.parentNode){if(y=b.nextSibling){y.nodeName=="BR"&&(a=l={node:y.parentNode,offset:ot(y)+1});break}let v=b.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let b=h.childNodes[g-1];d=b&&(b.nodeName=="BR"||b.contentEditable=="false")}}if(Wt&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||d&&ut)&&io(a.node,a.offset,u.anchorNode,u.anchorOffset)&&io(l.node,l.offset,u.focusNode,u.focusOffset))return;let f=!1;if((c.extend||e==n)&&!(d&&Wt)){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(e>n){let g=a;a=l,l=g}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let s=this.children[o],i=r+s.size;if(r==i?e<=i&&n>=r:e<i&&n>r){let a=r+s.border,l=i-s.border;if(e>=a&&n<=l){this.dirty=e==r||n==i?Hr:Dg,e==a&&n==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Sn:s.markDirty(e-a,n-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Hr:Sn}r=i}this.dirty=Hr}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Hr:Dg;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class qE extends Zi{constructor(e,n,r,o){let s,i=n.type.toDOM;if(typeof i=="function"&&(i=i(r,()=>{if(!s)return o;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(i.nodeType!=1){let a=document.createElement("span");a.appendChild(i),i=a}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=n,this.widget=n,s=this}matchesWidget(e){return this.dirty==Ut&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class sH extends Zi{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class ao extends Zi{constructor(e,n,r,o,s){super(e,[],r,o),this.mark=n,this.spec=s}static create(e,n,r,o){let s=o.nodeViews[n.type.name],i=s&&s(n,o,r);return(!i||!i.dom)&&(i=po.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new ao(e,n,i.dom,i.contentDOM||i.dom,i)}parseRule(){return this.dirty&Sn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Sn&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Ut){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ut}}slice(e,n,r){let o=ao.create(this.parent,this.mark,!0,r),s=this.children,i=this.size;n<i&&(s=Od(s,n,i,r)),e>0&&(s=Od(s,0,e,r));for(let a=0;a<s.length;a++)s[a].parent=o;return o.children=s,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class br extends Zi{constructor(e,n,r,o,s,i,a,l,c){super(e,[],s,i),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=a}static create(e,n,r,o,s,i){let a=s.nodeViews[n.type.name],l,c=a&&a(n,s,()=>{if(!l)return i;if(l.parent)return l.parent.posBeforeChild(l)},r,o),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=po.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=QE(u,r,n),c?l=new iH(e,n,r,o,u,d||null,f,c,s,i+1):n.isText?new Rc(e,n,r,o,u,f,s):new br(e,n,r,o,u,d||null,f,s,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>W.empty)}return e}matchesNode(e,n,r){return this.dirty==Ut&&e.eq(this.node)&&tl(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,s=e.composing?this.localCompositionInfo(e,n):null,i=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new lH(this,i&&i.node,e);dH(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e,u):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?Ne.none:this.node.child(u).marks,r,e,u),l.placeWidget(c,e,o)},(c,u,d,f)=>{l.syncToMarks(c.marks,r,e,f);let h;l.findNodeMatch(c,u,d,f)||a&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(h=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(c,u,d,h,e)||l.updateNextNode(c,u,d,e,f,o)||l.addNode(c,u,d,e,o),o+=c.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Hr)&&(i&&this.protectLocalComposition(e,i),JE(this.contentDOM,this.children,e),Jo&&fH(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof pe)||r<n||o>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let i=s.nodeValue,a=pH(this.node.content,i,r-n,o-n);return a<0?null:{node:s,pos:a,text:i}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let i=new sH(this,s,n,o);e.input.compositionNodes.push(i),this.children=Od(this.children,r,r+o.length,e,i)}update(e,n,r,o){return this.dirty==Sn||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Ut}updateOuterDeco(e){if(tl(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=ZE(this.dom,this.nodeDOM,Ad(this.outerDeco,this.node,n),Ad(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Ig(t,e,n,r,o){QE(r,e,t);let s=new br(void 0,t,e,n,r,r,r,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class Rc extends br{constructor(e,n,r,o,s,i,a){super(e,n,r,o,s,null,i,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Sn||this.dirty!=Ut&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Ut||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=Ut,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),s=document.createTextNode(o.text);return new Rc(this.parent,o,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Sn)}get domAtom(){return!1}isText(e){return this.node.text==e}}class XE extends Zi{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Ut&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class iH extends br{constructor(e,n,r,o,s,i,a,l,c,u){super(e,n,r,o,s,i,a,c,u),this.spec=l}update(e,n,r,o){if(this.dirty==Sn)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,n,r);return s&&this.updateInner(e,n,r,o),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function JE(t,e,n){let r=t.firstChild,o=!1;for(let s=0;s<e.length;s++){let i=e[s],a=i.dom;if(a.parentNode==t){for(;a!=r;)r=Pg(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(i instanceof ao){let l=r?r.previousSibling:t.lastChild;JE(i.contentDOM,i.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=Pg(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const Vs=function(t){t&&(this.nodeName=t)};Vs.prototype=Object.create(null);const Vr=[new Vs];function Ad(t,e,n){if(t.length==0)return Vr;let r=n?Vr[0]:new Vs,o=[r];for(let s=0;s<t.length;s++){let i=t[s].type.attrs;if(i){i.nodeName&&o.push(r=new Vs(i.nodeName));for(let a in i){let l=i[a];l!=null&&(n&&o.length==1&&o.push(r=new Vs(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return o}function ZE(t,e,n,r){if(n==Vr&&r==Vr)return e;let o=e;for(let s=0;s<r.length;s++){let i=r[s],a=n[s];if(s){let l;a&&a.nodeName==i.nodeName&&o!=t&&(l=o.parentNode)&&l.nodeName.toLowerCase()==i.nodeName||(l=document.createElement(i.nodeName),l.pmIsDeco=!0,l.appendChild(o),a=Vr[0]),o=l}aH(o,a||Vr[0],i)}return o}function aH(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)o.indexOf(r[s])==-1&&t.classList.remove(r[s]);for(let s=0;s<o.length;s++)r.indexOf(o[s])==-1&&t.classList.add(o[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function QE(t,e,n){return ZE(t,t,Vr,Ad(e,n,t.nodeType!=1))}function tl(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Pg(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class lH{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=cH(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,o){let s=0,i=this.stack.length>>1,a=Math.min(i,e.length);for(;s<a&&(s==i-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<i;)this.destroyRest(),this.top.dirty=Ut,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;o<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let u=this.index;u<c;u++){let d=this.top.children[u];if(d.matchesMark(e[i])&&!this.isLocked(d.dom)){l=u;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let u=ao.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let s=-1,i;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(e,n,r))s=this.top.children.indexOf(i,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){s=a;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,o,s){let i=this.top.children[o];return i.dirty==Sn&&i.dom==i.contentDOM&&(i.dirty=Hr),i.update(e,n,r,s)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,s,i){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof br){let c=this.preMatch.matched.get(l);if(c!=null&&c!=s)return!1;let u=l.dom,d,f=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Sn&&tl(n,l.outerDeco));if(!f&&l.update(e,n,r,o))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,e,n,r,o,i)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Hr,d.updateChildren(o,i+1),d.dirty=Ut),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,s,i){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!tl(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let a=br.create(this.top,n,r,o,s,i);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,o,s){let i=br.create(this.top,e,n,r,o,s);i.contentDOM&&i.updateChildren(o,s+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let s=new qE(this.top,e,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof ao;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Rc)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((ut||it)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new XE(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function cH(t,e){let n=e,r=n.children.length,o=t.childCount,s=new Map,i=[];e:for(;o>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof ao)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,s.set(a,o),i.push(a)}}return{index:o,matched:s,matches:i.reverse()}}function uH(t,e){return t.type.side-e.type.side}function dH(t,e,n,r){let o=e.locals(t),s=0;if(o.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,o,e.forChild(s,u),c),s+=u.nodeSize}return}let i=0,a=[],l=null;for(let c=0;;){let u,d;for(;i<o.length&&o[i].to==s;){let y=o[i++];y.widget&&(u?(d||(d=[u])).push(y):u=y)}if(u)if(d){d.sort(uH);for(let y=0;y<d.length;y++)n(d[y],c,!!l)}else n(u,c,!!l);let f,h;if(l)h=-1,f=l,l=null;else if(c<t.childCount)h=c,f=t.child(c++);else break;for(let y=0;y<a.length;y++)a[y].to<=s&&a.splice(y--,1);for(;i<o.length&&o[i].from<=s&&o[i].to>s;)a.push(o[i++]);let g=s+f.nodeSize;if(f.isText){let y=g;i<o.length&&o[i].from<y&&(y=o[i].from);for(let v=0;v<a.length;v++)a[v].to<y&&(y=a[v].to);y<g&&(l=f.cut(y-s),f=f.cut(0,y-s),g=y,h=-1)}else for(;i<o.length&&o[i].to<g;)i++;let b=f.isInline&&!f.isLeaf?a.filter(y=>!y.inline):a.slice();r(f,b,e.forChild(s,f),h),s=g}}function fH(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function pH(t,e,n,r){for(let o=0,s=0;o<t.childCount&&s<=r;){let i=t.child(o++),a=s;if(s+=i.nodeSize,!i.isText)continue;let l=i.text;for(;o<t.childCount;){let c=t.child(o++);if(s+=c.nodeSize,!c.isText)break;l+=c.text}if(s>=n){if(s>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function Od(t,e,n,r,o){let s=[];for(let i=0,a=0;i<t.length;i++){let l=t[i],c=a,u=a+=l.size;c>=n||u<=e?s.push(l):(c<e&&s.push(l.slice(0,e-c,r)),o&&(s.push(o),o=void 0),u>n&&s.push(l.slice(n-c,l.size,r)))}return s}function lh(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),s=o&&o.size==0,i=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let a=r.resolve(i),l,c;if(Tc(n)){for(l=i;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&de.isSelectable(d)&&o.parent&&!(d.isInline&&B4(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;c=new de(i==f?a:r.resolve(f))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=i,f=i;for(let h=0;h<n.rangeCount;h++){let g=n.getRangeAt(h);d=Math.min(d,t.docView.posFromDOM(g.startContainer,g.startOffset,1)),f=Math.max(f,t.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(d<0)return null;[l,i]=f==t.state.selection.anchor?[f,d]:[d,f],a=r.resolve(i)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let d=e=="pointer"||t.state.selection.head<a.pos&&!s?1:-1;c=ch(t,u,a,d)}return c}function eM(t){return t.editable?t.hasFocus():nM(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Hn(t,e=!1){let n=t.state.selection;if(tM(t,n),!!eM(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&it){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&io(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)mH(t);else{let{anchor:r,head:o}=n,s,i;jg&&!(n instanceof pe)&&(n.$from.parent.inlineContent||(s=_g(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=_g(t,n.to))),t.docView.setSelection(r,o,t,e),jg&&(s&&Lg(s),i&&Lg(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&hH(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const jg=ut||it&&zE<63;function _g(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(ut&&o&&o.contentEditable=="false")return Nu(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return Nu(o);if(s)return Nu(s)}}function Nu(t){return t.contentEditable="true",ut&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Lg(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function hH(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!eM(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function mH(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,ot(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Et&&gr<=11&&(n.disabled=!0,n.disabled=!1)}function tM(t,e){if(e instanceof de){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Fg(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Fg(t)}function Fg(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ch(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||pe.between(e,n,r)}function $g(t){return t.editable&&!t.hasFocus()?!1:nM(t)}function nM(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function gH(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return io(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Dd(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),s=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return s&&be.findFrom(s,e)}function or(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Bg(t,e,n){let r=t.state.selection;if(r instanceof pe)if(n.indexOf("s")>-1){let{$head:o}=r,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let i=t.state.doc.resolve(o.pos+s.nodeSize*(e<0?-1:1));return or(t,new pe(r.$anchor,i))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=Dd(t.state,e);return o&&o instanceof de?or(t,o):!1}else if(!(zt&&n.indexOf("m")>-1)){let o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,i;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(i=t.docView.descAt(a))&&!i.contentDOM?de.isSelectable(s)?or(t,new de(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):Ji?or(t,new pe(t.state.doc.resolve(e<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof de&&r.node.isInline)return or(t,new pe(e>0?r.$to:r.$from));{let o=Dd(t.state,e);return o?or(t,o):!1}}}function nl(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ws(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function To(t,e){return e<0?bH(t):yH(t)}function bH(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,s,i=!1;for(Wt&&n.nodeType==1&&r<nl(n)&&Ws(n.childNodes[r],-1)&&(i=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Ws(a,-1))o=n,s=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(rM(n))break;{let a=n.previousSibling;for(;a&&Ws(a,-1);)o=n.parentNode,s=ot(a),a=a.previousSibling;if(a)n=a,r=nl(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}i?Id(t,n,r):o&&Id(t,o,s)}function yH(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=nl(n),s,i;for(;;)if(r<o){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Ws(a,1))s=n,i=++r;else break}else{if(rM(n))break;{let a=n.nextSibling;for(;a&&Ws(a,1);)s=a.parentNode,i=ot(a)+1,a=a.nextSibling;if(a)n=a,r=0,o=nl(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}s&&Id(t,s,i)}function rM(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function vH(t,e){for(;t&&e==t.childNodes.length&&!Xi(t);)e=ot(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function xH(t,e){for(;t&&!e&&!Xi(t);)e=ot(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Id(t,e,n){if(e.nodeType!=3){let s,i;(i=vH(e,n))?(e=i,n=0):(s=xH(e,n))&&(e=s,n=s.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Tc(r)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&Hn(t)},50)}function zg(t,e){let n=t.state.doc.resolve(e);if(!(it||HE)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left<o.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Hg(t,e,n){let r=t.state.selection;if(r instanceof pe&&!r.empty||n.indexOf("s")>-1||zt&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let i=Dd(t.state,e);if(i&&i instanceof de)return or(t,i)}if(!o.parent.inlineContent){let i=e<0?o:s,a=r instanceof Pt?be.near(i,e):be.findFrom(i,e);return a?or(t,a):!1}return!1}function Vg(t,e){if(!(t.state.selection instanceof pe))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let i=t.state.tr;return e<0?i.delete(n.pos-s.nodeSize,n.pos):i.delete(n.pos,n.pos+s.nodeSize),t.dispatch(i),!0}return!1}function Wg(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function wH(t){if(!ut||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Wg(t,r,"true"),setTimeout(()=>Wg(t,r,"false"),20)}return!1}function SH(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function CH(t,e){let n=e.keyCode,r=SH(e);if(n==8||zt&&n==72&&r=="c")return Vg(t,-1)||To(t,-1);if(n==46&&!e.shiftKey||zt&&n==68&&r=="c")return Vg(t,1)||To(t,1);if(n==13||n==27)return!0;if(n==37||zt&&n==66&&r=="c"){let o=n==37?zg(t,t.state.selection.from)=="ltr"?-1:1:-1;return Bg(t,o,r)||To(t,o)}else if(n==39||zt&&n==70&&r=="c"){let o=n==39?zg(t,t.state.selection.from)=="ltr"?1:-1:1;return Bg(t,o,r)||To(t,o)}else{if(n==38||zt&&n==80&&r=="c")return Hg(t,-1,r)||To(t,-1);if(n==40||zt&&n==78&&r=="c")return wH(t)||Hg(t,1,r)||To(t,1);if(r==(zt?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function uh(t,e){t.someProp("transformCopied",h=>{e=h(e,t)});let n=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,s--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let i=t.someProp("clipboardSerializer")||po.fromSchema(t.state.schema),a=cM(),l=a.createElement("div");l.appendChild(i.serializeFragment(r,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=lM[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let g=a.createElement(u[h]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=t.someProp("clipboardTextSerializer",h=>h(e,t))||e.content.textBetween(0,e.content.size,`
|
|
393
|
+
|
|
394
|
+
`);return{dom:l,text:f,slice:e}}function oM(t,e,n,r,o){let s=o.parent.type.spec.code,i,a;if(!n&&!e)return null;let l=!!e&&(r||s||!n);if(l){if(t.someProp("transformPastedText",f=>{e=f(e,s||r,t)}),s)return a=new Q(W.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
395
|
+
`))),0,0),t.someProp("transformPasted",f=>{a=f(a,t,!0)}),a;let d=t.someProp("clipboardTextParser",f=>f(e,o,r,t));if(d)a=d;else{let f=o.marks(),{schema:h}=t.state,g=po.fromSchema(h);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(b=>{let y=i.appendChild(document.createElement("p"));b&&y.appendChild(g.serializeNode(h.text(b,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),i=MH(n),Ji&&TH(i);let c=i&&i.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=i.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;i=f}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||mr.fromSchema(t.state.schema)).parseSlice(i,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!kH.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)a=RH(Ug(a,+u[1],+u[2]),u[4]);else if(a=Q.maxOpen(NH(a.content,o),!0),a.openStart||a.openEnd){let d=0,f=0;for(let h=a.content.firstChild;d<a.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=a.content.lastChild;f<a.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);a=Ug(a,d,f)}return t.someProp("transformPasted",d=>{a=d(a,t,l)}),a}const kH=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function NH(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),s,i=[];if(t.forEach(a=>{if(!i)return;let l=o.findWrapping(a.type),c;if(!l)return i=null;if(c=i.length&&s.length&&iM(l,s,a,i[i.length-1],0))i[i.length-1]=c;else{i.length&&(i[i.length-1]=aM(i[i.length-1],s.length));let u=sM(a,l);i.push(u),o=o.matchType(u.type),s=l}}),i)return W.from(i)}return t}function sM(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,W.from(t));return t}function iM(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let s=iM(t,e,n,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(W.from(sM(n,t,o+1))))}}function aM(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,aM(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(W.empty,!0);return t.copy(n.append(r))}function Pd(t,e,n,r,o,s){let i=e<0?t.firstChild:t.lastChild,a=i.content;return t.childCount>1&&(s=0),o<r-1&&(a=Pd(a,e,n,r,o+1,s)),o>=n&&(a=e<0?i.contentMatchAt(0).fillBefore(a,s<=o).append(a):a.append(i.contentMatchAt(i.childCount).fillBefore(W.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,i.copy(a))}function Ug(t,e,n){return e<t.openStart&&(t=new Q(Pd(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Q(Pd(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const lM={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Gg=null;function cM(){return Gg||(Gg=document.implementation.createHTMLDocument("title"))}let Eu=null;function EH(t){let e=window.trustedTypes;return e?(Eu||(Eu=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Eu.createHTML(t)):t}function MH(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=cM().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&lM[r[1].toLowerCase()])&&(t=o.map(s=>"<"+s+">").join("")+t+o.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=EH(t),o)for(let s=0;s<o.length;s++)n=n.querySelector(o[s])||n;return n}function TH(t){let e=t.querySelectorAll(it?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function RH(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:s,openEnd:i}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=W.from(l.create(r[a+1],o)),s++,i++}return new Q(o,s,i)}const bt={},yt={},AH={touchstart:!0,touchmove:!0};class OH{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function DH(t){for(let e in bt){let n=bt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{PH(t,r)&&!dh(t,r)&&(t.editable||!(r.type in yt))&&n(t,r)},AH[e]?{passive:!0}:void 0)}ut&&t.dom.addEventListener("input",()=>null),jd(t)}function dr(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function IH(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function jd(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>dh(t,r))})}function dh(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function PH(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function jH(t,e){!dh(t,e)&&bt[e.type]&&(t.editable||!(e.type in yt))&&bt[e.type](t,e)}yt.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!dM(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!($n&&it&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Jo&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Br(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||CH(t,n)?n.preventDefault():dr(t,"key")};yt.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};yt.keypress=(t,e)=>{let n=e;if(dM(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||zt&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof pe)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),s=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o,s))&&t.dispatch(s()),n.preventDefault()}};function Ac(t){return{left:t.clientX,top:t.clientY}}function _H(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function fh(t,e,n,r,o){if(r==-1)return!1;let s=t.state.doc.resolve(r);for(let i=s.depth+1;i>0;i--)if(t.someProp(e,a=>i>s.depth?a(t,n,s.nodeAfter,s.before(i),o,!0):a(t,n,s.node(i),s.before(i),o,!1)))return!0;return!1}function Vo(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function LH(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&de.isSelectable(r)?(Vo(t,new de(n)),!0):!1}function FH(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof de&&(r=n.node);let s=t.state.doc.resolve(e);for(let i=s.depth+1;i>0;i--){let a=i>s.depth?s.nodeAfter:s.node(i);if(de.isSelectable(a)){r&&n.$from.depth>0&&i>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?o=s.before(n.$from.depth):o=s.before(i);break}}return o!=null?(Vo(t,de.create(t.state.doc,o)),!0):!1}function $H(t,e,n,r,o){return fh(t,"handleClickOn",e,n,r)||t.someProp("handleClick",s=>s(t,e,r))||(o?FH(t,n):LH(t,n))}function BH(t,e,n,r){return fh(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function zH(t,e,n,r){return fh(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||HH(t,n,r)}function HH(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Vo(t,pe.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let s=o.depth+1;s>0;s--){let i=s>o.depth?o.nodeAfter:o.node(s),a=o.before(s);if(i.inlineContent)Vo(t,pe.create(r,a+1,a+1+i.content.size));else if(de.isSelectable(i))Vo(t,de.create(r,a));else continue;return!0}}function ph(t){return rl(t)}const uM=zt?"metaKey":"ctrlKey";bt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=ph(t),o=Date.now(),s="singleClick";o-t.input.lastClick.time<500&&_H(n,t.input.lastClick)&&!n[uM]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:s,button:n.button};let i=t.posAtCoords(Ac(n));i&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new VH(t,i,n,!!r)):(s=="doubleClick"?BH:zH)(t,i.pos,i.inside,n)?n.preventDefault():dr(t,"pointer"))};class VH{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[uM],this.allowDefault=r.shiftKey;let s,i;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),i=n.inside;else{let u=e.state.doc.resolve(n.pos);s=u.parent,i=u.depth?u.before():0}const a=o?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof de&&c.from<=i&&c.to>i)&&(this.mightDrag={node:s,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Wt&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),dr(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Hn(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ac(e))),this.updateAllowDefault(e),this.allowDefault||!n?dr(this.view,"pointer"):$H(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ut&&this.mightDrag&&!this.mightDrag.node.isAtom||it&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Vo(this.view,be.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):dr(this.view,"pointer")}move(e){this.updateAllowDefault(e),dr(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}bt.touchstart=t=>{t.input.lastTouch=Date.now(),ph(t),dr(t,"pointer")};bt.touchmove=t=>{t.input.lastTouch=Date.now(),dr(t,"pointer")};bt.contextmenu=t=>ph(t);function dM(t,e){return t.composing?!0:ut&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const WH=$n?5e3:-1;yt.compositionstart=yt.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof pe&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||it&&HE&&UH(t)))t.markCursor=t.state.storedMarks||n.marks(),rl(t,!0),t.markCursor=null;else if(rl(t,!e.selection.empty),Wt&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,s=r.focusOffset;o&&o.nodeType==1&&s!=0;){let i=s<0?o.lastChild:o.childNodes[s-1];if(!i)break;if(i.nodeType==3){let a=t.domSelection();a&&a.collapse(i,i.nodeValue.length);break}else o=i,s=-1}}t.input.composing=!0}fM(t,WH)};function UH(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}yt.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,fM(t,20))};function fM(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>rl(t),e))}function pM(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=KH());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function GH(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=F4(e.focusNode,e.focusOffset),r=$4(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(n==s||r==s)return s;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let i=n.pmViewDesc;if(!(!i||!i.isText(n.nodeValue)))return r}}return n||r}function KH(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function rl(t,e=!1){if(!($n&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),pM(t),e||t.docView&&t.docView.dirty){let n=lh(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function YH(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const di=Et&&gr<15||Jo&&V4<604;bt.copy=yt.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let s=di?null:n.clipboardData,i=r.content(),{dom:a,text:l}=uh(t,i);s?(n.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):YH(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function qH(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function XH(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?fi(t,r.value,null,o,e):fi(t,r.textContent,r.innerHTML,o,e)},50)}function fi(t,e,n,r,o){let s=oM(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,s||Q.empty)))return!0;if(!s)return!1;let i=qH(s),a=i?t.state.tr.replaceSelectionWith(i,r):t.state.tr.replaceSelection(s);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function hM(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}yt.paste=(t,e)=>{let n=e;if(t.composing&&!$n)return;let r=di?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&fi(t,hM(r),r.getData("text/html"),o,n)?n.preventDefault():XH(t,n)};class mM{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const JH=zt?"altKey":"ctrlKey";function gM(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[JH]}bt.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,s=o.empty?null:t.posAtCoords(Ac(n)),i;if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof de?o.to-1:o.to))){if(r&&r.mightDrag)i=de.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(i=de.create(t.state.doc,d.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:c,slice:u}=uh(t,a);(!n.dataTransfer.files.length||!it||zE>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(di?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",di||n.dataTransfer.setData("text/plain",c),t.dragging=new mM(u,gM(t,n),i)};bt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};yt.dragover=yt.dragenter=(t,e)=>e.preventDefault();yt.drop=(t,e)=>{try{ZH(t,e,t.dragging)}finally{t.dragging=null}};function ZH(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(Ac(e));if(!r)return;let o=t.state.doc.resolve(r.pos),s=n&&n.slice;s?t.someProp("transformPasted",h=>{s=h(s,t,!1)}):s=oM(t,hM(e.dataTransfer),di?null:e.dataTransfer.getData("text/html"),!1,o);let i=!!(n&&gM(t,e));if(t.someProp("handleDrop",h=>h(t,e,s||Q.empty,i))){e.preventDefault();return}if(!s)return;e.preventDefault();let a=s?xE(t.state.doc,o.pos,s):o.pos;a==null&&(a=o.pos);let l=t.state.tr;if(i){let{node:h}=n;h?h.replace(l):l.deleteSelection()}let c=l.mapping.map(a),u=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=l.doc;if(u?l.replaceRangeWith(c,c,s.content.firstChild):l.replaceRange(c,c,s),l.doc.eq(d))return;let f=l.doc.resolve(c);if(u&&de.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))l.setSelection(new de(f));else{let h=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((g,b,y,v)=>h=v),l.setSelection(ch(t,f,l.doc.resolve(h)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}bt.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Hn(t)},20))};bt.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};bt.beforeinput=(t,e)=>{if(it&&$n&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,Br(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in yt)bt[t]=yt[t];function pi(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class ol{constructor(e,n){this.toDOM=e,this.spec=n||Yr,this.side=this.spec.side||0}map(e,n,r,o){let{pos:s,deleted:i}=e.mapResult(n.from+o,this.side<0?-1:1);return i?null:new gt(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof ol&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&pi(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class yr{constructor(e,n){this.attrs=e,this.spec=n||Yr}map(e,n,r,o){let s=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,i=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return s>=i?null:new gt(s,i,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof yr&&pi(this.attrs,e.attrs)&&pi(this.spec,e.spec)}static is(e){return e.type instanceof yr}destroy(){}}class hh{constructor(e,n){this.attrs=e,this.spec=n||Yr}map(e,n,r,o){let s=e.mapResult(n.from+o,1);if(s.deleted)return null;let i=e.mapResult(n.to+o,-1);return i.deleted||i.pos<=s.pos?null:new gt(s.pos-r,i.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),s;return o==n.from&&!(s=e.child(r)).isText&&o+s.nodeSize==n.to}eq(e){return this==e||e instanceof hh&&pi(this.attrs,e.attrs)&&pi(this.spec,e.spec)}destroy(){}}class gt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new gt(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new gt(e,e,new ol(n,r))}static inline(e,n,r,o){return new gt(e,n,new yr(r,o))}static node(e,n,r,o){return new gt(e,n,new hh(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof yr}get widget(){return this.type instanceof ol}}const Io=[],Yr={};class Le{constructor(e,n){this.local=e.length?e:Io,this.children=n.length?n:Io}static create(e,n){return n.length?sl(n,e,0,Yr):lt}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,s){for(let i=0;i<this.local.length;i++){let a=this.local[i];a.from<=n&&a.to>=e&&(!s||s(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<n&&this.children[i+1]>e){let a=this.children[i]+1;this.children[i+2].findInner(e-a,n-a,r,o+a,s)}}map(e,n,r){return this==lt||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Yr)}mapInner(e,n,r,o,s){let i;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,o);l&&l.type.valid(n,l)?(i||(i=[])).push(l):s.onRemove&&s.onRemove(this.local[a].spec)}return this.children.length?QH(this.children,i||[],e,n,r,o,s):i?new Le(i.sort(qr),Io):lt}add(e,n){return n.length?this==lt?Le.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,s=0;e.forEach((a,l)=>{let c=l+r,u;if(u=yM(n,a,c)){for(o||(o=this.children.slice());s<o.length&&o[s]<l;)s+=3;o[s]==l?o[s+2]=o[s+2].addInner(a,u,c+1):o.splice(s,0,l,l+a.nodeSize,sl(u,a,c+1,Yr)),s+=3}});let i=bM(s?vM(n):n,-r);for(let a=0;a<i.length;a++)i[a].type.valid(e,i[a])||i.splice(a--,1);return new Le(i.length?this.local.concat(i).sort(qr):this.local,o||this.children)}remove(e){return e.length==0||this==lt?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let s=0;s<r.length;s+=3){let i,a=r[s]+n,l=r[s+1]+n;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>a&&d.to<l&&(e[u]=null,(i||(i=[])).push(d));if(!i)continue;r==this.children&&(r=this.children.slice());let c=r[s+2].removeInner(i,a+1);c!=lt?r[s+2]=c:(r.splice(s,3),s-=3)}if(o.length){for(let s=0,i;s<e.length;s++)if(i=e[s])for(let a=0;a<o.length;a++)o[a].eq(i,n)&&(o==this.local&&(o=this.local.slice()),o.splice(a--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new Le(o,r):lt}forChild(e,n){if(this==lt)return this;if(n.isLeaf)return Le.empty;let r,o;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let s=e+1,i=s+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<i&&l.to>s&&l.type instanceof yr){let c=Math.max(s,l.from)-s,u=Math.min(i,l.to)-s;c<u&&(o||(o=[])).push(l.copy(c,u))}}if(o){let a=new Le(o.sort(qr),Io);return r?new ar([a,r]):a}return r||lt}eq(e){if(this==e)return!0;if(!(e instanceof Le)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return mh(this.localsInner(e))}localsInner(e){if(this==lt)return Io;if(e.inlineContent||!this.local.some(yr.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof yr||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Le.empty=new Le([],[]);Le.removeOverlap=mh;const lt=Le.empty;class ar{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,Yr));return ar.from(r)}forChild(e,n){if(n.isLeaf)return Le.empty;let r=[];for(let o=0;o<this.members.length;o++){let s=this.members[o].forChild(e,n);s!=lt&&(s instanceof ar?r=r.concat(s.members):r.push(s))}return ar.from(r)}eq(e){if(!(e instanceof ar)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let s=this.members[o].localsInner(e);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let i=0;i<s.length;i++)n.push(s[i])}}return n?mh(r?n:n.sort(qr)):Io}static from(e){switch(e.length){case 0:return lt;case 1:return e[0];default:return new ar(e.every(n=>n instanceof Le)?e:e.reduce((n,r)=>n.concat(r instanceof Le?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function QH(t,e,n,r,o,s,i){let a=t.slice();for(let c=0,u=s;c<n.maps.length;c++){let d=0;n.maps[c].forEach((f,h,g,b)=>{let y=b-g-(h-f);for(let v=0;v<a.length;v+=3){let x=a[v+1];if(x<0||f>x+u-d)continue;let w=a[v]+u-d;h>=w?a[v+1]=f<=w?-2:-1:f>=u&&y&&(a[v]+=y,a[v+1]+=y)}d+=y}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+s),d=u-o;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(t[c+1]+s,-1),h=f-o,{index:g,offset:b}=r.content.findIndex(d),y=r.maybeChild(g);if(y&&b==d&&b+y.nodeSize==h){let v=a[c+2].mapInner(n,y,u+1,t[c]+s+1,i);v!=lt?(a[c]=d,a[c+1]=h,a[c+2]=v):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=eV(a,t,e,n,o,s,i),u=sl(c,r,0,i);e=u.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let h=u.children[d];for(;f<a.length&&a[f]<h;)f+=3;a.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new Le(e.sort(qr),a)}function bM(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new gt(o.from+e,o.to+e,o.type))}return n}function eV(t,e,n,r,o,s,i){function a(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(r,o,c);d?n.push(d):i.onRemove&&i.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+s+1);return n}function yM(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let s=0,i;s<t.length;s++)(i=t[s])&&i.from>n&&i.to<r&&((o||(o=[])).push(i),t[s]=null);return o}function vM(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function sl(t,e,n,r){let o=[],s=!1;e.forEach((a,l)=>{let c=yM(t,a,l+n);if(c){s=!0;let u=sl(c,a,n+l+1,r);u!=lt&&o.push(l,l+a.nodeSize,u)}});let i=bM(s?vM(t):t,-n).sort(qr);for(let a=0;a<i.length;a++)i[a].type.valid(e,i[a])||(r.onRemove&&r.onRemove(i[a].spec),i.splice(a--,1));return i.length||o.length?new Le(i,o):lt}function qr(t,e){return t.from-e.from||t.to-e.to}function mh(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let s=e[o];if(s.from==r.from){s.to!=r.to&&(e==t&&(e=t.slice()),e[o]=s.copy(s.from,r.to),Kg(e,o+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),Kg(e,o,r.copy(s.from,r.to)));break}}}return e}function Kg(t,e,n){for(;e<t.length&&qr(n,t[e])>0;)e++;t.splice(e,0,n)}function Mu(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=lt&&e.push(r)}),t.cursorWrapper&&e.push(Le.create(t.state.doc,[t.cursorWrapper.deco])),ar.from(e)}const tV={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},nV=Et&&gr<=11;class rV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class oV{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new rV,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Et&&gr<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():ut&&e.composing&&r.some(o=>o.type=="childList"&&o.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),nV&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,tV)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if($g(this.view)){if(this.suppressingSelectionUpdates)return Hn(this.view);if(Et&&gr<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&io(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let s=e.focusNode;s;s=Xo(s))n.add(s);for(let s=e.anchorNode;s;s=Xo(s))if(n.has(s)){r=s;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&$g(e)&&!this.ignoreSelectionChange(r),s=-1,i=-1,a=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(s=s<0?d.from:Math.min(d.from,s),i=i<0?d.to:Math.max(d.to,i),d.typeOver&&(a=!0))}if(l.some(u=>u.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of l)if(u.nodeName=="BR"&&u.parentNode){let d=u.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&u.parentNode.removeChild(u)}}else if(Wt&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||aV(e,d)!=h)&&f.remove()}}}let c=null;s<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Tc(r)&&(c=lh(e))&&c.eq(be.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Hn(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||o)&&(s>-1&&(e.docView.markDirty(s,i),sV(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,lV(e,l)),this.handleDOMChange(s,i,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Hn(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let d=e.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,s=e.nextSibling;if(Et&&gr<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(s=f)}let i=o&&o.parentNode==e.target?ot(o)+1:0,a=r.localPosFromDOM(e.target,i,-1),l=s&&s.parentNode==e.target?ot(s):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Yg=new WeakMap,qg=!1;function sV(t){if(!Yg.has(t)&&(Yg.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Wt,qg)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),qg=!0}}function Xg(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,s=e.endOffset,i=t.domAtPos(t.state.selection.anchor);return io(i.node,i.offset,o,s)&&([n,r,o,s]=[o,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:s}}function iV(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return Xg(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Xg(t,n):null}function aV(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function lV(t,e){var n;let{focusNode:r,focusOffset:o}=t.domSelectionRange();for(let s of e)if(((n=s.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let i=s.nextSibling;for(;i&&i.nodeName!="TD"&&i.nodeName!="TH";)i=i.nextSibling;if(i){let a=i;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(s,a.firstChild),r==s&&t.domSelection().collapse(s,o)}else s.parentNode.removeChild(s)}}function cV(t,e,n){let{node:r,fromOffset:o,toOffset:s,from:i,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Tc(l)||c.push({node:l.focusNode,offset:l.focusOffset})),it&&t.input.lastKeyCode===8)for(let y=s;y>o;y--){let v=r.childNodes[y-1],x=v.pmViewDesc;if(v.nodeName=="BR"&&!x){s=y;break}if(!x||x.size)break}let d=t.state.doc,f=t.someProp("domParser")||mr.fromSchema(t.state.schema),h=d.resolve(i),g=null,b=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:uV,context:h});if(c&&c[0].pos!=null){let y=c[0].pos,v=c[1]&&c[1].pos;v==null&&(v=y),g={anchor:y+i,head:v+i}}return{doc:b,sel:g,from:i,to:a}}function uV(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(ut&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||ut&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const dV=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function fV(t,e,n,r,o){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let N=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,E=lh(t,N);if(E&&!t.state.selection.eq(E)){if(it&&$n&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",O=>O(t,Br(13,"Enter"))))return;let T=t.state.tr.setSelection(E);N=="pointer"?T.setMeta("pointer",!0):N=="key"&&T.scrollIntoView(),s&&T.setMeta("composition",s),t.dispatch(T)}return}let i=t.state.doc.resolve(e),a=i.sharedDepth(n);e=i.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=cV(t,e,n),u=t.state.doc,d=u.slice(c.from,c.to),f,h;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(f=t.state.selection.to,h="end"):(f=t.state.selection.from,h="start"),t.input.lastKeyCode=null;let g=mV(d.content,c.doc.content,c.from,f,h);if(g&&t.input.domChangeCount++,(Jo&&t.input.lastIOSEnter>Date.now()-225||$n)&&o.some(N=>N.nodeType==1&&!dV.test(N.nodeName))&&(!g||g.endA>=g.endB)&&t.someProp("handleKeyDown",N=>N(t,Br(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!g)if(r&&l instanceof pe&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))g={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let N=Jg(t,t.state.doc,c.sel);if(N&&!N.eq(t.state.selection)){let E=t.state.tr.setSelection(N);s&&E.setMeta("composition",s),t.dispatch(E)}}return}t.state.selection.from<t.state.selection.to&&g.start==g.endB&&t.state.selection instanceof pe&&(g.start>t.state.selection.from&&g.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?g.start=t.state.selection.from:g.endA<t.state.selection.to&&g.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(g.endB+=t.state.selection.to-g.endA,g.endA=t.state.selection.to)),Et&&gr<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)==" "&&(g.start--,g.endA--,g.endB--);let b=c.doc.resolveNoCache(g.start-c.from),y=c.doc.resolveNoCache(g.endB-c.from),v=u.resolve(g.start),x=b.sameParent(y)&&b.parent.inlineContent&&v.end()>=g.endA;if((Jo&&t.input.lastIOSEnter>Date.now()-225&&(!x||o.some(N=>N.nodeName=="DIV"||N.nodeName=="P"))||!x&&b.pos<c.doc.content.size&&(!b.sameParent(y)||!b.parent.inlineContent)&&b.pos<y.pos&&!/\S/.test(c.doc.textBetween(b.pos,y.pos,"","")))&&t.someProp("handleKeyDown",N=>N(t,Br(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>g.start&&hV(u,g.start,g.endA,b,y)&&t.someProp("handleKeyDown",N=>N(t,Br(8,"Backspace")))){$n&&it&&t.domObserver.suppressSelectionUpdates();return}it&&g.endB==g.start&&(t.input.lastChromeDelete=Date.now()),$n&&!x&&b.start()!=y.start()&&y.parentOffset==0&&b.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,y=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(N){return N(t,Br(13,"Enter"))})},20));let w=g.start,S=g.endA,C=N=>{let E=N||t.state.tr.replace(w,S,c.doc.slice(g.start-c.from,g.endB-c.from));if(c.sel){let T=Jg(t,E.doc,c.sel);T&&!(it&&t.composing&&T.empty&&(g.start!=g.endB||t.input.lastChromeDelete<Date.now()-100)&&(T.head==w||T.head==E.mapping.map(S)-1)||Et&&T.empty&&T.head==w)&&E.setSelection(T)}return s&&E.setMeta("composition",s),E.scrollIntoView()},k;if(x)if(b.pos==y.pos){Et&&gr<=11&&b.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Hn(t),20));let N=C(t.state.tr.delete(w,S)),E=u.resolve(g.start).marksAcross(u.resolve(g.endA));E&&N.ensureMarks(E),t.dispatch(N)}else if(g.endA==g.endB&&(k=pV(b.parent.content.cut(b.parentOffset,y.parentOffset),v.parent.content.cut(v.parentOffset,g.endA-v.start())))){let N=C(t.state.tr);k.type=="add"?N.addMark(w,S,k.mark):N.removeMark(w,S,k.mark),t.dispatch(N)}else if(b.parent.child(b.index()).isText&&b.index()==y.index()-(y.textOffset?0:1)){let N=b.parent.textBetween(b.parentOffset,y.parentOffset),E=()=>C(t.state.tr.insertText(N,w,S));t.someProp("handleTextInput",T=>T(t,w,S,N,E))||t.dispatch(E())}else t.dispatch(C());else t.dispatch(C())}function Jg(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:ch(t,e.resolve(n.anchor),e.resolve(n.head))}function pV(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,s=r,i,a,l;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)s=n[u].removeFromSet(s);if(o.length==1&&s.length==0)a=o[0],i="add",l=u=>u.mark(a.addToSet(u.marks));else if(o.length==0&&s.length==1)a=s[0],i="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(W.from(c).eq(t))return{mark:a,type:i}}function hV(t,e,n,r,o){if(n-e<=o.pos-r.pos||Tu(r,!0,!1)<o.pos)return!1;let s=t.resolve(e);if(!r.parent.isTextblock){let a=s.nodeAfter;return a!=null&&n==e+a.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let i=t.resolve(Tu(s,!0,!0));return!i.parent.isTextblock||i.pos>n||Tu(i,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(i.parent.content)}function Tu(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let s=t.node(r).maybeChild(t.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,o++}return o}function mV(t,e,n,r,o){let s=t.findDiffStart(e,n);if(s==null)return null;let{a:i,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let l=Math.max(0,s-Math.min(i,a));r-=i+l-s}if(i<s&&t.size<e.size){let l=r<=s&&r>=i?s-r:0;s-=l,s&&s<e.size&&Zg(e.textBetween(s-1,s+1))&&(s+=l?1:-1),a=s+(a-i),i=s}else if(a<s){let l=r<=s&&r>=a?s-r:0;s-=l,s&&s<t.size&&Zg(t.textBetween(s-1,s+1))&&(s+=l?1:-1),i=s+(i-a),a=s}return{start:s,endA:i,endB:a}}function Zg(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class xM{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new OH,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(rb),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=tb(this),eb(this),this.nodeViews=nb(this),this.docView=Ig(this.state.doc,Qg(this),Mu(this),this.dom,this),this.domObserver=new oV(this,(r,o,s,i)=>fV(this,r,o,s,i)),this.domObserver.start(),DH(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&jd(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(rb),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,s=!1,i=!1;e.storedMarks&&this.composing&&(pM(this),i=!0),this.state=e;let a=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=nb(this);bV(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&jd(this),this.editable=tb(this),eb(this);let l=Mu(this),c=Qg(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(o.selection))&&(i=!0);let f=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&G4(this);if(i){this.domObserver.stop();let h=d&&(Et||it)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&gV(o.selection,e.selection);if(d){let g=it?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=GH(this)),(s||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Ig(e.doc,c,l,this.dom,this)),g&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&gH(this))?Hn(this,h):(tM(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&K4(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof de){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Mg(this,n.getBoundingClientRect(),e)}else Mg(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let s=r.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==r.node&&(o=s)}this.dragging=new mM(e.slice,e.move,o<0?void 0:de.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let i=0;i<this.directPlugins.length;i++){let a=this.directPlugins[i].props[e];if(a!=null&&(o=n?n(a):a))return o}let s=this.state.plugins;if(s)for(let i=0;i<s.length;i++){let a=s[i].props[e];if(a!=null&&(o=n?n(a):a))return o}}hasFocus(){if(Et){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Y4(this.dom),Hn(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Q4(this,e)}coordsAtPos(e,n=1){return KE(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return oH(this,n||this.state,e)}pasteHTML(e,n){return fi(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return fi(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return uh(this,e)}destroy(){this.docView&&(IH(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Mu(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,_4())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return jH(this,e)}domSelectionRange(){let e=this.domSelection();return e?ut&&this.root.nodeType===11&&z4(this.dom.ownerDocument)==this.dom&&iV(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}xM.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function Qg(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[gt.node(0,t.state.doc.content.size,e)]}function eb(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:gt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function tb(t){return!t.someProp("editable",e=>e(t.state)===!1)}function gV(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function nb(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function bV(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function rb(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Sr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},il={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},yV=typeof navigator<"u"&&/Mac/.test(navigator.platform),vV=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var st=0;st<10;st++)Sr[48+st]=Sr[96+st]=String(st);for(var st=1;st<=24;st++)Sr[st+111]="F"+st;for(var st=65;st<=90;st++)Sr[st]=String.fromCharCode(st+32),il[st]=String.fromCharCode(st);for(var Ru in Sr)il.hasOwnProperty(Ru)||(il[Ru]=Sr[Ru]);function xV(t){var e=yV&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||vV&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?il:Sr)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const wV=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),SV=typeof navigator<"u"&&/Win/.test(navigator.platform);function CV(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,s,i;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))wV?i=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),i&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function kV(t){let e=Object.create(null);for(let n in t)e[CV(n)]=t[n];return e}function Au(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function NV(t){return new $e({props:{handleKeyDown:wM(t)}})}function wM(t){let e=kV(t);return function(n,r){let o=xV(r),s,i=e[Au(o,r)];if(i&&i(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[Au(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(SV&&r.ctrlKey&&r.altKey)&&(s=Sr[r.keyCode])&&s!=o){let a=e[Au(s,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var EV=Object.defineProperty,gh=(t,e)=>{for(var n in e)EV(t,n,{get:e[n],enumerable:!0})};function Oc(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,s=n.storedMarks,n}}}var Dc=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([i,a])=>[i,(...c)=>{const u=a(...c)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:s}=r,i=[],a=!!t,l=t||o.tr,c=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(l),i.every(d=>d===!0)),u={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...g)=>{const b=this.buildProps(l,e),y=f(...g)(b);return i.push(y),u}])),run:c};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,s=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>l(...c)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:s}=r,i={tr:t,editor:r,view:s,state:Oc({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(i)]))}};return i}},SM={};gh(SM,{blur:()=>MV,clearContent:()=>TV,clearNodes:()=>RV,command:()=>AV,createParagraphNear:()=>OV,cut:()=>DV,deleteCurrentNode:()=>IV,deleteNode:()=>PV,deleteRange:()=>jV,deleteSelection:()=>_V,enter:()=>LV,exitCode:()=>FV,extendMarkRange:()=>$V,first:()=>BV,focus:()=>HV,forEach:()=>VV,insertContent:()=>WV,insertContentAt:()=>KV,joinBackward:()=>XV,joinDown:()=>qV,joinForward:()=>JV,joinItemBackward:()=>ZV,joinItemForward:()=>QV,joinTextblockBackward:()=>eW,joinTextblockForward:()=>tW,joinUp:()=>YV,keyboardShortcut:()=>rW,lift:()=>oW,liftEmptyBlock:()=>sW,liftListItem:()=>iW,newlineInCode:()=>aW,resetAttributes:()=>lW,scrollIntoView:()=>cW,selectAll:()=>uW,selectNodeBackward:()=>dW,selectNodeForward:()=>fW,selectParentNode:()=>pW,selectTextblockEnd:()=>hW,selectTextblockStart:()=>mW,setContent:()=>gW,setMark:()=>_W,setMeta:()=>LW,setNode:()=>FW,setNodeSelection:()=>$W,setTextDirection:()=>BW,setTextSelection:()=>zW,sinkListItem:()=>HW,splitBlock:()=>VW,splitListItem:()=>WW,toggleList:()=>UW,toggleMark:()=>GW,toggleNode:()=>KW,toggleWrap:()=>YW,undoInputRule:()=>qW,unsetAllMarks:()=>XW,unsetMark:()=>JW,unsetTextDirection:()=>ZW,updateAttributes:()=>QW,wrapIn:()=>eU,wrapInList:()=>tU});var MV=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),TV=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),RV=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:s,$to:i})=>{t.doc.nodesBetween(s.pos,i.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+a.nodeSize)),h=d.blockRange(f);if(!h)return;const g=bs(h);if(a.type.isTextblock){const{defaultType:b}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,b)}(g||g===0)&&e.lift(h,g)})}),!0},AV=t=>e=>t(e),OV=()=>({state:t,dispatch:e})=>_E(t,e),DV=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,s=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const i=r.mapping.map(e);return r.insert(i,s.content),r.setSelection(new pe(r.doc.resolve(Math.max(i-1,0)))),!0},IV=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r.type){if(e){const a=o.before(s),l=o.after(s);t.delete(a,l).scrollIntoView()}return!0}return!1};function Ye(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var PV=t=>({tr:e,state:n,dispatch:r})=>{const o=Ye(t,n.schema),s=e.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===o){if(r){const l=s.before(i),c=s.after(i);e.delete(l,c).scrollIntoView()}return!0}return!1},jV=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},_V=()=>({state:t,dispatch:e})=>nh(t,e),LV=()=>({commands:t})=>t.keyboardShortcut("Enter"),FV=()=>({state:t,dispatch:e})=>w4(t,e);function bh(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function al(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:bh(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function CM(t,e,n={}){return t.find(r=>r.type===e&&al(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function ob(t,e,n={}){return!!CM(t,e,n)}function yh(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===e)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!CM([...o.node.marks],e,n)))return;let i=o.index,a=t.start()+o.offset,l=i+1,c=a+o.node.nodeSize;for(;i>0&&ob([...t.parent.child(i-1).marks],e,n);)i-=1,a-=t.parent.child(i).nodeSize;for(;l<t.parent.childCount&&ob([...t.parent.child(l).marks],e,n);)c+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:c}}function Gn(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var $V=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const s=Gn(t,r.schema),{doc:i,selection:a}=n,{$from:l,from:c,to:u}=a;if(o){const d=yh(l,s,e);if(d&&d.from<=c&&d.to>=u){const f=pe.create(i,d.from,d.to);n.setSelection(f)}}return!0},BV=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function kM(t){return t instanceof pe}function Wr(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function NM(t,e=null){if(!e)return null;const n=be.atStart(t),r=be.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,s=r.to;return e==="all"?pe.create(t,Wr(0,o,s),Wr(t.content.size,o,s)):pe.create(t,Wr(e,o,s),Wr(e,o,s))}function sb(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function ll(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function zV(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var HV=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const i=()=>{(ll()||sb())&&r.dom.focus(),zV()&&!ll()&&!sb()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(s&&t===null&&!kM(n.state.selection))return i(),!0;const a=NM(o.doc,t)||n.state.selection,l=n.state.selection.eq(a);return s&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},VV=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),WV=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),EM=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&EM(r)}return t};function da(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return EM(n)}function hi(t,e,n){if(t instanceof hr||t instanceof W)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return W.fromArray(t.map(a=>e.nodeFromJSON(a)));const i=e.nodeFromJSON(t);return n.errorOnInvalidContent&&i.check(),i}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),hi("",e,n)}if(o){if(n.errorOnInvalidContent){let i=!1,a="";const l=new cE({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(i=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?mr.fromSchema(l).parseSlice(da(t),n.parseOptions):mr.fromSchema(l).parse(da(t),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=mr.fromSchema(e);return n.slice?s.parseSlice(da(t),n.parseOptions).content:s.parse(da(t),n.parseOptions)}return hi("",e,n)}function UV(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof Qe||o instanceof et))return;const s=t.mapping.maps[r];let i=0;s.forEach((a,l,c,u)=>{i===0&&(i=u)}),t.setSelection(be.near(t.doc.resolve(i),n))}var GV=t=>!("type"in t),KV=(t,e,n)=>({tr:r,dispatch:o,editor:s})=>{var i;if(o){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=y=>{s.emit("contentError",{editor:s,error:y,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{hi(e,s.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(y){l(y)}try{a=hi(e,s.schema,{parseOptions:c,errorOnInvalidContent:(i=n.errorOnInvalidContent)!=null?i:s.options.enableContentCheck})}catch(y){return l(y),!1}let{from:u,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},f=!0,h=!0;if((GV(a)?a:[a]).forEach(y=>{y.check(),f=f?y.isText&&y.marks.length===0:!1,h=h?y.isBlock:!1}),u===d&&h){const{parent:y}=r.doc.resolve(u);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(u-=1,d+=1)}let b;if(f){if(Array.isArray(e))b=e.map(y=>y.text||"").join("");else if(e instanceof W){let y="";e.forEach(v=>{v.text&&(y+=v.text)}),b=y}else typeof e=="object"&&e&&e.text?b=e.text:b=e;r.insertText(b,u,d)}else{b=a;const y=r.doc.resolve(u),v=y.node(),x=y.parentOffset===0,w=v.isText||v.isTextblock,S=v.content.size>0;x&&w&&S&&(u=Math.max(0,u-1)),r.replaceWith(u,d,b)}n.updateSelection&&UV(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:b}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:b})}return!0},YV=()=>({state:t,dispatch:e})=>y4(t,e),qV=()=>({state:t,dispatch:e})=>v4(t,e),XV=()=>({state:t,dispatch:e})=>RE(t,e),JV=()=>({state:t,dispatch:e})=>IE(t,e),ZV=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Nc(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},QV=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Nc(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},eW=()=>({state:t,dispatch:e})=>g4(t,e),tW=()=>({state:t,dispatch:e})=>b4(t,e);function MM(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function nW(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,s,i;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))ll()||MM()?i=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),i&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}var rW=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const s=nW(t).split(/-(?!$)/),i=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function Cr(t,e,n={}){const{from:r,to:o,empty:s}=t.selection,i=e?Ye(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),g=Math.min(o,f+d.nodeSize);a.push({node:d,from:h,to:g})});const l=o-r,c=a.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>al(d.node.attrs,n,{strict:!1}));return s?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}var oW=(t,e={})=>({state:n,dispatch:r})=>{const o=Ye(t,n.schema);return Cr(n,o,e)?x4(n,r):!1},sW=()=>({state:t,dispatch:e})=>LE(t,e),iW=t=>({state:e,dispatch:n})=>{const r=Ye(t,e.schema);return D4(r)(e,n)},aW=()=>({state:t,dispatch:e})=>jE(t,e);function Ic(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function ib(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}var lW=(t,e)=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const a=Ic(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(s=Ye(t,r.schema)),a==="mark"&&(i=Gn(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,d)=>{s&&s===u.type&&(l=!0,o&&n.setNodeMarkup(d,void 0,ib(u.attrs,e))),i&&u.marks.length&&u.marks.forEach(f=>{i===f.type&&(l=!0,o&&n.addMark(d,d+u.nodeSize,i.create(ib(f.attrs,e))))})})}),l},cW=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),uW=()=>({tr:t,dispatch:e})=>{if(e){const n=new Pt(t.doc);t.setSelection(n)}return!0},dW=()=>({state:t,dispatch:e})=>OE(t,e),fW=()=>({state:t,dispatch:e})=>PE(t,e),pW=()=>({state:t,dispatch:e})=>k4(t,e),hW=()=>({state:t,dispatch:e})=>M4(t,e),mW=()=>({state:t,dispatch:e})=>E4(t,e);function _d(t,e,n={},r={}){return hi(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var gW=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:s,dispatch:i,commands:a})=>{const{doc:l}=s;if(r.preserveWhitespace!=="full"){const c=_d(t,o.schema,r,{errorOnInvalidContent:e??o.options.enableContentCheck});return i&&s.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return i&&s.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??o.options.enableContentCheck})};function TM(t,e){const n=Gn(e,t.schema),{from:r,to:o,empty:s}=t.selection,i=[];s?(t.storedMarks&&i.push(...t.storedMarks),i.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,l=>{i.push(...l.marks)});const a=i.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function RM(t,e){const n=new NE(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function bW(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function yW(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,s)=>{n(o)&&r.push({node:o,pos:s})}),r}function vW(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Pc(t){return e=>vW(e.$from,t)}function ce(t,e,n){return t.config[e]===void 0&&t.parent?ce(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?ce(t.parent,e,n):null}):t.config[e]}function vh(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=ce(e,"addExtensions",n);return r?[e,...vh(r())]:e}).flat(10)}function xh(t,e){const n=po.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function AM(t){return typeof t=="function"}function we(t,e=void 0,...n){return AM(t)?e?t.bind(e)(...n):t(...n):t}function xW(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Zo(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function OM(t){const e=[],{nodeExtensions:n,markExtensions:r}=Zo(t),o=[...n,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage,extensions:o},l=ce(i,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:{...s,...h}})})})})}),o.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage},l=ce(i,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const f={...s,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:i.name,name:u,attribute:f})})}),e}function qe(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,s])=>{if(!r[o]){r[o]=s;return}if(o==="class"){const a=s?String(s).split(" "):[],l=r[o]?r[o].split(" "):[],c=a.filter(u=>!l.includes(u));r[o]=[...l,...c].join(" ")}else if(o==="style"){const a=s?s.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[d,f]=u.split(":").map(h=>h.trim());c.set(d,f)}),a.forEach(u=>{const[d,f]=u.split(":").map(h=>h.trim());c.set(d,f)}),r[o]=Array.from(c.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[o]=s}),r},{})}function mi(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>qe(n,r),{})}function wW(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function ab(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((s,i)=>{const a=i.attribute.parseHTML?i.attribute.parseHTML(n):wW(n.getAttribute(i.name));return a==null?s:{...s,[i.name]:a}},{});return{...r,...o}}}}function lb(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&xW(n)?!1:n!=null))}function cb(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function SW(t,e){var n;const r=OM(t),{nodeExtensions:o,markExtensions:s}=Zo(t),i=(n=o.find(c=>ce(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(o.map(c=>{const u=r.filter(v=>v.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((v,x)=>{const w=ce(x,"extendNodeSchema",d);return{...v,...w?w(c):{}}},{}),h=lb({...f,content:we(ce(c,"content",d)),marks:we(ce(c,"marks",d)),group:we(ce(c,"group",d)),inline:we(ce(c,"inline",d)),atom:we(ce(c,"atom",d)),selectable:we(ce(c,"selectable",d)),draggable:we(ce(c,"draggable",d)),code:we(ce(c,"code",d)),whitespace:we(ce(c,"whitespace",d)),linebreakReplacement:we(ce(c,"linebreakReplacement",d)),defining:we(ce(c,"defining",d)),isolating:we(ce(c,"isolating",d)),attrs:Object.fromEntries(u.map(cb))}),g=we(ce(c,"parseHTML",d));g&&(h.parseDOM=g.map(v=>ab(v,u)));const b=ce(c,"renderHTML",d);b&&(h.toDOM=v=>b({node:v,HTMLAttributes:mi(v,u)}));const y=ce(c,"renderText",d);return y&&(h.toText=y),[c.name,h]})),l=Object.fromEntries(s.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((y,v)=>{const x=ce(v,"extendMarkSchema",d);return{...y,...x?x(c):{}}},{}),h=lb({...f,inclusive:we(ce(c,"inclusive",d)),excludes:we(ce(c,"excludes",d)),group:we(ce(c,"group",d)),spanning:we(ce(c,"spanning",d)),code:we(ce(c,"code",d)),attrs:Object.fromEntries(u.map(cb))}),g=we(ce(c,"parseHTML",d));g&&(h.parseDOM=g.map(y=>ab(y,u)));const b=ce(c,"renderHTML",d);return b&&(h.toDOM=y=>b({mark:y,HTMLAttributes:mi(y,u)})),[c.name,h]}));return new cE({topNode:i,nodes:a,marks:l})}function CW(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function cl(t){return t.sort((n,r)=>{const o=ce(n,"priority")||100,s=ce(r,"priority")||100;return o>s?-1:o<s?1:0})}function DM(t){const e=cl(vh(t)),n=CW(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function IM(t,e,n){const{from:r,to:o}=e,{blockSeparator:s=`
|
|
396
|
+
|
|
397
|
+
`,textSerializers:i={}}=n||{};let a="";return t.nodesBetween(r,o,(l,c,u,d)=>{var f;l.isBlock&&c>r&&(a+=s);const h=i==null?void 0:i[l.type.name];if(h)return u&&(a+=h({node:l,pos:c,parent:u,index:d,range:e})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)==null?void 0:f.slice(Math.max(r,c)-c,o-c))}),a}function kW(t,e){const n={from:0,to:t.content.size};return IM(t,n,e)}function PM(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function NW(t,e){const n=Ye(e,t.schema),{from:r,to:o}=t.selection,s=[];t.doc.nodesBetween(r,o,a=>{s.push(a)});const i=s.reverse().find(a=>a.type.name===n.name);return i?{...i.attrs}:{}}function jM(t,e){const n=Ic(typeof e=="string"?e:e.name,t.schema);return n==="node"?NW(t,e):n==="mark"?TM(t,e):{}}function EW(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function MW(t){const e=EW(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,i)=>i!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function _M(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,s)=>{const i=[];if(o.ranges.length)o.forEach((a,l)=>{i.push({from:a,to:l})});else{const{from:a,to:l}=n[s];if(a===void 0||l===void 0)return;i.push({from:a,to:l})}i.forEach(({from:a,to:l})=>{const c=e.slice(s).map(a,-1),u=e.slice(s).map(l),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),MW(r)}function wh(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const s=n.resolve(t),i=yh(s,o.type);i&&r.push({mark:o,...i})}):n.nodesBetween(t,e,(o,s)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(i=>({from:s,to:s+o.nodeSize,mark:i})))}),r}var TW=(t,e,n,r=20)=>{const o=t.doc.resolve(n);let s=r,i=null;for(;s>0&&i===null;){const a=o.node(s);(a==null?void 0:a.type.name)===e?i=a:s-=1}return[i,s]};function fa(t,e){return e.nodes[t]||e.marks[t]||null}function Aa(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}var RW=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,s,i,a)=>{var l,c;const u=((c=(l=o.type.spec).toText)==null?void 0:c.call(l,{node:o,pos:s,parent:i,index:a}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?u:u.slice(0,Math.max(0,r-s))}),n};function Ld(t,e,n={}){const{empty:r,ranges:o}=t.selection,s=e?Gn(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>al(d.attrs,n,{strict:!1}));let i=0;const a=[];if(o.forEach(({$from:d,$to:f})=>{const h=d.pos,g=f.pos;t.doc.nodesBetween(h,g,(b,y)=>{if(!b.isText&&!b.marks.length)return;const v=Math.max(h,y),x=Math.min(g,y+b.nodeSize),w=x-v;i+=w,a.push(...b.marks.map(S=>({mark:S,from:v,to:x})))})}),i===0)return!1;const l=a.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>al(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=a.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=i}function AW(t,e,n={}){if(!e)return Cr(t,null,n)||Ld(t,null,n);const r=Ic(e,t.schema);return r==="node"?Cr(t,e,n):r==="mark"?Ld(t,e,n):!1}var OW=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const s=Pc(a=>a.type.name===e)(t.selection);if(!s)return!1;const i=t.doc.resolve(s.pos+1);return o.pos+1===i.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},DW=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function ub(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function db(t,e){const{nodeExtensions:n}=Zo(e),r=n.find(i=>i.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},s=we(ce(r,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function jc(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(s=>{o!==!1&&(jc(s,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function LM(t){return t instanceof de}var FM=class $M{constructor(e){this.position=e}static fromJSON(e){return new $M(e.position)}toJSON(){return{position:this.position}}};function IW(t,e){const n=e.mapping.mapResult(t.position);return{position:new FM(n.pos),mapResult:n}}function PW(t){return new FM(t)}function jW(t,e,n){var r;const{selection:o}=e;let s=null;if(kM(o)&&(s=o.$cursor),s){const a=(r=t.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(c=>c.type.excludes(n)))}const{ranges:i}=o;return i.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const h=!f||f.type.allowsMarkType(n),g=!!n.isInSet(u.marks)||!u.marks.some(b=>b.type.excludes(n));c=h&&g}return!c}),c})}var _W=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=n,{empty:i,ranges:a}=s,l=Gn(t,r.schema);if(o)if(i){const c=TM(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const g=Math.max(h,u),b=Math.min(h+f.nodeSize,d);f.marks.find(v=>v.type===l)?f.marks.forEach(v=>{l===v.type&&n.addMark(g,b,l.create({...v.attrs,...e}))}):n.addMark(g,b,l.create(e))})});return jW(r,n,l)},LW=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),FW=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const s=Ye(t,n.schema);let i;return n.selection.$anchor.sameParent(n.selection.$head)&&(i=n.selection.$anchor.parent.attrs),s.isTextblock?o().command(({commands:a})=>kg(s,{...i,...e})(n)?!0:a.clearNodes()).command(({state:a})=>kg(s,{...i,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},$W=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Wr(t,0,r.content.size),s=de.create(r,o);e.setSelection(s)}return!0},BW=(t,e)=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=r;let i,a;return typeof e=="number"?(i=e,a=e):e&&"from"in e&&"to"in e?(i=e.from,a=e.to):(i=s.from,a=s.to),o&&n.doc.nodesBetween(i,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},zW=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:s}=typeof t=="number"?{from:t,to:t}:t,i=pe.atStart(r).from,a=pe.atEnd(r).to,l=Wr(o,i,a),c=Wr(s,i,a),u=pe.create(r,l,c);e.setSelection(u)}return!0},HW=t=>({state:e,dispatch:n})=>{const r=Ye(t,e.schema);return j4(r)(e,n)};function fb(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}var VW=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:s,doc:i}=e,{$from:a,$to:l}=s,c=o.extensionManager.attributes,u=Aa(c,a.node().type.name,a.node().attrs);if(s instanceof de&&s.node.isBlock)return!a.parentOffset||!zn(i,a.pos)?!1:(r&&(t&&fb(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:bW(a.node(-1).contentMatchAt(a.indexAfter(-1)));let h=d&&f?[{type:f,attrs:u}]:void 0,g=zn(e.doc,e.mapping.map(a.pos),1,h);if(!h&&!g&&zn(e.doc,e.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(g=!0,h=f?[{type:f,attrs:u}]:void 0),r){if(g&&(s instanceof pe&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,h),f&&!d&&!a.parentOffset&&a.parent.type!==f)){const b=e.mapping.map(a.before()),y=e.doc.resolve(b);a.node(-1).canReplaceWith(y.index(),y.index()+1,f)&&e.setNodeMarkup(e.mapping.map(a.before()),f)}t&&fb(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return g},WW=(t,e={})=>({tr:n,state:r,dispatch:o,editor:s})=>{var i;const a=Ye(t,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const d=l.node(-1);if(d.type!==a)return!1;const f=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let v=W.empty;const x=l.index(-1)?1:l.index(-2)?2:3;for(let E=l.depth-x;E>=l.depth-3;E-=1)v=W.from(l.node(E).copy(v));const w=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,S={...Aa(f,l.node().type.name,l.node().attrs),...e},C=((i=a.contentMatch.defaultType)==null?void 0:i.createAndFill(S))||void 0;v=v.append(W.from(a.createAndFill(null,C)||void 0));const k=l.before(l.depth-(x-1));n.replace(k,l.after(-w),new Q(v,4-x,0));let N=-1;n.doc.nodesBetween(k,n.doc.content.size,(E,T)=>{if(N>-1)return!1;E.isTextblock&&E.content.size===0&&(N=T+1)}),N>-1&&n.setSelection(pe.near(n.doc.resolve(N))),n.scrollIntoView()}return!0}const h=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,g={...Aa(f,d.type.name,d.attrs),...e},b={...Aa(f,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const y=h?[{type:a,attrs:g},{type:h,attrs:b}]:[{type:a,attrs:g}];if(!zn(n.doc,l.pos,2))return!1;if(o){const{selection:v,storedMarks:x}=r,{splittableMarks:w}=s.extensionManager,S=x||v.$to.parentOffset&&v.$from.marks();if(n.split(l.pos,2,y).scrollIntoView(),!S||!o)return!0;const C=S.filter(k=>w.includes(k.type.name));n.ensureMarks(C)}return!0},Ou=(t,e)=>{const n=Pc(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Or(t.doc,n.pos)&&t.join(n.pos),!0},Du=(t,e)=>{const n=Pc(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Or(t.doc,r)&&t.join(r),!0},UW=(t,e,n,r={})=>({editor:o,tr:s,state:i,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,h=Ye(t,i.schema),g=Ye(e,i.schema),{selection:b,storedMarks:y}=i,{$from:v,$to:x}=b,w=v.blockRange(x),S=y||b.$to.parentOffset&&b.$from.marks();if(!w)return!1;const C=Pc(k=>db(k.type.name,d))(b);if(w.depth>=1&&C&&w.depth-C.depth<=1){if(C.node.type===h)return c.liftListItem(g);if(db(C.node.type.name,d)&&h.validContent(C.node.content)&&a)return l().command(()=>(s.setNodeMarkup(C.pos,h),!0)).command(()=>Ou(s,h)).command(()=>Du(s,h)).run()}return!n||!S||!a?l().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>Ou(s,h)).command(()=>Du(s,h)).run():l().command(()=>{const k=u().wrapInList(h,r),N=S.filter(E=>f.includes(E.type.name));return s.ensureMarks(N),k?!0:c.clearNodes()}).wrapInList(h,r).command(()=>Ou(s,h)).command(()=>Du(s,h)).run()},GW=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=n,i=Gn(t,r.schema);return Ld(r,i,e)?o.unsetMark(i,{extendEmptyMarkRange:s}):o.setMark(i,e)},KW=(t,e,n={})=>({state:r,commands:o})=>{const s=Ye(t,r.schema),i=Ye(e,r.schema),a=Cr(r,s,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?o.setNode(i,l):o.setNode(s,{...l,...n})},YW=(t,e={})=>({state:n,commands:r})=>{const o=Ye(t,n.schema);return Cr(n,o,e)?r.lift(o):r.wrapIn(o,e)},qW=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let s;if(o.spec.isInputRules&&(s=o.getState(t))){if(e){const i=t.tr,a=s.transform;for(let l=a.steps.length-1;l>=0;l-=1)i.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=i.doc.resolve(s.from).marks();i.replaceWith(s.from,s.to,t.schema.text(s.text,l))}else i.delete(s.from,s.to)}return!0}}return!1},XW=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},JW=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:i=!1}=e,{selection:a}=n,l=Gn(t,r.schema),{$from:c,empty:u,ranges:d}=a;if(!o)return!0;if(u&&i){let{from:f,to:h}=a;const g=(s=c.marks().find(y=>y.type===l))==null?void 0:s.attrs,b=yh(c,l,g);b&&(f=b.from,h=b.to),n.removeMark(f,h,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},ZW=t=>({tr:e,state:n,dispatch:r})=>{const{selection:o}=n;let s,i;return typeof t=="number"?(s=t,i=t):t&&"from"in t&&"to"in t?(s=t.from,i=t.to):(s=o.from,i=o.to),r&&e.doc.nodesBetween(s,i,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},QW=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const a=Ic(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(s=Ye(t,r.schema)),a==="mark"&&(i=Gn(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;let f,h,g,b;n.selection.empty?r.doc.nodesBetween(u,d,(y,v)=>{s&&s===y.type&&(l=!0,g=Math.max(v,u),b=Math.min(v+y.nodeSize,d),f=v,h=y)}):r.doc.nodesBetween(u,d,(y,v)=>{v<u&&s&&s===y.type&&(l=!0,g=Math.max(v,u),b=Math.min(v+y.nodeSize,d),f=v,h=y),v>=u&&v<=d&&(s&&s===y.type&&(l=!0,o&&n.setNodeMarkup(v,void 0,{...y.attrs,...e})),i&&y.marks.length&&y.marks.forEach(x=>{if(i===x.type&&(l=!0,o)){const w=Math.max(v,u),S=Math.min(v+y.nodeSize,d);n.addMark(w,S,i.create({...x.attrs,...e}))}}))}),h&&(f!==void 0&&o&&n.setNodeMarkup(f,void 0,{...h.attrs,...e}),i&&h.marks.length&&h.marks.forEach(y=>{i===y.type&&o&&n.addMark(g,b,i.create({...y.attrs,...e}))}))}),l},eU=(t,e={})=>({state:n,dispatch:r})=>{const o=Ye(t,n.schema);return T4(o,e)(n,r)},tU=(t,e={})=>({state:n,dispatch:r})=>{const o=Ye(t,n.schema);return R4(o,e)(n,r)},nU=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},_c=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},rU=(t,e)=>{if(bh(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function pa(t){var e;const{editor:n,from:r,to:o,text:s,rules:i,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=RW(c)+s;return i.forEach(f=>{if(u)return;const h=rU(d,f.find);if(!h)return;const g=l.state.tr,b=Oc({state:l.state,transaction:g}),y={from:r-(h[0].length-s.length),to:o},{commands:v,chain:x,can:w}=new Dc({editor:n,state:b});f.handler({state:b,range:y,match:h,commands:v,chain:x,can:w})===null||!g.steps.length||(f.undoable&&g.setMeta(a,{transform:g,from:r,to:o,text:s}),l.dispatch(g),u=!0)}),u}function oU(t){const{editor:e,rules:n}=t,r=new $e({state:{init(){return null},apply(o,s,i){const a=o.getMeta(r);if(a)return a;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=xh(W.from(u),i.schema);const{from:d}=l,f=d+u.length;pa({editor:e,from:d,to:f,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:s}},props:{handleTextInput(o,s,i,a){return pa({editor:e,from:s,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:s}=o.state.selection;s&&pa({editor:e,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,s){if(s.key!=="Enter")return!1;const{$cursor:i}=o.state.selection;return i?pa({editor:e,from:i.pos,to:i.pos,text:`
|
|
398
|
+
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function sU(t){return Object.prototype.toString.call(t).slice(8,-1)}function ha(t){return sU(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function BM(t,e){const n={...t};return ha(t)&&ha(e)&&Object.keys(e).forEach(r=>{ha(e[r])&&ha(t[r])?n[r]=BM(t[r],e[r]):n[r]=e[r]}),n}var Sh=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...we(ce(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...we(ce(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>BM(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},ho=class zM extends Sh{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new zM(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const i=o.marks();if(!!!i.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=i.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function iU(t){return typeof t=="number"}var aU=class{constructor(t){this.find=t.find,this.handler=t.handler}},lU=(t,e,n)=>{if(bh(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const s=[o.text];return s.index=o.index,s.input=t,s.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(o.replaceWith)),s}):[]};function cU(t){const{editor:e,state:n,from:r,to:o,rule:s,pasteEvent:i,dropEvent:a}=t,{commands:l,chain:c,can:u}=new Dc({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,o,(h,g)=>{var b,y,v,x,w;if((y=(b=h.type)==null?void 0:b.spec)!=null&&y.code||!(h.isText||h.isTextblock||h.isInline))return;const S=(w=(x=(v=h.content)==null?void 0:v.size)!=null?x:h.nodeSize)!=null?w:0,C=Math.max(r,g),k=Math.min(o,g+S);if(C>=k)return;const N=h.isText?h.text||"":h.textBetween(C-g,k-g,void 0,"");lU(N,s.find,i).forEach(T=>{if(T.index===void 0)return;const O=C+T.index+1,A=O+T[0].length,D={from:n.tr.mapping.map(O),to:n.tr.mapping.map(A)},z=s.handler({state:n,range:D,match:T,commands:l,chain:c,can:u,pasteEvent:i,dropEvent:a});d.push(z)})}),d.every(h=>h!==null)}var ma=null,uU=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function dU(t){const{editor:e,rules:n}=t;let r=null,o=!1,s=!1,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:u,from:d,to:f,rule:h,pasteEvt:g})=>{const b=u.tr,y=Oc({state:u,transaction:b});if(!(!cU({editor:e,state:y,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:g,dropEvent:a})||!b.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,b}};return n.map(u=>new $e({view(d){const f=g=>{var b;r=(b=d.dom.parentElement)!=null&&b.contains(g.target)?d.dom.parentElement:null,r&&(ma=e)},h=()=>{ma&&(ma=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(s=r===d.dom.parentElement,a=f,!s){const h=ma;h!=null&&h.isEditable&&setTimeout(()=>{const g=h.state.selection;g&&h.commands.deleteRange({from:g.from,to:g.to})},10)}return!1},paste:(d,f)=>{var h;const g=(h=f.clipboardData)==null?void 0:h.getData("text/html");return i=f,o=!!(g!=null&&g.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const g=d[0],b=g.getMeta("uiEvent")==="paste"&&!o,y=g.getMeta("uiEvent")==="drop"&&!s,v=g.getMeta("applyPasteRules"),x=!!v;if(!b&&!y&&!x)return;if(x){let{text:C}=v;typeof C=="string"?C=C:C=xh(W.from(C),h.schema);const{from:k}=v,N=k+C.length,E=uU(C);return l({rule:u,state:h,from:k,to:{b:N},pasteEvt:E})}const w=f.doc.content.findDiffStart(h.doc.content),S=f.doc.content.findDiffEnd(h.doc.content);if(!(!iU(w)||!S||w===S.b))return l({rule:u,state:h,from:w,to:S,pasteEvt:i})}}))}var Lc=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=DM(t),this.schema=SW(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:fa(e.name,this.schema)},r=ce(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return cl([...this.extensions].reverse()).flatMap(r=>{const o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:fa(r.name,this.schema)},s=[],i=ce(r,"addKeyboardShortcuts",o);let a={};if(r.type==="mark"&&ce(r,"exitable",o)&&(a.ArrowRight=()=>ho.handleExit({editor:t,mark:r})),i){const f=Object.fromEntries(Object.entries(i()).map(([h,g])=>[h,()=>g({editor:t})]));a={...a,...f}}const l=NV(a);s.push(l);const c=ce(r,"addInputRules",o);if(ub(r,t.options.enableInputRules)&&c){const f=c();if(f&&f.length){const h=oU({editor:t,rules:f}),g=Array.isArray(h)?h:[h];s.push(...g)}}const u=ce(r,"addPasteRules",o);if(ub(r,t.options.enablePasteRules)&&u){const f=u();if(f&&f.length){const h=dU({editor:t,rules:f});s.push(...h)}}const d=ce(r,"addProseMirrorPlugins",o);if(d){const f=d();s.push(...f)}return s})}get attributes(){return OM(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Zo(this.extensions);return Object.fromEntries(e.filter(n=>!!ce(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Ye(n.name,this.schema)},s=ce(n,"addNodeView",o);if(!s)return[];const i=s();if(!i)return[];const a=(l,c,u,d,f)=>{const h=mi(l,r);return i({node:l,view:c,getPos:u,decorations:d,innerDecorations:f,editor:t,extension:n,HTMLAttributes:h})};return[n.name,a]}))}dispatchTransaction(t){const{editor:e}=this;return cl([...this.extensions].reverse()).reduceRight((r,o)=>{const s={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:fa(o.name,this.schema)},i=ce(o,"dispatchTransaction",s);return i?a=>{i.call(s,{transaction:a,next:r})}:r},t)}get markViews(){const{editor:t}=this,{markExtensions:e}=Zo(this.extensions);return Object.fromEntries(e.filter(n=>!!ce(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Gn(n.name,this.schema)},s=ce(n,"addMarkView",o);if(!s)return[];const i=(a,l,c)=>{const u=mi(a,r);return s()({mark:a,view:l,inline:c,editor:t,extension:n,HTMLAttributes:u,updateAttributes:d=>{NU(a,t,d)}})};return[n.name,i]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:fa(e.name,this.schema)};e.type==="mark"&&((n=we(ce(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const o=ce(e,"onBeforeCreate",r),s=ce(e,"onCreate",r),i=ce(e,"onUpdate",r),a=ce(e,"onSelectionUpdate",r),l=ce(e,"onTransaction",r),c=ce(e,"onFocus",r),u=ce(e,"onBlur",r),d=ce(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),s&&this.editor.on("create",s),i&&this.editor.on("update",i),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}};Lc.resolve=DM;Lc.sort=cl;Lc.flatten=vh;var fU={};gh(fU,{ClipboardTextSerializer:()=>VM,Commands:()=>WM,Delete:()=>UM,Drop:()=>GM,Editable:()=>KM,FocusEvents:()=>qM,Keymap:()=>XM,Paste:()=>JM,Tabindex:()=>ZM,TextDirection:()=>QM,focusEventsPluginKey:()=>YM});var Ue=class HM extends Sh{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new HM(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},VM=Ue.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new $e({key:new Ze("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:s}=o,i=Math.min(...s.map(u=>u.$from.pos)),a=Math.max(...s.map(u=>u.$to.pos)),l=PM(n);return IM(r,{from:i,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),WM=Ue.create({name:"commands",addCommands(){return{...SM}}}),UM=Ue.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,o;const s=()=>{var i,a,l,c;if((c=(l=(a=(i=this.editor.options.coreExtensionOptions)==null?void 0:i.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?c:t.getMeta("y-sync$"))return;const u=RM(t.before,[t,...e]);_M(u).forEach(h=>{u.mapping.mapResult(h.oldRange.from).deletedAfter&&u.mapping.mapResult(h.oldRange.to).deletedBefore&&u.before.nodesBetween(h.oldRange.from,h.oldRange.to,(g,b)=>{const y=b+g.nodeSize-2,v=h.oldRange.from<=b&&y<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:g,from:b,to:y,newFrom:u.mapping.map(b),newTo:u.mapping.map(y),deletedRange:h.oldRange,newRange:h.newRange,partial:!v,editor:this.editor,transaction:t,combinedTransform:u})})});const f=u.mapping;u.steps.forEach((h,g)=>{var b,y;if(h instanceof tn){const v=f.slice(g).map(h.from,-1),x=f.slice(g).map(h.to),w=f.invert().map(v,-1),S=f.invert().map(x),C=(b=u.doc.nodeAt(v-1))==null?void 0:b.marks.some(N=>N.eq(h.mark)),k=(y=u.doc.nodeAt(x))==null?void 0:y.marks.some(N=>N.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:w,to:S},newRange:{from:v,to:x},partial:!!(k||C),editor:this.editor,transaction:t,combinedTransform:u})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(s,0):s()}}),GM=Ue.create({name:"drop",addProseMirrorPlugins(){return[new $e({key:new Ze("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),KM=Ue.create({name:"editable",addProseMirrorPlugins(){return[new $e({key:new Ze("editable"),props:{editable:()=>this.editor.options.editable}})]}}),YM=new Ze("focusEvents"),qM=Ue.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new $e({key:YM,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),XM=Ue.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:f,parent:h}=d,g=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,b=g.parent.type.spec.isolating,y=d.pos-d.parentOffset,v=b&&g.parent.childCount===1?y===d.pos:be.atStart(c).from===f;return!u||!h.type.isTextblock||h.textContent.length||!v||v&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},s={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ll()||MM()?s:o},addProseMirrorPlugins(){return[new $e({key:new Ze("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(b=>b.getMeta("composition")))return;const r=t.some(b=>b.docChanged)&&!e.doc.eq(n.doc),o=t.some(b=>b.getMeta("preventClearDocument"));if(!r||o)return;const{empty:s,from:i,to:a}=e.selection,l=be.atStart(e.doc).from,c=be.atEnd(e.doc).to;if(s||!(i===l&&a===c)||!jc(n.doc))return;const f=n.tr,h=Oc({state:n,transaction:f}),{commands:g}=new Dc({editor:this.editor,state:h});if(g.clearNodes(),!!f.steps.length)return f}})]}}),JM=Ue.create({name:"paste",addProseMirrorPlugins(){return[new $e({key:new Ze("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),ZM=Ue.create({name:"tabindex",addProseMirrorPlugins(){return[new $e({key:new Ze("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),QM=Ue.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Zo(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new $e({key:new Ze("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),pU=class Ls{constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Ls(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Ls(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Ls(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,i=n.isInline,a=this.pos+r+(s?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!o&&!i&&l.depth<=this.depth)return;const c=new Ls(l,this.editor,o,o||i?n:null);o&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const s=o.node.attrs,i=Object.keys(n);for(let a=0;a<i.length;a+=1){const l=i[a];if(s[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const s=Object.keys(n);return this.children.forEach(i=>{r&&o.length>0||(i.node.type.name===e&&s.every(l=>n[l]===i.node.attrs[l])&&o.push(i),!(r&&o.length>0)&&(o=o.concat(i.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},hU=`.ProseMirror {
|
|
399
|
+
position: relative;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.ProseMirror {
|
|
403
|
+
word-wrap: break-word;
|
|
404
|
+
white-space: pre-wrap;
|
|
405
|
+
white-space: break-spaces;
|
|
406
|
+
-webkit-font-variant-ligatures: none;
|
|
407
|
+
font-variant-ligatures: none;
|
|
408
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.ProseMirror [contenteditable="false"] {
|
|
412
|
+
white-space: normal;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
416
|
+
white-space: pre-wrap;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.ProseMirror pre {
|
|
420
|
+
white-space: pre-wrap;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
img.ProseMirror-separator {
|
|
424
|
+
display: inline !important;
|
|
425
|
+
border: none !important;
|
|
426
|
+
margin: 0 !important;
|
|
427
|
+
width: 0 !important;
|
|
428
|
+
height: 0 !important;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.ProseMirror-gapcursor {
|
|
432
|
+
display: none;
|
|
433
|
+
pointer-events: none;
|
|
434
|
+
position: absolute;
|
|
435
|
+
margin: 0;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.ProseMirror-gapcursor:after {
|
|
439
|
+
content: "";
|
|
440
|
+
display: block;
|
|
441
|
+
position: absolute;
|
|
442
|
+
top: -2px;
|
|
443
|
+
width: 20px;
|
|
444
|
+
border-top: 1px solid black;
|
|
445
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
@keyframes ProseMirror-cursor-blink {
|
|
449
|
+
to {
|
|
450
|
+
visibility: hidden;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.ProseMirror-hideselection *::selection {
|
|
455
|
+
background: transparent;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
459
|
+
background: transparent;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.ProseMirror-hideselection * {
|
|
463
|
+
caret-color: transparent;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
467
|
+
display: block;
|
|
468
|
+
}`;function mU(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}var gU=class extends nU{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:IW,createMappablePosition:PW},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:o,moved:s})=>this.options.onDrop(r,o,s)),this.on("paste",({event:r,slice:o})=>this.options.onPaste(r,o)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=NM(e,this.options.autofocus);this.editorState=Lo.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=mU(hU,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=AM(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(o=>{const s=typeof o=="string"?`${o}$`:o.key;n=n.filter(i=>!i.key.startsWith(s))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[KM,VM.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),WM,qM,XM,ZM,GM,JM,UM,QM.configure({direction:this.options.textDirection})].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new Lc(r,this)}createCommandManager(){this.commandManager=new Dc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=_d(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=_d(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),o=n?this.extensionManager.dispatchTransaction(r):r;this.editorView=new xM(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.prependClass(),this.injectCSS();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var u;return(u=this.capturedTransaction)==null?void 0:u.step(c)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),o=n.includes(t),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!o)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=i==null?void 0:i.getMeta("focus"),l=i==null?void 0:i.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:i}),l&&this.emit("blur",{editor:this,event:l.event,transaction:i}),!(t.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return jM(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return AW(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return xh(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
|
|
469
|
+
|
|
470
|
+
`,textSerializers:n={}}=t||{};return kW(this.state.doc,{blockSeparator:e,textSerializers:{...PM(this.schema),...n}})}get isEmpty(){return jc(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new pU(e,this)}get $doc(){return this.$pos(0)}};function Qo(t){return new _c({find:t.find,handler:({state:e,range:n,match:r})=>{const o=we(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:s}=e,i=r[r.length-1],a=r[0];if(i){const l=a.search(/\S/),c=n.from+a.indexOf(i),u=c+i.length;if(wh(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(b=>b===t.type&&b!==h.mark.type)).filter(h=>h.to>c).length)return null;u<n.to&&s.delete(u,n.to),c>n.from&&s.delete(n.from+l,c);const f=n.from+l+i.length;s.addMark(n.from+l,f,t.type.create(o||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function bU(t){return new _c({find:t.find,handler:({state:e,range:n,match:r})=>{const o=we(t.getAttributes,void 0,r)||{},{tr:s}=e,i=n.from;let a=n.to;const l=t.type.create(o);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=i+c;u>a?u=a:a=u+r[1].length;const d=r[0][r[0].length-1];s.insertText(d,i+r[0].length-1),s.replaceWith(u,a,l)}else if(r[0]){const c=t.type.isInline?i:i-1;s.insert(c,t.type.create(o)).delete(s.mapping.map(i),s.mapping.map(a))}s.scrollIntoView()},undoable:t.undoable})}function Fd(t){return new _c({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),s=we(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,s)},undoable:t.undoable})}function es(t){return new _c({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const s=we(t.getAttributes,void 0,r)||{},i=e.tr.delete(n.from,n.to),l=i.doc.resolve(n.from).blockRange(),c=l&&eh(l,t.type,s);if(!c)return null;if(i.wrap(l,c),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,g=f||d.$to.parentOffset&&d.$from.marks();if(g){const b=g.filter(y=>h.includes(y.type.name));i.ensureMarks(b)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,s).run()}const u=i.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Or(i.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&i.join(n.from-1)},undoable:t.undoable})}function yU(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof de){const s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let o=r.depth;for(;o>=0;){const s=r.index(o);if(r.node(o).contentMatchAt(s).matchType(e))return!0;o-=1}return!1}var vU={};gh(vU,{createAtomBlockMarkdownSpec:()=>xU,createBlockMarkdownSpec:()=>wU,createInlineMarkdownSpec:()=>kU,parseAttributes:()=>Ch,parseIndentedBlocks:()=>$d,renderNestedMarkdownContent:()=>Nh,serializeAttributes:()=>kh});function Ch(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,c=>(n.push(c),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){const c=o.map(u=>u.trim().slice(1));e.class=c.join(" ")}const s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);const i=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(i)).forEach(([,c,u])=>{var d;const f=parseInt(((d=u.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),h=n[f];h&&(e[c]=h.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(u=>{u.match(/^[a-zA-Z][\w-]*$/)&&(e[u]=!0)}),e}function kh(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function xU(t){const{nodeName:e,name:n,parseAttributes:r=Ch,serializeAttributes:o=kh,defaultAttributes:s={},requiredAttributes:i=[],allowedAttributes:a}=t,l=n||e,c=u=>{if(!a)return u;const d={};return a.forEach(f=>{f in u&&(d[f]=u[f])}),d};return{parseMarkdown:(u,d)=>{const f={...s,...u.attributes};return d.createNode(e,f,[])},markdownTokenizer:{name:e,level:"block",start(u){var d;const f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),h=(d=u.match(f))==null?void 0:d.index;return h!==void 0?h:-1},tokenize(u,d,f){const h=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),g=u.match(h);if(!g)return;const b=g[1]||"",y=r(b);if(!i.find(x=>!(x in y)))return{type:e,raw:g[0],attributes:y}}},renderMarkdown:u=>{const d=c(u.attrs||{}),f=o(d),h=f?` {${f}}`:"";return`:::${l}${h} :::`}}}function wU(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=Ch,serializeAttributes:s=kh,defaultAttributes:i={},content:a="block",allowedAttributes:l}=t,c=n||e,u=d=>{if(!l)return d;const f={};return l.forEach(h=>{h in d&&(f[h]=d[h])}),f};return{parseMarkdown:(d,f)=>{let h;if(r){const b=r(d);h=typeof b=="string"?[{type:"text",text:b}]:b}else a==="block"?h=f.parseChildren(d.tokens||[]):h=f.parseInline(d.tokens||[]);const g={...i,...d.attributes};return f.createNode(e,g,h)},markdownTokenizer:{name:e,level:"block",start(d){var f;const h=new RegExp(`^:::${c}`,"m"),g=(f=d.match(h))==null?void 0:f.index;return g!==void 0?g:-1},tokenize(d,f,h){var g;const b=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),y=d.match(b);if(!y)return;const[v,x=""]=y,w=o(x);let S=1;const C=v.length;let k="";const N=/^:::([\w-]*)(\s.*)?/gm,E=d.slice(C);for(N.lastIndex=0;;){const T=N.exec(E);if(T===null)break;const O=T.index,A=T[1];if(!((g=T[2])!=null&&g.endsWith(":::"))){if(A)S+=1;else if(S-=1,S===0){const D=E.slice(0,O);k=D.trim();const z=d.slice(0,C+O+T[0].length);let $=[];if(k)if(a==="block")for($=h.blockTokens(D),$.forEach(Y=>{Y.text&&(!Y.tokens||Y.tokens.length===0)&&(Y.tokens=h.inlineTokens(Y.text))});$.length>0;){const Y=$[$.length-1];if(Y.type==="paragraph"&&(!Y.text||Y.text.trim()===""))$.pop();else break}else $=h.inlineTokens(k);return{type:e,raw:z,attributes:w,content:k,tokens:$}}}}}},renderMarkdown:(d,f)=>{const h=u(d.attrs||{}),g=s(h),b=g?` {${g}}`:"",y=f.renderChildren(d.content||[],`
|
|
471
|
+
|
|
472
|
+
`);return`:::${c}${b}
|
|
473
|
+
|
|
474
|
+
${y}
|
|
475
|
+
|
|
476
|
+
:::`}}}function SU(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,o,s,i]=r;e[o]=s||i,r=n.exec(t)}return e}function CU(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function kU(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=SU,serializeAttributes:s=CU,defaultAttributes:i={},selfClosing:a=!1,allowedAttributes:l}=t,c=n||e,u=f=>{if(!l)return f;const h={};return l.forEach(g=>{const b=typeof g=="string"?g:g.name,y=typeof g=="string"?void 0:g.skipIfDefault;if(b in f){const v=f[b];if(y!==void 0&&v===y)return;h[b]=v}}),h},d=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{const g={...i,...f.attributes};if(a)return h.createNode(e,g);const b=r?r(f):f.content||"";return b?h.createNode(e,g,[h.createTextNode(b)]):h.createNode(e,g,[])},markdownTokenizer:{name:e,level:"inline",start(f){const h=a?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),g=f.match(h),b=g==null?void 0:g.index;return b!==void 0?b:-1},tokenize(f,h,g){const b=a?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),y=f.match(b);if(!y)return;let v="",x="";if(a){const[,S]=y;x=S}else{const[,S,C]=y;x=S,v=C||""}const w=o(x.trim());return{type:e,raw:y[0],content:v.trim(),attributes:w}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(v=>v.type==="text").map(v=>v.text).join(""));const g=u(f.attrs||{}),b=s(g),y=b?` ${b}`:"";return a?`[${c}${y}]`:`[${c}${y}]${h}[/${c}]`}}}function $d(t,e,n){var r,o,s,i;const a=t.split(`
|
|
477
|
+
`),l=[];let c="",u=0;const d=e.baseIndentSize||2;for(;u<a.length;){const f=a[u],h=f.match(e.itemPattern);if(!h){if(l.length>0)break;if(f.trim()===""){u+=1,c=`${c}${f}
|
|
478
|
+
`;continue}else return}const g=e.extractItemData(h),{indentLevel:b,mainContent:y}=g;c=`${c}${f}
|
|
479
|
+
`;const v=[y];for(u+=1;u<a.length;){const C=a[u];if(C.trim()===""){const N=a.slice(u+1).findIndex(O=>O.trim()!=="");if(N===-1)break;if((((o=(r=a[u+1+N].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>b){v.push(C),c=`${c}${C}
|
|
480
|
+
`,u+=1;continue}else break}if((((i=(s=C.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:i.length)||0)>b)v.push(C),c=`${c}${C}
|
|
481
|
+
`,u+=1;else break}let x;const w=v.slice(1);if(w.length>0){const C=w.map(k=>k.slice(b+d)).join(`
|
|
482
|
+
`);C.trim()&&(e.customNestedParser?x=e.customNestedParser(C):x=n.blockTokens(C))}const S=e.createToken(g,x);l.push(S)}if(l.length!==0)return{items:l,raw:c}}function Nh(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const o=typeof n=="function"?n(r):n,[s,...i]=t.content,a=e.renderChildren([s]),l=[`${o}${a}`];return i&&i.length>0&&i.forEach(c=>{const u=e.renderChildren([c]);if(u){const d=u.split(`
|
|
483
|
+
`).map(f=>f?e.indent(f):"").join(`
|
|
484
|
+
`);l.push(d)}}),l.join(`
|
|
485
|
+
`)}function NU(t,e,n={}){const{state:r}=e,{doc:o,tr:s}=r,i=t;o.descendants((a,l)=>{const c=s.mapping.map(l),u=s.mapping.map(l)+a.nodeSize;let d=null;if(a.marks.forEach(h=>{if(h!==i)return!1;d=h}),!d)return;let f=!1;if(Object.keys(n).forEach(h=>{n[h]!==d.attrs[h]&&(f=!0)}),f){const h=t.type.create({...t.attrs,...n});s.removeMark(c,u,t.type),s.addMark(c,u,h)}}),s.docChanged&&e.view.dispatch(s)}var _t=class eT extends Sh{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new eT(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function lo(t){return new aU({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const s=we(t.getAttributes,void 0,r,o);if(s===!1||s===null)return null;const{tr:i}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(wh(n.from,n.to,e.doc).filter(g=>g.mark.type.excluded.find(y=>y===t.type&&y!==g.mark.type)).filter(g=>g.to>d).length)return null;f<n.to&&i.delete(f,n.to),d>n.from&&i.delete(n.from+u,d),c=n.from+u+a.length,i.addMark(n.from+u,c,t.type.create(s||{})),i.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:EU,getOwnPropertySymbols:MU}=Object,{hasOwnProperty:TU}=Object.prototype;function Iu(t,e){return function(r,o,s){return t(r,o,s)&&e(r,o,s)}}function ga(t){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,o);const{cache:s}=o,i=s.get(n),a=s.get(r);if(i&&a)return i===r&&a===n;s.set(n,r),s.set(r,n);const l=t(n,r,o);return s.delete(n),s.delete(r),l}}function RU(t){return t!=null?t[Symbol.toStringTag]:void 0}function pb(t){return EU(t).concat(MU(t))}const AU=Object.hasOwn||((t,e)=>TU.call(t,e));function mo(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const OU="__v",DU="__o",IU="_owner",{getOwnPropertyDescriptor:hb,keys:mb}=Object;function PU(t,e){return t.byteLength===e.byteLength&&ul(new Uint8Array(t),new Uint8Array(e))}function jU(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function _U(t,e){return t.byteLength===e.byteLength&&ul(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function LU(t,e){return mo(t.getTime(),e.getTime())}function FU(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function $U(t,e){return t===e}function gb(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const o=new Array(r),s=t.entries();let i,a,l=0;for(;(i=s.next())&&!i.done;){const c=e.entries();let u=!1,d=0;for(;(a=c.next())&&!a.done;){if(o[d]){d++;continue}const f=i.value,h=a.value;if(n.equals(f[0],h[0],l,d,t,e,n)&&n.equals(f[1],h[1],f[0],h[0],t,e,n)){u=o[d]=!0;break}d++}if(!u)return!1;l++}return!0}const BU=mo;function zU(t,e,n){const r=mb(t);let o=r.length;if(mb(e).length!==o)return!1;for(;o-- >0;)if(!tT(t,e,n,r[o]))return!1;return!0}function Es(t,e,n){const r=pb(t);let o=r.length;if(pb(e).length!==o)return!1;let s,i,a;for(;o-- >0;)if(s=r[o],!tT(t,e,n,s)||(i=hb(t,s),a=hb(e,s),(i||a)&&(!i||!a||i.configurable!==a.configurable||i.enumerable!==a.enumerable||i.writable!==a.writable)))return!1;return!0}function HU(t,e){return mo(t.valueOf(),e.valueOf())}function VU(t,e){return t.source===e.source&&t.flags===e.flags}function bb(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const o=new Array(r),s=t.values();let i,a;for(;(i=s.next())&&!i.done;){const l=e.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!o[u]&&n.equals(i.value,a.value,i.value,a.value,t,e,n)){c=o[u]=!0;break}u++}if(!c)return!1}return!0}function ul(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function WU(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function tT(t,e,n,r){return(r===IU||r===DU||r===OU)&&(t.$$typeof||e.$$typeof)?!0:AU(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const UU="[object ArrayBuffer]",GU="[object Arguments]",KU="[object Boolean]",YU="[object DataView]",qU="[object Date]",XU="[object Error]",JU="[object Map]",ZU="[object Number]",QU="[object Object]",eG="[object RegExp]",tG="[object Set]",nG="[object String]",rG={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},oG="[object URL]",sG=Object.prototype.toString;function iG({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:s,areMapsEqual:i,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:h,unknownTagComparators:g}){return function(y,v,x){if(y===v)return!0;if(y==null||v==null)return!1;const w=typeof y;if(w!==typeof v)return!1;if(w!=="object")return w==="number"?a(y,v,x):w==="function"?s(y,v,x):!1;const S=y.constructor;if(S!==v.constructor)return!1;if(S===Object)return l(y,v,x);if(Array.isArray(y))return e(y,v,x);if(S===Date)return r(y,v,x);if(S===RegExp)return u(y,v,x);if(S===Map)return i(y,v,x);if(S===Set)return d(y,v,x);const C=sG.call(y);if(C===qU)return r(y,v,x);if(C===eG)return u(y,v,x);if(C===JU)return i(y,v,x);if(C===tG)return d(y,v,x);if(C===QU)return typeof y.then!="function"&&typeof v.then!="function"&&l(y,v,x);if(C===oG)return h(y,v,x);if(C===XU)return o(y,v,x);if(C===GU)return l(y,v,x);if(rG[C])return f(y,v,x);if(C===UU)return t(y,v,x);if(C===YU)return n(y,v,x);if(C===KU||C===ZU||C===nG)return c(y,v,x);if(g){let k=g[C];if(!k){const N=RU(y);N&&(k=g[N])}if(k)return k(y,v,x)}return!1}}function aG({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:PU,areArraysEqual:n?Es:jU,areDataViewsEqual:_U,areDatesEqual:LU,areErrorsEqual:FU,areFunctionsEqual:$U,areMapsEqual:n?Iu(gb,Es):gb,areNumbersEqual:BU,areObjectsEqual:n?Es:zU,arePrimitiveWrappersEqual:HU,areRegExpsEqual:VU,areSetsEqual:n?Iu(bb,Es):bb,areTypedArraysEqual:n?Iu(ul,Es):ul,areUrlsEqual:WU,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const o=ga(r.areArraysEqual),s=ga(r.areMapsEqual),i=ga(r.areObjectsEqual),a=ga(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:o,areMapsEqual:s,areObjectsEqual:i,areSetsEqual:a})}return r}function lG(t){return function(e,n,r,o,s,i,a){return t(e,n,a)}}function cG({circular:t,comparator:e,createState:n,equals:r,strict:o}){if(n)return function(a,l){const{cache:c=t?new WeakMap:void 0,meta:u}=n();return e(a,l,{cache:c,equals:r,meta:u,strict:o})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};const s={cache:void 0,equals:r,meta:void 0,strict:o};return function(a,l){return e(a,l,s)}}const uG=Ir();Ir({strict:!0});Ir({circular:!0});Ir({circular:!0,strict:!0});Ir({createInternalComparator:()=>mo});Ir({strict:!0,createInternalComparator:()=>mo});Ir({circular:!0,createInternalComparator:()=>mo});Ir({circular:!0,createInternalComparator:()=>mo,strict:!0});function Ir(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:o=!1}=t,s=aG(t),i=iG(s),a=n?n(i):lG(i);return cG({circular:e,comparator:i,createState:r,equals:a,strict:o})}var Bd={exports:{}},Pu={};/**
|
|
486
|
+
* @license React
|
|
487
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
488
|
+
*
|
|
489
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
490
|
+
*
|
|
491
|
+
* This source code is licensed under the MIT license found in the
|
|
492
|
+
* LICENSE file in the root directory of this source tree.
|
|
493
|
+
*/var yb;function dG(){if(yb)return Pu;yb=1;var t=R,e=Ei;function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,l=t.useDebugValue;return Pu.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var g=s(null);if(g.current===null){var b={hasValue:!1,value:null};g.current=b}else b=g.current;g=a(function(){function v(k){if(!x){if(x=!0,w=k,k=f(k),h!==void 0&&b.hasValue){var N=b.value;if(h(N,k))return S=N}return S=k}if(N=S,r(w,k))return N;var E=f(k);return h!==void 0&&h(N,E)?(w=k,N):(w=k,S=E)}var x=!1,w,S,C=d===void 0?null:d;return[function(){return v(u())},C===null?void 0:function(){return v(C())}]},[u,d,f,h]);var y=o(c,g[0],g[1]);return i(function(){b.hasValue=!0,b.value=y},[y]),l(y),y},Pu}var ju={};/**
|
|
494
|
+
* @license React
|
|
495
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
496
|
+
*
|
|
497
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
498
|
+
*
|
|
499
|
+
* This source code is licensed under the MIT license found in the
|
|
500
|
+
* LICENSE file in the root directory of this source tree.
|
|
501
|
+
*/var vb;function fG(){return vb||(vb=1,process.env.NODE_ENV!=="production"&&function(){function t(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=R,n=Ei,r=typeof Object.is=="function"?Object.is:t,o=n.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;ju.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var g=s(null);if(g.current===null){var b={hasValue:!1,value:null};g.current=b}else b=g.current;g=a(function(){function v(k){if(!x){if(x=!0,w=k,k=f(k),h!==void 0&&b.hasValue){var N=b.value;if(h(N,k))return S=N}return S=k}if(N=S,r(w,k))return N;var E=f(k);return h!==void 0&&h(N,E)?(w=k,N):(w=k,S=E)}var x=!1,w,S,C=d===void 0?null:d;return[function(){return v(u())},C===null?void 0:function(){return v(C())}]},[u,d,f,h]);var y=o(c,g[0],g[1]);return i(function(){b.hasValue=!0,b.value=y},[y]),l(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ju}process.env.NODE_ENV==="production"?Bd.exports=dG():Bd.exports=fG();var pG=Bd.exports,hG=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},mG=({contentComponent:t})=>{const e=Ei.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return p.jsx(p.Fragment,{children:Object.values(e)})};function gG(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:vi.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(o=>o())}}}var bG=class extends R.Component{constructor(t){var e;super(t),this.editorContentRef=R.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=gG(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:hG(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&p.jsx(mG,{contentComponent:t.contentComponent})]})}},yG=R.forwardRef((t,e)=>{const n=R.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return R.createElement(bG,{key:n,innerRef:e,...t})}),nT=R.memo(yG),vG=typeof window<"u"?R.useLayoutEffect:R.useEffect,xG=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function wG(t){var e;const[n]=R.useState(()=>new xG(t.editor)),r=pG.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:uG);return vG(()=>n.watch(t.editor),[t.editor,n]),R.useDebugValue(r),r}var xb=process.env.NODE_ENV!=="production",zd=typeof window>"u",SG=zd||!!(typeof window<"u"&&window.next),CG=class rT{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(zd||SG){if(xb)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&zd&&xb)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var o,s;return(s=(o=this.options.current).onBeforeCreate)==null?void 0:s.call(o,...r)},onBlur:(...r)=>{var o,s;return(s=(o=this.options.current).onBlur)==null?void 0:s.call(o,...r)},onCreate:(...r)=>{var o,s;return(s=(o=this.options.current).onCreate)==null?void 0:s.call(o,...r)},onDestroy:(...r)=>{var o,s;return(s=(o=this.options.current).onDestroy)==null?void 0:s.call(o,...r)},onFocus:(...r)=>{var o,s;return(s=(o=this.options.current).onFocus)==null?void 0:s.call(o,...r)},onSelectionUpdate:(...r)=>{var o,s;return(s=(o=this.options.current).onSelectionUpdate)==null?void 0:s.call(o,...r)},onTransaction:(...r)=>{var o,s;return(s=(o=this.options.current).onTransaction)==null?void 0:s.call(o,...r)},onUpdate:(...r)=>{var o,s;return(s=(o=this.options.current).onUpdate)==null?void 0:s.call(o,...r)},onContentError:(...r)=>{var o,s;return(s=(o=this.options.current).onContentError)==null?void 0:s.call(o,...r)},onDrop:(...r)=>{var o,s;return(s=(o=this.options.current).onDrop)==null?void 0:s.call(o,...r)},onPaste:(...r)=>{var o,s;return(s=(o=this.options.current).onPaste)==null?void 0:s.call(o,...r)},onDelete:(...r)=>{var o,s;return(s=(o=this.options.current).onDelete)==null?void 0:s.call(o,...r)}};return new gU(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,s)=>{var i;return o===((i=n.extensions)==null?void 0:i[s])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?rT.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function kG(t={},e=[]){const n=R.useRef(t);n.current=t;const[r]=R.useState(()=>new CG(n)),o=Ei.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return R.useDebugValue(o),R.useEffect(r.onRender(e)),wG({editor:o,selector:({transactionNumber:s})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&s===0?0:s+1}),o}var oT=R.createContext({editor:null});oT.Consumer;var NG=R.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),EG=()=>R.useContext(NG);R.forwardRef((t,e)=>{const{onDragStart:n}=EG(),r=t.as||"div";return p.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});R.createContext({markViewContentRef:()=>{}});var Eh=R.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});Eh.displayName="TiptapContext";var MG=()=>R.useContext(Eh);function sT({editor:t,instance:e,children:n}){const r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const o=R.useMemo(()=>({editor:r}),[r]),s=R.useMemo(()=>({editor:r}),[r]);return p.jsx(oT.Provider,{value:s,children:p.jsx(Eh.Provider,{value:o,children:n})})}sT.displayName="Tiptap";function iT({...t}){const{editor:e}=MG();return p.jsx(nT,{editor:e,...t})}iT.displayName="Tiptap.Content";Object.assign(sT,{Content:iT});var dl=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},TG=/^\s*>\s$/,RG=_t.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return dl("blockquote",{...qe(this.options.HTMLAttributes,t),children:dl("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach(o=>{const a=e.renderChildren([o]).split(`
|
|
502
|
+
`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(a.join(`
|
|
503
|
+
`))}),r.join(`
|
|
504
|
+
${n}
|
|
505
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[es({find:TG,type:this.type})]}}),AG=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,OG=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,DG=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,IG=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,PG=ho.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return dl("strong",{...qe(this.options.HTMLAttributes,t),children:dl("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Qo({find:AG,type:this.type}),Qo({find:DG,type:this.type})]},addPasteRules(){return[lo({find:OG,type:this.type}),lo({find:IG,type:this.type})]}}),jG=/(^|[^`])`([^`]+)`(?!`)$/,_G=/(^|[^`])`([^`]+)`(?!`)/g,LG=ho.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Qo({find:jG,type:this.type})]},addPasteRules(){return[lo({find:_G,type:this.type})]}}),_u=4,FG=/^```([a-z]+)?[\s\n]$/,$G=/^~~~([a-z]+)?[\s\n]$/,BG=_t.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:_u,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const s=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",qe(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const o=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${o}`,e.renderChildren(t.content),"```"].join(`
|
|
506
|
+
`):r=`\`\`\`${o}
|
|
507
|
+
|
|
508
|
+
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:_u,{state:r}=t,{selection:o}=r,{$from:s,empty:i}=o;if(s.parent.type!==this.type)return!1;const a=" ".repeat(n);return i?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:c,to:u}=o,h=r.doc.textBetween(c,u,`
|
|
509
|
+
`,`
|
|
510
|
+
`).split(`
|
|
511
|
+
`).map(g=>a+g).join(`
|
|
512
|
+
`);return l.replaceWith(c,u,r.schema.text(h)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:_u,{state:r}=t,{selection:o}=r,{$from:s,empty:i}=o;return s.parent.type!==this.type?!1:i?t.commands.command(({tr:a})=>{var l;const{pos:c}=s,u=s.start(),d=s.end(),h=r.doc.textBetween(u,d,`
|
|
513
|
+
`,`
|
|
514
|
+
`).split(`
|
|
515
|
+
`);let g=0,b=0;const y=c-u;for(let k=0;k<h.length;k+=1){if(b+h[k].length>=y){g=k;break}b+=h[k].length+1}const x=((l=h[g].match(/^ */))==null?void 0:l[0])||"",w=Math.min(x.length,n);if(w===0)return!0;let S=u;for(let k=0;k<g;k+=1)S+=h[k].length+1;return a.delete(S,S+w),c-S<=w&&a.setSelection(pe.create(a.doc,S)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:c}=o,f=r.doc.textBetween(l,c,`
|
|
516
|
+
`,`
|
|
517
|
+
`).split(`
|
|
518
|
+
`).map(h=>{var g;const b=((g=h.match(/^ */))==null?void 0:g[0])||"",y=Math.min(b.length,n);return h.slice(y)}).join(`
|
|
519
|
+
`);return a.replaceWith(l,c,r.schema.text(f)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(`
|
|
520
|
+
|
|
521
|
+
`);return!s||!i?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:s}=n;if(!s||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const a=o.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(be.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[Fd({find:FG,type:this.type,getAttributes:t=>({language:t[1]})}),Fd({find:$G,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new $e({key:new Ze("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,s=o==null?void 0:o.mode;if(!n||!s)return!1;const{tr:i,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
|
|
522
|
+
`));return i.replaceSelectionWith(this.type.create({language:s},l)),i.selection.$from.parent.type!==this.type&&i.setSelection(pe.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),t.dispatch(i),!0}}})]}}),zG=_t.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
523
|
+
|
|
524
|
+
`):""}),HG=_t.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",qe(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
525
|
+
`},renderMarkdown:()=>`
|
|
526
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:s}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:a}=r.extensionManager,l=s||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&i){const d=l.filter(f=>a.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),VG=_t.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,qe(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,o="#".repeat(r);return t.content?`${o} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Fd({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),WG=_t.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",qe(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!yU(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,o=t();return LM(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:s,tr:i,dispatch:a})=>{if(a){const{$to:l}=i.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?i.setSelection(pe.create(i.doc,l.pos+1)):l.nodeAfter.isBlock?i.setSelection(de.create(i.doc,l.pos)):i.setSelection(pe.create(i.doc,l.pos));else{const u=s.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=u==null?void 0:u.create();d&&(i.insert(c,d),i.setSelection(pe.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[bU({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),UG=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,GG=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,KG=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,YG=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,qG=ho.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",qe(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Qo({find:UG,type:this.type}),Qo({find:KG,type:this.type})]},addPasteRules(){return[lo({find:GG,type:this.type}),lo({find:YG,type:this.type})]}});const XG="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",JG="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Hd="numeric",Vd="ascii",Wd="alpha",Us="asciinumeric",Fs="alphanumeric",Ud="domain",aT="emoji",ZG="scheme",QG="slashscheme",Lu="whitespace";function e6(t,e){return t in e||(e[t]=[]),e[t]}function Ur(t,e,n){e[Hd]&&(e[Us]=!0,e[Fs]=!0),e[Vd]&&(e[Us]=!0,e[Wd]=!0),e[Us]&&(e[Fs]=!0),e[Wd]&&(e[Fs]=!0),e[Fs]&&(e[Ud]=!0),e[aT]&&(e[Ud]=!0);for(const r in e){const o=e6(r,n);o.indexOf(t)<0&&o.push(t)}}function t6(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Ct(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Ct.groups={};Ct.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],s=e.jr[r][1];if(s&&o.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||Ct.groups;let o;return e&&e.j?o=e:(o=new Ct(e),n&&r&&Ur(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const s=t.length;if(!s)return o;for(let i=0;i<s-1;i++)o=o.tt(t[i]);return o.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||Ct.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const s=e;let i,a=o.go(t);if(a?(i=new Ct,Object.assign(i.j,a.j),i.jr.push.apply(i.jr,a.jr),i.jd=a.jd,i.t=a.t):i=new Ct,s){if(r)if(i.t&&typeof i.t=="string"){const l=Object.assign(t6(i.t,r),n);Ur(s,l,r)}else n&&Ur(s,n,r);i.t=s}return o.j[t]=i,i}};const ge=(t,e,n,r,o)=>t.ta(e,n,r,o),Be=(t,e,n,r,o)=>t.tr(e,n,r,o),wb=(t,e,n,r,o)=>t.ts(e,n,r,o),q=(t,e,n,r,o)=>t.tt(e,n,r,o),jn="WORD",Gd="UWORD",lT="ASCIINUMERICAL",cT="ALPHANUMERICAL",gi="LOCALHOST",Kd="TLD",Yd="UTLD",Oa="SCHEME",Po="SLASH_SCHEME",Mh="NUM",qd="WS",Th="NL",Gs="OPENBRACE",Ks="CLOSEBRACE",fl="OPENBRACKET",pl="CLOSEBRACKET",hl="OPENPAREN",ml="CLOSEPAREN",gl="OPENANGLEBRACKET",bl="CLOSEANGLEBRACKET",yl="FULLWIDTHLEFTPAREN",vl="FULLWIDTHRIGHTPAREN",xl="LEFTCORNERBRACKET",wl="RIGHTCORNERBRACKET",Sl="LEFTWHITECORNERBRACKET",Cl="RIGHTWHITECORNERBRACKET",kl="FULLWIDTHLESSTHAN",Nl="FULLWIDTHGREATERTHAN",El="AMPERSAND",Ml="APOSTROPHE",Tl="ASTERISK",sr="AT",Rl="BACKSLASH",Al="BACKTICK",Ol="CARET",lr="COLON",Rh="COMMA",Dl="DOLLAR",fn="DOT",Il="EQUALS",Ah="EXCLAMATION",$t="HYPHEN",Ys="PERCENT",Pl="PIPE",jl="PLUS",_l="POUND",qs="QUERY",Oh="QUOTE",uT="FULLWIDTHMIDDLEDOT",Dh="SEMI",pn="SLASH",Xs="TILDE",Ll="UNDERSCORE",dT="EMOJI",Fl="SYM";var fT=Object.freeze({__proto__:null,ALPHANUMERICAL:cT,AMPERSAND:El,APOSTROPHE:Ml,ASCIINUMERICAL:lT,ASTERISK:Tl,AT:sr,BACKSLASH:Rl,BACKTICK:Al,CARET:Ol,CLOSEANGLEBRACKET:bl,CLOSEBRACE:Ks,CLOSEBRACKET:pl,CLOSEPAREN:ml,COLON:lr,COMMA:Rh,DOLLAR:Dl,DOT:fn,EMOJI:dT,EQUALS:Il,EXCLAMATION:Ah,FULLWIDTHGREATERTHAN:Nl,FULLWIDTHLEFTPAREN:yl,FULLWIDTHLESSTHAN:kl,FULLWIDTHMIDDLEDOT:uT,FULLWIDTHRIGHTPAREN:vl,HYPHEN:$t,LEFTCORNERBRACKET:xl,LEFTWHITECORNERBRACKET:Sl,LOCALHOST:gi,NL:Th,NUM:Mh,OPENANGLEBRACKET:gl,OPENBRACE:Gs,OPENBRACKET:fl,OPENPAREN:hl,PERCENT:Ys,PIPE:Pl,PLUS:jl,POUND:_l,QUERY:qs,QUOTE:Oh,RIGHTCORNERBRACKET:wl,RIGHTWHITECORNERBRACKET:Cl,SCHEME:Oa,SEMI:Dh,SLASH:pn,SLASH_SCHEME:Po,SYM:Fl,TILDE:Xs,TLD:Kd,UNDERSCORE:Ll,UTLD:Yd,UWORD:Gd,WORD:jn,WS:qd});const In=/[a-z]/,Ms=new RegExp("\\p{L}","u"),Fu=new RegExp("\\p{Emoji}","u"),Pn=/\d/,$u=/\s/,Sb="\r",Bu=`
|
|
527
|
+
`,n6="️",r6="",zu="";let ba=null,ya=null;function o6(t=[]){const e={};Ct.groups=e;const n=new Ct;ba==null&&(ba=Cb(XG)),ya==null&&(ya=Cb(JG)),q(n,"'",Ml),q(n,"{",Gs),q(n,"}",Ks),q(n,"[",fl),q(n,"]",pl),q(n,"(",hl),q(n,")",ml),q(n,"<",gl),q(n,">",bl),q(n,"(",yl),q(n,")",vl),q(n,"「",xl),q(n,"」",wl),q(n,"『",Sl),q(n,"』",Cl),q(n,"<",kl),q(n,">",Nl),q(n,"&",El),q(n,"*",Tl),q(n,"@",sr),q(n,"`",Al),q(n,"^",Ol),q(n,":",lr),q(n,",",Rh),q(n,"$",Dl),q(n,".",fn),q(n,"=",Il),q(n,"!",Ah),q(n,"-",$t),q(n,"%",Ys),q(n,"|",Pl),q(n,"+",jl),q(n,"#",_l),q(n,"?",qs),q(n,'"',Oh),q(n,"/",pn),q(n,";",Dh),q(n,"~",Xs),q(n,"_",Ll),q(n,"\\",Rl),q(n,"・",uT);const r=Be(n,Pn,Mh,{[Hd]:!0});Be(r,Pn,r);const o=Be(r,In,lT,{[Us]:!0}),s=Be(r,Ms,cT,{[Fs]:!0}),i=Be(n,In,jn,{[Vd]:!0});Be(i,Pn,o),Be(i,In,i),Be(o,Pn,o),Be(o,In,o);const a=Be(n,Ms,Gd,{[Wd]:!0});Be(a,In),Be(a,Pn,s),Be(a,Ms,a),Be(s,Pn,s),Be(s,In),Be(s,Ms,s);const l=q(n,Bu,Th,{[Lu]:!0}),c=q(n,Sb,qd,{[Lu]:!0}),u=Be(n,$u,qd,{[Lu]:!0});q(n,zu,u),q(c,Bu,l),q(c,zu,u),Be(c,$u,u),q(u,Sb),q(u,Bu),Be(u,$u,u),q(u,zu,u);const d=Be(n,Fu,dT,{[aT]:!0});q(d,"#"),Be(d,Fu,d),q(d,n6,d);const f=q(d,r6);q(f,"#"),Be(f,Fu,d);const h=[[In,i],[Pn,o]],g=[[In,null],[Ms,a],[Pn,s]];for(let b=0;b<ba.length;b++)tr(n,ba[b],Kd,jn,h);for(let b=0;b<ya.length;b++)tr(n,ya[b],Yd,Gd,g);Ur(Kd,{tld:!0,ascii:!0},e),Ur(Yd,{utld:!0,alpha:!0},e),tr(n,"file",Oa,jn,h),tr(n,"mailto",Oa,jn,h),tr(n,"http",Po,jn,h),tr(n,"https",Po,jn,h),tr(n,"ftp",Po,jn,h),tr(n,"ftps",Po,jn,h),Ur(Oa,{scheme:!0,ascii:!0},e),Ur(Po,{slashscheme:!0,ascii:!0},e),t=t.sort((b,y)=>b[0]>y[0]?1:-1);for(let b=0;b<t.length;b++){const y=t[b][0],x=t[b][1]?{[ZG]:!0}:{[QG]:!0};y.indexOf("-")>=0?x[Ud]=!0:In.test(y)?Pn.test(y)?x[Us]=!0:x[Vd]=!0:x[Hd]=!0,wb(n,y,y,x)}return wb(n,"localhost",gi,{ascii:!0}),n.jd=new Ct(Fl),{start:n,tokens:Object.assign({groups:e},fT)}}function pT(t,e){const n=s6(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let s=0,i=0;for(;i<r;){let a=t,l=null,c=0,u=null,d=-1,f=-1;for(;i<r&&(l=a.go(n[i]));)a=l,a.accepts()?(d=0,f=0,u=a):d>=0&&(d+=n[i].length,f++),c+=n[i].length,s+=n[i].length,i++;s-=d,i-=f,c-=d,o.push({t:u.t,v:e.slice(s-c,s),s:s-c,e:s})}return o}function s6(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),s,i=o<55296||o>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(i),r+=i.length}return e}function tr(t,e,n,r,o){let s;const i=e.length;for(let a=0;a<i-1;a++){const l=e[a];t.j[l]?s=t.j[l]:(s=new Ct(r),s.jr=o.slice(),t.j[l]=s),t=s}return s=new Ct(n),s.jr=o.slice(),t.j[e[i-1]]=s,s}function Cb(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let s=0;for(;o.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let i=parseInt(t.substring(r,r+s),10);i>0;i--)n.pop();r+=s}else n.push(t[r]),r++}return e}const bi={defaultProtocol:"http",events:null,format:kb,formatHref:kb,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ih(t,e=null){let n=Object.assign({},bi);t&&(n=Object.assign(n,t instanceof Ih?t.o:t));const r=n.ignoreTags,o=[];for(let s=0;s<r.length;s++)o.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Ih.prototype={o:bi,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:bi[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function kb(t){return t}function hT(t,e){this.t="token",this.v=t,this.tk=e}hT.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=bi.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),s=this.toFormattedString(t),i={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return i.href=r,a&&(i.class=a),l&&(i.target=l),c&&(i.rel=c),u&&Object.assign(i,u),{tagName:o,attributes:i,content:s,eventListeners:d}}};function Fc(t,e){class n extends hT{constructor(o,s){super(o,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const Nb=Fc("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Eb=Fc("text"),i6=Fc("nl"),va=Fc("url",{isLink:!0,toHref(t=bi.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==gi&&t[1].t===lr}}),Ft=t=>new Ct(t);function a6({groups:t}){const e=t.domain.concat([El,Tl,sr,Rl,Al,Ol,Dl,Il,$t,Mh,Ys,Pl,jl,_l,pn,Fl,Xs,Ll]),n=[Ml,lr,Rh,fn,Ah,Ys,qs,Oh,Dh,gl,bl,Gs,Ks,pl,fl,hl,ml,yl,vl,xl,wl,Sl,Cl,kl,Nl],r=[El,Ml,Tl,Rl,Al,Ol,Dl,Il,$t,Gs,Ks,Ys,Pl,jl,_l,qs,pn,Fl,Xs,Ll],o=Ft(),s=q(o,Xs);ge(s,r,s),ge(s,t.domain,s);const i=Ft(),a=Ft(),l=Ft();ge(o,t.domain,i),ge(o,t.scheme,a),ge(o,t.slashscheme,l),ge(i,r,s),ge(i,t.domain,i);const c=q(i,sr);q(s,sr,c),q(a,sr,c),q(l,sr,c);const u=q(s,fn);ge(u,r,s),ge(u,t.domain,s);const d=Ft();ge(c,t.domain,d),ge(d,t.domain,d);const f=q(d,fn);ge(f,t.domain,d);const h=Ft(Nb);ge(f,t.tld,h),ge(f,t.utld,h),q(c,gi,h);const g=q(d,$t);q(g,$t,g),ge(g,t.domain,d),ge(h,t.domain,d),q(h,fn,f),q(h,$t,g);const b=q(h,lr);ge(b,t.numeric,Nb);const y=q(i,$t),v=q(i,fn);q(y,$t,y),ge(y,t.domain,i),ge(v,r,s),ge(v,t.domain,i);const x=Ft(va);ge(v,t.tld,x),ge(v,t.utld,x),ge(x,t.domain,i),ge(x,r,s),q(x,fn,v),q(x,$t,y),q(x,sr,c);const w=q(x,lr),S=Ft(va);ge(w,t.numeric,S);const C=Ft(va),k=Ft();ge(C,e,C),ge(C,n,k),ge(k,e,C),ge(k,n,k),q(x,pn,C),q(S,pn,C);const N=q(a,lr),E=q(l,lr),T=q(E,pn),O=q(T,pn);ge(a,t.domain,i),q(a,fn,v),q(a,$t,y),ge(l,t.domain,i),q(l,fn,v),q(l,$t,y),ge(N,t.domain,C),q(N,pn,C),q(N,qs,C),ge(O,t.domain,C),ge(O,e,C),q(O,pn,C);const A=[[Gs,Ks],[fl,pl],[hl,ml],[gl,bl],[yl,vl],[xl,wl],[Sl,Cl],[kl,Nl]];for(let D=0;D<A.length;D++){const[z,$]=A[D],Y=q(C,z);q(k,z,Y),q(Y,$,C);const F=Ft(va);ge(Y,e,F);const U=Ft();ge(Y,n),ge(F,e,F),ge(F,n,U),ge(U,e,F),ge(U,n,U),q(F,$,C),q(U,$,C)}return q(o,gi,x),q(o,Th,i6),{start:o,tokens:fT}}function l6(t,e,n){let r=n.length,o=0,s=[],i=[];for(;o<r;){let a=t,l=null,c=null,u=0,d=null,f=-1;for(;o<r&&!(l=a.go(n[o].t));)i.push(n[o++]);for(;o<r&&(c=l||a.go(n[o].t));)l=null,a=c,a.accepts()?(f=0,d=a):f>=0&&f++,o++,u++;if(f<0)o-=u,o<r&&(i.push(n[o]),o++);else{i.length>0&&(s.push(Hu(Eb,e,i)),i=[]),o-=f,u-=f;const h=d.t,g=n.slice(o-u,o);s.push(Hu(h,e,g))}}return i.length>0&&s.push(Hu(Eb,e,i)),s}function Hu(t,e,n){const r=n[0].s,o=n[n.length-1].e,s=e.slice(r,o);return new t(s,n)}const c6=typeof console<"u"&&console&&console.warn||(()=>{}),u6="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ae={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function d6(){return Ct.groups={},Ae.scanner=null,Ae.parser=null,Ae.tokenQueue=[],Ae.pluginQueue=[],Ae.customSchemes=[],Ae.initialized=!1,Ae}function Mb(t,e=!1){if(Ae.initialized&&c6(`linkifyjs: already initialized - will not register custom scheme "${t}" ${u6}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
528
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
529
|
+
2. Cannot start or end with "-"
|
|
530
|
+
3. "-" cannot repeat`);Ae.customSchemes.push([t,e])}function f6(){Ae.scanner=o6(Ae.customSchemes);for(let t=0;t<Ae.tokenQueue.length;t++)Ae.tokenQueue[t][1]({scanner:Ae.scanner});Ae.parser=a6(Ae.scanner.tokens);for(let t=0;t<Ae.pluginQueue.length;t++)Ae.pluginQueue[t][1]({scanner:Ae.scanner,parser:Ae.parser});return Ae.initialized=!0,Ae}function Ph(t){return Ae.initialized||f6(),l6(Ae.parser.start,t,pT(Ae.scanner.start,t))}Ph.scan=pT;function mT(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Ih(n),o=Ph(t),s=[];for(let i=0;i<o.length;i++){const a=o[i];a.isLink&&(!e||a.t===e)&&r.check(a)&&s.push(a.toFormattedObject(r))}return s}var jh="[\0- -\u2029 ]",p6=new RegExp(jh),h6=new RegExp(`${jh}$`),m6=new RegExp(jh,"g");function g6(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function b6(t){return new $e({key:new Ze("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!o||s)return;const{tr:i}=r,a=RM(n.doc,[...e]);if(_M(a).forEach(({newRange:c})=>{const u=yW(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1)d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(u.length){const h=r.doc.textBetween(c.from,c.to," "," ");if(!h6.test(h))return;d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")}if(d&&f){const h=f.split(p6).filter(Boolean);if(h.length<=0)return!1;const g=h[h.length-1],b=d.pos+f.lastIndexOf(g);if(!g)return!1;const y=Ph(g).map(v=>v.toObject(t.defaultProtocol));if(!g6(y))return!1;y.filter(v=>v.isLink).map(v=>({...v,from:b+v.start+1,to:b+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>t.validate(v.value)).filter(v=>t.shouldAutoLink(v.value)).forEach(v=>{wh(v.from,v.to,r.doc).some(x=>x.mark.type===t.type)||i.addMark(v.from,v.to,t.type.create({href:v.href}))})}}),!!i.steps.length)return i}})}function y6(t){return new $e({key:new Ze("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,s;if(r.button!==0||!e.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{const l=r.target;if(!l)return!1;const c=t.editor.view.dom;i=l.closest("a"),i&&!c.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=jM(e.state,t.type.name),c=(o=i.href)!=null?o:l.href,u=(s=i.target)!=null?s:l.target;c&&(window.open(c,u),a=!0)}return a}}})}function v6(t){return new $e({key:new Ze("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:o}=t,{state:s}=e,{selection:i}=s,{empty:a}=i;if(a)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const c=mT(l,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||o!==void 0&&!o(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function Lr(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(m6,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var x6=ho.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Mb(t);return}Mb(t.scheme,t.optionalSlashes)})},onDestroy(){d6()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Lr(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const o=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||!/\./.test(o))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Lr(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Lr(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",qe(this.options.HTMLAttributes,t),0]:["a",qe(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,o,s;const i=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",a=(s=(o=t.attrs)==null?void 0:o.title)!=null?s:"",l=e.renderChildren(t);return a?`[${l}](${i} "${a}")`:`[${l}](${i})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Lr(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Lr(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[lo({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=mT(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:i=>!!Lr(i,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(s=>{this.options.shouldAutoLink(s.value)&&e.push({text:s.value,data:{href:s.href},index:s.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(b6({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Lr(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(y6({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(v6({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),w6=Object.defineProperty,S6=(t,e)=>{for(var n in e)w6(t,n,{get:e[n],enumerable:!0})},C6="listItem",Tb="textStyle",Rb=/^\s*([-+*])\s$/,gT=_t.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
531
|
+
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(C6,this.editor.getAttributes(Tb)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=es({find:Rb,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=es({find:Rb,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Tb),editor:this.editor})),[t]}}),bT=_t.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(o=>o.type==="paragraph"))n=e.parseChildren(t.tokens);else{const o=t.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(o.tokens)}],t.tokens.length>1){const i=t.tokens.slice(1),a=e.parseChildren(i);n.push(...a)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>Nh(t,e,r=>{var o,s;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((s=(o=r.meta)==null?void 0:o.parentAttrs)==null?void 0:s.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),k6={};S6(k6,{findListItemPos:()=>Qi,getNextListDepth:()=>_h,handleBackspace:()=>Xd,handleDelete:()=>Jd,hasListBefore:()=>yT,hasListItemAfter:()=>N6,hasListItemBefore:()=>vT,listItemHasSubList:()=>xT,nextListIsDeeper:()=>wT,nextListIsHigher:()=>ST});var Qi=(t,e)=>{const{$from:n}=e.selection,r=Ye(t,e.schema);let o=null,s=n.depth,i=n.pos,a=null;for(;s>0&&a===null;)o=n.node(s),o.type===r?a=s:(s-=1,i-=1);return a===null?null:{$pos:e.doc.resolve(i),depth:a}},_h=(t,e)=>{const n=Qi(t,e);if(!n)return!1;const[,r]=TW(e,t,n.$pos.pos+4);return r},yT=(t,e,n)=>{const{$anchor:r}=t.selection,o=Math.max(0,r.pos-2),s=t.doc.resolve(o).node();return!(!s||!n.includes(s.type.name))},vT=(t,e)=>{var n;const{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==t)},xT=(t,e,n)=>{if(!n)return!1;const r=Ye(t,e.schema);let o=!1;return n.descendants(s=>{s.type===r&&(o=!0)}),o},Xd=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Cr(t.state,e)&&yT(t.state,e,n)){const{$anchor:a}=t.state.selection,l=t.state.doc.resolve(a.before()-1),c=[];l.node().descendants((f,h)=>{f.type.name===e&&c.push({node:f,pos:h})});const u=c.at(-1);if(!u)return!1;const d=t.state.doc.resolve(l.start()+u.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},d.end()).joinForward().run()}if(!Cr(t.state,e)||!DW(t.state))return!1;const r=Qi(e,t.state);if(!r)return!1;const s=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),i=xT(e,t.state,s);return vT(e,t.state)&&!i?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},wT=(t,e)=>{const n=_h(t,e),r=Qi(t,e);return!r||!n?!1:n>r.depth},ST=(t,e)=>{const n=_h(t,e),r=Qi(t,e);return!r||!n?!1:n<r.depth},Jd=(t,e)=>{if(!Cr(t.state,e)||!OW(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:wT(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():ST(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},N6=(t,e)=>{var n;const{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==t)},CT=Ue.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Jd(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Jd(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&Xd(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&Xd(t,n,r)&&(e=!0)}),e}}}}),Ab=/^(\s*)(\d+)\.\s+(.*)$/,E6=/^\s/;function M6(t){const e=[];let n=0,r=0;for(;n<t.length;){const o=t[n],s=o.match(Ab);if(!s)break;const[,i,a,l]=s,c=i.length;let u=l,d=n+1;const f=[o];for(;d<t.length;){const h=t[d];if(h.match(Ab))break;if(h.trim()==="")f.push(h),u+=`
|
|
532
|
+
`,d+=1;else if(h.match(E6))f.push(h),u+=`
|
|
533
|
+
${h.slice(c+2)}`,d+=1;else break}e.push({indent:c,number:parseInt(a,10),content:u.trim(),raw:f.join(`
|
|
534
|
+
`)}),r=d,n=d}return[e,r]}function kT(t,e,n){var r;const o=[];let s=0;for(;s<t.length;){const i=t[s];if(i.indent===e){const a=i.content.split(`
|
|
535
|
+
`),l=((r=a[0])==null?void 0:r.trim())||"",c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const u=a.slice(1).join(`
|
|
536
|
+
`).trim();if(u){const h=n.blockTokens(u);c.push(...h)}let d=s+1;const f=[];for(;d<t.length&&t[d].indent>e;)f.push(t[d]),d+=1;if(f.length>0){const h=Math.min(...f.map(b=>b.indent)),g=kT(f,h,n);c.push({type:"list",ordered:!0,start:f[0].number,items:g,raw:f.map(b=>b.raw).join(`
|
|
537
|
+
`)})}o.push({type:"list_item",raw:i.raw,tokens:c}),s=d}else s+=1}return o}function T6(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...e.parseChildren([o]));else if(o.type==="text"&&o.tokens){const s=e.parseChildren([o]);r.push({type:"paragraph",content:s})}else{const s=e.parseChildren([o]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var R6="listItem",Ob="textStyle",Db=/^(\d+)\.\s$/,NT=_t.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",qe(this.options.HTMLAttributes,n),0]:["ol",qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?T6(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
538
|
+
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const o=t.split(`
|
|
539
|
+
`),[s,i]=M6(o);if(s.length===0)return;const a=kT(s,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=s[0])==null?void 0:r.number)||1,items:a,raw:o.slice(0,i).join(`
|
|
540
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(R6,this.editor.getAttributes(Ob)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=es({find:Db,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=es({find:Db,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Ob)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),A6=/^\s*(\[([( |x])?\])\s$/,O6=_t.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",qe(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const o=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Nh(t,e,o)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),s=document.createElement("label"),i=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=d=>{var f,h;a.ariaLabel=((h=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:h.call(f,d,a.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};c(t),s.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",d=>d.preventDefault()),a.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:f}=d.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const g=n();if(typeof g!="number")return!1;const b=h.doc.nodeAt(g);return h.setNodeMarkup(g,void 0,{...b==null?void 0:b.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{o.setAttribute(d,f)}),o.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,s.append(a,i),o.append(s,l),Object.entries(e).forEach(([d,f])=>{o.setAttribute(d,f)});let u=new Set(Object.keys(e));return{dom:o,contentDOM:l,update:d=>{if(d.type!==this.type)return!1;o.dataset.checked=d.attrs.checked,a.checked=d.attrs.checked,c(d);const f=r.extensionManager.attributes,h=mi(d,f),g=new Set(Object.keys(h)),b=this.options.HTMLAttributes;return u.forEach(y=>{g.has(y)||(y in b?o.setAttribute(y,b[y]):o.removeAttribute(y))}),Object.entries(h).forEach(([y,v])=>{v==null?y in b?o.setAttribute(y,b[y]):o.removeAttribute(y):o.setAttribute(y,v)}),u=g,!0}}}},addInputRules(){return[es({find:A6,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),D6=_t.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",qe(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
541
|
+
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=s=>{const i=$d(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return i?[{type:"taskList",raw:i.raw,items:i.items}]:n.blockTokens(s)},o=$d(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,i)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.mainContent),nestedTokens:i}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Ue.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(gT.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(bT.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(CT.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(NT.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(O6.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(D6.configure(this.options.taskList)),t}});var Ib=" ",I6=" ",P6=_t.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",qe(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===Ib||r[0].text===I6)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e)=>{if(!t)return"";const n=Array.isArray(t.content)?t.content:[];return n.length===0?Ib:e.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),j6=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,_6=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,L6=ho.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",qe(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Qo({find:j6,type:this.type})]},addPasteRules(){return[lo({find:_6,type:this.type})]}}),F6=_t.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),$6=ho.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",qe(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!o)return;const s=o[2].trim();return{type:"underline",raw:o[0],text:s,tokens:n.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function B6(t={}){return new $e({view(e){return new z6(e,t)}})}class z6{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let s=i=>{this[o](i)};return e.dom.addEventListener(o,s),{name:o,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,o=this.editorView.dom,s=o.getBoundingClientRect(),i=s.width/o.offsetWidth,a=s.height/o.offsetHeight;if(n){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let h=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(h){let g=h.getBoundingClientRect(),b=d?g.bottom:g.top;d&&f&&(b=(b+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*a;r={left:g.left,right:g.right,top:b-y,bottom:b+y}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*i;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,h=d.height/l.offsetHeight;c=d.left-l.scrollLeft*f,u=d.top-l.scrollTop*h}this.element.style.left=(r.left-c)/i+"px",this.element.style.top=(r.top-u)/a+"px",this.element.style.width=(r.right-r.left)/i+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,s=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!s){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=xE(this.editorView.state.doc,i,this.editorView.dragging.slice);a!=null&&(i=a)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class ze extends be{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return ze.valid(r)?new ze(r):be.near(r)}content(){return Q.empty}eq(e){return e instanceof ze&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new ze(e.resolve(n.pos))}getBookmark(){return new Lh(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!H6(e)||!V6(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&ze.valid(e))return e;let o=e.pos,s=null;for(let i=e.depth;;i--){let a=e.node(i);if(n>0?e.indexAfter(i)<a.childCount:e.index(i)>0){s=a.child(n>0?e.indexAfter(i):e.index(i)-1);break}else if(i==0)return null;o+=n;let l=e.doc.resolve(o);if(ze.valid(l))return l}for(;;){let i=n>0?s.firstChild:s.lastChild;if(!i){if(s.isAtom&&!s.isText&&!de.isSelectable(s)){e=e.doc.resolve(o+s.nodeSize*n),r=!1;continue e}break}s=i,o+=n;let a=e.doc.resolve(o);if(ze.valid(a))return a}return null}}}ze.prototype.visible=!1;ze.findFrom=ze.findGapCursorFrom;be.jsonID("gapcursor",ze);class Lh{constructor(e){this.pos=e}map(e){return new Lh(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return ze.valid(n)?new ze(n):be.near(n)}}function ET(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function H6(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||ET(o.type))return!0;if(o.inlineContent)return!1}}return!0}function V6(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||ET(o.type))return!0;if(o.inlineContent)return!1}}return!0}function W6(){return new $e({props:{decorations:Y6,createSelectionBetween(t,e,n){return e.pos==n.pos&&ze.valid(n)?new ze(n):null},handleClick:G6,handleKeyDown:U6,handleDOMEvents:{beforeinput:K6}}})}const U6=wM({ArrowLeft:xa("horiz",-1),ArrowRight:xa("horiz",1),ArrowUp:xa("vert",-1),ArrowDown:xa("vert",1)});function xa(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,s){let i=r.selection,a=e>0?i.$to:i.$from,l=i.empty;if(i instanceof pe){if(!s.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=ze.findGapCursorFrom(a,e,l);return c?(o&&o(r.tr.setSelection(new ze(c))),!0):!1}}function G6(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!ze.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&de.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new ze(r))),!0)}function K6(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof ze))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=W.empty;for(let i=r.length-1;i>=0;i--)o=W.from(r[i].createAndFill(null,o));let s=t.state.tr.replace(n.pos,n.pos,new Q(o,0,0));return s.setSelection(pe.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function Y6(t){if(!(t.selection instanceof ze))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Le.create(t.doc,[gt.widget(t.selection.head,e,{key:"gapcursor"})])}var $l=200,tt=function(){};tt.prototype.append=function(e){return e.length?(e=tt.from(e),!this.length&&e||e.length<$l&&this.leafAppend(e)||this.length<$l&&e.leafPrepend(this)||this.appendInner(e)):this};tt.prototype.prepend=function(e){return e.length?tt.from(e).append(this):this};tt.prototype.appendInner=function(e){return new q6(this,e)};tt.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?tt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};tt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};tt.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};tt.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(s,i){return o.push(e(s,i))},n,r),o};tt.from=function(e){return e instanceof tt?e:e&&e.length?new MT(e):tt.empty};var MT=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,s){return o==0&&s==this.length?this:new e(this.values.slice(o,s))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,s,i,a){for(var l=s;l<i;l++)if(o(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,s,i,a){for(var l=s-1;l>=i;l--)if(o(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=$l)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=$l)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(tt);tt.empty=new MT([]);var q6=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,s,i){var a=this.left.length;if(o<a&&this.left.forEachInner(r,o,Math.min(s,a),i)===!1||s>a&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,s)-a,i+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,s,i){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(s,a)-a,i+a)===!1||s<a&&this.left.forEachInvertedInner(r,Math.min(o,a),s,i)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var s=this.left.length;return o<=s?this.left.slice(r,o):r>=s?this.right.slice(r-s,o-s):this.left.slice(r,s).append(this.right.slice(0,o-s))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(tt);const X6=500;class Qt{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,s;n&&(o=this.remapping(r,this.items.length),s=o.maps.length);let i=e.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),s=o.maps.length),s--,u.push(d);return}if(o){u.push(new hn(d.map));let h=d.step.map(o.slice(s)),g;h&&i.maybeStep(h).doc&&(g=i.mapping.maps[i.mapping.maps.length-1],c.push(new hn(g,void 0,void 0,c.length+u.length))),s--,g&&o.appendMap(g,s)}else i.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(s)):d.selection,l=new Qt(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:a}}addTransform(e,n,r,o){let s=[],i=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new hn(e.mapping.maps[u],d,n),h;(h=l&&l.merge(f))&&(f=h,u?s.pop():a=a.slice(0,a.length-1)),s.push(f),n&&(i++,n=void 0),o||(l=f)}let c=i-r.depth;return c>Z6&&(a=J6(a,c),i-=c),new Qt(a.append(s),i)}remapping(e,n){let r=new ci;return this.items.forEach((o,s)=>{let i=o.mirrorOffset!=null&&s-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,i)},e,n),r}addMaps(e){return this.eventCount==0?this:new Qt(this.items.append(e.map(n=>new hn(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),s=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=n;this.items.forEach(f=>{let h=s.getMirror(--l);if(h==null)return;i=Math.min(i,h);let g=s.maps[h];if(f.step){let b=e.steps[h].invert(e.docs[h]),y=f.selection&&f.selection.map(s.slice(l+1,h));y&&a++,r.push(new hn(g,b,y))}else r.push(new hn(g))},o);let c=[];for(let f=n;f<i;f++)c.push(new hn(s.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Qt(u,a);return d.emptyItemCount()>X6&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],s=0;return this.items.forEach((i,a)=>{if(a>=e)o.push(i),i.selection&&s++;else if(i.step){let l=i.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=i.selection&&i.selection.map(n.slice(r));u&&s++;let d=new hn(c.invert(),l,u),f,h=o.length-1;(f=o.length&&o[h].merge(d))?o[h]=f:o.push(d)}}else i.map&&r--},this.items.length,0),new Qt(tt.from(o.reverse()),s)}}Qt.empty=new Qt(tt.empty,0);function J6(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class hn{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new hn(n.getMap().invert(),n,this.selection)}}}class ir{constructor(e,n,r,o,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=s}}const Z6=20;function Q6(t,e,n,r){let o=n.getMeta(Xr),s;if(o)return o.historyState;n.getMeta(nK)&&(t=new ir(t.done,t.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(i&&i.getMeta(Xr))return i.getMeta(Xr).redo?new ir(t.done.addTransform(n,void 0,r,Da(e)),t.undone,Pb(n.mapping.maps),t.prevTime,t.prevComposition):new ir(t.done,t.undone.addTransform(n,void 0,r,Da(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!i&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!eK(n,t.prevRanges)),c=i?Vu(t.prevRanges,n.mapping):Pb(n.mapping.maps);return new ir(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Da(e)),Qt.empty,c,n.time,a??t.prevComposition)}else return(s=n.getMeta("rebased"))?new ir(t.done.rebased(n,s),t.undone.rebased(n,s),Vu(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ir(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Vu(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function eK(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&o>=e[s]&&(n=!0)}),n}function Pb(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,s,i)=>e.push(s,i));return e}function Vu(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),s=e.map(t[r+1],-1);o<=s&&n.push(o,s)}return n}function tK(t,e,n){let r=Da(e),o=Xr.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let i=s.selection.resolve(s.transform.doc),a=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),o,r),l=new ir(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(i).setMeta(Xr,{redo:n,historyState:l})}let Wu=!1,jb=null;function Da(t){let e=t.plugins;if(jb!=e){Wu=!1,jb=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Wu=!0;break}}return Wu}const Xr=new Ze("history"),nK=new Ze("closeHistory");function rK(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new $e({key:Xr,state:{init(){return new ir(Qt.empty,Qt.empty,null,0,-1)},apply(e,n,r){return Q6(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?RT:r=="historyRedo"?AT:null;return!o||!e.editable?!1:(n.preventDefault(),o(e.state,e.dispatch))}}}})}function TT(t,e){return(n,r)=>{let o=Xr.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let s=tK(o,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const RT=TT(!1,!0),AT=TT(!0,!0);Ue.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new $e({key:new Ze("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit;if(o==null||o===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>o){const i=s-o,a=0,l=i;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const o=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||o>r&&s>r&&s<=o)return!0;if(o>r&&s>r&&s>o||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=s-r,c=a-l,u=a;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>r)}})]}});var oK=Ue.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[B6(this.options)]}});Ue.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new $e({key:new Ze("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=e,s=[];if(!n||!r)return Le.create(t,[]);let i=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(l.isText)return;if(!(o>=c&&o<=c+l.nodeSize-1))return!1;i+=1});let a=0;return t.descendants((l,c)=>{if(l.isText||!(o>=c&&o<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&i-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";s.push(gt.node(c,c+l.nodeSize,{class:this.options.className}))}),Le.create(t,s)}}})]}});var sK=Ue.create({name:"gapCursor",addProseMirrorPlugins(){return[W6()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=we(ce(t,"allowGapCursor",n)))!=null?e:null}}}),_b="placeholder";function iK(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var aK=Ue.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:_b,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${iK(this.options.dataAttribute)}`:`data-${_b}`;return[new $e({key:new Ze("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,s=[];if(!r)return null;const i=this.editor.isEmpty;return e.descendants((a,l)=>{const c=o>=l&&o<=l+a.nodeSize,u=!a.isLeaf&&jc(a);if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];i&&d.push(this.options.emptyEditorClass);const f=gt.node(l,l+a.nodeSize,{class:d.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),Le.create(e,s)}}})]}});Ue.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new $e({key:new Ze("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||LM(n.selection)||t.view.dragging?null:Le.create(n.doc,[gt.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function Lb({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var lK=Ue.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Ze(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new $e({key:e,appendTransaction:(o,s,i)=>{const{doc:a,tr:l,schema:c}=i,u=e.getState(i),d=a.content.size,f=c.nodes[n];if(u)return l.insert(d,f.create())},state:{init:(o,s)=>{const i=s.tr.doc.lastChild;return!Lb({node:i,types:r})},apply:(o,s)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return s;const i=o.doc.lastChild;return!Lb({node:i,types:r})}}})]}}),cK=Ue.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>RT(t,e),redo:()=>({state:t,dispatch:e})=>AT(t,e)}},addProseMirrorPlugins(){return[rK(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),uK=Ue.create({name:"starterKit",addExtensions(){var t,e,n,r;const o=[];return this.options.bold!==!1&&o.push(PG.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(RG.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(gT.configure(this.options.bulletList)),this.options.code!==!1&&o.push(LG.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(BG.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(zG.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(oK.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(sK.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(HG.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(VG.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(cK.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(WG.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(qG.configure(this.options.italic)),this.options.listItem!==!1&&o.push(bT.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(CT.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&o.push(x6.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&o.push(NT.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(P6.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(L6.configure(this.options.strike)),this.options.text!==!1&&o.push(F6.configure(this.options.text)),this.options.underline!==!1&&o.push($6.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(lK.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),dK=uK,fK=aK,OT="Toggle",Fh=m.forwardRef((t,e)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=t,[i,a]=Oe({prop:n,onChange:o,defaultProp:r??!1,caller:OT});return p.jsx(Z.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:e,onClick:P(t.onClick,()=>{t.disabled||a(!i)})})});Fh.displayName=OT;var DT=Fh;const $h=Xe("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground 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=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3 min-w-10",sm:"h-9 px-2.5 min-w-9",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"default",size:"default"}}),Bh=m.forwardRef(({className:t,variant:e,size:n,...r},o)=>p.jsx(DT,{ref:o,className:M($h({variant:e,size:n,className:t})),...r}));Bh.displayName=DT.displayName;var pK="Separator",Fb="horizontal",hK=["horizontal","vertical"],IT=m.forwardRef((t,e)=>{const{decorative:n,orientation:r=Fb,...o}=t,s=mK(r)?r:Fb,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(vt.div,{"data-orientation":s,...a,...o,ref:e})});IT.displayName=pK;function mK(t){return hK.includes(t)}var PT=IT;const Js=m.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},o)=>p.jsx(PT,{ref:o,decorative:n,orientation:e,className:M("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));Js.displayName=PT.displayName;const Rt=({pressed:t,onPressedChange:e,disabled:n,children:r,tooltip:o})=>p.jsx(Bh,{size:"sm",pressed:t,onPressedChange:e,disabled:n,"aria-label":o,className:"h-8 w-8 p-0",children:r}),jT=({editor:t})=>t?p.jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b p-1",children:[p.jsx(Rt,{pressed:t.isActive("bold"),onPressedChange:()=>t.chain().focus().toggleBold().run(),disabled:!t.can().chain().focus().toggleBold().run(),tooltip:"Bold",children:p.jsx(IO,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:t.isActive("italic"),onPressedChange:()=>t.chain().focus().toggleItalic().run(),disabled:!t.can().chain().focus().toggleItalic().run(),tooltip:"Italic",children:p.jsx(XO,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:t.isActive("strike"),onPressedChange:()=>t.chain().focus().toggleStrike().run(),disabled:!t.can().chain().focus().toggleStrike().run(),tooltip:"Strikethrough",children:p.jsx(uD,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:t.isActive("code"),onPressedChange:()=>t.chain().focus().toggleCode().run(),disabled:!t.can().chain().focus().toggleCode().run(),tooltip:"Code",children:p.jsx(_O,{className:"h-4 w-4"})}),p.jsx(Js,{orientation:"vertical",className:"mx-1 h-6"}),p.jsx(Rt,{pressed:t.isActive("heading",{level:1}),onPressedChange:()=>t.chain().focus().toggleHeading({level:1}).run(),tooltip:"Heading 1",children:p.jsx(GO,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:t.isActive("heading",{level:2}),onPressedChange:()=>t.chain().focus().toggleHeading({level:2}).run(),tooltip:"Heading 2",children:p.jsx(KO,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:t.isActive("heading",{level:3}),onPressedChange:()=>t.chain().focus().toggleHeading({level:3}).run(),tooltip:"Heading 3",children:p.jsx(YO,{className:"h-4 w-4"})}),p.jsx(Js,{orientation:"vertical",className:"mx-1 h-6"}),p.jsx(Rt,{pressed:t.isActive("bulletList"),onPressedChange:()=>t.chain().focus().toggleBulletList().run(),tooltip:"Bullet List",children:p.jsx(ZO,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:t.isActive("orderedList"),onPressedChange:()=>t.chain().focus().toggleOrderedList().run(),tooltip:"Ordered List",children:p.jsx(JO,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:t.isActive("blockquote"),onPressedChange:()=>t.chain().focus().toggleBlockquote().run(),tooltip:"Quote",children:p.jsx(lD,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:!1,onPressedChange:()=>t.chain().focus().setHorizontalRule().run(),tooltip:"Horizontal Rule",children:p.jsx(my,{className:"h-4 w-4"})}),p.jsx(Js,{orientation:"vertical",className:"mx-1 h-6"}),p.jsx(Rt,{pressed:!1,onPressedChange:()=>t.chain().focus().undo().run(),disabled:!t.can().chain().focus().undo().run(),tooltip:"Undo",children:p.jsx(dD,{className:"h-4 w-4"})}),p.jsx(Rt,{pressed:!1,onPressedChange:()=>t.chain().focus().redo().run(),disabled:!t.can().chain().focus().redo().run(),tooltip:"Redo",children:p.jsx(cD,{className:"h-4 w-4"})})]}):null,_T=m.forwardRef(({value:t,onChange:e,placeholder:n="Start typing...",disabled:r=!1,className:o,minHeight:s="150px"},i)=>{const a=kG({extensions:[dK,fK.configure({placeholder:n})],content:t,editable:!r,onUpdate:({editor:l})=>{e==null||e(l.getHTML())}});return m.useEffect(()=>{a&&t!==a.getHTML()&&a.commands.setContent(t??"")},[t,a]),m.useEffect(()=>{a&&a.setEditable(!r)},[r,a]),p.jsxs("div",{ref:i,className:M("rounded-md border bg-background",r&&"opacity-50",o),children:[p.jsx(jT,{editor:a}),p.jsx(nT,{editor:a,className:M("prose prose-sm dark:prose-invert max-w-none p-3 focus-within:outline-none [&_.ProseMirror]:min-h-[var(--min-height)] [&_.ProseMirror]:outline-none [&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left [&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0 [&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none"),style:{"--min-height":s}})]})});_T.displayName="RichText";function gK(t,e){return m.useReducer((n,r)=>e[n][r]??n,t)}var zh="ScrollArea",[LT]=Ie(zh),[bK,Kt]=LT(zh),FT=m.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=t,[a,l]=m.useState(null),[c,u]=m.useState(null),[d,f]=m.useState(null),[h,g]=m.useState(null),[b,y]=m.useState(null),[v,x]=m.useState(0),[w,S]=m.useState(0),[C,k]=m.useState(!1),[N,E]=m.useState(!1),T=oe(e,A=>l(A)),O=an(o);return p.jsx(bK,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:k,scrollbarY:b,onScrollbarYChange:y,scrollbarYEnabled:N,onScrollbarYEnabledChange:E,onCornerWidthChange:x,onCornerHeightChange:S,children:p.jsx(Z.div,{dir:O,...i,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...t.style}})})});FT.displayName=zh;var $T="ScrollAreaViewport",BT=m.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=t,i=Kt($T,n),a=m.useRef(null),l=oe(e,a,i.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(Z.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...t.style},children:p.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});BT.displayName=$T;var Tn="ScrollAreaScrollbar",Hh=m.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Kt(Tn,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,a=t.orientation==="horizontal";return m.useEffect(()=>(a?s(!0):i(!0),()=>{a?s(!1):i(!1)}),[a,s,i]),o.type==="hover"?p.jsx(yK,{...r,ref:e,forceMount:n}):o.type==="scroll"?p.jsx(vK,{...r,ref:e,forceMount:n}):o.type==="auto"?p.jsx(zT,{...r,ref:e,forceMount:n}):o.type==="always"?p.jsx(Vh,{...r,ref:e}):null});Hh.displayName=Tn;var yK=m.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Kt(Tn,t.__scopeScrollArea),[s,i]=m.useState(!1);return m.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(Pe,{present:n||s,children:p.jsx(zT,{"data-state":s?"visible":"hidden",...r,ref:e})})}),vK=m.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Kt(Tn,t.__scopeScrollArea),s=t.orientation==="horizontal",i=Bc(()=>l("SCROLL_END"),100),[a,l]=gK("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return m.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),m.useEffect(()=>{const c=o.viewport,u=s?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(l("SCROLL"),i()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,s,l,i]),p.jsx(Pe,{present:n||a!=="hidden",children:p.jsx(Vh,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:P(t.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:P(t.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),zT=m.forwardRef((t,e)=>{const n=Kt(Tn,t.__scopeScrollArea),{forceMount:r,...o}=t,[s,i]=m.useState(!1),a=t.orientation==="horizontal",l=Bc(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?c:u)}},10);return ts(n.viewport,l),ts(n.content,l),p.jsx(Pe,{present:r||s,children:p.jsx(Vh,{"data-state":s?"visible":"hidden",...o,ref:e})})}),Vh=m.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,o=Kt(Tn,t.__scopeScrollArea),s=m.useRef(null),i=m.useRef(0),[a,l]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=GT(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>s.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,h){return NK(f,i.current,a,h)}return n==="horizontal"?p.jsx(xK,{...u,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const f=o.viewport.scrollLeft,h=$b(f,a,o.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):n==="vertical"?p.jsx(wK,{...u,ref:e,onThumbPositionChange:()=>{if(o.viewport&&s.current){const f=o.viewport.scrollTop,h=$b(f,a);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),xK=m.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...o}=t,s=Kt(Tn,t.__scopeScrollArea),[i,a]=m.useState(),l=m.useRef(null),c=oe(e,l,s.onScrollbarXChange);return m.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(VT,{"data-orientation":"horizontal",...o,ref:c,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":$c(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.x),onDragScroll:u=>t.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(s.viewport){const f=s.viewport.scrollLeft+u.deltaX;t.onWheelScroll(f),YT(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:zl(i.paddingLeft),paddingEnd:zl(i.paddingRight)}})}})}),wK=m.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...o}=t,s=Kt(Tn,t.__scopeScrollArea),[i,a]=m.useState(),l=m.useRef(null),c=oe(e,l,s.onScrollbarYChange);return m.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(VT,{"data-orientation":"vertical",...o,ref:c,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":$c(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.y),onDragScroll:u=>t.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(s.viewport){const f=s.viewport.scrollTop+u.deltaY;t.onWheelScroll(f),YT(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:zl(i.paddingTop),paddingEnd:zl(i.paddingBottom)}})}})}),[SK,HT]=LT(Tn),VT=m.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=t,h=Kt(Tn,n),[g,b]=m.useState(null),y=oe(e,T=>b(T)),v=m.useRef(null),x=m.useRef(""),w=h.viewport,S=r.content-r.viewport,C=ke(u),k=ke(l),N=Bc(d,10);function E(T){if(v.current){const O=T.clientX-v.current.left,A=T.clientY-v.current.top;c({x:O,y:A})}}return m.useEffect(()=>{const T=O=>{const A=O.target;(g==null?void 0:g.contains(A))&&C(O,S)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[w,g,S,C]),m.useEffect(k,[r,k]),ts(g,N),ts(h.content,N),p.jsx(SK,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:ke(s),onThumbPointerUp:ke(i),onThumbPositionChange:k,onThumbPointerDown:ke(a),children:p.jsx(Z.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:P(t.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),E(T))}),onPointerMove:P(t.onPointerMove,E),onPointerUp:P(t.onPointerUp,T=>{const O=T.target;O.hasPointerCapture(T.pointerId)&&O.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=x.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})})}),Bl="ScrollAreaThumb",WT=m.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=HT(Bl,t.__scopeScrollArea);return p.jsx(Pe,{present:n||o.hasThumb,children:p.jsx(CK,{ref:e,...r})})}),CK=m.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...o}=t,s=Kt(Bl,n),i=HT(Bl,n),{onThumbPositionChange:a}=i,l=oe(e,d=>i.onThumbChange(d)),c=m.useRef(void 0),u=Bc(()=>{c.current&&(c.current(),c.current=void 0)},100);return m.useEffect(()=>{const d=s.viewport;if(d){const f=()=>{if(u(),!c.current){const h=EK(d,a);c.current=h,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[s.viewport,u,a]),p.jsx(Z.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:P(t.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,b=d.clientY-h.top;i.onThumbPointerDown({x:g,y:b})}),onPointerUp:P(t.onPointerUp,i.onThumbPointerUp)})});WT.displayName=Bl;var Wh="ScrollAreaCorner",UT=m.forwardRef((t,e)=>{const n=Kt(Wh,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.jsx(kK,{...t,ref:e}):null});UT.displayName=Wh;var kK=m.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,o=Kt(Wh,n),[s,i]=m.useState(0),[a,l]=m.useState(0),c=!!(s&&a);return ts(o.scrollbarX,()=>{var d;const u=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(u),l(u)}),ts(o.scrollbarY,()=>{var d;const u=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(u),i(u)}),c?p.jsx(Z.div,{...r,ref:e,style:{width:s,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function zl(t){return t?parseInt(t,10):0}function GT(t,e){const n=t/e;return isNaN(n)?0:n}function $c(t){const e=GT(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function NK(t,e,n,r="ltr"){const o=$c(n),s=o/2,i=e||s,a=o-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return KT([l,c],d)(t)}function $b(t,e,n="ltr"){const r=$c(e),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-o,i=e.content-e.viewport,a=s-r,l=n==="ltr"?[0,i]:[i*-1,0],c=ii(t,l);return KT([0,i],[0,a])(c)}function KT(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function YT(t,e){return t>0&&t<e}var EK=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function o(){const s={left:t.scrollLeft,top:t.scrollTop},i=n.left!==s.left,a=n.top!==s.top;(i||a)&&e(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Bc(t,e){const n=ke(t),r=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),m.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function ts(t,e){const n=ke(e);De(()=>{let r=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(t),()=>{window.cancelAnimationFrame(r),o.unobserve(t)}}},[t,n])}var qT=FT,MK=BT,TK=UT;const XT=m.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(qT,{ref:r,className:M("relative overflow-hidden",t),...n,children:[p.jsx(MK,{className:"h-full w-full rounded-[inherit]",children:e}),p.jsx(Uh,{}),p.jsx(TK,{})]}));XT.displayName=qT.displayName;const Uh=m.forwardRef(({className:t,orientation:e="vertical",...n},r)=>p.jsx(Hh,{ref:r,orientation:e,className:M("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:p.jsx(WT,{className:"relative flex-1 rounded-full bg-border"})}));Uh.displayName=Hh.displayName;function Gh(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const JT=m.forwardRef(({className:t,value:e,onChange:n,onSearch:r,onClear:o,loading:s=!1,showClearButton:i=!0,searchOnEnter:a=!0,debounceMs:l,disabled:c,...u},d)=>{const[f,h]=m.useState(e||""),g=m.useRef(null);m.useEffect(()=>{e!==void 0&&h(e)},[e]);const b=w=>{const S=w.target.value;h(S),n==null||n(S),l&&r&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{r(S)},l))},y=w=>{w.key==="Enter"&&a&&r&&(w.preventDefault(),g.current&&clearTimeout(g.current),r(f)),w.key==="Escape"&&f&&v()},v=()=>{h(""),n==null||n(""),o==null||o(),g.current&&clearTimeout(g.current)};m.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const x=i&&f&&!s;return p.jsxs("div",{className:"relative",children:[p.jsx(xi,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"search",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",t),ref:d,value:f,onChange:b,onKeyDown:y,disabled:c||s,...u}),p.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:s?p.jsx(ja,{className:"h-4 w-4 animate-spin text-muted-foreground"}):x?p.jsx("button",{type:"button",className:"p-0.5 hover:bg-accent rounded",onClick:v,tabIndex:-1,children:p.jsx(Nt,{className:"h-4 w-4 text-muted-foreground"})}):null})]})});JT.displayName="SearchInput";const ZT=m.forwardRef(({shortcutKey:t="K",showShortcut:e=!0,className:n,onChange:r,...o},s)=>{const i=m.useRef(null);m.useEffect(()=>{const l=c=>{var u;(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()===t.toLowerCase()&&(c.preventDefault(),(u=i.current)==null||u.focus())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[t]);const a=l=>{i.current=l,Gh(s,l)};return p.jsxs("div",{className:"relative",children:[p.jsx(xi,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"search",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",e?"pr-16":"pr-10",n),ref:a,...o}),e&&p.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-0.5",children:p.jsxs("kbd",{className:"pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground inline-flex",children:[p.jsx("span",{className:"text-xs",children:"⌘"}),t]})})]})});ZT.displayName="CommandSearch";const QT=m.forwardRef(({collapsedWidth:t="40px",expandedWidth:e="250px",className:n,placeholder:r="Search...",...o},s)=>{const[i,a]=m.useState(!1),[l,c]=m.useState(o.value||""),u=m.useRef(null),{onChange:d,...f}=o,h=()=>a(!0),g=()=>{l||a(!1)},b=x=>{c(x.target.value),d==null||d(x.target.value)},y=()=>{a(!0),setTimeout(()=>{var x;return(x=u.current)==null?void 0:x.focus()},100)},v=x=>{u.current=x,Gh(s,x)};return p.jsxs("div",{className:M("relative flex items-center transition-all duration-200 ease-in-out",n),style:{width:i?e:t},children:[p.jsx("button",{type:"button",className:M("absolute left-0 flex h-10 w-10 items-center justify-center rounded-md border border-input bg-background hover:bg-accent transition-colors",i&&"border-transparent hover:bg-transparent"),onClick:y,tabIndex:i?-1:0,children:p.jsx(xi,{className:"h-4 w-4 text-muted-foreground"})}),p.jsx("input",{type:"search",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200","[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",!i&&"opacity-0 pointer-events-none"),ref:v,value:l,onChange:b,onFocus:h,onBlur:g,placeholder:r,...f})]})});QT.displayName="ExpandableSearch";const RK=(t,e)=>{var r;const n=e.toLowerCase();return t.label.toLowerCase().includes(n)||t.value.toLowerCase().includes(n)||(((r=t.description)==null?void 0:r.toLowerCase().includes(n))??!1)},eR=m.forwardRef(({className:t,value:e,onChange:n,options:r,onSelect:o,loading:s=!1,emptyMessage:i="No results found",filterFn:a=RK,minChars:l=0,maxResults:c=10,showAllOnFocus:u=!0,groupBy:d,disabled:f,placeholder:h="Search...",...g},b)=>{const[y,v]=m.useState(!1),[x,w]=m.useState(e||""),[S,C]=m.useState(-1),k=m.useRef(null),N=m.useRef(null),E=m.useRef(null);m.useEffect(()=>{e!==void 0&&w(e)},[e]),m.useEffect(()=>{const L=K=>{k.current&&!k.current.contains(K.target)&&(v(!1),C(-1))};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);const T=m.useMemo(()=>x.length<l&&!u?[]:(x.length>=l?r.filter(K=>a(K,x)):r).slice(0,c),[r,x,a,l,c,u]),O=m.useMemo(()=>{if(!d)return null;const L={};return T.forEach(K=>{const I=d(K);L[I]||(L[I]=[]),L[I].push(K)}),L},[T,d]),A=L=>{const K=L.target.value;w(K),n==null||n(K),v(!0),C(-1)},D=()=>{(u||x.length>=l)&&v(!0)},z=L=>{var K;L.disabled||(w(L.label),n==null||n(L.label),o==null||o(L),v(!1),C(-1),(K=N.current)==null||K.focus())},$=L=>{if(!y&&(L.key==="ArrowDown"||L.key==="ArrowUp")){v(!0);return}switch(L.key){case"ArrowDown":L.preventDefault(),C(K=>{const I=K<T.length-1?K+1:0;return Y(I),I});break;case"ArrowUp":L.preventDefault(),C(K=>{const I=K>0?K-1:T.length-1;return Y(I),I});break;case"Enter":L.preventDefault(),S>=0&&T[S]&&z(T[S]);break;case"Escape":v(!1),C(-1);break;case"Tab":v(!1),C(-1);break}},Y=L=>{if(E.current){const I=E.current.querySelectorAll("[data-option]")[L];I&&I.scrollIntoView({block:"nearest"})}},F=()=>{var L;w(""),n==null||n(""),v(!1),(L=N.current)==null||L.focus()},U=L=>{N.current=L,Gh(b,L)},_=(L,K)=>p.jsxs("button",{type:"button","data-option":!0,className:M("flex w-full items-center gap-2 rounded-sm px-3 py-2 text-sm text-left",S===K&&"bg-accent",L.disabled&&"opacity-50 cursor-not-allowed",!L.disabled&&"hover:bg-accent cursor-pointer"),onClick:()=>z(L),onMouseEnter:()=>!L.disabled&&C(K),disabled:L.disabled,children:[L.icon&&p.jsx("span",{className:"flex-shrink-0",children:L.icon}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"truncate font-medium",children:L.label}),L.description&&p.jsx("div",{className:"truncate text-xs text-muted-foreground",children:L.description})]})]},L.value),j=y&&(T.length>0||s||x.length>=l);return p.jsxs("div",{ref:k,className:M("relative",t),children:[p.jsx(xi,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground z-10"}),p.jsx("input",{type:"text",role:"combobox","aria-expanded":y,"aria-autocomplete":"list","aria-controls":"autocomplete-list",autoComplete:"off",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-10 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"),ref:U,value:x,onChange:A,onFocus:D,onKeyDown:$,disabled:f,placeholder:h,...g}),p.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:s?p.jsx(ja,{className:"h-4 w-4 animate-spin text-muted-foreground"}):x?p.jsx("button",{type:"button",className:"p-0.5 hover:bg-accent rounded",onClick:F,tabIndex:-1,children:p.jsx(Nt,{className:"h-4 w-4 text-muted-foreground"})}):null}),j&&p.jsx("div",{id:"autocomplete-list",ref:E,className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-md max-h-[300px] overflow-y-auto",children:s?p.jsx("div",{className:"flex items-center justify-center py-4",children:p.jsx(ja,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):T.length===0?p.jsx("div",{className:"px-3 py-4 text-sm text-center text-muted-foreground",children:i}):O?p.jsx("div",{className:"p-1",children:Object.entries(O).map(([L,K])=>p.jsxs("div",{children:[p.jsx("div",{className:"px-3 py-1.5 text-xs font-semibold text-muted-foreground",children:L}),K.map(I=>{const H=T.indexOf(I);return _(I,H)})]},L))}):p.jsx("div",{className:"p-1",children:T.map((L,K)=>_(L,K))})})]})});eR.displayName="AutocompleteSearch";const tR=m.createContext(void 0);function co(){const t=m.useContext(tR);if(!t)throw new Error("useSidebar must be used within a SidebarProvider");return t}function AK({children:t,defaultOpen:e=!0,defaultCollapsed:n=!1,onOpenChange:r,onCollapsedChange:o}){const[s,i]=m.useState(e),[a,l]=m.useState(n),[c,u]=m.useState(!1);m.useEffect(()=>{const h=()=>{u(window.innerWidth<768)};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[]);const d=m.useCallback(h=>{i(h),r==null||r(h)},[r]),f=m.useCallback(h=>{l(h),o==null||o(h)},[o]);return p.jsx(tR.Provider,{value:{open:s,setOpen:d,collapsed:a,setCollapsed:f,isMobile:c},children:t})}const OK=Xe("flex h-full flex-col border-r bg-background transition-all duration-300",{variants:{variant:{default:"",inset:"rounded-lg border shadow-sm",floating:"m-2 rounded-lg border shadow-lg"}},defaultVariants:{variant:"default"}}),nR=m.forwardRef(({className:t,variant:e,width:n=256,collapsedWidth:r=64,children:o,...s},i)=>{const{open:a,collapsed:l,isMobile:c}=co(),u=c?a?n:0:l?r:n;return p.jsxs(p.Fragment,{children:[c&&a&&p.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>co().setOpen(!1)}),p.jsx("aside",{ref:i,"data-collapsed":l,"data-mobile":c,className:M(OK({variant:e}),c&&"fixed inset-y-0 left-0 z-50",t),style:{width:u,minWidth:u,overflow:"hidden"},...s,children:p.jsx("div",{className:"flex h-full flex-col",style:{width:n,minWidth:n},children:o})})]})});nR.displayName="Sidebar";const rR=m.forwardRef(({className:t,...e},n)=>{const{open:r,setOpen:o,collapsed:s,setCollapsed:i,isMobile:a}=co(),l=()=>{a?o(!r):i(!s)};return p.jsxs(Cn,{ref:n,variant:"ghost",size:"icon",className:M("h-9 w-9",t),onClick:l,...e,children:[p.jsx(rD,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Toggle sidebar"})]})});rR.displayName="SidebarTrigger";const oR=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("flex h-14 items-center border-b px-4",t),...e}));oR.displayName="SidebarHeader";const sR=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("flex-1 overflow-auto py-2",t),...e}));sR.displayName="SidebarContent";const iR=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("mt-auto border-t p-4",t),...e}));iR.displayName="SidebarFooter";const aR=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("px-2 py-2",t),...e}));aR.displayName="SidebarGroup";const lR=m.forwardRef(({className:t,...e},n)=>{const{collapsed:r}=co();return r?null:p.jsx("div",{ref:n,className:M("px-2 py-1.5 text-xs font-medium text-muted-foreground",t),...e})});lR.displayName="SidebarGroupLabel";const cR=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("space-y-1",t),...e}));cR.displayName="SidebarGroupContent";const uR=m.forwardRef(({className:t,...e},n)=>p.jsx("ul",{ref:n,className:M("space-y-1",t),...e}));uR.displayName="SidebarMenu";const dR=m.forwardRef(({className:t,...e},n)=>p.jsx("li",{ref:n,className:M("",t),...e}));dR.displayName="SidebarMenuItem";const fR=m.forwardRef(({className:t,isActive:e,tooltip:n,children:r,...o},s)=>{const{collapsed:i}=co(),a=p.jsx("button",{ref:s,className:M("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e&&"bg-accent text-accent-foreground",i&&"justify-center px-2",t),...o,children:r});return i&&n?p.jsxs("div",{className:"relative group",children:[a,p.jsx("div",{className:"absolute left-full top-1/2 z-50 ml-2 -translate-y-1/2 rounded-md bg-popover px-2 py-1 text-xs text-popover-foreground opacity-0 shadow-md transition-opacity group-hover:opacity-100",children:n})]}):a});fR.displayName="SidebarMenuButton";const pR=m.forwardRef(({className:t,...e},n)=>{const{collapsed:r}=co();return r?null:p.jsx("ul",{ref:n,className:M("ml-4 space-y-1 border-l pl-4",t),...e})});pR.displayName="SidebarMenuSub";const hR=m.forwardRef(({className:t,...e},n)=>p.jsx("li",{ref:n,className:M("",t),...e}));hR.displayName="SidebarMenuSubItem";const mR=m.forwardRef(({className:t,isActive:e,...n},r)=>p.jsx("button",{ref:r,className:M("flex w-full items-center rounded-md px-3 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",e&&"bg-accent text-accent-foreground",t),...n}));mR.displayName="SidebarMenuSubButton";const gR=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("mx-2 my-2 h-px bg-border",t),...e}));gR.displayName="SidebarSeparator";function DK({className:t,...e}){return p.jsx("div",{className:M("animate-pulse rounded-md bg-muted",t),...e})}var bR=["PageUp","PageDown"],yR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],vR={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ys="Slider",[Zd,IK,PK]=kr(ys),[xR]=Ie(ys,[PK]),[jK,zc]=xR(ys),wR=m.forwardRef((t,e)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:g,...b}=t,y=m.useRef(new Set),v=m.useRef(0),w=i==="horizontal"?_K:LK,[S=[],C]=Oe({prop:u,defaultProp:c,onChange:A=>{var z;(z=[...y.current][v.current])==null||z.focus(),d(A)}}),k=m.useRef(S);function N(A){const D=HK(S,A);O(A,D)}function E(A){O(A,v.current)}function T(){const A=k.current[v.current];S[v.current]!==A&&f(S)}function O(A,D,{commit:z}={commit:!1}){const $=GK(s),Y=KK(Math.round((A-r)/s)*s+r,$),F=ii(Y,[r,o]);C((U=[])=>{const _=BK(U,F,D);if(UK(_,l*s)){v.current=_.indexOf(F);const j=String(_)!==String(U);return j&&z&&f(_),j?_:U}else return U})}return p.jsx(jK,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:v,thumbs:y.current,values:S,orientation:i,form:g,children:p.jsx(Zd.Provider,{scope:t.__scopeSlider,children:p.jsx(Zd.Slot,{scope:t.__scopeSlider,children:p.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...b,ref:e,onPointerDown:P(b.onPointerDown,()=>{a||(k.current=S)}),min:r,max:o,inverted:h,onSlideStart:a?void 0:N,onSlideMove:a?void 0:E,onSlideEnd:a?void 0:T,onHomeKeyDown:()=>!a&&O(r,0,{commit:!0}),onEndKeyDown:()=>!a&&O(o,S.length-1,{commit:!0}),onStepKeyDown:({event:A,direction:D})=>{if(!a){const Y=bR.includes(A.key)||A.shiftKey&&yR.includes(A.key)?10:1,F=v.current,U=S[F],_=s*Y*D;O(U+_,F,{commit:!0})}}})})})})});wR.displayName=ys;var[SR,CR]=xR(ys,{startEdge:"left",endEdge:"right",size:"width",direction:1}),_K=m.forwardRef((t,e)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...u}=t,[d,f]=m.useState(null),h=oe(e,w=>f(w)),g=m.useRef(void 0),b=an(o),y=b==="ltr",v=y&&!s||!y&&s;function x(w){const S=g.current||d.getBoundingClientRect(),C=[0,S.width],N=Kh(C,v?[n,r]:[r,n]);return g.current=S,N(w-S.left)}return p.jsx(SR,{scope:t.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:p.jsx(kR,{dir:b,"data-orientation":"horizontal",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=x(w.clientX);i==null||i(S)},onSlideMove:w=>{const S=x(w.clientX);a==null||a(S)},onSlideEnd:()=>{g.current=void 0,l==null||l()},onStepKeyDown:w=>{const C=vR[v?"from-left":"from-right"].includes(w.key);c==null||c({event:w,direction:C?-1:1})}})})}),LK=m.forwardRef((t,e)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onStepKeyDown:l,...c}=t,u=m.useRef(null),d=oe(e,u),f=m.useRef(void 0),h=!o;function g(b){const y=f.current||u.current.getBoundingClientRect(),v=[0,y.height],w=Kh(v,h?[r,n]:[n,r]);return f.current=y,w(b-y.top)}return p.jsx(SR,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:p.jsx(kR,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const y=g(b.clientY);s==null||s(y)},onSlideMove:b=>{const y=g(b.clientY);i==null||i(y)},onSlideEnd:()=>{f.current=void 0,a==null||a()},onStepKeyDown:b=>{const v=vR[h?"from-bottom":"from-top"].includes(b.key);l==null||l({event:b,direction:v?-1:1})}})})}),kR=m.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:l,...c}=t,u=zc(ys,n);return p.jsx(Z.span,{...c,ref:e,onKeyDown:P(t.onKeyDown,d=>{d.key==="Home"?(i(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):bR.concat(yR).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:P(t.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():r(d)}),onPointerMove:P(t.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:P(t.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),s(d))})})}),NR="SliderTrack",ER=m.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,o=zc(NR,n);return p.jsx(Z.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:e})});ER.displayName=NR;var Qd="SliderRange",MR=m.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,o=zc(Qd,n),s=CR(Qd,n),i=m.useRef(null),a=oe(e,i),l=o.values.length,c=o.values.map(f=>AR(f,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return p.jsx(Z.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...t.style,[s.startEdge]:u+"%",[s.endEdge]:d+"%"}})});MR.displayName=Qd;var ef="SliderThumb",TR=m.forwardRef((t,e)=>{const n=IK(t.__scopeSlider),[r,o]=m.useState(null),s=oe(e,a=>o(a)),i=m.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return p.jsx(FK,{...t,ref:s,index:i})}),FK=m.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:o,...s}=t,i=zc(ef,n),a=CR(ef,n),[l,c]=m.useState(null),u=oe(e,x=>c(x)),d=l?i.form||!!l.closest("form"):!0,f=Di(l),h=i.values[r],g=h===void 0?0:AR(h,i.min,i.max),b=zK(r,i.values.length),y=f==null?void 0:f[a.size],v=y?VK(y,g,a.direction):0;return m.useEffect(()=>{if(l)return i.thumbs.add(l),()=>{i.thumbs.delete(l)}},[l,i.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${g}% + ${v}px)`},children:[p.jsx(Zd.ItemSlot,{scope:t.__scopeSlider,children:p.jsx(Z.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":i.min,"aria-valuenow":h,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:u,style:h===void 0?{display:"none"}:t.style,onFocus:P(t.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),d&&p.jsx(RR,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:h},r)]})});TR.displayName=ef;var $K="RadioBubbleInput",RR=m.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const o=m.useRef(null),s=oe(o,r),i=cs(e);return m.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==e&&u){const d=new Event("input",{bubbles:!0});u.call(a,e),a.dispatchEvent(d)}},[i,e]),p.jsx(Z.input,{style:{display:"none"},...n,ref:s,defaultValue:e})});RR.displayName=$K;function BK(t=[],e,n){const r=[...t];return r[n]=e,r.sort((o,s)=>o-s)}function AR(t,e,n){const s=100/(n-e)*(t-e);return ii(s,[0,100])}function zK(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function HK(t,e){if(t.length===1)return 0;const n=t.map(o=>Math.abs(o-e)),r=Math.min(...n);return n.indexOf(r)}function VK(t,e,n){const r=t/2,s=Kh([0,50],[0,r]);return(r-s(e)*n)*n}function WK(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function UK(t,e){if(e>0){const n=WK(t);return Math.min(...n)>=e}return!0}function Kh(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function GK(t){return(String(t).split(".")[1]||"").length}function KK(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var OR=wR,YK=ER,qK=MR,XK=TR;const DR=m.forwardRef(({className:t,...e},n)=>p.jsxs(OR,{ref:n,className:M("relative flex w-full touch-none select-none items-center",t),...e,children:[p.jsx(YK,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:p.jsx(qK,{className:"absolute h-full bg-primary"})}),p.jsx(XK,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));DR.displayName=OR.displayName;function JK(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const ZK=t=>{switch(t){case"success":return t8;case"info":return r8;case"warning":return n8;case"error":return o8;default:return null}},QK=Array(12).fill(0),e8=({visible:t,className:e})=>R.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},R.createElement("div",{className:"sonner-spinner"},QK.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),t8=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),n8=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),r8=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),o8=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),s8=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),i8=()=>{const[t,e]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let tf=1;class a8{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:r,...o}=e,s=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:tf++,i=this.toasts.find(l=>l.id===s),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:r}),{...l,...e,id:s,dismissible:a,title:r}):l):this.addToast({title:r,...o,dismissible:a,id:s}),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let s=r!==void 0,i;const a=o.then(async c=>{if(i=["resolve",c],R.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(c8(c)&&!c.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,g=typeof d=="object"&&!R.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...g})}else if(c instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,g=typeof d=="object"&&!R.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...g})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,g=typeof d=="object"&&!R.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:f,...g})}}).catch(async c=>{if(i=["reject",c],n.error!==void 0){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"&&!R.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:d,...h})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,u)=>a.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,n)=>{const r=(n==null?void 0:n.id)||tf++;return this.create({jsx:e(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const St=new a8,l8=(t,e)=>{const n=(e==null?void 0:e.id)||tf++;return St.addToast({title:t,...e,id:n}),n},c8=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",u8=l8,d8=()=>St.toasts,f8=()=>St.getActiveToasts();Object.assign(u8,{success:St.success,info:St.info,warning:St.warning,error:St.error,custom:St.custom,message:St.message,promise:St.promise,dismiss:St.dismiss,loading:St.loading},{getHistory:d8,getToasts:f8});JK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function wa(t){return t.label!==void 0}const p8=3,h8="24px",m8="16px",Bb=4e3,g8=356,b8=14,y8=45,v8=200;function un(...t){return t.filter(Boolean).join(" ")}function x8(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}const w8=t=>{var e,n,r,o,s,i,a,l,c;const{invert:u,toast:d,unstyled:f,interacting:h,setHeights:g,visibleToasts:b,heights:y,index:v,toasts:x,expanded:w,removeToast:S,defaultRichColors:C,closeButton:k,style:N,cancelButtonStyle:E,actionButtonStyle:T,className:O="",descriptionClassName:A="",duration:D,position:z,gap:$,expandByDefault:Y,classNames:F,icons:U,closeButtonAriaLabel:_="Close toast"}=t,[j,L]=R.useState(null),[K,I]=R.useState(null),[H,X]=R.useState(!1),[V,ee]=R.useState(!1),[B,J]=R.useState(!1),[te,re]=R.useState(!1),[ne,G]=R.useState(!1),[fe,ye]=R.useState(0),[Me,He]=R.useState(0),je=R.useRef(d.duration||D||Bb),xt=R.useRef(null),Te=R.useRef(null),Yt=v===0,Rn=v+1<=b,Je=d.type,Tt=d.dismissible!==!1,Kn=d.className||"",Yn=d.descriptionClassName||"",qn=R.useMemo(()=>y.findIndex(se=>se.toastId===d.id)||0,[y,d.id]),go=R.useMemo(()=>{var se;return(se=d.closeButton)!=null?se:k},[d.closeButton,k]),bo=R.useMemo(()=>d.duration||D||Bb,[d.duration,D]),An=R.useRef(0),mt=R.useRef(0),Xn=R.useRef(0),Lt=R.useRef(null),[Jn,vs]=z.split("-"),yo=R.useMemo(()=>y.reduce((se,ae,Ve)=>Ve>=qn?se:se+ae.height,0),[y,qn]),vo=i8(),xo=d.invert||u,jr=Je==="loading";mt.current=R.useMemo(()=>qn*$+yo,[qn,yo]),R.useEffect(()=>{je.current=bo},[bo]),R.useEffect(()=>{X(!0)},[]),R.useEffect(()=>{const se=Te.current;if(se){const ae=se.getBoundingClientRect().height;return He(ae),g(Ve=>[{toastId:d.id,height:ae,position:d.position},...Ve]),()=>g(Ve=>Ve.filter(nt=>nt.toastId!==d.id))}},[g,d.id]),R.useLayoutEffect(()=>{if(!H)return;const se=Te.current,ae=se.style.height;se.style.height="auto";const Ve=se.getBoundingClientRect().height;se.style.height=ae,He(Ve),g(nt=>nt.find(We=>We.toastId===d.id)?nt.map(We=>We.toastId===d.id?{...We,height:Ve}:We):[{toastId:d.id,height:Ve,position:d.position},...nt])},[H,d.title,d.description,g,d.id,d.jsx,d.action,d.cancel]);const wt=R.useCallback(()=>{ee(!0),ye(mt.current),g(se=>se.filter(ae=>ae.toastId!==d.id)),setTimeout(()=>{S(d)},v8)},[d,S,g,mt]);R.useEffect(()=>{if(d.promise&&Je==="loading"||d.duration===1/0||d.type==="loading")return;let se;return w||h||vo?(()=>{if(Xn.current<An.current){const nt=new Date().getTime()-An.current;je.current=je.current-nt}Xn.current=new Date().getTime()})():(()=>{je.current!==1/0&&(An.current=new Date().getTime(),se=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),wt()},je.current))})(),()=>clearTimeout(se)},[w,h,d,Je,vo,wt]),R.useEffect(()=>{d.delete&&(wt(),d.onDismiss==null||d.onDismiss.call(d,d))},[wt,d.delete]);function he(){var se;if(U!=null&&U.loading){var ae;return R.createElement("div",{className:un(F==null?void 0:F.loader,d==null||(ae=d.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":Je==="loading"},U.loading)}return R.createElement(e8,{className:un(F==null?void 0:F.loader,d==null||(se=d.classNames)==null?void 0:se.loader),visible:Je==="loading"})}const xe=d.icon||(U==null?void 0:U[Je])||ZK(Je);var ue,ve;return R.createElement("li",{tabIndex:0,ref:Te,className:un(O,Kn,F==null?void 0:F.toast,d==null||(e=d.classNames)==null?void 0:e.toast,F==null?void 0:F.default,F==null?void 0:F[Je],d==null||(n=d.classNames)==null?void 0:n[Je]),"data-sonner-toast":"","data-rich-colors":(ue=d.richColors)!=null?ue:C,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":H,"data-promise":!!d.promise,"data-swiped":ne,"data-removed":V,"data-visible":Rn,"data-y-position":Jn,"data-x-position":vs,"data-index":v,"data-front":Yt,"data-swiping":B,"data-dismissible":Tt,"data-type":Je,"data-invert":xo,"data-swipe-out":te,"data-swipe-direction":K,"data-expanded":!!(w||Y&&H),"data-testid":d.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${V?fe:mt.current}px`,"--initial-height":Y?"auto":`${Me}px`,...N,...d.style},onDragEnd:()=>{J(!1),L(null),Lt.current=null},onPointerDown:se=>{se.button!==2&&(jr||!Tt||(xt.current=new Date,ye(mt.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&(J(!0),Lt.current={x:se.clientX,y:se.clientY})))},onPointerUp:()=>{var se,ae,Ve;if(te||!Tt)return;Lt.current=null;const nt=Number(((se=Te.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wo=Number(((ae=Te.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),We=new Date().getTime()-((Ve=xt.current)==null?void 0:Ve.getTime()),at=j==="x"?nt:wo,ea=Math.abs(at)/We;if(Math.abs(at)>=y8||ea>.11){ye(mt.current),d.onDismiss==null||d.onDismiss.call(d,d),I(j==="x"?nt>0?"right":"left":wo>0?"down":"up"),wt(),re(!0);return}else{var qt,Xt;(qt=Te.current)==null||qt.style.setProperty("--swipe-amount-x","0px"),(Xt=Te.current)==null||Xt.style.setProperty("--swipe-amount-y","0px")}G(!1),J(!1),L(null)},onPointerMove:se=>{var ae,Ve,nt;if(!Lt.current||!Tt||((ae=window.getSelection())==null?void 0:ae.toString().length)>0)return;const We=se.clientY-Lt.current.y,at=se.clientX-Lt.current.x;var ea;const qt=(ea=t.swipeDirections)!=null?ea:x8(z);!j&&(Math.abs(at)>1||Math.abs(We)>1)&&L(Math.abs(at)>Math.abs(We)?"x":"y");let Xt={x:0,y:0};const Jh=_r=>1/(1.5+Math.abs(_r)/20);if(j==="y"){if(qt.includes("top")||qt.includes("bottom"))if(qt.includes("top")&&We<0||qt.includes("bottom")&&We>0)Xt.y=We;else{const _r=We*Jh(We);Xt.y=Math.abs(_r)<Math.abs(We)?_r:We}}else if(j==="x"&&(qt.includes("left")||qt.includes("right")))if(qt.includes("left")&&at<0||qt.includes("right")&&at>0)Xt.x=at;else{const _r=at*Jh(at);Xt.x=Math.abs(_r)<Math.abs(at)?_r:at}(Math.abs(Xt.x)>0||Math.abs(Xt.y)>0)&&G(!0),(Ve=Te.current)==null||Ve.style.setProperty("--swipe-amount-x",`${Xt.x}px`),(nt=Te.current)==null||nt.style.setProperty("--swipe-amount-y",`${Xt.y}px`)}},go&&!d.jsx&&Je!=="loading"?R.createElement("button",{"aria-label":_,"data-disabled":jr,"data-close-button":!0,onClick:jr||!Tt?()=>{}:()=>{wt(),d.onDismiss==null||d.onDismiss.call(d,d)},className:un(F==null?void 0:F.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(ve=U==null?void 0:U.close)!=null?ve:s8):null,(Je||d.icon||d.promise)&&d.icon!==null&&((U==null?void 0:U[Je])!==null||d.icon)?R.createElement("div",{"data-icon":"",className:un(F==null?void 0:F.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||he():null,d.type!=="loading"?xe:null):null,R.createElement("div",{"data-content":"",className:un(F==null?void 0:F.content,d==null||(s=d.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:un(F==null?void 0:F.title,d==null||(i=d.classNames)==null?void 0:i.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?R.createElement("div",{"data-description":"",className:un(A,Yn,F==null?void 0:F.description,d==null||(a=d.classNames)==null?void 0:a.description)},typeof d.description=="function"?d.description():d.description):null),R.isValidElement(d.cancel)?d.cancel:d.cancel&&wa(d.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||E,onClick:se=>{wa(d.cancel)&&Tt&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,se),wt())},className:un(F==null?void 0:F.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,R.isValidElement(d.action)?d.action:d.action&&wa(d.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||T,onClick:se=>{wa(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,se),!se.defaultPrevented&&wt())},className:un(F==null?void 0:F.actionButton,d==null||(c=d.classNames)==null?void 0:c.actionButton)},d.action.label):null)};function zb(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function S8(t,e){const n={};return[t,e].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?m8:h8;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${i}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${i}-${c}`]=a:n[`${i}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const C8=R.forwardRef(function(e,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:u,mobileOffset:d,theme:f="light",richColors:h,duration:g,style:b,visibleToasts:y=p8,toastOptions:v,dir:x=zb(),gap:w=b8,icons:S,containerAriaLabel:C="Notifications"}=e,[k,N]=R.useState([]),E=R.useMemo(()=>r?k.filter(H=>H.toasterId===r):k.filter(H=>!H.toasterId),[k,r]),T=R.useMemo(()=>Array.from(new Set([s].concat(E.filter(H=>H.position).map(H=>H.position)))),[E,s]),[O,A]=R.useState([]),[D,z]=R.useState(!1),[$,Y]=R.useState(!1),[F,U]=R.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=R.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=R.useRef(null),K=R.useRef(!1),I=R.useCallback(H=>{N(X=>{var V;return(V=X.find(ee=>ee.id===H.id))!=null&&V.delete||St.dismiss(H.id),X.filter(({id:ee})=>ee!==H.id)})},[]);return R.useEffect(()=>St.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{N(X=>X.map(V=>V.id===H.id?{...V,delete:!0}:V))});return}setTimeout(()=>{vi.flushSync(()=>{N(X=>{const V=X.findIndex(ee=>ee.id===H.id);return V!==-1?[...X.slice(0,V),{...X[V],...H},...X.slice(V+1)]:[H,...X]})})})}),[k]),R.useEffect(()=>{if(f!=="system"){U(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:X})=>{U(X?"dark":"light")})}catch{H.addListener(({matches:V})=>{try{U(V?"dark":"light")}catch(ee){console.error(ee)}})}},[f]),R.useEffect(()=>{k.length<=1&&z(!1)},[k]),R.useEffect(()=>{const H=X=>{var V;if(i.every(J=>X[J]||X.code===J)){var B;z(!0),(B=_.current)==null||B.focus()}X.code==="Escape"&&(document.activeElement===_.current||(V=_.current)!=null&&V.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[i]),R.useEffect(()=>{if(_.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,K.current=!1)}},[_.current]),R.createElement("section",{ref:n,"aria-label":`${C} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((H,X)=>{var V;const[ee,B]=H.split("-");return E.length?R.createElement("ol",{key:H,dir:x==="auto"?zb():x,tabIndex:-1,ref:_,className:c,"data-sonner-toaster":!0,"data-sonner-theme":F,"data-y-position":ee,"data-x-position":B,style:{"--front-toast-height":`${((V=O[0])==null?void 0:V.height)||0}px`,"--width":`${g8}px`,"--gap":`${w}px`,...b,...S8(u,d)},onBlur:J=>{K.current&&!J.currentTarget.contains(J.relatedTarget)&&(K.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||K.current||(K.current=!0,L.current=J.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{$||z(!1)},onDragEnd:()=>z(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},E.filter(J=>!J.position&&X===0||J.position===H).map((J,te)=>{var re,ne;return R.createElement(w8,{key:J.id,icons:S,index:te,toast:J,defaultRichColors:h,duration:(re=v==null?void 0:v.duration)!=null?re:g,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:o,visibleToasts:y,closeButton:(ne=v==null?void 0:v.closeButton)!=null?ne:l,interacting:$,position:H,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:I,toasts:E.filter(G=>G.position==J.position),heights:O.filter(G=>G.position==J.position),setHeights:A,expandByDefault:a,gap:w,expanded:D,swipeDirections:e.swipeDirections})})):null}))}),k8=({...t})=>p.jsx(C8,{theme:"system",className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t}),IR=Xe("animate-spin rounded-full border-2 border-current border-t-transparent",{variants:{size:{default:"h-5 w-5",sm:"h-4 w-4",lg:"h-6 w-6",xl:"h-8 w-8"}},defaultVariants:{size:"default"}}),PR=m.forwardRef(({className:t,size:e,...n},r)=>p.jsx("div",{ref:r,className:M(IR({size:e}),t),role:"status","aria-label":"Loading",...n,children:p.jsx("span",{className:"sr-only",children:"Loading..."})}));PR.displayName="Spinner";const jR=m.forwardRef(({className:t,steps:e,currentStep:n,orientation:r="horizontal",onStepClick:o,allowClickOnCompleted:s=!0,...i},a)=>{const l=r==="vertical";return p.jsx("div",{ref:a,className:M("flex",l?"flex-col":"flex-row items-center",t),...i,children:e.map((c,u)=>{const d=u<n,f=u===n,h=o&&(s?d:!1);return p.jsxs(m.Fragment,{children:[p.jsxs("div",{className:M("flex",l?"flex-row items-start gap-3":"flex-col items-center gap-2"),children:[p.jsx("button",{type:"button",disabled:!h,onClick:()=>h&&(o==null?void 0:o(u)),className:M("relative flex h-10 w-10 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition-all",d?"border-primary bg-primary text-primary-foreground":f?"border-primary bg-background text-primary":"border-muted-foreground/30 bg-background text-muted-foreground",h&&"cursor-pointer hover:border-primary hover:text-primary"),children:d?p.jsx(kt,{className:"h-5 w-5"}):c.icon??u+1}),p.jsxs("div",{className:M(l?"pb-8":"text-center",l&&u===e.length-1&&"pb-0"),children:[p.jsx("p",{className:M("text-sm font-medium",f||d?"text-foreground":"text-muted-foreground"),children:c.title}),c.description&&p.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:c.description})]})]}),u<e.length-1&&p.jsx("div",{className:M("transition-colors",l?"ml-5 h-full min-h-[24px] w-0.5 -translate-x-1/2":"mx-2 h-0.5 flex-1 min-w-[24px]",u<n?"bg-primary":"bg-muted-foreground/30")})]},c.id)})})});jR.displayName="Stepper";const _R=m.forwardRef(({className:t,step:e,currentStep:n,children:r,...o},s)=>e!==n?null:p.jsx("div",{ref:s,className:M("mt-4",t),...o,children:r}));_R.displayName="StepperContent";var Hc="Switch",[N8]=Ie(Hc),[E8,M8]=N8(Hc),LR=m.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:c,form:u,...d}=t,[f,h]=m.useState(null),g=oe(e,w=>h(w)),b=m.useRef(!1),y=f?u||!!f.closest("form"):!0,[v,x]=Oe({prop:o,defaultProp:s??!1,onChange:c,caller:Hc});return p.jsxs(E8,{scope:n,checked:v,disabled:a,children:[p.jsx(Z.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":zR(v),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:g,onClick:P(t.onClick,w=>{x(S=>!S),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})}),y&&p.jsx(BR,{control:f,bubbles:!b.current,name:r,value:l,checked:v,required:i,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});LR.displayName=Hc;var FR="SwitchThumb",$R=m.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,o=M8(FR,n);return p.jsx(Z.span,{"data-state":zR(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:e})});$R.displayName=FR;var T8="SwitchBubbleInput",BR=m.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:r=!0,...o},s)=>{const i=m.useRef(null),a=oe(i,s),l=cs(n),c=Di(e);return m.useEffect(()=>{const u=i.current;if(!u)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&h){const g=new Event("click",{bubbles:r});h.call(u,n),u.dispatchEvent(g)}},[l,n,r]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});BR.displayName=T8;function zR(t){return t?"checked":"unchecked"}var HR=LR,R8=$R;const VR=m.forwardRef(({className:t,...e},n)=>p.jsx(HR,{className:M("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:n,children:p.jsx(R8,{className:M("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));VR.displayName=HR.displayName;const WR=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{className:"relative w-full overflow-auto",children:p.jsx("table",{ref:n,className:M("w-full caption-bottom text-sm",t),...e})}));WR.displayName="Table";const UR=m.forwardRef(({className:t,...e},n)=>p.jsx("thead",{ref:n,className:M("[&_tr]:border-b",t),...e}));UR.displayName="TableHeader";const GR=m.forwardRef(({className:t,...e},n)=>p.jsx("tbody",{ref:n,className:M("[&_tr:last-child]:border-0",t),...e}));GR.displayName="TableBody";const KR=m.forwardRef(({className:t,...e},n)=>p.jsx("tfoot",{ref:n,className:M("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));KR.displayName="TableFooter";const YR=m.forwardRef(({className:t,...e},n)=>p.jsx("tr",{ref:n,className:M("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));YR.displayName="TableRow";const qR=m.forwardRef(({className:t,...e},n)=>p.jsx("th",{ref:n,className:M("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));qR.displayName="TableHead";const XR=m.forwardRef(({className:t,...e},n)=>p.jsx("td",{ref:n,className:M("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));XR.displayName="TableCell";const JR=m.forwardRef(({className:t,...e},n)=>p.jsx("caption",{ref:n,className:M("mt-4 text-sm text-muted-foreground",t),...e}));JR.displayName="TableCaption";var Vc="Tabs",[A8]=Ie(Vc,[Mn]),ZR=Mn(),[O8,Yh]=A8(Vc),QR=m.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=t,u=an(a),[d,f]=Oe({prop:r,onChange:o,defaultProp:s??"",caller:Vc});return p.jsx(O8,{scope:n,baseId:Ee(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:p.jsx(Z.div,{dir:u,"data-orientation":i,...c,ref:e})})});QR.displayName=Vc;var eA="TabsList",tA=m.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...o}=t,s=Yh(eA,n),i=ZR(n);return p.jsx(Fi,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(Z.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:e})})});tA.displayName=eA;var nA="TabsTrigger",rA=m.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=t,i=Yh(nA,n),a=ZR(n),l=iA(i.baseId,r),c=aA(i.baseId,r),u=r===i.value;return p.jsx($i,{asChild:!0,...a,focusable:!o,active:u,children:p.jsx(Z.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:e,onMouseDown:P(t.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:P(t.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:P(t.onFocus,()=>{const d=i.activationMode!=="manual";!u&&!o&&d&&i.onValueChange(r)})})})});rA.displayName=nA;var oA="TabsContent",sA=m.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=t,a=Yh(oA,n),l=iA(a.baseId,r),c=aA(a.baseId,r),u=r===a.value,d=m.useRef(u);return m.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),p.jsx(Pe,{present:o||u,children:({present:f})=>p.jsx(Z.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...i,ref:e,style:{...t.style,animationDuration:d.current?"0s":void 0},children:f&&s})})});sA.displayName=oA;function iA(t,e){return`${t}-trigger-${e}`}function aA(t,e){return`${t}-content-${e}`}var D8=QR,lA=tA,cA=rA,uA=sA;const I8=D8,dA=m.forwardRef(({className:t,...e},n)=>p.jsx(lA,{ref:n,className:M("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));dA.displayName=lA.displayName;const fA=m.forwardRef(({className:t,...e},n)=>p.jsx(cA,{ref:n,className:M("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",t),...e}));fA.displayName=cA.displayName;const pA=m.forwardRef(({className:t,...e},n)=>p.jsx(uA,{ref:n,className:M("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));pA.displayName=uA.displayName;const hA=m.forwardRef(({className:t,...e},n)=>p.jsx("textarea",{className:M("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...e}));hA.displayName="Textarea";function P8(t,e){const n=t.match(/^(\d{1,2}):(\d{2})$/),r=t.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i);if(n&&e==="24"){const o=parseInt(n[1],10),s=parseInt(n[2],10);if(o>=0&&o<=23&&s>=0&&s<=59)return{hours:o,minutes:s,period:o>=12?"PM":"AM"}}if(r&&e==="12"){const o=parseInt(r[1],10),s=parseInt(r[2],10),i=r[3].toUpperCase();if(o>=1&&o<=12&&s>=0&&s<=59)return{hours:o,minutes:s,period:i}}return null}function j8(t,e,n,r){const o=e.toString().padStart(2,"0");if(n==="24")return`${t.toString().padStart(2,"0")}:${o}`;const s=t===0?12:t>12?t-12:t,i=r||(t>=12?"PM":"AM");return`${s}:${o} ${i}`}const mA=m.forwardRef(({className:t,value:e="",onChange:n,format:r="24",...o},s)=>{const i=a=>{n==null||n(a.target.value)};return p.jsxs("div",{className:"relative",children:[p.jsx(mf,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"text",className:M("flex h-10 w-full rounded-md border border-input bg-background pl-10 pr-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",t),ref:s,value:e,onChange:i,placeholder:r==="24"?"HH:MM":"HH:MM AM",...o})]})});mA.displayName="TimePickerInput";const gA=m.forwardRef(({value:t,onChange:e,format:n="24",minuteStep:r=1,disabled:o=!1,className:s,placeholder:i},a)=>{const[l,c]=m.useState(!1),[u,d]=m.useState(n==="24"?0:12),[f,h]=m.useState(0),[g,b]=m.useState("AM"),y=m.useRef(null);m.useEffect(()=>{if(t){const N=P8(t,n);N&&(d(n==="12"?N.hours===0?12:N.hours>12?N.hours-12:N.hours:N.hours),h(N.minutes),b(N.period))}},[t,n]),m.useEffect(()=>{const N=E=>{y.current&&!y.current.contains(E.target)&&c(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const v=(N,E,T)=>{let O=N;n==="12"&&(T==="PM"&&O!==12&&(O+=12),T==="AM"&&O===12&&(O=0));const A=j8(O,E,n,n==="12"?T:void 0);e==null||e(A)},x=()=>{const N=n==="24"?23:12,E=n==="24"?0:1,T=u>=N?E:u+1;d(T),v(T,f,g)},w=()=>{const N=n==="24"?23:12,T=u<=(n==="24"?0:1)?N:u-1;d(T),v(T,f,g)},S=()=>{const N=(f+r)%60;h(N),v(u,N,g)},C=()=>{const N=f-r<0?60-r:f-r;h(N),v(u,N,g)},k=()=>{const N=g==="AM"?"PM":"AM";b(N),v(u,f,N)};return p.jsxs("div",{ref:y,className:M("relative",s),children:[p.jsxs("div",{className:M("flex h-10 w-full items-center rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",o&&"cursor-not-allowed opacity-50",!o&&"cursor-pointer hover:bg-accent/50"),onClick:()=>!o&&c(!l),children:[p.jsx(mf,{className:"mr-2 h-4 w-4 text-muted-foreground"}),p.jsx("span",{className:M("font-mono",!t&&"text-muted-foreground"),children:t||i||(n==="24"?"00:00":"12:00 AM")})]}),l&&!o&&p.jsxs("div",{ref:a,className:"absolute z-50 mt-1 rounded-md border bg-popover p-3 shadow-md",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:x,children:p.jsx(Sa,{className:"h-4 w-4"})}),p.jsx("span",{className:"w-10 text-center text-2xl font-mono",children:u.toString().padStart(2,"0")}),p.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:w,children:p.jsx(Bn,{className:"h-4 w-4"})})]}),p.jsx("span",{className:"text-2xl font-mono",children:":"}),p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:S,children:p.jsx(Sa,{className:"h-4 w-4"})}),p.jsx("span",{className:"w-10 text-center text-2xl font-mono",children:f.toString().padStart(2,"0")}),p.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:C,children:p.jsx(Bn,{className:"h-4 w-4"})})]}),n==="12"&&p.jsxs("div",{className:"flex flex-col items-center ml-2",children:[p.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:k,children:p.jsx(Sa,{className:"h-4 w-4"})}),p.jsx("span",{className:"w-10 text-center text-lg font-mono",children:g}),p.jsx("button",{type:"button",className:"p-1 hover:bg-accent rounded",onClick:k,children:p.jsx(Bn,{className:"h-4 w-4"})})]})]}),p.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[p.jsx("button",{type:"button",className:"px-3 py-1 text-sm rounded-md hover:bg-accent",onClick:()=>{const N=new Date,E=N.getHours(),T=N.getMinutes();n==="12"?(d(E===0?12:E>12?E-12:E),b(E>=12?"PM":"AM")):d(E),h(T),v(n==="12"?E===0?12:E>12?E-12:E:E,T,E>=12?"PM":"AM")},children:"Now"}),p.jsx("button",{type:"button",className:"px-3 py-1 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90",onClick:()=>c(!1),children:"Done"})]})]})]})});gA.displayName="TimePicker";const _8=Xe("relative",{variants:{variant:{default:"",alternating:""}},defaultVariants:{variant:"default"}}),bA=m.forwardRef(({className:t,variant:e,...n},r)=>p.jsx("div",{ref:r,className:M(_8({variant:e}),t),...n}));bA.displayName="Timeline";const L8=Xe("relative pb-8 pl-8 last:pb-0",{variants:{variant:{default:"",success:"[--timeline-dot-color:theme(colors.green.500)]",warning:"[--timeline-dot-color:theme(colors.yellow.500)]",error:"[--timeline-dot-color:theme(colors.red.500)]",info:"[--timeline-dot-color:theme(colors.blue.500)]"}},defaultVariants:{variant:"default"}}),yA=m.forwardRef(({className:t,variant:e,...n},r)=>p.jsx("div",{ref:r,className:M(L8({variant:e}),t),...n}));yA.displayName="TimelineItem";const F8=Xe("absolute left-[11px] top-[26px] h-[calc(100%-26px)] w-px",{variants:{variant:{default:"bg-border",dashed:"border-l border-dashed border-border bg-transparent",dotted:"border-l border-dotted border-border bg-transparent"}},defaultVariants:{variant:"default"}}),vA=m.forwardRef(({className:t,variant:e,...n},r)=>p.jsx("div",{ref:r,className:M(F8({variant:e}),t),...n}));vA.displayName="TimelineLine";const $8=Xe("absolute left-0 flex h-6 w-6 items-center justify-center rounded-full border-2 border-background",{variants:{variant:{default:"bg-muted",filled:"bg-primary text-primary-foreground",outline:"border-2 border-primary bg-background",icon:"bg-primary text-primary-foreground"},size:{sm:"h-4 w-4",default:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),xA=m.forwardRef(({className:t,variant:e,size:n,icon:r,children:o,...s},i)=>p.jsx("div",{ref:i,className:M($8({variant:e,size:n}),"bg-[var(--timeline-dot-color,theme(colors.muted.DEFAULT))]",t),...s,children:r||o}));xA.displayName="TimelineDot";const wA=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("pt-0.5",t),...e}));wA.displayName="TimelineContent";const SA=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("flex items-center gap-2",t),...e}));SA.displayName="TimelineHeader";const CA=m.forwardRef(({className:t,...e},n)=>p.jsx("h3",{ref:n,className:M("font-heading font-semibold leading-none tracking-tight",t),...e}));CA.displayName="TimelineTitle";const kA=m.forwardRef(({className:t,...e},n)=>p.jsx("time",{ref:n,className:M("text-sm text-muted-foreground",t),...e}));kA.displayName="TimelineTime";const NA=m.forwardRef(({className:t,...e},n)=>p.jsx("p",{ref:n,className:M("mt-2 text-sm text-muted-foreground",t),...e}));NA.displayName="TimelineDescription";const EA=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("relative flex items-start gap-4",t),...e}));EA.displayName="TimelineHorizontal";const MA=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("relative flex flex-col items-center",t),...e}));MA.displayName="TimelineHorizontalItem";const TA=m.forwardRef(({className:t,...e},n)=>p.jsx("div",{ref:n,className:M("absolute left-[calc(50%+12px)] top-3 h-px w-[calc(100%-24px)] bg-border",t),...e}));TA.displayName="TimelineHorizontalLine";var Pr="ToggleGroup",[RA]=Ie(Pr,[Mn]),AA=Mn(),qh=R.forwardRef((t,e)=>{const{type:n,...r}=t;if(n==="single"){const o=r;return p.jsx(B8,{...o,ref:e})}if(n==="multiple"){const o=r;return p.jsx(z8,{...o,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${Pr}\``)});qh.displayName=Pr;var[OA,DA]=RA(Pr),B8=R.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=t,[i,a]=Oe({prop:n,defaultProp:r??"",onChange:o,caller:Pr});return p.jsx(OA,{scope:t.__scopeToggleGroup,type:"single",value:R.useMemo(()=>i?[i]:[],[i]),onItemActivate:a,onItemDeactivate:R.useCallback(()=>a(""),[a]),children:p.jsx(IA,{...s,ref:e})})}),z8=R.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=t,[i,a]=Oe({prop:n,defaultProp:r??[],onChange:o,caller:Pr}),l=R.useCallback(u=>a((d=[])=>[...d,u]),[a]),c=R.useCallback(u=>a((d=[])=>d.filter(f=>f!==u)),[a]);return p.jsx(OA,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:l,onItemDeactivate:c,children:p.jsx(IA,{...s,ref:e})})});qh.displayName=Pr;var[H8,V8]=RA(Pr),IA=R.forwardRef((t,e)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:i,loop:a=!0,...l}=t,c=AA(n),u=an(i),d={role:"group",dir:u,...l};return p.jsx(H8,{scope:n,rovingFocus:o,disabled:r,children:o?p.jsx(Fi,{asChild:!0,...c,orientation:s,dir:u,loop:a,children:p.jsx(Z.div,{...d,ref:e})}):p.jsx(Z.div,{...d,ref:e})})}),Hl="ToggleGroupItem",PA=R.forwardRef((t,e)=>{const n=DA(Hl,t.__scopeToggleGroup),r=V8(Hl,t.__scopeToggleGroup),o=AA(t.__scopeToggleGroup),s=n.value.includes(t.value),i=r.disabled||t.disabled,a={...t,pressed:s,disabled:i},l=R.useRef(null);return r.rovingFocus?p.jsx($i,{asChild:!0,...o,focusable:!i,active:s,ref:l,children:p.jsx(Hb,{...a,ref:e})}):p.jsx(Hb,{...a,ref:e})});PA.displayName=Hl;var Hb=R.forwardRef((t,e)=>{const{__scopeToggleGroup:n,value:r,...o}=t,s=DA(Hl,n),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},a=s.type==="single"?i:void 0;return p.jsx(Fh,{...a,...o,ref:e,onPressedChange:l=>{l?s.onItemActivate(r):s.onItemDeactivate(r)}})}),jA=qh,_A=PA;const LA=m.createContext({size:"default",variant:"default"}),FA=m.forwardRef(({className:t,variant:e,size:n,children:r,...o},s)=>p.jsx(jA,{ref:s,className:M("flex items-center justify-center gap-1",t),...o,children:p.jsx(LA.Provider,{value:{variant:e,size:n},children:r})}));FA.displayName=jA.displayName;const $A=m.forwardRef(({className:t,children:e,variant:n,size:r,...o},s)=>{const i=m.useContext(LA);return p.jsx(_A,{ref:s,className:M($h({variant:i.variant||n,size:i.size||r}),t),...o,children:e})});$A.displayName=_A.displayName;var[Wc]=Ie("Tooltip",[En]),Uc=En(),BA="TooltipProvider",W8=700,nf="tooltip.open",[U8,Xh]=Wc(BA),zA=t=>{const{__scopeTooltip:e,delayDuration:n=W8,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=t,i=m.useRef(!0),a=m.useRef(!1),l=m.useRef(0);return m.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(U8,{scope:e,isOpenDelayedRef:i,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:m.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:s})};zA.displayName=BA;var yi="Tooltip",[G8,Gc]=Wc(yi),HA=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=t,l=Xh(yi,t.__scopeTooltip),c=Uc(e),[u,d]=m.useState(null),f=Ee(),h=m.useRef(0),g=i??l.disableHoverableContent,b=a??l.delayDuration,y=m.useRef(!1),[v,x]=Oe({prop:r,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(nf))):l.onClose(),s==null||s(N)},caller:yi}),w=m.useMemo(()=>v?y.current?"delayed-open":"instant-open":"closed",[v]),S=m.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,x(!0)},[x]),C=m.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),k=m.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,x(!0),h.current=0},b)},[b,x]);return m.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(fs,{...c,children:p.jsx(G8,{scope:e,contentId:f,open:v,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:m.useCallback(()=>{l.isOpenDelayedRef.current?k():S()},[l.isOpenDelayedRef,k,S]),onTriggerLeave:m.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:n})})};HA.displayName=yi;var rf="TooltipTrigger",VA=m.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=Gc(rf,n),s=Xh(rf,n),i=Uc(n),a=m.useRef(null),l=oe(e,a,o.onTriggerChange),c=m.useRef(!1),u=m.useRef(!1),d=m.useCallback(()=>c.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(ps,{asChild:!0,...i,children:p.jsx(Z.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:P(t.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:P(t.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:P(t.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:P(t.onFocus,()=>{c.current||o.onOpen()}),onBlur:P(t.onBlur,o.onClose),onClick:P(t.onClick,o.onClose)})})});VA.displayName=rf;var K8="TooltipPortal",[hY,Y8]=Wc(K8,{forceMount:void 0}),ns="TooltipContent",WA=m.forwardRef((t,e)=>{const n=Y8(ns,t.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=t,i=Gc(ns,t.__scopeTooltip);return p.jsx(Pe,{present:r||i.open,children:i.disableHoverableContent?p.jsx(UA,{side:o,...s,ref:e}):p.jsx(q8,{side:o,...s,ref:e})})}),q8=m.forwardRef((t,e)=>{const n=Gc(ns,t.__scopeTooltip),r=Xh(ns,t.__scopeTooltip),o=m.useRef(null),s=oe(e,o),[i,a]=m.useState(null),{trigger:l,onClose:c}=n,u=o.current,{onPointerInTransitChange:d}=r,f=m.useCallback(()=>{a(null),d(!1)},[d]),h=m.useCallback((g,b)=>{const y=g.currentTarget,v={x:g.clientX,y:g.clientY},x=eY(v,y.getBoundingClientRect()),w=tY(v,x),S=nY(b.getBoundingClientRect()),C=oY([...w,...S]);a(C),d(!0)},[d]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(l&&u){const g=y=>h(y,u),b=y=>h(y,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",b),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",b)}}},[l,u,h,f]),m.useEffect(()=>{if(i){const g=b=>{const y=b.target,v={x:b.clientX,y:b.clientY},x=(l==null?void 0:l.contains(y))||(u==null?void 0:u.contains(y)),w=!rY(v,i);x?f():w&&(f(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,i,c,f]),p.jsx(UA,{...t,ref:s})}),[X8,J8]=Wc(yi,{isInside:!1}),Z8=Ub("TooltipContent"),UA=m.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=t,l=Gc(ns,n),c=Uc(n),{onClose:u}=l;return m.useEffect(()=>(document.addEventListener(nf,u),()=>document.removeEventListener(nf,u)),[u]),m.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.jsx(Er,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(ji,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Z8,{children:r}),p.jsx(X8,{scope:n,isInside:!0,children:p.jsx(gS,{id:l.contentId,role:"tooltip",children:o||r})})]})})});WA.displayName=ns;var GA="TooltipArrow",Q8=m.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=Uc(n);return J8(GA,n).isInside?null:p.jsx(_i,{...o,...r,ref:e})});Q8.displayName=GA;function eY(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function tY(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function nY(t){const{top:e,right:n,bottom:r,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:r},{x:o,y:r}]}function rY(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const a=e[s],l=e[i],c=a.x,u=a.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(o=!o)}return o}function oY(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),sY(e)}function sY(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const o=t[r];for(;e.length>=2;){const s=e[e.length-1],i=e[e.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const o=t[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var iY=zA,aY=HA,lY=VA,KA=WA;const cY=iY,uY=aY,dY=lY,YA=m.forwardRef(({className:t,sideOffset:e=4,...n},r)=>p.jsx(KA,{ref:r,sideOffset:e,className:M("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",t),...n}));YA.displayName=KA.displayName;const qA=m.forwardRef(({className:t,data:e,selectedId:n,onSelect:r,expandedIds:o,onExpandChange:s,showIcons:i=!0,indentSize:a=20,...l},c)=>{const[u,d]=m.useState([]),f=o??u,h=b=>{const y=f.includes(b)?f.filter(v=>v!==b):[...f,b];s?s(y):d(y)},g=(b,y=0)=>{var S;const v=b.children&&b.children.length>0,x=f.includes(b.id),w=n===b.id;return v?p.jsxs(uf,{open:x,onOpenChange:()=>h(b.id),children:[p.jsx(qb,{asChild:!0,children:p.jsxs("button",{type:"button",onClick:()=>r==null?void 0:r(b),className:M("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",w&&"bg-accent"),style:{paddingLeft:`${y*a+8}px`},children:[p.jsx(Nr,{className:M("h-4 w-4 shrink-0 text-muted-foreground transition-transform",x&&"rotate-90")}),i&&p.jsx("span",{className:"shrink-0 text-muted-foreground",children:b.icon??(x?p.jsx(VO,{className:"h-4 w-4"}):p.jsx(WO,{className:"h-4 w-4"}))}),p.jsx("span",{className:"truncate",children:b.name})]})}),p.jsx(Xb,{className:"overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",children:(S=b.children)==null?void 0:S.map(C=>g(C,y+1))})]},b.id):p.jsxs("button",{type:"button",onClick:()=>r==null?void 0:r(b),className:M("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",w&&"bg-accent"),style:{paddingLeft:`${y*a+8}px`},children:[i&&p.jsx("span",{className:"shrink-0 text-muted-foreground",children:b.icon??p.jsx(gf,{className:"h-4 w-4"})}),p.jsx("span",{className:"truncate",children:b.name})]},b.id)};return p.jsx("div",{ref:c,className:M("space-y-1",t),...l,children:e.map(b=>g(b))})});qA.displayName="TreeView";exports.Accordion=GD;exports.AccordionContent=Ny;exports.AccordionItem=Cy;exports.AccordionTrigger=ky;exports.Alert=Ey;exports.AlertDescription=Ty;exports.AlertDialog=kP;exports.AlertDialogAction=Av;exports.AlertDialogCancel=Ov;exports.AlertDialogContent=Nv;exports.AlertDialogDescription=Rv;exports.AlertDialogFooter=Mv;exports.AlertDialogHeader=Ev;exports.AlertDialogOverlay=Sf;exports.AlertDialogPortal=kv;exports.AlertDialogTitle=Tv;exports.AlertDialogTrigger=NP;exports.AlertTitle=My;exports.AspectRatio=RP;exports.AutocompleteSearch=eR;exports.Avatar=Vv;exports.AvatarFallback=Uv;exports.AvatarImage=Wv;exports.Badge=Xu;exports.Banner=Yv;exports.Breadcrumb=qv;exports.BreadcrumbEllipsis=tx;exports.BreadcrumbItem=Jv;exports.BreadcrumbLink=Zv;exports.BreadcrumbList=Xv;exports.BreadcrumbPage=Qv;exports.BreadcrumbSeparator=ex;exports.Button=Cn;exports.Calendar=Ai;exports.Card=Dx;exports.CardContent=_x;exports.CardDescription=jx;exports.CardFooter=Lx;exports.CardHeader=Ix;exports.CardTitle=Px;exports.Carousel=Hx;exports.CarouselContent=Vx;exports.CarouselItem=Wx;exports.CarouselNext=Gx;exports.CarouselPrevious=Ux;exports.Checkbox=ew;exports.CodeBlock=nw;exports.Collapsible=yL;exports.CollapsibleContent=xL;exports.CollapsibleTrigger=vL;exports.Command=lc;exports.CommandDialog=KL;exports.CommandEmpty=Wf;exports.CommandGroup=Uf;exports.CommandInput=Hf;exports.CommandItem=Gf;exports.CommandList=Vf;exports.CommandSearch=ZT;exports.CommandSeparator=bw;exports.CommandShortcut=yw;exports.ContextMenu=gB;exports.ContextMenuCheckboxItem=Y0;exports.ContextMenuContent=G0;exports.ContextMenuGroup=yB;exports.ContextMenuItem=K0;exports.ContextMenuLabel=X0;exports.ContextMenuPortal=vB;exports.ContextMenuRadioGroup=wB;exports.ContextMenuRadioItem=q0;exports.ContextMenuSeparator=J0;exports.ContextMenuShortcut=Z0;exports.ContextMenuSub=xB;exports.ContextMenuSubContent=U0;exports.ContextMenuSubTrigger=W0;exports.ContextMenuTrigger=bB;exports.CreditCardCVVInput=Tp;exports.CreditCardExpiryInput=Mp;exports.CreditCardInput=eS;exports.CreditCardNumberInput=Ep;exports.CurrencyInput=r1;exports.DatePicker=fS;exports.DateRangePicker=pS;exports.DateTimePicker=t1;exports.DecimalInput=Ki;exports.Dialog=dw;exports.DialogClose=GL;exports.DialogContent=zf;exports.DialogDescription=gw;exports.DialogFooter=hw;exports.DialogHeader=pw;exports.DialogOverlay=Bf;exports.DialogPortal=fw;exports.DialogTitle=mw;exports.DialogTrigger=UL;exports.DocumentInput=oC;exports.Drawer=bz;exports.DrawerClose=l1;exports.DrawerContent=u1;exports.DrawerDescription=h1;exports.DrawerFooter=f1;exports.DrawerHandle=m1;exports.DrawerHeader=d1;exports.DrawerOverlay=Ip;exports.DrawerPortal=c1;exports.DrawerTitle=p1;exports.DrawerTrigger=a1;exports.DropdownMenu=$z;exports.DropdownMenuCheckboxItem=K1;exports.DropdownMenuContent=U1;exports.DropdownMenuGroup=zz;exports.DropdownMenuItem=G1;exports.DropdownMenuLabel=q1;exports.DropdownMenuPortal=Hz;exports.DropdownMenuRadioGroup=Wz;exports.DropdownMenuRadioItem=Y1;exports.DropdownMenuSeparator=X1;exports.DropdownMenuShortcut=J1;exports.DropdownMenuSub=Vz;exports.DropdownMenuSubContent=W1;exports.DropdownMenuSubTrigger=V1;exports.DropdownMenuTrigger=Bz;exports.EmailInput=Z1;exports.ExpandableSearch=QT;exports.Fieldset=Q1;exports.FieldsetDescription=tC;exports.FieldsetLegend=eC;exports.FileInput=vc;exports.FormDescription=aC;exports.FormLabel=iC;exports.FormMessage=lC;exports.HoverCard=r5;exports.HoverCardContent=mC;exports.HoverCardTrigger=o5;exports.Image=TC;exports.ImageInput=rC;exports.Input=gC;exports.InputOTP=bC;exports.InputOTPGroup=vC;exports.InputOTPSeparator=xC;exports.InputOTPSlot=yC;exports.KEY_SYMBOLS=SC;exports.Kbd=jp;exports.KbdGroup=kC;exports.Link=MC;exports.Menubar=lk;exports.MenubarCheckboxItem=hk;exports.MenubarContent=fk;exports.MenubarGroup=R5;exports.MenubarItem=pk;exports.MenubarLabel=gk;exports.MenubarMenu=T5;exports.MenubarPortal=A5;exports.MenubarRadioGroup=D5;exports.MenubarRadioItem=mk;exports.MenubarSeparator=bk;exports.MenubarShortcut=yk;exports.MenubarSub=O5;exports.MenubarSubContent=dk;exports.MenubarSubTrigger=uk;exports.MenubarTrigger=ck;exports.MultiSelect=vk;exports.NavigationDrawer=Tk;exports.NavigationDrawerContent=Ak;exports.NavigationDrawerFooter=Ok;exports.NavigationDrawerGroup=Pk;exports.NavigationDrawerHeader=Rk;exports.NavigationDrawerItem=Ik;exports.NavigationDrawerProvider=j5;exports.NavigationDrawerToggle=Dk;exports.NavigationMenu=sN;exports.NavigationMenuContent=cN;exports.NavigationMenuIndicator=uN;exports.NavigationMenuItem=e3;exports.NavigationMenuLink=t3;exports.NavigationMenuList=iN;exports.NavigationMenuTrigger=lN;exports.NavigationMenuViewport=Gp;exports.NumberInput=dN;exports.Pagination=fN;exports.PaginationContent=pN;exports.PaginationEllipsis=bN;exports.PaginationItem=hN;exports.PaginationLink=Sc;exports.PaginationNext=gN;exports.PaginationPrevious=mN;exports.PasswordInput=yN;exports.PercentageInput=o1;exports.PhoneInput=xN;exports.Pill=SN;exports.Popover=Ui;exports.PopoverContent=hs;exports.PopoverTrigger=Gi;exports.Progress=TN;exports.RadioGroup=VN;exports.RadioGroupItem=WN;exports.Rating=UN;exports.ResizableHandle=KN;exports.ResizablePanel=Jp;exports.ResizablePanelGroup=GN;exports.RichText=_T;exports.RichTextToolbar=jT;exports.ScrollArea=XT;exports.ScrollBar=Uh;exports.SearchInput=JT;exports.Select=Ds;exports.SelectContent=_o;exports.SelectGroup=hz;exports.SelectItem=$r;exports.SelectLabel=QS;exports.SelectScrollDownButton=Dp;exports.SelectScrollUpButton=Op;exports.SelectSeparator=e1;exports.SelectTrigger=jo;exports.SelectValue=Is;exports.Separator=Js;exports.Sheet=xk;exports.SheetClose=I5;exports.SheetContent=$p;exports.SheetDescription=Ek;exports.SheetFooter=kk;exports.SheetHeader=Ck;exports.SheetOverlay=Fp;exports.SheetPortal=Sk;exports.SheetTitle=Nk;exports.SheetTrigger=wk;exports.Shortcut=NC;exports.Sidebar=nR;exports.SidebarContent=sR;exports.SidebarFooter=iR;exports.SidebarGroup=aR;exports.SidebarGroupContent=cR;exports.SidebarGroupLabel=lR;exports.SidebarHeader=oR;exports.SidebarMenu=uR;exports.SidebarMenuButton=fR;exports.SidebarMenuItem=dR;exports.SidebarMenuSub=pR;exports.SidebarMenuSubButton=mR;exports.SidebarMenuSubItem=hR;exports.SidebarProvider=AK;exports.SidebarSeparator=gR;exports.SidebarTrigger=rR;exports.Skeleton=DK;exports.Slider=DR;exports.Spinner=PR;exports.Stepper=jR;exports.StepperContent=_R;exports.Switch=VR;exports.Table=WR;exports.TableBody=GR;exports.TableCaption=JR;exports.TableCell=XR;exports.TableFooter=KR;exports.TableHead=qR;exports.TableHeader=UR;exports.TableRow=YR;exports.Tabs=I8;exports.TabsContent=pA;exports.TabsList=dA;exports.TabsTrigger=fA;exports.Textarea=hA;exports.TimePicker=gA;exports.TimePickerInput=mA;exports.Timeline=bA;exports.TimelineContent=wA;exports.TimelineDescription=NA;exports.TimelineDot=xA;exports.TimelineHeader=SA;exports.TimelineHorizontal=EA;exports.TimelineHorizontalItem=MA;exports.TimelineHorizontalLine=TA;exports.TimelineItem=yA;exports.TimelineLine=vA;exports.TimelineTime=kA;exports.TimelineTitle=CA;exports.Toaster=k8;exports.Toggle=Bh;exports.ToggleGroup=FA;exports.ToggleGroupItem=$A;exports.Tooltip=uY;exports.TooltipContent=YA;exports.TooltipProvider=cY;exports.TooltipTrigger=dY;exports.TreeView=qA;exports.UnitInput=s1;exports.Video=RC;exports.badgeVariants=Gv;exports.bannerVariants=Kv;exports.buttonVariants=fr;exports.cn=M;exports.currencies=n1;exports.defaultCountries=vN;exports.formLabelVariants=sC;exports.formatFileSize=Ea;exports.formatKey=CC;exports.getFileType=nC;exports.kbdVariants=wC;exports.linkVariants=EC;exports.mediaVariants=Bs;exports.navigationMenuTriggerStyle=aN;exports.pillVariants=wN;exports.spinnerVariants=IR;exports.toggleVariants=$h;exports.useNavigationDrawer=gs;exports.useSidebar=co;
|