1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,882829,e=>{"use strict";var t=e.i(515472);let r=(0,t.createServerReference)("40c6fc0bc7cd406b86ce6244718c56819f07eebd0f",t.callServer,void 0,t.findSourceMapURL,"updateChatVisibility");e.s(["updateChatVisibility",0,r])},509981,e=>{"use strict";e.s(["ChatItem",()=>c]);var t=e.i(243029),r=e.i(622589),i=e.i(269714),a=e.i(12770),n=e.i(842058),s=e.i(526762),o=e.i(152088),l=e.i(519050);let c=(0,n.memo)(({chat:e,isActive:n,onDelete:c,setOpenMobile:d,forAdmin:u,currentUserId:f,chatPrefix:h="/dashboard/chat"})=>{let{visibilityType:p,setVisibilityType:m}=(0,s.useChatVisibility)({chatId:e.id,initialVisibilityType:e.visibility}),g=!!(e.user?.email&&e.userId!==f);return(0,t.jsxs)(i.SidebarMenuItem,{"data-sidebar-chat-id":e.id,children:[(0,t.jsx)(i.SidebarMenuButton,{asChild:!0,className:(0,o.cn)("relative transition-all duration-200 hover:bg-sidebar-accent/50",n&&"data-[active=true]:bg-primary/10 font-medium text-primary",u&&"h-12"),isActive:n,children:(0,t.jsx)(a.default,{href:`${h}/${e.id}`,onClick:()=>d(!1),children:(0,t.jsxs)("div",{className:"flex w-full items-center gap-2 overflow-hidden px-1",children:[(0,t.jsx)("svg",{className:(0,o.cn)("size-3.5 shrink-0",n?"text-primary":"text-muted-foreground/60"),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),(0,t.jsxs)("div",{className:"flex-1 overflow-hidden",children:[(0,t.jsx)("p",{className:"truncate",children:e.title}),g&&(0,t.jsx)("p",{className:"w-full truncate text-muted-foreground text-[10px]",children:e.user.email})]})]})})}),!u&&(0,t.jsxs)(r.DropdownMenu,{modal:!0,children:[(0,t.jsx)(r.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(i.SidebarMenuAction,{className:"mr-0.5 data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",showOnHover:!n,children:[(0,t.jsx)(l.MoreHorizontalIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"More"})]})}),(0,t.jsxs)(r.DropdownMenuContent,{align:"end",side:"bottom",children:[(0,t.jsxs)(r.DropdownMenuSub,{children:[(0,t.jsxs)(r.DropdownMenuSubTrigger,{className:"cursor-pointer",children:[(0,t.jsx)(l.ShareIcon,{}),(0,t.jsx)("span",{children:"Share"})]}),(0,t.jsx)(r.DropdownMenuPortal,{children:(0,t.jsxs)(r.DropdownMenuSubContent,{children:[(0,t.jsxs)(r.DropdownMenuItem,{className:"cursor-pointer flex-row justify-between",onClick:()=>{m("private")},children:[(0,t.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,t.jsx)(l.LockIcon,{size:12}),(0,t.jsx)("span",{children:"Private"})]}),"private"===p?(0,t.jsx)(l.CheckCircleFillIcon,{}):null]}),(0,t.jsxs)(r.DropdownMenuItem,{className:"cursor-pointer flex-row justify-between",onClick:()=>{m("public")},children:[(0,t.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,t.jsx)(l.GlobeIcon,{}),(0,t.jsx)("span",{children:"Public"})]}),"public"===p?(0,t.jsx)(l.CheckCircleFillIcon,{}):null]})]})})]}),(0,t.jsxs)(r.DropdownMenuItem,{className:"cursor-pointer text-destructive focus:bg-destructive/15 focus:text-destructive dark:text-red-500",onSelect:()=>c(e.id),children:[(0,t.jsx)(l.TrashIcon,{}),(0,t.jsx)("span",{children:"Delete"})]})]})]})]})},(e,t)=>e.isActive===t.isActive)},269492,e=>{"use strict";e.s(["SidebarHistory",()=>y,"getChatHistoryPaginationKey",()=>v]);var t=e.i(243029),r=e.i(817353),i=e.i(325329),a=e.i(183144),n=e.i(269714),s=e.i(349666),o=e.i(673562),l=e.i(278194),c=e.i(64496),d=e.i(24012),u=e.i(796615),f=e.i(842058),h=e.i(754219),p=e.i(927375),m=e.i(152088),g=e.i(519050),x=e.i(509981);function v(e,t){if(t&&!1===t.hasMore)return null;if(0===e)return"/api/history?limit=20";let r=t.chats.at(-1);return r?`/api/history?ending_before=${r.id}&limit=20`:null}function b({filter:e,setFilter:r}){return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(a.Input,{onChange:t=>r({...e,email:t.target.value}),placeholder:"Tìm kiếm theo email",value:e.email}),(0,t.jsxs)("div",{className:"mt-2 flex flex-row gap-2",children:[(0,t.jsx)(i.Checkbox,{checked:e.paidUser,onCheckedChange:t=>r({...e,paidUser:"indeterminate"===t?void 0:t})}),(0,t.jsx)("p",{children:"Ngưá»i dùng trả tiá»n"})]})]})}function y({user:e,forAdmin:i}){var a,j,w;let C,D,E,k,{setOpenMobile:S}
1=(0,n.useSidebar)(),{id:N}=(0,u.useParams)(),[R,A]=(0,f.useState)({}),{data:I,setSize:T,isValidating:O,isLoading:_,mutate:M}=(0,p.default)((a=R.email,j=R.paidUser,(e,t)=>{let r=v(e,t);return i&&(r+="&forAdmin=true",a&&(r+=`&email=${encodeURIComponent(a)}`),j&&(r+=`&paidUser=${j}`)),r}),m.fetcher,{fallbackData:[]}),P=(0,u.useRouter)(),[F,z]=(0,f.useState)(null),[V,L]=(0,f.useState)(!1),U=!!I&&I.some(e=>!1===e.hasMore),W=!!I&&I.every(e=>e.chats?.length===0);return e?_?(0,t.jsxs)(n.SidebarGroup,{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-sidebar-foreground/50 text-xs",children:"Today"}),(0,t.jsx)(n.SidebarGroupContent,{children:(0,t.jsx)("div",{className:"flex flex-col",children:[44,32,28,64,52].map(e=>(0,t.jsx)("div",{className:"flex h-8 items-center gap-2 rounded-md px-2",children:(0,t.jsx)("div",{className:"h-4 max-w-(--skeleton-width) flex-1 rounded-md bg-sidebar-accent-foreground/10",style:{"--skeleton-width":`${e}%`}})},e))})})]}):W?(0,t.jsx)(n.SidebarGroup,{children:(0,t.jsx)(n.SidebarGroupContent,{children:(0,t.jsx)("div",{className:"flex w-full flex-row items-center justify-center gap-2 px-2 text-sm text-zinc-500",children:"Your conversations will appear here once you start chatting!"})})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.SidebarGroup,{children:(0,t.jsxs)(n.SidebarGroupContent,{children:[(0,t.jsxs)(n.SidebarMenu,{children:[i&&(0,t.jsx)(b,{filter:R,setFilter:A}),I&&(w=I.flatMap(e=>e.chats),C=new Date,D=(0,c.subWeeks)(C,1),E=(0,l.subMonths)(C,1),k=w.reduce((e,t)=>{let r=new Date(t.createdAt);return(0,s.isToday)(r)?e.today.push(t):(0,o.isYesterday)(r)?e.yesterday.push(t):r>D?e.lastWeek.push(t):r>E?e.lastMonth.push(t):e.older.push(t),e},{today:[],yesterday:[],lastWeek:[],lastMonth:[],older:[]}),(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[k.today.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-sidebar-foreground/50 text-xs",children:"Today"}),k.today.map(r=>(0,t.jsx)(x.ChatItem,{chat:r,chatPrefix:i?"/admin/chat":"/dashboard/chat",currentUserId:e.id,forAdmin:i,isActive:r.id===N,onDelete:e=>{z(e),L(!0)},setOpenMobile:S},r.id))]}),k.yesterday.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-sidebar-foreground/50 text-xs",children:"Yesterday"}),k.yesterday.map(r=>(0,t.jsx)(x.ChatItem,{chat:r,chatPrefix:i?"/admin/chat":"/dashboard/chat",currentUserId:e.id,forAdmin:i,isActive:r.id===N,onDelete:e=>{z(e),L(!0)},setOpenMobile:S},r.id))]}),k.lastWeek.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-sidebar-foreground/50 text-xs",children:"Last 7 days"}),k.lastWeek.map(r=>(0,t.jsx)(x.ChatItem,{chat:r,chatPrefix:i?"/admin/chat":"/dashboard/chat",currentUserId:e.id,forAdmin:i,isActive:r.id===N,onDelete:e=>{z(e),L(!0)},setOpenMobile:S},r.id))]}),k.lastMonth.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-sidebar-foreground/50 text-xs",children:"Last 30 days"}),k.lastMonth.map(r=>(0,t.jsx)(x.ChatItem,{chat:r,chatPrefix:i?"/admin/chat":"/dashboard/chat",currentUserId:e.id,forAdmin:i,isActive:r.id===N,onDelete:e=>{z(e),L(!0)},setOpenMobile:S},r.id))]}),k.older.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 py-1 text-sidebar-foreground/50 text-xs",children:"Older than last month"}),k.older.map(r=>(0,t.jsx)(x.ChatItem,{chat:r,chatPrefix:i?"/admin/chat":"/dashboard/chat",currentUserId:e.id,forAdmin:i,isActive:r.id===N,onDelete:e=>{z(e),L(!0)},setOpenMobile:S},r.id))]})]}))]}),(0,t.jsx)(d.motion.div,{onViewportEnter:()=>{O||U||T(e=>e+1)}}),U?(0,t.jsx)("div",{className:"mt-8 flex w-full flex-row items-center justify-center gap-2 px-2 text-sm text-zinc-500",children:"You have reached the end of your chat history."}):(0,t.jsxs)("div",{className:"mt-8 flex flex-row items-center gap-2 p-2 text-zinc-500 dark:text-zinc-400",children:[(0,t.jsx)("div",{className:"animate-spin",children:(0,t.jsx)(g.LoaderIcon,{})}),(0,t.jsx)("div",{children:"Loading Chats..."})]})]})}),(0,t.jsx)(r.AlertDialog,{onOpenChange:L,open:V,children:(0,t.jsxs)(r.AlertDialogContent,{children:[(0,t.jsxs)(r.AlertDialogHeader,{children:[(0,t.jsx)(r.AlertDialogTitle,{children:"Are you absolutely sure?"}),(0,t.jsx)(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your chat and remove it from our servers."})]}),(0,t.jsxs)(r.AlertDialogFooter,{children:[(0,t.jsx)(r.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(r.AlertDialogAction,{onClick:()=>{let e=fetch(`/api/chat?id=${F}`,{method:"DELETE"});h.toast.promise(e,{loading:"Deleting chat...",success:()=>(M(e=>{if(e)return e.map(e=>({...e,chats:e.chats.filter(e=>e.id!==F)}))}),"Chat deleted successfully"),error:"Failed to delete chat"}
1),L(!1),F===N&&P.push("/")},children:"Continue"})]})]})})]}):(0,t.jsx)(n.SidebarGroup,{children:(0,t.jsx)(n.SidebarGroupContent,{children:(0,t.jsx)("div",{className:"flex w-full flex-row items-center justify-center gap-2 px-2 text-sm text-zinc-500",children:"Login to save and revisit previous chats!"})})})}},526762,e=>{"use strict";e.s(["useChatVisibility",()=>o]);var t=e.i(842058),r=e.i(338554),i=e.i(568838),a=e.i(927375),n=e.i(882829),s=e.i(269492);function o({chatId:e,initialVisibilityType:l}){let{mutate:c,cache:d}=(0,i.useSWRConfig)(),u=d.get("/api/history")?.data,{data:f,mutate:h}=(0,r.default)(`${e}-visibility`,null,{fallbackData:l});return{visibilityType:(0,t.useMemo)(()=>{if(!u)return f;let t=u.chats.find(t=>t.id===e);return t?t.visibility:"private"},[u,e,f]),setVisibilityType:t=>{h(t),c((0,a.unstable_serialize)(s.getChatHistoryPaginationKey)),(0,n.updateChatVisibility)({chatId:e,visibility:t})}}}},812976,e=>{"use strict";let t=["admin.dashboard.read","admin.users.manage","admin.organizations.manage","admin.billing.manage","admin.coupons.manage","admin.transactions.manage","admin.chat.read","admin.settings.manage"],r={user:[],support:[],admin:t,super_admin:t};e.s(["hasPlatformPermission",0,function(e,t){return r["support"===e||"admin"===e||"super_admin"===e?e:"user"].includes(t)}])},744917,e=>{"use strict";var t=e.i(842058),r=e.i(161462),i=e.i(723673),a=e.i(802661),n=e.i(243029);e.s(["createCollection",0,function(e){let s=e+"CollectionProvider",[o,l]=(0,r.createContextScope)(s),[c,d]=o(s,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:i}=e,a=t.useRef(null),s=t.useRef(new Map).current;return(0,n.jsx)(c,{scope:r,itemMap:s,collectionRef:a,children:i})};u.displayName=s;let f=e+"CollectionSlot",h=(0,a.createSlot)(f),p=t.forwardRef((e,t)=>{let{scope:r,children:a}=e,s=d(f,r),o=(0,i.useComposedRefs)(t,s.collectionRef);return(0,n.jsx)(h,{ref:o,children:a})});p.displayName=f;let m=e+"CollectionItemSlot",g="data-radix-collection-item",x=(0,a.createSlot)(m),v=t.forwardRef((e,r)=>{let{scope:a,children:s,...o}=e,l=t.useRef(null),c=(0,i.useComposedRefs)(r,l),u=d(m,a);return t.useEffect(()=>(u.itemMap.set(l,{ref:l,...o}),()=>void u.itemMap.delete(l))),(0,n.jsx)(x,{...{[g]:""},ref:c,children:s})});return v.displayName=m,[{Provider:u,Slot:p,ItemSlot:v},function(r){let i=d(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(i.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[i.collectionRef,i.itemMap])},l]}])},849577,e=>{"use strict";var t=e.i(842058);e.i(243029);var r=t.createContext(void 0);e.s(["useDirection",0,function(e){let i=t.useContext(r);return e||i||"ltr"}])},52706,e=>{"use strict";var t=e.i(842058);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},516913,e=>{"use strict";var t=e.i(825402);e.s(["normalizeDates",0,function(e,...r){let i=t.constructFrom.bind(null,e||r.find(e=>"object"==typeof e));return r.map(i)}])},998636,165525,845255,e=>{"use strict";var t=e.i(825402),r=e.i(329263);function i(e,i,a){let n=(0,r.toDate)(e,a?.in);return isNaN(i)?(0,t.constructFrom)(a?.in||e,NaN):(i&&n.setDate(n.getDate()+i),n)}e.s(["addDays",0,i],998636),e.s(["addMonths",0,function(e,i,a){let n=(0,r.toDate)(e,a?.in);if(isNaN(i))return(0,t.constructFrom)(a?.in||e,NaN);if(!i)return n;let s=n.getDate(),o=(0,t.constructFrom)(a?.in||e,n.getTime());return(o.setMonth(n.getMonth()+i+1,0),s>=o.getDate())?o:(n.setFullYear(o.getFullYear(),o.getMonth(),s),n)}],165525),e.s(["addWeeks",0,function(e,t,r){return i(e,7*t,r)}],845255)},825402,908627,e=>{"use strict";let t=Symbol.for("constructDateFrom");e.s(["constructFromSymbol",0,t,"millisecondsInDay",0,864e5,"millisecondsInWeek",0,6048e5,"minutesInDay",0,1440,"minutesInMonth",0,43200],908627),e.s(["constructFrom",0,function(e,r){return"function"==typeof e?e(r):e&&"object"==typeof e&&t in e?e[t](r):e instanceof Date?new e.constructor(r):new Date(r)}],825402)},605263,e=>{"use strict";var t=e.i(516913),r=e.i(436519);e.s(["isSameDay",0,function(e,i,a){let[n,s]=(0,t.normalizeDates)(a?.in,e,i);return+(0,r.startOfDay)(n)==+(0,r.startOfDay)(s)}])},349666,673562,278194,64496,e=>{"use strict";var t=e.i(825402);function r(e){return(0,t.constructFrom)(e,Date.now())}var i=e.i(605263);e.s(["isToday",0,function(e,a){return(0,i.isSameDay)((0,t.constructFrom)(a?.in||e,e),r(a?.in||e))}],349666);var a=e.i(998636);e.s(["isYesterday",0,function(e,n){var s;return(0,i.isSameDay)((0,t.constructFrom)(n?.in||e,e),(s=r(n?.in||e),(0,a.addD
1ays)(s,-1,void 0)))}],673562);var n=e.i(165525);e.s(["subMonths",0,function(e,t,r){return(0,n.addMonths)(e,-t,r)}],278194);var s=e.i(845255);e.s(["subWeeks",0,function(e,t,r){return(0,s.addWeeks)(e,-t,r)}],64496)},436519,e=>{"use strict";var t=e.i(329263);e.s(["startOfDay",0,function(e,r){let i=(0,t.toDate)(e,r?.in);return i.setHours(0,0,0,0),i}])},329263,e=>{"use strict";var t=e.i(825402);e.s(["toDate",0,function(e,r){return(0,t.constructFrom)(r||e,e)}])},967101,e=>{"use strict";let t=(0,e.i(553010).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},286550,e=>{"use strict";var t=e.i(967101);e.s(["CheckIcon",()=>t.default])},25180,e=>{"use strict";let t=(0,e.i(553010).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},975869,e=>{"use strict";var t=e.i(25180);e.s(["ChevronRightIcon",()=>t.default])},507295,e=>{"use strict";let t=(0,e.i(553010).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},723434,808928,e=>{"use strict";var t=e.i(842058);e.s(["ERROR_REVALIDATE_EVENT",0,3,"FOCUS_EVENT",0,0,"MUTATE_EVENT",0,2,"RECONNECT_EVENT",0,1],808928);var r=Object.prototype.hasOwnProperty;let i=new WeakMap,a=()=>{},n=a(),s=Object,o=e=>e===n,l=e=>"function"==typeof e,c=(e,t)=>({...e,...t}),d=e=>l(e.then),u={},f={},h="undefined",p=typeof window!=h,m=typeof document!=h,g=p&&"Deno"in window,x=(e,t)=>{let r=i.get(e);return[()=>!o(t)&&e.get(t)||u,i=>{if(!o(t)){let a=e.get(t);t in f||(f[t]=a),r[5](t,c(a,i),a||u)}},r[6],()=>!o(t)&&t in f?f[t]:!o(t)&&e.get(t)||u]},v=!0,[b,y]=p&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[a,a],j={initFocus:e=>(m&&document.addEventListener("visibilitychange",e),b("focus",e),()=>{m&&document.removeEventListener("visibilitychange",e),y("focus",e)}),initReconnect:e=>{let t=()=>{v=!0,e()},r=()=>{v=!1};return b("online",t),b("offline",r),()=>{y("online",t),y("offline",r)}}},w=!t.default.useId,C=!p||g,D=C?t.useEffect:t.useLayoutEffect,E="u">typeof navigator&&navigator.connection,k=!C&&E&&(["slow-2g","2g"].includes(E.effectiveType)||E.saveData),S=new WeakMap,N=(e,t)=>e===`[object ${t}]`,R=0,A=e=>{let t,r,i=typeof e,a=s.prototype.toString.call(e),n=N(a,"Date"),l=N(a,"RegExp"),c=N(a,"Object");if(s(e)!==e||n||l)t=n?e.toJSON():"symbol"==i?e.toString():"string"==i?JSON.stringify(e):""+e;else{if(t=S.get(e))return t;if(t=++R+"~",S.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=A(e[r])+",";S.set(e,t)}if(c){t="#";let i=s.keys(e).sort();for(;!o(r=i.pop());)o(e[r])||(t+=r+":"+A(e[r])+",");S.set(e,t)}}return t},I=e=>{if(l(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?A(e):"",t]},T=0,O=()=>++T;async function _(...e){let[t,r,a,s]=e,u=c({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{}),f=u.populateCache,h=u.rollbackOnError,p=u.optimisticData,m=u.throwOnError;if(l(r)){let e=[];for(let i of t.keys())!/^\$(inf|sub)\$/.test(i)&&r(t.get(i)._k)&&e.push(i);return Promise.all(e.map(g))}return g(r);async function g(r){let s,[c]=I(r);if(!c)return;let[g,v]=x(t,c),[b,y,j,w]=i.get(t),C=()=>{let e=b[c];return(l(u.revalidate)?u.revalidate(g().data,r):!1!==u.revalidate)&&(delete j[c],delete w[c],e&&e[0])?e[0](2).then(()=>g().data):g().data};if(e.length<3)return C();let D=a,E=!1,k=O();y[c]=[k,0];let S=!o(p),N=g(),R=N.data,A=N._c,T=o(A)?R:A;if(S&&v({data:p=l(p)?p(T,R):p,_c:T}),l(D))try{D=D(T)}catch(e){s=e,E=!0}if(D&&d(D)){let e;if(D=await D.catch(e=>{s=e,E=!0}),k!==y[c][0]){if(E)throw s;return D}E&&S&&(e=s,"function"==typeof h?h(e):!1!==h)&&(f=!0,v({data:T,_c:n}))}if(f&&!E&&(l(f)?v({data:f(D,T),error:n,_c:n}):v({data:D,error:n,_c:n})),y[c][1]=O(),Promise.resolve(C()).then(()=>{v({_c:n})}),E){if(m)throw s;return}return D}}let M=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},P=(e,t)=>{if(!i.has(e)){let r=c(j,t),s=Object.create(null),o=_.bind(n,e),l=a,d=Object.create(null),u=(e,t)=>{let r=d[e]||[];return d[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},f=(t,r,i)=>{e.set(t,r);let a=d[t];if(a)for(let e of a)e(r,i)},h=()=>
1{if(!i.has(e)&&(i.set(e,[s,Object.create(null),Object.create(null),Object.create(null),o,f,u]),!C)){let t=r.initFocus(setTimeout.bind(n,M.bind(n,s,0))),a=r.initReconnect(setTimeout.bind(n,M.bind(n,s,1)));l=()=>{t&&t(),a&&a(),i.delete(e)}}};return h(),[e,o,h,l]}return[e,i.get(e)[4]]},[F,z]=P(new Map),V=c({onLoadingSlow:a,onSuccess:a,onError:a,onErrorRetry:(e,t,r,i,a)=>{let n=r.errorRetryCount,s=a.retryCount,l=~~((Math.random()+.5)*(1<<(s<8?s:8)))*r.errorRetryInterval;(o(n)||!(s>n))&&setTimeout(i,l,a)},onDiscarded:a,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:k?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:k?5e3:3e3,compare:function e(t,i){var a,n;if(t===i)return!0;if(t&&i&&(a=t.constructor)===i.constructor){if(a===Date)return t.getTime()===i.getTime();if(a===RegExp)return t.toString()===i.toString();if(a===Array){if((n=t.length)===i.length)for(;n--&&e(t[n],i[n]););return -1===n}if(!a||"object"==typeof t){for(a in n=0,t)if(r.call(t,a)&&++n&&!r.call(i,a)||!(a in i)||!e(t[a],i[a]))return!1;return Object.keys(i).length===n}}return t!=t&&i!=i},isPaused:()=>!1,cache:F,mutate:z,fallback:{}},{isOnline:()=>v,isVisible:()=>{let e=m&&document.visibilityState;return o(e)||"hidden"!==e}}),L=(e,t)=>{let r=c(e,t);if(t){let{use:i,fallback:a}=e,{use:n,fallback:s}=t;i&&n&&(r.use=i.concat(n)),a&&s&&(r.fallback=c(a,s))}return r},U=(0,t.createContext)({});e.s(["A",0,a,"B",0,d,"I",0,C,"O",0,s,"S",0,U,"U",0,n,"a",0,l,"b",0,i,"c",0,F,"d",0,V,"e",0,o,"f",0,L,"g",0,e=>{let{value:r}=e,i=(0,t.useContext)(U),a=l(r),s=(0,t.useMemo)(()=>a?r(i):r,[a,i,r]),o=(0,t.useMemo)(()=>a?s:L(i,s),[a,i,s]),d=s&&s.provider,u=(0,t.useRef)(n);d&&!u.current&&(u.current=P(d(o.cache||F),s));let f=u.current;return f&&(o.cache=f[0],o.mutate=f[1]),D(()=>{if(f)return f[2]&&f[2](),f[3]},[]),(0,t.createElement)(U.Provider,c(e,{value:o}))},"i",0,p,"m",0,c,"n",0,_,"o",0,O,"r",0,w,"s",0,I,"t",0,e=>p&&typeof window.requestAnimationFrame!=h?window.requestAnimationFrame(e):setTimeout(e,1),"u",0,D,"z",0,x],723434)},963183,167056,812187,321910,e=>{"use strict";var t=e.i(723434);e.s(["UNDEFINED",()=>t.U],963183),e.s(["OBJECT",()=>t.O],167056),e.s(["SWRConfig",()=>t.g],812187),e.s(["defaultConfig",()=>t.d],321910)},568838,573661,e=>{"use strict";var t=e.i(723434);e.i(808928);let r="$inf$";e.s(["INFINITE_PREFIX",0,r],573661);var i=e.i(842058);let a=t.i&&window.__SWR_DEVTOOLS_USE__,n=a?window.__SWR_DEVTOOLS_USE__:[],s=e=>(0,t.a)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],o=()=>{let e=(0,i.useContext)(t.S);return(0,i.useMemo)(()=>(0,t.m)(t.d,e),[e])},l=n.concat(e=>(i,a,n)=>{let s=a&&((...e)=>{let[n]=(0,t.s)(i),[,,,s]=t.b.get(t.c);if(n.startsWith(r))return a(...e);let o=s[n];return(0,t.e)(o)?a(...e):(delete s[n],o)});return e(i,s,n)});a&&(window.__SWR_DEVTOOLS_REACT__=i.default),e.s(["subscribeCallback",0,(e,t,r)=>{let i=t[e]||(t[e]=[]);return i.push(r),()=>{let e=i.indexOf(r);e>=0&&(i[e]=i[i.length-1],i.pop())}},"useSWRConfig",0,o,"withArgs",0,e=>function(...r){let i=o(),[a,n,c]=s(r),d=(0,t.f)(i,c),u=e,{use:f}=d,h=(f||[]).concat(l);for(let e=h.length;e--;)u=h[e](u);return u(a,n||d.fetcher||null,d)},"withMiddleware",0,(e,t)=>(...r)=>{let[i,a,n]=s(r),o=(n.use||[]).concat(t);return e(i,a,{...n,use:o})}],568838)},338554,782562,21999,336463,488939,746189,586372,e=>{"use strict";var t=e.i(842058),r=e.i(33347),i=e.i(963183),a=e.i(167056),n=e.i(812187),s=e.i(321910),o=e.i(568838),l=e.i(723434);e.s(["SWRGlobalState",()=>l.b],782562);var l=l,c=l;e.s(["serialize",()=>c.s],21999);var c=l,d=l;e.s(["createCacheHelper",()=>d.z],336463);var d=l,u=l;e.s(["isUndefined",()=>u.e],488939);var u=l,f=l,h=l,p=l,m=l,g=l;e.s(["isFunction",()=>g.a],746189);var g=l,x=e.i(808928),x=x,v=l,b=l;e.s(["useIsomorphicLayoutEffect",()=>b.u],586372);var b=l,y=l,j=l,w=l;let C=()=>{},D=C(),E=(new WeakMap,t.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),k={dedupe:!0},S=Promise.resolve(i.UNDEFINED),N=()=>p.A;a.OBJECT.defineProperty(n.SWRConfig,"defaultValue",{value:s.defaultConfig});let R=(0,o.withArgs)((e,a,n)=>{let{cache:s,compare:p,suspense:C,fallbackData:D,revalidateOnMount:R,revalidateIfStale:A,refreshInterval:I,refreshWhenHidden:T,refreshWhenOffline:O,keepPreviousData:_,strictServerPrefetchWarning:M}=n,[P,F,z,V]=l.b.get(s),[L,U]=(0,c.s)(e),W=(0,t.useRef)(!1),H=(0,t.useRef)(!1),$=(0,t.useRef)(L),B=(0,t.useRef)(a),G=(0,t.useRef)(n),Y=()=>G.current.isVisible()&&G.current.isOnline(),[q,J,K,X]=(0,d.z)(s,L),Q=(0,t.useRef)({}).current,Z=(0,u.e)(D)?(0,u.e)(n.fallback)?i.UNDEFINED:n.fallback[L]:D,ee=(e,t)=>
1{for(let r in Q)if("data"===r){if(!p(e[r],t[r])&&(!(0,u.e)(e[r])||!p(ec,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},et=!W.current,er=(0,t.useMemo)(()=>{let e=q(),t=X(),r=e=>{let t=(0,w.m)(e);return(delete t._k,(()=>{if(!L||!a||G.current.isPaused())return!1;if(et&&!(0,u.e)(R))return R;let e=(0,u.e)(Z)?t.data:Z;return(0,u.e)(e)||A})())?{isValidating:!0,isLoading:!0,...t}:t},i=r(e),n=e===t?i:r(t),s=i;return[()=>{let e=r(q());return ee(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>n]},[s,L]),ei=(0,r.useSyncExternalStore)((0,t.useCallback)(e=>K(L,(t,r)=>{ee(r,t)||e()}),[s,L]),er[0],er[1]),ea=P[L]&&P[L].length>0,en=ei.data,es=(0,u.e)(en)?Z&&(0,f.B)(Z)?E(Z):Z:en,eo=ei.error,el=(0,t.useRef)(es),ec=_?(0,u.e)(en)?(0,u.e)(el.current)?es:el.current:en:es,ed=L&&(0,u.e)(es),eu=(0,t.useRef)(null);h.I||(0,r.useSyncExternalStore)(N,()=>(eu.current=!1,eu),()=>(eu.current=!0,eu));let ef=eu.current;M&&ef&&!C&&ed&&console.warn(`Missing pre-initiated data for serialized key "${L}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let eh=!(!L||!a||G.current.isPaused())&&(!ea||!!(0,u.e)(eo))&&(et&&!(0,u.e)(R)?R:C?!(0,u.e)(es)&&A:(0,u.e)(es)||A),ep=et&&eh,em=(0,u.e)(ei.isValidating)?ep:ei.isValidating,eg=(0,u.e)(ei.isLoading)?ep:ei.isLoading,ex=(0,t.useCallback)(async e=>{let t,r,a=B.current;if(!L||!a||H.current||G.current.isPaused())return!1;let s=!0,o=e||{},l=!z[L]||!o.dedupe,c=()=>j.r?!H.current&&L===$.current&&W.current:L===$.current,d={isValidating:!1,isLoading:!1},f=()=>{J(d)},h=()=>{let e=z[L];e&&e[1]===r&&delete z[L]},v={isValidating:!0};(0,u.e)(q().data)&&(v.isLoading=!0);try{if(l&&(J(v),n.loadingTimeout&&(0,u.e)(q().data)&&setTimeout(()=>{s&&c()&&G.current.onLoadingSlow(L,n)},n.loadingTimeout),z[L]=[a(U),(0,m.o)()]),[t,r]=z[L],t=await t,l&&setTimeout(h,n.dedupingInterval),!z[L]||z[L][1]!==r)return l&&c()&&G.current.onDiscarded(L),!1;d.error=i.UNDEFINED;let e=F[L];if(!(0,u.e)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return f(),l&&c()&&G.current.onDiscarded(L),!1;let o=q().data;d.data=p(o,t)?o:t,l&&c()&&G.current.onSuccess(t,L,n)}catch(r){h();let e=G.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&c()&&(e.onError(r,L,e),(!0===t||(0,g.a)(t)&&t(r))&&(!G.current.revalidateOnFocus||!G.current.revalidateOnReconnect||Y())&&e.onErrorRetry(r,L,e,e=>{let t=P[L];t&&t[0]&&t[0](x.ERROR_REVALIDATE_EVENT,e)},{retryCount:(o.retryCount||0)+1,dedupe:!0})))}return s=!1,f(),!0},[L,s]),ev=(0,t.useCallback)((...e)=>(0,v.n)(s,$.current,...e),[]);if((0,b.u)(()=>{B.current=a,G.current=n,(0,u.e)(en)||(el.current=en)}),(0,b.u)(()=>{if(!L)return;let e=ex.bind(i.UNDEFINED,k),t=0;G.current.revalidateOnFocus&&(t=Date.now()+G.current.focusThrottleInterval);let r=(0,o.subscribeCallback)(L,P,(r,i={})=>{if(r==x.FOCUS_EVENT){let r=Date.now();G.current.revalidateOnFocus&&r>t&&Y()&&(t=r+G.current.focusThrottleInterval,e())}else if(r==x.RECONNECT_EVENT)G.current.revalidateOnReconnect&&Y()&&e();else if(r==x.MUTATE_EVENT)return ex();else if(r==x.ERROR_REVALIDATE_EVENT)return ex(i)});return H.current=!1,$.current=L,W.current=!0,J({_k:U}),eh&&!z[L]&&((0,u.e)(es)||h.I?e():(0,y.t)(e)),()=>{H.current=!0,r()}},[L]),(0,b.u)(()=>{let e;function t(){let t=(0,g.a)(I)?I(q().data):I;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!q().error&&(T||G.current.isVisible())&&(O||G.current.isOnline())?ex(k).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[I,T,O,L]),(0,t.useDebugValue)(ec),C){if(!j.r&&h.I&&ed)throw Error("Fallback data is required when using Suspense in SSR.");ed&&(B.current=a,G.current=n,H.current=!1);let e=V[L];if(E(!(0,u.e)(e)&&ed?ev(e):S),!(0,u.e)(eo)&&ed)throw eo;let t=ed?ex(k):S;!(0,u.e)(ec)&&ed&&(t.status="fulfilled",t.value=!0),E(t)}return{mutate:ev,get data(){return Q.data=!0,ec},get error(){return Q.error=!0,eo},get isValidating(){return Q.isValidating=!0,em},get isLoading(){return Q.isLoading=!0,eg}}});e.s(["default",0,R],338554)},927375,e=>{"use strict";var t=e.i(842058),r=e.i(338554),i=e.i(568838),a=e.i(782562),n=e.i(723434),n=n,s=e.i(573661),o=e.i(336463),l=e.i(488939),c=e.i(586372),d=e.i(963183),u=e.i(21999),f=e.i(746189),h=e.i(33347);let p=()=>{},m=p(),g=Object,x=e=>e===m,v=new WeakMap,b=(e,t)=>e===`[object ${t}]`,y=0,j=e=>{let t,r,i=typeof e,a=g.prototype.toString.call(e),n=b(a,"Date"),s=b(a,"RegExp"),o=b(a,"Object");
1if(g(e)!==e||n||s)t=n?e.toJSON():"symbol"==i?e.toString():"string"==i?JSON.stringify(e):""+e;else{if(t=v.get(e))return t;if(t=++y+"~",v.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=j(e[r])+",";v.set(e,t)}if(o){t="#";let i=g.keys(e).sort();for(;!x(r=i.pop());)x(e[r])||(t+=r+":"+j(e[r])+",");v.set(e,t)}}return t},w=e=>(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?j(e):"",t]})(e?e(0,null):null)[0],C=Promise.resolve(),D=(0,i.withMiddleware)(r.default,e=>(r,i,p)=>{let m,g=(0,t.useRef)(!1),{cache:x,initialSize:v=1,revalidateAll:b=!1,persistSize:y=!1,revalidateFirstPage:j=!0,revalidateOnMount:D=!1,parallel:E=!1}=p,[,,,k]=a.SWRGlobalState.get(n.c);try{(m=w(r))&&(m=s.INFINITE_PREFIX+m)}catch(e){}let[S,N,R]=(0,o.createCacheHelper)(x,m),A=(0,t.useCallback)(()=>(0,l.isUndefined)(S()._l)?v:S()._l,[x,m,v]);(0,h.useSyncExternalStore)((0,t.useCallback)(e=>m?R(m,()=>{e()}):()=>{},[x,m]),A,A);let I=(0,t.useCallback)(()=>{let e=S()._l;return(0,l.isUndefined)(e)?v:e},[m,v]),T=(0,t.useRef)(I());(0,c.useIsomorphicLayoutEffect)(()=>{if(!g.current){g.current=!0;return}m&&N({_l:y?T.current:I()})},[m,x]);let O=D&&!g.current,_=e(m,async e=>{let t=S()._i,a=S()._r;N({_r:d.UNDEFINED});let n=[],s=I(),[c]=(0,o.createCacheHelper)(x,e),f=c().data,h=[],m=null;for(let e=0;e<s;++e){let[s,c]=(0,u.serialize)(r(e,E?null:m));if(!s)break;let[d,g]=(0,o.createCacheHelper)(x,s),v=d().data,y=b||t||(0,l.isUndefined)(v)||j&&!e&&!(0,l.isUndefined)(f)||O||f&&!(0,l.isUndefined)(f[e])&&!p.compare(f[e],v);if(i&&("function"==typeof a?a(v,c):y)){let t=async()=>{if(s in k){let e=k[s];delete k[s],v=await e}else v=await i(c);g({data:v,_k:c}),n[e]=v};E?h.push(t):await t()}else n[e]=v;E||(m=v)}return E&&await Promise.all(h.map(e=>e())),N({_i:d.UNDEFINED}),n},p),M=(0,t.useCallback)(function(e,t){let r="boolean"==typeof t?{revalidate:t}:t||{},i=!1!==r.revalidate;return m?(i&&((0,l.isUndefined)(e)?N({_i:!0,_r:r.revalidate}):N({_i:!1,_r:r.revalidate})),arguments.length?_.mutate(e,{...r,revalidate:i}):_.mutate()):C},[m,x]),P=(0,t.useCallback)(e=>{let t;if(!m)return C;let[,i]=(0,o.createCacheHelper)(x,m);if((0,f.isFunction)(e)?t=e(I()):"number"==typeof e&&(t=e),"number"!=typeof t)return C;i({_l:t}),T.current=t;let a=[],[n]=(0,o.createCacheHelper)(x,m),s=null;for(let e=0;e<t;++e){let[t]=(0,u.serialize)(r(e,s)),[i]=(0,o.createCacheHelper)(x,t),c=t?i().data:d.UNDEFINED;if((0,l.isUndefined)(c))return M(n().data);a.push(c),s=c}return M(a)},[m,x,M,I]);return{size:I(),setSize:P,mutate:M,get data(){return _.data},get error(){return _.error},get isValidating(){return _.isValidating},get isLoading(){return _.isLoading}}});e.s(["default",0,D,"unstable_serialize",0,e=>s.INFINITE_PREFIX+w(e)],927375)},107983,(e,t,r)=>{"use strict";var i=e.r(842058),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=i.useState,s=i.useEffect,o=i.useLayoutEffect,l=i.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!a(e,r)}catch(e){return!0}}var d="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),i=n({inst:{value:r,getSnapshot:t}}),a=i[0].inst,d=i[1];return o(function(){a.value=r,a.getSnapshot=t,c(a)&&d({inst:a})},[e,r,t]),s(function(){return c(a)&&d({inst:a}),e(function(){c(a)&&d({inst:a})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:d},33347,(e,t,r)=>{"use strict";e.i(487798),t.exports=e.r(107983)},817353,e=>{"use strict";var t=e.i(243029),r=e.i(842058),i=e.i(161462),a=e.i(723673),n=e.i(388693),s=e.i(515201),o=e.i(802661),l="AlertDialog",[c,d]=(0,i.createContextScope)(l,[n.createDialogScope]),u=(0,n.createDialogScope)(),f=e=>{let{__scopeAlertDialog:r,...i}=e,a=u(r);return(0,t.jsx)(n.Root,{...a,...i,modal:!0})};f.displayName=l;var h=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=u(i);return(0,t.jsx)(n.Trigger,{...s,...a,ref:r})});h.displayName="AlertDialogTrigger";var p=e=>{let{__scopeAlertDialog:r,...i}=e,a=u(r);return(0,t.jsx)(n.Portal,{...a,...i})};p.displayName="AlertDialogPortal";var m=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=u(i);return(0,t.jsx)(n.Overlay,{...s,...a,ref:r})});m.displayName="AlertDialogOverlay";var g="AlertDialogContent",[x,v]=c(g),b=(0,o.createSlottable)("AlertDialogContent"),y=r.forwardRef((e,i)=>{let{__scopeAlertDialog:o,children:l,...c}=e,d=u(o),f=r.useRef(null),h=(0,a.useComposedRefs)(i,f),p=r.useRef(null);return(0,t.jsx)(n.WarningProvider,{contentName:g,titleName:j,docsSlug:"alert-dialog",children:(0,t.jsx)(x,{scope:o,cancelRef:p,children:(0,t.jsxs)(n.Content,{role:"alertdialog",...d,...c,ref:h,onOpenAutoFocus:(0,s.composeEventHandlers)(c.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,t.jsx)(b,{children:l}),(0,t.jsx)(N,{contentRef:f})]})})})});y.displayName=g;var j="AlertDialogTitle",w=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=u(i);return(0,t.jsx)(n.Title,{...s,...a,ref:r})});w.displayName=j;var C="AlertDialogDescription",D=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=u(i);return(0,t.jsx)(n.Description,{...s,...a,ref:r})});D.displayName=C;var E=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=u(i);return(0,t.jsx)(n.Close,{...s,...a,ref:r})});E.displayName="AlertDialogAction";var k="AlertDialogCancel",S=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...s}=e,{cancelRef:o}=v(k,i),l=u(i),c=(0,a.useComposedRefs)(r,o);return(0,t.jsx)(n.Close,{...l,...s,ref:c})});S.displayName=k;var N=({contentRef:e})=>{let t=`\`${g}\` requires a description for the component to be accessible for screen reader users. 2
3You can add a description to the \`${g}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 4 5Alternatively, 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 \`${g}\`. 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. 6 7For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null};e.s(["Action",0,E,"AlertDialog",0,f,"AlertDialogAction",0,E,"AlertDialogCancel",0,S,"AlertDialogContent",0,y,"AlertDialogDescription",0,D,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,p,"AlertDialogTitle",0,w,"AlertDialogTrigger",0,h,"Cancel",0,S,"Content",0,y,"Description",0,D,"Overlay",0,m,"Portal",0,p,"Root",0,f,"Title",0,w,"Trigger",0,h,"createAlertDialogScope",0,d],975634);var R=e.i(975634),R=R,A=e.i(632137),I=e.i(981831);function T({...e}){return(0,t.jsx)(R.Portal,{"data-slot":"alert-dialog-portal",...e})}function O({className:e,...r}){return(0,t.jsx)(R.Overlay,{className:(0,A.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"alert-dialog-overlay",...r})}e.s(["AlertDialog",0,function({...e}){return(0,t.jsx)(R.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogAction",0,function({className:e,variant:r="default",size:i="default",...a}){return(0,t.jsx)(I.Button,{asChild:!0,size:i,variant:r,children:(0,t.jsx)(R.Action,{className:(0,A.cn)(e),"data-slot":"alert-dialog-action",...a})})},"AlertDialogCancel",0,function({className:e,variant:r="outline",size:i="default",...a}){return(0,t.jsx)(I.Button,{asChild:!0,size:i,variant:r,children:(0,t.jsx)(R.Cancel,{className:(0,A.cn)(e),"data-slot":"alert-dialog-cancel",...a})})},"AlertDialogContent",0,function({className:e,size:r="default",...i}){return(0,t.jsxs)(T,{children:[(0,t.jsx)(O,{}),(0,t.jsx)(R.Content,{className:(0,A.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-background p-6 ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-size":r,"data-slot":"alert-dialog-content",...i})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(R.Description,{className:(0,A.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"alert-dialog-description",...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,A.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),"data-slot":"alert-dialog-footer",...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,A.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),"data-slot":"alert-dialog-header",...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(R.Title,{className:(0,A.cn)("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),"data-slot":"alert-dialog-title",...r})},"AlertDialogTrigger",0,function({...e}){return(0,t.jsx)(R.Trigger,{"data-slot":"alert-dialog-trigger",...e})}],817353)},325329,e=>{"use strict";var t=e.i(243029),r=e.i(286550),i=e.i(842058),a=e.i(723673),n=e.i(161462),s=e.i(515201),o=e.i(248490),l=e.i(52706),c=e.i(987945),d=e.i(358894),u=e.i(371954),f="Checkbox",[h,p]=(0,n.createContextScope)(f),[m,g]=h(f);function x(e){let{__scopeCheckbox:r,checked:a,children:n,defaultChecked:s,disabled:l,form:c,name:d,onCheckedChange:u,required:h,value:p="on",internal_do_not_use_render:g}=e,[x,v]=(0,o.useControllableState)({prop:a,defaultProp:s??!1,onChange:u,caller:f}),[b,y]=i.useState(null),[j,w]=i.useState(null),C=i.useRef(!1),D=!b||!!c||!!b.closest("form"),k={checked:x,disabled:l,setChecked:v,control:b,setControl:y,name:d,form:c,value:p,hasConsumerStoppedPropagationRef:C,required:h,defaultChecked:!E(s)&&s,isFormControl:D,bubbleInput:j,setBubbleInput:w};return(0,t.jsx)(m,{scope:r,...k,children:"function"==typeof g?g(k):n})}var v="CheckboxTrigger",b=i.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:n,...o},l)=>{let{control:c,value:d,disabled:f,checked:h,required:p,setControl:m,setChecked:x,hasConsumerStoppedPropagationRef:b,isFormControl:y,bubbleInput:j}=g(v,e),w=(0,a.useComposedRefs)(l,m),C=i.useRef(h);return i.useEffect(()=>{let e=c?.form;if(e){let t=()=>x(C.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[c,x]),(0,t.jsx)(u.Primitive.button,{type:"button",role:"checkbox","aria-checked":E(h)?"mixed":h,"aria-required":p,"data-state":k(h),"data-disabled":f?"":void 0,disabled:f,value:d,...o,ref:w,onKeyDown:(0,s.composeEventHandlers)(r,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,s.composeEventHandlers)(n,e=>{x(e=>!!E(e)||!e),j&&y&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})})});b.displayName=v;var y=i.forwardRef((e,r)=>{let{__scopeCheckbox:i,name:a,checked:n,defaultChecked:s,required:o,disabled:l,value:c,onCheckedChange:d,form:u,...f}=e;return(0,t.jsx)(x,{__scopeCheckbox:i,checked:n,defaultChecked:s,disabled:l,required:o,onCheckedChange:d,name:a,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{...f,ref:r,__scopeCheckbox:i}),e&&(0,t.jsx)(D,{__scopeCheckbox:i})]})})});y.displayName=f;var j="CheckboxIndicator",w=i.forwardRef((e,r)=>{let{__scopeCheckbox:i,forceMount:a,...n}=e,s=g(j,i);return(0,t.jsx)(d.Presence,{present:a||E(s.checked)||!0===s.checked,children:(0,t.jsx)(u.Primitive.span,{"data-state":k(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:r,
7style:{pointerEvents:"none",...e.style}})})});w.displayName=j;var C="CheckboxBubbleInput",D=i.forwardRef(({__scopeCheckbox:e,...r},n)=>{let{control:s,hasConsumerStoppedPropagationRef:o,checked:d,defaultChecked:f,required:h,disabled:p,name:m,value:x,form:v,bubbleInput:b,setBubbleInput:y}=g(C,e),j=(0,a.useComposedRefs)(n,y),w=(0,l.usePrevious)(d),D=(0,c.useSize)(s);i.useEffect(()=>{if(!b)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!o.current;if(w!==d&&e){let r=new Event("click",{bubbles:t});b.indeterminate=E(d),e.call(b,!E(d)&&d),b.dispatchEvent(r)}},[b,w,d,o]);let k=i.useRef(!E(d)&&d);return(0,t.jsx)(u.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??k.current,required:h,disabled:p,name:m,value:x,form:v,...r,tabIndex:-1,ref:j,style:{...r.style,...D,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function E(e){return"indeterminate"===e}function k(e){return E(e)?"indeterminate":e?"checked":"unchecked"}D.displayName=C,e.s(["Checkbox",0,y,"CheckboxIndicator",0,w,"Indicator",0,w,"Root",0,y,"createCheckboxScope",0,p,"unstable_BubbleInput",0,D,"unstable_CheckboxBubbleInput",0,D,"unstable_CheckboxProvider",0,x,"unstable_CheckboxTrigger",0,b,"unstable_Provider",0,x,"unstable_Trigger",0,b],399876);var S=e.i(399876),S=S,N=e.i(632137);e.s(["Checkbox",0,function({className:e,...i}){return(0,t.jsx)(S.Root,{className:(0,N.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),"data-slot":"checkbox",...i,children:(0,t.jsx)(S.Indicator,{className:"grid place-content-center text-current transition-none [&>svg]:size-3.5","data-slot":"checkbox-indicator",children:(0,t.jsx)(r.CheckIcon,{})})})}],325329)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.